mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user