Bug 343607 - [APT] Improve output for javax.annotation.processing.Messager problems
Summary: [APT] Improve output for javax.annotation.processing.Messager problems
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.7   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 3.7 M7   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-21 14:10 EDT by Olivier Thomann CLA
Modified: 2011-04-27 05:43 EDT (History)
2 users (show)

See Also:


Attachments
Proposed fix (4.62 KB, patch)
2011-04-21 14:12 EDT, Olivier Thomann CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Thomann CLA 2011-04-21 14:10:50 EDT
The output for the messages is too verbose. Most of the time we don't have a compilation unit source to report error/warnings against.
This is used only for apt message reporting and is also related to bug 342600 where we could take advantage of a new info severity.
Comment 1 Olivier Thomann CLA 2011-04-21 14:12:01 EDT
Created attachment 193868 [details]
Proposed fix

annotation processing with message logging is required to check this.
Comment 2 Olivier Thomann CLA 2011-04-21 15:16:17 EDT
Released for 3.7M7
Comment 3 Satyam Kandula CLA 2011-04-26 04:55:37 EDT
The output message is definitely better now. However, APT messages that doesn't have the file name is being reported as Error instead of ERROR. Here is the message that shows up now. 
##########
1. ERROR in pkg\Test1.java (at line 8)
        int
        ^^^
Syntax error on token "int", delete this token
----------
2. Error: Annotation annots.annot1 should not be used
2 problems (2 errors)
############
Olivier, was there any specific reason for using Error instead of ERROR?
Comment 4 Olivier Thomann CLA 2011-04-26 08:15:31 EDT
(In reply to comment #3)
> Olivier, was there any specific reason for using Error instead of ERROR?
I wanted an easy way to distinguish between apt and compiler error reporting.
If you believe it is easier and more consistent to use ERROR all the time, it is trivial to change.
Comment 5 Satyam Kandula CLA 2011-04-26 08:40:37 EDT
I personally prefer to have a consistent message unless the difference is really useful. I leave the decision to you :)
Comment 6 Olivier Thomann CLA 2011-04-26 09:11:00 EDT
(In reply to comment #5)
> I personally prefer to have a consistent message unless the difference is
> really useful. I leave the decision to you :)
Fixed for next build. It will use ERROR in all cases now.
Comment 7 Srikanth Sankaran CLA 2011-04-27 05:43:09 EDT
Per comment# 3, this bug fix was already verified by Satyam
using build id: I20110421-1800 

Agree with the subsequent change to diagnostic string.