промежуточный. внедрение наборов флагов в параметры тестирования двм. сделал добавление и редактирование.
This commit is contained in:
26
.idea/workspace.xml
generated
26
.idea/workspace.xml
generated
@@ -7,13 +7,31 @@
|
|||||||
</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 afterPath="$PROJECT_DIR$/src/_VisualDVM/GlobalData/CompilerOption/Json/OptionJson.java" afterDir="false" />
|
||||||
|
<change afterPath="$PROJECT_DIR$/src/_VisualDVM/GlobalData/CompilerOption/Json/OptionsJson.java" afterDir="false" />
|
||||||
|
<change afterPath="$PROJECT_DIR$/src/_VisualDVM/GlobalData/CompilerOption/Json/OptionsSetJson.java" afterDir="false" />
|
||||||
|
<change afterPath="$PROJECT_DIR$/src/_VisualDVM/GlobalData/CompilerOption/OptionsLine.java" afterDir="false" />
|
||||||
|
<change afterPath="$PROJECT_DIR$/src/_VisualDVM/GlobalData/CompilerOption/OptionsLinesSet.java" afterDir="false" />
|
||||||
|
<change afterPath="$PROJECT_DIR$/src/_VisualDVM/GlobalData/CompilerOption/RawCompilerOptionsSet.java" afterDir="false" />
|
||||||
|
<change afterPath="$PROJECT_DIR$/src/_VisualDVM/GlobalData/CompilerOption/UI/OptionsLinesForm.java" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/properties" beforeDir="false" afterPath="$PROJECT_DIR$/properties" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/properties" beforeDir="false" afterPath="$PROJECT_DIR$/properties" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/src/Common/Utils/Loggable.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common/Utils/Loggable.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/Utils/Utils_.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common/Utils/Utils_.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/Tables/RendererMilliseconds.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common/Visual/Tables/RendererMilliseconds.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/Constants.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Constants.java" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/TestPass.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/TestPass.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/GlobalData/Compiler/Compiler.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/GlobalData/Compiler/Compiler.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/GlobalData/CompilerEnvironment/CompilerEnvironmentsSet.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/GlobalData/CompilerEnvironment/CompilerEnvironmentsSet.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/GlobalData/CompilerOption/CompilerOption.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/GlobalData/CompilerOption/CompilerOption.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/GlobalData/CompilerOption/CompilerOptionsSet.java" beforeDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/GlobalData/CompilerOption/UI/CompilerOptionsForm.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/GlobalData/CompilerOption/UI/CompilerOptionsForm.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/GlobalData/Module/UI/ModuleAnchestorFields.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/GlobalData/Module/UI/ModuleAnchestorFields.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/PickCompilerEnvironmentsForTesting.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/PickCompilerEnvironmentsForTesting.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/PickCompilerOptions.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/PickCompilerOptions.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/DVM/DVMSettings/DVMSettings.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/DVM/DVMSettings/DVMSettings.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/DVM/DVMSettings/UI/DVMSettingsDialog.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/DVM/DVMSettings/UI/DVMSettingsDialog.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/DVM/DVMSettings/UI/DVMSettingsFields.form" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/DVM/DVMSettings/UI/DVMSettingsFields.form" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/DVM/DVMSettings/UI/DVMSettingsFields.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/DVM/DVMSettings/UI/DVMSettingsFields.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Validators/DVMHelpParser.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Validators/DVMHelpParser.java" afterDir="false" />
|
||||||
</list>
|
</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" />
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
"ServerUserPassword": "mprit_2011",
|
"ServerUserPassword": "mprit_2011",
|
||||||
"OfferRegistrationOnStart": true,
|
"OfferRegistrationOnStart": true,
|
||||||
"Workspace": "E:\\Tests",
|
"Workspace": "E:\\Tests",
|
||||||
"ProjectsSearchDirectory": "E:\\Tests\\Downloads\\bugreport_1740738431",
|
"ProjectsSearchDirectory": "E:\\BUG",
|
||||||
"DocumentsDirectory": "C:\\Users\\misha\\Documents\\_testing_system",
|
"DocumentsDirectory": "C:\\Users\\misha\\Documents\\_testing_system",
|
||||||
"VisualiserPath": "C:\\Users\\misha\\Downloads",
|
"VisualiserPath": "C:\\Users\\misha\\Downloads",
|
||||||
"Sapfor_FPath": "E:\\_sapfor_x64\\Components\\Sapfor_F",
|
"Sapfor_FPath": "E:\\_sapfor_x64\\Components\\Sapfor_F",
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
"Kernels": 8,
|
"Kernels": 8,
|
||||||
"LocalMakePathWindows": "C:\\MinGW\\msys\\1.0\\bin\\make.exe",
|
"LocalMakePathWindows": "C:\\MinGW\\msys\\1.0\\bin\\make.exe",
|
||||||
"CheckTestingIntervalSeconds": 10,
|
"CheckTestingIntervalSeconds": 10,
|
||||||
"AutoCheckTesting": false,
|
"AutoCheckTesting": true,
|
||||||
"EmailOnTestingProgress": true,
|
"EmailOnTestingProgress": true,
|
||||||
"lastMachineId": 13,
|
"lastMachineId": 13,
|
||||||
"lastUserId": 34,
|
"lastUserId": 34,
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ public abstract class DataSetControlForm<D extends DBObject> extends ControlForm
|
|||||||
Object savedCurrentKey = null;
|
Object savedCurrentKey = null;
|
||||||
Vector<Object> savedSelectedKeys = new Vector<>();
|
Vector<Object> savedSelectedKeys = new Vector<>();
|
||||||
//--
|
//--
|
||||||
|
public DataMenuBar getMenuBar() {return bar;}
|
||||||
public DataSetControlForm(DataSet<?, D> dataSource_in, JPanel mountPanel_in) {
|
public DataSetControlForm(DataSet<?, D> dataSource_in, JPanel mountPanel_in) {
|
||||||
super(DataTable.class, mountPanel_in);
|
super(DataTable.class, mountPanel_in);
|
||||||
dataSource = dataSource_in;
|
dataSource = dataSource_in;
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package Common.Visual.Menus;
|
package Common.Visual.Menus;
|
||||||
import Common.MainModule_;
|
import Common.MainModule_;
|
||||||
|
import Common.Passes.Pass;
|
||||||
import Common.Passes.PassCode_;
|
import Common.Passes.PassCode_;
|
||||||
import Common.Utils.Utils_;
|
import Common.Utils.Utils_;
|
||||||
import Common.Visual.Fonts.VisualiserFonts;
|
import Common.Visual.Fonts.VisualiserFonts;
|
||||||
@@ -20,6 +21,10 @@ public class VisualiserMenuBar extends JToolBar {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public void addPasses(Pass...passes){
|
||||||
|
for (Pass pass: passes)
|
||||||
|
add(pass.createButton());
|
||||||
|
}
|
||||||
public JMenuBar addMenus(JMenu... menus) {
|
public JMenuBar addMenus(JMenu... menus) {
|
||||||
JMenuBar bar = new JMenuBar() {
|
JMenuBar bar = new JMenuBar() {
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -47,8 +47,9 @@ public class Constants {
|
|||||||
public static final int SMTPPort = 465;
|
public static final int SMTPPort = 465;
|
||||||
public static final int MailSocketPort = 465;
|
public static final int MailSocketPort = 465;
|
||||||
//
|
//
|
||||||
|
//7996 отладочный порт.
|
||||||
public static final int ComponentsServerPort = 7995; //7795
|
public static final int ComponentsServerPort = 7995; //7795
|
||||||
public static final int TestingServerPort = 7998; //7998
|
public static final int TestingServerPort = 7996; //7998
|
||||||
public static final int SocketTimeout = 0;
|
public static final int SocketTimeout = 0;
|
||||||
//-
|
//-
|
||||||
public static final String ServerAddress = "alex-freenas.ddns.net";
|
public static final String ServerAddress = "alex-freenas.ddns.net";
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package _VisualDVM.GlobalData.Compiler;
|
|||||||
import Common.Database.Objects.iDBObject;
|
import Common.Database.Objects.iDBObject;
|
||||||
import Common.Utils.Utils_;
|
import Common.Utils.Utils_;
|
||||||
import _VisualDVM.GlobalData.CompilerEnvironment.CompilerEnvironmentsSet;
|
import _VisualDVM.GlobalData.CompilerEnvironment.CompilerEnvironmentsSet;
|
||||||
import _VisualDVM.GlobalData.CompilerOption.CompilerOptionsSet;
|
import _VisualDVM.GlobalData.CompilerOption.RawCompilerOptionsSet;
|
||||||
import _VisualDVM.GlobalData.Machine.Machine;
|
import _VisualDVM.GlobalData.Machine.Machine;
|
||||||
import _VisualDVM.ProjectData.Files.DBProjectFile;
|
import _VisualDVM.ProjectData.Files.DBProjectFile;
|
||||||
import _VisualDVM.ProjectData.LanguageName;
|
import _VisualDVM.ProjectData.LanguageName;
|
||||||
@@ -29,7 +29,7 @@ public class Compiler extends iDBObject {
|
|||||||
@Description("IGNORE")
|
@Description("IGNORE")
|
||||||
public String versionText = "";
|
public String versionText = "";
|
||||||
//-
|
//-
|
||||||
public CompilerOptionsSet options = new CompilerOptionsSet();
|
public RawCompilerOptionsSet options = new RawCompilerOptionsSet();
|
||||||
public CompilerEnvironmentsSet environments = new CompilerEnvironmentsSet();
|
public CompilerEnvironmentsSet environments = new CompilerEnvironmentsSet();
|
||||||
//-
|
//-
|
||||||
public Compiler() {
|
public Compiler() {
|
||||||
|
|||||||
@@ -12,4 +12,12 @@ public class CompilerEnvironmentsSet extends DataSet<String, CompilerEnvironment
|
|||||||
protected DataSetControlForm createUI(JPanel mountPanel) {
|
protected DataSetControlForm createUI(JPanel mountPanel) {
|
||||||
return new CompilerEnvironmentsForm(this, mountPanel);
|
return new CompilerEnvironmentsForm(this, mountPanel);
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
|
public String getPluralDescription() {
|
||||||
|
return "переменные окружения";
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public String getSingleDescription() {
|
||||||
|
return "переменная окружения";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ import java.util.Vector;
|
|||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
public class CompilerOption extends DBObject {
|
public class CompilerOption extends DBObject {
|
||||||
@Description("PRIMARY KEY, UNIQUE")
|
|
||||||
public String name = "";
|
public String name = "";
|
||||||
public String parameterSeparator = "";
|
public String parameterSeparator = "";
|
||||||
public String parameterName = "";
|
public String parameterName = "";
|
||||||
|
|||||||
@@ -1,15 +0,0 @@
|
|||||||
package _VisualDVM.GlobalData.CompilerOption;
|
|
||||||
import Common.Database.Tables.DataSet;
|
|
||||||
import Common.Visual.DataSetControlForm;
|
|
||||||
import _VisualDVM.GlobalData.CompilerOption.UI.CompilerOptionsForm;
|
|
||||||
|
|
||||||
import javax.swing.*;
|
|
||||||
public class CompilerOptionsSet extends DataSet<String, CompilerOption> {
|
|
||||||
public CompilerOptionsSet() {
|
|
||||||
super(String.class, CompilerOption.class);
|
|
||||||
}
|
|
||||||
@Override
|
|
||||||
protected DataSetControlForm createUI(JPanel mountPanel) {
|
|
||||||
return new CompilerOptionsForm(this, mountPanel);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
package _VisualDVM.GlobalData.CompilerOption.Json;
|
||||||
|
import _VisualDVM.GlobalData.CompilerOption.CompilerOption;
|
||||||
|
import com.google.gson.annotations.Expose;
|
||||||
|
public class OptionJson {
|
||||||
|
@Expose
|
||||||
|
public String name; //в том числе и с разделителем если есть. поиск по startswith
|
||||||
|
@Expose
|
||||||
|
public String value; //значение без кавычек
|
||||||
|
public OptionJson(CompilerOption src){
|
||||||
|
name= src.name+src.parameterSeparator;
|
||||||
|
value = src.parameterValue;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
package _VisualDVM.GlobalData.CompilerOption.Json;
|
||||||
|
import Common.Utils.Utils_;
|
||||||
|
import com.google.gson.annotations.Expose;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Vector;
|
||||||
|
public class OptionsJson {
|
||||||
|
@Expose
|
||||||
|
public List<OptionJson> values = new Vector<>();
|
||||||
|
public String toLine(){
|
||||||
|
Vector<String> res = new Vector<>();
|
||||||
|
for (OptionJson optionJson: values){
|
||||||
|
res.add(optionJson.name+
|
||||||
|
|
||||||
|
(optionJson.value.contains(" ")? Utils_.DQuotes(optionJson.value): optionJson.value));
|
||||||
|
}
|
||||||
|
return String.join(" ", res);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
package _VisualDVM.GlobalData.CompilerOption.Json;
|
||||||
|
import com.google.gson.annotations.Expose;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Vector;
|
||||||
|
public class OptionsSetJson {
|
||||||
|
@Expose
|
||||||
|
public List<OptionsJson> values = new Vector<>();
|
||||||
|
public OptionsSetJson(){
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
package _VisualDVM.GlobalData.CompilerOption;
|
||||||
|
import Common.Database.Objects.iDBObject;
|
||||||
|
import _VisualDVM.GlobalData.CompilerOption.Json.OptionsJson;
|
||||||
|
public class OptionsLine extends iDBObject {
|
||||||
|
public OptionsJson json;
|
||||||
|
public OptionsLine(OptionsJson json_in){
|
||||||
|
json = json_in;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
package _VisualDVM.GlobalData.CompilerOption;
|
||||||
|
import Common.Database.Tables.DataSet;
|
||||||
|
import Common.Visual.DataSetControlForm;
|
||||||
|
import _VisualDVM.GlobalData.CompilerOption.Json.OptionsSetJson;
|
||||||
|
import _VisualDVM.GlobalData.CompilerOption.UI.OptionsLinesForm;
|
||||||
|
|
||||||
|
import javax.swing.*;
|
||||||
|
public class OptionsLinesSet extends DataSet<Integer, OptionsLine> {
|
||||||
|
public int maxId = 1;
|
||||||
|
public OptionsLinesSet() {
|
||||||
|
super(Integer.class, OptionsLine.class);
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public String getSingleDescription() {
|
||||||
|
return "набор опций компиляции";
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public String getPluralDescription() {
|
||||||
|
return "наборы опций компиляции";
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
protected DataSetControlForm createUI(JPanel mountPanel) {
|
||||||
|
return new OptionsLinesForm(this,mountPanel);
|
||||||
|
}
|
||||||
|
public OptionsSetJson toJson(){
|
||||||
|
OptionsSetJson res= new OptionsSetJson();
|
||||||
|
for (OptionsLine optionsLine: Data.values()){
|
||||||
|
res.values.add(optionsLine.json);
|
||||||
|
}
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
package _VisualDVM.GlobalData.CompilerOption;
|
||||||
|
import Common.Database.Tables.DataSet;
|
||||||
|
import Common.Visual.DataSetControlForm;
|
||||||
|
import _VisualDVM.GlobalData.CompilerOption.Json.OptionJson;
|
||||||
|
import _VisualDVM.GlobalData.CompilerOption.Json.OptionsJson;
|
||||||
|
import _VisualDVM.GlobalData.CompilerOption.UI.CompilerOptionsForm;
|
||||||
|
|
||||||
|
import javax.swing.*;
|
||||||
|
//нужно для опций компиляции получаемых из хелпа
|
||||||
|
public class RawCompilerOptionsSet extends DataSet<String, CompilerOption> {
|
||||||
|
public RawCompilerOptionsSet() {
|
||||||
|
super(String.class, CompilerOption.class);
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
protected DataSetControlForm createUI(JPanel mountPanel) {
|
||||||
|
return new CompilerOptionsForm(this, mountPanel);
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public String getPluralDescription() {
|
||||||
|
return "опции компиляции";
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public String getSingleDescription() {
|
||||||
|
return "опция компиляции";
|
||||||
|
}
|
||||||
|
public CompilerOption findByJson(OptionJson json){
|
||||||
|
for (CompilerOption compilerOption: Data.values()){
|
||||||
|
if (json.name.equals(compilerOption.name+compilerOption.parameterSeparator))
|
||||||
|
return compilerOption;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
public void Reset(){
|
||||||
|
for (CompilerOption option: Data.values()){
|
||||||
|
option.select(false);
|
||||||
|
option.parameterValue="";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public void Synchronize(OptionsJson json){
|
||||||
|
for (OptionJson option_json: json.values){
|
||||||
|
// найти опцию по началу
|
||||||
|
CompilerOption compilerOption = findByJson(option_json);
|
||||||
|
if (compilerOption!=null){
|
||||||
|
compilerOption.select(true);
|
||||||
|
compilerOption.parameterValue = option_json.value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -16,7 +16,7 @@ public class CompilerOptionsForm extends DataSetControlForm<CompilerOption> {
|
|||||||
new ColumnInfo<CompilerOption>("Параметр") {
|
new ColumnInfo<CompilerOption>("Параметр") {
|
||||||
@Override
|
@Override
|
||||||
public Object getFieldAt(CompilerOption object) {
|
public Object getFieldAt(CompilerOption object) {
|
||||||
return object.parameterName + object.parameterSeparator;
|
return object.parameterName;
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public Class getRendererClass() {
|
public Class getRendererClass() {
|
||||||
|
|||||||
@@ -0,0 +1,106 @@
|
|||||||
|
package _VisualDVM.GlobalData.CompilerOption.UI;
|
||||||
|
import Common.Database.Tables.DataSet;
|
||||||
|
import Common.Passes.Pass;
|
||||||
|
import Common.Visual.DataSetControlForm;
|
||||||
|
import Common.Visual.Menus.DataMenuBar;
|
||||||
|
import Common.Visual.Tables.ColumnInfo;
|
||||||
|
import _VisualDVM.Global;
|
||||||
|
import _VisualDVM.GlobalData.CompilerOption.Json.OptionsJson;
|
||||||
|
import _VisualDVM.GlobalData.CompilerOption.OptionsLine;
|
||||||
|
import _VisualDVM.GlobalData.CompilerOption.OptionsLinesSet;
|
||||||
|
import _VisualDVM.Passes.PassCode;
|
||||||
|
|
||||||
|
import javax.swing.*;
|
||||||
|
public class OptionsLinesForm extends DataSetControlForm<OptionsLine> {
|
||||||
|
public OptionsLinesForm(OptionsLinesSet dataSource_in, JPanel mountPanel_in) {
|
||||||
|
super(dataSource_in, mountPanel_in);
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
protected void createColumns() {
|
||||||
|
AddColumns(new ColumnInfo<OptionsLine>("") {
|
||||||
|
@Override
|
||||||
|
public Object getFieldAt(OptionsLine object) {
|
||||||
|
return object.json.toLine();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
protected boolean hasCheckBox() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
protected boolean isPKVisible() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
protected DataMenuBar createMenuBar() {
|
||||||
|
DataMenuBar res = super.createMenuBar();
|
||||||
|
res.addPasses(
|
||||||
|
new Pass<OptionsLine>(){
|
||||||
|
@Override
|
||||||
|
public String getIconPath() {
|
||||||
|
return "/Common/icons/RedAdd.png";
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public String getDescription() {
|
||||||
|
return "Добавление набора опций компиляции";
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public String getButtonText() {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
protected boolean canStart(Object... args) throws Exception {
|
||||||
|
Pass pass = Global.mainModule.getPass(PassCode.PickCompilerOptions);
|
||||||
|
if (pass.Do(Global.mainModule.getDb().compilers.getUI().getCurrent())){
|
||||||
|
target= new OptionsLine((OptionsJson) pass.target);
|
||||||
|
target.id = ((OptionsLinesSet)dataSource).maxId++;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
protected void body() throws Exception {
|
||||||
|
dataSource.put(target.getPK(), target);
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
protected void showDone() throws Exception {
|
||||||
|
dataSource.ShowUI(target.getPK());
|
||||||
|
}
|
||||||
|
},
|
||||||
|
new Pass<OptionsLine>(){
|
||||||
|
@Override
|
||||||
|
public String getIconPath() {
|
||||||
|
return "/Common/icons/Edit.png";
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public String getDescription() {
|
||||||
|
return "Редактирование набора опций компиляции";
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public String getButtonText() {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
protected boolean canStart(Object... args) throws Exception {
|
||||||
|
if (dataSource.getUI().CheckCurrent(Log)) {
|
||||||
|
target = dataSource.getUI().getCurrent();
|
||||||
|
Pass pass = Global.mainModule.getPass(PassCode.PickCompilerOptions);
|
||||||
|
if (pass.Do(Global.mainModule.getDb().compilers.getUI().getCurrent(), target.json)){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
protected void body() throws Exception {
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
protected void showFinish() throws Exception {
|
||||||
|
dataSource.ShowUI(target.getPK());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -6,6 +6,7 @@ import Common.Visual.UI;
|
|||||||
import Common.Visual.Windows.Dialog.DialogFields;
|
import Common.Visual.Windows.Dialog.DialogFields;
|
||||||
import _VisualDVM.Global;
|
import _VisualDVM.Global;
|
||||||
import _VisualDVM.GlobalData.Compiler.Compiler;
|
import _VisualDVM.GlobalData.Compiler.Compiler;
|
||||||
|
import _VisualDVM.GlobalData.CompilerOption.Json.OptionsJson;
|
||||||
import _VisualDVM.GlobalData.Machine.Machine;
|
import _VisualDVM.GlobalData.Machine.Machine;
|
||||||
import _VisualDVM.GlobalData.Makefile.Makefile;
|
import _VisualDVM.GlobalData.Makefile.Makefile;
|
||||||
import _VisualDVM.GlobalData.Module.Module;
|
import _VisualDVM.GlobalData.Module.Module;
|
||||||
@@ -39,9 +40,9 @@ public class ModuleAnchestorFields implements DialogFields {
|
|||||||
BPickOptions.addActionListener(new ActionListener() {
|
BPickOptions.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
Pass<String> pass = Global.mainModule.getPass(PassCode.PickCompilerOptions);
|
Pass pass = Global.mainModule.getPass(PassCode.PickCompilerOptions);
|
||||||
if (pass.Do(compiler)) {
|
if (pass.Do(compiler)) {
|
||||||
UI.TrySelect(cbFlags, pass.target);
|
UI.TrySelect(cbFlags, ((OptionsJson)pass.target).toLine());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ public class PickCompilerEnvironmentsForTesting extends Pass<String> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
return dialog.ShowDialog("Назначение переменных окружения");
|
return dialog.ShowDialog("");
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
protected void body() throws Exception {
|
protected void body() throws Exception {
|
||||||
|
|||||||
@@ -5,16 +5,18 @@ import _VisualDVM.Global;
|
|||||||
import _VisualDVM.GlobalData.Compiler.Compiler;
|
import _VisualDVM.GlobalData.Compiler.Compiler;
|
||||||
import _VisualDVM.GlobalData.Compiler.CompilerType;
|
import _VisualDVM.GlobalData.Compiler.CompilerType;
|
||||||
import _VisualDVM.GlobalData.CompilerOption.CompilerOption;
|
import _VisualDVM.GlobalData.CompilerOption.CompilerOption;
|
||||||
|
import _VisualDVM.GlobalData.CompilerOption.Json.OptionJson;
|
||||||
|
import _VisualDVM.GlobalData.CompilerOption.Json.OptionsJson;
|
||||||
import _VisualDVM.GlobalData.CompilerOption.UI.CompilerOptionsFields;
|
import _VisualDVM.GlobalData.CompilerOption.UI.CompilerOptionsFields;
|
||||||
import _VisualDVM.Passes.PassCode;
|
import _VisualDVM.Passes.PassCode;
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import java.util.Vector;
|
public class PickCompilerOptions extends Pass<OptionsJson> {
|
||||||
public class PickCompilerOptions extends Pass<String> {
|
|
||||||
Compiler compiler = null;
|
Compiler compiler = null;
|
||||||
//-
|
//-
|
||||||
@Override
|
@Override
|
||||||
protected boolean canStart(Object... args) throws Exception {
|
protected boolean canStart(Object... args) throws Exception {
|
||||||
|
target = new OptionsJson();
|
||||||
if (args[0] == null) {
|
if (args[0] == null) {
|
||||||
Log.Writeln_("Отсутствует текущий компилятор. Выбор флагов недоступен.");
|
Log.Writeln_("Отсутствует текущий компилятор. Выбор флагов недоступен.");
|
||||||
return false;
|
return false;
|
||||||
@@ -26,6 +28,11 @@ public class PickCompilerOptions extends Pass<String> {
|
|||||||
}
|
}
|
||||||
if (!(compiler.helpLoaded || Global.mainModule.getPass(PassCode.ShowCompilerHelp).Do(compiler, false)))
|
if (!(compiler.helpLoaded || Global.mainModule.getPass(PassCode.ShowCompilerHelp).Do(compiler, false)))
|
||||||
return false;
|
return false;
|
||||||
|
compiler.options.Reset();
|
||||||
|
if (args.length>1){
|
||||||
|
target =(OptionsJson) args[1];
|
||||||
|
compiler.options.Synchronize(target);
|
||||||
|
}
|
||||||
Dialog<String, CompilerOptionsFields> dialog = new Dialog<String, CompilerOptionsFields>(CompilerOptionsFields.class) {
|
Dialog<String, CompilerOptionsFields> dialog = new Dialog<String, CompilerOptionsFields>(CompilerOptionsFields.class) {
|
||||||
@Override
|
@Override
|
||||||
public void InitFields() {
|
public void InitFields() {
|
||||||
@@ -45,15 +52,15 @@ public class PickCompilerOptions extends Pass<String> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
return dialog.ShowDialog("Назначение опций компилятора");
|
return dialog.ShowDialog("");
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
protected void body() throws Exception {
|
protected void body() throws Exception {
|
||||||
Vector<String> res = new Vector<>();
|
target.values.clear();
|
||||||
for (CompilerOption option : compiler.options.Data.values()) {
|
for (CompilerOption option : compiler.options.Data.values()) {
|
||||||
if (option.isSelected())
|
if (option.isSelected()) {
|
||||||
res.add(option.toString());
|
target.values.add(new OptionJson(option));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
target = String.join(" ", res);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,13 +10,17 @@ public class DVMSettings extends Settings {
|
|||||||
public String environments = "";
|
public String environments = "";
|
||||||
@Description("DEFAULT 0")
|
@Description("DEFAULT 0")
|
||||||
public int Is_DVM_STAT = 0; //флаг вмест usr par, которые не использовались.
|
public int Is_DVM_STAT = 0; //флаг вмест usr par, которые не использовались.
|
||||||
// public String usr_par = "";
|
|
||||||
//---
|
//---
|
||||||
public int cube = 0; //
|
public int cube = 0; //
|
||||||
public int max_proc_count = 4;
|
public int max_proc_count = 4;
|
||||||
public int min_dim_proc_count = 1;
|
public int min_dim_proc_count = 1;
|
||||||
public int max_dim_proc_count = 4;
|
public int max_dim_proc_count = 4;
|
||||||
//
|
//--
|
||||||
|
@Description("DEFAULT ''")
|
||||||
|
public String packedCompilationOptionsJson=""; //вывести (?)
|
||||||
|
@Description("DEFAULT ''")
|
||||||
|
public String packedCompilationOptionsSetsJson="";
|
||||||
|
//--
|
||||||
public DVMSettings() {
|
public DVMSettings() {
|
||||||
}
|
}
|
||||||
public DVMSettings(DVMSettings src) {
|
public DVMSettings(DVMSettings src) {
|
||||||
@@ -29,6 +33,8 @@ public class DVMSettings extends Settings {
|
|||||||
environments = c.environments;
|
environments = c.environments;
|
||||||
Is_DVM_STAT = c.Is_DVM_STAT;
|
Is_DVM_STAT = c.Is_DVM_STAT;
|
||||||
// usr_par=c.usr_par;
|
// usr_par=c.usr_par;
|
||||||
|
packedCompilationOptionsJson= ((DVMSettings) src).packedCompilationOptionsJson;
|
||||||
|
packedCompilationOptionsSetsJson = ((DVMSettings)src).packedCompilationOptionsSetsJson;
|
||||||
//-
|
//-
|
||||||
cube = c.cube;
|
cube = c.cube;
|
||||||
max_proc_count = c.max_proc_count;
|
max_proc_count = c.max_proc_count;
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
package _VisualDVM.TestingSystem.DVM.DVMSettings.UI;
|
package _VisualDVM.TestingSystem.DVM.DVMSettings.UI;
|
||||||
|
import Common.Utils.Utils_;
|
||||||
import Common.Visual.Windows.Dialog.DBObjectDialog;
|
import Common.Visual.Windows.Dialog.DBObjectDialog;
|
||||||
import _VisualDVM.TestingSystem.DVM.DVMSettings.DVMSettings;
|
import _VisualDVM.TestingSystem.DVM.DVMSettings.DVMSettings;
|
||||||
public class DVMSettingsDialog extends DBObjectDialog<DVMSettings, DVMSettingsFields> {
|
public class DVMSettingsDialog extends DBObjectDialog<DVMSettings, DVMSettingsFields> {
|
||||||
@@ -7,7 +8,7 @@ public class DVMSettingsDialog extends DBObjectDialog<DVMSettings, DVMSettingsFi
|
|||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public int getDefaultHeight() {
|
public int getDefaultHeight() {
|
||||||
return 400;
|
return 600;
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public int getDefaultWidth() {
|
public int getDefaultWidth() {
|
||||||
@@ -28,8 +29,8 @@ public class DVMSettingsDialog extends DBObjectDialog<DVMSettings, DVMSettingsFi
|
|||||||
public void fillFields() {
|
public void fillFields() {
|
||||||
fields.tfName.setText(Result.description);
|
fields.tfName.setText(Result.description);
|
||||||
//------->>>
|
//------->>>
|
||||||
fields.tfFlags.setText(Result.flags);
|
// fields.tfFlags.setText(Result.flags);
|
||||||
fields.tfEnvironments.setText(Result.environments);
|
// fields.tfEnvironments.setText(Result.environments);
|
||||||
//------->>>
|
//------->>>
|
||||||
fields.sMinDimProc.setValue(Result.min_dim_proc_count);
|
fields.sMinDimProc.setValue(Result.min_dim_proc_count);
|
||||||
fields.sMaxDimProc.setValue(Result.max_dim_proc_count);
|
fields.sMaxDimProc.setValue(Result.max_dim_proc_count);
|
||||||
@@ -37,6 +38,8 @@ public class DVMSettingsDialog extends DBObjectDialog<DVMSettings, DVMSettingsFi
|
|||||||
//-
|
//-
|
||||||
fields.sMaxProc.setValue(Result.max_proc_count);
|
fields.sMaxProc.setValue(Result.max_proc_count);
|
||||||
fields.cbDvmStat.setSelected(Result.Is_DVM_STAT != 0);
|
fields.cbDvmStat.setSelected(Result.Is_DVM_STAT != 0);
|
||||||
|
//---
|
||||||
|
fields.fillOptionsLines(Result.packedCompilationOptionsJson);
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public void ProcessResult() {
|
public void ProcessResult() {
|
||||||
@@ -45,9 +48,11 @@ public class DVMSettingsDialog extends DBObjectDialog<DVMSettings, DVMSettingsFi
|
|||||||
Result.max_dim_proc_count = (int) fields.sMaxDimProc.getValue();
|
Result.max_dim_proc_count = (int) fields.sMaxDimProc.getValue();
|
||||||
Result.cube = fields.cbCube.isSelected() ? 1 : 0;
|
Result.cube = fields.cbCube.isSelected() ? 1 : 0;
|
||||||
Result.max_proc_count = (int) fields.sMaxProc.getValue();
|
Result.max_proc_count = (int) fields.sMaxProc.getValue();
|
||||||
Result.flags = fields.tfFlags.getText();
|
// Result.flags = fields.tfFlags.getText();
|
||||||
Result.environments = fields.tfEnvironments.getText();
|
// Result.environments = fields.tfEnvironments.getText();
|
||||||
Result.Is_DVM_STAT = fields.cbDvmStat.isSelected() ? 1 : 0;
|
Result.Is_DVM_STAT = fields.cbDvmStat.isSelected() ? 1 : 0;
|
||||||
|
//--
|
||||||
|
Result.packedCompilationOptionsJson = Utils_.gson.toJson(fields.optionsLines.toJson());
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public void SetReadonly() {
|
public void SetReadonly() {
|
||||||
|
|||||||
@@ -2,18 +2,64 @@
|
|||||||
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="_VisualDVM.TestingSystem.DVM.DVMSettings.UI.DVMSettingsFields">
|
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="_VisualDVM.TestingSystem.DVM.DVMSettings.UI.DVMSettingsFields">
|
||||||
<grid id="27dc6" binding="content" layout-manager="BorderLayout" hgap="0" vgap="0">
|
<grid id="27dc6" binding="content" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||||
<constraints>
|
<constraints>
|
||||||
<xy x="20" y="20" width="777" height="400"/>
|
<xy x="20" y="20" width="729" height="563"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<properties/>
|
<properties/>
|
||||||
<border type="none"/>
|
<border type="none"/>
|
||||||
<children>
|
<children>
|
||||||
<grid id="e9baf" layout-manager="GridLayoutManager" row-count="9" column-count="4" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
<splitpane id="f2435" binding="SC1">
|
||||||
<margin top="0" left="0" bottom="0" right="0"/>
|
|
||||||
<constraints border-constraint="Center"/>
|
<constraints border-constraint="Center"/>
|
||||||
|
<properties>
|
||||||
|
<dividerSize value="3"/>
|
||||||
|
<orientation value="0"/>
|
||||||
|
</properties>
|
||||||
|
<border type="none"/>
|
||||||
|
<children>
|
||||||
|
<grid id="2abc3" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||||
|
<constraints>
|
||||||
|
<splitpane position="right"/>
|
||||||
|
</constraints>
|
||||||
<properties/>
|
<properties/>
|
||||||
<border type="none"/>
|
<border type="none"/>
|
||||||
<children>
|
<children>
|
||||||
<component id="8f4d9" class="javax.swing.JLabel">
|
<splitpane id="10c04" binding="SC2">
|
||||||
|
<constraints border-constraint="Center"/>
|
||||||
|
<properties>
|
||||||
|
<dividerLocation value="150"/>
|
||||||
|
<dividerSize value="3"/>
|
||||||
|
<orientation value="0"/>
|
||||||
|
</properties>
|
||||||
|
<border type="none"/>
|
||||||
|
<children>
|
||||||
|
<grid id="8243" binding="optionsLinesPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||||
|
<constraints>
|
||||||
|
<splitpane position="left"/>
|
||||||
|
</constraints>
|
||||||
|
<properties/>
|
||||||
|
<border type="none"/>
|
||||||
|
<children/>
|
||||||
|
</grid>
|
||||||
|
<grid id="2deb5" binding="environmentsLinesPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||||
|
<constraints>
|
||||||
|
<splitpane position="right"/>
|
||||||
|
</constraints>
|
||||||
|
<properties/>
|
||||||
|
<border type="none"/>
|
||||||
|
<children/>
|
||||||
|
</grid>
|
||||||
|
</children>
|
||||||
|
</splitpane>
|
||||||
|
</children>
|
||||||
|
</grid>
|
||||||
|
<grid id="5ee89" layout-manager="GridLayoutManager" row-count="6" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||||
|
<margin top="0" left="0" bottom="0" right="0"/>
|
||||||
|
<constraints>
|
||||||
|
<splitpane position="left"/>
|
||||||
|
</constraints>
|
||||||
|
<properties/>
|
||||||
|
<border type="none"/>
|
||||||
|
<children>
|
||||||
|
<component id="3540c" class="javax.swing.JLabel">
|
||||||
<constraints>
|
<constraints>
|
||||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="2" use-parent-layout="false"/>
|
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="2" use-parent-layout="false"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
@@ -22,14 +68,9 @@
|
|||||||
<text value="название"/>
|
<text value="название"/>
|
||||||
</properties>
|
</properties>
|
||||||
</component>
|
</component>
|
||||||
<vspacer id="2176d">
|
<component id="b047b" class="javax.swing.JTextField" binding="tfName" custom-create="true">
|
||||||
<constraints>
|
<constraints>
|
||||||
<grid row="8" column="0" row-span="1" col-span="1" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/>
|
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
|
||||||
</constraints>
|
|
||||||
</vspacer>
|
|
||||||
<component id="c61a7" class="javax.swing.JTextField" binding="tfName" custom-create="true">
|
|
||||||
<constraints>
|
|
||||||
<grid row="0" column="3" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
|
|
||||||
<minimum-size width="200" height="30"/>
|
<minimum-size width="200" height="30"/>
|
||||||
<preferred-size width="238" height="30"/>
|
<preferred-size width="238" height="30"/>
|
||||||
<maximum-size width="200" height="30"/>
|
<maximum-size width="200" height="30"/>
|
||||||
@@ -37,9 +78,9 @@
|
|||||||
</constraints>
|
</constraints>
|
||||||
<properties/>
|
<properties/>
|
||||||
</component>
|
</component>
|
||||||
<component id="a1d86" class="javax.swing.JSpinner" binding="sMinDimProc">
|
<component id="4243a" class="javax.swing.JSpinner" binding="sMinDimProc">
|
||||||
<constraints>
|
<constraints>
|
||||||
<grid row="5" column="3" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
|
<grid row="2" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
|
||||||
<minimum-size width="100" height="30"/>
|
<minimum-size width="100" height="30"/>
|
||||||
<preferred-size width="100" height="30"/>
|
<preferred-size width="100" height="30"/>
|
||||||
<maximum-size width="100" height="30"/>
|
<maximum-size width="100" height="30"/>
|
||||||
@@ -47,27 +88,27 @@
|
|||||||
</constraints>
|
</constraints>
|
||||||
<properties/>
|
<properties/>
|
||||||
</component>
|
</component>
|
||||||
<component id="deae5" class="javax.swing.JLabel">
|
<component id="9c464" class="javax.swing.JLabel">
|
||||||
<constraints>
|
<constraints>
|
||||||
<grid row="5" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="2" use-parent-layout="false"/>
|
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="2" use-parent-layout="false"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<properties>
|
<properties>
|
||||||
<font name="Times New Roman" size="16" style="2"/>
|
<font name="Times New Roman" size="16" style="2"/>
|
||||||
<text value="мин. число процессоров по измерению"/>
|
<text value="мин. число процессоров по измерению"/>
|
||||||
</properties>
|
</properties>
|
||||||
</component>
|
</component>
|
||||||
<component id="61ffc" class="javax.swing.JLabel">
|
<component id="33de5" class="javax.swing.JLabel">
|
||||||
<constraints>
|
<constraints>
|
||||||
<grid row="6" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="2" use-parent-layout="false"/>
|
<grid row="3" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="2" use-parent-layout="false"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<properties>
|
<properties>
|
||||||
<font name="Times New Roman" size="16" style="2"/>
|
<font name="Times New Roman" size="16" style="2"/>
|
||||||
<text value="макс. число процессоров по измерению"/>
|
<text value="макс. число процессоров по измерению"/>
|
||||||
</properties>
|
</properties>
|
||||||
</component>
|
</component>
|
||||||
<component id="380de" class="javax.swing.JSpinner" binding="sMaxDimProc">
|
<component id="6848c" class="javax.swing.JSpinner" binding="sMaxDimProc">
|
||||||
<constraints>
|
<constraints>
|
||||||
<grid row="6" column="3" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
|
<grid row="3" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
|
||||||
<minimum-size width="100" height="30"/>
|
<minimum-size width="100" height="30"/>
|
||||||
<preferred-size width="100" height="30"/>
|
<preferred-size width="100" height="30"/>
|
||||||
<maximum-size width="100" height="30"/>
|
<maximum-size width="100" height="30"/>
|
||||||
@@ -75,31 +116,18 @@
|
|||||||
</constraints>
|
</constraints>
|
||||||
<properties/>
|
<properties/>
|
||||||
</component>
|
</component>
|
||||||
<component id="9b010" class="javax.swing.JCheckBox" binding="cbCube">
|
<component id="9e1a7" class="javax.swing.JLabel">
|
||||||
<constraints>
|
<constraints>
|
||||||
<grid row="7" column="0" row-span="1" col-span="4" vsize-policy="3" hsize-policy="3" anchor="8" fill="0" indent="2" use-parent-layout="false"/>
|
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="2" use-parent-layout="false"/>
|
||||||
</constraints>
|
|
||||||
<properties>
|
|
||||||
<font name="Times New Roman" size="16" style="2"/>
|
|
||||||
<horizontalAlignment value="0"/>
|
|
||||||
<icon value="Common/icons/NotPick.png"/>
|
|
||||||
<selectedIcon value="Common/icons/Pick.png"/>
|
|
||||||
<text value="кубические решётки"/>
|
|
||||||
<toolTipText value="матрица с одинаковым размером измерений"/>
|
|
||||||
</properties>
|
|
||||||
</component>
|
|
||||||
<component id="bd5c7" class="javax.swing.JLabel">
|
|
||||||
<constraints>
|
|
||||||
<grid row="4" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="2" use-parent-layout="false"/>
|
|
||||||
</constraints>
|
</constraints>
|
||||||
<properties>
|
<properties>
|
||||||
<font name="Times New Roman" size="16" style="2"/>
|
<font name="Times New Roman" size="16" style="2"/>
|
||||||
<text value="макс. число процессоров"/>
|
<text value="макс. число процессоров"/>
|
||||||
</properties>
|
</properties>
|
||||||
</component>
|
</component>
|
||||||
<component id="ad38a" class="javax.swing.JSpinner" binding="sMaxProc">
|
<component id="67ad5" class="javax.swing.JSpinner" binding="sMaxProc">
|
||||||
<constraints>
|
<constraints>
|
||||||
<grid row="4" column="3" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
|
<grid row="1" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
|
||||||
<minimum-size width="100" height="30"/>
|
<minimum-size width="100" height="30"/>
|
||||||
<preferred-size width="100" height="30"/>
|
<preferred-size width="100" height="30"/>
|
||||||
<maximum-size width="100" height="30"/>
|
<maximum-size width="100" height="30"/>
|
||||||
@@ -107,109 +135,9 @@
|
|||||||
</constraints>
|
</constraints>
|
||||||
<properties/>
|
<properties/>
|
||||||
</component>
|
</component>
|
||||||
<component id="4d47b" class="javax.swing.JLabel">
|
<component id="e4da0" class="javax.swing.JCheckBox" binding="cbDvmStat">
|
||||||
<constraints>
|
<constraints>
|
||||||
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="2" use-parent-layout="false"/>
|
<grid row="5" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="8" fill="0" indent="2" use-parent-layout="false"/>
|
||||||
</constraints>
|
|
||||||
<properties>
|
|
||||||
<font name="Times New Roman" size="16" style="2"/>
|
|
||||||
<text value="флаги"/>
|
|
||||||
</properties>
|
|
||||||
</component>
|
|
||||||
<component id="45943" class="javax.swing.JLabel">
|
|
||||||
<constraints>
|
|
||||||
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="2" use-parent-layout="false"/>
|
|
||||||
</constraints>
|
|
||||||
<properties>
|
|
||||||
<font name="Times New Roman" size="16" style="2"/>
|
|
||||||
<text value="окружение"/>
|
|
||||||
</properties>
|
|
||||||
</component>
|
|
||||||
<component id="decc3" class="javax.swing.JTextField" binding="tfFlags">
|
|
||||||
<constraints>
|
|
||||||
<grid row="1" column="3" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
|
|
||||||
<minimum-size width="400" height="30"/>
|
|
||||||
<preferred-size width="400" height="30"/>
|
|
||||||
<maximum-size width="400" height="30"/>
|
|
||||||
</grid>
|
|
||||||
</constraints>
|
|
||||||
<properties>
|
|
||||||
<editable value="false"/>
|
|
||||||
<font size="10"/>
|
|
||||||
</properties>
|
|
||||||
</component>
|
|
||||||
<component id="f6927" class="javax.swing.JTextField" binding="tfEnvironments">
|
|
||||||
<constraints>
|
|
||||||
<grid row="2" column="3" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
|
|
||||||
<minimum-size width="400" height="30"/>
|
|
||||||
<preferred-size width="400" height="30"/>
|
|
||||||
<maximum-size width="400" height="30"/>
|
|
||||||
</grid>
|
|
||||||
</constraints>
|
|
||||||
<properties>
|
|
||||||
<editable value="false"/>
|
|
||||||
<font size="10"/>
|
|
||||||
</properties>
|
|
||||||
</component>
|
|
||||||
<component id="265bb" class="javax.swing.JButton" binding="bAddFlags">
|
|
||||||
<constraints>
|
|
||||||
<grid row="1" column="1" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="0" indent="0" use-parent-layout="false"/>
|
|
||||||
</constraints>
|
|
||||||
<properties>
|
|
||||||
<borderPainted value="false"/>
|
|
||||||
<icon value="icons/Menu/Regions.png"/>
|
|
||||||
<maximumSize width="30" height="30"/>
|
|
||||||
<minimumSize width="30" height="30"/>
|
|
||||||
<preferredSize width="30" height="30"/>
|
|
||||||
<text value=""/>
|
|
||||||
<toolTipText value="Редактировать флаги"/>
|
|
||||||
</properties>
|
|
||||||
</component>
|
|
||||||
<component id="77de1" class="javax.swing.JButton" binding="bAddEnvironments">
|
|
||||||
<constraints>
|
|
||||||
<grid row="2" column="1" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="0" indent="0" use-parent-layout="false"/>
|
|
||||||
</constraints>
|
|
||||||
<properties>
|
|
||||||
<borderPainted value="false"/>
|
|
||||||
<icon value="icons/Menu/Regions.png"/>
|
|
||||||
<maximumSize width="30" height="30"/>
|
|
||||||
<minimumSize width="30" height="30"/>
|
|
||||||
<preferredSize width="30" height="30"/>
|
|
||||||
<text value=""/>
|
|
||||||
<toolTipText value="Добавить набор переменных окружения"/>
|
|
||||||
</properties>
|
|
||||||
</component>
|
|
||||||
<component id="7682" class="javax.swing.JButton" binding="bDeleteFlags">
|
|
||||||
<constraints>
|
|
||||||
<grid row="1" column="2" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="0" indent="0" use-parent-layout="false"/>
|
|
||||||
</constraints>
|
|
||||||
<properties>
|
|
||||||
<borderPainted value="false"/>
|
|
||||||
<icon value="Common/icons/Delete.png"/>
|
|
||||||
<maximumSize width="30" height="30"/>
|
|
||||||
<minimumSize width="30" height="30"/>
|
|
||||||
<preferredSize width="30" height="30"/>
|
|
||||||
<text value=""/>
|
|
||||||
<toolTipText value="Удалить флаги"/>
|
|
||||||
</properties>
|
|
||||||
</component>
|
|
||||||
<component id="6c384" class="javax.swing.JButton" binding="bDeleteEnvironment">
|
|
||||||
<constraints>
|
|
||||||
<grid row="2" column="2" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="0" indent="0" use-parent-layout="false"/>
|
|
||||||
</constraints>
|
|
||||||
<properties>
|
|
||||||
<borderPainted value="false"/>
|
|
||||||
<icon value="Common/icons/Delete.png"/>
|
|
||||||
<maximumSize width="30" height="30"/>
|
|
||||||
<minimumSize width="30" height="30"/>
|
|
||||||
<preferredSize width="30" height="30"/>
|
|
||||||
<text value=""/>
|
|
||||||
<toolTipText value="Удалить переменную окружения"/>
|
|
||||||
</properties>
|
|
||||||
</component>
|
|
||||||
<component id="3f04c" class="javax.swing.JCheckBox" binding="cbDvmStat">
|
|
||||||
<constraints>
|
|
||||||
<grid row="3" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="8" fill="0" indent="2" use-parent-layout="false"/>
|
|
||||||
</constraints>
|
</constraints>
|
||||||
<properties>
|
<properties>
|
||||||
<font name="Times New Roman" size="16" style="2"/>
|
<font name="Times New Roman" size="16" style="2"/>
|
||||||
@@ -220,8 +148,23 @@
|
|||||||
<toolTipText value="сбор статистики DVM после запуска"/>
|
<toolTipText value="сбор статистики DVM после запуска"/>
|
||||||
</properties>
|
</properties>
|
||||||
</component>
|
</component>
|
||||||
|
<component id="1f229" class="javax.swing.JCheckBox" binding="cbCube">
|
||||||
|
<constraints>
|
||||||
|
<grid row="4" column="0" row-span="1" col-span="2" vsize-policy="3" hsize-policy="3" anchor="8" fill="0" indent="2" use-parent-layout="false"/>
|
||||||
|
</constraints>
|
||||||
|
<properties>
|
||||||
|
<font name="Times New Roman" size="16" style="2"/>
|
||||||
|
<horizontalAlignment value="0"/>
|
||||||
|
<icon value="Common/icons/NotPick.png"/>
|
||||||
|
<selectedIcon value="Common/icons/Pick.png"/>
|
||||||
|
<text value="кубические решётки"/>
|
||||||
|
<toolTipText value="матрица с одинаковым размером измерений"/>
|
||||||
|
</properties>
|
||||||
|
</component>
|
||||||
</children>
|
</children>
|
||||||
</grid>
|
</grid>
|
||||||
</children>
|
</children>
|
||||||
|
</splitpane>
|
||||||
|
</children>
|
||||||
</grid>
|
</grid>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
@@ -1,23 +1,25 @@
|
|||||||
package _VisualDVM.TestingSystem.DVM.DVMSettings.UI;
|
package _VisualDVM.TestingSystem.DVM.DVMSettings.UI;
|
||||||
import Common.MainModule_;
|
import Common.Database.Objects.DBObject;
|
||||||
import Common.Passes.Pass;
|
import Common.Passes.Pass;
|
||||||
|
import Common.Utils.Utils_;
|
||||||
import Common.Visual.TextField.StyledTextField;
|
import Common.Visual.TextField.StyledTextField;
|
||||||
|
import Common.Visual.UI;
|
||||||
import Common.Visual.Windows.Dialog.DialogFields;
|
import Common.Visual.Windows.Dialog.DialogFields;
|
||||||
import _VisualDVM.Global;
|
import _VisualDVM.Global;
|
||||||
import _VisualDVM.GlobalData.Compiler.Compiler;
|
import _VisualDVM.GlobalData.CompilerOption.Json.OptionsJson;
|
||||||
|
import _VisualDVM.GlobalData.CompilerOption.Json.OptionsSetJson;
|
||||||
|
import _VisualDVM.GlobalData.CompilerOption.OptionsLine;
|
||||||
|
import _VisualDVM.GlobalData.CompilerOption.OptionsLinesSet;
|
||||||
import _VisualDVM.Passes.PassCode;
|
import _VisualDVM.Passes.PassCode;
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.awt.event.ActionEvent;
|
|
||||||
import java.awt.event.ActionListener;
|
|
||||||
public class DVMSettingsFields implements DialogFields {
|
public class DVMSettingsFields implements DialogFields {
|
||||||
public JTextField tfName;
|
public JTextField tfName;
|
||||||
public JSpinner sMinDimProc;
|
public JSpinner sMinDimProc;
|
||||||
public JSpinner sMaxDimProc;
|
public JSpinner sMaxDimProc;
|
||||||
public JSpinner sMaxProc;
|
public JSpinner sMaxProc;
|
||||||
public JCheckBox cbCube;
|
public JCheckBox cbCube;
|
||||||
public JTextField tfFlags;
|
|
||||||
public JTextField tfEnvironments;
|
public JTextField tfEnvironments;
|
||||||
public JCheckBox cbDvmStat;
|
public JCheckBox cbDvmStat;
|
||||||
private JPanel content;
|
private JPanel content;
|
||||||
@@ -25,39 +27,30 @@ public class DVMSettingsFields implements DialogFields {
|
|||||||
public JButton bAddEnvironments;
|
public JButton bAddEnvironments;
|
||||||
public JButton bDeleteFlags;
|
public JButton bDeleteFlags;
|
||||||
public JButton bDeleteEnvironment;
|
public JButton bDeleteEnvironment;
|
||||||
|
private JPanel optionsLinesPanel;
|
||||||
|
private JPanel environmentsLinesPanel;
|
||||||
|
private JSplitPane SC1;
|
||||||
|
private JSplitPane SC2;
|
||||||
|
//
|
||||||
|
public OptionsLinesSet optionsLines;
|
||||||
|
//
|
||||||
|
public void fillOptionsLines(String packed) {
|
||||||
|
optionsLines = new OptionsLinesSet(); //нужен для отображения таблицы, как дб объекты с ключами
|
||||||
|
OptionsSetJson optionsSetJson = packed.isEmpty() ? new OptionsSetJson() : Utils_.gson.fromJson(packed, OptionsSetJson.class);
|
||||||
|
for (OptionsJson optionsJson: optionsSetJson.values) {
|
||||||
|
OptionsLine optionsLine =new OptionsLine(optionsJson);
|
||||||
|
optionsLine.id = optionsLines.maxId++;
|
||||||
|
optionsLines.put(optionsLine.id, optionsLine);
|
||||||
|
}
|
||||||
|
//-
|
||||||
|
optionsLines.mountUI(optionsLinesPanel);
|
||||||
|
optionsLines.ShowUI();
|
||||||
|
}
|
||||||
public DVMSettingsFields() {
|
public DVMSettingsFields() {
|
||||||
sMinDimProc.setModel(new SpinnerNumberModel(1, 0, 128, 1));
|
sMinDimProc.setModel(new SpinnerNumberModel(1, 0, 128, 1));
|
||||||
sMaxDimProc.setModel(new SpinnerNumberModel(1, 0, 128, 1));
|
sMaxDimProc.setModel(new SpinnerNumberModel(1, 0, 128, 1));
|
||||||
sMaxProc.setModel(new SpinnerNumberModel(0, 0, 128, 1));
|
sMaxProc.setModel(new SpinnerNumberModel(0, 0, 128, 1));
|
||||||
bAddFlags.addActionListener(new ActionListener() {
|
//-
|
||||||
@Override
|
|
||||||
public void actionPerformed(ActionEvent e) {
|
|
||||||
Pass pass = Global.mainModule.getPass(PassCode.PickCompilerOptions);
|
|
||||||
if (pass.Do(MainModule_.instance.getDb().getTable(Compiler.class).getUI().getCurrent())) {
|
|
||||||
tfFlags.setText((String) pass.target);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
bAddEnvironments.addActionListener(new ActionListener() {
|
|
||||||
@Override
|
|
||||||
public void actionPerformed(ActionEvent e) {
|
|
||||||
Pass pass = Global.mainModule.getPass(PassCode.PickCompilerEnvironmentsForTesting);
|
|
||||||
if (pass.Do(MainModule_.instance.getDb().getTable(Compiler.class).getUI().getCurrent()))
|
|
||||||
tfEnvironments.setText((String) pass.target);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
bDeleteFlags.addActionListener(new ActionListener() {
|
|
||||||
@Override
|
|
||||||
public void actionPerformed(ActionEvent e) {
|
|
||||||
tfFlags.setText("");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
bDeleteEnvironment.addActionListener(new ActionListener() {
|
|
||||||
@Override
|
|
||||||
public void actionPerformed(ActionEvent e) {
|
|
||||||
tfEnvironments.setText("");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public Component getContent() {
|
public Component getContent() {
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ public class DVMHelpParser {
|
|||||||
//-
|
//-
|
||||||
public static Compiler compiler = null;
|
public static Compiler compiler = null;
|
||||||
public static String[] banned_options = new String[]{
|
public static String[] banned_options = new String[]{
|
||||||
"-o",
|
// "-o", todo убрать
|
||||||
"-c",
|
"-c",
|
||||||
"-f90",
|
"-f90",
|
||||||
"-FI"
|
"-FI"
|
||||||
|
|||||||
Reference in New Issue
Block a user