Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » Setting of Diagram in the Diagram editor
Setting of Diagram in the Diagram editor [message #755904] Thu, 10 November 2011 06:43 Go to next message
saurav sarkar is currently offline saurav sarkarFriend
Messages: 428
Registered: July 2009
Senior Member

As I told earlier , I have a multi page editor in which I have added as an instance of Diagram editor. I have not subclassed it. We don't actually persist the layout, it's a view only diagram with property sheets for editing. So the diagram file is actually for viewing .

We need to change the underlying Graphiti diagram file while we are reloading the model.
As the underlying diagram file will be different from the earlier one.

Once the model loaded, we need to recreate the UI and the Diagram because the diagram file contains the old information. Is it possible to set the diagram in the DiagramTypeProvider from a client editor ?. Generally if the setInput() method in the DiagramEditor is made public my problem is solved.
Please let me know if you have any other advice or if I was not clear in my question.


Re: Setting of Diagram in the Diagram editor [message #757129 is a reply to message #755904] Wed, 16 November 2011 15:56 Go to previous message
Tim Kaiser is currently offline Tim KaiserFriend
Messages: 118
Registered: July 2009
Senior Member
Hi Saurav,

can you open the diagram file without UI, do your modifications, and
then open the editor? That would solve the issue, i guess.

After the initial open, do you generate a second file containing the modifications?

Depending on your situation calling refreshContent() on DiagramEditorInternal might help. If you remove the obsolete diagram from its resource before calling the method Graphiti will trigger a reload (if you want the reload happen from a different file you would have to update the URI in the DiagramEditorInput).

Does it help?

Best, Tim

Previous Topic:manhattan-like freeform-connection ??
Next Topic:NotificationService & Updates
Goto Forum:

Current Time: Tue Jun 19 18:49:03 GMT 2018

Powered by FUDForum. Page generated in 0.02120 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top