Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Hover when code isn't selected(How to create a hover that activates when the code is not selected?)
Hover when code isn't selected [message #1816137] Tue, 22 October 2019 05:32 Go to next message
Andrew Myers is currently offline Andrew MyersFriend
Messages: 14
Registered: October 2010
Junior Member
Hi,

In the Java Editor if I put my cursor over a class name I get a hover (if that's the right word?) like the one in the attached screen clipping.

The developer docs have an example for hover such as this:

https://help.eclipse.org/kepler/topic/org.eclipse.platform.doc.isv/guide/editors_hover.htm

But it requires the text to be selected first, rather than simply placing your mouse over the word.

In a plugin I'm writing, what do I need to do in order to replicate that behaviour (ie. the triggering of the hover by placing the mouse in a certain position - I understand I'll need to work what will be displayed when the cursor is in a particular position..).

Thanks,
Andrew.
Re: Hover when code isn't selected [message #1816171 is a reply to message #1816137] Wed, 23 October 2019 07:52 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 30635
Registered: July 2009
Senior Member
Probably it's good to look in the source code of some other thing that already does what you want. This tutorial describes how to get all the sources for the whole platform SDK in your workspace.

https://wiki.eclipse.org/Eclipse_Platform_SDK_Provisioning

Likely you'll only really need the JDT parts to see how the Java editor implements this.
Re: Hover when code isn't selected [message #1816221 is a reply to message #1816171] Thu, 24 October 2019 09:37 Go to previous message
Andrew Myers is currently offline Andrew MyersFriend
Messages: 14
Registered: October 2010
Junior Member
Thanks Ed
Previous Topic:No Colors in code window
Next Topic:Eclipse Mars.2 Display Issue
Goto Forum:
  


Current Time: Fri Nov 15 16:37:20 GMT 2019

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

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

Back to the top