当前位置: 首页>>代码示例>>Java>>正文


Java JDOMExternalizerUtil.readField方法代码示例

本文整理汇总了Java中com.intellij.openapi.util.JDOMExternalizerUtil.readField方法的典型用法代码示例。如果您正苦于以下问题:Java JDOMExternalizerUtil.readField方法的具体用法?Java JDOMExternalizerUtil.readField怎么用?Java JDOMExternalizerUtil.readField使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.intellij.openapi.util.JDOMExternalizerUtil的用法示例。


在下文中一共展示了JDOMExternalizerUtil.readField方法的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);
}
 
开发者ID:machaval,项目名称:mule-intellij-plugins,代码行数:18,代码来源:WeaveConfiguration.java

示例2: 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);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:23,代码来源:JpsIntelliLangConfigurationSerializer.java

示例3: 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
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:20,代码来源:AbstractPythonTestRunConfiguration.java

示例4: 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);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:18,代码来源:AbstractPythonRunConfiguration.java

示例5: 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"));
}
 
开发者ID:shvetsgroup,项目名称:squirrel-lang-idea-plugin,代码行数:22,代码来源:SquirrelRunConfiguration.java

示例6: 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"));
}
 
开发者ID:KarlGong,项目名称:ptest-pycharm-plugin,代码行数:18,代码来源:PTestRunConfiguration.java

示例7: 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 = "";
}
 
开发者ID:robovm,项目名称:robovm-idea,代码行数:21,代码来源:RoboVmRunConfiguration.java

示例8: readTextWithImports

import com.intellij.openapi.util.JDOMExternalizerUtil; //导入方法依赖的package包/类
@Override
public TextWithImports readTextWithImports(Element root, String name)
{
	String s = JDOMExternalizerUtil.readField(root, name);
	if(s != null)
	{
		return new TextWithImportsImpl(CodeFragmentKind.EXPRESSION, s);
	}
	else
	{
		Element option = JDOMExternalizerUtil.getOption(root, name);
		if(option != null)
		{
			XExpressionState state = new XExpressionState();
			XmlSerializer.deserializeInto(state, option);
			return TextWithImportsImpl.fromXExpression(state.toXExpression());
		}
	}
	return null;
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:21,代码来源:DebuggerUtilsImpl.java

示例9: readExternal

import com.intellij.openapi.util.JDOMExternalizerUtil; //导入方法依赖的package包/类
@Override
    public void readExternal(Element element) throws InvalidDataException {
        super.readExternal(element);
        this.tomcatInfo = TomcatInfoConfigs.getInstance(getProject()).getCurrent();
//        this.tomcatInstallation = PropertiesComponent.getInstance().getValue("TOMCAT_INSTALLATION");
//        this.tomcatInstallation = JDOMExternalizerUtil.readField(element, "TOMCAT_INSTALLATION");
        this.docBase = JDOMExternalizerUtil.readField(element, "DOC_BASE");
        this.contextPath = JDOMExternalizerUtil.readField(element, "CONTEXT_PATH");
        this.port = JDOMExternalizerUtil.readField(element, "TOMCAT_PORT");
        this.vmOptions = JDOMExternalizerUtil.readField(element, "VM_OPTIONS");
    }
 
开发者ID:zengkid,项目名称:SmartTomcat,代码行数:12,代码来源:TomcatRunConfiguration.java

示例10: readExternal

import com.intellij.openapi.util.JDOMExternalizerUtil; //导入方法依赖的package包/类
@Override
public void readExternal(Element element) throws InvalidDataException
{
    super.readExternal(element);
    this.vmArgs = JDOMExternalizerUtil.readField(element, VM_ARGS_FIELD);
    this.muleHome = JDOMExternalizerUtil.readField(element, MULE_HOME_FIELD);
    this.clearData = JDOMExternalizerUtil.readField(element, CLEAR_DATA_FIELD);

    getConfigurationModule().readExternal(element);
}
 
开发者ID:machaval,项目名称:mule-intellij-plugins,代码行数:11,代码来源:MuleConfiguration.java

示例11: readExternal

import com.intellij.openapi.util.JDOMExternalizerUtil; //导入方法依赖的package包/类
@Override
public void readExternal(Element element) throws InvalidDataException {
    super.readExternal(element);

    // common config
    interpreterOptions = JDOMExternalizerUtil.readField(element, "INTERPRETER_OPTIONS");
    interpreterPath = JDOMExternalizerUtil.readField(element, "INTERPRETER_PATH");
    if (getProject().getBasePath() != null)
        workingDirectory = JDOMExternalizerUtil.readField(element, "WORKING_DIRECTORY", getProject().getBasePath());
    
    String str = JDOMExternalizerUtil.readField(element, "PARENT_ENVS");
    if (str != null) {
        passParentEnvs = Boolean.parseBoolean(str);
    }
    str = JDOMExternalizerUtil.readField(element, "ALTERNATE_INTERPRETER");
    if (str != null) {
        overrideSDK = Boolean.parseBoolean(str);
    }
    EnvironmentVariablesComponent.readExternal(element, envs);

    // ???
    getConfigurationModule().readExternal(element);

    // run config
    scriptName = JDOMExternalizerUtil.readField(element, "SCRIPT_NAME");

    scriptParameters = JDOMExternalizerUtil.readField(element, "PARAMETERS");
}
 
开发者ID:internetisalie,项目名称:lua-for-idea,代码行数:29,代码来源:LuaRunConfiguration.java

示例12: readExternal

import com.intellij.openapi.util.JDOMExternalizerUtil; //导入方法依赖的package包/类
@Override
public void readExternal(Element element) throws InvalidDataException {
    super.readExternal(element);
    // Reads the conf file into this class

    String locations = JDOMExternalizerUtil.readField(element, MODULES_FIELD);
    if (locations != null) {
        tomcatModules = (Modules) GSON.fromJson(locations, Modules.class);
    }
    this.tomcatInstallation = JDOMExternalizerUtil.readField(element, TOMCAT_PATH_FIELD);
    this.vmArgs = JDOMExternalizerUtil.readField(element, VM_ARGS_FIELD);
    String passParentEnvironmentVariablesValue = JDOMExternalizerUtil.readField(element, PASS_PARENT_ENV_VARS_FIELD);
    this.passParentEnvironmentVariables = Boolean.valueOf(passParentEnvironmentVariablesValue);
    EnvironmentVariablesComponent.readExternal(element, this.environmentVariables);
}
 
开发者ID:vitorzachi,项目名称:tomcat-runner,代码行数:16,代码来源:TomcatRunnerConfiguration.java

示例13: loadProperties

import com.intellij.openapi.util.JDOMExternalizerUtil; //导入方法依赖的package包/类
@NotNull
@Override
public JpsSimpleElement<JpsIdeaSdkProperties> loadProperties(@Nullable Element propertiesElement) {
  String sandboxHome = null;
  String jdkName = null;
  if (propertiesElement != null) {
    sandboxHome = JDOMExternalizerUtil.readField(propertiesElement, SANDBOX_HOME_FIELD);
    jdkName = propertiesElement.getAttributeValue(JDK_NAME_ATTRIBUTE);
  }
  return JpsElementFactory.getInstance().createSimpleElement(new JpsIdeaSdkProperties(sandboxHome, jdkName));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:12,代码来源:JpsDevKitModelSerializerExtension.java

示例14: loadExtension

import com.intellij.openapi.util.JDOMExternalizerUtil; //导入方法依赖的package包/类
@Override
public void loadExtension(@NotNull JpsProject project, @NotNull Element componentTag) {
  JpsJavaCompilerConfiguration configuration = JpsJavaExtensionService.getInstance().getOrCreateCompilerConfiguration(project);
  String assertNotNull = JDOMExternalizerUtil.readField(componentTag, "ASSERT_NOT_NULL");
  if (assertNotNull != null) {
    configuration.setAddNotNullAssertions(Boolean.parseBoolean(assertNotNull));
  }
  String clearOutputDirectory = JDOMExternalizerUtil.readField(componentTag, "CLEAR_OUTPUT_DIRECTORY");
  configuration.setClearOutputDirectoryOnRebuild(clearOutputDirectory == null || Boolean.parseBoolean(clearOutputDirectory));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:JpsJavaCompilerWorkspaceConfigurationSerializer.java

示例15: readExternal

import com.intellij.openapi.util.JDOMExternalizerUtil; //导入方法依赖的package包/类
@SuppressWarnings({"HardCodedStringLiteral"})
public void readExternal(Element element) throws InvalidDataException {
  super.readExternal(element);
  final String value = JDOMExternalizerUtil.readField(element, "USE_CLASS_FILTERS");
  USE_CLASS_FILTERS = "true".equalsIgnoreCase(value);
  myClassFilters = DebuggerUtilsEx.readFilters(element.getChildren("filter"));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:8,代码来源:ToStringRenderer.java


注:本文中的com.intellij.openapi.util.JDOMExternalizerUtil.readField方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。