Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » TextEditor menu actions and migration from Eclipse 2.1.2 to Eclipse 3.0.1
TextEditor menu actions and migration from Eclipse 2.1.2 to Eclipse 3.0.1 [message #280435] Thu, 03 February 2005 09:21 Go to next message
Eclipse UserFriend
Originally posted by: sebastian.lofhjelm.merideasoftware.com

I updated from Eclipse 2.1.2 to Eclipse 3.0.1 and the custom actions added
to MyEditor's context menu were not shown anymore. I also didn't find any
change notes about this in the documentation. Has there been some API
changes?

I had nothing specified in the Eclipse 2.1.2 plugin.xml which was related
to the TextEditor or the actions.

Thanks for any advice!


public class MyEditor extends org.eclipse.ui.editors.text.TextEditor {
...
protected void createActions() {
super().createActions();
IAction action = new MyAction(myEditor);
setAction(MyAction.ID, action);
}

protected void editorContextMenuAboutToShow(IMenuManager menu) {
IAction action = getAction(MyAction.ID);
action.setEnabled(true);
menu.add(action);
}
...
}
Re: TextEditor menu actions and migration from Eclipse 2.1.2 to Eclipse 3.0.1 [message #280437 is a reply to message #280435] Thu, 03 February 2005 09:52 Go to previous message
Eclipse UserFriend
Originally posted by: daniel.megert.gmx.net

S.L. wrote:

> I updated from Eclipse 2.1.2 to Eclipse 3.0.1 and the custom actions
> added to MyEditor's context menu were not shown anymore. I also didn't
> find any change notes about this in the documentation. Has there been
> some API changes?

Not in that area. Please file a bug report against Platform Text with an
example / test case that shows the problem.

Dani

> I had nothing specified in the Eclipse 2.1.2 plugin.xml which was
> related to the TextEditor or the actions.
>
> Thanks for any advice!
>
>
> public class MyEditor extends org.eclipse.ui.editors.text.TextEditor {
> ...
> protected void createActions() {
> super().createActions();
> IAction action = new MyAction(myEditor);
> setAction(MyAction.ID, action);
> }
>
> protected void editorContextMenuAboutToShow(IMenuManager menu) {
> IAction action = getAction(MyAction.ID);
> action.setEnabled(true);
> menu.add(action); }
> ...
> }
>
Previous Topic:[JDT] Setting Java 1.5 Compilance of a Java-Project Programmatically
Next Topic:Substitute Classname
Goto Forum:
  


Current Time: Sun Oct 26 15:17:52 EDT 2025

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

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

Back to the top