OCL editor [message #954982] |
Tue, 23 October 2012 12:05 |
ModelGeek Mising name 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 |
Ed Willink Messages: 7670 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 #957828 is a reply to message #957763] |
Thu, 25 October 2012 14:27 |
ModelGeek Mising name 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 #965931 is a reply to message #964728] |
Wed, 31 October 2012 16:17 |
ModelGeek Mising name 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 |
Ed Willink Messages: 7670 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 |
ModelGeek Mising name 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
|
|
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.08608 seconds