protected void checkConsistency(ResourceStateValidatorPresenter presenter) throws CoreException { if (isCheckingConsistency || presenter == null) return; isCheckingConsistency = true; try { List inconsistentResources = getInconsistentResources(); List inconsistentFiles = getFiles(inconsistentResources); inconsistentFiles = addOtherInconsistentFiles(inconsistentFiles); if (inconsistentFiles == null || inconsistentFiles.isEmpty()) return; boolean shouldRefreshFiles = true; //Defect 208654 & 209631 want prompt no matter what. if (anyFileChangedSinceLastRefreshPrompt(inconsistentFiles)) { clearLastNonRefreshStateMap(); shouldRefreshFiles = presenter.promptForInconsistentFileRefresh(inconsistentFiles); } else return; if (shouldRefreshFiles) refreshFiles(inconsistentFiles, inconsistentResources); else cacheLastNonRefreshFileStamps(inconsistentFiles); } finally { isCheckingConsistency = false; } }