Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Selection
Selection [message #248352] Thu, 16 April 2009 16:58 Go to next message
Ali Koudri is currently offline Ali KoudriFriend
Messages: 118
Registered: July 2009
Senior Member
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] Sat, 18 April 2009 01:15 Go to previous messageGo to next message
Ben Vitale is currently offline Ben VitaleFriend
Messages: 247
Registered: July 2009
Senior Member
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 07:31 Go to previous messageGo to next message
Ali Koudri is currently offline Ali KoudriFriend
Messages: 118
Registered: July 2009
Senior Member
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 12: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 13:33 Go to previous messageGo to next message
Ali Koudri is currently offline Ali KoudriFriend
Messages: 118
Registered: July 2009
Senior Member
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 15:27 Go to previous message
Alexander Mack is currently offline Alexander MackFriend
Messages: 100
Registered: July 2009
Senior Member
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: Sat Apr 27 02:36:23 GMT 2024

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

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

Back to the top