[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform] Re: How to remove the default actions in the TextEditor?

Hi,

The class I extended is the AbstractDecoratedTextEditor so I call the
setRulerContextMenuId() at the end of my createPartControl() method
instead of overriding the initializeEditor().

But it doesn't work: the context menu is below before I call the
setRulerContextMenuId() method

Add Bookmark
Add Task
---------------
Show Quick Diff
Show Line mumbers
---------------
Preferences

and after I add the setRulerContextMenuId() at the end of my
createPartControl() method, the contextMenu becomes:

Add bookmark
Add Task

the two menuitems is still there and the other(what I donn't want to
remove) disapper.

I really cannot understand where the two menu item are added.


valere fedronic wrote:
> Hi,
>
> I think you just have to override the TextEditor#initializeEditor()
> method, and set your own ruler context id.
>
> --> setRulerContextMenuId("#MyTextRulerContext");
>
> Valère.
>
>
> Dollyn a écrit :
>   
>> Hi,
>> My editor extends the AbstractDecoratedTextEditor, and the content of my
>> editor is only part of a file. So, the action BOOKMARK and the ADD_TASK
>> can not work well in my editor. So I donn't want them appear in the
>> ruler context menu.
>> But the two action is added by the plugin "org.eclipse.ui.editors" in
>> it's extensions. Is there any way I can remove them?
>>
>>     

-- 

*/Dollyn/*