Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » GMF Problem -> nodes added are placed on top of each other in top-left hand corner
GMF Problem -> nodes added are placed on top of each other in top-left hand corner [message #161921] Wed, 21 November 2007 19:47 Go to next message
Eclipse UserFriend
Originally posted by: s0452900.sms.ed.ac.uk

Hello there,

I am having a slight problem with my diagram editor, the source of which
I am been unable to find.

In my diagram editor, I am able to add any number of nodes ( know this
as I can see them added into the domain model file ). However, they are
all fixed to the top left-hand corner and I am unable to
select/move/remove them from the diagram editor. Inspection of the
diagram model file in a text editor shows the nodes placed at different
x,y locations with varying width height.

I was just wondering if anyone has had this problem before (I know one
has, but the cause doesn't seem the same) and how they solved it? I have
not edited any of the files in .diagram myself.

Thank you

Paul
Re: GMF Problem -> nodes added are placed on top of each other in top-left hand corner [message #162449 is a reply to message #161921] Fri, 23 November 2007 18:40 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: s0452900.sms.ed.ac.uk

Hello,

I'm really having a bit of a hard time trying to figure out what the
cause of the problem is/a solution; any help would *really* be
appreciated! :)

Thank you

Paul McEwan

Paul McEwan wrote:
> Hello there,
>
> I am having a slight problem with my diagram editor, the source of which
> I am been unable to find.
>
> In my diagram editor, I am able to add any number of nodes ( know this
> as I can see them added into the domain model file ). However, they are
> all fixed to the top left-hand corner and I am unable to
> select/move/remove them from the diagram editor. Inspection of the
> diagram model file in a text editor shows the nodes placed at different
> x,y locations with varying width height.
>
> I was just wondering if anyone has had this problem before (I know one
> has, but the cause doesn't seem the same) and how they solved it? I have
> not edited any of the files in .diagram myself.
>
> Thank you
>
> Paul
Re: GMF Problem -> nodes added are placed on top of each other in top-left hand corner [message #162568 is a reply to message #161921] Sun, 25 November 2007 02:22 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Sam.sam.org

from the createViewsAndArrangeCommand:

ArrangeRequest arrangeRequest =
new ArrangeRequest(RequestConstants.REQ_ARRANGE_DEFERRED);
arrangeRequest.setViewAdaptersToArrange(result);
Command arrangeCommand = getHost().getCommand(arrangeRequest);
Re: GMF Problem -> nodes added are placed on top of each other in top-left hand corner [message #162603 is a reply to message #162568] Sun, 25 November 2007 16:45 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: s0452900.sms.ed.ac.uk

Thank you for the response. Unfortunately, due to my somewhat limited
understanding of GMF/GEF, I'm not entirely sure where to put the code
you have provided.

First, I assumed that I would add it to either the xxxEditPart of my
nodes or of the model itself (as part of the createDefaultEditPolicies()
method). Is this the right place?

Second, I was assuming originally that this was code I was meant to add
to a createViewsAndArrangeCommand method, but not being able to find one
in any of the files in my ".diagram" project, I assumed the idea stated
previous. Again, have I got the right idea here, or am I meant to
implement this method myself ( instead of using the one defined in
org.eclipse.gmf.runtime.diagram.ui.editpolicies.DiagramDragD ropEditPolicy ).

Thank you once again for the response and any further clarification
would be greatly appreciated :)

Thank you

Paul

Sam wrote:
> from the createViewsAndArrangeCommand:
>
> ArrangeRequest arrangeRequest =
> new ArrangeRequest(RequestConstants.REQ_ARRANGE_DEFERRED);
> arrangeRequest.setViewAdaptersToArrange(result);
> Command arrangeCommand = getHost().getCommand(arrangeRequest);
>
>
Re: GMF Problem -> nodes added are placed on top of each other in top-left hand [message #162649 is a reply to message #162603] Mon, 26 November 2007 10:26 Go to previous message
Malte Koelling is currently offline Malte KoellingFriend
Messages: 14
Registered: July 2009
Junior Member
Hello Paul,

I had similar problems, even with a fully generated editor. Perhaps your
editor has a problem and thats why it does not place the nodes elsewhere.
Please use your debugger to see what happens. It looks like an Exception
is thrown this should be trackable.

Regards

Malte


Paul McEwan wrote:

> Thank you for the response. Unfortunately, due to my somewhat limited
> understanding of GMF/GEF, I'm not entirely sure where to put the code
> you have provided.

> First, I assumed that I would add it to either the xxxEditPart of my
> nodes or of the model itself (as part of the createDefaultEditPolicies()
> method). Is this the right place?

> Second, I was assuming originally that this was code I was meant to add
> to a createViewsAndArrangeCommand method, but not being able to find one
> in any of the files in my ".diagram" project, I assumed the idea stated
> previous. Again, have I got the right idea here, or am I meant to
> implement this method myself ( instead of using the one defined in
> org.eclipse.gmf.runtime.diagram.ui.editpolicies.DiagramDragD ropEditPolicy ).

> Thank you once again for the response and any further clarification
> would be greatly appreciated :)

> Thank you

> Paul

> Sam wrote:
>> from the createViewsAndArrangeCommand:
>>
>> ArrangeRequest arrangeRequest =
>> new ArrangeRequest(RequestConstants.REQ_ARRANGE_DEFERRED);
>> arrangeRequest.setViewAdaptersToArrange(result);
>> Command arrangeCommand = getHost().getCommand(arrangeRequest);
>>
>>
Previous Topic:parallel child references / link mapping
Next Topic:dragging element disappears with this line
Goto Forum:
  


Current Time: Fri Apr 26 10:41:55 GMT 2024

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

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

Back to the top