Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Writing custom visibleWhen rules
Writing custom visibleWhen rules [message #551243] Thu, 05 August 2010 13:20 Go to next message
Eclipse UserFriend
Greetings,

I am writing an eclipse plugin and contributing to the right-click menu in the package explorer. I want my menu item to be visible when specific packages are selected based on predifined path. i.e. lets assume that my package hierarcy is as following(cap,svc and subordinate will be hardcoded keywords to define the path):
-cap
----svc
-------a
----------b
-------c
----------subordinate
-------------d

I need this menu item to be visible when package 'a', 'c' and 'd' are selected but i don't want it to be visible for the rest of the packages (i.e. b)
i can make it visible for 'a' and 'c' by:
<visibleWhen>
<iterate>
<adapt type="org.eclipse.core.resources.IResource">
<test property="org.eclipse.core.resources.path" value="/*/cap/svc/*"/>
</adapt>
</iterate>
</visibleWhen>

but i can not make it also visible to 'd' while not being visible to 'b'
can anyone help on this issue?
Thanks a lot in advance,
Ozan.

[Updated on: Thu, 05 August 2010 13:23] by Moderator

Re: Writing custom visibleWhen rules [message #551516 is a reply to message #551243] Fri, 06 August 2010 14:58 Go to previous messageGo to next message
Eclipse UserFriend
I'm not sure specifically, but I'll bet there's an example floating around somewhere that Google Code Search can find.

Something to do with some of the Boolean logic tags (<or>, <not>, etc) I'd imagine.
Re: Writing custom visibleWhen rules [message #632037 is a reply to message #551516] Mon, 11 October 2010 06:14 Go to previous message
Eclipse UserFriend
Sorry, I though I have replied it. I tried the search and found usefull examples, thanks a lot for response...
Previous Topic:Changing visibility of the toolbar items in IViewPart
Next Topic:[Databinding] Soliciting feedback on my aggregation library
Goto Forum:
  


Current Time: Thu Jul 03 06:00:02 EDT 2025

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

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

Back to the top