Use selection tag to control visibility of a view? [message #449675] |
Wed, 17 May 2006 16:02  |
Eclipse User |
|
|
|
Originally posted by: victor.mao.ugs.com
Here is a sample using selection tag:
<action
id="com.xyz.runXYZ"
label="&Run XYZ Tool"
style="toggle"
state="false"
menubarPath="com.xyz.xyzMenu/group1"
icon="icons/runXYZ.gif"
tooltip="Run XYZ Tool"
helpContextId="com.xyz.run_action_context"
class="com.xyz.actions.RunXYZ"
enablesFor="1">
<selection class="org.eclipse.core.resources.IFile" name="*.java"/>
</action>
Here is the explanation from plugin guide:
"...this action will be enabled when there is one selection (enablesFor="1") of type IFile (class="org.eclipse.core.resources.IFile"), whose name has ".readme" in the file extension (name="*.java")."
I have not been able to find any sample related with views on using selection tag.
What if I have a view with name "My Selected View", I want
the action to be enabled (or made invisible) when user selects "My Selected View"?
thanks,
|
|
|
|
Powered by
FUDForum. Page generated in 0.04581 seconds