Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Content Assist
Content Assist [message #698352] Tue, 19 July 2011 10:14 Go to next message
adrian  is currently offline adrian Friend
Messages: 93
Registered: August 2009
Member
Hi ,
I have a problem in the content assist that s work for me in simple models but in the complex models it doesn t work .
For example in the model below the content assist for the first block works fine
but the blocks inside the first block nothing works
Any idea how I can debug to know where the problem came from ?
if ( ( [ this ] . ${fieldName} ) == null )
Block
{
if ( this_ . getObjMode ( ) . equalsIgnoreCase ( IBusinessObject.DAO_MODE ) )
Block
{
return null;
}
else
Block
{
Block
{
[ this ] . ${fieldName} = new ${assoType} ( );
( [ this ] . ${fieldName} ) . setObjMode ( getObjMode ( ) );
return [ this ] . ${fieldName};
}
}
}
Re: Content Assist [message #698355 is a reply to message #698352] Tue, 19 July 2011 10:23 Go to previous messageGo to next message
Alexander Nittka is currently offline Alexander NittkaFriend
Messages: 1193
Registered: July 2009
Senior Member
Hi,

did you adapt the content assist or does the out-of-the-box content assist does not work as expected?
In case you adapted content assist the entry point for debugging is the complete-method you implemented and which you expect to be used. If it is not called at all, a common problem is that you specified a type for the context object and the type used by the framework is a different one. Replace the specific type by EObject (with a type check and cast to the specific type used previously) and see if the method is called now.

This is as specific as I can get with the given information.

Alex


Need training, onsite consulting or any other kind of help for Xtext?
Go visit http://xtext.itemis.com or send a mail to xtext@itemis.de
Re: Content Assist [message #698360 is a reply to message #698355] Tue, 19 July 2011 10:37 Go to previous messageGo to next message
adrian  is currently offline adrian Friend
Messages: 93
Registered: August 2009
Member
Yes I adapt the content assist for some rules and that s works fine in general but in some cases when I have a deep tree like if inside another that seems not working
Re: Content Assist [message #698450 is a reply to message #698360] Tue, 19 July 2011 13:46 Go to previous messageGo to next message
adrian  is currently offline adrian Friend
Messages: 93
Registered: August 2009
Member
Any idea ??
Re: Content Assist [message #698453 is a reply to message #698450] Tue, 19 July 2011 13:53 Go to previous messageGo to next message
Alexander Nittka is currently offline Alexander NittkaFriend
Messages: 1193
Registered: July 2009
Senior Member
Well,

everything I can suggest is alreadyas described in my first post. Debug whether the methods you expect to be called, are called, check whether the context element is as expected.

Alex


Need training, onsite consulting or any other kind of help for Xtext?
Go visit http://xtext.itemis.com or send a mail to xtext@itemis.de
Re: Content Assist [message #698745 is a reply to message #698453] Wed, 20 July 2011 07:11 Go to previous messageGo to next message
adrian  is currently offline adrian Friend
Messages: 93
Registered: August 2009
Member
Hi Alexander,
I didnt understand well your proposal
I used the same grammar with the same content assists in an another eclpise with xtext 2.0.0 and that's works fine but for now I still work with 1.0.0
Is that a bug ? if so is there a way to solve it without migrating to 2.0.0 ?
Re: Content Assist [message #698747 is a reply to message #698745] Wed, 20 July 2011 07:19 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14664
Registered: July 2009
Senior Member
Hi,

we have such "nothing works" situations too - there might be bugs on this in Xtext 1.0.x - migrating to 2.0.0 helped us.

~Christian


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Content Assist [message #698752 is a reply to message #698747] Wed, 20 July 2011 07:26 Go to previous messageGo to next message
adrian  is currently offline adrian Friend
Messages: 93
Registered: August 2009
Member
Hi Christian,
Is there a way to install xtext 2.0.0 in the same eclispe where installed 1.0.0
I uninstalled 1.0.0 and try to install 2.0.0 but I have an error that there still an older version of xtext installed
any idea ??
Re: Content Assist [message #698759 is a reply to message #698752] Wed, 20 July 2011 07:40 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14664
Registered: July 2009
Senior Member
Hi,

did you try to uninstall xtext 1.0.x

however if you are stuck to 1.0.x
you could try to make your grammar "less" ambigous
to get ca working again.

~Christian


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Content Assist [message #698762 is a reply to message #698759] Wed, 20 July 2011 07:45 Go to previous messageGo to next message
adrian  is currently offline adrian Friend
Messages: 93
Registered: August 2009
Member
No Message Body
Re: Content Assist [message #698764 is a reply to message #698762] Wed, 20 July 2011 07:48 Go to previous messageGo to next message
adrian  is currently offline adrian Friend
Messages: 93
Registered: August 2009
Member
Yes I unistall xtext 1.0.0 but when I try the install 2.0.0 I have this error althought there still no xtext in my plugins!!
Your original request has been modified.
"Xbase" is already installed, so an update will be performed instead.
"Xtext Documentation" is already installed, so an update will be performed instead.
"Xtext Examples" is already installed, so an update will be performed instead.
"Xtext Runtime" is already installed, so an update will be performed instead.
"Xtext SDK" is already installed, so an update will be performed instead.
"Xtext UI" is already installed, so an update will be performed instead.
Cannot complete the install because of a conflicting dependency.
Software being installed: Xtext SDK 2.0.0.v201106060900 (org.eclipse.xtext.sdk.feature.group 2.0.0.v201106060900)
Software currently installed: MWE UI 1.0.0.v201006080431 (org.eclipse.emf.mwe.ui.feature.group 1.0.0.v201006080431)
Only one of the following can be installed at once:
MWE Simple Editor 1.0.0.v201006080431 (org.eclipse.emf.mwe.ui.simpleEditor 1.0.0.v201006080431)
MWE Simple Editor (Incubation) 0.7.0.v200908120417 (org.eclipse.emf.mwe.ui.simpleEditor 0.7.0.v200908120417)
MWE Simple Editor 1.1.0.v201106060409 (org.eclipse.emf.mwe.ui.simpleEditor 1.1.0.v201106060409)
Cannot satisfy dependency:
From: MWE UI 1.0.0.v201006080431 (org.eclipse.emf.mwe.ui.feature.group 1.0.0.v201006080431)
To: org.eclipse.emf.mwe.ui.simpleEditor [1.0.0.v201006080431]
Cannot satisfy dependency:
From: Xtext SDK 2.0.0.v201106060900 (org.eclipse.xtext.sdk.feature.group 2.0.0.v201106060900)
To: org.eclipse.emf.mwe.ui.simpleEditor [1.1.0,1.2.0)
Re: Content Assist [message #698768 is a reply to message #698764] Wed, 20 July 2011 07:50 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14664
Registered: July 2009
Senior Member
What about updateing mwe and xpand first?

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:Diagnosing a performance issue
Next Topic:problem with pom.xml for my xtext example project
Goto Forum:
  


Current Time: Tue Apr 16 10:44:55 GMT 2024

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

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

Back to the top