Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Definitions using <or/>
Definitions using <or/> [message #325424] Mon, 18 February 2008 15:12 Go to next message
Jan Kohnert is currently offline Jan KohnertFriend
Messages: 196
Registered: July 2009
Senior Member
Hello,

I've a definition:
<extension
point="org.eclipse.core.expressions.definitions">
<definition
id="com.kiki.ui.isRack">
<iterate>
<test
forcePluginActivation="false"
property="com.kiki.ui.tests.slas.handler.EXTRACK">
</test>
<or></or>
<test
forcePluginActivation="false"
property="com.kiki.ui.tests.slas.handler.RACK">
</test>
</iterate>
</definition>
</extension>

I've tests:
<extension
point="org.eclipse.core.expressions.propertyTesters">
<propertyTester
class="com.kiki.ui.tests.SlasHandlerTest"
id="com.kiki.ui.tests.slas.handler"
namespace="com.kiki.ui.tests.slas.handler"
properties="EXTRACK"
type="com.kiki.objects.slas.impl.SLASImpl">
</propertyTester>
<propertyTester
class="com.kiki.ui.tests.SlasHandlerTest"
id="com.kiki.ui.tests.slas.handler"
namespace="com.kiki.ui.tests.slas.handler"
properties="RACK"
type="com.kiki.objects.slas.impl.SLASImpl">
</propertyTester>
</extension>

I want a command to be visible wether its receiver (the object the
selection applies on) has the one OR the other property matching.
With my construction both tests gets performed. But since a receiver can
only be one or the other (RACK or EXTRACK) one test returns allways false
hence the command is not visible.

How can I implement a working "or" condition using the definitions?
Re: Definitions using <or/> [message #325466 is a reply to message #325424] Tue, 19 February 2008 15:15 Go to previous message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

Jan Kohnert wrote:
> Hello,
>
> I've a definition:
> <extension
> point="org.eclipse.core.expressions.definitions">
> <definition
> id="com.kiki.ui.isRack">
> <iterate>
> <test
> forcePluginActivation="false"
> property="com.kiki.ui.tests.slas.handler.EXTRACK">
> </test>
> <or></or>
> <test
> forcePluginActivation="false"
> property="com.kiki.ui.tests.slas.handler.RACK">
> </test> </iterate>
> </definition>
> </extension>

Or is a wrapper element, these are declarative expressions not
procedural. ex:

<or>
<test
forcePluginActivation="false"
property="com.kiki.ui.tests.slas.handler.EXTRACK">
</test>
<test
forcePluginActivation="false"
property="com.kiki.ui.tests.slas.handler.RACK">
</test>
</or>

Later,
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/help33/index.jsp?topic=/org.eclipse. platform.doc.isv/guide/workbench.htm


Previous Topic:Why it is disabled ??
Next Topic:Two perspectives behaving like to workbench windows
Goto Forum:
  


Current Time: Wed Jul 17 18:43:23 GMT 2024

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

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

Back to the top