Community
Participate
Working Groups
I have the following imports .. import javax.wsdl.*; import com.ibm.etools.ctc.wsdl.*; import com.ibm.etools.ctc.wsdl.Input; import com.ibm.etools.ctc.wsdl.Output; import com.ibm.etools.ctc.wsdl.Operation; import javax.wsdl.Fault; import javax.wsdl.OperationType; In javax.wsdl.* and com.ibm.etools.ctc.wsdl.* there are many classes with the same name, so I have to resolve the ambiguity by importing specific classes afterwards. If I add some more code and invoke Organize Imports with "Number of Qualified Imports" set to 2, errors are introduced into my class because the last few import statements above are removed. If it's necessary, Organize Imports should leave import statements which resolve ambiguities. Otherwise, it will introduce more errors than it can fix.
Reproduced under 2.0 using the following example: - package p1 containing A, B, X, Y, Z - package p2 containing X, Y, Z - Class Ref package p3; import p1.*; import p2.*; import p1.X; import p2.Y; import p2.Z; /** * @version 1.0 * @author */ public class Ref { X x; Y y; Z z; A a; B b; List list; } - do organize imports. You end up with to imports p1.* and p2.*. Martin, please investigate.
support for ambiguity resolving added > 20021120