Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Writing custom visibleWhen rules
Writing custom visibleWhen rules [message #551243] Thu, 05 August 2010 17:20 Go to next message
Ozan Ozgur is currently offline Ozan Ozgur
Messages: 4
Registered: August 2010
Junior Member
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 17:23]

Report message to a moderator

Re: Writing custom visibleWhen rules [message #551516 is a reply to message #551243] Fri, 06 August 2010 18:58 Go to previous messageGo to next message
Mark Storer is currently offline Mark Storer
Messages: 46
Registered: May 2010
Location: Vista, CA
Member

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.


--Mark Storer
Senior Software Engineer
Autonomy Cardiff

import legalese.disclaimer;
Disclaimer<Cardiff> disCard = null;

Google Code Search
Re: Writing custom visibleWhen rules [message #632037 is a reply to message #551516] Mon, 11 October 2010 10:14 Go to previous message
Ozan Ozgur is currently offline Ozan Ozgur
Messages: 4
Registered: August 2010
Junior Member
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 Oct 30 16:53:45 GMT 2014

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

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