Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » How to Collect Java Program Information After Compilation
How to Collect Java Program Information After Compilation [message #776371] Sun, 08 January 2012 02:28 Go to next message
Eclipse UserFriend
Hi there,

I have been looking for ways to get information i.e type hierarchy, declarations, references anytime a code has finished building and so far I was not satisfied. I want to collect all warnings, and errors (in another words compilation report), so I implemented an IResourceChangeListener and played with the ResourceDelta in order to get the messages from an IMarker. It works perfectly, however I realized the message is just returning a string. So my question is, how do I do in order to get the type/reference of the object where the error is, what type of error, what class it should belongs to and all available info. I really do not want a simple string. Do I need to tap to the compiler and if so how would I do that?
Any idea is greatly appreciated.

Best,
Re: How to Collect Java Program Information After Compilation [message #776853 is a reply to message #776371] Mon, 09 January 2012 06:35 Go to previous messageGo to next message
Eclipse UserFriend
On 08.01.2012 08:28, Missing name Mising name wrote:
> Hi there,
> I have been looking for ways to get information i.e type hierarchy,
> declarations, references anytime a code has finished building and so
> far I was not satisfied. I want to collect all warnings, and errors
> (in another words compilation report), so I implemented an
> IResourceChangeListener and played with the ResourceDelta in order to
> get the messages from an IMarker. It works perfectly, however I
> realized the message is just returning a string. So my question is,
> how do I do in order to get the type/reference of the object where the
> error is, what type of error, what class it should belongs to and all
> available info. I really do not want a simple string. Do I need to tap
> to the compiler and if so how would I do that?
> Any idea is greatly appreciated.
Take a look at org.eclipse.jdt.core.IElementChangedListener.

Dani
>
> Best,
Re: How to Collect Java Program Information After Compilation [message #776883 is a reply to message #776853] Mon, 09 January 2012 08:06 Go to previous message
Eclipse UserFriend
IMarker#getAttribute(IJavaModelMarker.ID, -1) could give you the problem id - a number pointing to the error mentioned in org.eclipse.jdt.core.compiler.IProblem.TypeMismatch.
Previous Topic:getStartPosition 'ignoring' JavaDoc
Next Topic:Subclipse Update?
Goto Forum:
  


Current Time: Sat May 24 08:14:50 EDT 2025

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

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

Back to the top