рефакторинг. переносил текущие объекты в другое место
This commit is contained in:
@@ -2,6 +2,7 @@ package Visual_DVM_2021.Passes.All;
|
||||
import Common.Current_;
|
||||
import Common.Utils.Utils_;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Visual.UI;
|
||||
import Common.Visual.Windows.Dialog.Text.FileNameForm;
|
||||
import _VisualDVM.Utils;
|
||||
@@ -25,11 +26,11 @@ public class RenameDirectory extends ChangeFilePass {
|
||||
current = false;
|
||||
old_current_file = null;
|
||||
new_current_file = null;
|
||||
dst_node = Current.getProjectNode();
|
||||
dst_node = Global.mainModule.getProjectNode();
|
||||
if ((dst_node != null) && (dst_node.getUserObject() instanceof File)) {
|
||||
target_dir = Current.getSelectedDirectory();
|
||||
if (current = Current.HasFile() && Utils.isAnchestor(Current.getFile().file, target_dir)) {
|
||||
old_current_file = Current.getFile();
|
||||
target_dir = Global.mainModule.getSelectedDirectory();
|
||||
if (current = Global.mainModule.HasFile() && Utils.isAnchestor(Global.mainModule.getFile().file, target_dir)) {
|
||||
old_current_file = Global.mainModule.getFile();
|
||||
}
|
||||
if ((ff = new FileNameForm()).ShowDialog("Введите новое имя папки", target_dir.getName())) {
|
||||
fileName = ff.Result;
|
||||
@@ -80,8 +81,8 @@ public class RenameDirectory extends ChangeFilePass {
|
||||
}
|
||||
@Override
|
||||
protected void performDone() throws Exception {
|
||||
Current.getSapfor().ResetAllAnalyses();
|
||||
Current_.set(Current.SelectedDirectory, dst);
|
||||
Global.mainModule.getSapfor().ResetAllAnalyses();
|
||||
Global.mainModule.set(Current.SelectedDirectory, dst);
|
||||
if (current && new_current_file != null)
|
||||
passes.get(PassCode.OpenCurrentFile).Do(new_current_file);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user