Hi everyone!
I got many ideas from previous question (http://stackoverflow.com/questions/3178996/how-to-display-an-error-sign-on-the-package-when-the-package-has-wrong-informatio)
But the Problem Marker is not displayed.
My interested resource is XML file.
So I add listener for PRE_BUILD means using following code.
addResourceChangedListener(xxx, IResourceChangeEvent.PRE_BUILD)
It works fine So.. Now I can try to add Problem Marker.
IMarker marker = file.createMarker(PROBLEM_ID);
marker.setAttribute(IMarker.SEVERITY, IMarker.SEVERITY_ERROR); marker.setAttribute(IMarker.MESSAGE, "Error Message"); marker.setAttribute(IMarker.CHAR_START, 5); marker.setAttribute(IMarker.CHAR_END, 6); marker.setAttribute(IMarker.LINE_NUMBER, 5);
Above code is executed. But the Problem Marker is not displayed on the EDITOR and PROBLEM VIEW. How can I show the Problem Marker properly?