Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » DirectedGraphLayout
DirectedGraphLayout [message #214147] Wed, 24 December 2008 09:44 Go to next message
Lavanya K C is currently offline Lavanya K CFriend
Messages: 23
Registered: July 2009
Junior Member
I want to set a DirectedGraphLayout to my canvas. I do not want this to
execute for 'Arrange All' or a new action rather I want this to be my
default layout. How do I define an edit policy to use this layout.
Thanks for any help.
Re: DirectedGraphLayout [message #214760 is a reply to message #214147] Thu, 08 January 2009 12:29 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: uwe.suedbeck.koeln.de

Hi Lavanya,

I'm also struggeling with this, but i think all you have to do is
setting the correct Layout-Provider in the Extension Point.

<extension name="SquareLayoutProvider"
point="org.eclipse.gmf.runtime.diagram.ui.layoutProviders">

<layoutProvider
class="de.ui.internal.provider.YourTopDownLayoutProvider">

<Priority name="Medium"/>

</layoutProvider>

</extension>

On your Editor-Extension Point you shoul be able to set a
defaultLayout-property. Then Debug in the provides(Ioperation
operation)-Method.

There are already several LayoutProviders that can handle DirectedGraph,
as TopDownProvider or RightToLeftProvider. If your Model satisfies the
requirements of directed graph (which actually seems to be my problem)
it should all work out of the box.

Hope this helps. Uwe

Lavanya schrieb:
> I want to set a DirectedGraphLayout to my canvas. I do not want this to
> execute for 'Arrange All' or a new action rather I want this to be my
> default layout. How do I define an edit policy to use this layout.
> Thanks for any help.
>
Re: DirectedGraphLayout [message #216194 is a reply to message #214760] Fri, 23 January 2009 04:57 Go to previous message
Lavanya K C is currently offline Lavanya K CFriend
Messages: 23
Registered: July 2009
Junior Member
Thanks for your reply Uwe. I tried what you have suggested. It is not
working for my requirement.
I tried to create a custom layout manager using GMFDirectedGraphLayout and
set that for my root figure in createFigure method. I changed the edit
policy also to a fixed layout. It kind of worked but not completely, still
having some problems with graph layout.

Lavanya.
Previous Topic:background color change of palette
Next Topic:getHost method returns parent edit part
Goto Forum:
  


Current Time: Fri Sep 20 20:22:03 GMT 2024

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

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

Back to the top