Bug 31821 Quick fix for unused imports
build I20030211 It would be nice to have a quick fix for unused import warnings which simply removes the import.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/NewVariableCompletionProposal.java
public void apply(IDocument document) {
		try {
			CompilationUnitChange change= getCompilationUnitChange();
			
			IEditorPart part= null;
			if (fIsInDifferentCU) {
				ICompilationUnit unit= getCompilationUnit();
				IStatus status= Resources.makeCommittable(JavaModelUtil.toOriginal(unit).getResource(), null);
				if (!status.isOK()) {
					String label= CorrectionMessages.getString("NewVariableCompletionProposal.error.title"); 
					String message= CorrectionMessages.getString("NewVariableCompletionProposal.error.message"); 
					ErrorDialog.openError(JavaPlugin.getActiveWorkbenchShell(), label, message, status);
					return;
				}
				change.setKeepExecutedTextEdits(true);
				part= EditorUtility.openInEditor(unit, true);
			}
			super.apply(document);
		
			if (part instanceof ITextEditor) {
				TextRange range= change.getExecutedTextEdit(change.getEdit()).getTextRange();		
				((ITextEditor) part).selectAndReveal(range.getOffset(), range.getLength());
			}
		} catch (CoreException e) {
			JavaPlugin.log(e);
		}		
	}		
}