Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Activity : can I use negative lookahead in a patternBinding (i.e "hide every contribution from
Activity : can I use negative lookahead in a patternBinding (i.e "hide every contribution from [message #334949] Wed, 11 March 2009 11:45 Go to next message
Edoardo Comar is currently offline Edoardo Comar
Messages: 102
Registered: July 2009
Senior Member
I'd like to simplify our activity declarations that currently include

activity1 - disabled by default
<!-- exclude anything from the ui.ide plugin -->
<activityPatternBinding activityId="activity1"
pattern="org\.eclipse\.ui\.ide/.*"/>

activity 2 - enabled by default, to show some selected contribution from
ui.ide:

<activityPatternBinding activityId="activity2"
pattern=" org\.eclipse\.ui\.ide/org\.eclipse\.ui\.wizards\.new\.projec t "/>


I'd rather like to have just one binding that means hide everything
except the following ...

something like :
<activityPatternBinding activityId="activity1"
pattern=" org\.eclipse\.ui\.ide/.*(?!org\.eclipse\.ui\.wizards\.new\.p roject) "/>

which isn't working for me, so I'd like to know if it just can't be made
to work ...

cheers
Re: Activity : can I use negative lookahead in a patternBinding (i.e "hide every contribution f [message #334984 is a reply to message #334949] Fri, 13 March 2009 12:33 Go to previous message
Paul Webster is currently offline Paul Webster
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

it will hide/show whatever matches the pattern. If you can get it to
not patch the pattern with your regex, it should work ... *if*.

Your best bet would be to put a breakpoint or conditional breakpoint in
org.eclipse.ui.internal.activities.Activity.isMatch(String) and see that
the String with the ID you care about is being matched (or not).

PW

--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips e.platform.doc.isv/guide/workbench.htm


Previous Topic:working sets in "Project References"
Next Topic:Disable "Build Automatically" for a new product
Goto Forum:
  


Current Time: Wed Aug 20 12:45:55 EDT 2014

Powered by FUDForum. Page generated in 0.01495 seconds