рефакторинг. переносил текущие объекты в другое место
This commit is contained in:
@@ -3,6 +3,7 @@ import Common.Current_;
|
||||
import Common.Utils.Utils_;
|
||||
import Common.Visual.UI_;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Visual.UI;
|
||||
import _VisualDVM.Utils;
|
||||
import _VisualDVM.ProjectData.Files.DBProjectFile;
|
||||
@@ -21,9 +22,9 @@ public class DeleteDirectory extends ChangeFilePass {
|
||||
@Override
|
||||
protected boolean canStart(Object... args) {
|
||||
resetArgs();
|
||||
dst_node = Current.getProjectNode();
|
||||
dst_node = Global.mainModule.getProjectNode();
|
||||
if ((dst_node != null) && (dst_node.getUserObject() instanceof File)) {
|
||||
target_dir = Current.getSelectedDirectory();
|
||||
target_dir = Global.mainModule.getSelectedDirectory();
|
||||
if (target_dir.equals(project.Home)) {
|
||||
Log.Writeln("Нельзя удалять домашнюю папку проекта.");
|
||||
return false;
|
||||
@@ -35,7 +36,7 @@ public class DeleteDirectory extends ChangeFilePass {
|
||||
}
|
||||
@Override
|
||||
protected void performPreparation() throws Exception {
|
||||
if (Current.HasFile() && (Utils.isAnchestor(Current.getFile().file, target_dir)))
|
||||
if (Global.mainModule.HasFile() && (Utils.isAnchestor(Global.mainModule.getFile().file, target_dir)))
|
||||
passes.get(PassCode.CloseCurrentFile).Do();
|
||||
}
|
||||
@Override
|
||||
@@ -56,7 +57,7 @@ public class DeleteDirectory extends ChangeFilePass {
|
||||
}
|
||||
@Override
|
||||
protected void performDone() throws Exception {
|
||||
Current_.set(Current.SelectedDirectory, null);
|
||||
Current_.set(Current.ProjectNode, null);
|
||||
Global.mainModule.set(Current.SelectedDirectory, null);
|
||||
Global.mainModule.set(Current.ProjectNode, null);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user