Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » OCL » [OCLinEcore] Error using EReference::EKeys property("Editor could not be initialized" if EKeys is set)
[OCLinEcore] Error using EReference::EKeys property [message #558058] Fri, 10 September 2010 05:17 Go to next message
Scott Mising name is currently offline Scott Mising nameFriend
Messages: 11
Registered: August 2010
Junior Member
If I use the EReference::EKeys property in an ecore model, and then try to open it with the OCLinEcore editor, I get:

Editor could not be initialized.
org.eclipse.xtext.validation.IConcreteSyntaxValidator$Invali dConcreteSyntaxException: These errors need to be fixed before the model can be serialized.
The feature OCLinEcoreReferenceCS.keys contains non-transient values but has no corresponding assignment in rule ModelElementCS.

Does this mean using EKeys is not supported?
Re: [OCLinEcore] Error using EReference::EKeys property [message #558066 is a reply to message #558058] Fri, 10 September 2010 05:46 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi Scott
>
> Does this mean using EKeys is not supported?
>
I'm afraid so. At least the error message is relevant. Actually they're
half supported; the bidirectional conversion between Ecore and the
OCLinCore Concrete Syntax is in place. It's the actual textual syntax
that's missing.

I plan to expand OCLinEcore to accommodate full class-like capabilities
of UML and their idiomatic Ecore realisations. I just need to identify
simple, consistent, memorable syntaxes.

Since you are actually using keys you might have a suggestion or two. A
patch might be quite easy.

If you can send me an example Ecore file, that would help enlarge the
gene pool of my test cases.

Regards

Ed Willink



On 10/09/2010 06:17, Scott wrote:
> If I use the EReference::EKeys property in an ecore model, and then try
> to open it with the OCLinEcore editor, I get:
>
> Editor could not be initialized.
> org.eclipse.xtext.validation.IConcreteSyntaxValidator$Invali
> dConcreteSyntaxException: These errors need to be fixed before the model
> can be serialized.
> The feature OCLinEcoreReferenceCS.keys contains non-transient values but
> has no corresponding assignment in rule ModelElementCS.
>
> Does this mean using EKeys is not supported?
>
Re: [OCLinEcore] Error using EReference::EKeys property [message #558132 is a reply to message #558066] Fri, 10 September 2010 09:22 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi Scott

The patch on https://bugs.eclipse.org/bugs/show_bug.cgi?id=324924 will
serialize a simple test file to

import ecore_0 : 'http://www.eclipse.org/emf/2002/Ecore#/';

package keys : ky = 'http://keys'
{
class Keyed
{
attribute r : ecore_0::EDouble[?];
attribute s : String[?];
property keyed : Keyed[*]
{
key r , s ;
}
}
}

which at least makes keys useable.

Would
property keyed : Keyed[*|r,s];

be sensible?

Regards

Ed Willink



On 10/09/2010 06:46, Ed Willink wrote:
> Hi Scott
> >
> > Does this mean using EKeys is not supported?
> >
> I'm afraid so. At least the error message is relevant. Actually they're
> half supported; the bidirectional conversion between Ecore and the
> OCLinCore Concrete Syntax is in place. It's the actual textual syntax
> that's missing.
>
> I plan to expand OCLinEcore to accommodate full class-like capabilities
> of UML and their idiomatic Ecore realisations. I just need to identify
> simple, consistent, memorable syntaxes.
>
> Since you are actually using keys you might have a suggestion or two. A
> patch might be quite easy.
>
> If you can send me an example Ecore file, that would help enlarge the
> gene pool of my test cases.
>
> Regards
>
> Ed Willink
>
>
>
> On 10/09/2010 06:17, Scott wrote:
>> If I use the EReference::EKeys property in an ecore model, and then try
>> to open it with the OCLinEcore editor, I get:
>>
>> Editor could not be initialized.
>> org.eclipse.xtext.validation.IConcreteSyntaxValidator$Invali
>> dConcreteSyntaxException: These errors need to be fixed before the model
>> can be serialized.
>> The feature OCLinEcoreReferenceCS.keys contains non-transient values but
>> has no corresponding assignment in rule ModelElementCS.
>>
>> Does this mean using EKeys is not supported?
>>
>
Re: [OCLinEcore] Error using EReference::EKeys property [message #558311 is a reply to message #558058] Sat, 11 September 2010 02:51 Go to previous message
Scott Mising name is currently offline Scott Mising nameFriend
Messages: 11
Registered: August 2010
Junior Member
Thanks Ed, your recursive example threw me for a moment, but that's great. I'll use the patch if I can't wait for the fix.

And your syntax seems ideal - having the keys as a constraint, with multiplicity - the best I could think of was some sort of "unique=" expression, but delimiters would be a problem...

Regards
Scott
Previous Topic:M2M/QVTd OCL editor
Next Topic:Missing "Object Constraint Language (OCL) 2.0 Compatibility API"
Goto Forum:
  


Current Time: Thu Apr 25 19:49:48 GMT 2024

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

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

Back to the top