Bug 70932

Summary: [1.5] Code formatter doesn't work when using generics
Product: [Eclipse Project] JDT Reporter: Laurens Berthold <lberthold>
Component: CoreAssignee: Olivier Thomann <Olivier_Thomann>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P3    
Version: 3.0   
Target Milestone: 3.1 M1   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Laurens Berthold CLA 2004-07-27 16:17:46 EDT
The code formatter (Source->Format) doesn't do anything when the code contains 
any of the recently (JDK 1.5) introduced generics. See this example:

public class Test {
    /*public static void confuse() {
       java.util.List<String> l;
    }*/
    public static void test() {
        for (int i=0;i<10;i++) { }
    }
}

The formatter works fine unless the method confuse() is uncommented, in which 
case the code formatter doesn't do anything. The "Compiler compliance level" in 
the preferences is set to 1.5 and the code can be compiled and executed. This 
happened using the JDK 1.5 Beta 2.
Comment 1 Olivier Thomann CLA 2004-07-28 10:37:51 EDT
This should be fixed if you use the latest 3.1 integration build. Could you
please give it a try?
Thanks.
Comment 2 Laurens Berthold CLA 2004-07-28 12:16:02 EDT
I just tried the 3.1 integration build (Build ID 200407271028) and the problem 
does not occur anymore.
Comment 3 Olivier Thomann CLA 2004-07-28 12:24:42 EDT

*** This bug has been marked as a duplicate of 70995 ***