本文整理汇总了Java中com.intellij.openapi.util.JDOMExternalizerUtil类的典型用法代码示例。如果您正苦于以下问题:Java JDOMExternalizerUtil类的具体用法?Java JDOMExternalizerUtil怎么用?Java JDOMExternalizerUtil使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
JDOMExternalizerUtil类属于com.intellij.openapi.util包,在下文中一共展示了JDOMExternalizerUtil类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: readExternal
import com.intellij.openapi.util.JDOMExternalizerUtil; //导入依赖的package包/类
@Override
public void readExternal(Element element) throws InvalidDataException
{
super.readExternal(element);
this.weaveHome = JDOMExternalizerUtil.readField(element, WEAVE_HOME_FIELD);
this.weaveFile = JDOMExternalizerUtil.readField(element, WEAVE_FILE);
this.weaveOutput = JDOMExternalizerUtil.readField(element, WEAVE_OUTPUT);
final List<Element> children = element.getChildren(WEAVE_INPUT);
this.weaveInputs = new ArrayList<>();
for (Element child : children)
{
final WeaveInput weaveInput = new WeaveInput();
weaveInput.readExternal(child);
weaveInputs.add(weaveInput);
}
getConfigurationModule().readExternal(element);
}
示例2: writeExternal
import com.intellij.openapi.util.JDOMExternalizerUtil; //导入依赖的package包/类
@Override
public void writeExternal(Element element) throws WriteExternalException {
super.writeExternal(element);
// common config
JDOMExternalizerUtil.writeField(element, "INTERPRETER_OPTIONS", interpreterOptions);
JDOMExternalizerUtil.writeField(element, "INTERPRETER_PATH", interpreterPath);
JDOMExternalizerUtil.writeField(element, "WORKING_DIRECTORY", workingDirectory);
JDOMExternalizerUtil.writeField(element, "PARENT_ENVS", Boolean.toString(passParentEnvs));
JDOMExternalizerUtil.writeField(element, "ALTERNATE_INTERPRETER", Boolean.toString(overrideSDK));
EnvironmentVariablesComponent.writeExternal(element, envs);
// ???
getConfigurationModule().writeExternal(element);
// run config
JDOMExternalizerUtil.writeField(element, "SCRIPT_NAME", scriptName);
JDOMExternalizerUtil.writeField(element, "PARAMETERS", scriptParameters);
}
示例3: writeExternal
import com.intellij.openapi.util.JDOMExternalizerUtil; //导入依赖的package包/类
@Override
public void writeExternal(Element element) throws WriteExternalException {
JDOMExternalizerUtil.addChildren(element, LOG_FILE, myLogFiles);
JDOMExternalizerUtil.addChildren(element, PREDEFINED_LOG_FILE_ELEMENT, myPredefinedLogFiles);
if (myFileOutputPath != null || mySaveOutput) {
Element fileOutputPathElement = new Element(FILE_OUTPUT);
if (myFileOutputPath != null) {
fileOutputPathElement.setAttribute(OUTPUT_FILE, myFileOutputPath);
}
if (mySaveOutput) {
fileOutputPathElement.setAttribute(SAVE, String.valueOf(mySaveOutput));
}
element.addContent(fileOutputPathElement);
}
if (!isNewSerializationUsed()) {
if (myShowConsoleOnStdOut) {//default value shouldn't be written
element.setAttribute(SHOW_CONSOLE_ON_STD_OUT, String.valueOf(true));
}
if (myShowConsoleOnStdErr) {//default value shouldn't be written
element.setAttribute(SHOW_CONSOLE_ON_STD_ERR, String.valueOf(true));
}
}
}
示例4: readExternal
import com.intellij.openapi.util.JDOMExternalizerUtil; //导入依赖的package包/类
@Override
public void readExternal(Element element) throws InvalidDataException {
super.readExternal(element);
myScriptName = JDOMExternalizerUtil.readField(element, "SCRIPT_NAME");
myClassName = JDOMExternalizerUtil.readField(element, "CLASS_NAME");
myMethodName = JDOMExternalizerUtil.readField(element, "METHOD_NAME");
myFolderName = JDOMExternalizerUtil.readField(element, "FOLDER_NAME");
myPattern = JDOMExternalizerUtil.readField(element, "PATTERN");
usePattern = Boolean.parseBoolean(JDOMExternalizerUtil.readField(element, "USE_PATTERN"));
try {
final String testType = JDOMExternalizerUtil.readField(element, "TEST_TYPE");
myTestType = testType != null ? TestType.valueOf(testType) : TestType.TEST_SCRIPT;
}
catch (IllegalArgumentException e) {
myTestType = TestType.TEST_SCRIPT; // safe default
}
}
示例5: readExternal
import com.intellij.openapi.util.JDOMExternalizerUtil; //导入依赖的package包/类
public void readExternal(Element element) throws InvalidDataException {
super.readExternal(element);
myInterpreterOptions = JDOMExternalizerUtil.readField(element, "INTERPRETER_OPTIONS");
readEnvs(element);
mySdkHome = JDOMExternalizerUtil.readField(element, "SDK_HOME");
myWorkingDirectory = JDOMExternalizerUtil.readField(element, "WORKING_DIRECTORY");
myUseModuleSdk = Boolean.parseBoolean(JDOMExternalizerUtil.readField(element, "IS_MODULE_SDK"));
final String addContentRoots = JDOMExternalizerUtil.readField(element, "ADD_CONTENT_ROOTS");
myAddContentRoots = addContentRoots == null || Boolean.parseBoolean(addContentRoots);
final String addSourceRoots = JDOMExternalizerUtil.readField(element, "ADD_SOURCE_ROOTS");
myAddSourceRoots = addSourceRoots == null || Boolean.parseBoolean(addSourceRoots);
getConfigurationModule().readExternal(element);
setMappingSettings(PathMappingSettings.readExternal(element));
// extension settings:
PythonRunConfigurationExtensionsManager.getInstance().readExternal(this, element);
}
示例6: writeExternal
import com.intellij.openapi.util.JDOMExternalizerUtil; //导入依赖的package包/类
public void writeExternal(Element element) throws WriteExternalException {
super.writeExternal(element);
JDOMExternalizerUtil.writeField(element, "INTERPRETER_OPTIONS", myInterpreterOptions);
writeEnvs(element);
JDOMExternalizerUtil.writeField(element, "SDK_HOME", mySdkHome);
JDOMExternalizerUtil.writeField(element, "WORKING_DIRECTORY", myWorkingDirectory);
JDOMExternalizerUtil.writeField(element, "IS_MODULE_SDK", Boolean.toString(myUseModuleSdk));
JDOMExternalizerUtil.writeField(element, "ADD_CONTENT_ROOTS", Boolean.toString(myAddContentRoots));
JDOMExternalizerUtil.writeField(element, "ADD_SOURCE_ROOTS", Boolean.toString(myAddSourceRoots));
getConfigurationModule().writeExternal(element);
// extension settings:
PythonRunConfigurationExtensionsManager.getInstance().writeExternal(this, element);
PathMappingSettings.writeExternal(element, getMappingSettings());
}
示例7: loadExtension
import com.intellij.openapi.util.JDOMExternalizerUtil; //导入依赖的package包/类
@Override
public void loadExtension(@NotNull JpsGlobal global, @NotNull Element componentTag) {
final JpsIntelliLangConfigurationImpl configuration = new JpsIntelliLangConfigurationImpl();
final String annotationName = JDOMExternalizerUtil.readField(componentTag, PATTERN_ANNOTATION_NAME);
if (annotationName != null) {
configuration.setPatternAnnotationClassName(annotationName);
}
final String instrumentationType = JDOMExternalizerUtil.readField(componentTag, INSTRUMENTATION_TYPE_NAME);
if (instrumentationType != null) {
try {
final InstrumentationType type = InstrumentationType.valueOf(instrumentationType);
configuration.setInstrumentationType(type);
}
catch (IllegalArgumentException ignored) {
LOG.info(ignored);
}
}
JpsIntelliLangExtensionService.getInstance().setConfiguration(global, configuration);
}
示例8: readExternal
import com.intellij.openapi.util.JDOMExternalizerUtil; //导入依赖的package包/类
@Override
public void readExternal(Element element) throws InvalidDataException {
PathMacroManager.getInstance(getProject()).expandPaths(element);
super.readExternal(element);
DefaultJDOMExternalizer.readExternal(this, element);
readModule(element);
EnvironmentVariablesComponent.readExternal(element, getEnvs());
// common config
workingDirectory = JDOMExternalizerUtil.readField(element, "WORKING_DIRECTORY");
String parentEnvValue = JDOMExternalizerUtil.readField(element, "PARENT_ENVS");
if (parentEnvValue != null) {
setPassParentEnvs(Boolean.parseBoolean(parentEnvValue));
}
// run config
scriptName = JDOMExternalizerUtil.readField(element, "SCRIPT_NAME");
setProgramParameters(JDOMExternalizerUtil.readField(element, "PARAMETERS"));
}
示例9: writeExternal
import com.intellij.openapi.util.JDOMExternalizerUtil; //导入依赖的package包/类
@Override
public void writeExternal(Element element) throws WriteExternalException {
super.writeExternal(element);
// common config
JDOMExternalizerUtil.writeField(element, "WORKING_DIRECTORY", workingDirectory);
JDOMExternalizerUtil.writeField(element, "PARENT_ENVS", Boolean.toString(isPassParentEnvs()));
// run config
JDOMExternalizerUtil.writeField(element, "SCRIPT_NAME", scriptName);
JDOMExternalizerUtil.writeField(element, "PARAMETERS", getProgramParameters());
//JavaRunConfigurationExtensionManager.getInstance().writeExternal(this, element);
DefaultJDOMExternalizer.writeExternal(this, element);
writeModule(element);
EnvironmentVariablesComponent.writeExternal(element, getEnvs());
PathMacroManager.getInstance(getProject()).collapsePathsRecursively(element);
}
示例10: readExternal
import com.intellij.openapi.util.JDOMExternalizerUtil; //导入依赖的package包/类
@Override
public void readExternal(@NotNull Element element) throws InvalidDataException {
super.readExternal(element);
suggestedName = JDOMExternalizerUtil.readField(element, "SUGGESTED_NAME");
actionName = JDOMExternalizerUtil.readField(element, "ACTION_NAME");
runTest = Boolean.parseBoolean(JDOMExternalizerUtil.readField(element, "RUN_TEST"));
testTargets = JDOMExternalizerUtil.readField(element, "TEST_TARGETS");
runFailed = Boolean.parseBoolean(JDOMExternalizerUtil.readField(element, "RUN_FAILED"));
xunitXML = JDOMExternalizerUtil.readField(element, "XUNIT_XML");
useOptions = Boolean.parseBoolean(JDOMExternalizerUtil.readField(element, "USE_OPTIONS"));
options = JDOMExternalizerUtil.readField(element, "OPTIONS");
useVariables = Boolean.parseBoolean(JDOMExternalizerUtil.readField(element, "USE_VARIABLES"));
variables = JDOMExternalizerUtil.readField(element, "VARIABLES");
verbose = Boolean.parseBoolean(JDOMExternalizerUtil.readField(element, "VERBOSE"));
disableScreenshot = Boolean.parseBoolean(JDOMExternalizerUtil.readField(element, "DISABLE_SCREENSHOT"));
}
示例11: writeExternal
import com.intellij.openapi.util.JDOMExternalizerUtil; //导入依赖的package包/类
@Override
public void writeExternal(@NotNull Element element) throws WriteExternalException {
super.writeExternal(element);
JDOMExternalizerUtil.writeField(element, "SUGGESTED_NAME", suggestedName);
JDOMExternalizerUtil.writeField(element, "ACTION_NAME", actionName);
JDOMExternalizerUtil.writeField(element, "RUN_TEST", String.valueOf(runTest));
JDOMExternalizerUtil.writeField(element, "TEST_TARGETS", testTargets);
JDOMExternalizerUtil.writeField(element, "RUN_FAILED", String.valueOf(runFailed));
JDOMExternalizerUtil.writeField(element, "XUNIT_XML", xunitXML);
JDOMExternalizerUtil.writeField(element, "USE_OPTIONS", String.valueOf(useOptions));
JDOMExternalizerUtil.writeField(element, "OPTIONS", options);
JDOMExternalizerUtil.writeField(element, "USE_VARIABLES", String.valueOf(useVariables));
JDOMExternalizerUtil.writeField(element, "VARIABLES", variables);
JDOMExternalizerUtil.writeField(element, "VERBOSE", String.valueOf(verbose));
JDOMExternalizerUtil.writeField(element, "DISABLE_SCREENSHOT", String.valueOf(disableScreenshot));
}
示例12: readExternal
import com.intellij.openapi.util.JDOMExternalizerUtil; //导入依赖的package包/类
@Override
public void readExternal(Element element) throws InvalidDataException {
super.readExternal(element);
readModule(element);
moduleName = JDOMExternalizerUtil.readField(element, "moduleName");
String targetTypeStr = JDOMExternalizerUtil.readField(element, "targetType");
targetType = targetTypeStr.length() == 0? null: TargetType.valueOf(targetTypeStr);
String deviceArchStr = JDOMExternalizerUtil.readField(element, "deviceArch");
deviceArch = deviceArchStr.length() == 0? null: Arch.valueOf(deviceArchStr);
signingIdentity = JDOMExternalizerUtil.readField(element, "signingIdentity");
provisioningProfile = JDOMExternalizerUtil.readField(element, "provisioningProfile");
String simArchStr = JDOMExternalizerUtil.readField(element, "simArch");
simArch = simArchStr.length() == 0? null: Arch.valueOf(simArchStr);
simulatorName = JDOMExternalizerUtil.readField(element, "simulatorName");
arguments = JDOMExternalizerUtil.readField(element, "arguments");
if(arguments == null) arguments = "";
workingDir = JDOMExternalizerUtil.readField(element, "workingDir");
if(workingDir == null) workingDir = "";
}
示例13: writeExternal
import com.intellij.openapi.util.JDOMExternalizerUtil; //导入依赖的package包/类
@Override
public void writeExternal(Element element) throws WriteExternalException {
super.writeExternal(element);
setModuleName(moduleName);
writeModule(element);
JDOMExternalizerUtil.writeField(element, "moduleName", moduleName);
JDOMExternalizerUtil.writeField(element, "targetType", targetType == null? null: targetType.toString());
JDOMExternalizerUtil.writeField(element, "deviceArch", deviceArch == null? null: deviceArch.toString());
JDOMExternalizerUtil.writeField(element, "signingIdentity", signingIdentity);
JDOMExternalizerUtil.writeField(element, "provisioningProfile", provisioningProfile);
JDOMExternalizerUtil.writeField(element, "simArch", simArch == null? null: simArch.toString());
JDOMExternalizerUtil.writeField(element, "simulatorName", simulatorName);
JDOMExternalizerUtil.writeField(element, "arguments", arguments == null? "": arguments);
JDOMExternalizerUtil.writeField(element, "workingDir", workingDir == null? "": workingDir);
}
示例14: writeExternal
import com.intellij.openapi.util.JDOMExternalizerUtil; //导入依赖的package包/类
@Override
public void writeExternal(@NotNull final Element element) throws WriteExternalException {
super.writeExternal(element);
if (myMLFile != null) {
final String mlFilePath = FileUtil.toSystemIndependentName(myMLFile.getPath());
JDOMExternalizerUtil.writeField(element, "ocamlModule", mlFilePath);
}
JDOMExternalizerUtil.writeField(element, "programParams", myProgramParams);
JDOMExternalizerUtil.writeField(element, "useModuleSdk", String.valueOf(myIsUsedModuleSdk));
writeModule(element);
if (mySpecifiedSdk != null) {
final String sdkHomePath = FileUtil.toSystemIndependentName(mySpecifiedSdk.getHomePath());
JDOMExternalizerUtil.writeField(element, "specifiedSdkHome", sdkHomePath);
}
JDOMExternalizerUtil.writeField(element, "compilerOptions", myCompilerOptions);
JDOMExternalizerUtil.writeField(element, "linkerOptions", myLinkerOptions);
JDOMExternalizerUtil.writeField(element, "runnerOptions", myRunnerOptions);
JDOMExternalizerUtil.writeField(element, "workingDirectory", FileUtil.toSystemIndependentName(myWorkingDirectory));
}
示例15: writeExternal
import com.intellij.openapi.util.JDOMExternalizerUtil; //导入依赖的package包/类
@Override
public void writeExternal(Element element) throws WriteExternalException
{
super.writeExternal(element);
// common config
JDOMExternalizerUtil.writeField(element, "INTERPRETER_OPTIONS", interpreterOptions);
JDOMExternalizerUtil.writeField(element, "INTERPRETER_PATH", interpreterPath);
JDOMExternalizerUtil.writeField(element, "WORKING_DIRECTORY", workingDirectory);
JDOMExternalizerUtil.writeField(element, "PARENT_ENVS", Boolean.toString(passParentEnvs));
JDOMExternalizerUtil.writeField(element, "ALTERNATE_INTERPRETER", Boolean.toString(overrideSDK));
EnvironmentVariablesComponent.writeExternal(element, envs);
// ???
getConfigurationModule().writeExternal(element);
// run config
JDOMExternalizerUtil.writeField(element, "SCRIPT_NAME", scriptName);
JDOMExternalizerUtil.writeField(element, "PARAMETERS", scriptParameters);
}