[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.tools.gef] Re: add a menu entry

I think our approach to building context menus is that disabled actions 
don't appear.  So, if you don't implement the delete command, the action may 
be left off the menu.

The action itself is pretty straightforward.  It asks for a command, and 
executes it on the stack.

""josé"" <J_ML@xxxxxxxxxx> wrote in message 
news:cfce6e4be9dfea1361cffb9880de7d23$1@xxxxxxxxxxxxxxxxxx
>
> Hi all.
> Here's my question: I want to add a menu entry to delete selected figures 
> on my editor. I've seen it on GEF's examples but i need to understand the 
> concept also. So... i need to register the delete action on my menu 
> provider over the viewer, done that (just like i did with undo and redo 
> and it's working fine). I need to create a delete command (didn't yet, but 
> no prob doing it), but how do i put it all together? i mean, what do i 
> need to do to "connect" the menu entry with my delete command?
> Cause as far as i understood the redo and undo methods are called by "GEF" 
> over the command stack, but that's not the point of the delete option... 
> it's not supposed to mess with the command stack.... (i think)
>
> any help? thanks
>
> By the way... is there a way to hide the default menu options that appear 
> at the bottom of the popup menu?
>
>
>