рефакторинг хранения окон
This commit is contained in:
@@ -366,7 +366,7 @@ public class CallbackForm implements FormWithSplitters, CallbackWindow {
|
||||
public void EnableBugreports() {
|
||||
UI_.Clear(accountPanel);
|
||||
accountPanel.add(SC10);
|
||||
UI.getMainWindow().SwitchTestingTabs(true);
|
||||
Global.mainModule.getUI().getMainWindow().SwitchTestingTabs(true);
|
||||
}
|
||||
@Override
|
||||
public void setUserRights() {
|
||||
|
||||
@@ -216,7 +216,7 @@ public class FileForm implements FileWindow, FormWithSplitters {
|
||||
public void ShowText() {
|
||||
UI_.Clear(editorPanel);
|
||||
editorPanel.add(new RTextScrollPane(Body = new SPFEditor(file)));
|
||||
UI.getSearchReplaceWindow().updateEditor(Body);
|
||||
Global.mainModule.getUI().getSearchReplaceWindow().updateEditor(Body);
|
||||
}
|
||||
@Override
|
||||
public void ShowMessages() {
|
||||
|
||||
@@ -61,14 +61,14 @@ public class MainForm extends Form implements MainWindow {
|
||||
@Override
|
||||
public void AfterClose() {
|
||||
Global.mainModule.getPass(PassCode.CloseCurrentProject).Do();
|
||||
if (UI.getVersionsWindow() != null)
|
||||
((VersionsForm) UI.getVersionsWindow()).SaveSplitters();
|
||||
if (Global.mainModule.getUI().getVersionsWindow() != null)
|
||||
((FormWithSplitters)Global.mainModule.getUI().getVersionsWindow()).SaveSplitters();
|
||||
SaveCallbackPanel();
|
||||
SaveTestsPanel();
|
||||
SaveTestingPanel();
|
||||
//--
|
||||
if (UI.getDebugWindow() != null)
|
||||
((FormWithSplitters) UI.getDebugWindow()).SaveSplitters();
|
||||
if (Global.mainModule.getUI().getDebugWindow() != null)
|
||||
((FormWithSplitters) Global.mainModule.getUI().getDebugWindow()).SaveSplitters();
|
||||
//--
|
||||
Global.mainModule.getDb().SaveCredentials();
|
||||
//--
|
||||
@@ -245,7 +245,7 @@ public class MainForm extends Form implements MainWindow {
|
||||
RemoveProjectPanel();
|
||||
InstallProjectPanel();
|
||||
restoreGlobalTab();
|
||||
UI.getDebugWindow().DropCompilationTasksComparison();
|
||||
Global.mainModule.getUI().getDebugWindow().DropCompilationTasksComparison();
|
||||
mainMenuBar.ShowProject(true);
|
||||
}
|
||||
@Override
|
||||
|
||||
@@ -67,7 +67,7 @@ public class ProjectForm implements FormWithSplitters, ProjectWindow {
|
||||
filesForm.Show();
|
||||
InstallVersionsPanel();
|
||||
InstallDebugPanel();
|
||||
UI.getDebugWindow().ShowAll();
|
||||
Global.mainModule.getUI().getDebugWindow().ShowAll();
|
||||
ShowAllAnalyses();
|
||||
ShowProjectView();
|
||||
SwitchScreen((Global.mainModule.getDb()).settings.get(SettingName.SmallScreen).toBoolean());
|
||||
@@ -231,8 +231,8 @@ public class ProjectForm implements FormWithSplitters, ProjectWindow {
|
||||
DBProjectFile badFile = Global.mainModule.getProject().getFirstBadFile();
|
||||
if (badFile != null) {
|
||||
Global.mainModule.getPass(PassCode.OpenCurrentFile).Do(badFile);
|
||||
UI.getMainWindow().FocusProject();
|
||||
UI.getMainWindow().getProjectWindow().FocusFile();
|
||||
Global.mainModule.getUI().getMainWindow().FocusProject();
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().FocusFile();
|
||||
}
|
||||
//-
|
||||
if (Global.mainModule.HasFile()) {
|
||||
@@ -277,13 +277,13 @@ public class ProjectForm implements FormWithSplitters, ProjectWindow {
|
||||
private void InstallVersionsPanel() {
|
||||
projectTabs.insertTab("",
|
||||
Utils_.getIcon("/icons/VersionsTree.png"),
|
||||
UI.getVersionsWindow().getContent(),
|
||||
Global.mainModule.getUI().getVersionsWindow().getContent(),
|
||||
"Версии", 5);
|
||||
}
|
||||
private void InstallDebugPanel() {
|
||||
projectTabs.insertTab("",
|
||||
Utils_.getIcon("/icons/Command.png"),
|
||||
UI.getDebugWindow().getContent(),
|
||||
Global.mainModule.getUI().getDebugWindow().getContent(),
|
||||
"Компиляция и запуск", 6);
|
||||
}
|
||||
@Override
|
||||
|
||||
@@ -119,9 +119,9 @@ public class SapforPackagesComparisonForm {
|
||||
lObjectName.setToolTipText("Объект не назначен.");
|
||||
showNoTree();
|
||||
if (isMaster()) {
|
||||
UI.getMainWindow().getTestingWindow().ShowNoSapforPackageVersionEtalon();
|
||||
Global.mainModule.getUI().getMainWindow().getTestingWindow().ShowNoSapforPackageVersionEtalon();
|
||||
} else {
|
||||
UI.getMainWindow().getTestingWindow().ShowNoSapforPackageVersion();
|
||||
Global.mainModule.getUI().getMainWindow().getTestingWindow().ShowNoSapforPackageVersion();
|
||||
}
|
||||
}
|
||||
//---
|
||||
@@ -233,8 +233,8 @@ public class SapforPackagesComparisonForm {
|
||||
showNoTree();
|
||||
slave.showNoTree();
|
||||
//--->>>
|
||||
UI.getMainWindow().getTestingWindow().ShowNoSapforPackageVersionEtalon();
|
||||
UI.getMainWindow().getTestingWindow().ShowNoSapforPackageVersion();
|
||||
Global.mainModule.getUI().getMainWindow().getTestingWindow().ShowNoSapforPackageVersionEtalon();
|
||||
Global.mainModule.getUI().getMainWindow().getTestingWindow().ShowNoSapforPackageVersion();
|
||||
}
|
||||
@Override
|
||||
protected void body() throws Exception {
|
||||
|
||||
@@ -129,7 +129,7 @@ public class SearchReplaceForm extends Form {
|
||||
}
|
||||
@Override
|
||||
public Component getRelative() {
|
||||
return (Component) UI.getMainWindow();
|
||||
return (Component) Global.mainModule.getUI().getMainWindow();
|
||||
}
|
||||
@Override
|
||||
public int getDefaultWidth() {
|
||||
|
||||
Reference in New Issue
Block a user