Bug 37399 Organize Imports can remove required inner interfaces [code manipulation]
import com.epiphany.shr.sf.ClusterSingletonStepped.SingletonStep; After organize imports, this import is turned into: import com.epiphany.shr.sf.ClusterSingletonStepped; If it is not legal to have inner interfaces I appologize and I will flog the coder. Otherwise, it appears that organize imports can potentially cause compiler errors that are hard to track down. I run it, and things look ok, but part of my import is gone. Interface definition: public abstract class ClusterSingletonStepped extends ClusterSingleton { ..... public interface SingletonStep ..... } Thanks for looking at this. Please let me know if I can add any additional information or answer any questions.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/UnresolvedElementsSubProcessor.java
}
		}
		if (nDiffs == 2) { 
			int idx1= indexOfDiff[0];
			int idx2= indexOfDiff[1];
			boolean canSwap= ASTResolving.canAssign(argTypes[idx1], paramTypes[idx2]) && ASTResolving.canAssign(argTypes[idx2], paramTypes[idx1]);
			 if (canSwap) {
				Expression arg1= (Expression) arguments.get(idx1);
				Expression arg2= (Expression) arguments.get(idx2);
				
				ASTRewrite rewrite= new ASTRewrite(arg1.getParent());
				rewrite.markAsReplaced(arg1, rewrite.createCopy(arg2));
				rewrite.markAsReplaced(arg2, rewrite.createCopy(arg1));
				{
					String[] arg= new String[] { String.valueOf(idx1 + 1), String.valueOf(idx2 + 1) };
					String label= CorrectionMessages.getFormattedString("UnresolvedElementsSubProcessor.swaparguments.description", arg); 
					Image image= JavaPluginImages.get(JavaPluginImages.IMG_CORRECTION_CHANGE);
					ASTRewriteCorrectionProposal proposal= new ASTRewriteCorrectionProposal(label, context.getCompilationUnit(), rewrite, 8, image);
					proposal.ensureNoModifications();
					proposals.add(proposal);					
				}
				
				if (declaringType.isFromSource()) {
					ICompilationUnit targetCU= ASTResolving.findCompilationUnitForBinding(cu, astRoot, declaringType);
					if (targetCU != null) {
						ChangeDescription[] changeDesc= new ChangeDescription[paramTypes.length];
						for (int i= 0; i < nDiffs; i++) {
							changeDesc[idx1]= new SwapDescription(idx2);
						}
						ITypeBinding[] swappedTypes= new ITypeBinding[] { argTypes[idx1], paramTypes[idx2] };