Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » How to tailor the Conext menu of text editor?
How to tailor the Conext menu of text editor? [message #336275] Thu, 04 June 2009 20:26 Go to next message
Frank Du is currently offline Frank DuFriend
Messages: 12
Registered: July 2009
Junior Member
Dear All,

To explain the question, I have a screen shot at
http://www.frankdu.com/tmp/embed_editor.png.

In the context menu of the xml editor, I don't want the following items:

Run As
Debug As
Profile As
Team
Compare With
Replace With

How could we remove the unwanted ones, or customize it?

Thank you so much! Have a good one day!

Best Regards,
Frank Du
http://www.frankdu.com/weblog
Re: How to tailor the Conext menu of text editor? [message #336298 is a reply to message #336275] Fri, 05 June 2009 14:44 Go to previous messageGo to next message
Dani Megert is currently offline Dani MegertFriend
Messages: 3801
Registered: July 2009
Senior Member
Frank Du wrote:
> Dear All,
>
> To explain the question, I have a screen shot at
> http://www.frankdu.com/tmp/embed_editor.png.
>
> In the context menu of the xml editor, I don't want the following items:
>
> Run As
> Debug As
> Profile As
> Team
> Compare With
> Replace With
>
> How could we remove the unwanted ones, or customize it?
Those are the ones contributed via editor input. You can remove them by
overriding
org.eclipse.ui.texteditor.AbstractTextEditor.isEditorInputIn cludedInContextMenu()
in your editor.

Dani
>
> Thank you so much! Have a good one day!
>
> Best Regards,
> Frank Du
> http://www.frankdu.com/weblog
>
Re: How to tailor the Conext menu of text editor? [message #336310 is a reply to message #336298] Fri, 05 June 2009 17:47 Go to previous messageGo to next message
Frank Du is currently offline Frank DuFriend
Messages: 12
Registered: July 2009
Junior Member
Hi Daniel,

Thank you so much for the answer. I am curious about a question: is there
a way to easily list contribution plug-ins that provide context menu
actions?

Thank you so much! Have a nice weekend!

Best Regards,
Frank Du


Daniel Megert wrote:

> Those are the ones contributed via editor input. You can remove them by
> overriding
>
org.eclipse.ui.texteditor.AbstractTextEditor.isEditorInputIn cludedInContextMenu()
> in your editor.

> Dani
Re: How to tailor the Conext menu of text editor? [message #336314 is a reply to message #336310] Sun, 07 June 2009 15:52 Go to previous message
Dani Megert is currently offline Dani MegertFriend
Messages: 3801
Registered: July 2009
Senior Member
Frank Du wrote:
> Hi Daniel,
>
> Thank you so much for the answer. I am curious about a question: is
> there a way to easily list contribution plug-ins that provide context
> menu actions?
You have to parse the extension in your plugin.xml files.

Dani
>
> Thank you so much! Have a nice weekend!
>
> Best Regards,
> Frank Du
>
>
> Daniel Megert wrote:
>
>> Those are the ones contributed via editor input. You can remove them
>> by overriding
> org.eclipse.ui.texteditor.AbstractTextEditor.isEditorInputIn cludedInContextMenu()
>
>> in your editor.
>
>> Dani
>
>
Previous Topic:How to make an editor readonly
Next Topic:Over riding copy paste
Goto Forum:
  


Current Time: Mon Nov 24 23:06:42 GMT 2014

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

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