Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » GRAPHITI based editor in a RCP
GRAPHITI based editor in a RCP [message #640461] Mon, 22 November 2010 03:39 Go to next message
Murthy Bhat is currently offline Murthy Bhat
Messages: 159
Registered: July 2009
Senior Member
Hello,

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.

Any help in this regard would be really useful.

Thanks,
Murthy
Re: GRAPHITI based editor in a RCP [message #640758 is a reply to message #640461] Mon, 22 November 2010 23:02 Go to previous messageGo to next message
Murthy Bhat is currently offline Murthy Bhat
Messages: 159
Registered: July 2009
Senior Member
Hello,

I was able to figure out a way to create editor input after browsing through the source code of

'org.eclipse.graphiti.examples.common.ui.CreateDiagramWizard '

Thanks,
Murthy
Re: GRAPHITI based editor in a RCP [message #641069 is a reply to message #640758] Wed, 24 November 2010 03:19 Go to previous messageGo to next message
Matthias Gorning is currently offline Matthias Gorning
Messages: 80
Registered: April 2010
Location: Germany
Member
Hi,
you can also find some stuff in the class
" org.eclipse.graphiti.ui.internal.services.impl.WorkbenchServ ice ".

See methods openDiagramEditor().

BR,
Matthias
Re: GRAPHITI based editor in a RCP [message #675844 is a reply to message #640461] Wed, 01 June 2011 13:06 Go to previous messageGo to next message
Bjoern Ickx is currently offline Bjoern Ickx
Messages: 17
Registered: June 2011
Junior Member
Hi there,

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

p.s.:
Some simple examples would be so helpful and not that much effort
Re: GRAPHITI based editor in a RCP [message #675940 is a reply to message #675844] Wed, 01 June 2011 23:53 Go to previous messageGo to next message
Murthy Bhat is currently offline Murthy Bhat
Messages: 159
Registered: July 2009
Senior Member
Hello,

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 ?

Regards,
Murthy

Re: GRAPHITI based editor in a RCP [message #675971 is a reply to message #675940] Thu, 02 June 2011 04:40 Go to previous messageGo to next message
Bjoern Ickx is currently offline Bjoern Ickx
Messages: 17
Registered: June 2011
Junior Member
Hello Murthy,

thanks a lot. I just didn't know where to start, as I am new to Eclipse RCP and plugin development. Still kind of a puzzle to me.

Regards

Bjoern

Re: GRAPHITI based editor in a RCP [message #709125 is a reply to message #675940] Wed, 03 August 2011 10:21 Go to previous message
Christian B is currently offline Christian B
Messages: 68
Registered: August 2011
Member
Hi,

thanks for the input, i was able to get the editor into my RCP, but i have a follow up question. Wink

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?

thanks!

[Updated on: Wed, 03 August 2011 10:28]

Report message to a moderator

Previous Topic:Create Pictogramm Element from Contextmenu
Next Topic:Connection onMouseOver?
Goto Forum:
  


Current Time: Thu Jul 24 13:56:52 EDT 2014

Powered by FUDForum. Page generated in 0.10961 seconds