Dumb question regarding context menu on a selected node [message #148231] |
Fri, 20 August 2004 00:27 ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: user.domain.invalid
I have a graphical editor created with the GEF that allows me to add
nodes from a palette. I've also implemented a context popup menu which
when I click on a node does popup However, the delete item in the menu
is not availble. I think have implemented the policies correctly and it
looks like the delete comand I created is correctly registered. The
select highlighting is workings and infact I fill a properties editor
based on the selected model so I know the selection event is happening
So, the dumb question is, why is the Delete item in the menu disabled
and is there a way to enable it when the node is selected. Any help
would be greatly appreciated.
Gene Moore
GSM Consulting
|
|
|
Re: Dumb question regarding context menu on a selected node [message #148235 is a reply to message #148231] |
Fri, 20 August 2004 00:39 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: genemb.pacbell.net
Also, I forgot to mention that I do have the COMPOENT_ROLE edit policy
set or all the nodes and the ActionBarContributor class set....
Gene Moore
GSM Consulting
user@domain.invalid wrote:
> I have a graphical editor created with the GEF that allows me to add
> nodes from a palette. I've also implemented a context popup menu which
> when I click on a node does popup However, the delete item in the menu
> is not availble. I think have implemented the policies correctly and it
> looks like the delete comand I created is correctly registered. The
> select highlighting is workings and infact I fill a properties editor
> based on the selected model so I know the selection event is happening
> So, the dumb question is, why is the Delete item in the menu disabled
> and is there a way to enable it when the node is selected. Any help
> would be greatly appreciated.
>
> Gene Moore
> GSM Consulting
|
|
|
|
Re: Dumb question regarding context menu on a selected node [message #148330 is a reply to message #148327] |
Mon, 23 August 2004 19:07 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: genemb.pacbell.net
I guess I'm more lost than I thought. I call initalizeRegistry which
itself calls updateActions. But I', not sure where else to be calling this?
-Gene
Pratik Shah wrote:
> Are you updating the DeleteAction as is done in
> GraphicalEditor#updateActions()?
>
> <user@domain.invalid> wrote in message news:cg3gcg$vvg$1@eclipse.org...
>
>>I have a graphical editor created with the GEF that allows me to add
>>nodes from a palette. I've also implemented a context popup menu which
>>when I click on a node does popup However, the delete item in the menu
>>is not availble. I think have implemented the policies correctly and it
>>looks like the delete comand I created is correctly registered. The
>>select highlighting is workings and infact I fill a properties editor
>>based on the selected model so I know the selection event is happening
>>So, the dumb question is, why is the Delete item in the menu disabled
>>and is there a way to enable it when the node is selected. Any help
>>would be greatly appreciated.
>>
>>Gene Moore
>>GSM Consulting
>
>
>
|
|
|
|
Re: Dumb question regarding context menu on a selected node [message #148368 is a reply to message #148330] |
Mon, 23 August 2004 20:21 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: genemb.pacbell.net
Oooops. It looks like that was it. It turns out that the default
selectionChanged implementation looks to see if the parent editor and
the event part match (which in my case they won't). If it does, it
calls updateActions. So for me, it was never getting called. Thanks
for the help.
-Gene
Gene Moore wrote:
> I guess I'm more lost than I thought. I call initalizeRegistry which
> itself calls updateActions. But I', not sure where else to be calling
> this?
>
> -Gene
>
>
>
> Pratik Shah wrote:
>
>> Are you updating the DeleteAction as is done in
>> GraphicalEditor#updateActions()?
>>
>> <user@domain.invalid> wrote in message news:cg3gcg$vvg$1@eclipse.org...
>>
>>> I have a graphical editor created with the GEF that allows me to add
>>> nodes from a palette. I've also implemented a context popup menu which
>>> when I click on a node does popup However, the delete item in the menu
>>> is not availble. I think have implemented the policies correctly and it
>>> looks like the delete comand I created is correctly registered. The
>>> select highlighting is workings and infact I fill a properties editor
>>> based on the selected model so I know the selection event is happening
>>> So, the dumb question is, why is the Delete item in the menu disabled
>>> and is there a way to enable it when the node is selected. Any help
>>> would be greatly appreciated.
>>>
>>> Gene Moore
>>> GSM Consulting
>>
>>
>>
>>
|
|
|
Powered by
FUDForum. Page generated in 0.04470 seconds