Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Change initial position of an object
Change initial position of an object [message #555572] Fri, 27 August 2010 08:33 Go to next message
Fabinho is currently offline FabinhoFriend
Messages: 19
Registered: July 2010
Junior Member
Hi all,

I am developping an editor with gmf. Anyone know if it is possible to change the initial position of an object when created ?

The default behavior when user click on the diagram is to create it under cursor location. I want be able to put this object in the top left hand corner.

Any idea? Should the parent specify it ? or in objet creation policy?

Thx

Fab
Re: Change initial position of an object [message #555589 is a reply to message #555572] Fri, 27 August 2010 09:35 Go to previous messageGo to next message
Robert Wloch is currently offline Robert WlochFriend
Messages: 109
Registered: July 2009
Senior Member
Hi Fab,

have a look at the generated XXXCreateCommand of the figure in question. Look for the emthod called doConfigure(). That's the one you want to change. Don't forget to change the Javadoc comment to "@generated NOT".

Rob
Re: Change initial position of an object [message #555821 is a reply to message #555589] Sun, 29 August 2010 08:46 Go to previous message
Fabinho is currently offline FabinhoFriend
Messages: 19
Registered: July 2010
Junior Member
Hi,

Thx for reply. I didn't find how to modify this method so I overide the activate() method of the XXXEditPart. Now it's working but not during creation. Only if the editor is refresh, by reopen or create subdiagram.

Any how idea of to force this refresh?

Thx

Fab
Previous Topic:how to attach xsd schemalocation to the xml file?
Next Topic:Force view refresh
Goto Forum:
  


Current Time: Fri Apr 19 16:36:26 GMT 2024

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

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

Back to the top