Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Editing the description of an attribute(customizing these yellow boxes)
Editing the description of an attribute [message #1061387] Fri, 31 May 2013 12:22 Go to next message
Liroth Lustim is currently offline Liroth LustimFriend
Messages: 14
Registered: May 2013
Junior Member
Hello,

I want to add some descriptions to my DSL like what is expected next or what the specific attribute does. If I move my courser over some elements a yellow box appears in Eclipse. How do I change the text in it ?

Example:
/** description for an Item */
Item: name = ID ;

I get a customized description in the xtext file for Item, but I can't do the same for the attribute name. Also I want these descriptions shown in other files like the validator or in my runtime-environment but ther is only the text "If the meaning of the '' attribute isn't clear, there really should be more of a description here... "

My google searches only got me into scoping, formating and quickfixes.
Re: Editing the description of an attribute [message #1061388 is a reply to message #1061387] Fri, 31 May 2013 12:24 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Hmmm do you mean http://christiandietrich.wordpress.com/2011/07/16/hover-support-in-xtext-2-0-tutorial/

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Editing the description of an attribute [message #1061419 is a reply to message #1061388] Fri, 31 May 2013 14:24 Go to previous messageGo to next message
Liroth Lustim is currently offline Liroth LustimFriend
Messages: 14
Registered: May 2013
Junior Member
Hello Christian,

Thanks this is a step in the right direction. I didn't thought of the word "hover".
But I want to have these boxes on many different places.
If I use the proposal provider there should be an explanation how to use this keyword in a yellow box right of the proposal list.
If I hover over the keyword ther should be this explanation too.
If I access this object or attribute in the language definition environment, like in the validator I want to have the same descriptions too.
If I write a line in my DSL which has many attributes to be assigned I want a box near the courser describing what the user has to write.
Re: Editing the description of an attribute [message #1061442 is a reply to message #1061419] Fri, 31 May 2013 16:02 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Hi,

i fear you have to customize a lot of stuff (yourself). you may digg into the corresponding code e.g.
the hover is by default only shown for the name attribute aka significant region.
digg into
- AdditionalProposalInfo in ConfigurableCompletionProposal
- DefaultEObjectHoverProvider
- org.eclipse.xtext.ui.editor.hover.AbstractEObjectHover.getXtextElementAt(XtextResource, int)

And others


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:Plans for handling of TypeScript syntax?
Next Topic:Bug in commons.types???
Goto Forum:
  


Current Time: Fri Apr 26 00:29:43 GMT 2024

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

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

Back to the top