Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » OCL » Content Assist in Xtext OCL Console
Content Assist in Xtext OCL Console [message #1077845] Fri, 02 August 2013 08:13 Go to next message
ModelGeek Mising name is currently offline ModelGeek Mising nameFriend
Messages: 550
Registered: June 2011
Senior Member
Hi,

I am using xtext 2.4.2 in my eclipse and when i use xtext OCL console then content assist is not as powerful as in interactive OCL console. For example content assist is not available for "." and "->" and even when "ctrl+space" is used the options in intellisence is not as complete as in interactive ocl console.


Do you have any clue why is that?

Regards,
Re: Content Assist in Xtext OCL Console [message #1077867 is a reply to message #1077845] Fri, 02 August 2013 08:42 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

That is just not true. Content assist is available

e.g."self." ctrl+space gives me a lot of options.

Regards

Ed Willink

On 02/08/2013 09:13, ModelGeek Mising name wrote:
> Hi,
>
> I am using xtext 2.4.2 in my eclipse and when i use xtext OCL console
> then content assist is not as powerful as in interactive OCL console.
> For example content assist is not available for "." and "->" and even
> when "ctrl+space" is used the options in intellisence is not as
> complete as in interactive ocl console.
>
>
> Do you have any clue why is that?
>
> Regards,
>
Re: Content Assist in Xtext OCL Console [message #1077877 is a reply to message #1077867] Fri, 02 August 2013 08:59 Go to previous messageGo to next message
ModelGeek Mising name is currently offline ModelGeek Mising nameFriend
Messages: 550
Registered: June 2011
Senior Member
May be i did not explain my question properly..

I mean normally "." and "->" invokes content assist in interactive OCL Console but in xtext OCL console user has to press "Ctrl + space" invoke content assist. But this not a major problem... so we forget this point.

The major problem is options avaialble in content assist
"let x : Set(Integer) = Set{10,20,30} in x->" use this OCL in first interactive OCL console, you will see all available collection operations are available as option. Use the same OCL in xtext OCL console and check options list, collection operations are not available for me.

regards,
Re: Content Assist in Xtext OCL Console [message #1077915 is a reply to message #1077877] Fri, 02 August 2013 09:58 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

Auto-Ctrl+Space is not yet provided by Xtext. Please raise a bug against
Xtext. (If you try Ctrl+space in Xtext itself, it is dreadful for keywords.)

Missing collection operations; Thanks. Please raise an OCL Bugzilla.

Regards

Ed Willink

On 02/08/2013 09:59, ModelGeek Mising name wrote:
> May be i did not explain my question properly..
>
> I mean normally "." and "->" invokes content assist in interactive OCL
> Console but in xtext OCL console user has to press "Ctrl + space"
> invoke content assist. But this not a major problem... so we forget
> this point.
>
> The major problem is options avaialble in content assist
> "let x : Set(Integer) = Set{10,20,30} in x->" use this OCL in first
> interactive OCL console, you will see all available collection
> operations are available as option. Use the same OCL in xtext OCL
> console and check options list, collection operations are not
> available for me.
>
> regards,
>
Re: Content Assist in Xtext OCL Console [message #1078360 is a reply to message #1077915] Fri, 02 August 2013 23:01 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Hi Ed,
In certain cases Xtext allows Content Assist Auto Activation
http://christiandietrich.wordpress.com/2011/09/19/xtext-content-assist-auto-activation/


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Content Assist in Xtext OCL Console [message #1078672 is a reply to message #1078360] Sat, 03 August 2013 10:47 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

Thanks. I've added a comment with the Fragment syntax variation.

Regards

Ed Willink


On 03/08/2013 00:01, Christian Dietrich wrote:
> Hi Ed,
> In certain cases Xtext allows Content Assist Auto Activation
> http://christiandietrich.wordpress.com/2011/09/19/xtext-content-assist-auto-activation/
>
Re: Content Assist in Xtext OCL Console [message #1078679 is a reply to message #1077877] Sat, 03 August 2013 11:00 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

Thanks to Christian this is now fixed on my workstation.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=414355

should show availability in an N-build in a few days.

Regards

Ed Willink

On 02/08/2013 09:59, ModelGeek Mising name wrote:
> I mean normally "." and "->" invokes content assist in interactive OCL
> Console but in xtext OCL console user has to press "Ctrl + space"
> invoke content assist. But this not a major problem... so we forget
> this point.
Re: Content Assist in Xtext OCL Console [message #1085023 is a reply to message #1078679] Mon, 12 August 2013 10:53 Go to previous messageGo to next message
ModelGeek Mising name is currently offline ModelGeek Mising nameFriend
Messages: 550
Registered: June 2011
Senior Member
I raised a bug (414286 - Content assist, Missing collection operations in XText OCL Console) and it is still showing Unconfirmed status.

will it be solved in any upcoming N-build?

Regards,
Re: Content Assist in Xtext OCL Console [message #1085220 is a reply to message #1085023] Mon, 12 August 2013 15:56 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

Sorry. Unlikely. I have more important challenges to deal with. So long
as the Bugzilla remains open it reminds me of one of the many things I
need to do.

Regards

Ed Willink


On 12/08/2013 11:53, ModelGeek Mising name wrote:
> I raised a bug (414286 - Content assist, Missing collection operations
> in XText OCL Console) and it is still showing Unconfirmed status.
>
> will it be solved in any upcoming N-build?
>
> Regards,
>
Re: Content Assist in Xtext OCL Console [message #1085655 is a reply to message #1085220] Tue, 13 August 2013 07:24 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 understand.

if you please guide me how those missing collection operations can be added then i might try to add them myself.

thanks!

Regards,
Re: Content Assist in Xtext OCL Console [message #1085700 is a reply to message #1085655] Tue, 13 August 2013 08:42 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

It's a difficult area, since OCL "." and "->" operators are rather
'versatile' and so have too much manual pragmatism. They will pose
challenges as we move to a more model-defined resolution.

There are a variety of XXXAttribution classes whose computeLookup method
contributes candidate names to an Environment view.

The problem is that one of them lacks the implicit object/collection
conversions while looking up. The conversion must be occurring ok elsewhere.

I really don't recommend trying to understand it.

Regards

Ed Willink


On 13/08/2013 08:24, ModelGeek Mising name wrote:
> Yes i understand.
>
> if you please guide me how those missing collection operations can be
> added then i might try to add them myself.
>
> thanks!
>
> Regards,
Re: Content Assist in Xtext OCL Console [message #1092999 is a reply to message #1085700] Fri, 23 August 2013 12:23 Go to previous messageGo to next message
ModelGeek Mising name is currently offline ModelGeek Mising nameFriend
Messages: 550
Registered: June 2011
Senior Member
Essential OCL UI plugin contains different files related to content assist like
org.eclipse.ocl.examples.xtext.essentialocl.ui.contentassist.AbstractEssentialOCLProposalProvider
org.eclipse.ocl.examples.xtext.essentialocl.ui.contentassist.EssentialOCLProposalProvider
org.eclipse.ocl.examples.xtext.essentialocl.ui.contentassist.antlr.EssentialOCLParser

what are the roles of these classes in content assist? can you please give me some hints how to do it. I can give it a try as i have done changes in standard ocl library and it works fine. Now i need to use xtext editors to have content assist.

thanks for assistance!
Re: Content Assist in Xtext OCL Console [message #1093000 is a reply to message #1085700] Fri, 23 August 2013 12:23 Go to previous messageGo to next message
ModelGeek Mising name is currently offline ModelGeek Mising nameFriend
Messages: 550
Registered: June 2011
Senior Member
Essential OCL UI plugin contains different files related to content assist like
org.eclipse.ocl.examples.xtext.essentialocl.ui.contentassist.AbstractEssentialOCLProposalProvider
org.eclipse.ocl.examples.xtext.essentialocl.ui.contentassist.EssentialOCLProposalProvider
org.eclipse.ocl.examples.xtext.essentialocl.ui.contentassist.antlr.EssentialOCLParser

what are the roles of these classes in content assist? can you please give me some hints how to do it. I can give it a try as i have done changes in standard ocl library and it works fine. Now i need to use xtext editors to have content assist.

thanks for assistance!
Re: Content Assist in Xtext OCL Console [message #1093016 is a reply to message #1093000] Fri, 23 August 2013 12:54 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

The files you mention are all generated/seeded by Xtext and normally
only need changing when the defaul Xtext behaviour needs augmenting.

Never even look at anything with "antlr" in the name.

AbstractEssentialOCLProposalProvider is in src-gen,. so only ever edit
it for quick experiments.

EssentialOCLProposalProvider is in src and so provides the place to
customize AbstractEssentialOCLProposalProvider.

You will see that OCLstdlibProposalProvider inherits from
AbsdtractOCLstdlibProposalProvider which inherits from
EssentialOCLProposalProvider, so a fix for Essential OCL tends to make
all OCL-based editors better.

I was looking at https://bugs.eclipse.org/bugs/show_bug.cgi?id=414286
last night and was totally unable to reproduce it. For collections I see
size() and select() although perhaps "select" is lower down because of
the separate Operation/Iteration grouping.

However when I added a JUnit test to
/org.eclipse.ocl.examples.xtext.tests/src/org/eclipse/ocl/examples/test/xtext/CompletionProposalTests.java
to prove it, that threw up different strange behaviours that need
investigating.

Regards

Ed Willink


On 23/08/2013 13:23, ModelGeek Mising name wrote:
> Essential OCL UI plugin contains different files related to content
> assist like
> org.eclipse.ocl.examples.xtext.essentialocl.ui.contentassist.AbstractEssentialOCLProposalProvider
>
> org.eclipse.ocl.examples.xtext.essentialocl.ui.contentassist.EssentialOCLProposalProvider
>
> org.eclipse.ocl.examples.xtext.essentialocl.ui.contentassist.antlr.EssentialOCLParser
>
>
> what are the roles of these classes in content assist? can you please
> give me some hints how to do it. I can give it a try as i have done
> changes in standard ocl library and it works fine. Now i need to use
> xtext editors to have content assist.
>
> thanks for assistance!
Previous Topic:Eclipse OCL
Next Topic:ocl strange behavior!
Goto Forum:
  


Current Time: Tue Apr 23 09:33:05 GMT 2024

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

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

Back to the top