Bug 70932 - [1.5] Code formatter doesn't work when using generics
Summary: [1.5] Code formatter doesn't work when using generics
Status: RESOLVED DUPLICATE of bug 70995
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.1 M1   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-07-27 16:17 EDT by Laurens Berthold CLA
Modified: 2005-01-11 11:01 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 ***