Author Topic: java 1.5 import static feature broke in SE 10.0 (organize imports)  (Read 4563 times)

kishkani

  • Junior Community Member
  • Posts: 2
  • Hero Points: 0
Hello,
Easy to recreate.

Type the following in File/New


public class Test {

    private Set test;

    public Test(){
    }
}

Click Tools/Imports/Organize Imports , the following appears.

import java.util.Set;

public class Test {

    private Set test;

    public Test(){
    }
}

Bug 1:

Now type import static javax.swing.SwingConstants.
When the "." is pressed, it results in the following.

import java.util.Set;                   .

import javax.swing.SwingConstants;
import static javax.swing.SwingConstants


public class Test {

    private Set test;

    public Test(){
    }
}

Bug 2:

Now type the following.

import java.util.Set;                   

import static javax.swing.SwingConstants.*;

public class Test {

    private Set test;

    public Test(){
    }
}

Click Tools/Imports/Organize Imports,
The line "import static javax.swing..." is nuked.

I just see this

import java.util.Set;                   

public class Test {

    private Set test;

    public Test(){
    }
}


Regards
kishore