GMF Problem -> nodes added are placed on top of each other in top-left hand corner [message #161921] |
Wed, 21 November 2007 19:47 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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 #162603 is a reply to message #162568] |
Sun, 25 November 2007 16:45 |
Eclipse User |
|
|
|
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 |
Malte Koelling 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);
>>
>>
|
|
|
Powered by
FUDForum. Page generated in 0.03380 seconds