| [news.eclipse.tools.jdt] Re: Question on Marker use (APT vs. JavaModel) |
"Mike Yawn" <myawn@xxxxxxxx> wrote in message news:46E08EB3.3030008@xxxxxxxxxxxComing back into this after some time -- this is working great for the case where the user modifies the file and then saves it. But if the user has unsaved changes that result in problems, there problems are visible in the editor, but are not seen in either the Problems view or via the IResource.findMarkers() API.Well, I decided to dump out the contents of the 'getAttributes()' map to see if that was of any use, and it turns out to have the arguments I was trying to get from IProblem.
So just to document this for anyone else [...]
Yes, that seems like the right approach. Problems are a JDT construct built upon Markers; APT Problems (or more generally problems contributed by CompilationParticipants) are a subset of JDT Problems.
In a perfect world this would probably be available as a public API exposed either from JDT as part of the set of interfaces related to CompilationParticipant, or from APT as part of the fixableError() interface. I think it would be reasonable, if you'd like, to submit such an enhancement request.
Mike