Well, I know two ways (one of them is checked, and the other I'm not sure), in which you can expand the pop-up menu. By default, new submenu
.
A short, working and proven way is to use org.eclipse.ui.perspectiveExtensions
.
β Note. You will need a wizard to contribute to the pop-up menu. By default, new submenu
. You can do this using this eSpeed ββdevelopment link using the Eclipse wizards (same as provided by @Ed Burnette)
Stages:
- In this example, I created a master dummy with id
testwizard.wizards.TestWizard
. - Now create the
org.eclipse.ui.perspectiveExtensions
extension. In this example, I am simply contributing to the development perspective of Java . You may have several instances for different points of view. Therefore, targetId org.eclipse.jdt.ui.JavaPerspective
. - Now right click on the perspective Extension and select newWizardShortcut
- Set id newWizardShortcut as your user id wizards ie
testwizard.wizards.TestWizard
in my case. - Reboot the application. Now do not forget to reset in perspective, otherwise your addition to the pop-up menu will not be visible.
β plugin.xml
<?xml version="1.0" encoding="UTF-8"?> <?eclipse version="3.4"?> <plugin> <extension point="org.eclipse.ui.newWizards"> <category name="Test Wizards" id="TestWizard"> </category> <wizard name="HTML Test Wizard" icon="icons/sample.gif" category="TestWizard" class="testwizard.wizards.TestWizard" id="testwizard.wizards.TestWizard"> </wizard> </extension> <extension point="org.eclipse.ui.perspectiveExtensions"> <perspectiveExtension targetID="org.eclipse.jdt.ui.JavaPerspective"> <newWizardShortcut id="testwizard.wizards.TestWizard"> </newWizardShortcut> </perspectiveExtension> </extension> </plugin>
β Conclusion
A long and untested way is to use org.eclipse.ui.navigator.navigatorContent
. And I'm not sure if this will work or not. Providing it for reading and research purposes only
Use these links:
In the end, I suggest you use the first approach, because it is simple and elegant. Read and use the second method if you are writing a new perspective, viewing, etc.
Hope this helps.
source share