Home » Modeling » OCL » OCL Content Assit helper.getSyntaxHelp
OCL Content Assit helper.getSyntaxHelp [message #687842] |
Thu, 23 June 2011 11:18 |
ModelGeek Mising name Messages: 550 Registered: June 2011 |
Senior Member |
|
|
Hi,
I am using helper.getSyntaxHelp to get possible choices.
OCL<?, EClassifier, ?, ?, ?, ?, ?, ?, ?, Constraint, EClass, EObject> ocl= OCL.newInstance(EcoreEnvironmentFactory.INSTANCE);
OCLHelper<EClassifier, ?, ?, Constraint> helperC = ocl.createOCLHelper();
helperC.setContext(modelPackage.getEClassifier(prmClass.getName()));
List<Choice> syntaxHelp = helperC.getSyntaxHelp(ConstraintKind.INVARIANT, text);
My problem is that if the expression is "self." then it shows the approperiate choices but if expression is "self.somproperty." it again shows the same choice as for "self." which is wrong it should show the choices related to "somproperty".
Please help me!
Warmest Regards,
Khurram Shahzad
|
|
|
Re: OCL Content Assit helper.getSyntaxHelp [message #687992 is a reply to message #687842] |
Thu, 23 June 2011 15:56 |
Ed Willink Messages: 7655 Registered: July 2009 |
Senior Member |
|
|
Hi Khurram
The SyntaxHelper is a pragmatic assistant used by the OCL Console to
provide editing capabilities in the absence of an editor.
We are now using Xtext which provides rich editing facilities including
content assist. In Indigo there is OCL Xtext Console.
As a result the syntax helper is no longer supported. If you care to
submit a patch we may be able to make it available. However I would
recommend using the Xtext facilities which will ensure that what you get
is determined by models rather than pragmatic code.
Regards
Ed Willink
On 23/06/2011 12:18, forums-noreply@eclipse.org wrote:
> Hi,
>
> I am using helper.getSyntaxHelp to get possible choices.
>
> OCL<?, EClassifier, ?, ?, ?, ?, ?, ?, ?, Constraint, EClass, EObject>
> ocl= OCL.newInstance(EcoreEnvironmentFactory.INSTANCE);
> OCLHelper<EClassifier, ?, ?, Constraint> helperC = ocl.createOCLHelper();
> helperC.setContext(modelPackage.getEClassifier(prmClass.getName()));
> List<Choice> syntaxHelp =
> helperC.getSyntaxHelp(ConstraintKind.INVARIANT, text);
>
> My problem is that if the expression is "self." then it shows the
> approperiate choices but if expression is "self.somproperty." it again
> shows the same choice as for "self." which is wrong it should show the
> choices related to "somproperty".
> Please help me!
>
> Warmest Regards,
> Khurram Shahzad
|
|
| | | |
Goto Forum:
Current Time: Fri Mar 29 01:09:01 GMT 2024
Powered by FUDForum. Page generated in 0.03940 seconds
|