Bug 23528 quick fix: adds bogus whitespaces on 'add throws declaration'
class A{ void a() throws Exception{ } void f(){ a(); } } qf the call to a() 'add throws declaration' you will get 'void f() throws Exception{' i have to go and fix it every time it used to work :(
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/LocalCorrectionsSubProcessor.java
}
        }
	}
	private static void addImportToProposal(ICompilationUnit cu, ITypeBinding type, CUCorrectionProposal proposal) throws CoreException {
        addImportToProposal(cu, Bindings.getFullyQualifiedImportName(type), proposal);
    }
            
    private static void addImportToProposal(ICompilationUnit cu, String typeName, CUCorrectionProposal proposal) throws CoreException {
        ImportEdit edit= new ImportEdit(cu, JavaPreferencesSettings.getCodeGenerationSettings());
        edit.addImport(typeName);
        proposal.getCompilationUnitChange().addTextEdit("import", edit);   
	}
    private static Expression getQualifier(ASTNode node) {
        if (node instanceof QualifiedName) {
            return ((QualifiedName) node).getQualifier();
        }
        if (node instanceof SimpleName) {
        	ASTNode parent= node.getParent();
        	if (parent instanceof FieldAccess) {
        		return ((FieldAccess) parent).getExpression();
        	}
        	return null;
        }
        if (node instanceof MethodInvocation) {
        	return ((MethodInvocation) node).getExpression();
        }
        return null;
    }
}