fix.убрал из общей(в перспективе библиотечной) части ссылки на частные объекты визуализатора

This commit is contained in:
2024-10-16 00:40:45 +03:00
parent b79474fdd1
commit 071aab5ea6
54 changed files with 166 additions and 113 deletions

1
.idea/.name generated
View File

@@ -1 +0,0 @@
VariantsWindow.java

59
.idea/workspace.xml generated
View File

@@ -6,7 +6,62 @@
</artifacts-to-build> </artifacts-to-build>
</component> </component>
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="e42177c3-2328-4b27-8a01-35779b2beb99" name="Default Changelist" comment="" /> <list default="true" id="e42177c3-2328-4b27-8a01-35779b2beb99" name="Default Changelist" comment="">
<change beforePath="$PROJECT_DIR$/.idea/.name" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Common/CommonConstants.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common/CommonConstants.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Common/Database/VisualiserDatabase.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common/Database/VisualiserDatabase.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Common/Utils/InterruptThread.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common/Utils/InterruptThread.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Common/Visual/Controls/TabToolBar.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common/Visual/Controls/TabToolBar.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Common/Visual/DataSetControlForm.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common/Visual/DataSetControlForm.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Common/Visual/Menus/DataMenuBar.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common/Visual/Menus/DataMenuBar.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Common/Visual/Menus/VisualiserMenuBar.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common/Visual/Menus/VisualiserMenuBar.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Common/Visual/Trees/DataTree.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common/Visual/Trees/DataTree.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Common/Visual/Trees/GraphTreeCellRenderer.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Visual/Trees/GraphTreeCellRenderer.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Common/Visual/Trees/SelectableTree.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common/Visual/Trees/SelectableTree.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Common/Visual/Trees/StyledTree.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common/Visual/Trees/StyledTree.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Common/Visual/Windows/Dialog/Text/FileNameForm.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Visual/Windows/FileNameForm.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Common/Visual/Windows/Dialog/Text/MultilineTextForm.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Visual/Windows/MultilineTextForm.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Common/Visual/Windows/Dialog/Text/ReadOnlyMultilineTextForm.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Visual/Windows/ReadOnlyMultilineTextForm.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Constants.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Constants.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/GlobalData/Tasks/Supervisor/Local/Linux/LinuxLocalTaskSupervisor.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/GlobalData/Tasks/Supervisor/Local/Linux/LinuxLocalTaskSupervisor.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/GlobalData/Tasks/Supervisor/Remote/RemoteTaskSupervisor.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/GlobalData/Tasks/Supervisor/Remote/RemoteTaskSupervisor.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/AddFile.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/AddFile.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/CreateEmptyDirectory.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/CreateEmptyDirectory.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/CreateEmptyProject.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/CreateEmptyProject.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/DownloadDVMPackage.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/DownloadDVMPackage.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/DownloadDVMPackages.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/DownloadDVMPackages.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/DownloadRepository.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/DownloadRepository.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/DownloadSapforPackage.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/DownloadSapforPackage.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/ExportDVMPackageToExcel.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/ExportDVMPackageToExcel.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/RenameDirectory.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/RenameDirectory.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/RenameFile.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/RenameFile.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/ShowCompilerHelp.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/ShowCompilerHelp.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/ShowCompilerVersion.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/ShowCompilerVersion.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/ShowComponentChangesLog.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/ShowComponentChangesLog.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/ShowTestingServerFile.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/ShowTestingServerFile.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/Project/ChangeFilePass.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/Project/ChangeFilePass.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/SSH/RepositoryServerSSHPass.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/SSH/RepositoryServerSSHPass.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/ProjectData/Files/ProjectFile.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/ProjectData/Files/ProjectFile.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/ProjectData/Files/UI/FileGraphTree.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/ProjectData/Files/UI/FileGraphTree.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/ProjectData/Files/UI/FilesTree.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/ProjectData/Files/UI/FilesTree.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/ProjectData/Project/UI/VersionsTree.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/ProjectData/Project/UI/VersionsTree.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/ProjectData/Project/db_project_info.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/ProjectData/Project/db_project_info.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/ProjectData/SapforData/Arrays/UI/DistributionMenu.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/ProjectData/SapforData/Arrays/UI/DistributionMenu.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/ProjectData/SapforData/Arrays/UI/RulesTree.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/ProjectData/SapforData/Arrays/UI/RulesTree.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/ProjectData/SapforData/Functions/UI/InlineTree.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/ProjectData/SapforData/Functions/UI/InlineTree.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/ProjectData/SapforData/Functions/UI/InlineTree2.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/ProjectData/SapforData/Functions/UI/InlineTree2.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/ProjectData/SapforData/Includes/UI/IncludesTree.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/ProjectData/SapforData/Includes/UI/IncludesTree.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/Common/MachineProcess/MachineProcess.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/Common/MachineProcess/MachineProcess.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/Common/TestingPackage/TestingPackage.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/Common/TestingPackage/TestingPackage.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/Common/TestingPlanner.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/Common/TestingPlanner.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/SAPFOR/PackageModeSupervisor.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/SAPFOR/PackageModeSupervisor.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/SAPFOR/SapforTestingPlanner.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/SAPFOR/SapforTestingPlanner.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Visual/Menus/GraphMenu.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common/Visual/Menus/GraphMenu.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Visual/Menus/ProjectFilesMenu.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Visual/Menus/ProjectFilesMenu.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Visual/Menus/SelectionTreeMenu.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Visual/Menus/SelectionTreeMenu.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Visual/Menus/VersionsMenu.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Visual/Menus/VersionsMenu.java" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" /> <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
@@ -104,11 +159,11 @@
<recent name="C:\Users\misha\Documents\visual_sapfor_2023\src\files" /> <recent name="C:\Users\misha\Documents\visual_sapfor_2023\src\files" />
</key> </key>
<key name="MoveMembersDialog.RECENTS_KEY"> <key name="MoveMembersDialog.RECENTS_KEY">
<recent name="Common.CommonConstants" />
<recent name="Common.MainModule_" /> <recent name="Common.MainModule_" />
<recent name="_VisualDVM.ProjectData.Files.UI.Editor.SPFEditor" /> <recent name="_VisualDVM.ProjectData.Files.UI.Editor.SPFEditor" />
<recent name="_VisualDVM.Repository.Component.Sapfor.Sapfor" /> <recent name="_VisualDVM.Repository.Component.Sapfor.Sapfor" />
<recent name="Common.Visual.UI_" /> <recent name="Common.Visual.UI_" />
<recent name="Common.Utils.Utils_" />
</key> </key>
<key name="MoveFile.RECENT_KEYS"> <key name="MoveFile.RECENT_KEYS">
<recent name="C:\Users\misha\Documents\visual_sapfor_2023\src\Common\icons" /> <recent name="C:\Users\misha\Documents\visual_sapfor_2023\src\Common\icons" />

View File

@@ -7,6 +7,15 @@ public class CommonConstants {
public static final int Nan = -1; public static final int Nan = -1;
public static final Pattern VALID_EMAIL_ADDRESS_REGEX = public static final Pattern VALID_EMAIL_ADDRESS_REGEX =
Pattern.compile("^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,6}$", Pattern.CASE_INSENSITIVE); Pattern.compile("^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,6}$", Pattern.CASE_INSENSITIVE);
//--
//-файлы-признаки
public static final String LOADED = "LOADED";
public static final String STARTED = "STARTED";
public static final String ABORTED = "ABORTED";
public static final String INTERRUPT = "INTERRUPT"; //файл признак прерывания.
public final static String DONE = "DONE";
public final static String TIMEOUT = "TIMEOUT";
//--
public static char[] regular_metasymbols = new char[]{ public static char[] regular_metasymbols = new char[]{
'<', '>', '(', ')', '[', ']', '{', '}', '^', '-', '=', '$', '!', '|', '?', '*', '+', '.' '<', '>', '(', ')', '[', ']', '{', '}', '^', '-', '=', '$', '!', '|', '?', '*', '+', '.'
}; };

View File

@@ -4,7 +4,7 @@ import Common.Database.Objects.Grid.TablesVisualDatasDBTable;
import Common.Database.Objects.PassStats.PassStatsDBTable; import Common.Database.Objects.PassStats.PassStatsDBTable;
import Common.Database.Objects.Splitter.SplittersDBTable; import Common.Database.Objects.Splitter.SplittersDBTable;
import Common.Database.SQLITE.SQLiteDatabase; import Common.Database.SQLITE.SQLiteDatabase;
import _VisualDVM.Passes.PassCode; import Common.Passes.PassCode_;
import java.io.File; import java.io.File;
public class VisualiserDatabase extends SQLiteDatabase { public class VisualiserDatabase extends SQLiteDatabase {
@@ -23,7 +23,7 @@ public class VisualiserDatabase extends SQLiteDatabase {
addTable(passStats = new PassStatsDBTable()); addTable(passStats = new PassStatsDBTable());
} }
@Override @Override
public PassCode getSynchronizePassCode() { public PassCode_ getSynchronizePassCode() {
return null; return null;
} }
} }

View File

@@ -1,5 +1,5 @@
package Common.Utils; package Common.Utils;
import _VisualDVM.Constants; import Common.CommonConstants;
import org.apache.commons.io.FileUtils; import org.apache.commons.io.FileUtils;
import java.io.File; import java.io.File;
@@ -8,12 +8,12 @@ public class InterruptThread extends Thread {
//------------ //------------
public InterruptThread(int sleep_ms, Callable action) { public InterruptThread(int sleep_ms, Callable action) {
super(() -> { super(() -> {
File interruptFile = new File(Constants.INTERRUPT); File interruptFile = new File(CommonConstants.INTERRUPT);
try { try {
while (true) { while (true) {
Thread.sleep(sleep_ms); Thread.sleep(sleep_ms);
if (interruptFile.exists()) { if (interruptFile.exists()) {
FileUtils.writeStringToFile(new File(Constants.ABORTED), ""); FileUtils.writeStringToFile(new File(CommonConstants.ABORTED), "");
FileUtils.forceDelete(interruptFile); FileUtils.forceDelete(interruptFile);
action.call(); action.call();
} }

View File

@@ -1,13 +1,13 @@
package Common.Visual.Controls; package Common.Visual.Controls;
import Common.MainModule_; import Common.MainModule_;
import Common.Passes.PassCode_;
import Common.Visual.Menus.VisualiserMenuBar; import Common.Visual.Menus.VisualiserMenuBar;
import _VisualDVM.Passes.PassCode;
import javax.swing.*; import javax.swing.*;
import java.awt.event.MouseAdapter; import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent; import java.awt.event.MouseEvent;
public class TabToolBar extends VisualiserMenuBar { public class TabToolBar extends VisualiserMenuBar {
public TabToolBar(String titleText, PassCode... passes) { public TabToolBar(String titleText, PassCode_... passes) {
setFloatable(false); setFloatable(false);
setOpaque(false); setOpaque(false);
//- //-
@@ -16,7 +16,7 @@ public class TabToolBar extends VisualiserMenuBar {
add(title); add(title);
addSeparator(); addSeparator();
//- //-
for (PassCode code : passes) for (PassCode_ code : passes)
add(MainModule_.instance.getPass(code).createTabButton()); add(MainModule_.instance.getPass(code).createTabButton());
MouseAdapter adapter = new MouseAdapter() { MouseAdapter adapter = new MouseAdapter() {
@Override @Override

View File

@@ -14,7 +14,6 @@ import Common.Visual.Tables.DBObjectSelectionRenderer;
import Common.Visual.Tables.DBObjectSelector; import Common.Visual.Tables.DBObjectSelector;
import Common.Visual.Tables.DataTable; import Common.Visual.Tables.DataTable;
import Common.Visual.Tables.Grid.GridAnchestor; import Common.Visual.Tables.Grid.GridAnchestor;
import _VisualDVM.Global;
import javax.swing.*; import javax.swing.*;
import javax.swing.table.TableColumn; import javax.swing.table.TableColumn;
@@ -64,21 +63,21 @@ public class DataSetControlForm extends ControlWithCurrentForm<DataTable> {
return getDataSource().CurrentName(); return getDataSource().CurrentName();
} }
public void SaveColumns() { public void SaveColumns() {
if (Global.mainModule.getDb() != null) { if (MainModule_.instance.getDb() != null) {
try { try {
if ((CurrentName() != null)) { if ((CurrentName() != null)) {
String tableName = CurrentName().toString(); String tableName = CurrentName().toString();
Vector<String> widths = IntStream.range(0, columns.size()).mapToObj(i -> String.valueOf(control.getColumnModel().getColumn(i).getWidth())).collect(Collectors.toCollection(Vector::new)); Vector<String> widths = IntStream.range(0, columns.size()).mapToObj(i -> String.valueOf(control.getColumnModel().getColumn(i).getWidth())).collect(Collectors.toCollection(Vector::new));
String packed = String.join("|", widths); String packed = String.join("|", widths);
TableVisualData tableVisualData; TableVisualData tableVisualData;
if (Global.mainModule.getDb().tablesVisualData.containsKey(tableName)) { if (MainModule_.instance.getDb().tablesVisualData.containsKey(tableName)) {
tableVisualData = Global.mainModule.getDb().tablesVisualData.get(tableName); tableVisualData = MainModule_.instance.getDb().tablesVisualData.get(tableName);
} else { } else {
tableVisualData = new TableVisualData(tableName); tableVisualData = new TableVisualData(tableName);
Global.mainModule.getDb().Insert(tableVisualData); MainModule_.instance.getDb().Insert(tableVisualData);
} }
tableVisualData.sizes = packed; tableVisualData.sizes = packed;
Global.mainModule.getDb().Update(tableVisualData); MainModule_.instance.getDb().Update(tableVisualData);
} }
} catch (Exception ex) { } catch (Exception ex) {
ex.printStackTrace(); ex.printStackTrace();
@@ -149,11 +148,11 @@ public class DataSetControlForm extends ControlWithCurrentForm<DataTable> {
//-----------------------------NEW------------------------------------- //-----------------------------NEW-------------------------------------
@Override @Override
public void CorrectColumnsSizes() { public void CorrectColumnsSizes() {
if ((Global.mainModule.getDb() != null) if ((MainModule_.instance.getDb() != null)
&& CurrentName() != null && CurrentName() != null
&& Global.mainModule.getDb().tablesVisualData.containsKey(CurrentName().toString())) { && MainModule_.instance.getDb().tablesVisualData.containsKey(CurrentName().toString())) {
if (!getColumnsProfile().equalsIgnoreCase(colNamesAndSizes)) { if (!getColumnsProfile().equalsIgnoreCase(colNamesAndSizes)) {
TableVisualData grid = Global.mainModule.getDb().tablesVisualData.get(CurrentName().toString()); TableVisualData grid = MainModule_.instance.getDb().tablesVisualData.get(CurrentName().toString());
String[] data = grid.sizes.split("\\|"); String[] data = grid.sizes.split("\\|");
for (int i = 0; i < columns.size(); ++i) { for (int i = 0; i < columns.size(); ++i) {
if (i <= (data.length - 1)) { if (i <= (data.length - 1)) {
@@ -260,19 +259,6 @@ public class DataSetControlForm extends ControlWithCurrentForm<DataTable> {
Utils_.MainLog.PrintException(e); Utils_.MainLog.PrintException(e);
} }
} }
//---
/*
if (hasCheckBox()) {
TableColumn column = control.getColumnModel().getColumn(1)
column.setHeaderRenderer(new TableCellRenderer() {
@Override
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
return null;
}
});
}
*/
} }
@Override @Override
protected void refresh() { protected void refresh() {

View File

@@ -1,7 +1,7 @@
package Common.Visual.Menus; package Common.Visual.Menus;
import Common.Database.Tables.DataSet; import Common.Database.Tables.DataSet;
import Common.Passes.PassCode_;
import Common.Visual.Controls.MenuBarButton; import Common.Visual.Controls.MenuBarButton;
import _VisualDVM.Passes.PassCode;
import javax.swing.*; import javax.swing.*;
import java.awt.*; import java.awt.*;
@@ -14,7 +14,7 @@ public class DataMenuBar extends VisualiserMenuBar {
JButton selectAllButton = null; JButton selectAllButton = null;
JButton unselectAllButton = null; JButton unselectAllButton = null;
//- //-
public DataMenuBar(String dataName, PassCode... passes) { public DataMenuBar(String dataName, PassCode_... passes) {
add(new JLabel(dataName + " : ")); add(new JLabel(dataName + " : "));
add(countLabel = new JLabel("?")); add(countLabel = new JLabel("?"));
addPasses(passes); addPasses(passes);

View File

@@ -1,4 +1,4 @@
package _VisualDVM.Visual.Menus; package Common.Visual.Menus;
import Common.Visual.Menus.StyledPopupMenu; import Common.Visual.Menus.StyledPopupMenu;
import Common.Visual.Menus.VisualiserMenuItem; import Common.Visual.Menus.VisualiserMenuItem;
import Common.Visual.Trees.StyledTree; import Common.Visual.Trees.StyledTree;

View File

@@ -1,5 +1,6 @@
package Common.Visual.Menus; package Common.Visual.Menus;
import Common.MainModule_; import Common.MainModule_;
import Common.Passes.PassCode_;
import Common.Utils.Utils_; import Common.Utils.Utils_;
import Common.Visual.Fonts.VisualiserFonts; import Common.Visual.Fonts.VisualiserFonts;
import _VisualDVM.Global; import _VisualDVM.Global;
@@ -13,11 +14,11 @@ public class VisualiserMenuBar extends JToolBar {
setFloatable(false); setFloatable(false);
setSizeLimits(); setSizeLimits();
} }
public void addPasses(PassCode... codes) { public void addPasses(PassCode_... codes) {
//- кнопки. связать их с проходами. (!) //- кнопки. связать их с проходами. (!)
for (PassCode code : codes) { for (PassCode_ code : codes) {
if (Global.mainModule.getPass(code) != null) { if (MainModule_.instance.getPass(code) != null) {
add(Global.mainModule.getPass(code).createButton()); add(MainModule_.instance.getPass(code).createButton());
} }
} }
} }

View File

@@ -1,7 +1,7 @@
package Common.Visual.Trees; package Common.Visual.Trees;
import Common.MainModule_;
import Common.Utils.Utils_; import Common.Utils.Utils_;
import Common.Visual.DataControl_OLD; import Common.Visual.DataControl_OLD;
import _VisualDVM.Global;
import javax.swing.tree.DefaultMutableTreeNode; import javax.swing.tree.DefaultMutableTreeNode;
import javax.swing.tree.TreePath; import javax.swing.tree.TreePath;
@@ -11,7 +11,7 @@ public class DataTree extends StyledTree implements DataControl_OLD {
} }
public void ChangeCurrentObject(DefaultMutableTreeNode node) { public void ChangeCurrentObject(DefaultMutableTreeNode node) {
if (getCurrent() != null) if (getCurrent() != null)
Global.mainModule.set(getCurrent(), node.getUserObject()); MainModule_.instance.set(getCurrent(), node.getUserObject());
} }
@Override @Override
public void ShowCurrentObject() throws Exception { public void ShowCurrentObject() throws Exception {

View File

@@ -1,6 +1,6 @@
package Common.Visual.Trees; package Common.Visual.Trees;
import Common.MainModule_;
import Common.Visual.Selectable; import Common.Visual.Selectable;
import _VisualDVM.Global;
import javax.swing.tree.DefaultMutableTreeNode; import javax.swing.tree.DefaultMutableTreeNode;
public class SelectableTree extends DataTree { public class SelectableTree extends DataTree {
@@ -9,7 +9,7 @@ public class SelectableTree extends DataTree {
} }
@Override @Override
public void LeftMouseAction1() { public void LeftMouseAction1() {
Object element = Global.mainModule.get(getCurrent()); Object element = MainModule_.instance.get(getCurrent());
if ((element instanceof Selectable)) { if ((element instanceof Selectable)) {
((Selectable) element).SwitchSelection(); ((Selectable) element).SwitchSelection();
updateUI(); updateUI();

View File

@@ -2,7 +2,7 @@ package Common.Visual.Trees;
import Common.MainModule_; import Common.MainModule_;
import Common.Visual.Fonts.VisualiserFonts; import Common.Visual.Fonts.VisualiserFonts;
import Common.Visual.Themes.ThemeElement; import Common.Visual.Themes.ThemeElement;
import _VisualDVM.Visual.Menus.GraphMenu; import Common.Visual.Menus.GraphMenu;
import javax.swing.*; import javax.swing.*;
import javax.swing.tree.DefaultMutableTreeNode; import javax.swing.tree.DefaultMutableTreeNode;

View File

@@ -26,14 +26,6 @@ public class Constants {
public static final String DVM_REPOSITORY = "http://svn.dvm-system.org/svn/dvmhrepo/dvm"; public static final String DVM_REPOSITORY = "http://svn.dvm-system.org/svn/dvmhrepo/dvm";
public static final String SAPFOR_REPOSITORY = "http://svn.dvm-system.org/svn/dvmhrepo/sapfor"; public static final String SAPFOR_REPOSITORY = "http://svn.dvm-system.org/svn/dvmhrepo/sapfor";
public static final String SAPFOR_REPOSITORY_BIN = "/sapfor/experts/Sapfor_2017/_bin"; public static final String SAPFOR_REPOSITORY_BIN = "/sapfor/experts/Sapfor_2017/_bin";
//--
//-файлы-признаки
public static final String LOADED = "LOADED";
public static final String STARTED = "STARTED";
public static final String ABORTED = "ABORTED";
public static final String INTERRUPT = "INTERRUPT"; //файл признак прерывания.
public final static String DONE = "DONE";
public final static String TIMEOUT = "TIMEOUT";
//-вывод задач //-вывод задач
public final static String parse_out_file = "parse_out.txt"; public final static String parse_out_file = "parse_out.txt";
public final static String parse_err_file = "parse_err.txt"; public final static String parse_err_file = "parse_err.txt";

View File

@@ -1,4 +1,5 @@
package _VisualDVM.GlobalData.Tasks.Supervisor.Local.Linux; package _VisualDVM.GlobalData.Tasks.Supervisor.Local.Linux;
import Common.CommonConstants;
import Common.Passes.PassException; import Common.Passes.PassException;
import Common.Utils.Utils_; import Common.Utils.Utils_;
import _VisualDVM.Constants; import _VisualDVM.Constants;
@@ -63,10 +64,10 @@ public abstract class LinuxLocalTaskSupervisor<T extends Task> extends LocalTask
return Paths.get(getProjectCopy().getAbsolutePath(), Constants.time_file).toFile(); return Paths.get(getProjectCopy().getAbsolutePath(), Constants.time_file).toFile();
} }
protected File getDONE_file() { protected File getDONE_file() {
return Paths.get(getProjectCopy().getAbsolutePath(), Constants.DONE).toFile(); return Paths.get(getProjectCopy().getAbsolutePath(), CommonConstants.DONE).toFile();
} }
protected File getTIMEOUT_file() { protected File getTIMEOUT_file() {
return Paths.get(getProjectCopy().getAbsolutePath(), Constants.TIMEOUT).toFile(); return Paths.get(getProjectCopy().getAbsolutePath(), CommonConstants.TIMEOUT).toFile();
} }
@Override @Override
protected void PrepareWorkspace() throws Exception { protected void PrepareWorkspace() throws Exception {

View File

@@ -1,4 +1,5 @@
package _VisualDVM.GlobalData.Tasks.Supervisor.Remote; package _VisualDVM.GlobalData.Tasks.Supervisor.Remote;
import Common.CommonConstants;
import Common.Utils.Utils_; import Common.Utils.Utils_;
import _VisualDVM.Constants; import _VisualDVM.Constants;
import _VisualDVM.GlobalData.RemoteFile.RemoteFile; import _VisualDVM.GlobalData.RemoteFile.RemoteFile;
@@ -29,10 +30,10 @@ public abstract class RemoteTaskSupervisor<T extends Task> extends TaskSuperviso
return new RemoteFile(getRemoteProject().full_name, Constants.err_file); return new RemoteFile(getRemoteProject().full_name, Constants.err_file);
} }
public RemoteFile getDONE_file() { public RemoteFile getDONE_file() {
return new RemoteFile(getRemoteProject().full_name, Constants.DONE); return new RemoteFile(getRemoteProject().full_name, CommonConstants.DONE);
} }
public RemoteFile getTIMEOUT_file() { public RemoteFile getTIMEOUT_file() {
return new RemoteFile(getRemoteProject().full_name, Constants.TIMEOUT); return new RemoteFile(getRemoteProject().full_name, CommonConstants.TIMEOUT);
} }
@Override @Override
protected void PrepareWorkspace() throws Exception { protected void PrepareWorkspace() throws Exception {
@@ -46,8 +47,8 @@ public abstract class RemoteTaskSupervisor<T extends Task> extends TaskSuperviso
} }
@Override @Override
protected void CheckTask() throws Exception { protected void CheckTask() throws Exception {
RemoteFile DONE = new RemoteFile(getRemoteProject(), Constants.DONE); RemoteFile DONE = new RemoteFile(getRemoteProject(), CommonConstants.DONE);
RemoteFile TIMEOUT = new RemoteFile(getRemoteProject(), Constants.TIMEOUT); RemoteFile TIMEOUT = new RemoteFile(getRemoteProject(), CommonConstants.TIMEOUT);
if (pass.user.connection.Exists(DONE)) if (pass.user.connection.Exists(DONE))
task.state = TaskState.Finished; task.state = TaskState.Finished;
else if (pass.user.connection.Exists(TIMEOUT)) else if (pass.user.connection.Exists(TIMEOUT))

View File

@@ -1,6 +1,6 @@
package _VisualDVM.Passes.All; package _VisualDVM.Passes.All;
import Common.Utils.Utils_; import Common.Utils.Utils_;
import Common.Visual.Windows.Dialog.Text.FileNameForm; import _VisualDVM.Visual.Windows.FileNameForm;
import _VisualDVM.Global; import _VisualDVM.Global;
import _VisualDVM.Passes.Project.ChangeFilePass; import _VisualDVM.Passes.Project.ChangeFilePass;
import _VisualDVM.ProjectData.Files.DBProjectFile; import _VisualDVM.ProjectData.Files.DBProjectFile;

View File

@@ -1,7 +1,7 @@
package _VisualDVM.Passes.All; package _VisualDVM.Passes.All;
import Common.Passes.PassException; import Common.Passes.PassException;
import Common.Utils.Utils_; import Common.Utils.Utils_;
import Common.Visual.Windows.Dialog.Text.FileNameForm; import _VisualDVM.Visual.Windows.FileNameForm;
import _VisualDVM.Constants; import _VisualDVM.Constants;
import _VisualDVM.Global; import _VisualDVM.Global;
import _VisualDVM.Passes.Project.ChangeFilePass; import _VisualDVM.Passes.Project.ChangeFilePass;

View File

@@ -2,7 +2,7 @@ package _VisualDVM.Passes.All;
import Common.Passes.Pass; import Common.Passes.Pass;
import Common.Passes.PassException; import Common.Passes.PassException;
import Common.Utils.Utils_; import Common.Utils.Utils_;
import Common.Visual.Windows.Dialog.Text.FileNameForm; import _VisualDVM.Visual.Windows.FileNameForm;
import _VisualDVM.Constants; import _VisualDVM.Constants;
import _VisualDVM.Global; import _VisualDVM.Global;
import _VisualDVM.Passes.PassCode; import _VisualDVM.Passes.PassCode;

View File

@@ -1,5 +1,5 @@
package _VisualDVM.Passes.All; package _VisualDVM.Passes.All;
import _VisualDVM.Constants; import Common.CommonConstants;
import _VisualDVM.Current; import _VisualDVM.Current;
import _VisualDVM.Global; import _VisualDVM.Global;
import _VisualDVM.TestingSystem.DVM.DVMPackage.DVMPackage; import _VisualDVM.TestingSystem.DVM.DVMPackage.DVMPackage;
@@ -22,7 +22,7 @@ public class DownloadDVMPackage extends DownloadDVMPackages {
Log.Writeln_("Возможно скачать и отобразить задачи только завершённого пакета!"); Log.Writeln_("Возможно скачать и отобразить задачи только завершённого пакета!");
return false; return false;
} }
if (new File(dvmPackage.getLocalWorkspace(), Constants.LOADED).exists()) { if (new File(dvmPackage.getLocalWorkspace(), CommonConstants.LOADED).exists()) {
Global.mainModule.getUI().getMainWindow().getTestingWindow().ShowDVMPackage(dvmPackage); Global.mainModule.getUI().getMainWindow().getTestingWindow().ShowDVMPackage(dvmPackage);
Global.testingServer.db.dvmRunTasks.ShowDVMPackage(dvmPackage); Global.testingServer.db.dvmRunTasks.ShowDVMPackage(dvmPackage);
return false; return false;

View File

@@ -1,7 +1,7 @@
package _VisualDVM.Passes.All; package _VisualDVM.Passes.All;
import Common.CommonConstants;
import Common.Passes.Pass; import Common.Passes.Pass;
import Common.Utils.Utils_; import Common.Utils.Utils_;
import _VisualDVM.Constants;
import _VisualDVM.Global; import _VisualDVM.Global;
import _VisualDVM.Passes.PassCode; import _VisualDVM.Passes.PassCode;
import _VisualDVM.Passes.Server.TestingSystemPass; import _VisualDVM.Passes.Server.TestingSystemPass;
@@ -63,7 +63,7 @@ public class DownloadDVMPackages extends Pass<Vector<Integer>> {
Utils_.CheckAndCleanDirectory(workspace); Utils_.CheckAndCleanDirectory(workspace);
File results_zip = new File(workspace, "results.zip"); File results_zip = new File(workspace, "results.zip");
File results = new File(workspace, "results"); File results = new File(workspace, "results");
File loaded = new File(workspace, Constants.LOADED); File loaded = new File(workspace, CommonConstants.LOADED);
Pair<byte[], byte[]> packed_package = p.getValue(); Pair<byte[], byte[]> packed_package = p.getValue();
//--- //---
Utils_.bytesToFile(packed_package.getKey(), results_zip); Utils_.bytesToFile(packed_package.getKey(), results_zip);

View File

@@ -1,4 +1,5 @@
package _VisualDVM.Passes.All; package _VisualDVM.Passes.All;
import Common.CommonConstants;
import _VisualDVM.Constants; import _VisualDVM.Constants;
import _VisualDVM.Global; import _VisualDVM.Global;
import _VisualDVM.Passes.ProcessPass; import _VisualDVM.Passes.ProcessPass;
@@ -19,7 +20,7 @@ public class DownloadRepository extends ProcessPass {
return true; return true;
} }
private void synchronize(String src, File dst) throws Exception { private void synchronize(String src, File dst) throws Exception {
File loadedFile = Paths.get(dst.getAbsolutePath(), Constants.LOADED).toFile(); File loadedFile = Paths.get(dst.getAbsolutePath(), CommonConstants.LOADED).toFile();
if (loadedFile.exists()) { if (loadedFile.exists()) {
PerformScript("cd " + PerformScript("cd " +
dst.getAbsolutePath() + dst.getAbsolutePath() +

View File

@@ -1,7 +1,7 @@
package _VisualDVM.Passes.All; package _VisualDVM.Passes.All;
import Common.CommonConstants;
import Common.Passes.Pass; import Common.Passes.Pass;
import Common.Utils.Utils_; import Common.Utils.Utils_;
import _VisualDVM.Constants;
import _VisualDVM.Global; import _VisualDVM.Global;
import _VisualDVM.Passes.PassCode; import _VisualDVM.Passes.PassCode;
import _VisualDVM.Passes.Server.TestingSystemPass; import _VisualDVM.Passes.Server.TestingSystemPass;
@@ -28,7 +28,7 @@ public class DownloadSapforPackage extends Pass<SapforPackage> {
return false; return false;
} }
int id = target.id; int id = target.id;
loaded = new File(target.getLocalWorkspace(), Constants.LOADED); loaded = new File(target.getLocalWorkspace(), CommonConstants.LOADED);
if (!loaded.exists()) { if (!loaded.exists()) {
Pass pass = new TestingSystemPass() { Pass pass = new TestingSystemPass() {
@Override @Override

View File

@@ -1,10 +1,10 @@
package _VisualDVM.Passes.All; package _VisualDVM.Passes.All;
import Common.CommonConstants;
import Common.Passes.Pass; import Common.Passes.Pass;
import Common.Utils.Index; import Common.Utils.Index;
import Common.Utils.Utils_; import Common.Utils.Utils_;
import Common.Visual.UI; import Common.Visual.UI;
import Common.Visual.Windows.Dialog.VDirectoryChooser; import Common.Visual.Windows.Dialog.VDirectoryChooser;
import _VisualDVM.Constants;
import _VisualDVM.Current; import _VisualDVM.Current;
import _VisualDVM.Global; import _VisualDVM.Global;
import _VisualDVM.GlobalData.Tasks.TaskState; import _VisualDVM.GlobalData.Tasks.TaskState;
@@ -71,7 +71,7 @@ public class ExportDVMPackageToExcel extends Pass<Vector<DVMPackage>> {
if (!dvmPackage.state.isDone()) { if (!dvmPackage.state.isDone()) {
Log.Writeln_("Пакет " + dvmPackage.id + " не завершен."); Log.Writeln_("Пакет " + dvmPackage.id + " не завершен.");
} else { } else {
if (!new File(dvmPackage.getLocalWorkspace(), Constants.LOADED).exists()) { if (!new File(dvmPackage.getLocalWorkspace(), CommonConstants.LOADED).exists()) {
packagesToDownload.add(dvmPackage.id); packagesToDownload.add(dvmPackage.id);
} }
} }

View File

@@ -1,7 +1,7 @@
package _VisualDVM.Passes.All; package _VisualDVM.Passes.All;
import Common.Passes.PassException; import Common.Passes.PassException;
import Common.Utils.Utils_; import Common.Utils.Utils_;
import Common.Visual.Windows.Dialog.Text.FileNameForm; import _VisualDVM.Visual.Windows.FileNameForm;
import _VisualDVM.Current; import _VisualDVM.Current;
import _VisualDVM.Global; import _VisualDVM.Global;
import _VisualDVM.Passes.PassCode; import _VisualDVM.Passes.PassCode;

View File

@@ -1,7 +1,7 @@
package _VisualDVM.Passes.All; package _VisualDVM.Passes.All;
import Common.Passes.PassException; import Common.Passes.PassException;
import Common.Utils.Utils_; import Common.Utils.Utils_;
import Common.Visual.Windows.Dialog.Text.FileNameForm; import _VisualDVM.Visual.Windows.FileNameForm;
import _VisualDVM.Current; import _VisualDVM.Current;
import _VisualDVM.Global; import _VisualDVM.Global;
import _VisualDVM.Passes.PassCode; import _VisualDVM.Passes.PassCode;

View File

@@ -1,6 +1,6 @@
package _VisualDVM.Passes.All; package _VisualDVM.Passes.All;
import Common.Passes.Pass; import Common.Passes.Pass;
import Common.Visual.Windows.Dialog.Text.ReadOnlyMultilineTextForm; import _VisualDVM.Visual.Windows.ReadOnlyMultilineTextForm;
import _VisualDVM.Current; import _VisualDVM.Current;
import _VisualDVM.Global; import _VisualDVM.Global;
import _VisualDVM.GlobalData.Compiler.Compiler; import _VisualDVM.GlobalData.Compiler.Compiler;

View File

@@ -1,6 +1,6 @@
package _VisualDVM.Passes.All; package _VisualDVM.Passes.All;
import Common.Passes.Pass; import Common.Passes.Pass;
import Common.Visual.Windows.Dialog.Text.ReadOnlyMultilineTextForm; import _VisualDVM.Visual.Windows.ReadOnlyMultilineTextForm;
import _VisualDVM.Current; import _VisualDVM.Current;
import _VisualDVM.Global; import _VisualDVM.Global;
import _VisualDVM.GlobalData.Compiler.Compiler; import _VisualDVM.GlobalData.Compiler.Compiler;

View File

@@ -1,6 +1,6 @@
package _VisualDVM.Passes.All; package _VisualDVM.Passes.All;
import Common.Utils.Utils_; import Common.Utils.Utils_;
import Common.Visual.Windows.Dialog.Text.ReadOnlyMultilineTextForm; import _VisualDVM.Visual.Windows.ReadOnlyMultilineTextForm;
import _VisualDVM.Current; import _VisualDVM.Current;
import _VisualDVM.Global; import _VisualDVM.Global;
import _VisualDVM.Passes.Server.ComponentsRepositoryPass; import _VisualDVM.Passes.Server.ComponentsRepositoryPass;

View File

@@ -1,6 +1,6 @@
package _VisualDVM.Passes.All; package _VisualDVM.Passes.All;
import Common.Passes.PassException; import Common.Passes.PassException;
import Common.Visual.Windows.Dialog.Text.ReadOnlyMultilineTextForm; import _VisualDVM.Visual.Windows.ReadOnlyMultilineTextForm;
import _VisualDVM.GlobalData.RemoteFile.RemoteFile; import _VisualDVM.GlobalData.RemoteFile.RemoteFile;
import _VisualDVM.Passes.Server.TestingSystemPass; import _VisualDVM.Passes.Server.TestingSystemPass;
import _VisualDVM.Repository.Server.ServerCode; import _VisualDVM.Repository.Server.ServerCode;

View File

@@ -1,6 +1,6 @@
package _VisualDVM.Passes.Project; package _VisualDVM.Passes.Project;
import Common.Passes.Pass; import Common.Passes.Pass;
import Common.Visual.Windows.Dialog.Text.FileNameForm; import _VisualDVM.Visual.Windows.FileNameForm;
import _VisualDVM.Global; import _VisualDVM.Global;
import _VisualDVM.ProjectData.Project.db_project_info; import _VisualDVM.ProjectData.Project.db_project_info;

View File

@@ -1,4 +1,5 @@
package _VisualDVM.Passes.SSH; package _VisualDVM.Passes.SSH;
import Common.CommonConstants;
import Common.Utils.Utils_; import Common.Utils.Utils_;
import _VisualDVM.Constants; import _VisualDVM.Constants;
import _VisualDVM.Global; import _VisualDVM.Global;
@@ -39,7 +40,7 @@ public abstract class RepositoryServerSSHPass extends ConnectionPass {
protected void StartServer() throws Exception { protected void StartServer() throws Exception {
user.connection.startShellProcess(serverHome, "server_out.txt", "java -jar " + getServerFileName()); user.connection.startShellProcess(serverHome, "server_out.txt", "java -jar " + getServerFileName());
//-- //--
RemoteFile StartLog = new RemoteFile(serverHome, Constants.STARTED + RemoteFile StartLog = new RemoteFile(serverHome, CommonConstants.STARTED +
"_by_" + "_by_" +
Global.mainModule.getAccount().email + Global.mainModule.getAccount().email +
"_" + "_" +
@@ -58,8 +59,8 @@ public abstract class RepositoryServerSSHPass extends ConnectionPass {
} }
} }
protected void ShutdownServer() throws Exception { protected void ShutdownServer() throws Exception {
RemoteFile INTERRUPT = new RemoteFile(serverHome, Constants.INTERRUPT); RemoteFile INTERRUPT = new RemoteFile(serverHome, CommonConstants.INTERRUPT);
RemoteFile ABORTED = new RemoteFile(serverHome, Constants.ABORTED); RemoteFile ABORTED = new RemoteFile(serverHome, CommonConstants.ABORTED);
//-- //--
ShowMessage1("Создание файла INTERRUPT.."); ShowMessage1("Создание файла INTERRUPT..");
user.connection.writeToFile("", INTERRUPT); user.connection.writeToFile("", INTERRUPT);
@@ -71,7 +72,7 @@ public abstract class RepositoryServerSSHPass extends ConnectionPass {
//-- //--
ShowMessage2(""); ShowMessage2("");
ShowMessage1("Журнализация"); ShowMessage1("Журнализация");
RemoteFile AbortLog = new RemoteFile(serverHome, Constants.ABORTED + RemoteFile AbortLog = new RemoteFile(serverHome, CommonConstants.ABORTED +
"_by_" + "_by_" +
Global.mainModule.getAccount().email + Global.mainModule.getAccount().email +
"_" + "_" +

View File

@@ -1,4 +1,5 @@
package _VisualDVM.ProjectData.Files; package _VisualDVM.ProjectData.Files;
import Common.CommonConstants;
import Common.Database.Objects.DBObject; import Common.Database.Objects.DBObject;
import Common.Utils.Utils_; import Common.Utils.Utils_;
import _VisualDVM.Constants; import _VisualDVM.Constants;
@@ -30,12 +31,12 @@ public class ProjectFile extends DBObject {
public void AutoDetectProperties(String name_in) { public void AutoDetectProperties(String name_in) {
//проверка запретных имен. //проверка запретных имен.
String[] forbiddenNames = new String[]{ String[] forbiddenNames = new String[]{
Constants.INTERRUPT, CommonConstants.INTERRUPT,
Constants.launch_script_name, Constants.launch_script_name,
Constants.default_binary_name, Constants.default_binary_name,
//-- //--
Constants.DONE, CommonConstants.DONE,
Constants.TIMEOUT, CommonConstants.TIMEOUT,
Constants.out_file, Constants.out_file,
Constants.err_file, Constants.err_file,
Constants.time_file, Constants.time_file,

View File

@@ -1,6 +1,6 @@
package _VisualDVM.ProjectData.Files.UI; package _VisualDVM.ProjectData.Files.UI;
import Common.Visual.Trees.DataTree; import Common.Visual.Trees.DataTree;
import Common.Visual.Trees.GraphTreeCellRenderer; import _VisualDVM.Visual.Trees.GraphTreeCellRenderer;
import _VisualDVM.Current; import _VisualDVM.Current;
import _VisualDVM.Global; import _VisualDVM.Global;
import _VisualDVM.ProjectData.SapforData.FileObject; import _VisualDVM.ProjectData.SapforData.FileObject;

View File

@@ -5,7 +5,7 @@ import _VisualDVM.Current;
import _VisualDVM.Global; import _VisualDVM.Global;
import _VisualDVM.Passes.PassCode; import _VisualDVM.Passes.PassCode;
import _VisualDVM.ProjectData.Files.DBProjectFile; import _VisualDVM.ProjectData.Files.DBProjectFile;
import _VisualDVM.Visual.Menus.GraphMenu; import Common.Visual.Menus.GraphMenu;
import _VisualDVM.Visual.Menus.ProjectFilesMenu; import _VisualDVM.Visual.Menus.ProjectFilesMenu;
import javax.swing.tree.DefaultMutableTreeNode; import javax.swing.tree.DefaultMutableTreeNode;

View File

@@ -4,7 +4,7 @@ import Common.Visual.Trees.DataTree;
import _VisualDVM.Current; import _VisualDVM.Current;
import _VisualDVM.Global; import _VisualDVM.Global;
import _VisualDVM.Passes.PassCode; import _VisualDVM.Passes.PassCode;
import _VisualDVM.Visual.Menus.GraphMenu; import Common.Visual.Menus.GraphMenu;
import _VisualDVM.Visual.Menus.VersionsMenu; import _VisualDVM.Visual.Menus.VersionsMenu;
import javax.swing.tree.TreePath; import javax.swing.tree.TreePath;

View File

@@ -701,7 +701,7 @@ public class db_project_info extends DBObject {
return true; return true;
} }
public File getInterruptFile() { public File getInterruptFile() {
return Paths.get(getDataDirectory().getAbsolutePath(), Constants.INTERRUPT).toFile(); return Paths.get(getDataDirectory().getAbsolutePath(), CommonConstants.INTERRUPT).toFile();
} }
public void CleanInterruptFile() throws Exception { public void CleanInterruptFile() throws Exception {
File file = getInterruptFile(); File file = getInterruptFile();

View File

@@ -2,7 +2,7 @@ package _VisualDVM.ProjectData.SapforData.Arrays.UI;
import Common.Visual.Trees.StyledTree; import Common.Visual.Trees.StyledTree;
import _VisualDVM.Global; import _VisualDVM.Global;
import _VisualDVM.Passes.PassCode; import _VisualDVM.Passes.PassCode;
import _VisualDVM.Visual.Menus.GraphMenu; import Common.Visual.Menus.GraphMenu;
import javax.swing.*; import javax.swing.*;
public class DistributionMenu extends GraphMenu { public class DistributionMenu extends GraphMenu {

View File

@@ -3,7 +3,7 @@ import Common.Visual.Trees.StyledTree;
import _VisualDVM.Current; import _VisualDVM.Current;
import _VisualDVM.Global; import _VisualDVM.Global;
import _VisualDVM.ProjectData.SapforData.Regions.ParallelRegion; import _VisualDVM.ProjectData.SapforData.Regions.ParallelRegion;
import _VisualDVM.Visual.Menus.GraphMenu; import Common.Visual.Menus.GraphMenu;
import javax.swing.tree.DefaultMutableTreeNode; import javax.swing.tree.DefaultMutableTreeNode;
import javax.swing.tree.TreePath; import javax.swing.tree.TreePath;

View File

@@ -4,7 +4,7 @@ import Common.Visual.Trees.SelectionTreeCellRenderer;
import _VisualDVM.Current; import _VisualDVM.Current;
import _VisualDVM.Global; import _VisualDVM.Global;
import _VisualDVM.ProjectData.SapforData.FileObject; import _VisualDVM.ProjectData.SapforData.FileObject;
import _VisualDVM.Visual.Menus.GraphMenu; import Common.Visual.Menus.GraphMenu;
public class InlineTree extends SelectableTree { public class InlineTree extends SelectableTree {
public InlineTree() { public InlineTree() {
super(Global.mainModule.getProject().inline_root); super(Global.mainModule.getProject().inline_root);

View File

@@ -4,7 +4,7 @@ import Common.Visual.Trees.SelectionTreeCellRenderer;
import _VisualDVM.Current; import _VisualDVM.Current;
import _VisualDVM.Global; import _VisualDVM.Global;
import _VisualDVM.ProjectData.SapforData.FileObject; import _VisualDVM.ProjectData.SapforData.FileObject;
import _VisualDVM.Visual.Menus.GraphMenu; import Common.Visual.Menus.GraphMenu;
public class InlineTree2 extends SelectableTree { public class InlineTree2 extends SelectableTree {
public InlineTree2() { public InlineTree2() {
super(Global.mainModule.getProject().inline_root2); super(Global.mainModule.getProject().inline_root2);

View File

@@ -3,7 +3,7 @@ import Common.Visual.Trees.SelectableTree;
import Common.Visual.Trees.SelectionTreeCellRenderer; import Common.Visual.Trees.SelectionTreeCellRenderer;
import _VisualDVM.Current; import _VisualDVM.Current;
import _VisualDVM.Global; import _VisualDVM.Global;
import _VisualDVM.Visual.Menus.GraphMenu; import Common.Visual.Menus.GraphMenu;
public class IncludesTree extends SelectableTree { public class IncludesTree extends SelectableTree {
public IncludesTree() { public IncludesTree() {
super(Global.mainModule.getProject().includes_root); super(Global.mainModule.getProject().includes_root);

View File

@@ -61,10 +61,10 @@ public class MachineProcess extends DBObject {
return new File(Global.MachinesDirectory, id); return new File(Global.MachinesDirectory, id);
} }
public File getStartedFile() { public File getStartedFile() {
return new File(getWorkspace(), Constants.STARTED); return new File(getWorkspace(), CommonConstants.STARTED);
} }
public File getAbortedFile() { public File getAbortedFile() {
return new File(getWorkspace(), Constants.ABORTED); return new File(getWorkspace(), CommonConstants.ABORTED);
} }
//--- //---
public boolean isAborted() { public boolean isAborted() {

View File

@@ -1,8 +1,8 @@
package _VisualDVM.TestingSystem.Common.TestingPackage; package _VisualDVM.TestingSystem.Common.TestingPackage;
import Common.CommonConstants;
import Common.Database.Objects.DBObject; import Common.Database.Objects.DBObject;
import Common.Database.Objects.riDBObject; import Common.Database.Objects.riDBObject;
import Common.Utils.Utils_; import Common.Utils.Utils_;
import _VisualDVM.Constants;
import _VisualDVM.TestingSystem.Common.Configuration.Configuration; import _VisualDVM.TestingSystem.Common.Configuration.Configuration;
import _VisualDVM.TestingSystem.Common.Configuration.Json.ConfigurationsJson; import _VisualDVM.TestingSystem.Common.Configuration.Json.ConfigurationsJson;
import _VisualDVM.TestingSystem.Common.TasksPackageState; import _VisualDVM.TestingSystem.Common.TasksPackageState;
@@ -60,7 +60,7 @@ public abstract class TestingPackage<J> extends riDBObject {
return new File(getHomeDirectory(), String.valueOf(id)); return new File(getHomeDirectory(), String.valueOf(id));
} }
public boolean isLoaded() { public boolean isLoaded() {
return new File(getLocalWorkspace(), Constants.LOADED).exists(); return new File(getLocalWorkspace(), CommonConstants.LOADED).exists();
} }
public abstract Class getJsonClass(); public abstract Class getJsonClass();
public abstract File getHomeDirectory(); public abstract File getHomeDirectory();
@@ -68,7 +68,7 @@ public abstract class TestingPackage<J> extends riDBObject {
return new File(getLocalWorkspace(), "package_json"); return new File(getLocalWorkspace(), "package_json");
} }
public File getLoadedFile() { public File getLoadedFile() {
return new File(getLocalWorkspace(), Constants.LOADED); return new File(getLocalWorkspace(), CommonConstants.LOADED);
} }
public void saveJson() throws Exception { public void saveJson() throws Exception {
Utils_.jsonToFile(package_json, getJsonFile()); Utils_.jsonToFile(package_json, getJsonFile());

View File

@@ -2,7 +2,6 @@ package _VisualDVM.TestingSystem.Common;
import Common.CommonConstants; import Common.CommonConstants;
import Common.Utils.Loggable; import Common.Utils.Loggable;
import Common.Utils.Utils_; import Common.Utils.Utils_;
import _VisualDVM.Constants;
import _VisualDVM.Global; import _VisualDVM.Global;
import _VisualDVM.GlobalData.Machine.Machine; import _VisualDVM.GlobalData.Machine.Machine;
import _VisualDVM.GlobalData.Machine.MachineType; import _VisualDVM.GlobalData.Machine.MachineType;
@@ -67,7 +66,7 @@ public abstract class TestingPlanner<P extends TestingPackage> extends Repositor
Print("serverName=" + serverName); Print("serverName=" + serverName);
Print("====="); Print("=====");
//---- //----
Utils.createEmptyFile(Constants.STARTED); Utils.createEmptyFile(CommonConstants.STARTED);
} }
//---- //----
protected void UpdatePackageState(TasksPackageState state_in) throws Exception { protected void UpdatePackageState(TasksPackageState state_in) throws Exception {
@@ -216,7 +215,7 @@ public abstract class TestingPlanner<P extends TestingPackage> extends Repositor
} }
protected void Finalize(String reason) { protected void Finalize(String reason) {
Print(reason); Print(reason);
File stateFile = new File(supervisorHome, Constants.ABORTED); File stateFile = new File(supervisorHome, CommonConstants.ABORTED);
try { try {
FileUtils.writeStringToFile(stateFile, reason); FileUtils.writeStringToFile(stateFile, reason);
} catch (Exception ex) { } catch (Exception ex) {

View File

@@ -1,4 +1,5 @@
package _VisualDVM.TestingSystem.SAPFOR; package _VisualDVM.TestingSystem.SAPFOR;
import Common.CommonConstants;
import Common.Utils.Utils_; import Common.Utils.Utils_;
import _VisualDVM.Constants; import _VisualDVM.Constants;
import _VisualDVM.TestingSystem.Common.TaskThread; import _VisualDVM.TestingSystem.Common.TaskThread;
@@ -27,7 +28,7 @@ public class PackageModeSupervisor extends ThreadsPlanner {
FileUtils.writeStringToFile(PID, sapfor_drv.getName(), Charset.defaultCharset()); FileUtils.writeStringToFile(PID, sapfor_drv.getName(), Charset.defaultCharset());
//--- //---
Date startDate = new Date(); Date startDate = new Date();
File started = new File(Constants.STARTED); File started = new File(CommonConstants.STARTED);
FileUtils.writeStringToFile(started, String.valueOf(startDate)); FileUtils.writeStringToFile(started, String.valueOf(startDate));
//формирование списка задач. //формирование списка задач.
setMaxKernels(package_json.kernels); setMaxKernels(package_json.kernels);
@@ -45,7 +46,7 @@ public class PackageModeSupervisor extends ThreadsPlanner {
//записать результаты всех задач. //записать результаты всех задач.
try { try {
Utils_.jsonToFile(package_json, new File(Constants.package_json)); Utils_.jsonToFile(package_json, new File(Constants.package_json));
FileUtils.writeStringToFile(new File(Constants.DONE), ""); FileUtils.writeStringToFile(new File(CommonConstants.DONE), "");
//-- //--
//Очистка //Очистка
//очистка служебных файлов. //очистка служебных файлов.

View File

@@ -102,7 +102,7 @@ public class SapforTestingPlanner extends TestingPlanner<SapforPackage> {
procBuilder.directory(workspace); procBuilder.directory(workspace);
procBuilder.start(); procBuilder.start();
//--->> //--->>
File started = new File(workspace, Constants.STARTED); File started = new File(workspace, CommonConstants.STARTED);
while (!started.exists()) { while (!started.exists()) {
Print("waiting for package start..."); Print("waiting for package start...");
Utils_.sleep(1000); Utils_.sleep(1000);
@@ -128,8 +128,8 @@ public class SapforTestingPlanner extends TestingPlanner<SapforPackage> {
} }
} }
//-- //--
File done = new File(workspace, Constants.DONE); File done = new File(workspace, CommonConstants.DONE);
File aborted = new File(workspace, Constants.ABORTED); File aborted = new File(workspace, CommonConstants.ABORTED);
if (done.exists()) { if (done.exists()) {
testingPackage.state = TasksPackageState.Analysis; testingPackage.state = TasksPackageState.Analysis;
state_changed = true; state_changed = true;
@@ -154,10 +154,10 @@ public class SapforTestingPlanner extends TestingPlanner<SapforPackage> {
protected void Kill() throws Exception { protected void Kill() throws Exception {
File workspace = testingPackage.getLocalWorkspace(); File workspace = testingPackage.getLocalWorkspace();
//---- //----
File interrupt_file = new File(workspace, Constants.INTERRUPT); File interrupt_file = new File(workspace, CommonConstants.INTERRUPT);
//---- //----
FileUtils.writeStringToFile(interrupt_file, new Date().toString()); FileUtils.writeStringToFile(interrupt_file, new Date().toString());
File aborted_file = new File(workspace, Constants.ABORTED); File aborted_file = new File(workspace, CommonConstants.ABORTED);
do { do {
Print("waiting for interrupt..."); Print("waiting for interrupt...");
Thread.sleep(1000); Thread.sleep(1000);

View File

@@ -1,6 +1,7 @@
package _VisualDVM.Visual.Menus; package _VisualDVM.Visual.Menus;
import Common.Utils.Utils_; import Common.Utils.Utils_;
import Common.Visual.Controls.StableMenuItem; import Common.Visual.Controls.StableMenuItem;
import Common.Visual.Menus.GraphMenu;
import Common.Visual.Menus.VisualiserMenuItem; import Common.Visual.Menus.VisualiserMenuItem;
import Common.Visual.Trees.StyledTree; import Common.Visual.Trees.StyledTree;
import _VisualDVM.Global; import _VisualDVM.Global;

View File

@@ -1,6 +1,7 @@
package _VisualDVM.Visual.Menus; package _VisualDVM.Visual.Menus;
import Common.Utils.Utils_; import Common.Utils.Utils_;
import Common.Visual.Controls.StableMenuItem; import Common.Visual.Controls.StableMenuItem;
import Common.Visual.Menus.GraphMenu;
import Common.Visual.Menus.VisualiserMenuItem; import Common.Visual.Menus.VisualiserMenuItem;
import Common.Visual.Selectable; import Common.Visual.Selectable;
import Common.Visual.Trees.DataTree; import Common.Visual.Trees.DataTree;

View File

@@ -1,6 +1,7 @@
package _VisualDVM.Visual.Menus; package _VisualDVM.Visual.Menus;
import Common.Utils.Utils_; import Common.Utils.Utils_;
import Common.Visual.Controls.StableMenuItem; import Common.Visual.Controls.StableMenuItem;
import Common.Visual.Menus.GraphMenu;
import Common.Visual.Menus.VisualiserMenuItem; import Common.Visual.Menus.VisualiserMenuItem;
import Common.Visual.Trees.DataTree; import Common.Visual.Trees.DataTree;
import _VisualDVM.Global; import _VisualDVM.Global;

View File

@@ -1,7 +1,8 @@
package Common.Visual.Trees; package _VisualDVM.Visual.Trees;
import Common.MainModule_; import Common.MainModule_;
import Common.Utils.Utils_; import Common.Utils.Utils_;
import Common.Visual.Fonts.VisualiserFonts; import Common.Visual.Fonts.VisualiserFonts;
import Common.Visual.Trees.StyledTreeCellRenderer;
import _VisualDVM.ProjectData.SapforData.FileObjectWithMessages; import _VisualDVM.ProjectData.SapforData.FileObjectWithMessages;
import javax.swing.*; import javax.swing.*;

View File

@@ -1,4 +1,5 @@
package Common.Visual.Windows.Dialog.Text; package _VisualDVM.Visual.Windows;
import Common.Visual.Windows.Dialog.Text.TextFieldDialog;
import _VisualDVM.Utils; import _VisualDVM.Utils;
public class FileNameForm extends TextFieldDialog { public class FileNameForm extends TextFieldDialog {
public FileNameForm() { public FileNameForm() {

View File

@@ -1,4 +1,5 @@
package Common.Visual.Windows.Dialog.Text; package _VisualDVM.Visual.Windows;
import Common.Visual.Windows.Dialog.Text.TextDialog;
import _VisualDVM.Visual.Editor.BaseEditor; import _VisualDVM.Visual.Editor.BaseEditor;
public class MultilineTextForm extends TextDialog<BaseEditor> { public class MultilineTextForm extends TextDialog<BaseEditor> {
public MultilineTextForm() { public MultilineTextForm() {

View File

@@ -1,4 +1,4 @@
package Common.Visual.Windows.Dialog.Text; package _VisualDVM.Visual.Windows;
public class ReadOnlyMultilineTextForm extends MultilineTextForm { public class ReadOnlyMultilineTextForm extends MultilineTextForm {
public ReadOnlyMultilineTextForm() { public ReadOnlyMultilineTextForm() {
} }