Own Diagram Editor based on existing org.eclipse.papyrus.uml.diagram.clazz Editor [message #1020610] |
Mon, 18 March 2013 15:03 |
Jan Winter Messages: 1 Registered: March 2013 |
Junior Member |
|
|
Hello!
I want to create a new Papyrus Diagram Editor and integrate it into Papyrus.
The existing Class Diagram Editor from org.eclipse.papyrus.uml.diagram.clazz does exactly what I need, I only have to do some modifications in one or two classes of this plugin.
What I done so far:
- I copied the org.eclipse.papyrus.uml.diagram.clazz plugin project and rename it into
org.eclipse.papyrus.uml.diagram.myeditor (also the subpackages are changed from clazz to myeditor)
- I changed every occurrence of the the word "clazz" into "myeditor" in the plugin.xml
- The plugin ID is changed to org.eclipse.papyrus.uml.diagram.myeditor
- I also changed the labels for the menu entries with the plugin.xml
for example in:
<menuContribution locationURI="menu:org.eclipse.papyrus.ui.menu">
<menu id="org.eclipse.papyrus.uml.diagram.ui.menu.diagrams"
label="Diagrams">
<command commandId="org.eclipse.papyrus.uml.diagram.myeditor.CreateClassDiagramCommand"
icon="icons/obj16/Diagram_Class.gif"
label="Create a new MyEditor Diagram"
style="push"
tooltip="Create a new MyEditor Diagram">
<visibleWhen>
<reference definitionId="org.eclipse.papyrus.uml.diagram.common.IsPapyrusActiveWithUMLModel"/>
</visibleWhen>
</command>
</menu>
</menuContribution>
If I start a Runtime Eclipse Application from my plugin I see the Entry "MyEditor Diagram" in the list of available Editors but when I choose it, it still executes code from the original org.eclipse.papyrus.uml.diagram.clazz plugin
I checked this by putting a system.out.println command in the initializeGraphicalViewer() method of the class UMLDiagramEditor in my plugin and in the original org.eclipse.papyrus.uml.diagram.clazz plugin. The method initializeGraphicalViewer() from the original org.eclipse.papyrus.uml.diagram.clazz plugin is called.
Thanks in advance.
Best regards
Jan
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03201 seconds