OCL Content Assit helper.getSyntaxHelp [message #687842] |
Thu, 23 June 2011 07:18  |
Eclipse User |
|
|
|
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 11:56   |
Eclipse User |
|
|
|
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
|
|
|
|
|
Re: OCL Content Assit helper.getSyntaxHelp [message #690380 is a reply to message #688043] |
Wed, 29 June 2011 08:56  |
Eclipse User |
|
|
|
Hi,
Actaully i am creating an application where user can create probalistic OCL enriched meta models and user can create concrete models from that meta model.
I would really appreciate Eclipse community for keeping OCL complete support.
thanks!
|
|
|
Powered by
FUDForum. Page generated in 0.28063 seconds