Querying properties that are EFeatureMapEntry Objects [message #692715] |
Tue, 05 July 2011 01:25  |
Eclipse User |
|
|
|
I have an ecore metamodel I created from an XML Schema. I have generated an editor and I created a model.
When I launch the XText OCL Console, I can issue queries against model properties that are of type EString, however when I issue a query against an property that is of type EFeatureMapEntry, or a property that is grouped with a property that is a EFeatureMapEntry (as is quite common in XML Schemas) I get the following:
Evaluating:
self.paramValue
Results:
Parsing failure
null
Unresolved property 'paramValue' for 'OclInvalid'
What am I doing wrong?
I am using the Indigo-Modeling release of Eclipse.
Thank you
-Mark
Calgary, AB
|
|
|
Re: Querying properties that are EFeatureMapEntry Objects [message #692746 is a reply to message #692715] |
Tue, 05 July 2011 02:43   |
Eclipse User |
|
|
|
Hi Mark
The current Xtext-based OCL support is for EMOF (Ecore) with some UML
functionality.
EFeatureMapEntry have no EMOF counterpart, they are part of Ecore's
support for UML-like qualified associations.
You should thereforee be using some form of "property[another-property]"
syntax, which might get you past the
parser, but it certainly won't evaluate.
If you'd like to file a Bugzilla with a simple model, it will motivate
me to tackle qualified associations. We're planning
a further release before Juno; This irritates me sufficiently to try to
tackle it before Juno.
I'm afraid that doesn't help you today.
Regards
Ed Willink
On 05/07/2011 06:25, Mark Sluser wrote:
> I have an ecore metamodel I created from an XML Schema. I have
> generated an editor and I created a model.
>
> When I launch the XText OCL Console, I can issue queries against model
> properties that are of type EString, however when I issue a query
> against an property that is of type EFeatureMapEntry, or a property
> that is grouped with a property that is a EFeatureMapEntry (as is
> quite common in XML Schemas) I get the following:
>
>
> Evaluating:
> self.paramValue
> Results:
> Parsing failure
> null
> Unresolved property 'paramValue' for 'OclInvalid'
>
>
> What am I doing wrong?
>
> I am using the Indigo-Modeling release of Eclipse.
>
> Thank you
>
> -Mark
> Calgary, AB
>
|
|
|
|
|
Re: Querying properties that are EFeatureMapEntry Objects [message #693249 is a reply to message #693240] |
Wed, 06 July 2011 02:15  |
Eclipse User |
|
|
|
HI Mark
The XSD to Ecore import is very useful, but precisely representing every
possible XSD eccentricity is challenging, and it looks as if you needed
to tweak a couple of attributes from your original XDR so I would guess
that the bug is in your tweaking, but I'm far from an XSD expert, so you
might try posting on the EMF newsgroup where you will get a more
informed response from Ed Merks.
Regards
Ed Willink
On 06/07/2011 06:28, Mark Sluser wrote:
> Ok, I figured it out. I should have guessed.
>
> It looks like the metamodel generated from the XSD file did not carry
> over the maxOccurs and minOccurs on xsd:choice elements when
> ecore:featureMap="". This sounds like a bug to me.
> What do you think?
>
> -Mark
|
|
|
Powered by
FUDForum. Page generated in 0.04831 seconds