41 lines
1.8 KiB
Java
41 lines
1.8 KiB
Java
|
|
package _VisualDVM.ServerObjectsCache;
|
||
|
|
import Common.Utils.Utils_;
|
||
|
|
import _VisualDVM.GlobalData.CompilerEnvironment.Json.EnvironmentsJson;
|
||
|
|
import _VisualDVM.GlobalData.CompilerEnvironment.Json.EnvironmentsSetJson;
|
||
|
|
import _VisualDVM.GlobalData.CompilerOption.Json.OptionsJson;
|
||
|
|
import _VisualDVM.GlobalData.CompilerOption.Json.OptionsSetJson;
|
||
|
|
import _VisualDVM.TestingSystem.DVM.DVMSettings.DVMSettings;
|
||
|
|
|
||
|
|
import java.util.Vector;
|
||
|
|
public class DVMSettingsCache extends VisualCache {
|
||
|
|
public OptionsSetJson optionsSetJson=null;
|
||
|
|
public EnvironmentsSetJson environmentsSetJson=null;
|
||
|
|
//--
|
||
|
|
public String optionsSummary = null;
|
||
|
|
public String environmentsSummary = null;
|
||
|
|
//--
|
||
|
|
public DVMSettingsCache(DVMSettings dvmSettings) {
|
||
|
|
//-->>
|
||
|
|
if (dvmSettings.packedCompilationOptionsJson.isEmpty())
|
||
|
|
optionsSetJson = new OptionsSetJson();
|
||
|
|
else
|
||
|
|
optionsSetJson = Utils_.gson.fromJson(dvmSettings.packedCompilationOptionsJson, OptionsSetJson.class);
|
||
|
|
//-->>
|
||
|
|
if (dvmSettings.packedRunEnvironmentValuesJson.isEmpty())
|
||
|
|
environmentsSetJson = new EnvironmentsSetJson();
|
||
|
|
else
|
||
|
|
environmentsSetJson = Utils_.gson.fromJson(dvmSettings.packedRunEnvironmentValuesJson, EnvironmentsSetJson.class);
|
||
|
|
//--
|
||
|
|
Vector<String> optionsSummary_=new Vector<>();
|
||
|
|
for (OptionsJson optionsJson: optionsSetJson.values){
|
||
|
|
optionsSummary_.add(optionsJson.toLine());
|
||
|
|
}
|
||
|
|
optionsSummary = String.join("\n", optionsSummary_);
|
||
|
|
Vector<String> environmentsSummary_ = new Vector<>();
|
||
|
|
for (EnvironmentsJson environmentsJson: environmentsSetJson.values){
|
||
|
|
environmentsSummary_.add(environmentsJson.toLine());
|
||
|
|
}
|
||
|
|
environmentsSummary = String.join("\n", environmentsSummary_);
|
||
|
|
}
|
||
|
|
}
|