From 4e62b4899d81fad7cab7cf016ef958011de7a4b3 Mon Sep 17 00:00:00 2001 From: Kirill Likhodedov Date: Sat, 3 Nov 2018 21:20:25 +0300 Subject: [PATCH] git: cleanup: inline unused method --- .../git4idea/src/git4idea/actions/BasicAction.java | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/plugins/git4idea/src/git4idea/actions/BasicAction.java b/plugins/git4idea/src/git4idea/actions/BasicAction.java index df552bf227a2..445c7bd34891 100644 --- a/plugins/git4idea/src/git4idea/actions/BasicAction.java +++ b/plugins/git4idea/src/git4idea/actions/BasicAction.java @@ -27,7 +27,6 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import static com.intellij.openapi.vfs.VirtualFileVisitor.ONE_LEVEL_DEEP; import static com.intellij.openapi.vfs.VirtualFileVisitor.SKIP_ROOT; /** @@ -95,7 +94,7 @@ public abstract class BasicAction extends DumbAwareAction { if (!file.isDirectory() && projectLevelVcsManager.getVcsFor(file) instanceof GitVcs) { affectedFiles.add(file); } - else if (file.isDirectory() && isRecursive()) { + else if (file.isDirectory()) { addChildren(project, affectedFiles, file); } @@ -114,7 +113,7 @@ public abstract class BasicAction extends DumbAwareAction { * (recursively) */ private void addChildren(@NotNull final Project project, @NotNull final List files, @NotNull VirtualFile file) { - VfsUtilCore.visitChildrenRecursively(file, new VirtualFileVisitor(SKIP_ROOT, (isRecursive() ? null : ONE_LEVEL_DEEP)) { + VfsUtilCore.visitChildrenRecursively(file, new VirtualFileVisitor(SKIP_ROOT, null) { @Override public boolean visitFile(@NotNull VirtualFile file) { if (!file.isDirectory() && appliesTo(project, file)) { @@ -131,14 +130,6 @@ public abstract class BasicAction extends DumbAwareAction { @NotNull protected abstract String getActionName(); - - /** - * @return true if the action could be applied recursively - */ - protected boolean isRecursive() { - return true; - } - /** * Check if the action is applicable to the file. The default checks if the file is a directory *