Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » IResourceActionFilter for persistent property
IResourceActionFilter for persistent property [message #210939] Sat, 13 March 2004 17:43 Go to next message
Eclipse UserFriend
I'm trying to enable and disable menu actions based on persistent property
state in Eclipse 2.1. It looks like this should work with
IResourceActionFilter, using an objectState element with name
"persistentProperty" and the persistent property name as the value.
However, when I try this in the form
"http://www.mydomain.org/eclipse/plugin:isbindingfile", where
"http://www.mydomain.org/eclipse/plugin" is the namespace and
"isbindingfile" is the local name of the property, the filter always seems
to fail even when the property is present. The namespace:localname format
is what seemed logical to try, and is also how the QualifiedName of the
property is converted by toString().

Any suggestions?

- Dennis
Re: IResourceActionFilter for persistent property [message #211402 is a reply to message #210939] Mon, 15 March 2004 11:47 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.NO.SPAM.us.ibm.com

Instead of using an http:.... format, just used the dot-qualified string
which is your plugin name, like "org.mydomain.xyz" Something to make it
unique.

Here is an example that works for me;

<extension
point="org.eclipse.ui.popupMenus">
<objectContribution
adaptable="true"
objectClass="org.eclipse.core.resources.IProject"
id="org.eclipse.jem.ui.select.default.objectcontibution">
<action
label="%Action.selectDefault"

class=" org.eclipse.jem.internal.ui.proxy.SelectDefaultConfiguration ActionDelegate "
enablesFor="1"
id="org.eclipse.jem.ui.select.object.action">
</action>
<visibility>
<objectState
name="persistentProperty"
value="org.eclipse.jem.proxy.proxyLaunchConfiguration">
</objectState>
</visibility>
</objectContribution>
</extension>

It looks on the selected object, which is an IProject (or adaptable to
it), and will be visible if there is a persistent property of the name
"org.eclipse.jem.proxy.proxyLaunchConfiguration". The
"org.eclispe.jem.proxy" is the namespace of the property setting. This
is also a plugin id.

--
Thanks, Rich Kulp

Previous Topic:paste does not work in text-editor
Next Topic:Problems with classpath of plugin
Goto Forum:
  


Current Time: Fri Jul 18 22:34:22 EDT 2025

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

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

Back to the top