Dumb question regarding context menu on a selected node [message #148231] |
Thu, 19 August 2004 20:27  |
Eclipse User |
|
|
|
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 #148368 is a reply to message #148330] |
Mon, 23 August 2004 16:21  |
Eclipse User |
|
|
|
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.03444 seconds