Community
Participate
Working Groups
I'm developing a GEF-based graphical editor. Eclipse 3.1M6 and M7 does a wierd thing to my context popup menus. I'm always getting a JDT sub-menu with the groups 'Run As', 'Debug As', 'Team', 'Compare With' and 'Replace With' in my popup menus. When i checked org.eclipse.jdt.ui_3.1.0's plugin.xml, i saw that these are added to the "additions" menu path. I tried different perspectives, and it appears in all. It also appears no matter what kind of project i create my diagram file under (need not be a Java Project). I don't want these on my editor's context popup menus beacuse they are completely out of context. The components on my diagram cannot be executed using Run As or Debug As. So, it's very misleading and confusing to the users.
Created attachment 22098 [details] Screen shot of the JDT pop-up sub menu that is completely out of place in my editor The screen shot shows a diagram editor with a palette on the right side. It shows a box figure representing a diagram component. Right clicking on this box figure presents the pop-up menu where the JDT sub-menu appears (circled in Red). However, this box component cannot and should not be 'Run'. So, the sub-menu is very misleading to the users.
Moving to Platform/UI for comments how to disable this for editors. Note that these are the actions we pushed for to be present in the Java editor. However, AFAIK they are not contributed in JDT/UI.
Please see Bug 68938.
Douglas, does this mean if the client doesn't register the context menu the entries will not show up ?
You have the option of: registering the context menu and receiving object contributions based on the active part's editor input; registering the context menu and receiving no such object contributions; or not registering the context menu at all (receiving no object contributions of any kind).
Thanks Doug !
Dani, does the editor framework register the context menu or is this up to the individual editor implementor ?
From what part does your editor inherit?
Please include the full hierarchy chain. Thanks. Setting to REMIND until it's clear that the text editor is subclassed.
Using Doug's new API, i registered my context menu in my editor as: ((IEditorSite)getSite()).registerContextMenu(id, menuManager, selectionProvider, false); The false flag eliminates common editor sub-menus, such as the ones i complained about, from my context menus. So, i guess my problem is solved. thanks
.
Get rid of deprecated state.