I have read through the tutorials of GRAPHITI and have understood the concepts. I would now like to implement a custom diagram editor (graphiti based) for a specific domain model in the RCP application.
I have to open up the graphiti editor when a particular type of file is opened in my application. I am a little stuck at this point where I have to link the editor and the DiagramTypeProvider. Could anyone please help.
I also try to get Graphiti to work within a RCP.
The tutorial as a plugin is working fine but now I am stuck in how to make it work as a RCP.
For the RCP I created the diagramTypeProvider, featureProvider and have added everything to the plugin.xml analogous to the tutorial.
Now I have the problem how to instantiate or open the editor resp. simply how to make it visible. The method "CreateDiagramWizard" (org.eclipse.graphiti.examples.common.ui) is really poor documented, there are hardly any comments, so it is not that much help for me.
Just instantiating 'diagramTypeProvider' is not enough for creating the editor. What kind of UI Element is the Editor? I which way can I use it?
Does anyone has a code snippet or a class where the diagram editor is used in such a way?
Any hint would be helpful. 'quite frustrated right now, because I haven't made any progress in the last two days.
... I am trying do develop a supply chain network simulation tool where you can model the network with Graphiti. The simulation targets to optimize the order decoupling point which is a new approach.
Much thanks in advance
Some simple examples would be so helpful and not that much effort
I got the graphiti editor in my RCP by just reusing snippets from 'CreateDiagramWizard.java' itself. The 'performFinish()' method creates the EditingDomain,EditorInput and opens the diagram Editor for me. Also for a RCP, I had to extend a editor in Plugin.xml and have the class extend "org.eclipse.graphiti.ui.editor.DiagramEditor". And the rest works fine.
Hope it helps, If not, could you be a little more clear at what point exactly you are stuck ?
thanks for the input, i was able to get the editor into my RCP, but i have a follow up question.
Murthybhat wrote on Wed, 01 June 2011 23:53
Also for a RCP, I had to extend a editor in Plugin.xml and have the class extend "org.eclipse.graphiti.ui.editor.DiagramEditor".
Why do you have to to this? I didn't have to , but the editor is there anyhow. I think this is due to the fact that i load the org.eclipse.graphiti.ui plugin in my product and this plugin registers the view in its plugin.xml. Can you explain which plugins from graphiti you load for your RCP and if i shouldn't load org.eclipse.graphiti.ui?