Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » adding more menu items to the right click menu of palette of gef-editor
adding more menu items to the right click menu of palette of gef-editor [message #176158] Fri, 08 April 2005 11:05 Go to next message
Eclipse UserFriend
Originally posted by: rahuld.patil.gmail.com

HI,
I want to add more menu items to the menu which pop ups after right
clicking in the palette of the gef-editor.
There are menu items already present as follows:-
copy
Layout>
Use Large Icons
Settings...

We have added one more action to the list "Customize...", by writing one
calss
SimplePaletteCustomizer which extends PaletteCustomizer of
"org.eclipse.gef.ui.palette".

Can I add more menu items to this list?
If yes how it is possible?

Thanks in advance for interest in my problem.

Regards

Rahul D. Patil
Re: adding more menu items to the right click menu of palette of gef-editor [message #176233 is a reply to message #176158] Fri, 08 April 2005 15:52 Go to previous messageGo to next message
Pratik Shah is currently offline Pratik ShahFriend
Messages: 1077
Registered: July 2009
Senior Member
Override PaletteContextMenuProvider#buildContextMenu() and set this new
class as the provider for the palette viewer.

"Rahul D. Patil" <rahuld.patil@gmail.com> wrote in message
news:6dfc2257f564a98fc531790afe7d5071$1@www.eclipse.org...
> HI,
> I want to add more menu items to the menu which pop ups after right
> clicking in the palette of the gef-editor.
> There are menu items already present as follows:-
> copy
> Layout>
> Use Large Icons
> Settings...
>
> We have added one more action to the list "Customize...", by writing one
> calss
> SimplePaletteCustomizer which extends PaletteCustomizer of
> "org.eclipse.gef.ui.palette".
>
> Can I add more menu items to this list?
> If yes how it is possible?
>
> Thanks in advance for interest in my problem.
>
> Regards
>
> Rahul D. Patil
>
Re: adding more menu items to the right click menu of palette of gef-editor [message #176625 is a reply to message #176233] Mon, 11 April 2005 13:38 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: rahuld.patil.gmail.com

Thank you Pratik again.
I got success to have my own context menu, as u told to use the
PaletteContextMenuProvider#buildContextMenu().
Now, I am getting the context menu when I right click on the palette.
There is a drawer in my palette. It provides a drop down list, which we
can drag and drop in the editor.
I am getting the right click context menu, when I right click anywhere on
the palette.
Is it possible to have a context menu on right click on that drop down
list (drop down list of drawer) only?
Or is it possible to have a context menu on right click of only the
selected item in that list?
Thanking you in advance again.
Re: adding more menu items to the right click menu of palette of gef-editor [message #176654 is a reply to message #176625] Mon, 11 April 2005 15:40 Go to previous message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

You need to look at the selected editpart's model when you build the context
menu, and place the appropriate actions based on it.

"Rahul D. Patil" <rahuld.patil@gmail.com> wrote in message
news:35afcbde0373596c7f5c63a3e606ba9f$1@www.eclipse.org...
> Thank you Pratik again.
> I got success to have my own context menu, as u told to use the
> PaletteContextMenuProvider#buildContextMenu().
> Now, I am getting the context menu when I right click on the palette.
> There is a drawer in my palette. It provides a drop down list, which we
> can drag and drop in the editor. I am getting the right click context
> menu, when I right click anywhere on the palette.
> Is it possible to have a context menu on right click on that drop down
> list (drop down list of drawer) only?
> Or is it possible to have a context menu on right click of only the
> selected item in that list?
> Thanking you in advance again.
>
>
Previous Topic:create/remove handles on Enter/Exit an editPart
Next Topic:Getting information from a wizard
Goto Forum:
  


Current Time: Mon Jan 30 12:53:34 GMT 2023

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

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

Back to the top