Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Dumb question regarding context menu on a selected node
Dumb question regarding context menu on a selected node [message #148231] Fri, 20 August 2004 00:27 Go to next message
Eclipse UserFriend
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 messageGo to next message
Eclipse UserFriend
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 #148327 is a reply to message #148231] Mon, 23 August 2004 17:26 Go to previous messageGo to next message
Pratik Shah is currently offline Pratik ShahFriend
Messages: 1077
Registered: July 2009
Senior Member
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 #148330 is a reply to message #148327] Mon, 23 August 2004 19:07 Go to previous messageGo to next message
Eclipse UserFriend
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 #148336 is a reply to message #148330] Mon, 23 August 2004 19:40 Go to previous messageGo to next message
Pratik Shah is currently offline Pratik ShahFriend
Messages: 1077
Registered: July 2009
Senior Member
So, you are extending GraphicalEditor? In that case, are you doing what
LogicActionBarContributor does?

"Gene Moore" <genemb@pacbell.net> wrote in message
news:cgdf41$b2r$1@eclipse.org...
> 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
Eclipse UserFriend
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
>>
>>
>>
>>
Previous Topic:Are there any other layout managers? Anyone developing any?
Next Topic:Unresolved imports in example "Shape"
Goto Forum:
  


Current Time: Sun Jul 21 13:32:41 GMT 2024

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

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

Back to the top