no message
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
package _VisualDVM.TestingSystem.SAPFOR.Json;
|
||||
import Common.CommonConstants;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common.Utils.Utils_;
|
||||
import _VisualDVM.Constants;
|
||||
import _VisualDVM.Utils;
|
||||
import _VisualDVM.ProjectData.Files.DBProjectFile;
|
||||
@@ -55,7 +55,7 @@ public class SapforVersion_json implements Serializable {
|
||||
state = SapforVersionState.Empty;
|
||||
comparisonState = VersionComparisonState.Unknown;
|
||||
//--
|
||||
String relativePath = CommonUtils.isWindows() ? CommonUtils.toW(version) : version;
|
||||
String relativePath = Utils_.isWindows() ? Utils_.toW(version) : version;
|
||||
Home = Paths.get(configurationRoot.getAbsolutePath(), relativePath).toFile();
|
||||
files = new LinkedHashMap<>();
|
||||
//--
|
||||
@@ -251,13 +251,13 @@ public class SapforVersion_json implements Serializable {
|
||||
//--
|
||||
public void createProject(File rootHome) throws Exception {
|
||||
project = null;
|
||||
String version_ = CommonUtils.isWindows() ? CommonUtils.toW(version) : CommonUtils.toU(version);
|
||||
String version_ = Utils_.isWindows() ? Utils_.toW(version) : Utils_.toU(version);
|
||||
project = new db_project_info();
|
||||
project.Home = Paths.get(rootHome.getAbsolutePath(), version_).toFile();
|
||||
project.name = project.Home.getName();
|
||||
project.description = description;
|
||||
project.languageName = LanguageName.fortran;
|
||||
project.creationDate = CommonUtils.getDateNumber();
|
||||
project.creationDate = Utils_.getDateNumber();
|
||||
//---
|
||||
FileUtils.copyDirectory(Home, project.Home);
|
||||
///--------------------------------------
|
||||
@@ -304,6 +304,6 @@ public class SapforVersion_json implements Serializable {
|
||||
}
|
||||
@Override
|
||||
public String toString() {
|
||||
return Home.getName() + " : " + CommonUtils.Brackets(description) + " файлы: " + files.size();
|
||||
return Home.getName() + " : " + Utils_.Brackets(description) + " файлы: " + files.size();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package _VisualDVM.TestingSystem.SAPFOR;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common.Utils.Utils_;
|
||||
import _VisualDVM.Constants;
|
||||
import _VisualDVM.Utils;
|
||||
import _VisualDVM.TestingSystem.Common.TaskThread;
|
||||
@@ -16,10 +16,10 @@ public class PackageModeSupervisor extends ThreadsPlanner {
|
||||
File sapfor_drv = null;
|
||||
public PackageModeSupervisor() throws Exception {
|
||||
super(2000);
|
||||
package_json = (SapforPackage_json) CommonUtils.jsonFromFile(new File(Constants.package_json), SapforPackage_json.class);
|
||||
package_json = (SapforPackage_json) Utils_.jsonFromFile(new File(Constants.package_json), SapforPackage_json.class);
|
||||
//--
|
||||
File sapfor_src = new File(package_json.sapfor_drv);
|
||||
sapfor_drv = new File(CommonUtils.getHomeDirectory(), CommonUtils.getDateName("SAPFOR_F"));
|
||||
sapfor_drv = new File(Utils_.getHomeDirectory(), Utils_.getDateName("SAPFOR_F"));
|
||||
FileUtils.copyFile(sapfor_src, sapfor_drv);
|
||||
if (!sapfor_drv.setExecutable(true))
|
||||
throw new Exception("Не удалось сделать файл " + sapfor_drv.getName() + " исполняемым!");
|
||||
@@ -44,12 +44,12 @@ public class PackageModeSupervisor extends ThreadsPlanner {
|
||||
protected void finalize() {
|
||||
//записать результаты всех задач.
|
||||
try {
|
||||
CommonUtils.jsonToFile(package_json, new File(Constants.package_json));
|
||||
Utils_.jsonToFile(package_json, new File(Constants.package_json));
|
||||
FileUtils.writeStringToFile(new File(Constants.DONE), "");
|
||||
//--
|
||||
//Очистка
|
||||
//очистка служебных файлов.
|
||||
Utils.deleteFilesByExtensions(CommonUtils.getHomeDirectory(),
|
||||
Utils.deleteFilesByExtensions(Utils_.getHomeDirectory(),
|
||||
"proj", "dep", "jar"
|
||||
// ,"sh", "exe", "bat"
|
||||
);
|
||||
@@ -57,7 +57,7 @@ public class PackageModeSupervisor extends ThreadsPlanner {
|
||||
if (sapfor_drv.exists())
|
||||
FileUtils.forceDelete(sapfor_drv);
|
||||
} catch (Exception e) {
|
||||
CommonUtils.MainLog.PrintException(e);
|
||||
Utils_.MainLog.PrintException(e);
|
||||
}
|
||||
System.exit(0);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package _VisualDVM.TestingSystem.SAPFOR;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common.Utils.Utils_;
|
||||
import _VisualDVM.Constants;
|
||||
import _VisualDVM.Utils;
|
||||
import _VisualDVM.GlobalData.Tasks.TaskState;
|
||||
@@ -41,11 +41,11 @@ public class PerformSapforTask extends Pass<SapforTask> {
|
||||
//--
|
||||
version_json = null;
|
||||
//--->>
|
||||
parentTask = Paths.get(CommonUtils.getHomePath(),
|
||||
parentTask = Paths.get(Utils_.getHomePath(),
|
||||
String.valueOf(target.set_id),
|
||||
String.valueOf(target.sapfor_configuration_id),
|
||||
target.test_description).toFile();
|
||||
root = Paths.get(CommonUtils.getHomePath(), String.valueOf(target.set_id), String.valueOf(target.sapfor_configuration_id)).toFile();
|
||||
root = Paths.get(Utils_.getHomePath(), String.valueOf(target.set_id), String.valueOf(target.sapfor_configuration_id)).toFile();
|
||||
task = null;
|
||||
//--->>
|
||||
return true;
|
||||
@@ -71,7 +71,7 @@ public class PerformSapforTask extends Pass<SapforTask> {
|
||||
"transformation",
|
||||
sapfor_drv,
|
||||
parentTask,
|
||||
code.getTestingCommand() + " -F " + CommonUtils.DQuotes(task.getAbsolutePath()),
|
||||
code.getTestingCommand() + " -F " + Utils_.DQuotes(task.getAbsolutePath()),
|
||||
target.flags,
|
||||
Constants.out_file,
|
||||
Constants.err_file
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
package _VisualDVM.TestingSystem.SAPFOR.SapforConfiguration;
|
||||
import Common.Visual.CommonUI;
|
||||
import _VisualDVM.ServerObjectsCache.ConfigurationCache;
|
||||
import _VisualDVM.ServerObjectsCache.SapforConfigurationCache;
|
||||
import _VisualDVM.ServerObjectsCache.VisualCaches;
|
||||
import Common.Utils.TextLog;
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package _VisualDVM.TestingSystem.SAPFOR.SapforSettings;
|
||||
import Common.Database.Objects.DBObject;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common.Visual.CommonUI;
|
||||
import Common.Utils.Utils_;
|
||||
import _VisualDVM.Global;
|
||||
import Common.Utils.TextLog;
|
||||
import _VisualDVM.TestingSystem.Common.Settings.Settings;
|
||||
@@ -80,7 +79,7 @@ public class SapforSettings extends Settings {
|
||||
if (code.isSapforStart()) {
|
||||
if (i > first) {
|
||||
Log.Writeln_("Неверные настройки:" + id + ": проход" +
|
||||
CommonUtils.Brackets(code.getDescription()) +
|
||||
Utils_.Brackets(code.getDescription()) +
|
||||
" может быть только первым!");
|
||||
res=false;
|
||||
}
|
||||
@@ -88,14 +87,14 @@ public class SapforSettings extends Settings {
|
||||
if (code.isSapforTerminal()) {
|
||||
if (i < last) {
|
||||
Log.Writeln_("Неверные настройки:" + id + ": проход " +
|
||||
CommonUtils.Brackets(code.getDescription()) +
|
||||
Utils_.Brackets(code.getDescription()) +
|
||||
" может быть только последним!");
|
||||
res= false;
|
||||
}
|
||||
}
|
||||
if (matches.contains(code)) {
|
||||
Log.Writeln_("Неверные настройки:" + id + ": проход " +
|
||||
CommonUtils.Brackets(code.getDescription()) +
|
||||
Utils_.Brackets(code.getDescription()) +
|
||||
" запрещено применять более одного раза!");
|
||||
res=false;
|
||||
} else matches.add(code);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package _VisualDVM.TestingSystem.SAPFOR.SapforSettings;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common.Utils.Utils_;
|
||||
import _VisualDVM.Current;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import Common.Visual.Windows.Dialog.DBObjectDialog;
|
||||
@@ -96,10 +96,10 @@ public class SapforSettingsDBTable extends iDBTable<SapforSettings> {
|
||||
@Override
|
||||
public void ProcessResult() {
|
||||
Result.description = fields.tfName.getText();
|
||||
Result.FREE_FORM = CommonUtils.fromBoolean(fields.cbFREE_FORM.isSelected());
|
||||
Result.KEEP_DVM_DIRECTIVES = CommonUtils.fromBoolean(fields.cbKEEP_DVM_DIRECTIVES.isSelected());
|
||||
Result.KEEP_SPF_DIRECTIVES = CommonUtils.fromBoolean(fields.cbKEEP_SPF_DIRECTIVES.isSelected());
|
||||
Result.STATIC_SHADOW_ANALYSIS = CommonUtils.fromBoolean(fields.cbSTATIC_SHADOW_ANALYSIS.isSelected());
|
||||
Result.FREE_FORM = Utils_.fromBoolean(fields.cbFREE_FORM.isSelected());
|
||||
Result.KEEP_DVM_DIRECTIVES = Utils_.fromBoolean(fields.cbKEEP_DVM_DIRECTIVES.isSelected());
|
||||
Result.KEEP_SPF_DIRECTIVES = Utils_.fromBoolean(fields.cbKEEP_SPF_DIRECTIVES.isSelected());
|
||||
Result.STATIC_SHADOW_ANALYSIS = Utils_.fromBoolean(fields.cbSTATIC_SHADOW_ANALYSIS.isSelected());
|
||||
Result.MAX_SHADOW_WIDTH = fields.sMAX_SHADOW_WIDTH.getValue();
|
||||
Result.packFlags();
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package _VisualDVM.TestingSystem.SAPFOR.SapforSettings.UI;
|
||||
import Common.Visual.CommonUI;
|
||||
import Common.Visual.UI_;
|
||||
import Common.Visual.Tables.StyledCellLabel;
|
||||
import Common.Visual.Windows.Dialog.DialogFields;
|
||||
import _VisualDVM.Repository.Component.Sapfor.Sapfor;
|
||||
@@ -21,7 +21,7 @@ public class SapforSettingsCommandFields implements DialogFields {
|
||||
JLabel res = new StyledCellLabel();
|
||||
res.setText(value.getDescription());
|
||||
res.setBackground(isSelected ?
|
||||
CommonUI.getTheme().selection_background : CommonUI.getTheme().background
|
||||
UI_.getTheme().selection_background : UI_.getTheme().background
|
||||
);
|
||||
return res;
|
||||
});
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package _VisualDVM.TestingSystem.SAPFOR.SapforSettingsCommand;
|
||||
import Common.Visual.CommonUI;
|
||||
import Common.Visual.UI_;
|
||||
import _VisualDVM.Current;
|
||||
import Common.Database.Tables.iDBTable;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
@@ -62,7 +62,7 @@ public class SapforSettingsCommandsDBTable extends iDBTable<SapforSettingsComman
|
||||
}
|
||||
@Override
|
||||
public void fillFields() {
|
||||
CommonUI.TrySelect(fields.cbPassCode, Result.passCode);
|
||||
UI_.TrySelect(fields.cbPassCode, Result.passCode);
|
||||
}
|
||||
@Override
|
||||
public void ProcessResult() {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package _VisualDVM.TestingSystem.SAPFOR.SapforTask;
|
||||
import Common.CommonConstants;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common.Utils.Utils_;
|
||||
import Common.Database.Objects.DBObject;
|
||||
import _VisualDVM.GlobalData.Tasks.TaskState;
|
||||
import _VisualDVM.TestingSystem.SAPFOR.Json.*;
|
||||
@@ -102,10 +102,10 @@ public class SapforTask extends DBObject {
|
||||
public String getVersionsChain() {
|
||||
Vector<String> versionsLines = new Vector<>();
|
||||
for (int i = 1; i < versions.size(); ++i) {
|
||||
versionsLines.add(CommonUtils.Brackets(versions.get(i).description));
|
||||
versionsLines.add(Utils_.Brackets(versions.get(i).description));
|
||||
}
|
||||
if (!variants.isEmpty()) {
|
||||
versionsLines.add(CommonUtils.Brackets(PassCode.CreateParallelVariants.getDescription()));
|
||||
versionsLines.add(Utils_.Brackets(PassCode.CreateParallelVariants.getDescription()));
|
||||
}
|
||||
return String.join("→", versionsLines);
|
||||
}
|
||||
@@ -167,7 +167,7 @@ public class SapforTask extends DBObject {
|
||||
@Override
|
||||
public String toString() {
|
||||
return
|
||||
"#" + id + " группа " + CommonUtils.Brackets(group_description) + " тест " + CommonUtils.Brackets(test_description) + " параметры " + CommonUtils.Brackets(sapfor_configuration_id);
|
||||
"#" + id + " группа " + Utils_.Brackets(group_description) + " тест " + Utils_.Brackets(test_description) + " параметры " + Utils_.Brackets(sapfor_configuration_id);
|
||||
// getUniqueKey();
|
||||
}
|
||||
public String getPassesInfo() {
|
||||
@@ -176,7 +176,7 @@ public class SapforTask extends DBObject {
|
||||
Vector<String> strings = new Vector<>();
|
||||
for (String code_s : data) {
|
||||
PassCode code = PassCode.valueOf(code_s);
|
||||
strings.add(CommonUtils.Brackets(code.getDescription()));
|
||||
strings.add(Utils_.Brackets(code.getDescription()));
|
||||
}
|
||||
return String.join("→", strings);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package _VisualDVM.TestingSystem.SAPFOR.SapforTasksPackage.UI;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common.Utils.Utils_;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.tree.DefaultMutableTreeNode;
|
||||
@@ -7,7 +7,7 @@ public abstract class SapforPackageTreeNode extends DefaultMutableTreeNode {
|
||||
public ImageIcon getIcon() {
|
||||
ImageIcon res = new ImageIcon((getClass().getResource("/icons/versions/" + getImageKey() + ".png")));
|
||||
if (res==null) {
|
||||
CommonUtils.MainLog.Print("/icons/versions/" + getImageKey() + ".png=NULL");
|
||||
Utils_.MainLog.Print("/icons/versions/" + getImageKey() + ".png=NULL");
|
||||
// res= new ImageIcon((getClass().getResource("/icons/versions/Version.png")));
|
||||
}
|
||||
return (getImageKey() != null) ? res : null;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package _VisualDVM.TestingSystem.SAPFOR.SapforTasksPackage.UI;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common.Utils.Utils_;
|
||||
import _VisualDVM.Global;
|
||||
import Common.Visual.Menus.DataMenuBar;
|
||||
import Common.Visual.Controls.MenuBarButton;
|
||||
@@ -30,7 +30,7 @@ public class SapforPackagesBar extends DataMenuBar {
|
||||
});
|
||||
}
|
||||
public void Mark() {
|
||||
setIcon(CommonUtils.getIcon(SapforPackageDBTable.filterMyOnly ? "/icons/Pick.png" : "/icons/NotPick.png"));
|
||||
setIcon(Utils_.getIcon(SapforPackageDBTable.filterMyOnly ? "/icons/Pick.png" : "/icons/NotPick.png"));
|
||||
}
|
||||
});
|
||||
add(new MenuBarButton() {
|
||||
@@ -45,7 +45,7 @@ public class SapforPackagesBar extends DataMenuBar {
|
||||
});
|
||||
}
|
||||
public void Mark() {
|
||||
setIcon(CommonUtils.getIcon(SapforPackageDBTable.filterActive ? "/icons/Pick.png" : "/icons/NotPick.png"));
|
||||
setIcon(Utils_.getIcon(SapforPackageDBTable.filterActive ? "/icons/Pick.png" : "/icons/NotPick.png"));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package _VisualDVM.TestingSystem.SAPFOR;
|
||||
import Common.CommonConstants;
|
||||
import Common.Mode;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common.Utils.Utils_;
|
||||
import _VisualDVM.Constants;
|
||||
import _VisualDVM.GlobalProperties;
|
||||
import _VisualDVM.Utils;
|
||||
@@ -40,8 +40,8 @@ public class SapforTestingPlanner extends TestingPlanner<SapforPackage> {
|
||||
File repo_err;
|
||||
//--
|
||||
public SapforTestingPlanner() {
|
||||
repo = new File(CommonUtils.getHomeDirectory(), "Repo");
|
||||
repoSapforHome = Paths.get(CommonUtils.getHomePath(), "Repo", Constants.SAPFOR_REPOSITORY_BIN).toFile();
|
||||
repo = new File(Utils_.getHomeDirectory(), "Repo");
|
||||
repoSapforHome = Paths.get(Utils_.getHomePath(), "Repo", Constants.SAPFOR_REPOSITORY_BIN).toFile();
|
||||
repo_bin = new File(repoSapforHome, "Sapfor_F");
|
||||
repo_out = new File(repoSapforHome, Constants.out_file);
|
||||
repo_err = new File(repoSapforHome, Constants.err_file);
|
||||
@@ -91,11 +91,11 @@ public class SapforTestingPlanner extends TestingPlanner<SapforPackage> {
|
||||
protected void PackageWorkspaceCreation() throws Exception {
|
||||
//копирование визуализатора
|
||||
File visualiser = new File(workspace, "VisualSapfor.jar");
|
||||
FileUtils.copyFile(new File(CommonUtils.getHomeDirectory(), "TestingSystem.jar"), visualiser);
|
||||
FileUtils.copyFile(new File(Utils_.getHomeDirectory(), "TestingSystem.jar"), visualiser);
|
||||
//создание настроек
|
||||
GlobalProperties properties = new GlobalProperties(Global.properties);
|
||||
properties.Mode = Mode.Package;
|
||||
CommonUtils.jsonToFile(properties, new File(workspace, "properties"));
|
||||
Utils_.jsonToFile(properties, new File(workspace, "properties"));
|
||||
//подготовка пакетного режима. Запустит его уже очередь.
|
||||
Utils.createScript(workspace, workspace, "start", "java -jar VisualSapfor.jar");
|
||||
}
|
||||
@@ -109,7 +109,7 @@ public class SapforTestingPlanner extends TestingPlanner<SapforPackage> {
|
||||
File started = new File(workspace, Constants.STARTED);
|
||||
while (!started.exists()) {
|
||||
Print("waiting for package start...");
|
||||
CommonUtils.sleep(1000);
|
||||
Utils_.sleep(1000);
|
||||
}
|
||||
File pid = new File(workspace, "PID");
|
||||
testingPackage.PID = FileUtils.readFileToString(pid, Charset.defaultCharset());
|
||||
@@ -237,7 +237,7 @@ public class SapforTestingPlanner extends TestingPlanner<SapforPackage> {
|
||||
return;
|
||||
}
|
||||
//-
|
||||
File sapforHome = new File(Global.SapforsDirectory, CommonUtils.getDateName("sapfor"));
|
||||
File sapforHome = new File(Global.SapforsDirectory, Utils_.getDateName("sapfor"));
|
||||
//--
|
||||
sapfor.home_path = sapforHome.getAbsolutePath();
|
||||
sapfor.languageName = LanguageName.fortran;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package _VisualDVM.TestingSystem.SAPFOR.ServerSapfor;
|
||||
import Common.Database.Objects.DBObject;
|
||||
import Common.Database.Objects.riDBObject;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common.Utils.Utils_;
|
||||
import _VisualDVM.ProjectData.LanguageName;
|
||||
import com.sun.org.glassfish.gmbal.Description;
|
||||
|
||||
@@ -45,6 +45,6 @@ public class ServerSapfor extends riDBObject {
|
||||
return call_command;
|
||||
}
|
||||
public String getVersionCommand() {
|
||||
return CommonUtils.DQuotes(call_command) + " " + version_command;
|
||||
return Utils_.DQuotes(call_command) + " " + version_command;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user