fix.убрал из общей(в перспективе библиотечной) части ссылки на частные объекты визуализатора
This commit is contained in:
@@ -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 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 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_err_file = "parse_err.txt";
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
package _VisualDVM.GlobalData.Tasks.Supervisor.Local.Linux;
|
||||
import Common.CommonConstants;
|
||||
import Common.Passes.PassException;
|
||||
import Common.Utils.Utils_;
|
||||
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();
|
||||
}
|
||||
protected File getDONE_file() {
|
||||
return Paths.get(getProjectCopy().getAbsolutePath(), Constants.DONE).toFile();
|
||||
return Paths.get(getProjectCopy().getAbsolutePath(), CommonConstants.DONE).toFile();
|
||||
}
|
||||
protected File getTIMEOUT_file() {
|
||||
return Paths.get(getProjectCopy().getAbsolutePath(), Constants.TIMEOUT).toFile();
|
||||
return Paths.get(getProjectCopy().getAbsolutePath(), CommonConstants.TIMEOUT).toFile();
|
||||
}
|
||||
@Override
|
||||
protected void PrepareWorkspace() throws Exception {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
package _VisualDVM.GlobalData.Tasks.Supervisor.Remote;
|
||||
import Common.CommonConstants;
|
||||
import Common.Utils.Utils_;
|
||||
import _VisualDVM.Constants;
|
||||
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);
|
||||
}
|
||||
public RemoteFile getDONE_file() {
|
||||
return new RemoteFile(getRemoteProject().full_name, Constants.DONE);
|
||||
return new RemoteFile(getRemoteProject().full_name, CommonConstants.DONE);
|
||||
}
|
||||
public RemoteFile getTIMEOUT_file() {
|
||||
return new RemoteFile(getRemoteProject().full_name, Constants.TIMEOUT);
|
||||
return new RemoteFile(getRemoteProject().full_name, CommonConstants.TIMEOUT);
|
||||
}
|
||||
@Override
|
||||
protected void PrepareWorkspace() throws Exception {
|
||||
@@ -46,8 +47,8 @@ public abstract class RemoteTaskSupervisor<T extends Task> extends TaskSuperviso
|
||||
}
|
||||
@Override
|
||||
protected void CheckTask() throws Exception {
|
||||
RemoteFile DONE = new RemoteFile(getRemoteProject(), Constants.DONE);
|
||||
RemoteFile TIMEOUT = new RemoteFile(getRemoteProject(), Constants.TIMEOUT);
|
||||
RemoteFile DONE = new RemoteFile(getRemoteProject(), CommonConstants.DONE);
|
||||
RemoteFile TIMEOUT = new RemoteFile(getRemoteProject(), CommonConstants.TIMEOUT);
|
||||
if (pass.user.connection.Exists(DONE))
|
||||
task.state = TaskState.Finished;
|
||||
else if (pass.user.connection.Exists(TIMEOUT))
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package _VisualDVM.Passes.All;
|
||||
import Common.Utils.Utils_;
|
||||
import Common.Visual.Windows.Dialog.Text.FileNameForm;
|
||||
import _VisualDVM.Visual.Windows.FileNameForm;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Passes.Project.ChangeFilePass;
|
||||
import _VisualDVM.ProjectData.Files.DBProjectFile;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package _VisualDVM.Passes.All;
|
||||
import Common.Passes.PassException;
|
||||
import Common.Utils.Utils_;
|
||||
import Common.Visual.Windows.Dialog.Text.FileNameForm;
|
||||
import _VisualDVM.Visual.Windows.FileNameForm;
|
||||
import _VisualDVM.Constants;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Passes.Project.ChangeFilePass;
|
||||
|
||||
@@ -2,7 +2,7 @@ package _VisualDVM.Passes.All;
|
||||
import Common.Passes.Pass;
|
||||
import Common.Passes.PassException;
|
||||
import Common.Utils.Utils_;
|
||||
import Common.Visual.Windows.Dialog.Text.FileNameForm;
|
||||
import _VisualDVM.Visual.Windows.FileNameForm;
|
||||
import _VisualDVM.Constants;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package _VisualDVM.Passes.All;
|
||||
import _VisualDVM.Constants;
|
||||
import Common.CommonConstants;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.TestingSystem.DVM.DVMPackage.DVMPackage;
|
||||
@@ -22,7 +22,7 @@ public class DownloadDVMPackage extends DownloadDVMPackages {
|
||||
Log.Writeln_("Возможно скачать и отобразить задачи только завершённого пакета!");
|
||||
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.testingServer.db.dvmRunTasks.ShowDVMPackage(dvmPackage);
|
||||
return false;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package _VisualDVM.Passes.All;
|
||||
import Common.CommonConstants;
|
||||
import Common.Passes.Pass;
|
||||
import Common.Utils.Utils_;
|
||||
import _VisualDVM.Constants;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
import _VisualDVM.Passes.Server.TestingSystemPass;
|
||||
@@ -63,7 +63,7 @@ public class DownloadDVMPackages extends Pass<Vector<Integer>> {
|
||||
Utils_.CheckAndCleanDirectory(workspace);
|
||||
File results_zip = new File(workspace, "results.zip");
|
||||
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();
|
||||
//---
|
||||
Utils_.bytesToFile(packed_package.getKey(), results_zip);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
package _VisualDVM.Passes.All;
|
||||
import Common.CommonConstants;
|
||||
import _VisualDVM.Constants;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Passes.ProcessPass;
|
||||
@@ -19,7 +20,7 @@ public class DownloadRepository extends ProcessPass {
|
||||
return true;
|
||||
}
|
||||
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()) {
|
||||
PerformScript("cd " +
|
||||
dst.getAbsolutePath() +
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package _VisualDVM.Passes.All;
|
||||
import Common.CommonConstants;
|
||||
import Common.Passes.Pass;
|
||||
import Common.Utils.Utils_;
|
||||
import _VisualDVM.Constants;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
import _VisualDVM.Passes.Server.TestingSystemPass;
|
||||
@@ -28,7 +28,7 @@ public class DownloadSapforPackage extends Pass<SapforPackage> {
|
||||
return false;
|
||||
}
|
||||
int id = target.id;
|
||||
loaded = new File(target.getLocalWorkspace(), Constants.LOADED);
|
||||
loaded = new File(target.getLocalWorkspace(), CommonConstants.LOADED);
|
||||
if (!loaded.exists()) {
|
||||
Pass pass = new TestingSystemPass() {
|
||||
@Override
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package _VisualDVM.Passes.All;
|
||||
import Common.CommonConstants;
|
||||
import Common.Passes.Pass;
|
||||
import Common.Utils.Index;
|
||||
import Common.Utils.Utils_;
|
||||
import Common.Visual.UI;
|
||||
import Common.Visual.Windows.Dialog.VDirectoryChooser;
|
||||
import _VisualDVM.Constants;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.Tasks.TaskState;
|
||||
@@ -71,7 +71,7 @@ public class ExportDVMPackageToExcel extends Pass<Vector<DVMPackage>> {
|
||||
if (!dvmPackage.state.isDone()) {
|
||||
Log.Writeln_("Пакет " + dvmPackage.id + " не завершен.");
|
||||
} else {
|
||||
if (!new File(dvmPackage.getLocalWorkspace(), Constants.LOADED).exists()) {
|
||||
if (!new File(dvmPackage.getLocalWorkspace(), CommonConstants.LOADED).exists()) {
|
||||
packagesToDownload.add(dvmPackage.id);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package _VisualDVM.Passes.All;
|
||||
import Common.Passes.PassException;
|
||||
import Common.Utils.Utils_;
|
||||
import Common.Visual.Windows.Dialog.Text.FileNameForm;
|
||||
import _VisualDVM.Visual.Windows.FileNameForm;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package _VisualDVM.Passes.All;
|
||||
import Common.Passes.PassException;
|
||||
import Common.Utils.Utils_;
|
||||
import Common.Visual.Windows.Dialog.Text.FileNameForm;
|
||||
import _VisualDVM.Visual.Windows.FileNameForm;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package _VisualDVM.Passes.All;
|
||||
import Common.Passes.Pass;
|
||||
import Common.Visual.Windows.Dialog.Text.ReadOnlyMultilineTextForm;
|
||||
import _VisualDVM.Visual.Windows.ReadOnlyMultilineTextForm;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.Compiler.Compiler;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package _VisualDVM.Passes.All;
|
||||
import Common.Passes.Pass;
|
||||
import Common.Visual.Windows.Dialog.Text.ReadOnlyMultilineTextForm;
|
||||
import _VisualDVM.Visual.Windows.ReadOnlyMultilineTextForm;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.Compiler.Compiler;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package _VisualDVM.Passes.All;
|
||||
import Common.Utils.Utils_;
|
||||
import Common.Visual.Windows.Dialog.Text.ReadOnlyMultilineTextForm;
|
||||
import _VisualDVM.Visual.Windows.ReadOnlyMultilineTextForm;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Passes.Server.ComponentsRepositoryPass;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package _VisualDVM.Passes.All;
|
||||
import Common.Passes.PassException;
|
||||
import Common.Visual.Windows.Dialog.Text.ReadOnlyMultilineTextForm;
|
||||
import _VisualDVM.Visual.Windows.ReadOnlyMultilineTextForm;
|
||||
import _VisualDVM.GlobalData.RemoteFile.RemoteFile;
|
||||
import _VisualDVM.Passes.Server.TestingSystemPass;
|
||||
import _VisualDVM.Repository.Server.ServerCode;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package _VisualDVM.Passes.Project;
|
||||
import Common.Passes.Pass;
|
||||
import Common.Visual.Windows.Dialog.Text.FileNameForm;
|
||||
import _VisualDVM.Visual.Windows.FileNameForm;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.ProjectData.Project.db_project_info;
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
package _VisualDVM.Passes.SSH;
|
||||
import Common.CommonConstants;
|
||||
import Common.Utils.Utils_;
|
||||
import _VisualDVM.Constants;
|
||||
import _VisualDVM.Global;
|
||||
@@ -39,7 +40,7 @@ public abstract class RepositoryServerSSHPass extends ConnectionPass {
|
||||
protected void StartServer() throws Exception {
|
||||
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_" +
|
||||
Global.mainModule.getAccount().email +
|
||||
"_" +
|
||||
@@ -58,8 +59,8 @@ public abstract class RepositoryServerSSHPass extends ConnectionPass {
|
||||
}
|
||||
}
|
||||
protected void ShutdownServer() throws Exception {
|
||||
RemoteFile INTERRUPT = new RemoteFile(serverHome, Constants.INTERRUPT);
|
||||
RemoteFile ABORTED = new RemoteFile(serverHome, Constants.ABORTED);
|
||||
RemoteFile INTERRUPT = new RemoteFile(serverHome, CommonConstants.INTERRUPT);
|
||||
RemoteFile ABORTED = new RemoteFile(serverHome, CommonConstants.ABORTED);
|
||||
//--
|
||||
ShowMessage1("Создание файла INTERRUPT..");
|
||||
user.connection.writeToFile("", INTERRUPT);
|
||||
@@ -71,7 +72,7 @@ public abstract class RepositoryServerSSHPass extends ConnectionPass {
|
||||
//--
|
||||
ShowMessage2("");
|
||||
ShowMessage1("Журнализация");
|
||||
RemoteFile AbortLog = new RemoteFile(serverHome, Constants.ABORTED +
|
||||
RemoteFile AbortLog = new RemoteFile(serverHome, CommonConstants.ABORTED +
|
||||
"_by_" +
|
||||
Global.mainModule.getAccount().email +
|
||||
"_" +
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
package _VisualDVM.ProjectData.Files;
|
||||
import Common.CommonConstants;
|
||||
import Common.Database.Objects.DBObject;
|
||||
import Common.Utils.Utils_;
|
||||
import _VisualDVM.Constants;
|
||||
@@ -30,12 +31,12 @@ public class ProjectFile extends DBObject {
|
||||
public void AutoDetectProperties(String name_in) {
|
||||
//проверка запретных имен.
|
||||
String[] forbiddenNames = new String[]{
|
||||
Constants.INTERRUPT,
|
||||
CommonConstants.INTERRUPT,
|
||||
Constants.launch_script_name,
|
||||
Constants.default_binary_name,
|
||||
//--
|
||||
Constants.DONE,
|
||||
Constants.TIMEOUT,
|
||||
CommonConstants.DONE,
|
||||
CommonConstants.TIMEOUT,
|
||||
Constants.out_file,
|
||||
Constants.err_file,
|
||||
Constants.time_file,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package _VisualDVM.ProjectData.Files.UI;
|
||||
import Common.Visual.Trees.DataTree;
|
||||
import Common.Visual.Trees.GraphTreeCellRenderer;
|
||||
import _VisualDVM.Visual.Trees.GraphTreeCellRenderer;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.ProjectData.SapforData.FileObject;
|
||||
|
||||
@@ -5,7 +5,7 @@ import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
import _VisualDVM.ProjectData.Files.DBProjectFile;
|
||||
import _VisualDVM.Visual.Menus.GraphMenu;
|
||||
import Common.Visual.Menus.GraphMenu;
|
||||
import _VisualDVM.Visual.Menus.ProjectFilesMenu;
|
||||
|
||||
import javax.swing.tree.DefaultMutableTreeNode;
|
||||
|
||||
@@ -4,7 +4,7 @@ import Common.Visual.Trees.DataTree;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
import _VisualDVM.Visual.Menus.GraphMenu;
|
||||
import Common.Visual.Menus.GraphMenu;
|
||||
import _VisualDVM.Visual.Menus.VersionsMenu;
|
||||
|
||||
import javax.swing.tree.TreePath;
|
||||
|
||||
@@ -701,7 +701,7 @@ public class db_project_info extends DBObject {
|
||||
return true;
|
||||
}
|
||||
public File getInterruptFile() {
|
||||
return Paths.get(getDataDirectory().getAbsolutePath(), Constants.INTERRUPT).toFile();
|
||||
return Paths.get(getDataDirectory().getAbsolutePath(), CommonConstants.INTERRUPT).toFile();
|
||||
}
|
||||
public void CleanInterruptFile() throws Exception {
|
||||
File file = getInterruptFile();
|
||||
|
||||
@@ -2,7 +2,7 @@ package _VisualDVM.ProjectData.SapforData.Arrays.UI;
|
||||
import Common.Visual.Trees.StyledTree;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
import _VisualDVM.Visual.Menus.GraphMenu;
|
||||
import Common.Visual.Menus.GraphMenu;
|
||||
|
||||
import javax.swing.*;
|
||||
public class DistributionMenu extends GraphMenu {
|
||||
|
||||
@@ -3,7 +3,7 @@ import Common.Visual.Trees.StyledTree;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
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.TreePath;
|
||||
|
||||
@@ -4,7 +4,7 @@ import Common.Visual.Trees.SelectionTreeCellRenderer;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.ProjectData.SapforData.FileObject;
|
||||
import _VisualDVM.Visual.Menus.GraphMenu;
|
||||
import Common.Visual.Menus.GraphMenu;
|
||||
public class InlineTree extends SelectableTree {
|
||||
public InlineTree() {
|
||||
super(Global.mainModule.getProject().inline_root);
|
||||
|
||||
@@ -4,7 +4,7 @@ import Common.Visual.Trees.SelectionTreeCellRenderer;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.ProjectData.SapforData.FileObject;
|
||||
import _VisualDVM.Visual.Menus.GraphMenu;
|
||||
import Common.Visual.Menus.GraphMenu;
|
||||
public class InlineTree2 extends SelectableTree {
|
||||
public InlineTree2() {
|
||||
super(Global.mainModule.getProject().inline_root2);
|
||||
|
||||
@@ -3,7 +3,7 @@ import Common.Visual.Trees.SelectableTree;
|
||||
import Common.Visual.Trees.SelectionTreeCellRenderer;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Visual.Menus.GraphMenu;
|
||||
import Common.Visual.Menus.GraphMenu;
|
||||
public class IncludesTree extends SelectableTree {
|
||||
public IncludesTree() {
|
||||
super(Global.mainModule.getProject().includes_root);
|
||||
|
||||
@@ -61,10 +61,10 @@ public class MachineProcess extends DBObject {
|
||||
return new File(Global.MachinesDirectory, id);
|
||||
}
|
||||
public File getStartedFile() {
|
||||
return new File(getWorkspace(), Constants.STARTED);
|
||||
return new File(getWorkspace(), CommonConstants.STARTED);
|
||||
}
|
||||
public File getAbortedFile() {
|
||||
return new File(getWorkspace(), Constants.ABORTED);
|
||||
return new File(getWorkspace(), CommonConstants.ABORTED);
|
||||
}
|
||||
//---
|
||||
public boolean isAborted() {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package _VisualDVM.TestingSystem.Common.TestingPackage;
|
||||
import Common.CommonConstants;
|
||||
import Common.Database.Objects.DBObject;
|
||||
import Common.Database.Objects.riDBObject;
|
||||
import Common.Utils.Utils_;
|
||||
import _VisualDVM.Constants;
|
||||
import _VisualDVM.TestingSystem.Common.Configuration.Configuration;
|
||||
import _VisualDVM.TestingSystem.Common.Configuration.Json.ConfigurationsJson;
|
||||
import _VisualDVM.TestingSystem.Common.TasksPackageState;
|
||||
@@ -60,7 +60,7 @@ public abstract class TestingPackage<J> extends riDBObject {
|
||||
return new File(getHomeDirectory(), String.valueOf(id));
|
||||
}
|
||||
public boolean isLoaded() {
|
||||
return new File(getLocalWorkspace(), Constants.LOADED).exists();
|
||||
return new File(getLocalWorkspace(), CommonConstants.LOADED).exists();
|
||||
}
|
||||
public abstract Class getJsonClass();
|
||||
public abstract File getHomeDirectory();
|
||||
@@ -68,7 +68,7 @@ public abstract class TestingPackage<J> extends riDBObject {
|
||||
return new File(getLocalWorkspace(), "package_json");
|
||||
}
|
||||
public File getLoadedFile() {
|
||||
return new File(getLocalWorkspace(), Constants.LOADED);
|
||||
return new File(getLocalWorkspace(), CommonConstants.LOADED);
|
||||
}
|
||||
public void saveJson() throws Exception {
|
||||
Utils_.jsonToFile(package_json, getJsonFile());
|
||||
|
||||
@@ -2,7 +2,6 @@ package _VisualDVM.TestingSystem.Common;
|
||||
import Common.CommonConstants;
|
||||
import Common.Utils.Loggable;
|
||||
import Common.Utils.Utils_;
|
||||
import _VisualDVM.Constants;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.Machine.Machine;
|
||||
import _VisualDVM.GlobalData.Machine.MachineType;
|
||||
@@ -67,7 +66,7 @@ public abstract class TestingPlanner<P extends TestingPackage> extends Repositor
|
||||
Print("serverName=" + serverName);
|
||||
Print("=====");
|
||||
//----
|
||||
Utils.createEmptyFile(Constants.STARTED);
|
||||
Utils.createEmptyFile(CommonConstants.STARTED);
|
||||
}
|
||||
//----
|
||||
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) {
|
||||
Print(reason);
|
||||
File stateFile = new File(supervisorHome, Constants.ABORTED);
|
||||
File stateFile = new File(supervisorHome, CommonConstants.ABORTED);
|
||||
try {
|
||||
FileUtils.writeStringToFile(stateFile, reason);
|
||||
} catch (Exception ex) {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
package _VisualDVM.TestingSystem.SAPFOR;
|
||||
import Common.CommonConstants;
|
||||
import Common.Utils.Utils_;
|
||||
import _VisualDVM.Constants;
|
||||
import _VisualDVM.TestingSystem.Common.TaskThread;
|
||||
@@ -27,7 +28,7 @@ public class PackageModeSupervisor extends ThreadsPlanner {
|
||||
FileUtils.writeStringToFile(PID, sapfor_drv.getName(), Charset.defaultCharset());
|
||||
//---
|
||||
Date startDate = new Date();
|
||||
File started = new File(Constants.STARTED);
|
||||
File started = new File(CommonConstants.STARTED);
|
||||
FileUtils.writeStringToFile(started, String.valueOf(startDate));
|
||||
//формирование списка задач.
|
||||
setMaxKernels(package_json.kernels);
|
||||
@@ -45,7 +46,7 @@ public class PackageModeSupervisor extends ThreadsPlanner {
|
||||
//записать результаты всех задач.
|
||||
try {
|
||||
Utils_.jsonToFile(package_json, new File(Constants.package_json));
|
||||
FileUtils.writeStringToFile(new File(Constants.DONE), "");
|
||||
FileUtils.writeStringToFile(new File(CommonConstants.DONE), "");
|
||||
//--
|
||||
//Очистка
|
||||
//очистка служебных файлов.
|
||||
|
||||
@@ -102,7 +102,7 @@ public class SapforTestingPlanner extends TestingPlanner<SapforPackage> {
|
||||
procBuilder.directory(workspace);
|
||||
procBuilder.start();
|
||||
//--->>
|
||||
File started = new File(workspace, Constants.STARTED);
|
||||
File started = new File(workspace, CommonConstants.STARTED);
|
||||
while (!started.exists()) {
|
||||
Print("waiting for package start...");
|
||||
Utils_.sleep(1000);
|
||||
@@ -128,8 +128,8 @@ public class SapforTestingPlanner extends TestingPlanner<SapforPackage> {
|
||||
}
|
||||
}
|
||||
//--
|
||||
File done = new File(workspace, Constants.DONE);
|
||||
File aborted = new File(workspace, Constants.ABORTED);
|
||||
File done = new File(workspace, CommonConstants.DONE);
|
||||
File aborted = new File(workspace, CommonConstants.ABORTED);
|
||||
if (done.exists()) {
|
||||
testingPackage.state = TasksPackageState.Analysis;
|
||||
state_changed = true;
|
||||
@@ -154,10 +154,10 @@ public class SapforTestingPlanner extends TestingPlanner<SapforPackage> {
|
||||
protected void Kill() throws Exception {
|
||||
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());
|
||||
File aborted_file = new File(workspace, Constants.ABORTED);
|
||||
File aborted_file = new File(workspace, CommonConstants.ABORTED);
|
||||
do {
|
||||
Print("waiting for interrupt...");
|
||||
Thread.sleep(1000);
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
package _VisualDVM.Visual.Menus;
|
||||
import Common.Visual.Menus.StyledPopupMenu;
|
||||
import Common.Visual.Menus.VisualiserMenuItem;
|
||||
import Common.Visual.Trees.StyledTree;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.MouseEvent;
|
||||
public class GraphMenu<T extends StyledTree> extends StyledPopupMenu {
|
||||
public T tree;
|
||||
public GraphMenu(T tree_in, String branches_name) {
|
||||
tree = tree_in;
|
||||
JMenuItem m = null;
|
||||
m = new VisualiserMenuItem("Свернуть все " + branches_name);
|
||||
m.addActionListener(new AbstractAction() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
tree.CollapseAll();
|
||||
}
|
||||
});
|
||||
add(m);
|
||||
m = new VisualiserMenuItem("Развернуть все " + branches_name);
|
||||
m.addActionListener(new AbstractAction() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
tree.ExpandAll();
|
||||
}
|
||||
});
|
||||
add(m);
|
||||
}
|
||||
public GraphMenu(T tree) {
|
||||
this(tree, tree.getBranchesName());
|
||||
}
|
||||
public void Show(MouseEvent mouseEvent) {
|
||||
show(tree, mouseEvent.getX(), mouseEvent.getY());
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package _VisualDVM.Visual.Menus;
|
||||
import Common.Utils.Utils_;
|
||||
import Common.Visual.Controls.StableMenuItem;
|
||||
import Common.Visual.Menus.GraphMenu;
|
||||
import Common.Visual.Menus.VisualiserMenuItem;
|
||||
import Common.Visual.Trees.StyledTree;
|
||||
import _VisualDVM.Global;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package _VisualDVM.Visual.Menus;
|
||||
import Common.Utils.Utils_;
|
||||
import Common.Visual.Controls.StableMenuItem;
|
||||
import Common.Visual.Menus.GraphMenu;
|
||||
import Common.Visual.Menus.VisualiserMenuItem;
|
||||
import Common.Visual.Selectable;
|
||||
import Common.Visual.Trees.DataTree;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package _VisualDVM.Visual.Menus;
|
||||
import Common.Utils.Utils_;
|
||||
import Common.Visual.Controls.StableMenuItem;
|
||||
import Common.Visual.Menus.GraphMenu;
|
||||
import Common.Visual.Menus.VisualiserMenuItem;
|
||||
import Common.Visual.Trees.DataTree;
|
||||
import _VisualDVM.Global;
|
||||
|
||||
28
src/_VisualDVM/Visual/Trees/GraphTreeCellRenderer.java
Normal file
28
src/_VisualDVM/Visual/Trees/GraphTreeCellRenderer.java
Normal file
@@ -0,0 +1,28 @@
|
||||
package _VisualDVM.Visual.Trees;
|
||||
import Common.MainModule_;
|
||||
import Common.Utils.Utils_;
|
||||
import Common.Visual.Fonts.VisualiserFonts;
|
||||
import Common.Visual.Trees.StyledTreeCellRenderer;
|
||||
import _VisualDVM.ProjectData.SapforData.FileObjectWithMessages;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.tree.DefaultMutableTreeNode;
|
||||
public class GraphTreeCellRenderer extends StyledTreeCellRenderer {
|
||||
public java.awt.Component getTreeCellRendererComponent(
|
||||
JTree tree, Object value,
|
||||
boolean selected, boolean expanded,
|
||||
boolean leaf, int row, boolean hasFocus) {
|
||||
super.getTreeCellRendererComponent(tree, value, selected, expanded, leaf, row, hasFocus);
|
||||
Object o = ((DefaultMutableTreeNode) value).getUserObject();
|
||||
if (o instanceof FileObjectWithMessages) {
|
||||
FileObjectWithMessages target = (FileObjectWithMessages) o;
|
||||
setIcon(Utils_.getIcon(target.ImageKey()));
|
||||
setFont(MainModule_.instance.getUI().getTheme().Fonts.get(target.getFont()));
|
||||
} else {
|
||||
setIcon(null);
|
||||
setFont(MainModule_.instance.getUI().getTheme().Fonts.get(VisualiserFonts.TreeItalic));
|
||||
}
|
||||
setForeground(tree.getForeground());
|
||||
return this;
|
||||
}
|
||||
}
|
||||
11
src/_VisualDVM/Visual/Windows/FileNameForm.java
Normal file
11
src/_VisualDVM/Visual/Windows/FileNameForm.java
Normal file
@@ -0,0 +1,11 @@
|
||||
package _VisualDVM.Visual.Windows;
|
||||
import Common.Visual.Windows.Dialog.Text.TextFieldDialog;
|
||||
import _VisualDVM.Utils;
|
||||
public class FileNameForm extends TextFieldDialog {
|
||||
public FileNameForm() {
|
||||
}
|
||||
@Override
|
||||
public void validateFields() {
|
||||
Utils.validateFileShortNewName(fields.getText(), Log);
|
||||
}
|
||||
}
|
||||
26
src/_VisualDVM/Visual/Windows/MultilineTextForm.java
Normal file
26
src/_VisualDVM/Visual/Windows/MultilineTextForm.java
Normal file
@@ -0,0 +1,26 @@
|
||||
package _VisualDVM.Visual.Windows;
|
||||
import Common.Visual.Windows.Dialog.Text.TextDialog;
|
||||
import _VisualDVM.Visual.Editor.BaseEditor;
|
||||
public class MultilineTextForm extends TextDialog<BaseEditor> {
|
||||
public MultilineTextForm() {
|
||||
super(BaseEditor.class);
|
||||
}
|
||||
//при наследовании по умолчанию поля не присваивать!
|
||||
//инициализация полей работает после конструктора предка!!
|
||||
@Override
|
||||
public void ProcessResult() {
|
||||
Result = fields.getText();
|
||||
}
|
||||
@Override
|
||||
public void InitFields() {
|
||||
fields.setSearchEnabled(false);
|
||||
fields.setLineWrap(true);
|
||||
fields.setWrapStyleWord(true);
|
||||
fields.setHighlightCurrentLine(false);
|
||||
}
|
||||
@Override
|
||||
public void setText(String text_in) {
|
||||
fields.setText(text_in);
|
||||
fields.setCaretPosition(0);
|
||||
}
|
||||
}
|
||||
12
src/_VisualDVM/Visual/Windows/ReadOnlyMultilineTextForm.java
Normal file
12
src/_VisualDVM/Visual/Windows/ReadOnlyMultilineTextForm.java
Normal file
@@ -0,0 +1,12 @@
|
||||
package _VisualDVM.Visual.Windows;
|
||||
public class ReadOnlyMultilineTextForm extends MultilineTextForm {
|
||||
public ReadOnlyMultilineTextForm() {
|
||||
}
|
||||
@Override
|
||||
public void InitFields() {
|
||||
fields.setEditable(false);
|
||||
}
|
||||
@Override
|
||||
public void CreateButtons() {
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user