Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » OCL » Unresolved namespace with generic
Unresolved namespace with generic [message #1696840] Thu, 28 May 2015 23:18 Go to next message
Beat Lussi is currently offline Beat LussiFriend
Messages: 10
Registered: February 2015
Junior Member
Hi

I've implemented a generic property. The code works, but within OCLinEcore occurs always the following error:

Unresolved Namespace ProductLine.ecore.oclas#//@nestedPackage.0/@ownedType.6/@ownedTemplateSignature' ProductLine.ecore /CDD_Project/model line: 88 /CDD_Project/model/ProductLine.ecore OCLinEcore Problem

The code section is:

class FeatureGroup(FeatureType)
{
attribute isSelected : Boolean = 'false';
attribute numberOfFeatures : Integer { derived }
{
derivation: self.assignedFeature->size();
}

property assignedFeature :
				productline::FeatureGroup::_'ProductLine.ecore.oclas#//@nestedPackage.0/@ownedType.6/@ownedTemplateSignature'::_'ProductLine.ecore.oclas#//@nestedPackage.0/@ownedType.6/@ownedTemplateSignature/@ownedParameter.0'::FeatureType[2..*] { ordered };

attribute name : String;	
		
invariant assignedSelfReferencing: self.assignedFeature->excludes(self);
}


What's wrong?

Thanks
Re: Unresolved namespace with generic [message #1696890 is a reply to message #1696840] Fri, 29 May 2015 08:57 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

The Ecore to text serialization appears to trying to construct a
declaration such as:

property assignedFeature :
productline::FeatureGroup::XXX::FeatureType[2..*] { ordered };

but 'XXX' has failed to convert to a sensible package name.

Without seeing the *.ecore file(s) it is difficult to be sure. Perhaps
the 'correct' spelling of XXX clashes with some other declaration or
reserved word.

Please raise a Bugzilla with a fuller repro, and an Eclipse OCL version
number. (Today if you want to grab a last chance at a fix in time for
the Mars release.)

Regards

Ed Willink

On 29/05/2015 00:18, Beat Lussi wrote:
> Hi
> I've implemented a generic property. The code works, but within
> OCLinEcore occurs always the following error:
>
> Unresolved Namespace
> ProductLine.ecore.oclas#//@nestedPackage.0/@ownedType.6/@ownedTemplateSignature'
> ProductLine.ecore /CDD_Project/model line: 88
> /CDD_Project/model/ProductLine.ecore OCLinEcore Problem
>
> The code section is:
>
>
> class FeatureGroup(FeatureType)
> {
> attribute isSelected : Boolean = 'false';
> attribute numberOfFeatures : Integer { derived }
> {
> derivation: self.assignedFeature->size();
> }
>
> property assignedFeature :
> productline::FeatureGroup::_'ProductLine.ecore.oclas#//@nestedPackage.0/@ownedType.6/@ownedTemplateSignature'::_'ProductLine.ecore.oclas#//@nestedPackage.0/@ownedType.6/@ownedTemplateSignature/@ownedParameter.0'::FeatureType[2..*]
> { ordered };
>
> attribute name : String;
>
> invariant assignedSelfReferencing: self.assignedFeature->excludes(self);
> }
>
>
> What's wrong?
>
> Thanks
>
Re: Unresolved namespace with generic [message #1696963 is a reply to message #1696890] Fri, 29 May 2015 18:22 Go to previous messageGo to next message
Beat Lussi is currently offline Beat LussiFriend
Messages: 10
Registered: February 2015
Junior Member
Hi Ed

Okay, I've reported with the number Bug 468846. An ecore file is attached. The error occurs with Luna Release 1 (4.4.1) . I never tried another version of Eclipse. In the attachement is the eclipse configuration and an example ecore file.

Thanks & Best regards


Ed Willink wrote on Fri, 29 May 2015 08:57
Hi

The Ecore to text serialization appears to trying to construct a
declaration such as:

property assignedFeature :
productline::FeatureGroup::XXX::FeatureType[2..*] { ordered };

but 'XXX' has failed to convert to a sensible package name.

Without seeing the *.ecore file(s) it is difficult to be sure. Perhaps
the 'correct' spelling of XXX clashes with some other declaration or
reserved word.

Please raise a Bugzilla with a fuller repro, and an Eclipse OCL version
number. (Today if you want to grab a last chance at a fix in time for
the Mars release.)

Regards

Ed Willink

On 29/05/2015 00:18, Beat Lussi wrote:
> Hi
> I've implemented a generic property. The code works, but within
> OCLinEcore occurs always the following error:
>
> Unresolved Namespace
> ProductLine.ecore.oclas#//@nestedPackage.0/@ownedType.6/@ownedTemplateSignature'
> ProductLine.ecore /CDD_Project/model line: 88
> /CDD_Project/model/ProductLine.ecore OCLinEcore Problem
>
> The code section is:
>
>
> class FeatureGroup(FeatureType)
> {
> attribute isSelected : Boolean = 'false';
> attribute numberOfFeatures : Integer { derived }
> {
> derivation: self.assignedFeature->size();
> }
>
> property assignedFeature :
> productline::FeatureGroup::_'ProductLine.ecore.oclas#//@nestedPackage.0/@ownedType.6/@ownedTemplateSignature'::_'ProductLine.ecore.oclas#//@nestedPackage.0/@ownedType.6/@ownedTemplateSignature/@ownedParameter.0'::FeatureType[2..*]
> { ordered };
>
> attribute name : String;
>
> invariant assignedSelfReferencing: self.assignedFeature->excludes(self);
> }
>
>
> What's wrong?
>
> Thanks
>

Re: Unresolved namespace with generic [message #1696985 is a reply to message #1696963] Sat, 30 May 2015 05:14 Go to previous messageGo to next message
Beat Lussi is currently offline Beat LussiFriend
Messages: 10
Registered: February 2015
Junior Member
The same thing happens with Mars Release 4.5.0RC2
Re: Unresolved namespace with generic [message #1696986 is a reply to message #1696985] Sat, 30 May 2015 05:37 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
On 30/05/2015 06:14, Beat Lussi wrote:
> The same thing happens with Mars Release 4.5.0RC2

No. See

https://bugs.eclipse.org/bugs/show_bug.cgi?id=468846

The fix is in RC3 on Monday (or now in
http://www.eclipse.org/modeling/download.php?file=/modeling/mdt/ocl/downloads/drops/6.0.0/N201505291545/mdt-ocl-Update-N201505291545.zip).

Regards

Ed Willink
Re: Unresolved namespace with generic [message #1697275 is a reply to message #1696986] Tue, 02 June 2015 21:21 Go to previous messageGo to next message
Beat Lussi is currently offline Beat LussiFriend
Messages: 10
Registered: February 2015
Junior Member
Hi Ed

I tried with the fix but I've still a problem with unresolved type (the same example ecore file). I see in the eclipse configuration that the fix is installed (OCL 6.0.0).

Is something wrong with my code?

Thanks & Best regards

Ed Willink wrote on Sat, 30 May 2015 05:37
On 30/05/2015 06:14, Beat Lussi wrote:
> The same thing happens with Mars Release 4.5.0RC2

No. See

https://bugs.eclipse.org/bugs/show_bug.cgi?id=468846

The fix is in RC3 on Monday (or now in
http://www.eclipse.org/modeling/download.php?file=/modeling/mdt/ocl/downloads/drops/6.0.0/N201505291545/mdt-ocl-Update-N201505291545.zip).

Regards

Ed Willink

Re: Unresolved namespace with generic [message #1697280 is a reply to message #1697275] Tue, 02 June 2015 21:45 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

6.0.0 does not exist yet, so you cannot have 6.00 installed. You
presumably have some pre-release.

Regards

Ed Willink




On 02/06/2015 22:21, Beat Lussi wrote:
> Hi Ed
>
> I tried with the fix but I've still a problem with unresolved type
> (the same example ecore file). I see in the eclipse configuration that
> the fix is installed (OCL 6.0.0).
>
> Is something wrong with my code?
>
> Thanks & Best regards
>
> Ed Willink wrote on Sat, 30 May 2015 05:37
>> On 30/05/2015 06:14, Beat Lussi wrote:
>> > The same thing happens with Mars Release 4.5.0RC2
>>
>> No. See
>>
>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=468846
>>
>> The fix is in RC3 on Monday (or now in
>> http://www.eclipse.org/modeling/download.php?file=/modeling/mdt/ocl/downloads/drops/6.0.0/N201505291545/mdt-ocl-Update-N201505291545.zip).
>>
>> Regards
>>
>> Ed Willink
>
>
Previous Topic:Possible bug in generated code
Next Topic:Validating OCL programmatically
Goto Forum:
  


Current Time: Thu Mar 28 16:42:18 GMT 2024

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

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

Back to the top