Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Change Default size of hover
Change Default size of hover [message #842356] Thu, 12 April 2012 08:13 Go to next message
Andreas Graf is currently offline Andreas GrafFriend
Messages: 211
Registered: July 2009
Senior Member
Dear all,

is it possible to change the size of the hover that Xtext provides? In our project, we are presenting quite some information in the hover, and it is somewhat awkward that the user has to focus the hover to see all information by scrolling.

Optimal would be adjusting the size to the information that is displayed, alternatively changing the fixed size would be OK.

Thanks,

Andreas
Re: Change Default size of hover [message #842398 is a reply to message #842356] Thu, 12 April 2012 08:57 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14669
Registered: July 2009
Senior Member
Did you try to customize AbstractHover.getHoverControlCreator

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Change Default size of hover [message #842411 is a reply to message #842398] Thu, 12 April 2012 09:14 Go to previous messageGo to next message
Andreas Graf is currently offline Andreas GrafFriend
Messages: 211
Registered: July 2009
Senior Member
I am not quite sure where to put the size there. Should I implement my own getHoverControlCreator() and my own implementaion of DefaultInformationControl?
Re: Change Default size of hover [message #842425 is a reply to message #842411] Thu, 12 April 2012 09:28 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14669
Registered: July 2009
Senior Member
Hi the DefaultInformationControl may already have size properties you
can customize I guess. But for details you should have a look into
the code yourself. Subclassing DispatchingEObjectTextHover should be
done in minutes.


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Change Default size of hover [message #901294 is a reply to message #842425] Fri, 10 August 2012 16:19 Go to previous messageGo to next message
Dobes Vandermeer is currently offline Dobes VandermeerFriend
Messages: 26
Registered: July 2009
Junior Member
There seems to be a bug in the eclipse hover control where it doesn't calculate the size of <pre> blocks properly. There are probably some other cases it doesn't handle well either.

To see this try creating a java file and use a <pre> block in your javadocs, then hover over the element to see what your <pre> block looks like. For me at least, with eclipse juno on Windows 7, the hover popup is too small.
Re: Change Default size of hover [message #901295 is a reply to message #901294] Fri, 10 August 2012 16:20 Go to previous message
Dobes Vandermeer is currently offline Dobes VandermeerFriend
Messages: 26
Registered: July 2009
Junior Member
... thus the workaround here is to avoid using markup like <pre> that screws up the size calculations ...
Previous Topic:Register variables in xtext block of code
Next Topic:Content assist and validation
Goto Forum:
  


Current Time: Fri Apr 26 21:59:50 GMT 2024

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

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

Back to the top