Thanks in advance .....
I have to add one item in project explorer's context menu (new->new item), and also in new toolbar's web category (new item) . I can directly add item in context menu , but how to add in New menu of the project explorer's context menu. Same for the new toolbar , i can directly add contents i
Maybe you can use the 'org.eclipse.ui.newWizards' extension-point to contribute an new wizard, and then use the 'org.eclipse.ui.navigator.navigatorContent'(common wizard) extension-point to add your wizard to the context menu.
Related
I want to change context menu items in my vscode extension dynamically.
So, when the user triggers right-click I want to make some checks and generate some items in the context menu.
How can I do this?
I'm writing a VSCode extension that adds a new file explorer view to the Explorer activity.
Is it possible to make my new view re-use the context menu (ie. right-click menu) from the file explorer view? And if so, how?
This is not possible, as discussed in this GitHub issue: How to apply File Explorer context menu to custom tree view?.
There are no plans to support file explorer context menu items in custom tree view context menu.
Currently when i want to select my Custom project, it is has to be selected by NEW->OTHER..->My-Custom-Project.
Is it possible to display my custom project under NEW menu.
NEW->My-Custom-Project.
Assuming you have written a New Wizard for your custom project use the org.eclipse.ui.perspectiveExtensions extension point to add a 'new wizard shortcut' to display the wizard directly on the New menu.
Something like:
<extension point="org.eclipse.ui.perspectiveExtensions">
<perspectiveExtension
targetID="org.eclipse.ui.resourcePerspective">
<newWizardShortcut id="org.eclipse.jdt.ui.wizards.NewProjectCreationWizard"/>
The shortcut is specific to the perspective.
You may have to do a Perspective Reset (or Customize Perspective) to get the new shortcut to show.
Within the project explorer in eclipse, the context menu bars "Debug as" and "Run as" appear allowing to launch in debug/run mode.
I have created a new view (Replacement to Project Explorer view) and these context menu bars don't appear.
I couldn't find what I should add to the plugin.xml in order to add these context menu bars also to my new view.
Could anyone help ?
Those menu items are extracted with Common Navigator Framework. Consider using CommonViewer for them to reappear.
I'm building a plugin, and adding an entry to the context menu (right-click on a folder in the project tree).
So far it works, following this tutorial:
http://www.eclipse.org/articles/article.php?file=Article-JFaceWizards/index.html
The problem is that it's adding my entry in the root of the context menu. Since my entry refers to a "New XXX" wizard, I want it to go to the "New" submenu.
It seems like I would have to set the correct locationURI or menuPath in my plugin.xml. However I can't find the locationURI or menuPath corresponding to that submenu. How can I find that?
The new contributions are menu ID based, not menu path based. So it should be something like:
<menuContribution
locationURI="menu:file?after=additions" />
See this SO answer for an example of locationUri.
See Menu Extension for more. The exact id is either:
found in the existing plugin.xml from the menu or
determined with plugin Spy
See "How to add items in popup menu?" (from justinmreina) for more on adding an entry to a menu.
If you've created a plugin for a 'New XXX' wizard, you can add it inside the 'New' menu that you see when you right-click inside the Navigator by customizing the perspective.
Go to Window -> Customize Perspective and click on the Shortcuts tab. You should see 'New XXX'. Select it and you're good to go.