Bug 343607

Summary: [APT] Improve output for javax.annotation.processing.Messager problems
Product: [Eclipse Project] JDT Reporter: Olivier Thomann <Olivier_Thomann>
Component: CoreAssignee: Olivier Thomann <Olivier_Thomann>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: satyam.kandula, srikanth_sankaran
Version: 3.7   
Target Milestone: 3.7 M7   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Proposed fix none

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.