take over coordinates from model into the diagram of the GMF editor? [message #59883] |
Fri, 06 October 2006 03:50  |
Eclipse User |
|
|
|
Hi all,
according to the thread
news://news.eclipse.org:119/efbkdg$q04$1@utils.eclipse.org I wonder if
the reverse direction (getting coordinates from model to diagram) is
also possible?
To be more precise: I want to build a diagram while just having the
modelfile of it --> I have to use the saved layout-information in order
to get the user-defined layout for my created diagram.
The idea behind is that I want rebuild previously saved used-defined
layout so that the new created diagram looks just like the user defined
it before.
I know that the layout is saved in the diagramfile, but I'd like to
rebuild the same diagram from scratch (without having the old *_diagram
file).
Any help or hints are very appreciated
Thanks in advance Alex
|
|
|
|
|
|
|
|
|
|
Re: take over coordinates from model into the diagram of the GMF editor? [message #60600 is a reply to message #60592] |
Mon, 09 October 2006 10:29  |
Eclipse User |
|
|
|
Hi Alex,
The nodes don't jump on the diagram after creation. Creation of nodes
seems to be no problem at all. The Layoutpoints are all saved correctly
to the modelfile via the handleNotification-method (@see thread 'Copy
GMF diagram coordinates to model'). My problem is, that during
diagram-creation the nodes loose their layout somehow.
By now I think I managed to isolate the problem to the
refreshSemantic()-method in SequenceTypeCanonicalEditPolicy, where the
created views get an initial Layout.
After removing this part of the method the user-defined layout seems to
be accepted. By now I don't know id removing the following section* has
any other bad influence on what I'm doing later on.
---*
//if (createdViews.size() > 1) {
// // perform a layout of the container
// DeferredLayoutCommand layoutCmd = new
DeferredLayoutCommand(host().getEditingDomain(), createdViews, host());
// executeCommand(new ICommandProxy(layoutCmd));
//}
---*
Well, time will tell.
Many thanks by now for your excellent help and for all hint you gave me
to point me to the right solution!
Bye Alex
|
|
|
Powered by
FUDForum. Page generated in 0.03572 seconds