return new RefactorerFinds(this).findClassHierarchy(request, findOnlyParents);
}
public Map<Tuple<String, File>, HashSet<ASTEntry>> findAllOccurrences(RefactoringRequest req)
throws OperationCanceledException, CoreException {
PyRenameEntryPoint processor = new PyRenameEntryPoint(req);
//to see if a new request was not created in the meantime (in which case this one will be cancelled)
req.checkCancelled();
IProgressMonitor monitor = req.getMonitor();
Map<Tuple<String, File>, HashSet<ASTEntry>> occurrencesInOtherFiles;
try {
monitor.beginTask("Find all occurrences", 100);
monitor.setTaskName("Find all occurrences");
RefactoringStatus status;
try {
req.pushMonitor(new SubProgressMonitor(monitor, 10));
status = processor.checkInitialConditions(req.getMonitor());
if (status.getSeverity() == RefactoringStatus.FATAL) {
return null;
}
} finally {
req.popMonitor().done();
}
req.checkCancelled();
try {
req.pushMonitor(new SubProgressMonitor(monitor, 85));
status = processor.checkFinalConditions(req.getMonitor(), null, false);
if (status.getSeverity() == RefactoringStatus.FATAL) {
return null;
}
} finally {
req.popMonitor().done();
}
req.checkCancelled();
occurrencesInOtherFiles = processor.getOccurrencesInOtherFiles();
HashSet<ASTEntry> occurrences = processor.getOccurrences();
occurrencesInOtherFiles.put(new Tuple<String, File>(req.moduleName, req.pyEdit.getEditorFile()),
occurrences);
req.getMonitor().worked(5);
} finally {