Adding action item to a treeview's toolbar of eclipse plugin - eclipse

There is a an eclipse plugin (I don't have source code of it) that I want to contribute to.
Plugin has an Editor, in this editor there is a TreeView with a toolbar.
I want to add new button to this toolbar with my action.
Can it be done?
I wasn't able to get useful information using Plugin Spy.
(Alt-Shift-F1 shows info about the editor and not about the view inside the editor,)
Or it's possible to add toolbar buttons only to eclipse 'core' views like 'Navigator'?

No, you can't add to the Toolbar from outside of the plugin unless the plugin has provided extension points to allow this.

Related

eclipse plugin development-adding button to toolbar and its behaviour

Using eclipse plugin, I am trying to add some buttons in toolbar and want to perform some action onclick to that button.
so what i did in extension tab i added org.eclipse.ui.menus and so added a menucontribution to it with URI location- toolbar:org.eclipse.ui.main.toolbar.And then a toolbar in it with a command lets say Design
so by doing this a got a button on toolbar with name Design.
now i want it should be clickable (as for now it is inactive) and on click i can add some behavior/action to it.
please help.
You can use "Hello,World Command" plug-in template which adds a "Sample Menu" in the toolbar and start from that point.

Tooltips in Eclipse RCP window toolbar menus

I created a window with a toolbar with menus. Now I want menu items to have tooltips, and I did not succeed.
I'm on Ubuntu 12.04.
What I've already tryed:
Set the 'tooltip' for menu contribution in plugin.xml
Set the 'description' for the command
Setup tooltip text in the actions in submenus that I create programmatically using ManuManager and Action.
Regards,
Vladimir
According to the description of the popupMenus extension point tooltips are only shown when the action is part of a toolbar. There exists an Eclipse Bug considering this problem.

Hide menus contributed by other plugin

My eclipse rcp application depends on a set of eclipse plugins, after I add them as dependency, the "Run" and "Search" menu appear in the main menu bar.
Which plugin contains these two menu contribution ?
How Can I hide the menu, while I still need the plugin which contribute the menu ?
You could try to use activities and contexts, as described in the Eclipse Help
Which plugin contains these two menu contribution ?
You can use Shift-Alt-F2 and then click the menu (inside your IDE, not your RCP app) to find out the menu id and thereby get a good idea of which plugin contributes it.

GWT compile button in Eclipse

A simple question :
I am using Eclipse 3.7 Indigo and have updated the GWT (2.4) Eclipse plugin.
Now I can't find the GWT compile button in the main toolbar.
Previously there was this symbol in the main toolbar ,
but after the update, this button has disappeared and the compile action has been moved as a submenu entry into the "Google Services and Development Tools", represented in the main toolbar by this symbol .
Is there a way to add the GWT compile button to the main toolbar or to specify a shortcut?
It's really exhausting to click on the "Google Services and Development Tools" to reach the compile submenu entry :-)
Highlight your project
right-click on it
go down in the dropdown menu to "Google"
The submenu of "Google" will have the "GWT Compile" button
In Eclipse Juno, GWT Compile option is located on the toolbar underneath the Google logo as seen here:
There is no key binding in Eclipse Juno for GWT Compile. That seems to be something the plugin could provide, but does not.
You can add a button for any command to the toolbar by go to Window -> Customize Perspective and exploring the dialog there. You may need to enable things using the Command and Menu visibility and then in the first tab you can add the buttons to the toolbar.
I don't know of a way to add the toolbar item back, but you can run the compiler via keyboard shortcut:
Debug Compile GWT Application, Alt+Shift+D, C
Run Compile GWT Application, Alt+Shift+X, C
You can also customize the keyboard shortcut if you wish, by going to Window->Preferences->Keys.
If you want to compile a GWT application, you should install the Google plugin. Here are the links.

how to add menu in eclipse MenuBar through eclipse plugin from java File

I want to add my menu in eclipse through eclipse plug-in development but not through plugin.xml. I want to use java code, as we can do the same by using IWorkBenchWindowPullDown interface for adding pulldown menu.
So what is the way to add menu in menuBar.
As above, you can use org.eclipse.ui.menus and add a menuContribution that includes a dynamic element. Then you can return whatever IContributionItems you would like from your implementation of CompoundContributionItem. See http://wiki.eclipse.org/Menu_Contributions
See the documentation of MenuManager. You could get the MenuManager via WorkbenchWindow.getMenuManager()
Check this out Menu Contributions. Scroll down for Menus API.