no

Learn Dynamic Command in Eclipse Rcp Menu

1.) Using the HelloWorld project template, add org.eclipse.core.expressions in your application's plugin.xml's Dependencies tab. 2.)...

1.) Using the HelloWorld project template, add org.eclipse.core.expressions in your application's plugin.xml's Dependencies tab. 2.) In the extension tab do the following: a.) add org.eclipse.core.expressions.definition, set its id to onValidationPerspective b.) add new definition name it: onOpenPerspective c.) right click definition and select "with", variable = activeWorkbenchWindow.activePerspective d.) right click with and select "equals", value = perspective id 3.) Now for example you want to show a Command on your toolbar when you open a perspective x a.) in the plugin.xml's Extension tab add org.eclipse.ui.menu b.) select new->toolbar, set the location URI to toolbar:org.eclipse.ui.main.toolbar c.) right click the toolbar and select new->toolbar again, id should be unique d.) right click the second toolbar select new->command e.) under command select visibleWhen f.) under visibleWhen select reference and set the definitionId=onValidationPerspective Note: onValidationPerspective is the one we have defined in the org.eclipse.core.expressions.definition

Related

java-eclipse-rcp 544633390203869622

Post a Comment Default Comments

2 comments

Anonymous said...

Thank you so much!!!! You're such a big help :)

Anonymous said...

Thanks!!! :D

item