Opening UML meta-model using oclInEcore editor [message #1062523] |
Sat, 08 June 2013 04:56  |
Eclipse User |
|
|
|
Hello everyone,
I try to open the UML ecore meta-model (imported from org.eclipse.uml2.uml) using oclInEcore editor and I got the following error:
Error
Sat Jun 08 10:11:13 CEST 2013
OCL in Ecore Editor linking error
java.lang.NullPointerException
at org.eclipse.ocl.examples.pivot.utilities.PivotUtil.refreshList(PivotUtil.java:1021)
at org.eclipse.ocl.examples.pivot.utilities.AbstractConversion.refreshList(AbstractConversion.java:72)
at org.eclipse.ocl.examples.xtext.base.cs2pivot.BasePostOrderVisitor.visitAnnotationCS(BasePostOrderVisitor.java:131)
at org.eclipse.ocl.examples.xtext.base.cs2pivot.BasePostOrderVisitor.visitAnnotationCS(BasePostOrderVisitor.java:1)
at org.eclipse.ocl.examples.xtext.base.baseCST.impl.AnnotationCSImpl.accept(AnnotationCSImpl.java:219)
at org.eclipse.ocl.examples.xtext.base.cs2pivot.CS2PivotConversion.visitInPostOrder(CS2PivotConversion.java:1295)
at org.eclipse.ocl.examples.xtext.base.cs2pivot.CS2PivotConversion.visitInPostOrder(CS2PivotConversion.java:1293)
at org.eclipse.ocl.examples.xtext.base.cs2pivot.CS2PivotConversion.visitInPostOrder(CS2PivotConversion.java:1293)
at org.eclipse.ocl.examples.xtext.base.cs2pivot.CS2PivotConversion.visitInPostOrder(CS2PivotConversion.java:1293)
at org.eclipse.ocl.examples.xtext.base.cs2pivot.CS2PivotConversion.visitInPostOrder(CS2PivotConversion.java:1293)
at org.eclipse.ocl.examples.xtext.base.cs2pivot.CS2PivotConversion.update(CS2PivotConversion.java:1201)
at org.eclipse.ocl.examples.xtext.base.cs2pivot.CS2Pivot.update(CS2Pivot.java:505)
at org.eclipse.ocl.examples.xtext.base.utilities.CS2PivotResourceAdapter.refreshPivotMappings(CS2PivotResourceAdapter.java:129)
at org.eclipse.ocl.examples.xtext.base.utilities.CS2PivotLinker.afterModelLinked(CS2PivotLinker.java:69)
at org.eclipse.xtext.linking.impl.AbstractCleaningLinker.linkModel(AbstractCleaningLinker.java:44)
at org.eclipse.xtext.resource.XtextResource.doLinking(XtextResource.java:279)
at org.eclipse.xtext.linking.lazy.LazyLinkingResource.doLinking(LazyLinkingResource.java:82)
at org.eclipse.ocl.examples.xtext.essentialocl.utilities.EssentialOCLCSResource.doLinking(EssentialOCLCSResource.java:98)
at org.eclipse.xtext.resource.XtextResource.updateInternalState(XtextResource.java:247)
at org.eclipse.xtext.resource.XtextResource.updateInternalState(XtextResource.java:237)
at org.eclipse.xtext.resource.XtextResource.update(XtextResource.java:218)
at org.eclipse.xtext.ui.editor.reconciler.XtextReconcilerUnitOfWork.process(XtextReconcilerUnitOfWork.java:55)
at org.eclipse.xtext.ui.editor.reconciler.XtextReconcilerUnitOfWork.process(XtextReconcilerUnitOfWork.java:1)
at org.eclipse.xtext.util.concurrent.IUnitOfWork$Void.exec(IUnitOfWork.java:36)
at org.eclipse.xtext.util.concurrent.AbstractReadWriteAcces.modify(AbstractReadWriteAcces.java:49)
at org.eclipse.xtext.ui.editor.model.XtextDocument$XtextDocumentLocker.modify(XtextDocument.java:181)
at org.eclipse.xtext.ui.editor.model.XtextDocument.internalModify(XtextDocument.java:90)
at org.eclipse.xtext.ui.editor.reconciler.XtextDocumentReconcileStrategy.reconcile(XtextDocumentReconcileStrategy.java:44)
at org.eclipse.xtext.ui.editor.reconciler.XtextReconciler.run(XtextReconciler.java:254)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
Would you please point out what the problem is and how to fix it?
Many thanks.
|
|
|
|
|
|
Re: Opening UML meta-model using oclInEcore editor [message #1062534 is a reply to message #1062532] |
Sat, 08 June 2013 07:42   |
Eclipse User |
|
|
|
Thank you for your answer.
Well, in some situations that I encountered, I have to evaluate some constraints on the concept that does not exist in the defined language. Let's say in the meta-model we have two groups of meta-classes: A1,A2,...,An and B1,B2,...,Bn. The notion of "group", which encompasses a set of meta-classes, obviously does not exist at the meta level but a possible constraint could be, let's say "GroupA must have certain relationships with GroupB". Do you have any idea on this?
If the dynamic addition of meta-class is impossible then I have another question: Imagine we have the meta-class Group at the meta-model. Could we somehow declare a new Group object at the model-level and evaluate some constraints on it? For instance, the syntax could be somehow like: let Group g = new Group(a1: A1, a2: A2,...) in evaluate(g).
Best regards.
|
|
|
Re: Opening UML meta-model using oclInEcore editor [message #1062734 is a reply to message #1062534] |
Mon, 10 June 2013 10:47   |
Eclipse User |
|
|
|
Hi
Perhaps profiles and stereotypes are what you should use.
Regards
Ed Willink
On 08/06/2013 12:42, Capi Tali wrote:
> Thank you for your answer.
> Well, in some situations that I encountered, I have to evaluate some
> constraints on the concept that does not exist in the defined
> language. Let's say in the meta-model we have two groups of
> meta-classes: A1,A2,...,An and B1,B2,...,Bn. The notion of "group",
> which encompasses a set of meta-classes, obviously does not exist at
> the meta level but a possible constraint could be, let's say "GroupA
> must have certain relationships with GroupB". Do you have any idea on
> this?
>
> If the dynamic addition of meta-class is impossible then I have
> another question: Imagine we have the meta-class Group at the
> meta-model. Could we somehow declare a new Group object at the
> model-level and evaluate some constraints on it? For instance, the
> syntax could be somehow like: let Group g = new Group(a1: A1, a2:
> A2,...) in evaluate(g).
>
> Best regards.
>
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04753 seconds