diff --git a/platform/vcs-log/impl/src/com/intellij/vcs/log/ui/VcsStructureChooser.java b/platform/vcs-log/impl/src/com/intellij/vcs/log/ui/VcsStructureChooser.java
index 9191e3bfdf2b..0912391529c9 100644
--- a/platform/vcs-log/impl/src/com/intellij/vcs/log/ui/VcsStructureChooser.java
+++ b/platform/vcs-log/impl/src/com/intellij/vcs/log/ui/VcsStructureChooser.java
@@ -41,7 +41,6 @@ import com.intellij.util.PlatformIcons;
import com.intellij.util.PlusMinus;
import com.intellij.util.TreeNodeState;
import com.intellij.util.containers.Convertor;
-import com.intellij.util.containers.hash.HashSet;
import com.intellij.util.treeWithCheckedNodes.SelectionManager;
import com.intellij.util.ui.UIUtil;
import org.jetbrains.annotations.NotNull;
@@ -71,14 +70,14 @@ public class VcsStructureChooser extends DialogWrapper {
"Selected: (You have added " + MAX_FOLDERS + " elements. No more is allowed.)";
@NotNull private final Project myProject;
+ @NotNull private final List myInitialRoots;
+ @NotNull private final Map myModulesSet = new HashMap();
+ @NotNull private final Set mySelectedFiles = new HashSet();
+
+ @NotNull private final SelectionManager mySelectionManager;
private Set myRoots;
- private Map myModulesSet;
- private final Set mySelectedFiles = new java.util.HashSet();
- private final List myInitialRoots;
-
private JLabel mySelectedLabel;
- private final SelectionManager mySelectionManager;
private DefaultMutableTreeNode myRoot;
private Tree myTree;
@@ -87,13 +86,16 @@ public class VcsStructureChooser extends DialogWrapper {
Collection initialSelection,
@NotNull List initialRoots) {
super(project, true);
- myInitialRoots = initialRoots;
setTitle(title);
myProject = project;
- mySelectionManager = new SelectionManager(MAX_FOLDERS, 500, MyNodeConvertor.getInstance());
+ myInitialRoots = initialRoots;
+ mySelectionManager = new SelectionManager(MAX_FOLDERS, 500, MyNodeConverter.getInstance());
+
init();
+
mySelectionManager.setSelection(initialSelection);
- checkEmptyness();
+
+ checkEmpty();
}
private void calculateRoots() {
@@ -109,7 +111,6 @@ public class VcsStructureChooser extends DialogWrapper {
myRoots = new HashSet();
myRoots.addAll(myInitialRoots);
checkSet.addAll(myInitialRoots);
- myModulesSet = new HashMap();
for (Module module : modules) {
final VirtualFile[] files = ModuleRootManager.getInstance(module).getContentRoots();
for (VirtualFile file : files) {
@@ -122,16 +123,12 @@ public class VcsStructureChooser extends DialogWrapper {
}
}
- public Map getModulesSet() {
- return myModulesSet;
- }
-
@NotNull
public Collection getSelectedFiles() {
return mySelectedFiles;
}
- private void checkEmptyness() {
+ private void checkEmpty() {
setOKActionEnabled(!mySelectedFiles.isEmpty());
}
@@ -259,7 +256,7 @@ public class VcsStructureChooser extends DialogWrapper {
}
private void recalculateErrorText() {
- checkEmptyness();
+ checkEmpty();
if (mySelectionManager.canAddSelection()) {
mySelectedLabel.setText("");
}
@@ -376,10 +373,10 @@ public class VcsStructureChooser extends DialogWrapper {
}
}
- private static class MyNodeConvertor implements Convertor {
- private final static MyNodeConvertor ourInstance = new MyNodeConvertor();
+ private static class MyNodeConverter implements Convertor {
+ private final static MyNodeConverter ourInstance = new MyNodeConverter();
- public static MyNodeConvertor getInstance() {
+ public static MyNodeConverter getInstance() {
return ourInstance;
}