промежуточный. внедрение наборов флагов в параметры тестирования двм. сделал добавление и редактирование.
This commit is contained in:
@@ -5,16 +5,18 @@ import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.Compiler.Compiler;
|
||||
import _VisualDVM.GlobalData.Compiler.CompilerType;
|
||||
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.Passes.PassCode;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.util.Vector;
|
||||
public class PickCompilerOptions extends Pass<String> {
|
||||
public class PickCompilerOptions extends Pass<OptionsJson> {
|
||||
Compiler compiler = null;
|
||||
//-
|
||||
@Override
|
||||
protected boolean canStart(Object... args) throws Exception {
|
||||
target = new OptionsJson();
|
||||
if (args[0] == null) {
|
||||
Log.Writeln_("Отсутствует текущий компилятор. Выбор флагов недоступен.");
|
||||
return false;
|
||||
@@ -26,6 +28,11 @@ public class PickCompilerOptions extends Pass<String> {
|
||||
}
|
||||
if (!(compiler.helpLoaded || Global.mainModule.getPass(PassCode.ShowCompilerHelp).Do(compiler, 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) {
|
||||
@Override
|
||||
public void InitFields() {
|
||||
@@ -45,15 +52,15 @@ public class PickCompilerOptions extends Pass<String> {
|
||||
}
|
||||
}
|
||||
};
|
||||
return dialog.ShowDialog("Назначение опций компилятора");
|
||||
return dialog.ShowDialog("");
|
||||
}
|
||||
@Override
|
||||
protected void body() throws Exception {
|
||||
Vector<String> res = new Vector<>();
|
||||
target.values.clear();
|
||||
for (CompilerOption option : compiler.options.Data.values()) {
|
||||
if (option.isSelected())
|
||||
res.add(option.toString());
|
||||
if (option.isSelected()) {
|
||||
target.values.add(new OptionJson(option));
|
||||
}
|
||||
}
|
||||
target = String.join(" ", res);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user