why save failed [message #677676] |
Thu, 09 June 2011 06:42 |
xebec Missing name Messages: 5 Registered: March 2011 |
Junior Member |
|
|
hi,
I use GMF to develope a modeling tool,
i got a trouble that when i adjust the connection Anchor,from p1 to p2
by set the sourceAnchor and targetAnchor
EllipseAnchor sourceAnchor = new EllipseAnchor((IFigure)sep.getFigure());
EllipseAnchor targetAnchor = new EllipseAnchor((IFigure)tep.getFigure());
connectionEditpart.getConnectionFigure().setSourceAnchor(sourceAnchor);
connectionEditpart.getConnectionFigure().setTargetAnchor(targetAnchor);
it seems worked,but when i save and close the diagram and reopen it,it still not changed(as p1),
i examed the diagram file with UltraEdit,i see it has not been changed
so,why it obviously changed successfully in the canvas,but in the file,it was not changed at all?
(i tried 2 ways to save ,but it does'not work:
1 currentDiagramEditor.doSave
2 ctrl+s in the editer UI
and i failed)
thanks.
-
Attachment: 1.jpg
(Size: 4.40KB, Downloaded 433 times) -
Attachment: 2.jpg
(Size: 4.04KB, Downloaded 428 times)
|
|
|
|
|
Re: why save failed [message #682065 is a reply to message #681896] |
Fri, 10 June 2011 10:03 |
|
Sorry, I should have written SetConnectionAnchorsCommand (with a S after Anchor).
Le 10/06/2011 05:06, xebec a écrit :
> thank you,Mickael.
> um.."there state is not persisted in the diagram file",thanks for advice and it seems accurate and right.
> but,when I tried to use "SetConnectionAnchorCommand" ,i found seems there is no such method or "ChangeConnectionAnchorCommand" in this framework
>
> then i think maybe I should use "ChangePropertyValueRequest" but it seems it can change some infomation but not ConnectionAnchor,so I am confused again.
--
Mickael Istria -- BonitaSoft S.A.
http://www.bonitasoft.com/products/BPM_download.php
Eclipse Community Award 2011: Best Modeling Tool
|
|
|
|
Powered by
FUDForum. Page generated in 0.03324 seconds