Skip to main content



      Home
Home » Eclipse Projects » GEF » Selection
Selection [message #248352] Thu, 16 April 2009 12:58 Go to next message
Eclipse UserFriend
Hi All,

I have use GEF with EMF in order to make a small example. I have
intalled a XYLayoutEditPolicy on the root node and overriden the
createChangeConstraintCommand() method to allow resizing and moving
parts but I can't even select my parts once they are created.

Any Idea ?

Regards.
Re: Selection [message #248390 is a reply to message #248352] Fri, 17 April 2009 21:15 Go to previous messageGo to next message
Eclipse UserFriend
exquisitus wrote:
> Hi All,
>
> I have use GEF with EMF in order to make a small example. I have
> intalled a XYLayoutEditPolicy on the root node and overriden the
> createChangeConstraintCommand() method to allow resizing and moving
> parts but I can't even select my parts once they are created.
>
> Any Idea ?
>
> Regards.

Maybe you just need to install a selection feedback edit policy? That
is, in your edit part,

installEditPolicy(
EditPolicy.SELECTION_FEEDBACK_ROLE, new SelectionEditPolicy());

Or something along those lines.

-Ben
Re: Selection [message #248403 is a reply to message #248390] Mon, 20 April 2009 03:31 Go to previous messageGo to next message
Eclipse UserFriend
It doesn't help. Actually, just installing a XY layout edit policy and
overriding the createChangeConstraintCommand() method should be enough.
The parent owns a freeform layer. I still wonder what I might have
forgotten. I checked several times the code and I am not able to see
what's wrong.

Regards.

Ben Vitale a écrit :
> exquisitus wrote:
>> Hi All,
>>
>> I have use GEF with EMF in order to make a small example. I have
>> intalled a XYLayoutEditPolicy on the root node and overriden the
>> createChangeConstraintCommand() method to allow resizing and moving
>> parts but I can't even select my parts once they are created.
>>
>> Any Idea ?
>>
>> Regards.
>
> Maybe you just need to install a selection feedback edit policy? That
> is, in your edit part,
>
> installEditPolicy(
> EditPolicy.SELECTION_FEEDBACK_ROLE, new SelectionEditPolicy());
>
> Or something along those lines.
>
> -Ben
Re: Selection [message #248464 is a reply to message #248403] Tue, 21 April 2009 08:46 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: manojm.blr.interrasystems.com

Have you tried with LAYOUT_ROLE?

Regards,
Manoj

exquisitus wrote:
> It doesn't help. Actually, just installing a XY layout edit policy and
> overriding the createChangeConstraintCommand() method should be enough.
> The parent owns a freeform layer. I still wonder what I might have
> forgotten. I checked several times the code and I am not able to see
> what's wrong.
>
> Regards.
>
> Ben Vitale a écrit :
>
>> exquisitus wrote:
>>
>>> Hi All,
>>>
>>> I have use GEF with EMF in order to make a small example. I have
>>> intalled a XYLayoutEditPolicy on the root node and overriden the
>>> createChangeConstraintCommand() method to allow resizing and moving
>>> parts but I can't even select my parts once they are created.
>>>
>>> Any Idea ?
>>>
>>> Regards.
>>
>>
>> Maybe you just need to install a selection feedback edit policy? That
>> is, in your edit part,
>>
>> installEditPolicy(
>> EditPolicy.SELECTION_FEEDBACK_ROLE, new SelectionEditPolicy());
>>
>> Or something along those lines.
>>
>> -Ben
Re: Selection [message #248469 is a reply to message #248464] Tue, 21 April 2009 09:33 Go to previous messageGo to next message
Eclipse UserFriend
I only tried with LAYOUT_ROLE !

Manoj Mitra a écrit :
> Have you tried with LAYOUT_ROLE?
>
> Regards,
> Manoj
>
> exquisitus wrote:
>> It doesn't help. Actually, just installing a XY layout edit policy and
>> overriding the createChangeConstraintCommand() method should be
>> enough. The parent owns a freeform layer. I still wonder what I might
>> have forgotten. I checked several times the code and I am not able to
>> see what's wrong.
>>
>> Regards.
>>
>> Ben Vitale a écrit :
>>
>>> exquisitus wrote:
>>>
>>>> Hi All,
>>>>
>>>> I have use GEF with EMF in order to make a small example. I have
>>>> intalled a XYLayoutEditPolicy on the root node and overriden the
>>>> createChangeConstraintCommand() method to allow resizing and moving
>>>> parts but I can't even select my parts once they are created.
>>>>
>>>> Any Idea ?
>>>>
>>>> Regards.
>>>
>>>
>>> Maybe you just need to install a selection feedback edit policy? That
>>> is, in your edit part,
>>>
>>> installEditPolicy(
>>> EditPolicy.SELECTION_FEEDBACK_ROLE, new SelectionEditPolicy());
>>>
>>> Or something along those lines.
>>>
>>> -Ben
Re: Selection [message #507763 is a reply to message #248352] Thu, 14 January 2010 10:27 Go to previous message
Eclipse UserFriend
Hello,
I was wondering because I had a similar problem, too.

My Background Figure is a FreeformLayer with a FreeformLayout.
I can create Figure one on that background-figure.
I can select, resize and move figure one.
I can create Figure two !within! Figure one.
But I can not select Figure two.
I can move it but without any feedback of selection or moving and the coordinates seems to be relative the upper left corner of figure one, not relative to the background figurs corner.

It's pretty interesting because I did the most akin to a GEF-Tutorial.

It now works fine because I use ResizableEditPolicy and LayoutEditPolicy instead of the XYLayoutEditPolicy.

But it would be nice conceive the problem because in the tutorial it seems to work fine...

Best regards & thanks in advance
Alex
Previous Topic:Directed Graph Problem
Next Topic:org.eclipse.gmf.runtime.draw2d* plugin
Goto Forum:
  


Current Time: Wed Jul 16 01:23:34 EDT 2025

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

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

Back to the top