Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 07:28 Go to next message
Fabrice Marcelin is currently offline Fabrice MarcelinFriend
Messages: 15
Registered: February 2011
Location: USA
Junior Member

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 11:35 Go to previous messageGo to next message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
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 13:06 Go to previous message
Satyam Kandula is currently offline Satyam KandulaFriend
Messages: 444
Registered: July 2009
Senior Member
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: Thu Mar 28 21:29:29 GMT 2024

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

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

Back to the top