non-Selection policy [message #229094] |
Tue, 16 January 2007 09:08 |
Eclipse User |
|
|
|
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 #229680 is a reply to message #229664] |
Wed, 24 January 2007 08:03 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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 #229728 is a reply to message #229720] |
Wed, 24 January 2007 13:37 |
Eclipse User |
|
|
|
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 |
Nhu Le 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!
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.04262 seconds