Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » non-Selection policy
non-Selection policy [message #229094] Tue, 16 January 2007 09:08 Go to next message
Eclipse UserFriend
Originally posted by: Sferzah.yandex.ru

i want to start&end diagram elements will non-selectable, non-movable. How
can i do that?
Re: non-Selection policy [message #229656 is a reply to message #229094] Tue, 23 January 2007 07:18 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Sferzah.yandex.ru

BPEL example too hard to me, please help me
Re: non-Selection policy [message #229664 is a reply to message #229094] Tue, 23 January 2007 13:56 Go to previous messageGo to next message
Nhu Le is currently offline Nhu LeFriend
Messages: 47
Registered: July 2009
Member
From what I understand, a diagram element should be non-selectable and
non-movable by default. You have to install edit policies before any
interaction is possible. In your start&end parts, if you override
createEditPolicies() and do nothing inside, it should be non-selectable
and non-movable.

Nhu

Alexey wrote:
> i want to start&end diagram elements will non-selectable, non-movable.
> How can i do that?
>
Re: non-Selection policy [message #229680 is a reply to message #229664] Wed, 24 January 2007 08:03 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Sferzah.yandex.ru

i set no editpolicies to this elements, but nothing changed.. diagram have
own editpolicies, where managing elements adding, moving etc..
i can verify child type in different createMoveChildCommand,
getOrphanChildrenCommand and return null, when needed. But i still have
visual feedback, it's not nice and i want to no selection feedback to some
wanted elements..
Re: non-Selection policy [message #229703 is a reply to message #229094] Wed, 24 January 2007 09:35 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Sferzah.yandex.ru

it seems i just have to override

public EditPart getTargetEditPart(Request request) {
return null;
}

for issue my problem.
Re: non-Selection policy [message #229720 is a reply to message #229703] Wed, 24 January 2007 13:19 Go to previous messageGo to next message
Nhu Le is currently offline Nhu LeFriend
Messages: 47
Registered: July 2009
Member
This should do it. But I think the real problem is that there are still
some [inherited???] edit policies that are still in force. If you
override the getCommand() in your class, just call parent and then print
out the command returned, you should be able to see what command gets
executed. Alternatively, you can trace the getTargetEditPart() and see
what edit policies get invoked for your mouse input.

Nhu

Alexey wrote:
> it seems i just have to override
>
> public EditPart getTargetEditPart(Request request) {
> return null;
> }
>
> for issue my problem.
>
Re: non-Selection policy [message #229728 is a reply to message #229720] Wed, 24 January 2007 13:37 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Sferzah.yandex.ru

Nhu Le wrote:

> This should do it. But I think the real problem is that there are still
> some [inherited???] edit policies that are still in force. If you
> override the getCommand() in your class, just call parent and then print
> out the command returned, you should be able to see what command gets
> executed. Alternatively, you can trace the getTargetEditPart() and see
> what edit policies get invoked for your mouse input.

thank you Nhu!
i think so, and find and remove all "links" corresponding to visual
selection representation. but how to find others, corresponding for
dragging, etc - my knoweledge too poor for this.
i'll try your advice, thank you a lot!
Re: non-Selection policy [message #229765 is a reply to message #229728] Wed, 24 January 2007 17:20 Go to previous message
Nhu Le is currently offline Nhu LeFriend
Messages: 47
Registered: July 2009
Member
I would check the following:

1. Make sure the part you think is the part that runs. This happens to
me several times. Try putting break points, print out, etc. to confirm
this.
2. Override the createEditPolicies() in that part and put nothing in the
body. Don't call super.createEditPolicies() for now, just add policies
one by one as you go. You can consolidate the policies later on.

Nhu

Alexey wrote:
> Nhu Le wrote:
>
>> This should do it. But I think the real problem is that there are
>> still some [inherited???] edit policies that are still in force. If
>> you override the getCommand() in your class, just call parent and then
>> print out the command returned, you should be able to see what command
>> gets executed. Alternatively, you can trace the getTargetEditPart()
>> and see what edit policies get invoked for your mouse input.
>
> thank you Nhu!
> i think so, and find and remove all "links" corresponding to visual
> selection representation. but how to find others, corresponding for
> dragging, etc - my knoweledge too poor for this.
> i'll try your advice, thank you a lot!
>
>
Previous Topic:Why nobody cares about Cut, Copy and Paste ?
Next Topic:resizing
Goto Forum:
  


Current Time: Sat Apr 20 12:46:24 GMT 2024

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

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

Back to the top