Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Hover support and data type rules(Hover doesn't seem to work on non-string data type rules)
Hover support and data type rules [message #1071127] Fri, 19 July 2013 08:00 Go to next message
B Richard
Messages: 6
Registered: March 2013
Junior Member
Hello,

I'm currently working on my first DSL, and I wanted to add some hover support. It works nicely, but it doesn't seem to work on data type rules.

Here's an example that doesn't work (even with a value converter for "SignedInt"):

SignedInt returns ecore::EInt:
    '-'? INT
;

SomeRule:
    'Something' name = SignedInt
;

And here's something that works:

SignedInt:
    '-'? INT
;

SomeRule:
    'Something' name = SignedInt
;

However, having an ecore::EString data type rule works (hover supported). Is it intended, or am I doing something wrong?
Re: Hover support and data type rules [message #1071135 is a reply to message #1071127] Fri, 19 July 2013 08:17 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian Dietrich
Messages: 6136
Registered: July 2009
Senior Member
Hi,

you may debug into org.eclipse.xtext.ui.editor.hover.html.DefaultEObjectHoverProvider.hasHover(EObject)
so see what is your problem
Re: Hover support and data type rules [message #1072165 is a reply to message #1071135] Mon, 22 July 2013 04:05 Go to previous messageGo to next message
B Richard
Messages: 6
Registered: March 2013
Junior Member
Thank you for your answer Christian, it helped me find the problem, which was linked to my QualifiedNameProvider. I'm still not sure why it didn't work with data type rules, but it's now fixed.
Re: Hover support and data type rules [message #1072384 is a reply to message #1072165] Mon, 22 July 2013 12:43 Go to previous message
Christian Dietrich is currently offline Christian Dietrich
Messages: 6136
Registered: July 2009
Senior Member
Hi the default nameprovider looks for an attribute named 'name' of
type String which will not be found if the type is int

--
Need training, onsite consulting or any other kind of help for Xtext?
Go visit http://xtext.itemis.com or send a mail to xtext at itemis dot de
Previous Topic:about grammar again
Next Topic:Success stories and references for Xtext
Goto Forum:
  


Current Time: Mon Jul 28 12:32:19 EDT 2014

Powered by FUDForum. Page generated in 0.02480 seconds