Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » OCL » OCL Content Assit helper.getSyntaxHelp
OCL Content Assit helper.getSyntaxHelp [message #687842] Thu, 23 June 2011 11:18 Go to next message
ModelGeek Mising name is currently offline ModelGeek Mising nameFriend
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 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
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
Re: OCL Content Assit helper.getSyntaxHelp [message #688015 is a reply to message #687992] Thu, 23 June 2011 17:27 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 developing a standalone application and i am using syntaxHelp in it and i have solved the poblem as well and i would like Eclipse to keep it as there will be many people like me using syntaxHelp.

Warmest Regards,
Re: OCL Content Assit helper.getSyntaxHelp [message #688043 is a reply to message #688015] Thu, 23 June 2011 18:47 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

It would help to understand more of your application context, so that we
can try to support it.

Why do you have a programmatic requirement to complete OCL?

Regards

Ed Willink


On 23/06/2011 18:27, forums-noreply@eclipse.org wrote:
> Hi,
>
> i am developing a standalone application and i am using syntaxHelp in
> it and i have solved the poblem as well and i would like Eclipse to
> keep it as there will be many people like me using syntaxHelp.
>
> Warmest Regards,
>
Re: OCL Content Assit helper.getSyntaxHelp [message #690380 is a reply to message #688043] Wed, 29 June 2011 12:56 Go to previous message
ModelGeek Mising name is currently offline ModelGeek Mising nameFriend
Messages: 550
Registered: June 2011
Senior Member
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!
Previous Topic:[Announce] Final Eclipse OCL 3.1.0 (Indigo Release) is now available
Next Topic: Constraints with eCore and OCL
Goto Forum:
  


Current Time: Fri Mar 29 01:09:01 GMT 2024

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

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

Back to the top