Creating a Perspective Menu in Eclipse
I am developing an Eclipse plug-in and I would like to associate a new menu (at the top of the screen along with File, Edit, etc.) to the perspective I have created.
I made the menu ok, but it shows up even in other perspectives. How can I relate this just from my point of view? This is the code I am using in plugin.xml:
<plugin>
<extension point="org.eclipse.ui.perspectives">
<perspective
class="org.eclipse.ui.articles.perspective.API_Development"
id="org.eclipse.ui.articles.perspective.API_Development"
name="API Development">
</perspective>
</extension>
<extension
point="org.eclipse.ui.actionSets">
<actionSet
label="Sample Action Set"
visible="true"
id="API_Development_Menu.actionSet">
<menu
label="API Development"
id="sampleMenu">
<separator
name="sampleGroup">
</separator>
</menu>
</actionSet>
</extension>
</plugin>
Thanks and cheers, Kurt
a source to share
The wiki article "Menu Contribution" mentions as Eclipse3.3M6 element
<visibleWhen/>
Expansion point added . The definition can then refer to other locations to define the base expression.
org.eclipse.core.expressions.definitions
<extension point="org.eclipse.core.expressions.definitions">
<definition id="com.example.context">
<with variable="activeContexts">
<iterate operator="or">
<equals value="org.eclipse.ui.contexts.actionSet"/>
</iterate>
<with>
</definition>
</extension>
This can be called in a kernel expression like activeWhen, enabledWhen, visibleWhen, etc. using a reference element:
<reference definitionId="com.example.context"/>
Maybe then the type definition is:
can I use for your menu?
a source to share