| [news.eclipse.tools.jdt] Re: Question on Marker use (APT vs. JavaModel) |
"Mike Yawn" <myawn@xxxxxxxx> wrote in message news:fbpcnd$4qj$1@xxxxxxxxxxxxxxxxxxxxYou're right; I was thinking they must be visible since the problems view shows them. I think I was trying to see them as I typed; they don't actually become visible to the Problems view (or in my action code until I save the file after making the edit that results in the error.Question 1: Is there a way to retrieve the markers created by EclipseMessager.printFixableError starting from an ICompilationUnit?
Hmm. It must be possible to pull them off the resource in some way; after all, the JDT Problems view manages to do so. In my experience the challenge is to tell them apart from the other JDT compilation problem markers.
Take a look at AbstractImageBuilder.storeProblemsFor(), and IncrementalImageBuilder.updateProblemsFor(), in org.eclipse.jdt.internal.core.builder; and at APTProblem.getMarkerType(), in org.eclipse.jdt.apt.core.internal.env.
Mike