@Override
 public RefactoringStatus checkFinalConditions(ProgressMonitor pm) throws Exception {
   pm = checkProgressMonitor(pm);
   pm.beginTask("Checking final conditions", 1);
   try {
     RefactoringStatus result = new RefactoringStatus();
     result.merge(analyzePossibleConflicts(new SubProgressMonitor(pm, 1)));
     return result;
   } finally {
     pm.done();
   }
 }
 private RefactoringStatus analyzePossibleConflicts(ProgressMonitor pm) {
   pm.beginTask("Analyze possible conflicts", 1);
   try {
     final RefactoringStatus result = new RefactoringStatus();
     // checks the resolved CompilationUnit(s)
     Source unitSource = element.getSource();
     Source[] librarySources = context.getLibrariesContaining(unitSource);
     for (Source librarySource : librarySources) {
       analyzePossibleConflicts_inLibrary(result, unitSource, librarySource);
     }
     pm.worked(1);
     // done
     return result;
   } finally {
     pm.done();
   }
 }