рефакторинг. переносил текущие объекты в другое место
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package _VisualDVM.Visual.Windows;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Visual.Interface.AnalysisWindow;
|
||||
|
||||
import javax.swing.*;
|
||||
@@ -16,7 +17,7 @@ public class AnalysisForm implements AnalysisWindow {
|
||||
private JPanel regionsPanel;
|
||||
public AnalysisForm() {
|
||||
LoadSplitters();
|
||||
Current.getProject().parallelRegions.mountUI(regionsPanel);
|
||||
Global.mainModule.getProject().parallelRegions.mountUI(regionsPanel);
|
||||
}
|
||||
@Override
|
||||
public JPanel getContent() {
|
||||
@@ -24,7 +25,7 @@ public class AnalysisForm implements AnalysisWindow {
|
||||
}
|
||||
@Override
|
||||
public void ShowProjectMaxDim() {
|
||||
l_maxdim.setText("Наибольшая размерность DVM-шаблона: " + Current.getProject().maxdim);
|
||||
l_maxdim.setText("Наибольшая размерность DVM-шаблона: " + Global.mainModule.getProject().maxdim);
|
||||
}
|
||||
@Override
|
||||
public void ShowNoProjectMaxDim() {
|
||||
@@ -32,9 +33,9 @@ public class AnalysisForm implements AnalysisWindow {
|
||||
}
|
||||
@Override
|
||||
public void ShowMetrics() {
|
||||
l_lines.setText("Общее количество строк кода: " + Current.getProject().LinesCount());
|
||||
l_spf_dirs.setText("Всего объявлено SPF директив: " + Current.getProject().SPFCount());
|
||||
l_dvm_dirs.setText("Всего объявлено DVM директив: " + Current.getProject().DVMCount());
|
||||
l_lines.setText("Общее количество строк кода: " + Global.mainModule.getProject().LinesCount());
|
||||
l_spf_dirs.setText("Всего объявлено SPF директив: " + Global.mainModule.getProject().SPFCount());
|
||||
l_dvm_dirs.setText("Всего объявлено DVM директив: " + Global.mainModule.getProject().DVMCount());
|
||||
}
|
||||
@Override
|
||||
public void ShowNoMetrics() {
|
||||
@@ -44,22 +45,22 @@ public class AnalysisForm implements AnalysisWindow {
|
||||
}
|
||||
@Override
|
||||
public void ShowRegions() {
|
||||
Current.getProject().parallelRegions.ShowUI();
|
||||
Global.mainModule.getProject().parallelRegions.ShowUI();
|
||||
}
|
||||
@Override
|
||||
public void ShowNoRegions() {
|
||||
Current.getProject().parallelRegions.ClearUI();
|
||||
Global.mainModule.getProject().parallelRegions.ClearUI();
|
||||
}
|
||||
@Override
|
||||
public void ShowLoopsCount() {
|
||||
l_loops.setText("Общее количество циклов: " + Current.getProject().LoopsCount());
|
||||
l_loops.setText("Общее количество циклов: " + Global.mainModule.getProject().LoopsCount());
|
||||
}
|
||||
@Override
|
||||
public void ShowFunctionsCount() {
|
||||
l_functions.setText("Всего объявлено процедур: " + Current.getProject().FunctionsCount());
|
||||
l_functions.setText("Всего объявлено процедур: " + Global.mainModule.getProject().FunctionsCount());
|
||||
}
|
||||
@Override
|
||||
public void ShowArraysCount() {
|
||||
l_arrays.setText(" Всего объявлено массивов: " + Current.getProject().ArraysCount());
|
||||
l_arrays.setText(" Всего объявлено массивов: " + Global.mainModule.getProject().ArraysCount());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package _VisualDVM.Visual.Windows;
|
||||
import _VisualDVM.Current;
|
||||
import Common.Visual.TextField.StyledTextField;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.ProjectData.SapforData.Arrays.ProjectArray;
|
||||
import _VisualDVM.Visual.Interface.ArraysWindow;
|
||||
|
||||
@@ -21,8 +22,8 @@ public class ArraysForm implements ArraysWindow {
|
||||
private JPanel savedArraysBackground;
|
||||
public ArraysForm(){
|
||||
LoadSplitters();
|
||||
Current.getProject().declaratedArrays.mountUI(arraysPanel);
|
||||
Current.getProject().db.savedArrays.mountUI(savedArraysPanel);
|
||||
Global.mainModule.getProject().declaratedArrays.mountUI(arraysPanel);
|
||||
Global.mainModule.getProject().db.savedArrays.mountUI(savedArraysPanel);
|
||||
//--
|
||||
filterName.setText(ProjectArray.filterName);
|
||||
filterName.getDocument().addDocumentListener(new DocumentListener() {
|
||||
@@ -115,13 +116,13 @@ public class ArraysForm implements ArraysWindow {
|
||||
}
|
||||
@Override
|
||||
public void ShowArrays() {
|
||||
Current.getProject().declaratedArrays.ShowUI();
|
||||
Current.getProject().db.savedArrays.ShowUI();
|
||||
Global.mainModule.getProject().declaratedArrays.ShowUI();
|
||||
Global.mainModule.getProject().db.savedArrays.ShowUI();
|
||||
}
|
||||
@Override
|
||||
public void ShowNoArrays() {
|
||||
Current.getProject().declaratedArrays.ClearUI();
|
||||
Current.getProject().db.savedArrays.ClearUI();
|
||||
Global.mainModule.getProject().declaratedArrays.ClearUI();
|
||||
Global.mainModule.getProject().db.savedArrays.ClearUI();
|
||||
}
|
||||
private void createUIComponents() {
|
||||
// TODO: place custom component creation code here
|
||||
|
||||
@@ -46,8 +46,8 @@ public class CallbackForm implements FormWithSplitters, CallbackWindow {
|
||||
}
|
||||
@Override
|
||||
public void changedUpdate(DocumentEvent e) {
|
||||
if (!Current.getBugReport().state.equals(BugReportState.draft))
|
||||
Current.getBugReport().descriptionAdditionDraft =
|
||||
if (!Global.mainModule.getBugReport().state.equals(BugReportState.draft))
|
||||
Global.mainModule.getBugReport().descriptionAdditionDraft =
|
||||
BugReportDescriptionAddition.getText();
|
||||
}
|
||||
};
|
||||
@@ -60,8 +60,8 @@ public class CallbackForm implements FormWithSplitters, CallbackWindow {
|
||||
}
|
||||
@Override
|
||||
public void changedUpdate(DocumentEvent e) {
|
||||
if (!Current.getBugReport().state.equals(BugReportState.draft))
|
||||
Current.getBugReport().commentAdditionDraft = BugReportCommentAddition.getText();
|
||||
if (!Global.mainModule.getBugReport().state.equals(BugReportState.draft))
|
||||
Global.mainModule.getBugReport().commentAdditionDraft = BugReportCommentAddition.getText();
|
||||
}
|
||||
};
|
||||
DocumentListener descriptionListener = new DocumentListener() {
|
||||
@@ -73,8 +73,8 @@ public class CallbackForm implements FormWithSplitters, CallbackWindow {
|
||||
}
|
||||
@Override
|
||||
public void changedUpdate(DocumentEvent e) {
|
||||
if (Current.getBugReport().state.equals(BugReportState.draft))
|
||||
Current.getBugReport().description =
|
||||
if (Global.mainModule.getBugReport().state.equals(BugReportState.draft))
|
||||
Global.mainModule.getBugReport().description =
|
||||
BugReportDescription.getText();
|
||||
Global.componentsServer.db.bugReports.RefreshUI();
|
||||
}
|
||||
@@ -88,8 +88,8 @@ public class CallbackForm implements FormWithSplitters, CallbackWindow {
|
||||
}
|
||||
@Override
|
||||
public void changedUpdate(DocumentEvent e) {
|
||||
if (Current.getBugReport().state.equals(BugReportState.draft))
|
||||
Current.getBugReport().comment = BugReportComment.getText();
|
||||
if (Global.mainModule.getBugReport().state.equals(BugReportState.draft))
|
||||
Global.mainModule.getBugReport().comment = BugReportComment.getText();
|
||||
}
|
||||
};
|
||||
//-
|
||||
@@ -436,10 +436,10 @@ public class CallbackForm implements FormWithSplitters, CallbackWindow {
|
||||
}
|
||||
@Override
|
||||
public void ShowAccount() {
|
||||
lAccountName.setText(Utils_.Brackets(Current.getAccount().name));
|
||||
lAccountMail.setText(Utils_.Brackets(Current.getAccount().email));
|
||||
lAccountRole.setText(Utils_.Brackets(Current.getAccount().role.getDescription()));
|
||||
switch (Current.getAccount().role) {
|
||||
lAccountName.setText(Utils_.Brackets(Global.mainModule.getAccount().name));
|
||||
lAccountMail.setText(Utils_.Brackets(Global.mainModule.getAccount().email));
|
||||
lAccountRole.setText(Utils_.Brackets(Global.mainModule.getAccount().role.getDescription()));
|
||||
switch (Global.mainModule.getAccount().role) {
|
||||
case Undefined:
|
||||
/// UI.Clear(accountPanel);
|
||||
// accountPanel.add(new CallbackWelcomeForm().content);
|
||||
@@ -553,7 +553,7 @@ public class CallbackForm implements FormWithSplitters, CallbackWindow {
|
||||
public void ShowCurrentBugReport() {
|
||||
SwitchListeners(false);
|
||||
// currentBugReportTabs.setSelectedIndex(0);
|
||||
BugReport target = Current.getBugReport();
|
||||
BugReport target = Global.mainModule.getBugReport();
|
||||
BugReportInterface.CheckSubscribers(target);
|
||||
Global.componentsServer.db.subscribers.ShowUI();
|
||||
//-
|
||||
@@ -576,12 +576,12 @@ public class CallbackForm implements FormWithSplitters, CallbackWindow {
|
||||
if (target.state.equals(BugReportState.draft)) {
|
||||
ShowDraft();
|
||||
} else {
|
||||
switch (Current.getAccount().role) {
|
||||
switch (Global.mainModule.getAccount().role) {
|
||||
case User:
|
||||
if (Current.getAccount().email.equalsIgnoreCase(target.sender_address)) {
|
||||
if (Global.mainModule.getAccount().email.equalsIgnoreCase(target.sender_address)) {
|
||||
ShowSender(); //отправитель.может делать с багом все.
|
||||
} else {
|
||||
if (Current.getAccount().email.equalsIgnoreCase(target.executor_address)) {
|
||||
if (Global.mainModule.getAccount().email.equalsIgnoreCase(target.executor_address)) {
|
||||
ShowUserExecutor(); //исполнитель. может менять прогресс и дополнять комментарий.
|
||||
} else ShowUser(); //недоступно ничего. и баг ему невидим. но на всякий случай.
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package _VisualDVM.Visual.Windows;
|
||||
import _VisualDVM.Current;
|
||||
import Common.Visual.Windows.Dialog.Text.ComboTextDialog;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Utils;
|
||||
|
||||
import java.util.Vector;
|
||||
@@ -15,7 +16,7 @@ public class CombineFilesDialog extends ComboTextDialog {
|
||||
String fileName = (String) fields.getSelectedItem();
|
||||
// тут 2 случая. если имя файла совпадает с 1 из существующих, то все хорошо.
|
||||
//если нет. тогда проверяем отсуствие слешей и полная валидация имени одиночного файла.
|
||||
Vector<String> files_order = Current.getProject().files_order;
|
||||
Vector<String> files_order = Global.mainModule.getProject().files_order;
|
||||
if (!files_order.contains(fileName))
|
||||
Utils.validateFileShortNewName(fileName, Log);
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import Common.Utils.Utils_;
|
||||
import Common.Visual.UI_;
|
||||
import _VisualDVM.Current;
|
||||
import Common.Database.Objects.DBObject;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Visual.Editor.BaseEditor;
|
||||
import _VisualDVM.Visual.Controls.ShortLabel;
|
||||
import _VisualDVM.Visual.Menus.VisualiserMenuBar;
|
||||
@@ -76,8 +77,8 @@ public abstract class ComparisonForm<T> {
|
||||
public void ApplyObject() {
|
||||
RemoveObject();
|
||||
TextLog log = new TextLog();
|
||||
if (Current_.Check(log, getCurrentObjectName())) {
|
||||
object = (T) Current_.get(getCurrentObjectName());
|
||||
if (Global.mainModule.Check(log, getCurrentObjectName())) {
|
||||
object = (T) Global.mainModule.get(getCurrentObjectName());
|
||||
applyObject();
|
||||
showObject();
|
||||
} else
|
||||
|
||||
@@ -2,6 +2,7 @@ package _VisualDVM.Visual.Windows;
|
||||
import Common.Visual.UI_;
|
||||
import _VisualDVM.Current;
|
||||
import Common.Visual.TextField.StyledTextField;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.ProjectData.SapforData.Functions.UI.Graph.FunctionsGraphForm;
|
||||
import _VisualDVM.ProjectData.SapforData.Functions.UI.Graph.FunctionsGraphUI;
|
||||
import Visual_DVM_2021.Passes.All.SPF_GetGraphFunctionPositions;
|
||||
@@ -63,7 +64,7 @@ public class FunctionsForm implements FunctionsWindow {
|
||||
}
|
||||
@Override
|
||||
public void ShowCurrentFunction() {
|
||||
lCurrentFunction.setText(Current.getFunction().funcName);
|
||||
lCurrentFunction.setText(Global.mainModule.getFunction().funcName);
|
||||
}
|
||||
@Override
|
||||
public void ShowNoCurrentFunction() {
|
||||
@@ -74,9 +75,9 @@ public class FunctionsForm implements FunctionsWindow {
|
||||
ShowExternalFilter.setSelected(SPF_GetGraphFunctionPositions.showExternalFunctions);
|
||||
ShowUnreachableFilter.setSelected(SPF_GetGraphFunctionPositions.showUnreachableFunctions);
|
||||
//-
|
||||
sIterations.setValue(Current.getProject().fgIterations);
|
||||
sResistance.setValue(Current.getProject().fgResistance);
|
||||
sScreen.setValue(Current.getProject().fgScreen);
|
||||
sIterations.setValue(Global.mainModule.getProject().fgIterations);
|
||||
sResistance.setValue(Global.mainModule.getProject().fgResistance);
|
||||
sScreen.setValue(Global.mainModule.getProject().fgScreen);
|
||||
//-
|
||||
cbShowByCurrentFunction.setSelected(SPF_GetGraphFunctionPositions.showByCurrentFunction);
|
||||
ShowIn.setSelected(SPF_GetGraphFunctionPositions.showIn);
|
||||
@@ -103,28 +104,28 @@ public class FunctionsForm implements FunctionsWindow {
|
||||
Pass.passes.get(PassCode.SaveGraph).Do();
|
||||
}
|
||||
});
|
||||
sIterations.setModel(new SpinnerNumberModel(Current.getProject().fgIterations,
|
||||
sIterations.setModel(new SpinnerNumberModel(Global.mainModule.getProject().fgIterations,
|
||||
100, 5000, 100
|
||||
));
|
||||
sResistance.setModel(new SpinnerNumberModel(Current.getProject().fgResistance,
|
||||
sResistance.setModel(new SpinnerNumberModel(Global.mainModule.getProject().fgResistance,
|
||||
10, 5000, 50
|
||||
));
|
||||
sScreen.setModel(new SpinnerNumberModel(Current.getProject().fgScreen,
|
||||
sScreen.setModel(new SpinnerNumberModel(Global.mainModule.getProject().fgScreen,
|
||||
0.25, 2.0, 0.05
|
||||
));
|
||||
sDepth.setModel(new SpinnerNumberModel(1,
|
||||
0, 64, 1
|
||||
));
|
||||
UI_.MakeSpinnerRapid(sIterations, e -> {
|
||||
Current.getProject().UpdatefgIterations((int) sIterations.getValue());
|
||||
Global.mainModule.getProject().UpdatefgIterations((int) sIterations.getValue());
|
||||
FunctionsGraphUI.ffTimer.restart();
|
||||
});
|
||||
UI_.MakeSpinnerRapid(sResistance, e -> {
|
||||
Current.getProject().UpdatefgResistance((int) sResistance.getValue());
|
||||
Global.mainModule.getProject().UpdatefgResistance((int) sResistance.getValue());
|
||||
FunctionsGraphUI.ffTimer.restart();
|
||||
});
|
||||
UI_.MakeSpinnerRapid(sScreen, e -> {
|
||||
Current.getProject().UpdatefgScreen((double) sScreen.getValue());
|
||||
Global.mainModule.getProject().UpdatefgScreen((double) sScreen.getValue());
|
||||
FunctionsGraphUI.ffTimer.restart();
|
||||
});
|
||||
UI_.MakeSpinnerRapid(sDepth, e -> {
|
||||
|
||||
@@ -83,9 +83,9 @@ public class MainForm extends Form implements MainWindow {
|
||||
}
|
||||
private void InstallProjectPanel() {
|
||||
globalTabs.insertTab("", null,
|
||||
(projectForm = new ProjectForm()).content, Current.getProject().description, 0);
|
||||
(projectForm = new ProjectForm()).content,Global.mainModule.getProject().description, 0);
|
||||
globalTabs.setTabComponentAt(0,
|
||||
new TabToolBar("Проект: " + Current.getProject().name, PassCode.CloseCurrentProject) {
|
||||
new TabToolBar("Проект: " + Global.mainModule.getProject().name, PassCode.CloseCurrentProject) {
|
||||
@Override
|
||||
public void leftMouseAction() {
|
||||
globalTabs.setSelectedIndex(0);
|
||||
|
||||
@@ -123,7 +123,7 @@ public class ProjectForm implements FormWithSplitters, ProjectWindow {
|
||||
}
|
||||
@Override
|
||||
public void ShowProjectSapforLog() {
|
||||
logText.setText(Current.getProject().Log);
|
||||
logText.setText(Global.mainModule.getProject().Log);
|
||||
logText.setCaretPosition(0);
|
||||
}
|
||||
@Override
|
||||
@@ -154,9 +154,9 @@ public class ProjectForm implements FormWithSplitters, ProjectWindow {
|
||||
//filesTabs.setTabComponentAt(0,
|
||||
// new TabToolBar(Current.getFile().name, PassCode_2021.CloseCurrentFile));
|
||||
// projectTabs.setTitleAt(0, "Файл: " + Current.getFile().name);
|
||||
fileBackground.add((Current.getFile().form = new FileForm(Current.getFile())).getContent());
|
||||
fileBackground.add((Global.mainModule.getFile().form = new FileForm(Global.mainModule.getFile())).getContent());
|
||||
projectTabs.setTabComponentAt(0,
|
||||
new TabToolBar("Файл: " + Current.getFile().name, PassCode.CloseCurrentFile) {
|
||||
new TabToolBar("Файл: " + Global.mainModule.getFile().name, PassCode.CloseCurrentFile) {
|
||||
@Override
|
||||
public void leftMouseAction() {
|
||||
projectTabs.setSelectedIndex(0);
|
||||
@@ -178,10 +178,10 @@ public class ProjectForm implements FormWithSplitters, ProjectWindow {
|
||||
@Override
|
||||
public void GotoFile(String fileName, int line, boolean focus) {
|
||||
if (focus) FocusFile();
|
||||
if (Current.HasFile() && Current.getFile().name.equals(fileName))
|
||||
Current.getFile().form.getEditor().gotoLine(line);
|
||||
else if (Current.getProject().db.files.containsKey(fileName)) {
|
||||
DBProjectFile targetFile = Current.getProject().db.files.get(fileName);
|
||||
if (Global.mainModule.HasFile() && Global.mainModule.getFile().name.equals(fileName))
|
||||
Global.mainModule.getFile().form.getEditor().gotoLine(line);
|
||||
else if (Global.mainModule.getProject().db.files.containsKey(fileName)) {
|
||||
DBProjectFile targetFile = Global.mainModule.getProject().db.files.get(fileName);
|
||||
targetFile.UpdateLastLine(line);
|
||||
Pass.passes.get(PassCode.OpenCurrentFile).Do(targetFile);
|
||||
}
|
||||
@@ -229,17 +229,17 @@ public class ProjectForm implements FormWithSplitters, ProjectWindow {
|
||||
@Override
|
||||
public void RefreshProjectTreeAndMessages() {
|
||||
RefreshProjectFiles();
|
||||
DBProjectFile badFile = Current.getProject().getFirstBadFile();
|
||||
DBProjectFile badFile = Global.mainModule.getProject().getFirstBadFile();
|
||||
if (badFile != null) {
|
||||
Pass.passes.get(PassCode.OpenCurrentFile).Do(badFile);
|
||||
UI.getMainWindow().FocusProject();
|
||||
UI.getMainWindow().getProjectWindow().FocusFile();
|
||||
}
|
||||
//-
|
||||
if (Current.HasFile()) {
|
||||
Current.getFile().form.ShowMessages();
|
||||
if (badFile != null && badFile.equals(Current.getFile()))
|
||||
Current.getFile().form.ShowFirstError();
|
||||
if (Global.mainModule.HasFile()) {
|
||||
Global.mainModule.getFile().form.ShowMessages();
|
||||
if (badFile != null && badFile.equals(Global.mainModule.getFile()))
|
||||
Global.mainModule.getFile().form.ShowFirstError();
|
||||
}
|
||||
}
|
||||
@Override
|
||||
@@ -255,7 +255,7 @@ public class ProjectForm implements FormWithSplitters, ProjectWindow {
|
||||
@Override
|
||||
public void ShowProjectView() {
|
||||
UI_.Clear(projectViewPanel);
|
||||
ProjectView view = Current.getProjectView();
|
||||
ProjectView view = Global.mainModule.getProjectView();
|
||||
menuBar.getProjectViewMenu().setToolTipText(view.getDescription());
|
||||
menuBar.getProjectViewMenu().setIcon(Utils_.getIcon(view.getIcon()));
|
||||
switch (view) {
|
||||
|
||||
@@ -3,6 +3,7 @@ import Common.Current_;
|
||||
import Common.Visual.UI_;
|
||||
import _VisualDVM.Current;
|
||||
import Common.Database.Objects.DBObject;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Visual.Controls.ShortLabel;
|
||||
import _VisualDVM.Visual.Menus.VisualiserMenuBar;
|
||||
import _VisualDVM.Visual.UI;
|
||||
@@ -69,8 +70,8 @@ public class SapforPackagesComparisonForm {
|
||||
RemoveObject();
|
||||
//---
|
||||
TextLog log = new TextLog();
|
||||
if (Current_.Check(log, Current.SapforPackage)) {
|
||||
object = Current.getSapforPackage();
|
||||
if (Global.mainModule.Check(log, Current.SapforPackage)) {
|
||||
object = Global.mainModule.getSapforPackage();
|
||||
if (object.isLoaded() || (Pass.passes.get(PassCode.DownloadSapforPackage).Do(object))) {
|
||||
showObject();
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import Common.Visual.Windows.Form;
|
||||
import _VisualDVM.Current;
|
||||
import Common.Visual.TextField.StyledTextField;
|
||||
import Common.Visual.Trees.StyledTree;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Visual.UI;
|
||||
import Visual_DVM_2021.Passes.PassCode;
|
||||
import Common.Passes.Pass;
|
||||
@@ -172,8 +173,8 @@ public class SearchReplaceForm extends Form {
|
||||
DefaultMutableTreeNode selectedFile = (DefaultMutableTreeNode) getLastSelectedPathComponent();
|
||||
if (selectedFile != null) {
|
||||
Pair<String, Long> info = (Pair<String, Long>) selectedFile.getUserObject();
|
||||
if (Current.getProject().db.files.containsKey(info.getKey())) {
|
||||
Pass.passes.get(PassCode.OpenCurrentFile).Do(Current.getProject().db.files.get(info.getKey()));
|
||||
if (Global.mainModule.getProject().db.files.containsKey(info.getKey())) {
|
||||
Pass.passes.get(PassCode.OpenCurrentFile).Do(Global.mainModule.getProject().db.files.get(info.getKey()));
|
||||
//--->>>
|
||||
replaceOn.setSelected(false);
|
||||
setMode(false);
|
||||
@@ -195,7 +196,7 @@ public class SearchReplaceForm extends Form {
|
||||
super.Show();
|
||||
//------->>
|
||||
showNoFilesMatches();
|
||||
if (lastProjectPath.equals(Current.getProject().Home.getAbsolutePath()))
|
||||
if (lastProjectPath.equals(Global.mainModule.getProject().Home.getAbsolutePath()))
|
||||
showFilesMatches();
|
||||
else
|
||||
dropFilesMatches();
|
||||
@@ -238,8 +239,8 @@ public class SearchReplaceForm extends Form {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
try {
|
||||
showNoFilesMatches();
|
||||
lastProjectPath = Current.getProject().Home.getAbsolutePath();
|
||||
matches = Current.getProject().getMatches(
|
||||
lastProjectPath = Global.mainModule.getProject().Home.getAbsolutePath();
|
||||
matches = Global.mainModule.getProject().getMatches(
|
||||
tfFind.getText(),
|
||||
registerOn.isSelected(),
|
||||
wholeWordOn.isSelected());
|
||||
|
||||
@@ -225,13 +225,13 @@ public class TestingForm implements FormWithSplitters, TestingWindow {
|
||||
}
|
||||
@Override
|
||||
public void ShowCurrentCompiler() {
|
||||
String title = (Current.HasCompiler() && Current.getCompiler().type.equals(CompilerType.dvm)) ?
|
||||
"DVM система: " + Current.getCompiler().description : "DVM система: ?";
|
||||
String title = (Global.mainModule.HasCompiler() && Global.mainModule.getCompiler().type.equals(CompilerType.dvm)) ?
|
||||
"DVM система: " + Global.mainModule.getCompiler().description : "DVM система: ?";
|
||||
testingTabs.setTitleAt(0, title);
|
||||
}
|
||||
@Override
|
||||
public void ShowCurrentServerSapfor() {
|
||||
testingTabs.setTitleAt(2, "SAPFOR: " + Current.getServerSapfor().version);
|
||||
testingTabs.setTitleAt(2, "SAPFOR: " + Global.mainModule.getServerSapfor().version);
|
||||
}
|
||||
@Override
|
||||
public void ShowNoServerSapfor() {
|
||||
@@ -271,7 +271,7 @@ public class TestingForm implements FormWithSplitters, TestingWindow {
|
||||
testingTabs.setSelectedIndex(3);
|
||||
}
|
||||
public void RestoreLastCredentials() {
|
||||
Credentials credentials = (Credentials) Current_.get(Current.Credentials);
|
||||
Credentials credentials = Global.mainModule.getCredentials();
|
||||
if (credentials.machine_id != CommonConstants.Nan) {
|
||||
if (Global.mainModule.getDb().machines.containsKey(credentials.machine_id)) {
|
||||
(Global.mainModule.getDb()).machines.ShowUI(credentials.machine_id);
|
||||
|
||||
@@ -2,6 +2,7 @@ package _VisualDVM.Visual.Windows;
|
||||
import Common.Utils.Utils_;
|
||||
import _VisualDVM.Current;
|
||||
import Common.Visual.Trees.TreeForm;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.ProjectData.SapforData.Arrays.UI.DimensionsTableForm;
|
||||
import _VisualDVM.ProjectData.SapforData.Arrays.UI.RulesTree;
|
||||
import _VisualDVM.Visual.Interface.VariantsWindow;
|
||||
@@ -28,13 +29,13 @@ public class VariantsForm implements VariantsWindow {
|
||||
//--
|
||||
public VariantsForm() {
|
||||
LoadSplitters();
|
||||
Current.getProject().parallelVariants.mountUI(variantsPanel);
|
||||
Global.mainModule.getProject().parallelVariants.mountUI(variantsPanel);
|
||||
//-
|
||||
BDistributed.addActionListener(new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
Current.getProject().SwitchFilterDistributed();
|
||||
BDistributed.setIcon(Utils_.getIcon(Current.getProject().f_distributed() ? "/icons/Pick.png" : "/icons/NotPick.png"));
|
||||
Global.mainModule.getProject().SwitchFilterDistributed();
|
||||
BDistributed.setIcon(Utils_.getIcon(Global.mainModule.getProject().f_distributed() ? "/icons/Pick.png" : "/icons/NotPick.png"));
|
||||
ShowVariantsFilter();
|
||||
ShowFilteredVariantsCount();
|
||||
}
|
||||
@@ -42,8 +43,8 @@ public class VariantsForm implements VariantsWindow {
|
||||
bMultiplied.addActionListener(new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
Current.getProject().SwitchFilterMultiplied();
|
||||
bMultiplied.setIcon(Utils_.getIcon(Current.getProject().f_multiplied() ? "/icons/Pick.png" : "/icons/NotPick.png"));
|
||||
Global.mainModule.getProject().SwitchFilterMultiplied();
|
||||
bMultiplied.setIcon(Utils_.getIcon(Global.mainModule.getProject().f_multiplied() ? "/icons/Pick.png" : "/icons/NotPick.png"));
|
||||
ShowVariantsFilter();
|
||||
ShowFilteredVariantsCount();
|
||||
}
|
||||
@@ -68,8 +69,8 @@ public class VariantsForm implements VariantsWindow {
|
||||
}
|
||||
@Override
|
||||
public void ShowVariantsFilterButtons() {
|
||||
BDistributed.setIcon(Utils_.getIcon(Current.getProject().f_distributed() ? "/icons/Pick.png" : "/icons/NotPick.png"));
|
||||
bMultiplied.setIcon(Utils_.getIcon(Current.getProject().f_multiplied() ? "/icons/Pick.png" : "/icons/NotPick.png"));
|
||||
BDistributed.setIcon(Utils_.getIcon(Global.mainModule.getProject().f_distributed() ? "/icons/Pick.png" : "/icons/NotPick.png"));
|
||||
bMultiplied.setIcon(Utils_.getIcon(Global.mainModule.getProject().f_multiplied() ? "/icons/Pick.png" : "/icons/NotPick.png"));
|
||||
}
|
||||
@Override
|
||||
public void ShowVariantsFilter() {
|
||||
@@ -81,11 +82,11 @@ public class VariantsForm implements VariantsWindow {
|
||||
}
|
||||
@Override
|
||||
public void ShowFilteredVariantsCount() {
|
||||
VisibleVariantsCount.setText(String.valueOf(Current.getProject().getFilteredVariantsCount()));
|
||||
VisibleVariantsCount.setText(String.valueOf(Global.mainModule.getProject().getFilteredVariantsCount()));
|
||||
}
|
||||
@Override
|
||||
public void ShowTotalVariantsCount() {
|
||||
TotalVariantsCount.setText(String.valueOf(Current.getProject().getTotalVariantsCount()));
|
||||
TotalVariantsCount.setText(String.valueOf(Global.mainModule.getProject().getTotalVariantsCount()));
|
||||
}
|
||||
@Override
|
||||
public void ShowCheckedVariantsCount() {
|
||||
@@ -93,15 +94,15 @@ public class VariantsForm implements VariantsWindow {
|
||||
}
|
||||
@Override
|
||||
public void ShowVariants() {
|
||||
Current.getProject().parallelVariants.ShowUI();
|
||||
Global.mainModule.getProject().parallelVariants.ShowUI();
|
||||
}
|
||||
@Override
|
||||
public void RefreshVariants() {
|
||||
Current.getProject().parallelVariants.RefreshUI();
|
||||
Global.mainModule.getProject().parallelVariants.RefreshUI();
|
||||
}
|
||||
@Override
|
||||
public void ShowNoVariants() {
|
||||
Current.getProject().parallelVariants.ClearUI();
|
||||
Global.mainModule.getProject().parallelVariants.ClearUI();
|
||||
}
|
||||
@Override
|
||||
public void ShowNoCheckedVariantsCount() {
|
||||
|
||||
Reference in New Issue
Block a user