Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » EMF Query conditions
EMF Query conditions [message #527918] Fri, 16 April 2010 21:58 Go to next message
Alex Kravets is currently offline Alex KravetsFriend
Messages: 561
Registered: November 2009
Senior Member
Hello,

I am using EMF Query to search my model. My model looks something like this:
<items>
	<item name="item1" description="test"/>
	<item name="test" description="description"/>
</items

I want to query all attributes of the elements (name and description), but it seems upon first successful match query does not continue. Here is my code:
EObjectCondition condition_name = new EObjectAttributeValueCondition(ModelPackage.Literals.OBJECT_TYPE__NAME,"test");

EObjectCondition condition_description = new ObjectAttributeValueCondition(ModelPackage.Literals.OBJECT_TYPE__DESCRIPTION,"test");

condition_name.OR(condition_description);
....
....

So in this case <item name="test" description="description"/> will be returned, and if I reverse the OR then the other element will be returned. Is this not case where ORing should be used?

thanks,
Alex
Re: EMF Query conditions [message #528162 is a reply to message #527918] Mon, 19 April 2010 14:52 Go to previous message
Alex Kravets is currently offline Alex KravetsFriend
Messages: 561
Registered: November 2009
Senior Member
Ok, got it, the returned condition is combined
Previous Topic:CopyCommand & eOpposite
Next Topic:Examples for nature / builder that Generates Model Code automatically?
Goto Forum:
  


Current Time: Thu Apr 25 20:50:35 GMT 2024

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

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

Back to the top