Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Hovers on Keywords(Hovers on Keywords (Google Inject Exception when extending org.eclipse.xtext.xbase.ui.hover.XbaseHoverProvider)
icon5.gif  Hovers on Keywords [message #1725241] Wed, 02 March 2016 04:55 Go to next message
Arshad Adavani is currently offline Arshad AdavaniFriend
Messages: 163
Registered: July 2013
Location: Bangalore
Senior Member
Hi,

I am using Xtext version:2.4.3. I wanted to implement a hover based help. I referred to this link https://borisdevnotes.wordpress.com/2014/02/28/xtext-usability-hovers-on-keywords/ and have followed the same steps mentioned. The compilation fails and throws a google inject exception (infinite number of times). It occurs in the class which extends org.eclipse.xtext.xbase.ui.hover.XbaseHoverProvider

public class MyXbaseHoverProvider extends XbaseHoverProvider


Am I doing something wrong here?

Exception details:
Caused by: com.google.inject.internal.util.$ComputationException: com.google.inject.internal.util.$ComputationException: com.google.inject.internal.util.$ComputationException: 
.
.
.
com.google.inject.internal.util.$ComputationException: com.google.inject.internal.util.$ComputationException: java.lang.StackOverflowError
	at com.google.inject.internal.util.$MapMaker$StrategyImpl.compute(MapMaker.java:553)
	at com.google.inject.internal.util.$MapMaker$StrategyImpl.compute(MapMaker.java:419)
	at com.google.inject.internal.util.$CustomConcurrentHashMap$ComputingImpl.get(CustomConcurrentHashMap.java:2041)
	at com.google.inject.internal.FailableCache.get(FailableCache.java:50)
	at com.google.inject.internal.MembersInjectorStore.get(MembersInjectorStore.java:65)
	at com.google.inject.internal.ConstructorInjectorStore.createConstructor(ConstructorInjectorStore.java:73)
	at com.google.inject.internal.ConstructorInjectorStore.access$000(ConstructorInjectorStore.java:28)
	at com.google.inject.internal.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:36)
	at com.google.inject.internal.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:32)
	at com.google.inject.internal.FailableCache$1.apply(FailableCache.java:39)
	at com.google.inject.internal.util.$MapMaker$StrategyImpl.compute(MapMaker.java:549)
	... 508 more


Arshad
Re: Hovers on Keywords [message #1725246 is a reply to message #1725241] Wed, 02 March 2016 06:24 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
hi how did you implement the hover provider? what happens when you leave the class empty? can you share the part of the stack trace that does the actual overflow as well?

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Hovers on Keywords [message #1725317 is a reply to message #1725246] Wed, 02 March 2016 13:43 Go to previous messageGo to next message
Arshad Adavani is currently offline Arshad AdavaniFriend
Messages: 163
Registered: July 2013
Location: Bangalore
Senior Member
Hi Christian,

I have done exactly as mentioned in the link shared in the previous post. Added the same classes and have done the binding in the UiModule. As soon as i start the plugin, the exception starts printing on console from Activator. I also made MyXbaseHoverProvider empty and still the exception occurs.

Found a working solution:
Instead of extending XbaseHoverProvider as before, I extended DefaultEObjectHoverProvider and this seems to work and also provide the keyword hover functionality I required.

Thanks.



Arshad
Re: Hovers on Keywords [message #1725320 is a reply to message #1725317] Wed, 02 March 2016 13:51 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
do you use xbase or dont you?

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Hovers on Keywords [message #1725323 is a reply to message #1725320] Wed, 02 March 2016 14:09 Go to previous message
Arshad Adavani is currently offline Arshad AdavaniFriend
Messages: 163
Registered: July 2013
Location: Bangalore
Senior Member
Hi,
I use xbase for identifying the Keywords(XbaseDispatchingEObjectTextHover).
Since extending XbaseHoverProvider was throwing exceptions, I extended DefaultEObjectHoverProvider which is the parent class of XbaseHoverProvider.


Arshad
Previous Topic:Use Formatter1 in Xtext 2.9
Next Topic:I was wondering if its possible to make all my emf classes extends MyOwnEObject instead of EOBject
Goto Forum:
  


Current Time: Thu Apr 18 11:36:14 GMT 2024

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

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

Back to the top