I am growing fond of Eclipse 4 but there is not much documentation around except for some brief tutorials. Is there more thorough documentation on using the new workbench model available somewhere besides Lars Vogel's tutorials (which are totally cool) and several mostly incomplete pages on Eclipse's Wiki?
I am fighting with this issue. I would like to have an MPart which contributes its specific toolbar buttons to the main toolbar. So when the part is activated these buttons are visible and when deactivated they stop being visible. I did not figure out how to achieve this.
I think I did something similar with menu items for the main menu of my application. But not for activation of parts. I changed the visible states after commands where executed. There are several steps to do:
1. In your plugin.xml add the extension point for org.eclipse.core.expressions.definitions and create a new definition. I was even able to use boolean for the definition:
The only thing to determine now is where to run that code for activation/deactivation of a part. I think you need to listen to events send by the EventBroker like explained by Sopot Cela in this topic http://www.eclipse.org/forums/index.php/m/848560/ ... This way you would create an additional Addon that would put values for your core expressions to the context regarding the state of your parts.
Hope that helps,
Use a search engine of your choice to answer your questions.
Eclipse 4 Tutorial of Lars Vogel: http://www.vogella.com/articles/EclipseRCP/article.html
Why do you need the Eclipse Main UI sources? In fact they are delivered with the IDE usually, so you shouldn't have any issues with debugging. If you are searching with CTRL+SHIFT+T for source files, you need to enable the flag in Window -> Preferences -> Plug-In Development -> Include all plug-ins from target in Java search