Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » OCL » OCL editor
OCL editor [message #954982] Tue, 23 October 2012 12:05 Go to next message
ModelGeek Mising name is currently offline ModelGeek Mising nameFriend
Messages: 550
Registered: June 2011
Senior Member
Hi,

I am in need of OCL editor. I wrote one editor earlier in java swing and i used following code to get syntax help to provide intellisense.
OCL<?, EClassifier, ?, EStructuralFeature, ?, ?, ?, ?, ?, Constraint, EClass, EObject> ocl;
ocl = OCL.newInstance(EcoreEnvironmentFactory.INSTANCE);

OCLHelper<EClassifier, ?, EStructuralFeature, Constraint> helperC = ocl.createOCLHelper();
helperC.setAttributeContext(eClass, eAttribute);
List<Choice> syntaxHelp = helperC.getSyntaxHelp(ConstraintKind.DERIVATION, text);


Now i am looking for some thing already available in Eclipse. Actually i want user to write OCL statements for derivation of attributes. I want to provide some sort of editor to user containing intellisense.

Any idea?

Cheers,
Re: OCL editor [message #955186 is a reply to message #954982] Tue, 23 October 2012 15:33 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

You really aren't trying very hard.

There are four Xtext-based OCL editors described in the OCL
documentation. The Completion Assist is now (Juno) quite good.

Regards

Ed Willink

On 23/10/2012 14:05, ModelGeek Mising name wrote:
> Hi,
>
> I am in need of OCL editor. I wrote one editor earlier in java swing
> and i used following code to get syntax help to provide intellisense.
> OCL<?, EClassifier, ?, EStructuralFeature, ?, ?, ?, ?, ?,
> Constraint, EClass, EObject> ocl;
> ocl = OCL.newInstance(EcoreEnvironmentFactory.INSTANCE);
> OCLHelper<EClassifier, ?, EStructuralFeature,
> Constraint> helperC = ocl.createOCLHelper();
> helperC.setAttributeContext(eClass, eAttribute);
> List<Choice> syntaxHelp =
> helperC.getSyntaxHelp(ConstraintKind.DERIVATION, text);
>
>
> Now i am looking for some thing already available in Eclipse. Actually
> i want user to write OCL statements for derivation of attributes. I
> want to provide some sort of editor to user containing intellisense.
>
> Any idea?
>
> Cheers,
Re: OCL editor [message #957666 is a reply to message #955186] Thu, 25 October 2012 11:58 Go to previous messageGo to next message
ModelGeek Mising name is currently offline ModelGeek Mising nameFriend
Messages: 550
Registered: June 2011
Senior Member
Thanks for assistance.

I have tried to integrate XText Editor with essentialocl.

I have used org.eclipse.ocl.examples.xtext.essentialocl.ui.model.BaseDocument.setContext() to define the classifier context of the OCL expression.

When i try to write derivation statements of any attribute in the specific classifier then i get following execption


java.lang.AssertionError: Cyclic resolution of lazy links : PathElementCS.element->PathElementCS.element
at org.eclipse.xtext.linking.lazy.LazyLinkingResource.handleCyclicResolution(LazyLinkingResource.java:230)
at org.eclipse.xtext.linking.lazy.LazyLinkingResource.getEObject(LazyLinkingResource.java:169)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getEObject(ResourceSetImpl.java:223)
at org.eclipse.emf.ecore.util.EcoreUtil.resolve(EcoreUtil.java:197)
at org.eclipse.emf.ecore.util.EcoreUtil.resolve(EcoreUtil.java:257)
at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eResolveProxy(BasicEObjectImpl.java:1473)
at org.eclipse.ocl.examples.xtext.base.baseCST.impl.PathElementCSImpl.getElementGen(PathElementCSImpl.java:148)
at org.eclipse.ocl.examples.xtext.base.baseCST.impl.PathElementCSImpl.getElement(PathElementCSImpl.java:348)
at org.eclipse.ocl.examples.xtext.base.attributes.PathElementCSAttribution.computeLookup(PathElementCSAttribution.java:40)
at org.eclipse.ocl.examples.pivot.scoping.EnvironmentView.computeLookups(EnvironmentView.java:574)
at org.eclipse.ocl.examples.xtext.base.scoping.BaseScopeView.getElements(BaseScopeView.java:248)
at org.eclipse.ocl.examples.xtext.essentialocl.services.EssentialOCLLinkingService.getLinkedObjects(EssentialOCLLinkingService.java:115)
at org.eclipse.xtext.linking.lazy.LazyLinkingResource.getEObject(LazyLinkingResource.java:179)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getEObject(ResourceSetImpl.java:223)
at org.eclipse.emf.ecore.util.EcoreUtil.resolve(EcoreUtil.java:197)
at org.eclipse.emf.ecore.util.EcoreUtil.resolve(EcoreUtil.java:257)
at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eResolveProxy(BasicEObjectImpl.java:1473)
at org.eclipse.ocl.examples.xtext.base.baseCST.impl.PathElementCSImpl.getElementGen(PathElementCSImpl.java:148)
at org.eclipse.ocl.examples.xtext.base.baseCST.impl.PathElementCSImpl.getElement(PathElementCSImpl.java:348)
at org.eclipse.ocl.examples.xtext.base.baseCST.impl.PathNameCSImpl.getElement(PathNameCSImpl.java:390)
at org.eclipse.ocl.examples.xtext.base.baseCST.impl.PathNameCSImpl.eGet(PathNameCSImpl.java:167)
at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eGet(BasicEObjectImpl.java:1011)
at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eGet(BasicEObjectImpl.java:1003)
at org.eclipse.emf.ecore.util.EContentsEList$FeatureIteratorImpl.hasNext(EContentsEList.java:403)
at org.eclipse.emf.ecore.util.EContentsEList$FeatureIteratorImpl.next(EContentsEList.java:559)
at org.eclipse.emf.ecore.util.EObjectValidator.validate_EveryReferenceIsContained(EObjectValidator.java:784)
at org.eclipse.emf.ecore.util.EObjectValidator.validate_EveryDefaultConstraint(EObjectValidator.java:355)
at org.eclipse.ocl.examples.xtext.base.baseCST.util.BaseCSTValidator.validatePathNameCS(BaseCSTValidator.java:583)
at org.eclipse.ocl.examples.xtext.base.baseCST.util.BaseCSTValidator.validate(BaseCSTValidator.java:222)
at org.eclipse.emf.ecore.util.EObjectValidator.validate(EObjectValidator.java:324)
at org.eclipse.xtext.validation.CompositeEValidator.validate(CompositeEValidator.java:126)
at org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostician.java:159)
at org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostician.java:137)
at org.eclipse.xtext.validation.CancelableDiagnostician.validate(CancelableDiagnostician.java:36)
at org.eclipse.emf.ecore.util.Diagnostician.doValidateContents(Diagnostician.java:174)
at org.eclipse.xtext.validation.CancelableDiagnostician.doValidateContents(CancelableDiagnostician.java:48)
at org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostician.java:162)
at org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostician.java:137)
at org.eclipse.xtext.validation.CancelableDiagnostician.validate(CancelableDiagnostician.java:36)
at org.eclipse.emf.ecore.util.Diagnostician.doValidateContents(Diagnostician.java:178)
at org.eclipse.xtext.validation.CancelableDiagnostician.doValidateContents(CancelableDiagnostician.java:48)
at org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostician.java:162)
at org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostician.java:137)
at org.eclipse.xtext.validation.CancelableDiagnostician.validate(CancelableDiagnostician.java:36)
at org.eclipse.emf.ecore.util.Diagnostician.doValidateContents(Diagnostician.java:174)
at org.eclipse.xtext.validation.CancelableDiagnostician.doValidateContents(CancelableDiagnostician.java:48)
at org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostician.java:162)
at org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostician.java:137)
at org.eclipse.xtext.validation.CancelableDiagnostician.validate(CancelableDiagnostician.java:36)
at org.eclipse.emf.ecore.util.Diagnostician.doValidateContents(Diagnostician.java:174)
at org.eclipse.xtext.validation.CancelableDiagnostician.doValidateContents(CancelableDiagnostician.java:48)
at org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostician.java:162)
at org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostician.java:137)
at org.eclipse.xtext.validation.CancelableDiagnostician.validate(CancelableDiagnostician.java:36)
at org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostician.java:120)
at org.eclipse.xtext.validation.ResourceValidatorImpl.validate(ResourceValidatorImpl.java:108)
at org.eclipse.ocl.examples.xtext.base.utilities.PivotResourceValidator.validate(PivotResourceValidator.java:143)
at org.eclipse.xtext.ui.editor.validation.ValidationJob$1.exec(ValidationJob.java:79)
at org.eclipse.xtext.ui.editor.validation.ValidationJob$1.exec(ValidationJob.java:1)
at org.eclipse.xtext.util.concurrent.AbstractReadWriteAcces.readOnly(AbstractReadWriteAcces.java:32)
at org.eclipse.xtext.ui.editor.model.XtextDocument.readOnly(XtextDocument.java:78)
at org.eclipse.xtext.ui.editor.validation.ValidationJob.createIssues(ValidationJob.java:75)
at org.eclipse.xtext.ui.editor.validation.ValidationJob.run(ValidationJob.java:64)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

Do you any idea about the problem?

thanks again.

Re: OCL editor [message #957763 is a reply to message #957666] Thu, 25 October 2012 13:20 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

Your comments are very vague.

Are you creating your own OCL-based editor, (which is not officially
supported yet), in which case you need to code the CS2Pivot activities?

Have you got a specific example in which case ZIP it up as a project so
that I can see what you are actually doing.

Regards

Ed Willink

On 25/10/2012 13:58, ModelGeek Mising name wrote:
> Thanks for assistance.
>
> I have tried to integrate XText Editor with essentialocl.
>
> I have used
> org.eclipse.ocl.examples.xtext.essentialocl.ui.model.BaseDocument.setContext()
> to define the classifier context of the OCL expression.
>
> When i try to write derivation statements of any attribute in the
> specific classifier then i get following execption
>
>
> java.lang.AssertionError: Cyclic resolution of lazy links :
> PathElementCS.element->PathElementCS.element
> at
> org.eclipse.xtext.linking.lazy.LazyLinkingResource.handleCyclicResolution(LazyLinkingResource.java:230)
> at
> org.eclipse.xtext.linking.lazy.LazyLinkingResource.getEObject(LazyLinkingResource.java:169)
> at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getEObject(ResourceSetImpl.java:223)
> at org.eclipse.emf.ecore.util.EcoreUtil.resolve(EcoreUtil.java:197)
> at org.eclipse.emf.ecore.util.EcoreUtil.resolve(EcoreUtil.java:257)
> at
> org.eclipse.emf.ecore.impl.BasicEObjectImpl.eResolveProxy(BasicEObjectImpl.java:1473)
> at
> org.eclipse.ocl.examples.xtext.base.baseCST.impl.PathElementCSImpl.getElementGen(PathElementCSImpl.java:148)
> at
> org.eclipse.ocl.examples.xtext.base.baseCST.impl.PathElementCSImpl.getElement(PathElementCSImpl.java:348)
> at
> org.eclipse.ocl.examples.xtext.base.attributes.PathElementCSAttribution.computeLookup(PathElementCSAttribution.java:40)
> at
> org.eclipse.ocl.examples.pivot.scoping.EnvironmentView.computeLookups(EnvironmentView.java:574)
> at
> org.eclipse.ocl.examples.xtext.base.scoping.BaseScopeView.getElements(BaseScopeView.java:248)
> at
> org.eclipse.ocl.examples.xtext.essentialocl.services.EssentialOCLLinkingService.getLinkedObjects(EssentialOCLLinkingService.java:115)
> at
> org.eclipse.xtext.linking.lazy.LazyLinkingResource.getEObject(LazyLinkingResource.java:179)
> at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getEObject(ResourceSetImpl.java:223)
> at org.eclipse.emf.ecore.util.EcoreUtil.resolve(EcoreUtil.java:197)
> at org.eclipse.emf.ecore.util.EcoreUtil.resolve(EcoreUtil.java:257)
> at
> org.eclipse.emf.ecore.impl.BasicEObjectImpl.eResolveProxy(BasicEObjectImpl.java:1473)
> at
> org.eclipse.ocl.examples.xtext.base.baseCST.impl.PathElementCSImpl.getElementGen(PathElementCSImpl.java:148)
> at
> org.eclipse.ocl.examples.xtext.base.baseCST.impl.PathElementCSImpl.getElement(PathElementCSImpl.java:348)
> at
> org.eclipse.ocl.examples.xtext.base.baseCST.impl.PathNameCSImpl.getElement(PathNameCSImpl.java:390)
> at
> org.eclipse.ocl.examples.xtext.base.baseCST.impl.PathNameCSImpl.eGet(PathNameCSImpl.java:167)
> at
> org.eclipse.emf.ecore.impl.BasicEObjectImpl.eGet(BasicEObjectImpl.java:1011)
> at
> org.eclipse.emf.ecore.impl.BasicEObjectImpl.eGet(BasicEObjectImpl.java:1003)
> at
> org.eclipse.emf.ecore.util.EContentsEList$FeatureIteratorImpl.hasNext(EContentsEList.java:403)
> at
> org.eclipse.emf.ecore.util.EContentsEList$FeatureIteratorImpl.next(EContentsEList.java:559)
> at
> org.eclipse.emf.ecore.util.EObjectValidator.validate_EveryReferenceIsContained(EObjectValidator.java:784)
> at
> org.eclipse.emf.ecore.util.EObjectValidator.validate_EveryDefaultConstraint(EObjectValidator.java:355)
> at
> org.eclipse.ocl.examples.xtext.base.baseCST.util.BaseCSTValidator.validatePathNameCS(BaseCSTValidator.java:583)
> at
> org.eclipse.ocl.examples.xtext.base.baseCST.util.BaseCSTValidator.validate(BaseCSTValidator.java:222)
> at
> org.eclipse.emf.ecore.util.EObjectValidator.validate(EObjectValidator.java:324)
> at
> org.eclipse.xtext.validation.CompositeEValidator.validate(CompositeEValidator.java:126)
> at
> org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostician.java:159)
> at
> org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostician.java:137)
> at
> org.eclipse.xtext.validation.CancelableDiagnostician.validate(CancelableDiagnostician.java:36)
> at
> org.eclipse.emf.ecore.util.Diagnostician.doValidateContents(Diagnostician.java:174)
> at
> org.eclipse.xtext.validation.CancelableDiagnostician.doValidateContents(CancelableDiagnostician.java:48)
> at
> org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostician.java:162)
> at
> org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostician.java:137)
> at
> org.eclipse.xtext.validation.CancelableDiagnostician.validate(CancelableDiagnostician.java:36)
> at
> org.eclipse.emf.ecore.util.Diagnostician.doValidateContents(Diagnostician.java:178)
> at
> org.eclipse.xtext.validation.CancelableDiagnostician.doValidateContents(CancelableDiagnostician.java:48)
> at
> org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostician.java:162)
> at
> org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostician.java:137)
> at
> org.eclipse.xtext.validation.CancelableDiagnostician.validate(CancelableDiagnostician.java:36)
> at
> org.eclipse.emf.ecore.util.Diagnostician.doValidateContents(Diagnostician.java:174)
> at
> org.eclipse.xtext.validation.CancelableDiagnostician.doValidateContents(CancelableDiagnostician.java:48)
> at
> org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostician.java:162)
> at
> org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostician.java:137)
> at
> org.eclipse.xtext.validation.CancelableDiagnostician.validate(CancelableDiagnostician.java:36)
> at
> org.eclipse.emf.ecore.util.Diagnostician.doValidateContents(Diagnostician.java:174)
> at
> org.eclipse.xtext.validation.CancelableDiagnostician.doValidateContents(CancelableDiagnostician.java:48)
> at
> org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostician.java:162)
> at
> org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostician.java:137)
> at
> org.eclipse.xtext.validation.CancelableDiagnostician.validate(CancelableDiagnostician.java:36)
> at
> org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostician.java:120)
> at
> org.eclipse.xtext.validation.ResourceValidatorImpl.validate(ResourceValidatorImpl.java:108)
> at
> org.eclipse.ocl.examples.xtext.base.utilities.PivotResourceValidator.validate(PivotResourceValidator.java:143)
> at
> org.eclipse.xtext.ui.editor.validation.ValidationJob$1.exec(ValidationJob.java:79)
> at
> org.eclipse.xtext.ui.editor.validation.ValidationJob$1.exec(ValidationJob.java:1)
> at
> org.eclipse.xtext.util.concurrent.AbstractReadWriteAcces.readOnly(AbstractReadWriteAcces.java:32)
> at
> org.eclipse.xtext.ui.editor.model.XtextDocument.readOnly(XtextDocument.java:78)
> at
> org.eclipse.xtext.ui.editor.validation.ValidationJob.createIssues(ValidationJob.java:75)
> at
> org.eclipse.xtext.ui.editor.validation.ValidationJob.run(ValidationJob.java:64)
> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
>
> Do you any idea about the problem?
>
> thanks again.
>
>
Re: OCL editor [message #957828 is a reply to message #957763] Thu, 25 October 2012 14:27 Go to previous messageGo to next message
ModelGeek Mising name is currently offline ModelGeek Mising nameFriend
Messages: 550
Registered: June 2011
Senior Member
i am attaching a sample pulgin project which contains 2 files.
1 - OCLDialog(creates a dialog for xtext editor where user can write derivation statements)
2 - TestPivot (just creates a simple ecore model.)

I want to be able to use Xtext editor with essentialocl to write derivation statement for attribute(eclass1.attribute1 in testpivot).

To sum it up. I am creating ecore at run time and i want user to write OCL statements for the derivation of derived attribute and i want to use editor which supports OCL syntax highlighting and parsing.

thanks for help!

Cheers

[Updated on: Thu, 25 October 2012 14:29]

Report message to a moderator

Re: OCL editor [message #960036 is a reply to message #957828] Sat, 27 October 2012 05:50 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

Your code looks plausible but since you get a cyclic resolution problem
clearly part of the initialization is adrift. I know that it took me a
while to get the Xtext Console to work which is similar.

There was a problem for the derived QVT editors with cyclic resolution
errors that I was slow to push the fix for. It's just possible thatr
this might affect you if you use the JUno distribution; but I doubt it.

You provide no instructions on how to run your code to get your observed
error so I cannot offer any help.

I can only comment that hand constructing OCL in Ecore is really hard.
You might find
org.eclipse.ocl.examples.test.xtext.RoundTripTests.testBug350894RoundTrip()
helpful.

Regards

Ed Willink


On 25/10/2012 16:27, ModelGeek Mising name wrote:
> i am attaching a sample pulgin project which contains 2 files.
> 1 - OCLDialog(creates a dialog for xtext editor where user can write derivation statements)
> 2 - TestPivot (just creates a simple ecore model.)
>
> I want to be able to use Xtext editor with essentialocl to write derivation statement for attribute(eclass1.attribute1 in testpivot).
>
> To sum it up. I am creating ecore at run time and i want user to write OCL statements for the derivation of derived attribute and i want to use editor which supports OCL syntax highlighting and parsing.
>
> thanks for help!
>
> Cheers
Re: OCL editor [message #963132 is a reply to message #960036] Mon, 29 October 2012 15:49 Go to previous messageGo to next message
ModelGeek Mising name is currently offline ModelGeek Mising nameFriend
Messages: 550
Registered: June 2011
Senior Member
Hi,

Thanks for assistance.

I would like to ask a very general question. I want to have an editor which can support writing some OCL statement for Ecore model (Syntax highlighting and Intellisense is required). I am creating Ecore at run time.
I donot want OCLInEcore Type of editor where whole ecore is edited. I want to write/edit only OCL parts of Ecore like derivation statements of attribute or to write/edit an OCL operation or write/edit an invariant. It is also not like CompleteOCL where all OCL statements are written in one document. I want to be able to write/edit derivation statement for one attribute or one OCL operation or one Invariant.
As there are 4 Xtext based OCL editor which one is more suitable for this purpose.


thanks again.
Re: OCL editor [message #963291 is a reply to message #963132] Mon, 29 October 2012 17:58 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

There are two main derived editors.

OCLinEcore is OCL embedded in an other language.

Complete OCL is OCL complementing another lkanguage. You may have many
Complete OCL documents with import relationships, so your summary is wrong.

Generally, embedded OCL is much more user friendly since the user does
not get confused by disjoint OCL.

However these editors are of experimental quality; no tutorials have
been written demonstrating their reusability. You use them at your peril.




On 29/10/2012 15:49, ModelGeek Mising name wrote:
> Hi,
>
> Thanks for assistance.
>
> I would like to ask a very general question. I want to have an editor
> which can support writing some OCL statement for Ecore model (Syntax
> highlighting and Intellisense is required). I am creating Ecore at run
> time.
> I donot want OCLInEcore Type of editor where whole ecore is edited. I
> want to write/edit only OCL parts of Ecore like derivation statements
> of attribute or to write/edit an OCL operation or write/edit an
> invariant. It is also not like CompleteOCL where all OCL statements
> are written in one document. I want to be able to write/edit
> derivation statement for one attribute or one OCL operation or one
> Invariant.
> As there are 4 Xtext based OCL editor which one is more suitable for
> this purpose.
>
>
> thanks again.
Re: OCL editor [message #964054 is a reply to message #963291] Tue, 30 October 2012 08:15 Go to previous messageGo to next message
ModelGeek Mising name is currently offline ModelGeek Mising nameFriend
Messages: 550
Registered: June 2011
Senior Member
Í do agree that in CompleteOCL we can have many documents with import statement, actually i just wanted to express that i want to have an editor which can be used for one OCL statement either for attribute derivation, operation or invariant but i could not explain it properly.

Thanks for assistance
Re: OCL editor [message #964728 is a reply to message #964054] Tue, 30 October 2012 19:00 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

The Essential OCL editor can be used for a single expression; this is
its usage in Papyrus.

Regards

Ed Willink

On 30/10/2012 08:15, ModelGeek Mising name wrote:
> Í do agree that in CompleteOCL we can have many documents with import
> statement, actually i just wanted to express that i want to have an
> editor which can be used for one OCL statement either for attribute
> derivation, operation or invariant but i could not explain it properly.
>
> Thanks for assistance
>
Re: OCL editor [message #965931 is a reply to message #964728] Wed, 31 October 2012 16:17 Go to previous messageGo to next message
ModelGeek Mising name is currently offline ModelGeek Mising nameFriend
Messages: 550
Registered: June 2011
Senior Member
Hi,

Here comes some code again. This is Plugin Project(Indigo updated OCL exmples and editors plugin to rectify the operation overriding bug).

Open it in indigo

org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.ocl.examples.xtext.base;bundle-version="3.3.0",
org.eclipse.ocl.examples.xtext.completeocl;bundle-version="3.3.0",
org.eclipse.ocl.examples.xtext.completeocl.ui;bundle-version="3.3.0",
org.eclipse.ocl.examples.xtext.essentialocl;bundle-version="3.3.0",
org.eclipse.ocl.examples.xtext.essentialocl.ui;bundle-version="3.3.0",
org.eclipse.ocl.examples.xtext.oclstdlib;bundle-version="3.3.0",
org.eclipse.ocl.examples.xtext.oclstdlib.ui;bundle-version="3.3.0",
org.eclipse.ocl.examples.xtext.console;bundle-version="3.3.0",
org.apache.log4j;bundle-version="1.2.15"

Above mentioned are dependencies.

open ocltest.product file. Click on "Launch an eclipse application". A new application instance will appear. Use File->open model menu. There will be a dialog after clicking on specified menu. Dialog contains an text editor. Try to type "test.", normally it throws exception.


Thanks alot for such an active support.
Re: OCL editor [message #966154 is a reply to message #965931] Wed, 31 October 2012 20:02 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

Cyclic resolution problems were apparent in the Juno QVT editors and
were fixed in M2.

Your configuration is unclear.

3.3.0 implies that you are probably using either M2 or GIT or some
N-build. Your editor seems to work fine using M2 or my current working
configuration (both on Juno 3.8.1).

You don't identify which Indigo service release or how you overcome the
missing Juno dependencies.

So I cannot reproduce your problem.

Regards

Ed Willink


On 31/10/2012 16:17, ModelGeek Mising name wrote:
> Hi,
>
> Here comes some code again. This is Plugin Project(Indigo updated OCL exmples and editors plugin to rectify the operation overriding bug).
>
> Open it in indigo
>
> org.eclipse.ui,
> org.eclipse.core.runtime,
> org.eclipse.ocl.examples.xtext.base;bundle-version="3.3.0",
> org.eclipse.ocl.examples.xtext.completeocl;bundle-version="3.3.0",
> org.eclipse.ocl.examples.xtext.completeocl.ui;bundle-version="3.3.0",
> org.eclipse.ocl.examples.xtext.essentialocl;bundle-version="3.3.0",
> org.eclipse.ocl.examples.xtext.essentialocl.ui;bundle-version="3.3.0",
> org.eclipse.ocl.examples.xtext.oclstdlib;bundle-version="3.3.0",
> org.eclipse.ocl.examples.xtext.oclstdlib.ui;bundle-version="3.3.0",
> org.eclipse.ocl.examples.xtext.console;bundle-version="3.3.0",
> org.apache.log4j;bundle-version="1.2.15"
>
> Above mentioned are dependencies.
>
> open ocltest.product file. Click on "Launch an eclipse application". A new application instance will appear. Use File->open model menu. There will be a dialog after clicking on specified menu. Dialog contains an text editor. Try to type "test.", normally it throws exception.
>
>
> Thanks alot for such an active support.
>
Re: OCL editor [message #966890 is a reply to message #966154] Thu, 01 November 2012 10:11 Go to previous messageGo to next message
ModelGeek Mising name is currently offline ModelGeek Mising nameFriend
Messages: 550
Registered: June 2011
Senior Member
Hi,

i am using Eclipse (indigo) for RCP and RAP Developers
Version: Indigo Service Release 2
Build id: 20120216-1857

I have upgraded OCL Examples and editors in order to fix the bug in operation overriding

OCL Examples and Editors
Version: 3.3.0.v20120906-1849
Build id: N201209061453

OCL (Object Constraint Language)
Version: 3.2.1.v20120917-1739
Build id: M201209171739

Eclipse Modeling Framework Runtime and Tools
Version: 2.8.1.v20120917-0436
Build id: R201209170436

Eclipse Modeling Framework Core Runtime
Version: 2.8.1.v20120911-0500
Build id: R201209110500


thanks for assistance


[Updated on: Thu, 01 November 2012 10:11]

Report message to a moderator

Re: OCL editor [message #967107 is a reply to message #966890] Thu, 01 November 2012 13:49 Go to previous messageGo to next message
ModelGeek Mising name is currently offline ModelGeek Mising nameFriend
Messages: 550
Registered: June 2011
Senior Member
Hi,

I have found the problem

http://www.eclipse.org/modeling/download.php?file=/modeling/mdt/ocl/downloads/drops/4.1.0/N201209061453/mdt-ocl-Update-tools-N201209061453.zip

Above mentioned link is fix for operation overriding bug. I just uninstalled it and installed OCL Examples and Editor 3.2.1 and now i am not getting cyclic problem exception.

Can you pease fix this problem in the fix for operation overriding?

I really appreciate your efforts.

Cheers,
Re: OCL editor [message #967186 is a reply to message #967107] Thu, 01 November 2012 15:02 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

I am not aware of any fix that is needed for operation overriding.

Regards

Ed Willink


On 01/11/2012 13:49, ModelGeek Mising name wrote:
> Hi,
>
> I have found the problem
>
> http://www.eclipse.org/modeling/download.php?file=/modeling/mdt/ocl/downloads/drops/4.1.0/N201209061453/mdt-ocl-Update-tools-N201209061453.zip
>
> Above mentioned link is fix for operation overriding bug. I just
> uninstalled it and installed OCL Examples and Editor 3.2.1 and now i
> am not getting cyclic problem exception.
>
> Can you pease fix this problem in the fix for operation overriding?
>
> I really appreciate your efforts.
>
> Cheers,
Re: OCL editor [message #967194 is a reply to message #967186] Thu, 01 November 2012 15:13 Go to previous messageGo to next message
ModelGeek Mising name is currently offline ModelGeek Mising nameFriend
Messages: 550
Registered: June 2011
Senior Member
Hi,

http://www.eclipse.org/forums/index.php/t/375553/ is the link where we discussed this issue and i got the link for fix.

Cheers,
Re: OCL editor [message #967212 is a reply to message #967194] Thu, 01 November 2012 15:26 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

Exactly. I'm not aware of any overriding bugs that still need a fix;
they're already fixed on GIT master.

Regards

Ed Willink


On 01/11/2012 15:13, ModelGeek Mising name wrote:
> Hi,
>
> http://www.eclipse.org/forums/index.php/t/375553/ is the link where we
> discussed this issue and i got the link for fix.
>
> Cheers,
Re: OCL editor [message #967235 is a reply to message #967212] Thu, 01 November 2012 15:53 Go to previous messageGo to next message
ModelGeek Mising name is currently offline ModelGeek Mising nameFriend
Messages: 550
Registered: June 2011
Senior Member
Yes i updated my eclipse to get method overriding fix (version 3.3.0) and this version cause cyclic resolution problem for EssentialOCL. Now again i went back to 3.2.1 and cyclic resolution problem is solved but facing method overriding problem again.


thanks!


Cheers
Re: OCL editor [message #967397 is a reply to message #967235] Thu, 01 November 2012 18:30 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

But you're using an old 3.3.0.

Build id: N201209061453 is 6 September 2012 which is way before M2 at 1
October 2012 or the latest N201210280101 of 28 October 2012.

Why do you insist on using an N-build that is no longer available and
complaining that it has bugs that have been fixed in later builds?

Regards

Ed Willink


On 01/11/2012 15:53, ModelGeek Mising name wrote:
> Yes i updated my eclipse to get method overriding fix (version 3.3.0)
> and this version cause cyclic resolution problem for EssentialOCL. Now
> again i went back to 3.2.1 and cyclic resolution problem is solved but
> facing method overriding problem again.
>
>
> thanks!
>
>
> Cheers
Re: OCL editor [message #968236 is a reply to message #967397] Fri, 02 November 2012 09:59 Go to previous messageGo to next message
ModelGeek Mising name is currently offline ModelGeek Mising nameFriend
Messages: 550
Registered: June 2011
Senior Member
thanks!

I have tried to uninstall all modeling component and then the latest i get is
Eclipse OCL-4.0.1 feature with OCL Examples and Editors 3.2.1.v20120919-0602

I have downloaded N201210280101 and if i try to use that then i get following problem
Cannot complete the install because one or more required items could not be found.
Software being installed: OCL Examples and Editors 3.3.0.v20121028-0101 (org.eclipse.ocl.examples.feature.group 3.3.0.v20121028-0101)
Missing requirement: OCL Examples Installer 3.3.0.v20121028-0101 (org.eclipse.ocl.examples 3.3.0.v20121028-0101) requires 'bundle org.eclipse.emf.common.ui [2.8.0,3.0.0)' but it could not be found
Cannot satisfy dependency:
From: OCL Examples and Editors 3.3.0.v20121028-0101 (org.eclipse.ocl.examples.feature.group 3.3.0.v20121028-0101)
To: org.eclipse.ocl.examples [3.3.0.v20121028-0101]

any clue how to deal with that?

Thanks alot
Re: OCL editor [message #968367 is a reply to message #968236] Fri, 02 November 2012 12:00 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

Ah! Now I see the
problem.https://bugs.eclipse.org/bugs/show_bug.cgi?id=393405 raised.

An improvement to the Examples plugin installer accidentally lost the
EMF dependency bounds so that they default to the current release (Juno
today, but might become Kepler any time.)

Solutions.

a) Install EMF for Juno.

b) Use Juno, but you may want to avoid the speed concerns.

c) wait for the bug fix; it's building now.

- you should find the fix at
https://hudson.eclipse.org/hudson/job/buckminster-mdt-ocl-tools-kepler-master/lastSuccessfulBuild/artifact/MDT-OCL.downloads/
shortly (make sure its dated after 1-Nov-2012).

- you should find the fix at
http://www.eclipse.org/modeling/mdt/downloads/?project=ocl tomorrow.

Sorry for the trouble.

Regards

Ed Willink

On 02/11/2012 09:59, ModelGeek Mising name wrote:
> thanks!
>
> I have tried to uninstall all modeling component and then the latest i
> get is
> Eclipse OCL-4.0.1 feature with OCL Examples and Editors
> 3.2.1.v20120919-0602
>
> I have downloaded N201210280101 and if i try to use that then i get
> following problem
> Cannot complete the install because one or more required items could
> not be found.
> Software being installed: OCL Examples and Editors
> 3.3.0.v20121028-0101 (org.eclipse.ocl.examples.feature.group
> 3.3.0.v20121028-0101)
> Missing requirement: OCL Examples Installer 3.3.0.v20121028-0101
> (org.eclipse.ocl.examples 3.3.0.v20121028-0101) requires 'bundle
> org.eclipse.emf.common.ui [2.8.0,3.0.0)' but it could not be found
> Cannot satisfy dependency:
> From: OCL Examples and Editors 3.3.0.v20121028-0101
> (org.eclipse.ocl.examples.feature.group 3.3.0.v20121028-0101)
> To: org.eclipse.ocl.examples [3.3.0.v20121028-0101]
>
> any clue how to deal with that?
>
> Thanks alot
Re: OCL editor [message #968848 is a reply to message #968367] Fri, 02 November 2012 20:06 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

Fixing the gratuitous OCL dependencies doesn't actually help much.

http://wiki.eclipse.org/MDT/OCL/FAQ#Does_Eclipse_OCL_work_with_J2SE_1.4.3F
shows the MDT/OCL requirements (I've added preliminary Kepler entries).

Using Juno MDT/OCL code mandates MDT/OCL 4.0, which unfortunately
mandates EMF 2.8 (even though MDT/OCL is more tolerant.)

So you have to install the Juno EMF and UML code on your Indigo
installation to allow the use of Juno/Kepler OCL.

Regards

Ed Willink

On 02/11/2012 12:00, Ed Willink wrote:
> Hi
>
> Ah! Now I see the
> problem.https://bugs.eclipse.org/bugs/show_bug.cgi?id=393405 raised.
>
> An improvement to the Examples plugin installer accidentally lost the
> EMF dependency bounds so that they default to the current release
> (Juno today, but might become Kepler any time.)
>
> Solutions.
>
> a) Install EMF for Juno.
>
> b) Use Juno, but you may want to avoid the speed concerns.
>
> c) wait for the bug fix; it's building now.
>
> - you should find the fix at
> https://hudson.eclipse.org/hudson/job/buckminster-mdt-ocl-tools-kepler-master/lastSuccessfulBuild/artifact/MDT-OCL.downloads/
> shortly (make sure its dated after 1-Nov-2012).
>
> - you should find the fix at
> http://www.eclipse.org/modeling/mdt/downloads/?project=ocl tomorrow.
>
> Sorry for the trouble.
>
> Regards
>
> Ed Willink
>
> On 02/11/2012 09:59, ModelGeek Mising name wrote:
>> thanks!
>>
>> I have tried to uninstall all modeling component and then the latest
>> i get is
>> Eclipse OCL-4.0.1 feature with OCL Examples and Editors
>> 3.2.1.v20120919-0602
>>
>> I have downloaded N201210280101 and if i try to use that then i get
>> following problem
>> Cannot complete the install because one or more required items could
>> not be found.
>> Software being installed: OCL Examples and Editors
>> 3.3.0.v20121028-0101 (org.eclipse.ocl.examples.feature.group
>> 3.3.0.v20121028-0101)
>> Missing requirement: OCL Examples Installer 3.3.0.v20121028-0101
>> (org.eclipse.ocl.examples 3.3.0.v20121028-0101) requires 'bundle
>> org.eclipse.emf.common.ui [2.8.0,3.0.0)' but it could not be found
>> Cannot satisfy dependency:
>> From: OCL Examples and Editors 3.3.0.v20121028-0101
>> (org.eclipse.ocl.examples.feature.group 3.3.0.v20121028-0101)
>> To: org.eclipse.ocl.examples [3.3.0.v20121028-0101]
>>
>> any clue how to deal with that?
>>
>> Thanks alot
>
Re: OCL editor [message #971979 is a reply to message #968848] Mon, 05 November 2012 09:06 Go to previous message
ModelGeek Mising name is currently offline ModelGeek Mising nameFriend
Messages: 550
Registered: June 2011
Senior Member
thanks!
Previous Topic:OCL in XText Editor
Next Topic:How to get the whole set of containers
Goto Forum:
  


Current Time: Thu Mar 28 22:46:43 GMT 2024

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

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

Back to the top