Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Use selection tag to control visibility of a view?
Use selection tag to control visibility of a view? [message #449675] Wed, 17 May 2006 16:02 Go to next message
Eclipse UserFriend
Originally posted by: victor.mao.ugs.com

Here is a sample using selection tag:

<action
id="com.xyz.runXYZ"
label="&amp;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,
Re: Use selection tag to control visibility of a view? [message #449775 is a reply to message #449675] Fri, 19 May 2006 00:33 Go to previous message
Eclipse UserFriend
this you can do with ActionSetPartAssociation
Previous Topic:use JDT plugin in RCP app: probably a bug with plugins dependences
Next Topic:How to incorporate Eclipse 'problems' view into an RCP application
Goto Forum:
  


Current Time: Sun Aug 31 11:16:25 EDT 2025

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

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

Back to the top