Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Problems with a layout: not resize the Top Nodes(Proposal of a new Layout to GMF diagrams)
icon7.gif  Problems with a layout: not resize the Top Nodes [message #515293] Thu, 18 February 2010 11:26 Go to next message
Marc Mising name is currently offline Marc Mising nameFriend
Messages: 193
Registered: July 2009
Location: Valencia, Spain
Senior Member
Hello everybody!

I have implemented a new LayoutEditPartProvider to resize and relocate all the nodes places in my diagram in order to remove the scrolls in the compartments and maximize the space in the diagram to see all the elements correctly.

It works well, but doesn't resize the Top Node elements. All the other elements are correctly resized and relocated, but the Top Node elements only are relocated correctly, not resized. And I don't know why, because the SetBoundsCommand that I have done changes booth the location and the size... But when finishes the layout, this sizes are not changed.

Anybody knows what's happening?

If you allow me, I take the opportunity to propose if you want to add this provider to GMF diagrams by default, because I think it's very useful.

Thanks a lot.
Marc
Re: Problems with a layout: not resize the Top Nodes [message #515362 is a reply to message #515293] Thu, 18 February 2010 15:09 Go to previous messageGo to next message
Marc Mising name is currently offline Marc Mising nameFriend
Messages: 193
Registered: July 2009
Location: Valencia, Spain
Senior Member
Hi!

Well, now I know why the Top Nodes are not resized. It's due to the Snap Command added at the end of the ArrangeCommand (the set of commands added by my layout). This Snap Command, takes the Size from the Figure of the EditPart, not from the Node, and it leaves the EditPart in its origin size.

Removing this Snap Command is enough, but I will try to find a possible solution...

Thanks everybody!
Marc
Re: Problems with a layout: not resize the Top Nodes [message #515401 is a reply to message #515362] Thu, 18 February 2010 16:45 Go to previous messageGo to next message
Olivier Marot is currently offline Olivier MarotFriend
Messages: 14
Registered: September 2009
Junior Member
Hi Marc,

Great idea ! I was planning to implement a layout with this behaviour, because I thought it would be usefull indeed. I'd like to see it customizable in GMF.

Anyway, may I ask to get a look on your code ? I would like, if you agree, to use it for my diagram.

Thanks, and good job.
Olivier.
Re: Problems with a layout: not resize the Top Nodes [message #515557 is a reply to message #515401] Fri, 19 February 2010 11:32 Go to previous messageGo to next message
Marc Mising name is currently offline Marc Mising nameFriend
Messages: 193
Registered: July 2009
Location: Valencia, Spain
Senior Member
Hello Olivier,

I have added a new feature to GMF (in the bugzilla) in case they want to add to the GMF diagrams by default. Here you can see this feature request, and you can download the code if you want.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=303293

If you use it and founds some enhancements, please contact me Smile

Thanks!!
Marc
Re: Problems with a layout: not resize the Top Nodes [message #632034 is a reply to message #515557] Mon, 11 October 2010 10:06 Go to previous message
mjid is currently offline mjidFriend
Messages: 34
Registered: April 2010
Member
Hi,

I get your code and i try to apply it to an activity diagram.

But when running it i don't get the action in the diagram contextual menu.

Can you post an image to show this action?

Thanks in advance,
Previous Topic:Create a connection between two nodes programmaticaly
Next Topic:Drawing a child node partially outside its compartment
Goto Forum:
  


Current Time: Thu Apr 25 12:59:39 GMT 2024

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

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

Back to the top