Newbie Question Regarding Connections and SharedCursors.CURSOR_PLUG_NOT [message #213529] |
Thu, 06 April 2006 23:13 |
Eclipse User |
|
|
|
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 #213628 is a reply to message #213620] |
Fri, 07 April 2006 20:07 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.03836 seconds