Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » How to highlight a specific line in the Java Editor?
How to highlight a specific line in the Java Editor? [message #173112] Thu, 12 August 2004 11:15 Go to next message
Eclipse UserFriend
Originally posted by: emma_shepherd.tesco.net

Hi,

I would like to programmatically highlight a particular line of code
(specified by the line number) in the Java Editor. I have been trying to
make use of the JavaUI.revealInEditor method, but unfortunately this only
takes an IJavaElement as input, not a line number.

Any ideas??

Thanks in advance,
Emma :)
Re: How to highlight a specific line in the Java Editor? [message #173764 is a reply to message #173112] Wed, 18 August 2004 04:04 Go to previous message
Eclipse UserFriend
Originally posted by: daniel.megert.gmx.net

Emma wrote:

>Hi,
>
>I would like to programmatically highlight a particular line of code
>(specified by the line number) in the Java Editor. I have been trying to
>make use of the JavaUI.revealInEditor method, but unfortunately this only
>takes an IJavaElement as input, not a line number.
>
>
If you have the line number you can get the offset and length of that
line. To highlight the line you can then for example use annotations or
a text presentation listener.

Dani

>Any ideas??
>
>Thanks in advance,
>Emma :)
>
>
>
Previous Topic:Refactoring preferences - where are they?
Next Topic:Logging programmer activity while editing
Goto Forum:
  


Current Time: Thu Nov 06 14:55:10 EST 2025

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

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

Back to the top