рефакторинг. переносил текущие объекты в другое место
This commit is contained in:
@@ -36,7 +36,7 @@ public class OpenCurrentProject extends Pass<db_project_info> {
|
||||
return true;
|
||||
}
|
||||
boolean needsOpen() {
|
||||
return !Current.HasProject() || !Current.getProject().Home.equals(dir);
|
||||
return !Global.mainModule.HasProject() || !Global.mainModule.getProject().Home.equals(dir);
|
||||
}
|
||||
//-----------------
|
||||
@Override
|
||||
@@ -80,8 +80,8 @@ public class OpenCurrentProject extends Pass<db_project_info> {
|
||||
root_changes = true;
|
||||
switch (mode) {
|
||||
case Directory:
|
||||
if (Current.HasRoot()) {
|
||||
db_project_info root = Current.getRoot();
|
||||
if (Global.mainModule.HasRoot()) {
|
||||
db_project_info root = Global.mainModule.getRoot();
|
||||
db_project_info project = root.find_version_r(dir);
|
||||
if (project != null) {
|
||||
Utils_.MainLog.Print("версия найдена в текущем корне");
|
||||
@@ -106,10 +106,10 @@ public class OpenCurrentProject extends Pass<db_project_info> {
|
||||
}
|
||||
@Override
|
||||
protected void performDone() throws Exception {
|
||||
Current_.set(Current.Project, target);
|
||||
Current_.set(Current.ProjectView, ProjectView.Files);
|
||||
Global.mainModule.set(Current.Project, target);
|
||||
Global.mainModule.set(Current.ProjectView, ProjectView.Files);
|
||||
if (root_changes)
|
||||
Current_.set(Current.Root, new_root);
|
||||
Global.mainModule.set(Current.Root, new_root);
|
||||
Pass.passes.get(PassCode.UpdateSetting).Do(SettingName.ProjectsSearchDirectory, dir.getParent());
|
||||
Pass.passes.get(PassCode.UpdateSetting).Do(
|
||||
SettingName.FREE_FORM, target.style.equals(LanguageStyle.free) ? "1" : "0")
|
||||
|
||||
Reference in New Issue
Block a user