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

Bug 321025

Summary: UML2 org.eclipse.ui.editors duplicate editor for Diagrams
Product: [Modeling] GMF-Tooling Reporter: Benjamin Schwertfeger <benjamin.schwertfeger>
Component: SamplesAssignee: Michael Golubev <borlander>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: borlander, Kenn.Hussey
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:
Attachments:
Description Flags
propsed patch for this bug borlander: iplog+, borlander: review+

Description Benjamin Schwertfeger CLA 2010-07-27 10:36:11 EDT
Build Identifier: I20100608-0911

In org.eclipse.uml2.diagram.activity and the other diagram plugins the editor is registered twice with exact the same editor, but different extensions.

This leads to duplicate entries in editor list, if you select "open with -> Other" on files.

Each editor should only be registered once and the file extension contains a comma separated list of all used extensions.

Reproducible: Always

Steps to Reproduce:
1.Install uml2
2.Right click on a file
3.Select "Open With... -> Other"
4.See "Activity Diagram Editor" twice
Comment 1 Christian Waniek CLA 2010-09-09 06:37:47 EDT
Created attachment 178499 [details]
propsed patch for this bug

For me this is also a bug. I created this patch to fix this. The patch only fixes a custom template, so regeneration of all diagram plugins is needed.
Comment 2 Michael Golubev CLA 2010-09-10 19:10:11 EDT
Comment on attachment 178499 [details]
propsed patch for this bug

Proposed patch just reverts the change described in the https://bugs.eclipse.org/bugs/show_bug.cgi?id=230873#c2 

Just in case, we will use the list of extensions, just moving EXPAND FOREACH into the extensions="..." value.
Comment 3 Michael Golubev CLA 2010-09-10 19:36:19 EDT
Comment on attachment 178499 [details]
propsed patch for this bug

My bad, this patch was good enough. 

Missed the fact that we are already storing the comma-separated list in the fileExtensions.

Reviewed, to be committed.
Comment 4 Michael Golubev CLA 2010-09-10 19:55:07 EDT
Patch committed with minor changes. 
In particular, in order to make the plugin.xml merge-able, we have added id="generated-editor" into the affected extension declaration.