Skip to main content


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 12:00 Go to next message
B RichardFriend
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 12:17 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
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


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Hover support and data type rules [message #1072165 is a reply to message #1071135] Mon, 22 July 2013 08:05 Go to previous messageGo to next message
B RichardFriend
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 16:43 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
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


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:about grammar again
Next Topic:Success stories and references for Xtext
Goto Forum:
  


Current Time: Thu Apr 18 16:57:07 GMT 2024

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

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

Back to the top