Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » OCL » Error during "Computing additional info" while using ECore EOperations
Error during "Computing additional info" while using ECore EOperations [message #1044778] Fri, 19 April 2013 10:32 Go to next message
Arnaud Dieumegard is currently offline Arnaud DieumegardFriend
Messages: 29
Registered: June 2010
Junior Member
Hi !

I have a MM and a meta class A with an EOperation op.
I would like to have op to return a list of lists of elements of type B.

So I've set the EType of op to "EEList<E> [org.eclipse.emf.common.util.EList]" and its upper bound to -1.

I've generated the EMF model and updated the generated code in AImpl.java:

public EList<EList<B>> op() {
	EList<EList<B>> lstBs = new BasicEList<EList<B>>();
	[...]
	return lstBs;
}


Now I want to write OCL constraints in an OCL file (using the completeOCL editor).
I'm able to write constraints like:

import '../model/MyModel.ecore'

context A
inv testConstraint: self.op()->isEmpty()


But if I want to use auto-completion to get informations on op, I get an error:

Quote:

Error
Fri Apr 19 12:18:35 CEST 2013
An internal error occurred during: "Computing additional info".

java.lang.StackOverflowError
at org.eclipse.ocl.examples.pivot.prettyprint.PrettyPrintTypeVisitor.appendParent(PrettyPrintTypeVisitor.java:171)
at org.eclipse.ocl.examples.pivot.prettyprint.PrettyPrintTypeVisitor.visitType(PrettyPrintTypeVisitor.java:359)
at org.eclipse.ocl.examples.pivot.util.AbstractExtendingVisitor.visitClass(AbstractExtendingVisitor.java:81)
at org.eclipse.ocl.examples.pivot.internal.impl.ClassImpl.accept(ClassImpl.java:663)
at org.eclipse.ocl.examples.pivot.util.AbstractVisitor.safeVisit(AbstractVisitor.java:64)
at org.eclipse.ocl.examples.pivot.prettyprint.PrettyPrintTypeVisitor.appendElement(PrettyPrintTypeVisitor.java:110)
at org.eclipse.ocl.examples.pivot.prettyprint.PrettyPrintTypeVisitor.appendTemplateBindings(PrettyPrintTypeVisitor.java:207)
at org.eclipse.ocl.examples.pivot.prettyprint.PrettyPrintTypeVisitor.visitType(PrettyPrintTypeVisitor.java:362)
at org.eclipse.ocl.examples.pivot.util.AbstractExtendingVisitor.visitClass(AbstractExtendingVisitor.java:81)
at org.eclipse.ocl.examples.pivot.util.AbstractExtendingVisitor.visitDataType(AbstractExtendingVisitor.java:117)
at org.eclipse.ocl.examples.pivot.internal.impl.DataTypeImpl.accept(DataTypeImpl.java:460)
at org.eclipse.ocl.examples.pivot.util.AbstractVisitor.safeVisit(AbstractVisitor.java:64)
at org.eclipse.ocl.examples.pivot.prettyprint.PrettyPrintTypeVisitor.appendParent(PrettyPrintTypeVisitor.java:189)
at org.eclipse.ocl.examples.pivot.prettyprint.PrettyPrintTypeVisitor.visitType(PrettyPrintTypeVisitor.java:359)
at org.eclipse.ocl.examples.pivot.util.AbstractExtendingVisitor.visitClass(AbstractExtendingVisitor.java:81)
at org.eclipse.ocl.examples.pivot.internal.impl.ClassImpl.accept(ClassImpl.java:663)
at org.eclipse.ocl.examples.pivot.util.AbstractVisitor.safeVisit(AbstractVisitor.java:64)
at org.eclipse.ocl.examples.pivot.prettyprint.PrettyPrintTypeVisitor.appendElement(PrettyPrintTypeVisitor.java:110)
at org.eclipse.ocl.examples.pivot.prettyprint.PrettyPrintTypeVisitor.appendTemplateBindings(PrettyPrintTypeVisitor.java:207)
at org.eclipse.ocl.examples.pivot.prettyprint.PrettyPrintTypeVisitor.visitType(PrettyPrintTypeVisitor.java:362)
at org.eclipse.ocl.examples.pivot.util.AbstractExtendingVisitor.visitClass(AbstractExtendingVisitor.java:81)
at org.eclipse.ocl.examples.pivot.util.AbstractExtendingVisitor.visitDataType(AbstractExtendingVisitor.java:117)

and so on...

Here are my system info:
Quote:

eclipse.buildId=M20120208-0800
java.version=1.6.0_27

Eclipse Modeling Tools
Version: Indigo Service Release 2
Build id: 20120216-1857

OCL Examples and Editors 3.1.2.v20120206-0606


So maybe I'm not doing the things right or there is a problem. I'm aware that I'm using a quite old version of eclipse but its better for us for the moment to avoid a migration.

If anyone have an idea ...

Thanks,
Arnaud
Re: Error during &quot;Computing additional info&quot; while using ECore EOperations [message #1044790 is a reply to message #1044778] Fri, 19 April 2013 10:54 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

Completion Assist and many other things have improved tremendously since
Indigo. The PrettyPrintVisitor has been refactored to be extensible for
QVT so the line numbers don't help very much. The loop bears a faint
resemblance to one I fixed recently, so hopefully the problem has gone away.

Newer releases of many modeling projects remain installable on Galileo,
provided you update the modeling projects, so you could use the latest
OCL milestone if you are prepared to install Xtext 2.4 as well.

Regards

Ed Willink

On 19/04/2013 11:32, Arnaud Dieumegard wrote:
> Hi !
>
> I have a MM and a meta class A with an EOperation op.
> I would like to have op to return a list of lists of elements of type B.
>
> So I've set the EType of op to "EEList<E>
> [org.eclipse.emf.common.util.EList]" and its upper bound to -1.
>
> I've generated the EMF model and updated the generated code in
> AImpl.java:
>
>
> public EList<EList<B>> op() {
> EList<EList<B>> lstBs = new BasicEList<EList<B>>();
> [...]
> return lstBs;
> }
>
>
> Now I want to write OCL constraints in an OCL file (using the
> completeOCL editor).
> I'm able to write constraints like:
>
>
> import '../model/MyModel.ecore'
>
> context A
> inv testConstraint: self.op()->isEmpty()
>
>
> But if I want to use auto-completion to get informations on op, I get
> an error:
>
> Quote:
>> Error
>> Fri Apr 19 12:18:35 CEST 2013
>> An internal error occurred during: "Computing additional info".
>>
>> java.lang.StackOverflowError
>> at
>> org.eclipse.ocl.examples.pivot.prettyprint.PrettyPrintTypeVisitor.appendParent(PrettyPrintTypeVisitor.java:171)
>> at
>> org.eclipse.ocl.examples.pivot.prettyprint.PrettyPrintTypeVisitor.visitType(PrettyPrintTypeVisitor.java:359)
>> at
>> org.eclipse.ocl.examples.pivot.util.AbstractExtendingVisitor.visitClass(AbstractExtendingVisitor.java:81)
>> at
>> org.eclipse.ocl.examples.pivot.internal.impl.ClassImpl.accept(ClassImpl.java:663)
>> at
>> org.eclipse.ocl.examples.pivot.util.AbstractVisitor.safeVisit(AbstractVisitor.java:64)
>> at
>> org.eclipse.ocl.examples.pivot.prettyprint.PrettyPrintTypeVisitor.appendElement(PrettyPrintTypeVisitor.java:110)
>> at
>> org.eclipse.ocl.examples.pivot.prettyprint.PrettyPrintTypeVisitor.appendTemplateBindings(PrettyPrintTypeVisitor.java:207)
>> at
>> org.eclipse.ocl.examples.pivot.prettyprint.PrettyPrintTypeVisitor.visitType(PrettyPrintTypeVisitor.java:362)
>> at
>> org.eclipse.ocl.examples.pivot.util.AbstractExtendingVisitor.visitClass(AbstractExtendingVisitor.java:81)
>> at
>> org.eclipse.ocl.examples.pivot.util.AbstractExtendingVisitor.visitDataType(AbstractExtendingVisitor.java:117)
>> at
>> org.eclipse.ocl.examples.pivot.internal.impl.DataTypeImpl.accept(DataTypeImpl.java:460)
>> at
>> org.eclipse.ocl.examples.pivot.util.AbstractVisitor.safeVisit(AbstractVisitor.java:64)
>> at
>> org.eclipse.ocl.examples.pivot.prettyprint.PrettyPrintTypeVisitor.appendParent(PrettyPrintTypeVisitor.java:189)
>> at
>> org.eclipse.ocl.examples.pivot.prettyprint.PrettyPrintTypeVisitor.visitType(PrettyPrintTypeVisitor.java:359)
>> at
>> org.eclipse.ocl.examples.pivot.util.AbstractExtendingVisitor.visitClass(AbstractExtendingVisitor.java:81)
>> at
>> org.eclipse.ocl.examples.pivot.internal.impl.ClassImpl.accept(ClassImpl.java:663)
>> at
>> org.eclipse.ocl.examples.pivot.util.AbstractVisitor.safeVisit(AbstractVisitor.java:64)
>> at
>> org.eclipse.ocl.examples.pivot.prettyprint.PrettyPrintTypeVisitor.appendElement(PrettyPrintTypeVisitor.java:110)
>> at
>> org.eclipse.ocl.examples.pivot.prettyprint.PrettyPrintTypeVisitor.appendTemplateBindings(PrettyPrintTypeVisitor.java:207)
>> at
>> org.eclipse.ocl.examples.pivot.prettyprint.PrettyPrintTypeVisitor.visitType(PrettyPrintTypeVisitor.java:362)
>> at
>> org.eclipse.ocl.examples.pivot.util.AbstractExtendingVisitor.visitClass(AbstractExtendingVisitor.java:81)
>> at
>> org.eclipse.ocl.examples.pivot.util.AbstractExtendingVisitor.visitDataType(AbstractExtendingVisitor.java:117)
>
> and so on...
>
> Here are my system info:
> Quote:
>> eclipse.buildId=M20120208-0800
>> java.version=1.6.0_27
>>
>> Eclipse Modeling Tools
>> Version: Indigo Service Release 2
>> Build id: 20120216-1857
>>
>> OCL Examples and Editors 3.1.2.v20120206-0606
>
>
> So maybe I'm not doing the things right or there is a problem. I'm
> aware that I'm using a quite old version of eclipse but its better for
> us for the moment to avoid a migration.
>
> If anyone have an idea ...
>
> Thanks,
> Arnaud
Re: Error during &quot;Computing additional info&quot; while using ECore EOperations [message #1044838 is a reply to message #1044790] Fri, 19 April 2013 11:55 Go to previous message
Arnaud Dieumegard is currently offline Arnaud DieumegardFriend
Messages: 29
Registered: June 2010
Junior Member
Thanks for your answer Ed.

I was afraid that this might be necessary to upgrade XText too. I will see if its possible for us.

Regards,
Arnaud
Previous Topic:Specifying derived values in a UML model
Next Topic:Customizing Pivot Environment
Goto Forum:
  


Current Time: Wed Apr 24 18:27:00 GMT 2024

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

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

Back to the top