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 16:26 Go to next message
Frank Du is currently offline Frank Du
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 10:44 Go to previous messageGo to next message
Dani Megert is currently offline Dani Megert
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 13:47 Go to previous messageGo to next message
Frank Du is currently offline Frank Du
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 11:52 Go to previous message
Dani Megert is currently offline Dani Megert
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: Sun Apr 20 19:46:29 EDT 2014

Powered by FUDForum. Page generated in 0.02287 seconds