Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » create/remove handles on Enter/Exit an editPart
create/remove handles on Enter/Exit an editPart [message #175262] Mon, 04 April 2005 06:58 Go to next message
Eclipse UserFriend
Originally posted by: michel.hassenforder.uha.fr

Hello,

I am interested to put around a shape some handles as I enter in a shape
(when I exit the shape I remove the handles).
I have written some pieces of code to detect (in a policy) in the method
showTargetRequest(request) the incoming REQ_SELECTION, and I put the
different Handles (they are over the shape as suggested in an ealier
post). As I arrive over a handle it disappears (and it try to reappear
as I am still over the underlying shape).
I guess that the selection Tool has founded something (It is perhaps the
freeFormLayout I see in the debugger) which is different as the original
shape and the Tool sends a handleExitingEditPart () to the shape editPart.

My expected behaviour is to put the handle around the shape as I enter
(without any selection) and be able to click one to create a command.

thank you
Re: create/remove handles on Enter/Exit an editPart [message #175347 is a reply to message #175262] Mon, 04 April 2005 14:42 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

To prevent the editpart exit, register the handles as part of the editpart
in the viewer's visualPartMap.

If this doesn't help, open a bug

"Michel Hassenforder" <michel.hassenforder@uha.fr> wrote in message
news:d2qoph$679$1@news.eclipse.org...
> Hello,
>
> I am interested to put around a shape some handles as I enter in a shape
> (when I exit the shape I remove the handles).
> I have written some pieces of code to detect (in a policy) in the method
> showTargetRequest(request) the incoming REQ_SELECTION, and I put the
> different Handles (they are over the shape as suggested in an ealier
> post). As I arrive over a handle it disappears (and it try to reappear as
> I am still over the underlying shape).
> I guess that the selection Tool has founded something (It is perhaps the
> freeFormLayout I see in the debugger) which is different as the original
> shape and the Tool sends a handleExitingEditPart () to the shape editPart.
>
> My expected behaviour is to put the handle around the shape as I enter
> (without any selection) and be able to click one to create a command.
>
> thank you
Re: create/remove handles on Enter/Exit an editPart [message #175387 is a reply to message #175347] Mon, 04 April 2005 16:09 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: michel.hassenforder.uha.fr

thank you,

I will try this approach this night, I'll be back tomorrow

Randy Hudson a écrit :
> To prevent the editpart exit, register the handles as part of the editpart
> in the viewer's visualPartMap.
>
> If this doesn't help, open a bug
>
> "Michel Hassenforder" <michel.hassenforder@uha.fr> wrote in message
> news:d2qoph$679$1@news.eclipse.org...
>
>>Hello,
>>
>>I am interested to put around a shape some handles as I enter in a shape
>>(when I exit the shape I remove the handles).
>>I have written some pieces of code to detect (in a policy) in the method
>>showTargetRequest(request) the incoming REQ_SELECTION, and I put the
>>different Handles (they are over the shape as suggested in an ealier
>>post). As I arrive over a handle it disappears (and it try to reappear as
>>I am still over the underlying shape).
>>I guess that the selection Tool has founded something (It is perhaps the
>>freeFormLayout I see in the debugger) which is different as the original
>>shape and the Tool sends a handleExitingEditPart () to the shape editPart.
>>
>>My expected behaviour is to put the handle around the shape as I enter
>>(without any selection) and be able to click one to create a command.
>>
>>thank you
>
>
>
Re: create/remove handles on Enter/Exit an editPart [message #175522 is a reply to message #175347] Tue, 05 April 2005 07:08 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: michel.hassenforder.uha.fr

Dear Randy,

Just two words about your suggestion: It works.

I have added in constructor of the Handle this call:

owner.getViewer().getVisualPartMap().put(this, owner);

I know that I have later to unRegister() this visual but this is easy.

Just a last question… How could I found my self this information in the
documentation ?
OK, I see (yesterday) that the viewer is responsible to the hittesting,
but finding who is registered is not easy, registerVisual() is really
hidden in the editPart framework, and I never think to look at this aspect.

Really thank you for this valuable reply.


Randy Hudson a écrit :

> To prevent the editpart exit, register the handles as part of the editpart
> in the viewer's visualPartMap.
>
> If this doesn't help, open a bug
>
> "Michel Hassenforder" <michel.hassenforder@uha.fr> wrote in message
> news:d2qoph$679$1@news.eclipse.org...
>
>>Hello,
>>
>>I am interested to put around a shape some handles as I enter in a shape
>>(when I exit the shape I remove the handles).
>>I have written some pieces of code to detect (in a policy) in the method
>>showTargetRequest(request) the incoming REQ_SELECTION, and I put the
>>different Handles (they are over the shape as suggested in an ealier
>>post). As I arrive over a handle it disappears (and it try to reappear as
>>I am still over the underlying shape).
>>I guess that the selection Tool has founded something (It is perhaps the
>>freeFormLayout I see in the debugger) which is different as the original
>>shape and the Tool sends a handleExitingEditPart () to the shape editPart.
>>
>>My expected behaviour is to put the handle around the shape as I enter
>>(without any selection) and be able to click one to create a command.
>>
>>thank you
>
>
>
Re: create/remove handles on Enter/Exit an editPart [message #176642 is a reply to message #175522] Mon, 11 April 2005 15:17 Go to previous message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

> Dear Randy,
>
> Just two words about your suggestion: It works.
>
> I have added in constructor of the Handle this call:
>
> owner.getViewer().getVisualPartMap().put(this, owner);
>
> I know that I have later to unRegister() this visual but this is easy.
>
> Just a last question
Previous Topic:ImageFigure
Next Topic:adding more menu items to the right click menu of palette of gef-editor
Goto Forum:
  


Current Time: Thu Apr 25 16:16:55 GMT 2024

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

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

Back to the top