Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Newbie Question Regarding Connections and SharedCursors.CURSOR_PLUG_NOT
Newbie Question Regarding Connections and SharedCursors.CURSOR_PLUG_NOT [message #213529] Thu, 06 April 2006 23:13 Go to next message
Eclipse UserFriend
Originally posted by: none.none.org

Hi, As soon as a I click on my connection tool, and move the cursor over
the canvas, the CURSOR_PLUG_NOT cursor is displayed - which is what I
would expect. However, when I'm over one of my nodes, I would expect the
cursor to change to the SharedCursors.CURSOR_PLUG which is not happening.

I think I'm missing a subtle yet pivotal step that I'm hoping the NG can
help with?

I think this is the relevant info:

My diagram edit part installs policies with the following key to policy
mappings:

EditPolicy.COMPONENT_ROLE -> RootComponentEditPolicy
EditPolicy.LAYOUT_ROLE -> extension of XYLayoutEditPolicy

My node edit parts install polices for the following key to policy mappings:

EditPolicy.GRAPHICAL_NODE_ROLE -> extension of GraphicalEditPolicy
(Implementing getConnectionCreateCommand, getConnectionCompleteCommand,
getReconnectSourceCommand, getReconnectSourceCommand)
EditPolicy.COMPONENT_ROLE -> extension of ComponentEditPolicy


Regards
-AC
Re: Newbie Question Regarding Connections and SharedCursors.CURSOR_PLUG_NOT [message #213620 is a reply to message #213529] Fri, 07 April 2006 20:05 Go to previous messageGo to next message
Steven R. Shaw is currently offline Steven R. ShawFriend
Messages: 128
Registered: July 2009
Senior Member
Have you ensured that a valid command is being returned from the
getConnectionCreateCommand ? If no command is being returned this is used
an indication that the UI should be inhibited.

-Steve

"Aakash Chopra" <none@none.org> wrote in message
news:e147au$5km$1@utils.eclipse.org...
> Hi, As soon as a I click on my connection tool, and move the cursor over
> the canvas, the CURSOR_PLUG_NOT cursor is displayed - which is what I
> would expect. However, when I'm over one of my nodes, I would expect the
> cursor to change to the SharedCursors.CURSOR_PLUG which is not happening.
>
> I think I'm missing a subtle yet pivotal step that I'm hoping the NG can
> help with?
>
> I think this is the relevant info:
>
> My diagram edit part installs policies with the following key to policy
> mappings:
>
> EditPolicy.COMPONENT_ROLE -> RootComponentEditPolicy
> EditPolicy.LAYOUT_ROLE -> extension of XYLayoutEditPolicy
>
> My node edit parts install polices for the following key to policy
mappings:
>
> EditPolicy.GRAPHICAL_NODE_ROLE -> extension of GraphicalEditPolicy
> (Implementing getConnectionCreateCommand, getConnectionCompleteCommand,
> getReconnectSourceCommand, getReconnectSourceCommand)
> EditPolicy.COMPONENT_ROLE -> extension of ComponentEditPolicy
>
>
> Regards
> -AC
Re: Newbie Question Regarding Connections and SharedCursors.CURSOR_PLUG_NOT [message #213628 is a reply to message #213620] Fri, 07 April 2006 20:07 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.none.org

Hi Steve! Thanks for the response!

At what point does the getConnectionCreateCommand method get invoked?
Upon clicking on the connection tool or upon clicking on the source node
of the connection? I can't click on the source node of the connection
because of the "state" of the cursor.

-AC

Steven Shaw wrote:
> Have you ensured that a valid command is being returned from the
> getConnectionCreateCommand ? If no command is being returned this is used
> an indication that the UI should be inhibited.
>
> -Steve
>
> "Aakash Chopra" <none@none.org> wrote in message
> news:e147au$5km$1@utils.eclipse.org...
>> Hi, As soon as a I click on my connection tool, and move the cursor over
>> the canvas, the CURSOR_PLUG_NOT cursor is displayed - which is what I
>> would expect. However, when I'm over one of my nodes, I would expect the
>> cursor to change to the SharedCursors.CURSOR_PLUG which is not happening.
>>
>> I think I'm missing a subtle yet pivotal step that I'm hoping the NG can
>> help with?
>>
>> I think this is the relevant info:
>>
>> My diagram edit part installs policies with the following key to policy
>> mappings:
>>
>> EditPolicy.COMPONENT_ROLE -> RootComponentEditPolicy
>> EditPolicy.LAYOUT_ROLE -> extension of XYLayoutEditPolicy
>>
>> My node edit parts install polices for the following key to policy
> mappings:
>> EditPolicy.GRAPHICAL_NODE_ROLE -> extension of GraphicalEditPolicy
>> (Implementing getConnectionCreateCommand, getConnectionCompleteCommand,
>> getReconnectSourceCommand, getReconnectSourceCommand)
>> EditPolicy.COMPONENT_ROLE -> extension of ComponentEditPolicy
>>
>>
>> Regards
>> -AC
>
>
Re: Newbie Question Regarding Connections and SharedCursors.CURSOR_PLUG_NOT [message #213643 is a reply to message #213620] Fri, 07 April 2006 20:11 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.none.org

The getConnectionCreateCommand would return a valid command if it were
getting invoked - but it isn't... any suggestions?

-AC

Steven Shaw wrote:
> Have you ensured that a valid command is being returned from the
> getConnectionCreateCommand ? If no command is being returned this is used
> an indication that the UI should be inhibited.
>
> -Steve
>
> "Aakash Chopra" <none@none.org> wrote in message
> news:e147au$5km$1@utils.eclipse.org...
>> Hi, As soon as a I click on my connection tool, and move the cursor over
>> the canvas, the CURSOR_PLUG_NOT cursor is displayed - which is what I
>> would expect. However, when I'm over one of my nodes, I would expect the
>> cursor to change to the SharedCursors.CURSOR_PLUG which is not happening.
>>
>> I think I'm missing a subtle yet pivotal step that I'm hoping the NG can
>> help with?
>>
>> I think this is the relevant info:
>>
>> My diagram edit part installs policies with the following key to policy
>> mappings:
>>
>> EditPolicy.COMPONENT_ROLE -> RootComponentEditPolicy
>> EditPolicy.LAYOUT_ROLE -> extension of XYLayoutEditPolicy
>>
>> My node edit parts install polices for the following key to policy
> mappings:
>> EditPolicy.GRAPHICAL_NODE_ROLE -> extension of GraphicalEditPolicy
>> (Implementing getConnectionCreateCommand, getConnectionCompleteCommand,
>> getReconnectSourceCommand, getReconnectSourceCommand)
>> EditPolicy.COMPONENT_ROLE -> extension of ComponentEditPolicy
>>
>>
>> Regards
>> -AC
>
>
Re: Newbie Question Regarding Connections and SharedCursors.CURSOR_PLUG_NOT [message #213673 is a reply to message #213529] Sat, 08 April 2006 19:15 Go to previous message
Eclipse UserFriend
Originally posted by: none.none.org

Looks like the Edit Policy I had mapped to the
EditPolicy.GRAPHICAL_NODE_ROLE key should've been extending
GraphicalNodeEditPolicy rather than GraphicalEditPolicy.

By doing so, stuff like changes to the cursor to
SharedCursors.CURSOR_PLUG (along with the more important, ensuing,
ability to create a connection) comes for free.

I'll have to investigate exactly what's happening in
GraphicalNodeEditPolicy.

-AC

Aakash Chopra wrote:
> Hi, As soon as a I click on my connection tool, and move the cursor over
> the canvas, the CURSOR_PLUG_NOT cursor is displayed - which is what I
> would expect. However, when I'm over one of my nodes, I would expect the
> cursor to change to the SharedCursors.CURSOR_PLUG which is not happening.
>
> I think I'm missing a subtle yet pivotal step that I'm hoping the NG can
> help with?
>
> I think this is the relevant info:
>
> My diagram edit part installs policies with the following key to policy
> mappings:
>
> EditPolicy.COMPONENT_ROLE -> RootComponentEditPolicy
> EditPolicy.LAYOUT_ROLE -> extension of XYLayoutEditPolicy
>
> My node edit parts install polices for the following key to policy
> mappings:
>
> EditPolicy.GRAPHICAL_NODE_ROLE -> extension of GraphicalEditPolicy
> (Implementing getConnectionCreateCommand, getConnectionCompleteCommand,
> getReconnectSourceCommand, getReconnectSourceCommand)
> EditPolicy.COMPONENT_ROLE -> extension of ComponentEditPolicy
>
>
> Regards
> -AC
Previous Topic:Are MoveHandles restricted to using MoveHandleLocators?
Next Topic:StandAlone gef: gef outside a plug-in.
Goto Forum:
  


Current Time: Tue Dec 06 23:28:51 GMT 2022

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

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

Back to the top