Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 520205

Summary: Associating Content Type with external editor does not work.
Product: [Eclipse Project] Platform Reporter: Kalyan Prasad Tatavarthi <kalyan_prasad>
Component: UIAssignee: Mickael Istria <mistria>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert, mistria
Version: 4.8   
Target Milestone: 4.8 M1   
Hardware: All   
OS: All   
See Also: https://bugs.eclipse.org/bugs/show_bug.cgi?id=519815
https://git.eclipse.org/r/101994
https://bugs.eclipse.org/bugs/show_bug.cgi?id=520239
https://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=d2fed93bf40982d0a3648ebd04f5f07756d90620
Whiteboard:
Bug Depends on:    
Bug Blocks: 519815    
Attachments:
Description Flags
Sample Project which has a .rtf file to test the content-type Editor association
none
Error Dialog none

Description Kalyan Prasad Tatavarthi CLA 2017-07-26 07:01:27 EDT
Created attachment 269543 [details]
Sample Project which has a .rtf file to test the content-type Editor association

A new functionality has been added as part of 
https://bugs.eclipse.org/bugs/show_bug.cgi?id=519815
by which an association between content type and editor can be added in the "General->Content Types" preferences. In the example that I have attached, I had created a new content type called rtfContentType and the File Type as *.rtf and added the editor as "Microsoft Word Document". But when I double click on the File to open it, I get an Error Dialog, as shown in the attachment "Error Dialog". 

Even after I delete the newly added content type, I continue getting the Error(The error should not occur anymore as the content-type editor association has been removed) and only a restart stops the error.
Comment 1 Kalyan Prasad Tatavarthi CLA 2017-07-26 07:02:47 EDT
Created attachment 269544 [details]
Error Dialog
Comment 2 Mickael Istria CLA 2017-07-26 07:09:59 EDT
Does a similar operation work with the File Associations preference page?
Comment 3 Mickael Istria CLA 2017-07-26 07:40:51 EDT
I can reproduce it on Linux.
Comment 4 Kalyan Prasad Tatavarthi CLA 2017-07-26 07:46:38 EDT
The File Associations Preference Page Does not have this issue
Comment 5 Eclipse Genie CLA 2017-07-26 08:42:27 EDT
New Gerrit change created: https://git.eclipse.org/r/101994
Comment 6 Mickael Istria CLA 2017-07-26 10:18:12 EDT
(In reply to Eclipse Genie from comment #5)
> New Gerrit change created: https://git.eclipse.org/r/101994

@Kalyan: are you able to try this patch or do you test only against the zips from integrations builds?
Comment 7 Kalyan Prasad Tatavarthi CLA 2017-07-27 02:00:00 EDT
(In reply to Mickael Istria from comment #6)
> (In reply to Eclipse Genie from comment #5)
> > New Gerrit change created: https://git.eclipse.org/r/101994
> 
> @Kalyan: are you able to try this patch or do you test only against the zips
> from integrations builds?

I have tested the patch https://git.eclipse.org/r/101994. This fixes the first part of the Bug. But for the second part 

Even after I delete the newly added content type, The association with the External Editor still exists. This association needs to be deleted once the content type is deleted
Comment 8 Mickael Istria CLA 2017-07-27 04:34:18 EDT
(In reply to Kalyan Prasad Tatavarthi from comment #7)
> Even after I delete the newly added content type, The association with the
> External Editor still exists. This association needs to be deleted once the
> content type is deleted

You're right. As both issue are not correlated, I'be opened a new bug for this one: bug 520239

So if it's good for you, I'd like to merge the proposed patch first and we continue discussion on bug 520239.
Comment 9 Kalyan Prasad Tatavarthi CLA 2017-07-27 05:06:20 EDT
(In reply to Mickael Istria from comment #8)
> (In reply to Kalyan Prasad Tatavarthi from comment #7)
> > Even after I delete the newly added content type, The association with the
> > External Editor still exists. This association needs to be deleted once the
> > content type is deleted
> 
> You're right. As both issue are not correlated, I'be opened a new bug for
> this one: bug 520239
> 
> So if it's good for you, I'd like to merge the proposed patch first and we
> continue discussion on bug 520239.

As there is a bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=520239 opened for the second part of this bug. I have verified the behavior of the First part of the bug and it works fine.
Comment 11 Mickael Istria CLA 2017-07-27 05:42:04 EDT
Thanks a lot for this helpful report, analysis and review Kalyan!
Comment 12 Kalyan Prasad Tatavarthi CLA 2017-08-03 02:14:17 EDT
Verified in the Integration Build I20170802-2000