AbstractCommonUpdateAction: add debug logging

A user has reported that in his case Update Project doesn't even show the confirmation dialog (although the confirmation is enabled in the settings), let's track where it fails.

[reviewed by irengrig]

(cherry-picked from 4422f58)
This commit is contained in:
Kirill Likhodedov
2012-12-20 15:43:00 +04:00
parent 7707558328
commit 5a85ae04c3
@@ -80,11 +80,14 @@ public abstract class AbstractCommonUpdateAction extends AbstractVcsAction {
boolean showUpdateOptions = myActionInfo.showOptions(project);
LOG.debug(String.format("project: %s, show update options: %s", project, showUpdateOptions));
if (project != null) {
try {
final FilePath[] filePaths = myScopeInfo.getRoots(context, myActionInfo);
final FilePath[] roots = DescindingFilesFilter.filterDescindingFiles(filterRoots(filePaths, context), project);
if (roots.length == 0) {
LOG.debug("No roots found.");
return;
}
@@ -94,6 +97,7 @@ public abstract class AbstractCommonUpdateAction extends AbstractVcsAction {
final UpdateEnvironment updateEnvironment = myActionInfo.getEnvironment(vcs);
if ((updateEnvironment != null) && (! updateEnvironment.validateOptions(vcsToVirtualFiles.get(vcs)))) {
// messages already shown
LOG.debug("Options not valid for files: " + vcsToVirtualFiles);
return;
}
}
@@ -146,6 +150,7 @@ public abstract class AbstractCommonUpdateAction extends AbstractVcsAction {
private void showOptionsDialog(final Map<AbstractVcs, Collection<FilePath>> updateEnvToVirtualFiles, final Project project,
final VcsContext dataContext) {
LinkedHashMap<Configurable, AbstractVcs> envToConfMap = createConfigurableToEnvMap(updateEnvToVirtualFiles);
LOG.debug("configurables map: " + envToConfMap);
if (!envToConfMap.isEmpty()) {
UpdateOrStatusOptionsDialog dialogOrStatus = myActionInfo.createOptionsDialog(project, envToConfMap,
myScopeInfo.getScopeName(dataContext,