SimpleNode ast = edit.getAST();
if (ast == null) {
return true; //we need it to be correctly parsed with an ast to be able to do it...
}
EasyASTIteratorVisitor visitor = new EasyASTIteratorVisitor();
try {
ast.accept(visitor);
} catch (Exception e1) {
Log.log(e1);
return true; //just go on
}
List<ASTEntry> availableImports = visitor.getAsList(new Class[] { ImportFrom.class, Import.class });
PySourceViewer s = edit.getPySourceViewer();
ArrayList<Tuple<MarkerAnnotationAndPosition, ASTEntry>> unusedImportsMarkers = new ArrayList<Tuple<MarkerAnnotationAndPosition, ASTEntry>>();
ArrayList<Tuple<MarkerAnnotationAndPosition, ASTEntry>> unusedWildImportsMarkers = new ArrayList<Tuple<MarkerAnnotationAndPosition, ASTEntry>>();