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/CorrectionMarkerResolutionGenerator.java
IResource res= marker.getResource();
		if (res instanceof IFile && res.isAccessible()) {
			return JavaCore.createCompilationUnitFrom((IFile) res);
		}
		return null;
	}
	
	private CorrectionContext findCorrectionContext(IEditorInput input, IMarker marker) throws JavaModelException {
		IAnnotationModel model= JavaPlugin.getDefault().getCompilationUnitDocumentProvider().getAnnotationModel(input);
		if (model != null) {
			Iterator iter= model.getAnnotationIterator();
			while (iter.hasNext()) {
				Object curr= iter.next();
				if (curr instanceof JavaMarkerAnnotation) {
					JavaMarkerAnnotation annot= (JavaMarkerAnnotation) curr;
					
					if (marker.equals(annot.getMarker())) {
						Position pos= model.getPosition(annot);
						if (pos != null) {
							ICompilationUnit cu= getCompilationUnit(marker);
							return new CorrectionContext(JavaModelUtil.toWorkingCopy(cu), pos.getOffset(), pos.getLength(), annot.getId(), annot.getArguments());
						}
					}
				}
			}
		}
		return null;
	}
}