Coding man
Coding man

Reputation: 967

Display "red-x"-like icon in eclipse plugin

We are developing a plugin to provide suggestions to developers in their code and we want to highlight it with the help of an icon (similar to the red-x error icon in the image below). What is best to achieve it? enter image description here

Upvotes: 1

Views: 53

Answers (1)

greg-449
greg-449

Reputation: 111142

This is a resource marker which you create with something like:

IMarker marker = resource.createMarker(IMarker.PROBLEM);

marker.setAttribute(IMarker.LINE_NUMBER, lineNumber);
// TODO more attributes

where resource is the IFile (or IResource).

Upvotes: 2

Related Questions