Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 349312

Summary: [1.7][compiler] improved problem messages
Product: [Eclipse Project] JDT Reporter: Markus Keller <markus.kell.r>
Component: CoreAssignee: Ayushman Jain <amj87.iitr>
Status: VERIFIED FIXED QA Contact:
Severity: trivial    
Priority: P3 CC: jarthana, srikanth_sankaran
Version: 3.7   
Target Milestone: 3.7.1   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Patch
none
complete patch
none
patch for 1.5 warnings none

Description Markus Keller CLA 2011-06-14 08:55:42 EDT
Created attachment 197949 [details]
Patch

Here are some fixes that align the new compiler problem messages with the existing ones.

In the first 2 messages, the "s" at the end of "greater or equals" is wrong. I think "source level 1.7 or greater" is easier to understand. That formulation is also used in the JavaCore class' Javadocs.

Some older messages use "... are only available if source level is 1.5". These could also be changed to "1.5 or greater".
Comment 1 Srikanth Sankaran CLA 2011-06-14 10:03:46 EDT
Ayush, please follow up - Thanks.
Comment 2 Ayushman Jain CLA 2011-06-15 09:50:28 EDT
Created attachment 198022 [details]
complete patch
Comment 3 Ayushman Jain CLA 2011-06-15 10:00:43 EDT
Released in BETA_JAVA7 branch.
Comment 4 Jay Arthanareeswaran CLA 2011-06-28 01:22:02 EDT
Ayush, you seem to have missed out the 1.5 related messages.
Comment 5 Ayushman Jain CLA 2011-06-28 01:27:42 EDT
Oops. I'll change them
Comment 6 Ayushman Jain CLA 2011-06-28 02:40:24 EDT
Created attachment 198707 [details]
patch for 1.5 warnings
Comment 7 Ayushman Jain CLA 2011-06-28 15:34:41 EDT
Released.

Updated messages are
590 = Syntax error, type parameters are only available if source level is 1.5 or greater
591 = Syntax error, static imports are only available if source level is 1.5 or greater
592 = Syntax error, 'for each' statements are only available if source level is 1.5 or greater
593 = Syntax error, parameterized types are only available if source level is 1.5 or greater
594 = Syntax error, enum declarations are only available if source level is 1.5 or greater
595 = Syntax error, varargs are only available if source level is 1.5 or greater
596 = Syntax error, annotations are only available if source level is 1.5 or greater
597 = Syntax error, annotation declarations are only available if source level is 1.5 or greater
Comment 8 Jay Arthanareeswaran CLA 2011-06-29 05:49:02 EDT
Verified.