Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Confused with actions
Confused with actions [message #328914] Fri, 06 June 2008 11:48
Eclipse UserFriend
Hi,
I need to contribute action to workbench toolbar and make it enabled if C
project or C editor selected.
Well, I made action enabled for C project using the following extension
point:
<extension
point="org.eclipse.ui.actionSets">
<actionSet
id="myplug.actionSet"
label="Sample Action Set"
visible="true">
<menu
id="sampleMenu"
label="Sample &amp;Menu">
<separator
name="sampleGroup">
</separator>
</menu>
<action
class="myplug.actions.SampleAction"
icon="icons/sample.gif"
id="myplug.actions.SampleAction"
label="&amp;Sample Action"
menubarPath="sampleMenu/sampleGroup"
toolbarPath="sampleGroup"
tooltip="Hello, Eclipse world">
<enablement>
<and>
<objectClass name="org.eclipse.core.resources.IProject"/>
<objectState name="nature"
value="org.eclipse.cdt.core.cnature"/>
</and>
</enablement>
</action>
</actionSet>
</extension>
but I still don't know how to make it enabled if C editor active, please
help me.

Sergey
Previous Topic:Get eclipse to read class-path from manifest
Next Topic:contribute to status line
Goto Forum:
  


Current Time: Thu May 08 14:37:49 EDT 2025

Powered by FUDForum. Page generated in 0.06416 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top