рефакторинг хранения окон
This commit is contained in:
@@ -173,8 +173,8 @@ public class Global {
|
||||
public static void RefreshUpdatesStatus() {
|
||||
Components.RefreshUI();
|
||||
ValidateComponentsStates();
|
||||
if (UI.HasMainWindow())
|
||||
UI.getMainWindow().ShowUpdatesIcon();
|
||||
if (mainModule.getUI().hasMainWindow())
|
||||
mainModule.getUI().getMainWindow().ShowUpdatesIcon();
|
||||
}
|
||||
public static boolean ValidateComponentsStates() {
|
||||
bad_state = need_update = need_publish = 0;
|
||||
@@ -243,7 +243,6 @@ public class Global {
|
||||
messagesServer.Start();
|
||||
//создание списков служебных объектов
|
||||
UI.CreateAll();
|
||||
//единственное меню до остальных.
|
||||
Components = new ComponentsSet();
|
||||
mainModule.set(Current.ProjectView, ProjectView.Files);
|
||||
Components.put(ComponentType.Visualiser, visualiser = new Visualiser());
|
||||
@@ -255,7 +254,6 @@ public class Global {
|
||||
for (Component component : Components.Data.values())
|
||||
if (component.isVisible()) component.InitialVersionCheck();
|
||||
//-
|
||||
UI.CreateComponentsForm();
|
||||
AbstractTokenMakerFactory atmf = (AbstractTokenMakerFactory) TokenMakerFactory.getDefaultInstance();
|
||||
atmf.putMapping("text/FortranSPF", "_VisualDVM.Visual.Syntax.FortranSPFTokenMaker");
|
||||
atmf.putMapping("text/FreeFortranSPF", "_VisualDVM.Visual.Syntax.FreeFortranSPFTokenMaker");
|
||||
@@ -268,7 +266,7 @@ public class Global {
|
||||
if ((need_update > 0) || (bad_state > 0)) {
|
||||
boolean flag = true;
|
||||
do {
|
||||
UI.ShowComponentsWindow();
|
||||
Global.mainModule.getUI().getComponentsWindow().ShowDialog("");
|
||||
if (flag = (!ValidateComponentsStates())) {
|
||||
if (!UI_.Question("Найдено " + bad_state + " некорректных необходимых компонент.Работа визуализатора невозможна.\n" +
|
||||
"Вернуться к окну компонент"
|
||||
@@ -299,7 +297,7 @@ public class Global {
|
||||
if (mainModule.getDb().settings.get(SettingName.AutoTestsLoad).toBoolean())
|
||||
Global.mainModule.getPass(PassCode.SynchronizeTests).Do();
|
||||
Global.mainModule.getSapfor().refreshPid(); //без сапфора сюда это все равно не дойдет.
|
||||
UI.CreateWindows();
|
||||
Global.mainModule.getUI().getMainWindow().Show();
|
||||
}
|
||||
public static void ServerMode() throws Exception {
|
||||
CheckServerDirectories();
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package _VisualDVM.GlobalData.Account;
|
||||
import Common.Database.Objects.DBObject;
|
||||
import Common.Utils.TextLog;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Repository.BugReport.BugReport;
|
||||
import _VisualDVM.Visual.UI;
|
||||
import com.sun.org.glassfish.gmbal.Description;
|
||||
@@ -17,8 +18,8 @@ public class Account extends DBObject {
|
||||
if (role.equals(AccountRole.Undefined)) {
|
||||
if (Log != null) {
|
||||
Log.Writeln("Пользователь не зарегистрирован");
|
||||
if (UI.HasMainWindow())
|
||||
UI.getMainWindow().FocusCallback();
|
||||
if (Global.mainModule.getUI().hasMainWindow())
|
||||
Global.mainModule.getUI().getMainWindow().FocusCallback();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -126,12 +126,12 @@ public class CompilersDBTable extends iDBTable<Compiler> {
|
||||
@Override
|
||||
public void ShowCurrentObject() throws Exception {
|
||||
super.ShowCurrentObject();
|
||||
UI.getMainWindow().getTestingWindow().ShowCurrentCompiler();
|
||||
Global.mainModule.getUI().getMainWindow().getTestingWindow().ShowCurrentCompiler();
|
||||
}
|
||||
@Override
|
||||
public void ShowNoCurrentObject() throws Exception {
|
||||
super.ShowNoCurrentObject();
|
||||
UI.getMainWindow().getTestingWindow().ShowCurrentCompiler();
|
||||
Global.mainModule.getUI().getMainWindow().getTestingWindow().ShowCurrentCompiler();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -88,13 +88,13 @@ public class MachinesDBTable extends iDBTable<Machine> {
|
||||
@Override
|
||||
public void ShowCurrentObject() throws Exception {
|
||||
super.ShowCurrentObject();
|
||||
UI.getMainWindow().getTestingWindow().ShowCurrentCompiler();
|
||||
Global.mainModule.getUI().getMainWindow().getTestingWindow().ShowCurrentCompiler();
|
||||
Global.mainModule.getUI().getCredentialsMenuBar().ShowMachine();
|
||||
}
|
||||
@Override
|
||||
public void ShowNoCurrentObject() throws Exception {
|
||||
super.ShowNoCurrentObject();
|
||||
UI.getMainWindow().getTestingWindow().ShowCurrentCompiler();
|
||||
Global.mainModule.getUI().getMainWindow().getTestingWindow().ShowCurrentCompiler();
|
||||
Global.mainModule.getUI().getCredentialsMenuBar().ShowNoMachine();
|
||||
}
|
||||
@Override
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package _VisualDVM.GlobalData.RemoteFile.UI;
|
||||
import Common.Visual.Trees.TreeForm;
|
||||
import Common.Visual.Windows.Dialog.DialogFields;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Visual.UI;
|
||||
|
||||
import javax.swing.*;
|
||||
@@ -19,13 +20,13 @@ public class RemoteFileChooserFields implements DialogFields {
|
||||
bBack.addActionListener(new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
UI.getRemoteFileChooser().goUp();
|
||||
Global.mainModule.getUI().getRemoteFileChooser().goUp();
|
||||
}
|
||||
});
|
||||
bHome.addActionListener(new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
UI.getRemoteFileChooser().goHome();
|
||||
Global.mainModule.getUI().getRemoteFileChooser().goHome();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ import _VisualDVM.Global;
|
||||
import _VisualDVM.Visual.UI;
|
||||
public class RemoteFilesTree extends DataTree {
|
||||
public RemoteFilesTree() {
|
||||
super(UI.getRemoteFileChooser().root);
|
||||
super(Global.mainModule.getUI().getRemoteFileChooser().root);
|
||||
}
|
||||
@Override
|
||||
public TreeRenderers getRenderer() {
|
||||
@@ -18,12 +18,12 @@ public class RemoteFilesTree extends DataTree {
|
||||
}
|
||||
@Override
|
||||
public void ShowCurrentObject() {
|
||||
UI.getRemoteFileChooser().ShowCurrentRemoteFile();
|
||||
Global.mainModule.getUI().getRemoteFileChooser().ShowCurrentRemoteFile();
|
||||
}
|
||||
@Override
|
||||
public void LeftMouseAction2() {
|
||||
if (Global.mainModule.HasRemoteFile() && Global.mainModule.getRemoteFile().isDirectory()) {
|
||||
UI.getRemoteFileChooser().Refresh(Global.mainModule.getRemoteFile().full_name);
|
||||
Global.mainModule.getUI().getRemoteFileChooser().Refresh(Global.mainModule.getRemoteFile().full_name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,12 +49,12 @@ public class CompilationTasksDBTable extends iDBTable<CompilationTask> {
|
||||
@Override
|
||||
public void ShowCurrentObject() throws Exception {
|
||||
super.ShowCurrentObject();
|
||||
UI.getDebugWindow().DropRunTasksComparison();
|
||||
Global.mainModule.getUI().getDebugWindow().DropRunTasksComparison();
|
||||
}
|
||||
@Override
|
||||
public void ShowNoCurrentObject() throws Exception {
|
||||
super.ShowNoCurrentObject();
|
||||
UI.getDebugWindow().DropRunTasksComparison();
|
||||
Global.mainModule.getUI().getDebugWindow().DropRunTasksComparison();
|
||||
}
|
||||
@Override
|
||||
public void CreateControl() {
|
||||
|
||||
@@ -36,12 +36,12 @@ public class RunTasksDBTable extends iDBTable<RunTask> {
|
||||
@Override
|
||||
public void ShowCurrentObject() throws Exception {
|
||||
super.ShowCurrentObject();
|
||||
UI.getDebugWindow().ShowCurrentRunTask();
|
||||
Global.mainModule.getUI().getDebugWindow().ShowCurrentRunTask();
|
||||
}
|
||||
@Override
|
||||
public void ShowNoCurrentObject() throws Exception {
|
||||
super.ShowNoCurrentObject();
|
||||
UI.getDebugWindow().ShowNoCurrentRunTask();
|
||||
Global.mainModule.getUI().getDebugWindow().ShowNoCurrentRunTask();
|
||||
}
|
||||
@Override
|
||||
public void CreateControl() {
|
||||
|
||||
@@ -63,7 +63,7 @@ public class AddFile extends ChangeFilePass<DBProjectFile> {
|
||||
if (mode == Mode.Dialog) Utils.WriteToFile(target.file, "");
|
||||
else FileUtils.copyFile(src, dst);
|
||||
project.db.Insert(target);
|
||||
UI.getMainWindow().getProjectWindow().getFilesTreeForm().getTree().AddNode(parent_node,
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().getFilesTreeForm().getTree().AddNode(parent_node,
|
||||
dst_node = target.node = new DefaultMutableTreeNode(target)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -5,12 +5,12 @@ public class AppendBugReportComment extends AppendBugReportField {
|
||||
@Override
|
||||
protected boolean canStart(Object... args) throws Exception {
|
||||
return super.canStart("comment",
|
||||
UI.getMainWindow().getCallbackWindow().getBugReportCommentAdditionText());
|
||||
Global.mainModule.getUI().getMainWindow().getCallbackWindow().getBugReportCommentAdditionText());
|
||||
}
|
||||
@Override
|
||||
protected void performDone() throws Exception {
|
||||
super.performDone();
|
||||
UI.getMainWindow().getCallbackWindow().ClearBugReportCommentAdditionText();
|
||||
Global.mainModule.getUI().getMainWindow().getCallbackWindow().ClearBugReportCommentAdditionText();
|
||||
}
|
||||
@Override
|
||||
protected boolean canUpdate() {
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
package _VisualDVM.Passes.All;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Visual.UI;
|
||||
public class AppendBugReportDescription extends AppendBugReportField {
|
||||
@Override
|
||||
protected boolean canStart(Object... args) throws Exception {
|
||||
return super.canStart("description",
|
||||
UI.getMainWindow().getCallbackWindow().getBugReportDescriptionAdditionText());
|
||||
Global.mainModule.getUI().getMainWindow().getCallbackWindow().getBugReportDescriptionAdditionText());
|
||||
}
|
||||
@Override
|
||||
protected void performDone() throws Exception {
|
||||
super.performDone();
|
||||
UI.getMainWindow().getCallbackWindow().ClearBugReportDescriptionAdditionText();
|
||||
Global.mainModule.getUI().getMainWindow().getCallbackWindow().ClearBugReportDescriptionAdditionText();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ public class AppendBugReportField extends ComponentsRepositoryPass<BugReport> {
|
||||
@Override
|
||||
protected void showFinish() throws Exception {
|
||||
server.db.bugReports.RefreshUI();
|
||||
UI.getMainWindow().getCallbackWindow().ShowCurrentBugReport();
|
||||
Global.mainModule.getUI().getMainWindow().getCallbackWindow().ShowCurrentBugReport();
|
||||
}
|
||||
@Override
|
||||
protected void performDone() throws Exception {
|
||||
|
||||
@@ -40,7 +40,7 @@ public class ApplyCurrentFunction extends Pass {
|
||||
}
|
||||
@Override
|
||||
protected void showDone() throws Exception {
|
||||
UI.getMainWindow().getProjectWindow().getFunctionsWindow().ShowCurrentFunction();
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().getFunctionsWindow().ShowCurrentFunction();
|
||||
if (SPF_GetGraphFunctionPositions.showByCurrentFunction) {
|
||||
Global.mainModule.getPass(PassCode.SPF_GetGraphFunctionPositions).Do();
|
||||
}
|
||||
|
||||
@@ -55,10 +55,10 @@ public class CheckAccount extends Pass<Boolean> {
|
||||
}
|
||||
@Override
|
||||
protected void showDone() throws Exception {
|
||||
if (UI.getMainWindow() != null) {
|
||||
UI.getMainWindow().getCallbackWindow().ShowAccount();
|
||||
if (Global.mainModule.getUI().getMainWindow() != null) {
|
||||
Global.mainModule.getUI().getMainWindow().getCallbackWindow().ShowAccount();
|
||||
if (Global.mainModule.HasBugReport())
|
||||
UI.getMainWindow().getCallbackWindow().ShowCurrentBugReport();
|
||||
Global.mainModule.getUI().getMainWindow().getCallbackWindow().ShowCurrentBugReport();
|
||||
}
|
||||
if (Global.mainModule.getAccount().isAdmin())
|
||||
Global.mainModule.getPass(PassCode.PublishComponent).setControlsVisible(true);
|
||||
|
||||
@@ -17,9 +17,9 @@ public class CleanAnalyses extends CurrentProjectPass {
|
||||
@Override
|
||||
protected void showDone() throws Exception {
|
||||
super.showDone();
|
||||
UI.getMainWindow().getProjectWindow().RefreshProjectFiles();
|
||||
UI.getMainWindow().getProjectWindow().ShowNoAnalyses();
|
||||
UI.getMainWindow().getProjectWindow().ShowProjectSapforLog();
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().RefreshProjectFiles();
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().ShowNoAnalyses();
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().ShowProjectSapforLog();
|
||||
if (Global.mainModule.HasFile()) {
|
||||
Global.mainModule.getFile().form.ShowNoMessages();
|
||||
Global.mainModule.getFile().form.ShowNoAnalyses();
|
||||
|
||||
@@ -30,7 +30,7 @@ public class CloseCurrentFile extends Pass<DBProjectFile> {
|
||||
target.form.SaveSplitters();
|
||||
target.UpdateLastLine(target.form.getEditor().getCurrentLine());
|
||||
Global.mainModule.getPass(PassCode.Save).Do();
|
||||
UI.getSearchReplaceWindow().ClearMarkers();
|
||||
Global.mainModule.getUI().getSearchReplaceWindow().ClearMarkers();
|
||||
target.form = null;
|
||||
}
|
||||
@Override
|
||||
@@ -40,6 +40,6 @@ public class CloseCurrentFile extends Pass<DBProjectFile> {
|
||||
@Override
|
||||
protected void showDone() throws Exception {
|
||||
//отобразить отсутствие файла.
|
||||
UI.getMainWindow().getProjectWindow().ShowNoFile();
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().ShowNoFile();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ public class CloseCurrentProject extends Pass<db_project_info> {
|
||||
@Override
|
||||
protected void body() throws Exception {
|
||||
target.Close();
|
||||
UI.HideSearchForm();
|
||||
Global.mainModule.getUI().HideSearchForm();
|
||||
}
|
||||
@Override
|
||||
protected void performDone() throws Exception {
|
||||
@@ -44,10 +44,10 @@ public class CloseCurrentProject extends Pass<db_project_info> {
|
||||
}
|
||||
@Override
|
||||
protected void showDone() throws Exception {
|
||||
if (UI.HasMainWindow()) {
|
||||
UI.getMainWindow().ShowNoProject();
|
||||
UI.getVersionsWindow().ShowNoProjectVariants();
|
||||
UI.getVersionsWindow().BlockVariants();
|
||||
if (Global.mainModule.getUI().hasMainWindow()) {
|
||||
Global.mainModule.getUI().getMainWindow().ShowNoProject();
|
||||
Global.mainModule.getUI().getVersionsWindow().ShowNoProjectVariants();
|
||||
Global.mainModule.getUI().getVersionsWindow().BlockVariants();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,8 +50,8 @@ public class CompareDVMRunTasks extends Pass<Vector<DVMRunTask>> {
|
||||
@Override
|
||||
protected void body() throws Exception {
|
||||
if (slave != null)
|
||||
UI.getMainWindow().getTestingWindow().CompareDVMRunTasks(master, slave);
|
||||
Global.mainModule.getUI().getMainWindow().getTestingWindow().CompareDVMRunTasks(master, slave);
|
||||
else
|
||||
UI.getMainWindow().getTestingWindow().ShowDVMRunTask(master);
|
||||
Global.mainModule.getUI().getMainWindow().getTestingWindow().ShowDVMRunTask(master);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,9 +50,9 @@ public class CompareSapforPackages extends Pass<Vector<SapforPackage>> {
|
||||
@Override
|
||||
protected void body() throws Exception {
|
||||
if (slave != null)
|
||||
UI.getMainWindow().getTestingWindow().CompareSapforPackages(master, slave);
|
||||
Global.mainModule.getUI().getMainWindow().getTestingWindow().CompareSapforPackages(master, slave);
|
||||
else
|
||||
UI.getMainWindow().getTestingWindow().ShowSapforPackage(master);
|
||||
Global.mainModule.getUI().getMainWindow().getTestingWindow().ShowSapforPackage(master);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -84,6 +84,6 @@ public class Compile extends Pass<db_project_info> {
|
||||
@Override
|
||||
protected void showFinish() throws Exception {
|
||||
Global.mainModule.getDb().compilationTasks.ShowUI(compilationTask.getPK());
|
||||
UI.getDebugWindow().ShowLastCompilationTask();
|
||||
Global.mainModule.getUI().getDebugWindow().ShowLastCompilationTask();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,6 +36,6 @@ public class CreateEmptyDirectory extends ChangeFilePass {
|
||||
@Override
|
||||
protected void body() throws Exception {
|
||||
if (!dst.mkdir()) throw new PassException("Не удалось создать папку.");
|
||||
UI.getMainWindow().getProjectWindow().getFilesTreeForm().getTree().AddNode(parent_node, dst_node = new DefaultMutableTreeNode(dst));
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().getFilesTreeForm().getTree().AddNode(parent_node, dst_node = new DefaultMutableTreeNode(dst));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
package _VisualDVM.Passes.All;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
import _VisualDVM.Passes.Sapfor.VariantsMassPass;
|
||||
import _VisualDVM.ProjectData.Project.db_project_info;
|
||||
@@ -18,7 +19,7 @@ public class CreateParallelVariants extends VariantsMassPass {
|
||||
}
|
||||
@Override
|
||||
protected void FocusResult() {
|
||||
UI.getMainWindow().getProjectWindow().FocusVersions();
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().FocusVersions();
|
||||
}
|
||||
@Override
|
||||
protected void performPreparation() throws Exception {
|
||||
|
||||
@@ -133,7 +133,7 @@ public class DVMConvertProject extends ComponentsRepositoryPass<db_project_info>
|
||||
}
|
||||
@Override
|
||||
protected void showFinish() throws Exception {
|
||||
UI.getMainWindow().getProjectWindow().RefreshProjectTreeAndMessages();
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().RefreshProjectTreeAndMessages();
|
||||
if (Global.mainModule.HasFile()) {
|
||||
Global.mainModule.getFile().form.ShowCompilationOutput();
|
||||
if (!output.isEmpty())
|
||||
|
||||
@@ -11,7 +11,7 @@ public class DeleteDVMPackage extends DeleteTestingPackages<DVMPackage> {
|
||||
}
|
||||
protected void showPreparation() throws Exception {
|
||||
super.showPreparation();
|
||||
UI.getMainWindow().getTestingWindow().DropTestRunTasksComparison();
|
||||
Global.mainModule.getUI().getMainWindow().getTestingWindow().DropTestRunTasksComparison();
|
||||
}
|
||||
@Override
|
||||
protected File getPackagesHome() {
|
||||
|
||||
@@ -42,7 +42,7 @@ public class DeleteDirectory extends ChangeFilePass {
|
||||
protected void body() throws Exception {
|
||||
FileUtils.deleteDirectory(target_dir);
|
||||
if (target_dir.exists()) throw new PassException("Не удалось удалить папку");
|
||||
UI.getMainWindow().getProjectWindow().getFilesTreeForm().getTree().RemoveNode(dst_node);
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().getFilesTreeForm().getTree().RemoveNode(dst_node);
|
||||
Vector<DBProjectFile> to_delete = new Vector<>();
|
||||
for (DBProjectFile file : project.db.files.Data.values()) {
|
||||
if (Utils.isAnchestor(file.file, target_dir))
|
||||
|
||||
@@ -26,7 +26,7 @@ public class DeleteFile extends ChangeFilePass<DBProjectFile> {
|
||||
}
|
||||
@Override
|
||||
protected void body() throws Exception {
|
||||
UI.getMainWindow().getProjectWindow().getFilesTreeForm().getTree().RemoveNode(target.node);
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().getFilesTreeForm().getTree().RemoveNode(target.node);
|
||||
project.db.Delete(target);
|
||||
Utils_.forceDeleteWithCheck(target.file);
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ public class DeleteSapforPackage extends DeleteTestingPackages<SapforPackage> {
|
||||
}
|
||||
protected void showPreparation() throws Exception {
|
||||
super.showPreparation();
|
||||
UI.getMainWindow().getTestingWindow().DropSapforComparison();
|
||||
Global.mainModule.getUI().getMainWindow().getTestingWindow().DropSapforComparison();
|
||||
}
|
||||
@Override
|
||||
protected File getPackagesHome() {
|
||||
|
||||
@@ -47,7 +47,7 @@ public class DeleteSelectedFiles extends Pass {
|
||||
protected void body() throws Exception {
|
||||
for (DBProjectFile file : Global.mainModule.getProject().db.files.getCheckedItems()) {
|
||||
ShowMessage1(file.name);
|
||||
UI.getMainWindow().getProjectWindow().getFilesTreeForm().getTree().RemoveNode(file.node);
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().getFilesTreeForm().getTree().RemoveNode(file.node);
|
||||
Global.mainModule.getProject().db.Delete(file);
|
||||
Utils_.forceDeleteWithCheck(file.file);
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ public class DeleteVersion extends Pass<db_project_info> {
|
||||
Global.mainModule.getPass(PassCode.CloseCurrentProject).Do();
|
||||
}
|
||||
if (UI_.isActive()) {
|
||||
UI.getVersionsWindow().RemoveVersionFromComparison(target);
|
||||
Global.mainModule.getUI().getVersionsWindow().RemoveVersionFromComparison(target);
|
||||
}
|
||||
}
|
||||
@Override
|
||||
@@ -53,7 +53,7 @@ public class DeleteVersion extends Pass<db_project_info> {
|
||||
if (current)
|
||||
Global.mainModule.set(Current.Version, null);
|
||||
if (parent != null) {
|
||||
UI.getVersionsWindow().getVersionsForm().getTree().RemoveNode(target.node);
|
||||
Global.mainModule.getUI().getVersionsWindow().getVersionsForm().getTree().RemoveNode(target.node);
|
||||
parent.versions.remove(target.name);
|
||||
} else
|
||||
Global.mainModule.set(Current.Root, null);
|
||||
|
||||
@@ -24,7 +24,7 @@ public class DownloadDVMPackage extends DownloadDVMPackages {
|
||||
return false;
|
||||
}
|
||||
if (new File(dvmPackage.getLocalWorkspace(), Constants.LOADED).exists()) {
|
||||
UI.getMainWindow().getTestingWindow().ShowDVMPackage(dvmPackage);
|
||||
Global.mainModule.getUI().getMainWindow().getTestingWindow().ShowDVMPackage(dvmPackage);
|
||||
Global.testingServer.db.dvmRunTasks.ShowDVMPackage(dvmPackage);
|
||||
return false;
|
||||
}
|
||||
@@ -36,7 +36,7 @@ public class DownloadDVMPackage extends DownloadDVMPackages {
|
||||
}
|
||||
@Override
|
||||
protected void showDone() throws Exception {
|
||||
UI.getMainWindow().getTestingWindow().ShowDVMPackage(dvmPackage);
|
||||
Global.mainModule.getUI().getMainWindow().getTestingWindow().ShowDVMPackage(dvmPackage);
|
||||
Global.testingServer.db.dvmRunTasks.ShowDVMPackage(dvmPackage);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ public class DownloadProject extends CurrentConnectionPass {
|
||||
File local_archive;
|
||||
@Override
|
||||
protected void ServerAction() throws Exception {
|
||||
dialogOK = (UI.getRemoteFileChooser().ShowDialog(getDescription(), this, true));
|
||||
dialogOK = (Global.mainModule.getUI().getRemoteFileChooser().ShowDialog(getDescription(), this, true));
|
||||
if (dialogOK) {
|
||||
src = Global.mainModule.getRemoteFile();
|
||||
remote_archive = new RemoteFile(src.full_name, src.name + ".zip", false);
|
||||
|
||||
@@ -25,6 +25,6 @@ public class ExcludeFile extends Pass<DBProjectFile> {
|
||||
}
|
||||
@Override
|
||||
protected void showDone() throws Exception {
|
||||
UI.getMainWindow().getProjectWindow().getFilesTreeForm().getTree().RefreshNode(target.node);
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().getFilesTreeForm().getTree().RefreshNode(target.node);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package _VisualDVM.Passes.All;
|
||||
import Common.Visual.UI_;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
import _VisualDVM.Passes.Project.CurrentProjectPass;
|
||||
import _VisualDVM.Visual.UI;
|
||||
@@ -17,7 +18,7 @@ public class GenerateParallelVariants extends CurrentProjectPass {
|
||||
}
|
||||
@Override
|
||||
protected void FocusBeforeStart() {
|
||||
UI.getMainWindow().getProjectWindow().FocusVersions();
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().FocusVersions();
|
||||
}
|
||||
@Override
|
||||
protected boolean canStart(Object... args) throws Exception {
|
||||
@@ -38,7 +39,7 @@ public class GenerateParallelVariants extends CurrentProjectPass {
|
||||
}
|
||||
@Override
|
||||
protected void showPreparation() throws Exception {
|
||||
UI.getVersionsWindow().getVariantsWindow().ShowNoVariants();
|
||||
Global.mainModule.getUI().getVersionsWindow().getVariantsWindow().ShowNoVariants();
|
||||
}
|
||||
@Override
|
||||
protected void body() throws Exception {
|
||||
@@ -49,6 +50,6 @@ public class GenerateParallelVariants extends CurrentProjectPass {
|
||||
}
|
||||
@Override
|
||||
protected void showDone() throws Exception {
|
||||
UI.getVersionsWindow().getVariantsWindow().ShowVariants();
|
||||
Global.mainModule.getUI().getVersionsWindow().getVariantsWindow().ShowVariants();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,6 +25,6 @@ public class IncludeFile extends Pass<DBProjectFile> {
|
||||
}
|
||||
@Override
|
||||
protected void showDone() throws Exception {
|
||||
UI.getMainWindow().getProjectWindow().getFilesTreeForm().getTree().RefreshNode(target.node);
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().getFilesTreeForm().getTree().RefreshNode(target.node);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,6 +26,6 @@ public class OpenCurrentFile extends Pass<DBProjectFile> {
|
||||
@Override
|
||||
protected void showDone() throws Exception {
|
||||
//отобразить новый текущий файл.
|
||||
UI.getMainWindow().getProjectWindow().ShowFile();
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().ShowFile();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -126,17 +126,17 @@ public class OpenCurrentProject extends Pass<db_project_info> {
|
||||
@Override
|
||||
protected void showDone() throws Exception {
|
||||
if (root_changes)
|
||||
UI.CreateVersionsWindow();
|
||||
UI.getVersionsWindow().ShowProjectVariants();
|
||||
UI.getVersionsWindow().BlockVariants();
|
||||
Global.mainModule.getUI().CreateVersionsWindow();
|
||||
Global.mainModule.getUI().getVersionsWindow().ShowProjectVariants();
|
||||
Global.mainModule.getUI().getVersionsWindow().BlockVariants();
|
||||
//-
|
||||
UI.getMainWindow().ShowProject();
|
||||
Global.mainModule.getUI().getMainWindow().ShowProject();
|
||||
//криво. но при тихом режиме открытие файлов все равно не понадобится.
|
||||
Global.mainModule.getPass(PassCode.OpenCurrentFile).Do(target.getLastOpenedFile());
|
||||
}
|
||||
@Override
|
||||
protected void FocusResult() {
|
||||
UI.getMainWindow().FocusProject();
|
||||
Global.mainModule.getUI().getMainWindow().FocusProject();
|
||||
}
|
||||
enum Mode {
|
||||
Undefined,
|
||||
|
||||
@@ -176,7 +176,7 @@ public class Precompilation extends Pass<db_project_info> {
|
||||
}
|
||||
@Override
|
||||
protected void showPreparation() throws Exception {
|
||||
UI.getMainWindow().getProjectWindow().ShowNoAnalyses();
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().ShowNoAnalyses();
|
||||
if (Global.mainModule.HasFile()) {
|
||||
Global.mainModule.getFile().form.ShowNoMessages();
|
||||
Global.mainModule.getFile().form.ShowNoAnalyses();
|
||||
@@ -238,7 +238,7 @@ public class Precompilation extends Pass<db_project_info> {
|
||||
}
|
||||
@Override
|
||||
protected void showFinish() throws Exception {
|
||||
UI.getMainWindow().getProjectWindow().RefreshProjectTreeAndMessages();
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().RefreshProjectTreeAndMessages();
|
||||
if (Global.mainModule.HasFile()) {
|
||||
Global.mainModule.getFile().form.ShowCompilationOutput();
|
||||
Global.mainModule.getFile().form.FocusCompilationOut();
|
||||
|
||||
@@ -31,7 +31,7 @@ public class PublishBugReport extends Pass<BugReport> {
|
||||
return false;
|
||||
}
|
||||
if (target.executor.isEmpty()) {
|
||||
UI.getMainWindow().getCallbackWindow().FocusRecipients();
|
||||
Global.mainModule.getUI().getMainWindow().getCallbackWindow().FocusRecipients();
|
||||
if (!UI_.Question("Для отчёта об ошибке не назначен исполнитель.\nВсе равно опубликовать его"))
|
||||
return false;
|
||||
}
|
||||
@@ -72,6 +72,6 @@ public class PublishBugReport extends Pass<BugReport> {
|
||||
@Override
|
||||
protected void showDone() throws Exception {
|
||||
Global.componentsServer.db.bugReports.RefreshUI();
|
||||
UI.getMainWindow().getCallbackWindow().ShowCurrentBugReport();
|
||||
Global.mainModule.getUI().getMainWindow().getCallbackWindow().ShowCurrentBugReport();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -113,8 +113,8 @@ public class PublishComponent extends ComponentsRepositoryPass<Component> {
|
||||
Global.mainModule.getPass(PassCode.Email).Do(message);
|
||||
//---
|
||||
if (target.getComponentType().equals(ComponentType.Sapfor_F) && f.fields.cbAssemblyOnServer.isSelected()) {
|
||||
UI.getMainWindow().FocusTesting();
|
||||
UI.getMainWindow().getTestingWindow().FocusSapforTesting();
|
||||
Global.mainModule.getUI().getMainWindow().FocusTesting();
|
||||
Global.mainModule.getUI().getMainWindow().getTestingWindow().FocusSapforTesting();
|
||||
Global.mainModule.getPass(PassCode.CompileServerSapfor).Do();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ public abstract class PublishTests extends TestingSystemPass<Vector<Test>> {
|
||||
}
|
||||
@Override
|
||||
protected void FocusResult() {
|
||||
UI.getMainWindow().FocusTests();
|
||||
Global.mainModule.getUI().getMainWindow().FocusTests();
|
||||
}
|
||||
//--
|
||||
protected abstract PassCode getCreateTestCode();
|
||||
|
||||
@@ -87,6 +87,6 @@ public class RenameDirectory extends ChangeFilePass {
|
||||
}
|
||||
@Override
|
||||
protected void showDone() throws Exception {
|
||||
UI.getMainWindow().getProjectWindow().getFilesTreeForm().getTree().RefreshNode(dst_node);
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().getFilesTreeForm().getTree().RefreshNode(dst_node);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -65,6 +65,6 @@ public class RenameFile extends ChangeFilePass<DBProjectFile> {
|
||||
}
|
||||
@Override
|
||||
protected void showDone() throws Exception {
|
||||
UI.getMainWindow().getProjectWindow().getFilesTreeForm().getTree().RefreshNode(target.node);
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().getFilesTreeForm().getTree().RefreshNode(target.node);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -104,13 +104,13 @@ public class Run extends Pass<db_project_info> {
|
||||
}
|
||||
//-
|
||||
Global.mainModule.getDb().runTasks.RefreshUI();
|
||||
UI.getDebugWindow().ShowCurrentRunTask();
|
||||
Global.mainModule.getUI().getDebugWindow().ShowCurrentRunTask();
|
||||
//-
|
||||
if (!task_completed) break;
|
||||
++i;
|
||||
}
|
||||
if (current_task != null) {
|
||||
UI.getDebugWindow().ShowLastRunTask();
|
||||
Global.mainModule.getUI().getDebugWindow().ShowLastRunTask();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ public class SPF_GetAllDeclaratedArrays extends SapforAnalysis {
|
||||
}
|
||||
@Override
|
||||
protected void showPreparation() {
|
||||
UI.getMainWindow().getProjectWindow().getArraysWindow().ShowNoArrays();
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().getArraysWindow().ShowNoArrays();
|
||||
if (Global.mainModule.HasFile())
|
||||
Global.mainModule.getFile().form.ShowNoArrays();
|
||||
}
|
||||
@@ -54,15 +54,15 @@ public class SPF_GetAllDeclaratedArrays extends SapforAnalysis {
|
||||
}
|
||||
@Override
|
||||
protected void FocusResult() {
|
||||
UI.getMainWindow().getProjectWindow().FocusArrays();
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().FocusArrays();
|
||||
if (Global.mainModule.HasFile())
|
||||
Global.mainModule.getFile().form.FocusArrays();
|
||||
}
|
||||
@Override
|
||||
protected void showDone() throws Exception {
|
||||
UI.getMainWindow().getProjectWindow().getArraysWindow().ShowArrays();
|
||||
UI.getMainWindow().getProjectWindow().getAnalysisWindow().ShowArraysCount();
|
||||
UI.getMainWindow().getProjectWindow().getAnalysisWindow().ShowRegions();
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().getArraysWindow().ShowArrays();
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().getAnalysisWindow().ShowArraysCount();
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().getAnalysisWindow().ShowRegions();
|
||||
if (Global.mainModule.HasFile())
|
||||
Global.mainModule.getFile().form.ShowArrays();
|
||||
super.showDone();
|
||||
|
||||
@@ -18,14 +18,14 @@ public class SPF_GetArrayDistribution extends SPF_GetArrayDistributionOnlyAnalys
|
||||
@Override
|
||||
protected void showDone() throws Exception {
|
||||
super.showDone();
|
||||
UI.getVersionsWindow().UnblockVariants();
|
||||
UI.getVersionsWindow().getVariantsWindow().ShowVariants();
|
||||
Global.mainModule.getUI().getVersionsWindow().UnblockVariants();
|
||||
Global.mainModule.getUI().getVersionsWindow().getVariantsWindow().ShowVariants();
|
||||
}
|
||||
@Override
|
||||
protected void FocusResult() {
|
||||
super.FocusResult();
|
||||
UI.getMainWindow().getProjectWindow().FocusVersions();
|
||||
UI.getVersionsWindow().FocusDistribution();
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().FocusVersions();
|
||||
Global.mainModule.getUI().getVersionsWindow().FocusDistribution();
|
||||
}
|
||||
@Override
|
||||
protected boolean canStart(Object... args) throws Exception {
|
||||
|
||||
@@ -47,27 +47,27 @@ public class SPF_GetArrayDistributionOnlyAnalysis extends SapforAnalysis {
|
||||
}
|
||||
@Override
|
||||
protected void showPreparation() {
|
||||
UI.getVersionsWindow().getVariantsWindow().ShowNoProjectDistribution();
|
||||
UI.getVersionsWindow().getVariantsWindow().ShowNoVariantsFilter();
|
||||
UI.getVersionsWindow().getVariantsWindow().ShowNoVariants();
|
||||
UI.getMainWindow().getProjectWindow().getAnalysisWindow().ShowNoRegions();
|
||||
UI.getMainWindow().getProjectWindow().getAnalysisWindow().ShowNoProjectMaxDim();
|
||||
Global.mainModule.getUI().getVersionsWindow().getVariantsWindow().ShowNoProjectDistribution();
|
||||
Global.mainModule.getUI().getVersionsWindow().getVariantsWindow().ShowNoVariantsFilter();
|
||||
Global.mainModule.getUI().getVersionsWindow().getVariantsWindow().ShowNoVariants();
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().getAnalysisWindow().ShowNoRegions();
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().getAnalysisWindow().ShowNoProjectMaxDim();
|
||||
}
|
||||
@Override
|
||||
protected void showDone() throws Exception {
|
||||
UI.getVersionsWindow().getVariantsWindow().ShowProjectDistribution();
|
||||
UI.getVersionsWindow().getVariantsWindow().ShowVariantsFilter();
|
||||
UI.getVersionsWindow().getVariantsWindow().ShowTotalVariantsCount();
|
||||
UI.getVersionsWindow().getVariantsWindow().ShowFilteredVariantsCount();
|
||||
UI.getVersionsWindow().getVariantsWindow().ShowCheckedVariantsCount();
|
||||
UI.getMainWindow().getProjectWindow().getAnalysisWindow().ShowRegions();
|
||||
UI.getMainWindow().getProjectWindow().getAnalysisWindow().ShowProjectMaxDim();
|
||||
Global.mainModule.getUI().getVersionsWindow().getVariantsWindow().ShowProjectDistribution();
|
||||
Global.mainModule.getUI().getVersionsWindow().getVariantsWindow().ShowVariantsFilter();
|
||||
Global.mainModule.getUI().getVersionsWindow().getVariantsWindow().ShowTotalVariantsCount();
|
||||
Global.mainModule.getUI().getVersionsWindow().getVariantsWindow().ShowFilteredVariantsCount();
|
||||
Global.mainModule.getUI().getVersionsWindow().getVariantsWindow().ShowCheckedVariantsCount();
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().getAnalysisWindow().ShowRegions();
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().getAnalysisWindow().ShowProjectMaxDim();
|
||||
super.showDone();
|
||||
}
|
||||
@Override
|
||||
protected void FocusResult() {
|
||||
UI.getMainWindow().FocusProject();
|
||||
UI.getMainWindow().getProjectWindow().FocusAnalysis();
|
||||
Global.mainModule.getUI().getMainWindow().FocusProject();
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().FocusAnalysis();
|
||||
}
|
||||
@Override
|
||||
public String getDescription() {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package _VisualDVM.Passes.All;
|
||||
import Common.Utils.Index;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Passes.Sapfor.SapforAnalysis;
|
||||
import _VisualDVM.ProjectData.SapforData.Regions.ParallelRegion;
|
||||
import _VisualDVM.Visual.UI;
|
||||
@@ -33,16 +34,16 @@ public class SPF_GetArrayDistributionOnlyRegions extends SapforAnalysis {
|
||||
}
|
||||
@Override
|
||||
protected void showPreparation() {
|
||||
UI.getMainWindow().getProjectWindow().getAnalysisWindow().ShowNoRegions();
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().getAnalysisWindow().ShowNoRegions();
|
||||
}
|
||||
@Override
|
||||
protected void showDone() throws Exception {
|
||||
UI.getMainWindow().getProjectWindow().getAnalysisWindow().ShowRegions();
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().getAnalysisWindow().ShowRegions();
|
||||
super.showDone();
|
||||
}
|
||||
@Override
|
||||
protected void FocusResult() {
|
||||
UI.getMainWindow().FocusProject();
|
||||
UI.getMainWindow().getProjectWindow().FocusAnalysis();
|
||||
Global.mainModule.getUI().getMainWindow().FocusProject();
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().FocusAnalysis();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package _VisualDVM.Passes.All;
|
||||
import Common.Utils.Utils_;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Passes.Sapfor.SapforAnalysis;
|
||||
import _VisualDVM.ProjectData.Files.DBProjectFile;
|
||||
import _VisualDVM.Visual.UI;
|
||||
@@ -17,7 +18,7 @@ public class SPF_GetFileLineInfo extends SapforAnalysis {
|
||||
}
|
||||
@Override
|
||||
protected void showPreparation() throws Exception {
|
||||
UI.getMainWindow().getProjectWindow().getAnalysisWindow().ShowNoMetrics();
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().getAnalysisWindow().ShowNoMetrics();
|
||||
}
|
||||
@Override
|
||||
protected void unpack(String packed) throws Exception {
|
||||
@@ -44,12 +45,12 @@ public class SPF_GetFileLineInfo extends SapforAnalysis {
|
||||
}
|
||||
@Override
|
||||
protected void showDone() throws Exception {
|
||||
UI.getMainWindow().getProjectWindow().getAnalysisWindow().ShowMetrics();
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().getAnalysisWindow().ShowMetrics();
|
||||
super.showDone();
|
||||
}
|
||||
@Override
|
||||
protected void FocusResult() {
|
||||
super.FocusResult();
|
||||
UI.getMainWindow().getProjectWindow().FocusAnalysis();
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().FocusAnalysis();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ public class SPF_GetGraphFunctionPositions extends SilentSapforPass {
|
||||
}
|
||||
@Override
|
||||
protected void showPreparation() {
|
||||
UI.getMainWindow().getProjectWindow().ShowNoFunctions();
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().ShowNoFunctions();
|
||||
}
|
||||
@Override
|
||||
protected void performDone() throws Exception {
|
||||
@@ -125,7 +125,7 @@ public class SPF_GetGraphFunctionPositions extends SilentSapforPass {
|
||||
return res;
|
||||
}
|
||||
public String packFgSettings() {
|
||||
Pair<Integer, Integer> screenDims = UI.getMainWindow().getProjectWindow().getFunctionsWindow().getFunctionsGraphPanelSizes();
|
||||
Pair<Integer, Integer> screenDims = Global.mainModule.getUI().getMainWindow().getProjectWindow().getFunctionsWindow().getFunctionsGraphPanelSizes();
|
||||
int x = (int) (screenDims.getKey() * target.fgScreen);
|
||||
int y = (int) (screenDims.getValue() * target.fgScreen);
|
||||
Vector<String> visibleFuncNames = new Vector<>();
|
||||
@@ -269,6 +269,6 @@ public class SPF_GetGraphFunctionPositions extends SilentSapforPass {
|
||||
}
|
||||
@Override
|
||||
protected void showDone() throws Exception {
|
||||
UI.getMainWindow().getProjectWindow().ShowFunctions();
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().ShowFunctions();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,9 +18,9 @@ public class SPF_GetGraphFunctions extends SapforAnalysis {
|
||||
protected void showPreparation() {
|
||||
if (Global.mainModule.HasFile())
|
||||
Global.mainModule.getFile().form.ShowNoFunctions();
|
||||
UI.getMainWindow().getProjectWindow().ShowNoFunctions();
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().ShowNoFunctions();
|
||||
if (SPF_GetGraphFunctionPositions.showByCurrentFunction)
|
||||
UI.getMainWindow().getProjectWindow().getFunctionsWindow().ShowNoCurrentFunction();
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().getFunctionsWindow().ShowNoCurrentFunction();
|
||||
}
|
||||
@Override
|
||||
protected boolean alwaysCheck() {
|
||||
@@ -132,13 +132,13 @@ public class SPF_GetGraphFunctions extends SapforAnalysis {
|
||||
super.FocusResult();
|
||||
if (Global.mainModule.HasFile())
|
||||
Global.mainModule.getFile().form.FocusFunctions();
|
||||
UI.getMainWindow().getProjectWindow().FocusFunctions();
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().FocusFunctions();
|
||||
}
|
||||
@Override
|
||||
protected void showDone() throws Exception {
|
||||
super.showDone();
|
||||
UI.getMainWindow().getProjectWindow().getAnalysisWindow().ShowFunctionsCount();
|
||||
UI.getMainWindow().getProjectWindow().getAnalysisWindow().ShowRegions();
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().getAnalysisWindow().ShowFunctionsCount();
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().getAnalysisWindow().ShowRegions();
|
||||
if (Global.mainModule.HasFile())
|
||||
Global.mainModule.getFile().form.ShowFunctions();
|
||||
Global.mainModule.getPass(PassCode.SPF_GetGraphFunctionPositions).Do();
|
||||
|
||||
@@ -66,8 +66,8 @@ public class SPF_GetGraphLoops extends SapforAnalysis {
|
||||
}
|
||||
@Override
|
||||
protected void showDone() throws Exception {
|
||||
UI.getMainWindow().getProjectWindow().getAnalysisWindow().ShowLoopsCount();
|
||||
UI.getMainWindow().getProjectWindow().getAnalysisWindow().ShowRegions();
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().getAnalysisWindow().ShowLoopsCount();
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().getAnalysisWindow().ShowRegions();
|
||||
if (Global.mainModule.HasFile())
|
||||
Global.mainModule.getFile().form.ShowLoops();
|
||||
super.showDone();
|
||||
|
||||
@@ -95,18 +95,18 @@ public class SPF_GetIncludeDependencies extends SapforAnalysis {
|
||||
}
|
||||
@Override
|
||||
protected void showDone() throws Exception {
|
||||
UI.getMainWindow().getProjectWindow().ShowIncludes();
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().ShowIncludes();
|
||||
if (update_current)
|
||||
Global.mainModule.getFile().form.ShowProperties();
|
||||
super.showDone();
|
||||
}
|
||||
@Override
|
||||
protected void showPreparation() {
|
||||
UI.getMainWindow().getProjectWindow().ShowNoIncludes();
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().ShowNoIncludes();
|
||||
}
|
||||
@Override
|
||||
protected void FocusResult() {
|
||||
super.FocusResult();
|
||||
UI.getMainWindow().getProjectWindow().FocusDependencies();
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().FocusDependencies();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ public class SPF_InlineProcedures extends SapforTransformation {
|
||||
}
|
||||
@Override
|
||||
protected void FocusBeforeStart() {
|
||||
UI.getMainWindow().getProjectWindow().FocusPoints();
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().FocusPoints();
|
||||
}
|
||||
@Override
|
||||
protected void performFinish() throws Exception {
|
||||
|
||||
@@ -86,6 +86,6 @@ public class SPF_InlineProceduresH extends SapforTransformation {
|
||||
}
|
||||
@Override
|
||||
protected void FocusBeforeStart() {
|
||||
UI.getMainWindow().getProjectWindow().FocusHierarchy();
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().FocusHierarchy();
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package _VisualDVM.Passes.All;
|
||||
import Common.Utils.Utils_;
|
||||
import Common.Visual.Selectable;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
import _VisualDVM.Passes.Sapfor.SapforTransformation;
|
||||
import _VisualDVM.ProjectData.SapforData.Includes.DependencyInfo;
|
||||
@@ -42,6 +43,6 @@ public class SPF_InsertIncludesPass extends SapforTransformation {
|
||||
}
|
||||
@Override
|
||||
protected void FocusBeforeStart() {
|
||||
UI.getMainWindow().getProjectWindow().FocusDependencies();
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().FocusDependencies();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -100,6 +100,6 @@ public class SPF_ModifyArrayDistribution extends SapforModification {
|
||||
//показать журнал.
|
||||
@Override
|
||||
protected void showFinish() throws Exception {
|
||||
UI.getMainWindow().getProjectWindow().ShowProjectSapforLog();
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().ShowProjectSapforLog();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -140,7 +140,7 @@ public class SPF_ParseFilesWithOrder extends SapforAnalysis {
|
||||
@Override
|
||||
protected void showPreparation() throws Exception {
|
||||
if (!precompilation_done) {
|
||||
UI.getMainWindow().getProjectWindow().ShowNoAnalyses();
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().ShowNoAnalyses();
|
||||
if (Global.mainModule.HasFile()) {
|
||||
Global.mainModule.getFile().form.ShowNoMessages();
|
||||
Global.mainModule.getFile().form.ShowNoAnalyses();
|
||||
@@ -179,7 +179,7 @@ public class SPF_ParseFilesWithOrder extends SapforAnalysis {
|
||||
@Override
|
||||
protected void showFinish() throws Exception {
|
||||
super.showFinish();
|
||||
UI.getMainWindow().getProjectWindow().ShowAllAnalyses();
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().ShowAllAnalyses();
|
||||
if (Global.mainModule.HasFile())
|
||||
Global.mainModule.getFile().form.ShowAllAnalyses();
|
||||
}
|
||||
@@ -190,7 +190,7 @@ public class SPF_ParseFilesWithOrder extends SapforAnalysis {
|
||||
@Override
|
||||
protected void FocusResult() {
|
||||
super.FocusResult();
|
||||
UI.getMainWindow().getProjectWindow().FocusFile();
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().FocusFile();
|
||||
}
|
||||
@Override
|
||||
protected void performFail() throws Exception {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
package _VisualDVM.Passes.All;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Visual.UI;
|
||||
public class SaveBugReportComment extends UpdateBugReportField {
|
||||
@Override
|
||||
@@ -11,6 +12,6 @@ public class SaveBugReportComment extends UpdateBugReportField {
|
||||
}
|
||||
@Override
|
||||
protected boolean canStart(Object... args) throws Exception {
|
||||
return super.canStart("comment", UI.getMainWindow().getCallbackWindow().getBugReportCommentText());
|
||||
return super.canStart("comment", Global.mainModule.getUI().getMainWindow().getCallbackWindow().getBugReportCommentText());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
package _VisualDVM.Passes.All;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Visual.UI;
|
||||
public class SaveBugReportDescription extends UpdateBugReportField {
|
||||
@Override
|
||||
@@ -11,6 +12,6 @@ public class SaveBugReportDescription extends UpdateBugReportField {
|
||||
}
|
||||
@Override
|
||||
protected boolean canStart(Object... args) throws Exception {
|
||||
return super.canStart("description", UI.getMainWindow().getCallbackWindow().getBugReportDescriptionText());
|
||||
return super.canStart("description", Global.mainModule.getUI().getMainWindow().getCallbackWindow().getBugReportDescriptionText());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ public class SaveFunctionsGraphCoordinates extends Pass {
|
||||
}
|
||||
@Override
|
||||
protected boolean canStart(Object... args) {
|
||||
graphForm = UI.getMainWindow().getProjectWindow().getFunctionsWindow().getFunctionsGraphWindow();
|
||||
graphForm = Global.mainModule.getUI().getMainWindow().getProjectWindow().getFunctionsWindow().getFunctionsGraphWindow();
|
||||
if (!graphForm.isShown())
|
||||
Log.Writeln_("Сначала отобразите граф");
|
||||
if (Global.mainModule.getProject().functionsGraph.isEmpty())
|
||||
|
||||
@@ -31,7 +31,7 @@ public class SaveGraph extends Pass<File> {
|
||||
}
|
||||
@Override
|
||||
protected boolean canStart(Object... args) {
|
||||
graphForm = UI.getMainWindow().getProjectWindow().getFunctionsWindow().getFunctionsGraphWindow();
|
||||
graphForm = Global.mainModule.getUI().getMainWindow().getProjectWindow().getFunctionsWindow().getFunctionsGraphWindow();
|
||||
if (!graphForm.isShown())
|
||||
Log.Writeln_("Сначала отобразите граф");
|
||||
if (Global.mainModule.getProject().functionsGraph.isEmpty())
|
||||
|
||||
@@ -16,7 +16,7 @@ public class SelectRemoteFile extends CurrentConnectionPass {
|
||||
return false;
|
||||
}
|
||||
protected void ServerAction() throws Exception {
|
||||
dialogOK = (UI.getRemoteFileChooser().ShowDialog("Выбор " + (needs_directory ? "папки" : "файла"), this, needs_directory));
|
||||
dialogOK = (Global.mainModule.getUI().getRemoteFileChooser().ShowDialog("Выбор " + (needs_directory ? "папки" : "файла"), this, needs_directory));
|
||||
}
|
||||
@Override
|
||||
protected boolean validate() {
|
||||
|
||||
@@ -47,8 +47,8 @@ public class SynchronizeBugReports extends ComponentsRepositoryPass<Object> {
|
||||
}
|
||||
@Override
|
||||
protected void showDone() throws Exception {
|
||||
if (UI.HasMainWindow()) {
|
||||
UI.getMainWindow().getCallbackWindow().ShowBugReports();
|
||||
if (Global.mainModule.getUI().hasMainWindow()) {
|
||||
Global.mainModule.getUI().getMainWindow().getCallbackWindow().ShowBugReports();
|
||||
Global.componentsServer.db.bugReports.RestoreLastSelections();
|
||||
server.db.subscribers.RestoreLastSelections();
|
||||
server.db.workspaces.RestoreLastSelections();
|
||||
|
||||
@@ -61,7 +61,7 @@ public class SynchronizeTests extends TestingSystemPass<Object> {
|
||||
}
|
||||
@Override
|
||||
protected void showDone() throws Exception {
|
||||
if (UI.HasMainWindow()) {
|
||||
if (Global.mainModule.getUI().hasMainWindow()) {
|
||||
//server.db.machines
|
||||
server.db.dvm_configurations.ShowUI();
|
||||
server.db.groups.ShowUI();
|
||||
@@ -72,7 +72,7 @@ public class SynchronizeTests extends TestingSystemPass<Object> {
|
||||
server.db.sapforSettings.ShowUI();
|
||||
server.db.dvmSettings.ShowUI();
|
||||
server.db.RestoreLastSelections(); //---- ? объединить с RestoreCredentials
|
||||
UI.getMainWindow().ShowCheckedTestsCount();
|
||||
Global.mainModule.getUI().getMainWindow().ShowCheckedTestsCount();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ public class UpdateBugReportField extends ComponentsRepositoryPass<BugReport> {
|
||||
target.change_date = new Date().getTime();
|
||||
server.db.Update(target);
|
||||
server.db.bugReports.RefreshUI();
|
||||
UI.getMainWindow().getCallbackWindow().ShowCurrentBugReport();
|
||||
Global.mainModule.getUI().getMainWindow().getCallbackWindow().ShowCurrentBugReport();
|
||||
} else
|
||||
return canUpdate();
|
||||
return false;
|
||||
@@ -86,7 +86,7 @@ public class UpdateBugReportField extends ComponentsRepositoryPass<BugReport> {
|
||||
@Override
|
||||
protected void showFinish() throws Exception {
|
||||
Global.componentsServer.db.bugReports.RefreshUI();
|
||||
UI.getMainWindow().getCallbackWindow().ShowCurrentBugReport();
|
||||
Global.mainModule.getUI().getMainWindow().getCallbackWindow().ShowCurrentBugReport();
|
||||
}
|
||||
@Override
|
||||
protected void performDone() throws Exception {
|
||||
|
||||
@@ -31,15 +31,15 @@ public class UpdateProperty extends Pass<Object> {
|
||||
switch (name) {
|
||||
case "collapseCredentials":
|
||||
if ((boolean) newValue)
|
||||
UI.getMainWindow().getTestingWindow().CollapseCredentials();
|
||||
Global.mainModule.getUI().getMainWindow().getTestingWindow().CollapseCredentials();
|
||||
else
|
||||
UI.getMainWindow().getTestingWindow().ExpandCredentials();
|
||||
Global.mainModule.getUI().getMainWindow().getTestingWindow().ExpandCredentials();
|
||||
break;
|
||||
case "collapseProjectTrees":
|
||||
if (Global.mainModule.HasProject()) {
|
||||
if ((boolean) newValue)
|
||||
UI.getMainWindow().getProjectWindow().CollapseProjectTrees();
|
||||
else UI.getMainWindow().getProjectWindow().ExpandProjectTrees();
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().CollapseProjectTrees();
|
||||
else Global.mainModule.getUI().getMainWindow().getProjectWindow().ExpandProjectTrees();
|
||||
}
|
||||
break;
|
||||
case "collapseFileGraphs":
|
||||
|
||||
@@ -127,9 +127,9 @@ public class UpdateSetting extends Pass<DBSetting> {
|
||||
Global.mainModule.getProject().declaratedArrays.ShowUI();
|
||||
break;
|
||||
case ShowFullTabsNames:
|
||||
UI.getMainWindow().getTestingWindow().RefreshTabsNames();
|
||||
Global.mainModule.getUI().getMainWindow().getTestingWindow().RefreshTabsNames();
|
||||
if (Global.mainModule.HasProject())
|
||||
UI.getMainWindow().getProjectWindow().RefreshTabsNames();
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().RefreshTabsNames();
|
||||
if (Global.mainModule.HasFile())
|
||||
Global.mainModule.getFile().form.RefreshTabsNames();
|
||||
break;
|
||||
@@ -141,8 +141,8 @@ public class UpdateSetting extends Pass<DBSetting> {
|
||||
case SmallScreen:
|
||||
boolean small = target.toBoolean();
|
||||
if (Global.mainModule.HasProject())
|
||||
UI.getMainWindow().getProjectWindow().SwitchScreen(small);
|
||||
UI.getMainWindow().getCallbackWindow().SwitchScreen(small);
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().SwitchScreen(small);
|
||||
Global.mainModule.getUI().getMainWindow().getCallbackWindow().SwitchScreen(small);
|
||||
break;
|
||||
case Precompilation:
|
||||
Global.mainModule.getSapfor().ResetAllAnalyses();
|
||||
|
||||
@@ -33,6 +33,6 @@ public abstract class FilesMassPass<T> extends Pass<T> {
|
||||
protected abstract void operation(DBProjectFile file);
|
||||
@Override
|
||||
protected void showFinish() throws Exception {
|
||||
UI.getMainWindow().getProjectWindow().RefreshProjectFiles();
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().RefreshProjectFiles();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -156,7 +156,7 @@ public class SapforAnalysis extends SapforPass {
|
||||
}
|
||||
@Override
|
||||
protected void FocusResult() {
|
||||
UI.getMainWindow().FocusProject();
|
||||
Global.mainModule.getUI().getMainWindow().FocusProject();
|
||||
}
|
||||
@Override
|
||||
protected void unpackMessages() throws Exception {
|
||||
|
||||
@@ -19,8 +19,8 @@ public class SapforPass extends SilentSapforPass {
|
||||
}
|
||||
@Override
|
||||
protected void showFinish() throws Exception {
|
||||
UI.getMainWindow().getProjectWindow().RefreshProjectTreeAndMessages();
|
||||
UI.getMainWindow().getProjectWindow().ShowProjectSapforLog();
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().RefreshProjectTreeAndMessages();
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().ShowProjectSapforLog();
|
||||
}
|
||||
@Override
|
||||
public void Interrupt() throws Exception {
|
||||
|
||||
@@ -67,7 +67,7 @@ public class SapforTransformation extends SapforPass {
|
||||
}
|
||||
@Override
|
||||
protected void FocusResult() {
|
||||
UI.getMainWindow().getProjectWindow().FocusVersions();
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().FocusVersions();
|
||||
}
|
||||
@Override
|
||||
protected void performFail() throws Exception {
|
||||
@@ -78,7 +78,7 @@ public class SapforTransformation extends SapforPass {
|
||||
protected void showFinish() throws Exception {
|
||||
super.showFinish();
|
||||
Global.mainModule.set(Current.ProjectView, ProjectView.Files);
|
||||
UI.getMainWindow().getProjectWindow().ShowProjectView();
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().ShowProjectView();
|
||||
}
|
||||
@Override
|
||||
protected boolean canStart(Object... args) throws Exception {
|
||||
|
||||
@@ -35,13 +35,13 @@ public class Transformation extends CurrentProjectPass {
|
||||
}
|
||||
@Override
|
||||
protected void FocusResult() {
|
||||
UI.getMainWindow().getProjectWindow().FocusVersions();
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().FocusVersions();
|
||||
}
|
||||
@Override
|
||||
protected void showFinish() throws Exception {
|
||||
super.showFinish();
|
||||
Global.mainModule.set(Current.ProjectView, ProjectView.Files);
|
||||
UI.getMainWindow().getProjectWindow().ShowProjectView();
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().ShowProjectView();
|
||||
}
|
||||
@Override
|
||||
protected void performDone() throws Exception {
|
||||
|
||||
@@ -50,15 +50,15 @@ public abstract class VariantsMassPass extends CurrentProjectPass {
|
||||
}
|
||||
@Override
|
||||
protected void showFinish() throws Exception {
|
||||
UI.getVersionsWindow().getVariantsWindow().RefreshVariants();
|
||||
UI.getMainWindow().getProjectWindow().RefreshProjectFiles();
|
||||
UI.getMainWindow().getProjectWindow().ShowProjectSapforLog();
|
||||
Global.mainModule.getUI().getVersionsWindow().getVariantsWindow().RefreshVariants();
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().RefreshProjectFiles();
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().ShowProjectSapforLog();
|
||||
//-
|
||||
DBProjectFile badFile = target.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())
|
||||
|
||||
@@ -77,10 +77,10 @@ public class SPFEditor extends BaseEditor implements SPFEditorInterface {
|
||||
if (e.isControlDown()) {
|
||||
switch (e.getKeyCode()) {
|
||||
case KeyEvent.VK_F:
|
||||
UI.ShowSearchForm(false);
|
||||
Global.mainModule.getUI().ShowSearchForm(false);
|
||||
break;
|
||||
case KeyEvent.VK_H:
|
||||
UI.ShowSearchForm(true);
|
||||
Global.mainModule.getUI().ShowSearchForm(true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package _VisualDVM.ProjectData.Files.UI;
|
||||
import Common.MainModule_;
|
||||
import Common.Visual.Fonts.VisualiserFonts;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Visual.UI;
|
||||
|
||||
import javax.swing.*;
|
||||
@@ -36,7 +37,7 @@ public class FilesHyperlinksPanel extends JPanel {
|
||||
String[] data = links.get(index).split(":");
|
||||
String file = data[0];
|
||||
int line = Integer.parseInt(data[1]);
|
||||
UI.getMainWindow().getProjectWindow().GotoFile(file, line, true);
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().GotoFile(file, line, true);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -70,14 +70,14 @@ public class FilesTree extends StyledTree {
|
||||
if (o instanceof File) {
|
||||
Global.mainModule.set(Current.SelectedDirectory, o);
|
||||
Global.mainModule.set(Current.SelectedFile, null);
|
||||
UI.getMainWindow().getProjectWindow().ShowNoSelectedFile();
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().ShowNoSelectedFile();
|
||||
} else if (o instanceof DBProjectFile) {
|
||||
Global.mainModule.set(Current.SelectedFile, o);
|
||||
File file = ((DBProjectFile) o).file;
|
||||
Global.mainModule.set(Current.SelectedDirectory, file.getParentFile());
|
||||
UI.getMainWindow().getProjectWindow().ShowSelectedFile();
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().ShowSelectedFile();
|
||||
}
|
||||
UI.getMainWindow().getProjectWindow().ShowSelectedDirectory();
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().ShowSelectedDirectory();
|
||||
}
|
||||
@Override
|
||||
public void LeftMouseAction2() {
|
||||
@@ -86,7 +86,7 @@ public class FilesTree extends StyledTree {
|
||||
if (o instanceof DBProjectFile) {
|
||||
//очень важно. иначе по открытии файла дерево остается в фокусе.
|
||||
//и не происходит прокрутки скролла к строке!!
|
||||
UI.getMainWindow().getProjectWindow().FocusFileTabs();
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().FocusFileTabs();
|
||||
Global.mainModule.getPass(PassCode.OpenCurrentFile).Do(o);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -891,7 +891,7 @@ public class db_project_info extends DBObject {
|
||||
newVersions.add(version);
|
||||
//--->>
|
||||
versions.put(version.name, version);
|
||||
UI.getVersionsWindow().getVersionsForm().getTree().AddNode(node, version.node = new DefaultMutableTreeNode(version));
|
||||
Global.mainModule.getUI().getVersionsWindow().getVersionsForm().getTree().AddNode(node, version.node = new DefaultMutableTreeNode(version));
|
||||
SaveVersionToBuild("");
|
||||
}
|
||||
public void SaveVersionToBuild(String v_name) throws Exception {
|
||||
@@ -1081,14 +1081,14 @@ public class db_project_info extends DBObject {
|
||||
public void undoLastTransformation() throws Exception {
|
||||
Global.mainModule.set(Current.Version, null);
|
||||
//---
|
||||
UI.getVersionsWindow().getVersionsForm().getTree().RemoveNode(last_version.node);
|
||||
Global.mainModule.getUI().getVersionsWindow().getVersionsForm().getTree().RemoveNode(last_version.node);
|
||||
Utils_.forceDeleteWithCheck(last_version.Home);
|
||||
versions.remove(last_version.name);
|
||||
last_version = null;
|
||||
//---
|
||||
if (last_modification != null) {
|
||||
Utils_.forceDeleteWithCheck(last_modification.Home);
|
||||
UI.getVersionsWindow().getVersionsForm().getTree().RemoveNode(last_modification.node);
|
||||
Global.mainModule.getUI().getVersionsWindow().getVersionsForm().getTree().RemoveNode(last_modification.node);
|
||||
versions.remove(last_modification.name);
|
||||
last_modification = null;
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package _VisualDVM.ProjectData.SapforData.Arrays.UI;
|
||||
import Common.MainModule_;
|
||||
import Common.Visual.Fonts.VisualiserFonts;
|
||||
import Common.Visual.Tables.DBObjectEditor;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.ProjectData.SapforData.Arrays.Templates.TemplateDimension;
|
||||
import _VisualDVM.Visual.UI;
|
||||
|
||||
@@ -20,6 +21,6 @@ public class DimensionStateChanger extends DBObjectEditor<TemplateDimension> {
|
||||
setFont(MainModule_.instance.getUI().getTheme().Fonts.get(VisualiserFonts.Hyperlink));
|
||||
value.SwitchState();
|
||||
setText(value.state.getMaskDescription());
|
||||
UI.getVersionsWindow().getVariantsWindow().ShowFilteredVariantsCount();
|
||||
Global.mainModule.getUI().getVersionsWindow().getVariantsWindow().ShowFilteredVariantsCount();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,6 +24,6 @@ public abstract class FileObject extends iDBObject {
|
||||
return Global.mainModule.getProject().db.files.Data.get(file);
|
||||
}
|
||||
public void Show(boolean focus) {
|
||||
UI.getMainWindow().getProjectWindow().GotoFile(file, line, focus);
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().GotoFile(file, line, focus);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ public class FunctionsGraphMenu extends StyledPopupMenu {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
if (Global.mainModule.HasSelectedFunction()) {
|
||||
Global.mainModule.set(Current.Function, Global.mainModule.getSelectionFunction());
|
||||
UI.getMainWindow().getProjectWindow().getFunctionsWindow().ShowCurrentFunction();
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().getFunctionsWindow().ShowCurrentFunction();
|
||||
if (SPF_GetGraphFunctionPositions.showByCurrentFunction) {
|
||||
Global.mainModule.getPass(PassCode.SPF_GetGraphFunctionPositions).Do();
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package _VisualDVM.ProjectData.SapforData.Variants;
|
||||
import Common.Database.Objects.DBObject;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.ProjectData.PredictorStatistic.PredictorStatistics_2021;
|
||||
import _VisualDVM.ProjectData.Project.db_project_info;
|
||||
import _VisualDVM.ProjectData.SapforData.Arrays.ProjectArray;
|
||||
@@ -79,7 +80,7 @@ public class ParallelVariant extends DBObject {
|
||||
@Override
|
||||
public void Select(boolean flag) {
|
||||
super.Select(flag);
|
||||
UI.getVersionsWindow().getVariantsWindow().ShowCheckedVariantsCount();
|
||||
Global.mainModule.getUI().getVersionsWindow().getVariantsWindow().ShowCheckedVariantsCount();
|
||||
}
|
||||
public File restoreProject() {
|
||||
project = null;
|
||||
|
||||
@@ -32,12 +32,12 @@ public class BugReportsDBTable extends DBTable<String, BugReport> {
|
||||
@Override
|
||||
public void ShowCurrentObject() throws Exception {
|
||||
super.ShowCurrentObject();
|
||||
UI.getMainWindow().getCallbackWindow().ShowCurrentBugReport();
|
||||
Global.mainModule.getUI().getMainWindow().getCallbackWindow().ShowCurrentBugReport();
|
||||
}
|
||||
@Override
|
||||
public void ShowNoCurrentObject() throws Exception {
|
||||
super.ShowNoCurrentObject();
|
||||
UI.getMainWindow().getCallbackWindow().ShowNoCurrentBugReport();
|
||||
Global.mainModule.getUI().getMainWindow().getCallbackWindow().ShowNoCurrentBugReport();
|
||||
}
|
||||
@Override
|
||||
protected void AdditionalInitColumns() {
|
||||
|
||||
@@ -561,8 +561,8 @@ public abstract class Sapfor extends OSDComponent {
|
||||
}
|
||||
Global.enable_text_changed = false;
|
||||
Global.transformationPermission = TransformationPermission.None;
|
||||
if ((UI_.isActive()) && (UI.HasMainWindow()) && (UI.getVersionsWindow() != null))
|
||||
UI.getVersionsWindow().BlockVariants();
|
||||
if ((UI_.isActive()) && (Global.mainModule.getUI().hasMainWindow()) && (Global.mainModule.getUI().getVersionsWindow() != null))
|
||||
Global.mainModule.getUI().getVersionsWindow().BlockVariants();
|
||||
}
|
||||
//--------------------------------------------------------------------------->>
|
||||
//временный (?) проход, по тихому получить размерность теста, предварительно выполнив тихий парс.
|
||||
|
||||
@@ -90,7 +90,7 @@ public class Group extends riDBObject {
|
||||
public void select(boolean flag) {
|
||||
super.select(flag);
|
||||
if (UI_.isActive())
|
||||
UI.getMainWindow().ShowCheckedTestsCount();
|
||||
Global.mainModule.getUI().getMainWindow().ShowCheckedTestsCount();
|
||||
}
|
||||
public String GenerateMakefile(Test test, String dvm_drv, String flags_in) {
|
||||
//----->>
|
||||
|
||||
@@ -55,7 +55,7 @@ public class Test extends riDBObject {
|
||||
public void select(boolean flag) {
|
||||
super.select(flag);
|
||||
if (UI_.isActive())
|
||||
UI.getMainWindow().ShowCheckedTestsCount();
|
||||
Global.mainModule.getUI().getMainWindow().ShowCheckedTestsCount();
|
||||
}
|
||||
//---
|
||||
@Override
|
||||
|
||||
@@ -51,14 +51,14 @@ public class DVMPackageDBTable extends iDBTable<DVMPackage> {
|
||||
super.ShowCurrentObject();
|
||||
//--
|
||||
Global.testingServer.db.dvmRunTasks.ShowDVMPackage(getCurrent());
|
||||
UI.getMainWindow().getTestingWindow().DropTestRunTasksComparison();
|
||||
Global.mainModule.getUI().getMainWindow().getTestingWindow().DropTestRunTasksComparison();
|
||||
//--
|
||||
}
|
||||
@Override
|
||||
public void ShowNoCurrentObject() throws Exception {
|
||||
super.ShowNoCurrentObject();
|
||||
Global.testingServer.db.dvmRunTasks.ShowNoPackage();
|
||||
UI.getMainWindow().getTestingWindow().DropTestRunTasksComparison();
|
||||
Global.mainModule.getUI().getMainWindow().getTestingWindow().DropTestRunTasksComparison();
|
||||
}
|
||||
@Override
|
||||
public void MouseAction2() throws Exception {
|
||||
|
||||
@@ -62,9 +62,9 @@ public class SapforTasksPackageTree extends DataTree {
|
||||
SapforVersion_json version = (SapforVersion_json) o;
|
||||
Global.mainModule.set(current, version);
|
||||
if (current.equals(Current.SapforEtalonVersion))
|
||||
UI.getMainWindow().getTestingWindow().ShowCurrentSapforPackageVersionEtalon();
|
||||
Global.mainModule.getUI().getMainWindow().getTestingWindow().ShowCurrentSapforPackageVersionEtalon();
|
||||
else
|
||||
UI.getMainWindow().getTestingWindow().ShowCurrentSapforPackageVersion();
|
||||
Global.mainModule.getUI().getMainWindow().getTestingWindow().ShowCurrentSapforPackageVersion();
|
||||
//--
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ import Common.Database.Tables.iDBTable;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import Common.Visual.Tables.TableRenderers;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Visual.UI;
|
||||
|
||||
import java.util.Comparator;
|
||||
@@ -52,12 +53,12 @@ public class ServerSapforsDBTable extends iDBTable<ServerSapfor> {
|
||||
@Override
|
||||
public void ShowCurrentObject() throws Exception {
|
||||
super.ShowCurrentObject();
|
||||
UI.getMainWindow().getTestingWindow().ShowCurrentServerSapfor();
|
||||
Global.mainModule.getUI().getMainWindow().getTestingWindow().ShowCurrentServerSapfor();
|
||||
}
|
||||
@Override
|
||||
public void ShowNoCurrentObject() throws Exception {
|
||||
super.ShowNoCurrentObject();
|
||||
UI.getMainWindow().getTestingWindow().ShowNoServerSapfor();
|
||||
Global.mainModule.getUI().getMainWindow().getTestingWindow().ShowNoServerSapfor();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package _VisualDVM.Visual.Interface;
|
||||
import Common.Visual.Trees.TreeForm;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Visual.UI;
|
||||
public interface ProjectWindow {
|
||||
//-
|
||||
@@ -28,12 +29,12 @@ public interface ProjectWindow {
|
||||
ShowFunctions();
|
||||
getArraysWindow().ShowArrays();
|
||||
//------------------------------>>
|
||||
UI.getVersionsWindow().getVariantsWindow().ShowVariantsFilterButtons();
|
||||
UI.getVersionsWindow().getVariantsWindow().ShowProjectDistribution();
|
||||
UI.getVersionsWindow().getVariantsWindow().ShowVariantsFilter();
|
||||
UI.getVersionsWindow().getVariantsWindow().ShowTotalVariantsCount();
|
||||
UI.getVersionsWindow().getVariantsWindow().ShowFilteredVariantsCount();
|
||||
UI.getVersionsWindow().getVariantsWindow().ShowCheckedVariantsCount();
|
||||
Global.mainModule.getUI().getVersionsWindow().getVariantsWindow().ShowVariantsFilterButtons();
|
||||
Global.mainModule.getUI().getVersionsWindow().getVariantsWindow().ShowProjectDistribution();
|
||||
Global.mainModule.getUI().getVersionsWindow().getVariantsWindow().ShowVariantsFilter();
|
||||
Global.mainModule.getUI().getVersionsWindow().getVariantsWindow().ShowTotalVariantsCount();
|
||||
Global.mainModule.getUI().getVersionsWindow().getVariantsWindow().ShowFilteredVariantsCount();
|
||||
Global.mainModule.getUI().getVersionsWindow().getVariantsWindow().ShowCheckedVariantsCount();
|
||||
//----------------------------->>
|
||||
getAnalysisWindow().ShowMetrics();
|
||||
getAnalysisWindow().ShowLoopsCount();
|
||||
@@ -47,12 +48,12 @@ public interface ProjectWindow {
|
||||
ShowNoFunctions();
|
||||
getFunctionsWindow().ShowNoCurrentFunction();
|
||||
getArraysWindow().ShowNoArrays();
|
||||
UI.getVersionsWindow().getVariantsWindow().ShowNoProjectDistribution();
|
||||
UI.getVersionsWindow().getVariantsWindow().ShowNoVariants();
|
||||
UI.getVersionsWindow().getVariantsWindow().ShowNoVariantsFilter();
|
||||
UI.getVersionsWindow().getVariantsWindow().ShowNoTotalVariantsCount();
|
||||
UI.getVersionsWindow().getVariantsWindow().ShowNoFilteredVariantsCount();
|
||||
UI.getVersionsWindow().getVariantsWindow().ShowNoCheckedVariantsCount();
|
||||
Global.mainModule.getUI().getVersionsWindow().getVariantsWindow().ShowNoProjectDistribution();
|
||||
Global.mainModule.getUI().getVersionsWindow().getVariantsWindow().ShowNoVariants();
|
||||
Global.mainModule.getUI().getVersionsWindow().getVariantsWindow().ShowNoVariantsFilter();
|
||||
Global.mainModule.getUI().getVersionsWindow().getVariantsWindow().ShowNoTotalVariantsCount();
|
||||
Global.mainModule.getUI().getVersionsWindow().getVariantsWindow().ShowNoFilteredVariantsCount();
|
||||
Global.mainModule.getUI().getVersionsWindow().getVariantsWindow().ShowNoCheckedVariantsCount();
|
||||
getAnalysisWindow().ShowNoMetrics();
|
||||
getAnalysisWindow().ShowNoRegions();
|
||||
getAnalysisWindow().ShowLoopsCount();
|
||||
|
||||
@@ -1,31 +1,103 @@
|
||||
package _VisualDVM.Visual;
|
||||
import Common.Visual.UIModule_;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.RemoteFile.UI.RemoteFileChooser;
|
||||
import _VisualDVM.Repository.Component.UI.ComponentsForm;
|
||||
import _VisualDVM.TestingSystem.Common.TestingMenuBar;
|
||||
import _VisualDVM.Visual.Interface.DebugWindow;
|
||||
import _VisualDVM.Visual.Interface.VersionsWindow;
|
||||
import _VisualDVM.Visual.Menus.CredentialsBar.CredentialsMenuBar;
|
||||
import _VisualDVM.Visual.Menus.FileMenuBar.FileMenuBar;
|
||||
import _VisualDVM.Visual.Menus.MainMenuBar.MainMenuBar;
|
||||
import _VisualDVM.Visual.Menus.MainMenuBar.MainWindow;
|
||||
import _VisualDVM.Visual.Menus.VersionsMenuBar.VersionsMenuBar;
|
||||
import _VisualDVM.Visual.Syntax.LightSPFEditorTheme;
|
||||
import _VisualDVM.Visual.Windows.*;
|
||||
public class MainUI extends UIModule_ {
|
||||
public MainWindow mainWindow = null;
|
||||
ComponentsForm componentsWindow = null;
|
||||
public SearchReplaceForm searchReplaceWindow = null;
|
||||
public ProfilesForm profilesWindow = null;
|
||||
public VersionsWindow versionsWindow = null;
|
||||
public DebugWindow debugWindow = null;
|
||||
public RemoteFileChooser remoteFileChooser = null;
|
||||
//-
|
||||
TestingMenuBar testingMenuBar = null;
|
||||
CredentialsMenuBar credentialsMenuBar = null;
|
||||
VersionsMenuBar versionsMenuBar = null;
|
||||
public TestingMenuBar getTestingMenuBar(){
|
||||
if (testingMenuBar ==null)
|
||||
//-
|
||||
public TestingMenuBar getTestingMenuBar() {
|
||||
if (testingMenuBar == null)
|
||||
testingMenuBar = new TestingMenuBar();
|
||||
return testingMenuBar;
|
||||
}
|
||||
public VersionsMenuBar getVersionsMenuBar(){
|
||||
if (versionsMenuBar ==null)
|
||||
public VersionsMenuBar getVersionsMenuBar() {
|
||||
if (versionsMenuBar == null)
|
||||
versionsMenuBar = new VersionsMenuBar();
|
||||
return versionsMenuBar;
|
||||
}
|
||||
public CredentialsMenuBar getCredentialsMenuBar(){
|
||||
if (credentialsMenuBar==null)
|
||||
credentialsMenuBar= new CredentialsMenuBar();
|
||||
public CredentialsMenuBar getCredentialsMenuBar() {
|
||||
if (credentialsMenuBar == null)
|
||||
credentialsMenuBar = new CredentialsMenuBar();
|
||||
return credentialsMenuBar;
|
||||
}
|
||||
public MainUI(){
|
||||
//-
|
||||
//-
|
||||
public MainUI() {
|
||||
setTheme(new LightSPFEditorTheme());
|
||||
}
|
||||
public MainWindow getMainWindow() {
|
||||
if (mainWindow == null)
|
||||
mainWindow = new MainForm();
|
||||
return mainWindow;
|
||||
}
|
||||
public boolean hasMainWindow() {
|
||||
return mainWindow != null;
|
||||
}
|
||||
public ComponentsForm getComponentsWindow() {
|
||||
if (componentsWindow == null)
|
||||
componentsWindow = new ComponentsForm();
|
||||
return componentsWindow;
|
||||
}
|
||||
//--
|
||||
//возможно перекинуть на тестирование. потом.
|
||||
public DebugWindow getDebugWindow() {
|
||||
if (debugWindow == null)
|
||||
debugWindow = new DebugForm();
|
||||
return debugWindow;
|
||||
}
|
||||
public void HideSearchForm() {
|
||||
if (searchReplaceWindow.isVisible())
|
||||
searchReplaceWindow.setVisible(false);
|
||||
}
|
||||
public VersionsWindow getVersionsWindow() {
|
||||
return versionsWindow;
|
||||
}
|
||||
public SearchReplaceForm getSearchReplaceWindow() {
|
||||
if (searchReplaceWindow == null)
|
||||
searchReplaceWindow = new SearchReplaceForm();
|
||||
return searchReplaceWindow;
|
||||
}
|
||||
public void ShowSearchForm(boolean replace) {
|
||||
searchReplaceWindow.setMode(replace);
|
||||
searchReplaceWindow.ShowMode();
|
||||
ShowSearchForm();
|
||||
}
|
||||
public void ShowSearchForm() {
|
||||
if (searchReplaceWindow.isVisible())
|
||||
searchReplaceWindow.Refresh();
|
||||
else
|
||||
searchReplaceWindow.Show();
|
||||
}
|
||||
public RemoteFileChooser getRemoteFileChooser() {
|
||||
if (remoteFileChooser == null)
|
||||
remoteFileChooser = new RemoteFileChooser();
|
||||
return remoteFileChooser;
|
||||
}
|
||||
public void CreateVersionsWindow() {
|
||||
versionsWindow = new VersionsForm(Global.mainModule.getRoot());
|
||||
}
|
||||
public ProfilesForm getProfilesWindow() {
|
||||
if (profilesWindow == null)
|
||||
profilesWindow = new ProfilesForm();
|
||||
return profilesWindow;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package _VisualDVM.Visual.Menus.FileMenuBar;
|
||||
import Common.Visual.Controls.MenuBarButton;
|
||||
import Common.Visual.Menus.VisualiserMenuBar;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
import _VisualDVM.ProjectData.Files.UI.Editor.SPFEditor;
|
||||
import _VisualDVM.Visual.UI;
|
||||
@@ -19,7 +20,7 @@ public class FileMenuBar extends VisualiserMenuBar {
|
||||
{
|
||||
setToolTipText("Поиск(Ctrl+F)");
|
||||
setIcon("/icons/LastOpened.png");
|
||||
addActionListener(e -> UI.ShowSearchForm());
|
||||
addActionListener(e -> Global.mainModule.getUI().ShowSearchForm());
|
||||
}
|
||||
});
|
||||
addPasses(PassCode.Save);
|
||||
|
||||
@@ -22,7 +22,7 @@ public class FileSettingsMenu extends VisualiserMenu {
|
||||
if (Global.mainModule.getFile().UpdateLanguage(languageName)) {
|
||||
Global.mainModule.getSapfor().ResetAllAnalyses();
|
||||
Global.mainModule.getFile().form.ShowLanguage();
|
||||
UI.getMainWindow().getProjectWindow().getFilesTreeForm().getTree().RefreshNode(Global.mainModule.getFile().node);
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().getFilesTreeForm().getTree().RefreshNode(Global.mainModule.getFile().node);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -44,7 +44,7 @@ public class FileSettingsMenu extends VisualiserMenu {
|
||||
public void action(FileType fileType) {
|
||||
if (Global.mainModule.getFile().UpdateType(fileType)) {
|
||||
Global.mainModule.getSapfor().ResetAllAnalyses();
|
||||
UI.getMainWindow().getProjectWindow().getFilesTreeForm().getTree().RefreshNode(Global.mainModule.getFile().node);
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().getFilesTreeForm().getTree().RefreshNode(Global.mainModule.getFile().node);
|
||||
Global.mainModule.getFile().form.ShowType();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ public class MainMenuBar extends VisualiserMenuBar {
|
||||
} else {
|
||||
Global.mainModule.getPass(PassCode.GetComponentsActualVersions).Do();
|
||||
Global.RefreshUpdatesStatus();
|
||||
UI.ShowComponentsWindow();
|
||||
Global.mainModule.getUI().getComponentsWindow().ShowDialog("");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ public class ProjectFilesMenu extends GraphMenu {
|
||||
{
|
||||
addActionListener(e -> {
|
||||
if (Global.mainModule.HasProject()) {
|
||||
UI.getVersionsWindow().getVersionsForm().getTree().SelectNode(Global.mainModule.getProject().node);
|
||||
Global.mainModule.getUI().getVersionsWindow().getVersionsForm().getTree().SelectNode(Global.mainModule.getProject().node);
|
||||
Global.mainModule.getPass(PassCode.DeleteVersion).Do();
|
||||
}
|
||||
});
|
||||
@@ -62,7 +62,7 @@ public class ProjectFilesMenu extends GraphMenu {
|
||||
Global.files_multiselection = !Global.files_multiselection;
|
||||
m_multiselection.setIcon(Utils_.getIcon(Global.files_multiselection ? "/icons/Pick.png" : "/icons/NotPick.png"));
|
||||
Global.mainModule.getProject().SelectAllFiles(false);
|
||||
UI.getMainWindow().getProjectWindow().RefreshProjectFiles();
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().RefreshProjectFiles();
|
||||
//-
|
||||
});
|
||||
add(m_multiselection);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package _VisualDVM.Visual.Menus.ProjectMenuBar;
|
||||
import Common.Visual.Controls.MenuBarButton;
|
||||
import Common.Visual.Menus.VisualiserMenuBar;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Visual.UI;
|
||||
|
||||
import javax.swing.*;
|
||||
@@ -18,7 +19,7 @@ public class ProjectMenuBar extends VisualiserMenuBar {
|
||||
setToolTipText("Профили");
|
||||
setIcon("/icons/Profiles.png");
|
||||
addActionListener(e -> {
|
||||
UI.ShowProfilesWindow();
|
||||
Global.mainModule.getUI().getProfilesWindow().ShowDialog("");
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
@@ -22,7 +22,7 @@ public class ProjectViewMenu extends VisualiserMenu {
|
||||
setFont(MainModule_.instance.getUI().getTheme().Fonts.get(VisualiserFonts.TreeItalic));
|
||||
addActionListener(e -> {
|
||||
Global.mainModule.set(Current.ProjectView, view);
|
||||
UI.getMainWindow().getProjectWindow().ShowProjectView();
|
||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().ShowProjectView();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
@@ -21,7 +21,7 @@ public class VersionsMenu extends GraphMenu<DataTree> {
|
||||
Global.versions_multiselection = !Global.versions_multiselection;
|
||||
m_multiselection.setIcon(Utils_.getIcon(Global.versions_multiselection ? "/icons/Pick.png" : "/icons/NotPick.png"));
|
||||
Global.mainModule.getRoot().SelectAllVersions(false);
|
||||
UI.getVersionsWindow().getVersionsForm().getTree().updateUI();
|
||||
Global.mainModule.getUI().getVersionsWindow().getVersionsForm().getTree().updateUI();
|
||||
});
|
||||
add(m_multiselection);
|
||||
addSeparator();
|
||||
|
||||
@@ -49,24 +49,6 @@ public class UI {
|
||||
public static LinkedHashMap<Common.Visual.Tables.TableEditors, TableCellEditor> TableEditors = new LinkedHashMap<>();
|
||||
public static LinkedHashMap<Common.Visual.Trees.TreeRenderers, TreeCellRenderer> TreeRenderers = new LinkedHashMap<>();
|
||||
//ФОРМЫ
|
||||
static MainWindow mainWindow = null;
|
||||
static ComponentsForm componentsWindow = null;
|
||||
static SearchReplaceForm searchReplaceWindow = null;
|
||||
static ProfilesForm profilesWindow = null;
|
||||
static VersionsWindow versionsWindow = null;
|
||||
static DebugWindow debugWindow = null;
|
||||
static RemoteFileChooser remoteFileChooser = null;
|
||||
public static boolean HasMainWindow() {
|
||||
return mainWindow != null;
|
||||
}
|
||||
public static void CreateWindows() {
|
||||
searchReplaceWindow = new SearchReplaceForm();
|
||||
remoteFileChooser = new RemoteFileChooser();
|
||||
profilesWindow = new ProfilesForm();
|
||||
mainWindow = new MainForm();
|
||||
//---------------------------------------
|
||||
mainWindow.Show();
|
||||
}
|
||||
//-
|
||||
public static void CreateAll() {
|
||||
//<editor-fold desc="Объекты отрисовки и редактирования деревьев и таблиц">
|
||||
@@ -103,9 +85,6 @@ public class UI {
|
||||
TableEditors.put(EditorAutoConfiguration, new ConfigurationAutoSwitcher());
|
||||
//</editor-fold>
|
||||
}
|
||||
public static void CreateComponentsForm() {
|
||||
componentsWindow = new ComponentsForm();
|
||||
}
|
||||
//-----
|
||||
public static void ShowTabsNames(JTabbedPane tabs) {
|
||||
ShowTabsNames(tabs, 0);
|
||||
@@ -115,54 +94,4 @@ public class UI {
|
||||
for (int i = startIndex; i < tabs.getTabCount(); ++i)
|
||||
tabs.setTitleAt(i, flag ? tabs.getToolTipTextAt(i) : "");
|
||||
}
|
||||
public static void CreateVersionsWindow() {
|
||||
versionsWindow = new VersionsForm(Global.mainModule.getRoot());
|
||||
}
|
||||
//-
|
||||
public static void ShowSearchForm(boolean replace) {
|
||||
searchReplaceWindow.setMode(replace);
|
||||
searchReplaceWindow.ShowMode();
|
||||
ShowSearchForm();
|
||||
}
|
||||
public static void HideSearchForm() {
|
||||
if (searchReplaceWindow.isVisible())
|
||||
searchReplaceWindow.setVisible(false);
|
||||
}
|
||||
public static void ShowSearchForm() {
|
||||
if (searchReplaceWindow.isVisible())
|
||||
searchReplaceWindow.Refresh();
|
||||
else
|
||||
searchReplaceWindow.Show();
|
||||
}
|
||||
public static void ShowComponentsWindow() {
|
||||
componentsWindow.ShowDialog("");
|
||||
}
|
||||
public static void ShowProfilesWindow() {
|
||||
profilesWindow.ShowDialog("");
|
||||
}
|
||||
//----
|
||||
public static MainWindow getMainWindow() {
|
||||
return mainWindow;
|
||||
}
|
||||
public static VersionsWindow getVersionsWindow() {
|
||||
return versionsWindow;
|
||||
}
|
||||
public static ComponentsForm getComponentsWindow() {
|
||||
return componentsWindow;
|
||||
}
|
||||
public static SearchReplaceForm getSearchReplaceWindow() {
|
||||
return searchReplaceWindow;
|
||||
}
|
||||
public static ProfilesForm getProfilesWindow() {
|
||||
return profilesWindow;
|
||||
}
|
||||
public static RemoteFileChooser getRemoteFileChooser() {
|
||||
return remoteFileChooser;
|
||||
}
|
||||
//возможно перекинуть на тестирование. потом.
|
||||
public static DebugWindow getDebugWindow() {
|
||||
if (debugWindow == null)
|
||||
debugWindow = new DebugForm();
|
||||
return debugWindow;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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() {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user