Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » Changes in latest Graphiti build
Changes in latest Graphiti build [message #784593] Fri, 27 January 2012 18:47 Go to next message
Martin Fluegge is currently offline Martin FlueggeFriend
Messages: 141
Registered: July 2009
Senior Member
Hi @all,

I am experiencing some problems with the latest build of Graphiti. It
seems that Graphiti has changed slighty, which influences Dawn’s
Graphiti extension. Although the version is the same (0.9.0) there are
some difference between today’s build and the one from last November.

Maybe someone can point me to the right way to fix the problems before I
start digging through the Code ;)

1.) DiagramEditor.doSave(IProgressMonitor monitor) has been made final.
Dawn overwrites this method to influence the save behaviour. Actually it
would be nice if the method could be made non-final again, if there are
no serious reasons for it.

2.) The method getDiagram() has been remove from the DiagramEditorInput.
Internally I am also using this method when Iam setting the input in the
editor to retrieve the diagram’s resource. I think I could parse the
resource set from the editingdomain to find this resource, but maybe
there is a more elegant way in Graphiti to retrieve the resource, may
some Util class?

3.) The constructor DiagramEditorInput(URI, TransactionalEditingDomain,
String, boolean) has disappeared. This might have something to with 2.)
as the editing domain was only used for getting the diagram, so if 2.)
is solved this one is obsolete. :)

Thanks in advance and have a nice weekend. :)

Cheers,

Martin
Re: Changes in latest Graphiti build [message #784615 is a reply to message #784593] Fri, 27 January 2012 19:26 Go to previous messageGo to next message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1931
Registered: July 2009
Location: Walldorf, Germany
Senior Member
Hi Martin,

Indeed there has been a change in Graphiti. The diagram editor which has so far been not part of the officiAl API has been reworked and published as API. I have announced this change some time ago in the forum, see http://www.eclipse.org/forums/index.php/t/271593/mand also tried to reach known users via mail. Seems the latter has failed for you...

There's a bug describing some details around the change and the new API in some pointers. There's also some JavaDoc in DiagramEditor that should help.

Nevertheless I try to answer your points from the top of my head ( I have no sources at hand right now):
1) doSave can be overridden in DefaultPersitestencyBehavior where all of the loading and saving is done now. Not sure, maybe it would also make sense to allow overriding directly in DiagramEditor....
2) Th input does not hold the diagram reference any more, this has been moved to th editor itself. You should be able to query it from an editor or get the URI from the input and resolve it yourself.
3) yes, this has to do with 2). You somply need the URI to create the input.

Let me know if you are able to adapt, I can also have a lookminto your sources on Monday to help you find alternatives.

Michael
Re: Changes in latest Graphiti build [message #785128 is a reply to message #784615] Sat, 28 January 2012 14:21 Go to previous messageGo to next message
Martin Fluegge is currently offline Martin FlueggeFriend
Messages: 141
Registered: July 2009
Senior Member
Hi Michael,

thanks for your quick reply. :)

Sorry, I must have overseen the post in the forum :)

We were able to solve the issues by using the PersitenceBehaviour and
retrieve the diagram's resource in another way.

Thanks for your help :)

Cheers,

Martin

Am 27.01.2012 20:26, schrieb Michael Wenz:
> Hi Martin,
>
> Indeed there has been a change in Graphiti. The diagram editor which has
> so far been not part of the officiAl API has been reworked and published
> as API. I have announced this change some time ago in the forum, see
> http://www.eclipse.org/forums/index.php/t/271593/mand also tried to
> reach known users via mail. Seems the latter has failed for you...
>
> There's a bug describing some details around the change and the new API
> in some pointers. There's also some JavaDoc in DiagramEditor that should
> help.
>
> Nevertheless I try to answer your points from the top of my head ( I
> have no sources at hand right now):
> 1) doSave can be overridden in DefaultPersitestencyBehavior where all of
> the loading and saving is done now. Not sure, maybe it would also make
> sense to allow overriding directly in DiagramEditor....
> 2) Th input does not hold the diagram reference any more, this has been
> moved to th editor itself. You should be able to query it from an editor
> or get the URI from the input and resolve it yourself.
> 3) yes, this has to do with 2). You somply need the URI to create the
> input.
>
> Let me know if you are able to adapt, I can also have a lookminto your
> sources on Monday to help you find alternatives.
>
> Michael
Re: Changes in latest Graphiti build [message #786509 is a reply to message #785128] Mon, 30 January 2012 14:13 Go to previous message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1931
Registered: July 2009
Location: Walldorf, Germany
Senior Member
Hi Martin,

ok, great!

For sake of completeness: I removed the final modifier from the method doSave() in DiagramEditor. Clients should for ease of migration be able to redefine that method. Nevertheless providing your own persistency behavior implemention (as you did) is the better way to proceed.

Michael
Previous Topic:image creation without opening an editor possible?
Next Topic:Zoom/Scaling issues with borders/connections
Goto Forum:
  


Current Time: Thu Apr 25 16:15:26 GMT 2024

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

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

Back to the top