Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Change background for a given IJavaElement
Change background for a given IJavaElement [message #723053] Wed, 07 September 2011 14:14
Eclipse UserFriend
Hi, I would like to programmatically mark a given IJavaElement with a specific background color. Which is the best way to do it?

I can open the editor corresponding to the element:

editorPart = JavaUI.openInEditor(elementToShow);
									if (editorPart != null)
										JavaUI.revealInEditor(editorPart, elementToShow);


and find start and end position of the element inside the editor:

int startCol = element.getColumnNumber(0);
int startLine = element.getLineNumber(0);
int endCol = element.getColumnNumber(cu.getLength()-1);
int endLine = element.getLineNumber(cu.getLength()-1);


but then I am stuck...
Previous Topic:Eclipse Error - org/apache/log4j/net/JMSSink
Next Topic:Name missing for incoming changes within Synch view
Goto Forum:
  


Current Time: Wed Feb 12 05:35:45 GMT 2025

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

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

Back to the top