[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[pde-dev] Context menu IDs for all the editors
|
Hi,
I have made contribution to the context menu of the default text editor using IExtensionRegistry API.
In the eclipse API reference , the context menu id for the default text editor is '#TextEditorContext'.
I want to do the same contribution to all the other editors. How can I find out the context menu ids for all the editors?
Its also mentioned in the Eclipse help, that the context menus have the id : <editor_id>.EditorContext
I tried to get the editor Ids for all the editors which are extension to the 'org.eclipse.ui.editors' extension point.
the code is as follows:
public static void getEditorIds() {
// use Eclipse Dynamic Extension API
IExtensionRegistry reg = RegistryFactory.getRegistry();
IExtensionPoint extPoint = reg.getExtensionPoint
("org.eclipse.ui.editors");
IExtension[] extensions = extPoint.getExtensions();
for(int i = 0 ; i < extensions.length ; i ++){
IExtension extension = extensions[i];
if(extension.getUniqueIdentifier() != null)
System.out.println("editor Id : " + extension.getUniqueIdentifier
());
}
}
In the list i cannot locate the other editors like : XML Editor etc. i.e.all the editors that are shown in the 'Open With ' menu
How can I get the context menu ids for all the editors so that i can contribute to them.
Thanks and Regards