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


Java WriteExternalException类代码示例

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


WriteExternalException类属于com.intellij.openapi.util包,在下文中一共展示了WriteExternalException类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: writeExternal

import com.intellij.openapi.util.WriteExternalException; //导入依赖的package包/类
@Override
public void writeExternal(Element element) throws WriteExternalException {
    Settings settings = new Settings();
    settings.host = this.host;
    settings.port = this.port;
    settings.route = this.route;
    if (this.browser != null)
        settings.browser = this.browser.getId().toString();
    else
        settings.browser = "";

    if (this.interpreter != null)
        settings.interpreterName = this.interpreter.getName();
    else
        settings.interpreterName = "";

    XmlSerializer.serializeInto(settings, element, new SkipDefaultsSerializationFilter());
    super.writeExternal(element);
}
 
开发者ID:3mmarg97,项目名称:LaravelStorm,代码行数:20,代码来源:LaravelRunConf.java

示例2: writeExternal

import com.intellij.openapi.util.WriteExternalException; //导入依赖的package包/类
@Override
public void writeExternal(final Element element) throws WriteExternalException {
    super.writeExternal(element);

    if (this.runFilePath != null) {
        final Element fileElement = new Element("file");
        fileElement.setText(this.runFilePath);
        element.addContent(fileElement);
    }
}
 
开发者ID:ceddy4395,项目名称:Goal-Intellij-Plugin,代码行数:11,代码来源:GoalDebugConfiguration.java

示例3: getState

import com.intellij.openapi.util.WriteExternalException; //导入依赖的package包/类
@Override
public Element getState() {
  final Element component = new Element("component");

  if (hasDefaultValues()) {
    return component;
  }

  try {
    DefaultJDOMExternalizer.writeExternal(this, component);
  }
  catch (WriteExternalException e) {
    LOG.error(e);
  }
  return component;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:NullableNotNullManager.java

示例4: getState

import com.intellij.openapi.util.WriteExternalException; //导入依赖的package包/类
@Override
public Element getState() {
  @NonNls Element element = new Element("LogFilters");
  try {
    for (LogFilter filter : myRegisteredLogFilters.keySet()) {
      Element filterElement = new Element(FILTER);
      filterElement.setAttribute(IS_ACTIVE, myRegisteredLogFilters.get(filter).toString());
      filter.writeExternal(filterElement);
      element.addContent(filterElement);
    }
    DefaultJDOMExternalizer.writeExternal(this, element);
  }
  catch (WriteExternalException e) {
    LOG.error(e);
  }
  return element;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:18,代码来源:LogConsolePreferences.java

示例5: repeatedWriteShouldNotChangeElement

import com.intellij.openapi.util.WriteExternalException; //导入依赖的package包/类
@Test
public void repeatedWriteShouldNotChangeElement() throws WriteExternalException {
  final XMLOutputter xmlOutputter = new XMLOutputter(Format.getCompactFormat());

  state.getBlazeFlagsState().setRawFlags(ImmutableList.of("--flag1", "--flag2"));
  state.getExeFlagsState().setRawFlags(ImmutableList.of("--exe1", "--exe2"));
  state.setNativeDebuggingEnabled(true);

  Element firstWrite = new Element("test");
  state.writeExternal(firstWrite);
  Element secondWrite = firstWrite.clone();
  state.writeExternal(secondWrite);

  assertThat(xmlOutputter.outputString(secondWrite))
      .isEqualTo(xmlOutputter.outputString(firstWrite));
}
 
开发者ID:bazelbuild,项目名称:intellij,代码行数:17,代码来源:BlazeAndroidRunConfigurationCommonStateTest.java

示例6: writeExternal

import com.intellij.openapi.util.WriteExternalException; //导入依赖的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());
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:AbstractPythonRunConfiguration.java

示例7: writeExternal

import com.intellij.openapi.util.WriteExternalException; //导入依赖的package包/类
@Override
public void writeExternal(Element element) throws WriteExternalException {
  blazeFlags.writeExternal(element);
  exeFlags.writeExternal(element);
  element.setAttribute(NATIVE_DEBUG_ATTR, Boolean.toString(nativeDebuggingEnabled));

  element.removeChildren(DEPLOY_TARGET_STATES_TAG);
  Element deployTargetStatesElement = new Element(DEPLOY_TARGET_STATES_TAG);
  deployTargetManager.writeExternal(deployTargetStatesElement);
  element.addContent(deployTargetStatesElement);

  element.removeChildren(DEBUGGER_STATES_TAG);
  Element debuggerStatesElement = new Element(DEBUGGER_STATES_TAG);
  debuggerManager.writeExternal(debuggerStatesElement);
  element.addContent(debuggerStatesElement);
}
 
开发者ID:bazelbuild,项目名称:intellij,代码行数:17,代码来源:BlazeAndroidRunConfigurationCommonState.java

示例8: equalTo

import com.intellij.openapi.util.WriteExternalException; //导入依赖的package包/类
public boolean equalTo(@NotNull ScopeToolState state2) {
  if (isEnabled() != state2.isEnabled()) return false;
  if (getLevel() != state2.getLevel()) return false;
  InspectionToolWrapper toolWrapper = getTool();
  InspectionToolWrapper toolWrapper2 = state2.getTool();
  if (!toolWrapper.isInitialized() && !toolWrapper2.isInitialized()) return true;
  try {
    @NonNls String tempRoot = "root";
    Element oldToolSettings = new Element(tempRoot);
    toolWrapper.getTool().writeSettings(oldToolSettings);
    Element newToolSettings = new Element(tempRoot);
    toolWrapper2.getTool().writeSettings(newToolSettings);
    return JDOMUtil.areElementsEqual(oldToolSettings, newToolSettings);
  }
  catch (WriteExternalException e) {
    LOG.error(e);
  }
  return false;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:20,代码来源:ScopeToolState.java

示例9: writeSettings

import com.intellij.openapi.util.WriteExternalException; //导入依赖的package包/类
@Override
public void writeSettings(@NotNull Element node) throws WriteExternalException {
  DefaultJDOMExternalizer.writeExternal(this, node, new DefaultJDOMExternalizer.JDOMFilter() {
    @Override
    public boolean isAccept(@NotNull Field field) {
      return !Comparing.equal(VARIABLES_NEW, field.getName());
    }
  });

  if (!m_ignoreAnnotatedVariablesNew) {
    final Element option = new Element("option");
    option.setAttribute("name", VARIABLES_NEW);
    option.setAttribute("value", Boolean.toString(m_ignoreAnnotatedVariablesNew));
    node.addContent(option);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:UnnecessaryLocalVariableInspectionBase.java

示例10: writeExternal

import com.intellij.openapi.util.WriteExternalException; //导入依赖的package包/类
@Override
public void writeExternal(Element element) throws WriteExternalException {
  super.writeExternal(element);
  if (target != null) {
    // Target is persisted as a tag to permit multiple targets in the future.
    Element targetElement = new Element(TARGET_TAG);
    targetElement.setText(target.toString());
    element.addContent(targetElement);
  }
  blazeFlags.writeExternal(element);
  exeFlags.writeExternal(element);
  if (pluginSdk != null) {
    element.setAttribute(SDK_ATTR, pluginSdk.getName());
  }
  if (vmParameters != null) {
    element.setAttribute(VM_PARAMS_ATTR, vmParameters);
  }
  if (programParameters != null) {
    element.setAttribute(PROGRAM_PARAMS_ATTR, programParameters);
  }
  if (keepInSync != null) {
    element.setAttribute(KEEP_IN_SYNC_TAG, Boolean.toString(keepInSync));
  }
}
 
开发者ID:bazelbuild,项目名称:intellij,代码行数:25,代码来源:BlazeIntellijPluginConfiguration.java

示例11: writeExternal

import com.intellij.openapi.util.WriteExternalException; //导入依赖的package包/类
@Override
public void writeExternal(final Element element) throws WriteExternalException {
  if (myStoredElement != null) {
    final List attributeList = myStoredElement.getAttributes();
    for (Object anAttributeList : attributeList) {
      final Attribute a = (Attribute) anAttributeList;
      element.setAttribute(a.getName(), a.getValue());
    }

    final List list = myStoredElement.getChildren();
    for (Object child : list) {
      final Element c = (Element) child;
      element.addContent((Element) c.clone());
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:UnknownRunConfiguration.java

示例12: readAndWriteShouldHandleNulls

import com.intellij.openapi.util.WriteExternalException; //导入依赖的package包/类
@Test
public void readAndWriteShouldHandleNulls() throws InvalidDataException, WriteExternalException {
  Element element = new Element("test");
  state.writeExternal(element);
  BlazeAndroidBinaryRunConfigurationState readState =
      new BlazeAndroidBinaryRunConfigurationState(buildSystem().getName());
  readState.readExternal(element);

  BlazeAndroidRunConfigurationCommonState commonState = state.getCommonState();
  BlazeAndroidRunConfigurationCommonState readCommonState = readState.getCommonState();
  assertThat(readCommonState.getBlazeFlagsState().getRawFlags())
      .isEqualTo(commonState.getBlazeFlagsState().getRawFlags());
  assertThat(readCommonState.isNativeDebuggingEnabled())
      .isEqualTo(commonState.isNativeDebuggingEnabled());

  assertThat(readState.getActivityClass()).isEqualTo(state.getActivityClass());
  assertThat(readState.getMode()).isEqualTo(state.getMode());
  assertThat(readState.getLaunchMethod()).isEqualTo(state.getLaunchMethod());
  assertThat(readState.useSplitApksIfPossible()).isEqualTo(state.useSplitApksIfPossible());
  assertThat(readState.useWorkProfileIfPresent()).isEqualTo(state.useWorkProfileIfPresent());
  assertThat(readState.getUserId()).isEqualTo(state.getUserId());
  assertThat(readState.getDeepLink()).isEqualTo(state.getDeepLink());
}
 
开发者ID:bazelbuild,项目名称:intellij,代码行数:24,代码来源:BlazeAndroidBinaryRunConfigurationStateTest.java

示例13: writeExternal

import com.intellij.openapi.util.WriteExternalException; //导入依赖的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));
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:26,代码来源:RunConfigurationBase.java

示例14: writeExternal

import com.intellij.openapi.util.WriteExternalException; //导入依赖的package包/类
@Override
public void writeExternal(Element element) throws WriteExternalException {
  super.writeExternal(element);
  if (!StringUtil.isEmpty(scriptPath)) {
    element.setAttribute(SCRIPT_PATH_URL, scriptPath);
  }
  if (!StringUtil.isEmpty(scriptParameters)) {
    element.setAttribute(SCRIPT_PARAMETERS, scriptParameters);
  }
  if (!StringUtil.isEmpty(scriptOptions)) {
    element.setAttribute(SCRIPT_OPTIONS, scriptOptions);
  }
  element.setAttribute(SCRIPT_SHOW_EVENTS, myShowAppleEvents ? "true" : "false");
}
 
开发者ID:ant-druha,项目名称:AppleScript-IDEA,代码行数:15,代码来源:AppleScriptRunConfiguration.java

示例15: writeExternal

import com.intellij.openapi.util.WriteExternalException; //导入依赖的package包/类
@Override
    public void writeExternal(Element element) throws WriteExternalException {
        super.writeExternal(element);

        TomcatInfoConfigs.getInstance(getProject()).setCurrent(tomcatInfo);
//        JDOMExternalizerUtil.writeField(element, "TOMCAT_INSTALLATION", tomcatInstallation);
        JDOMExternalizerUtil.writeField(element, "DOC_BASE", docBase);
        JDOMExternalizerUtil.writeField(element, "CONTEXT_PATH", contextPath);
        JDOMExternalizerUtil.writeField(element, "TOMCAT_PORT", port);
        JDOMExternalizerUtil.writeField(element, "VM_OPTIONS", vmOptions);

    }
 
开发者ID:zengkid,项目名称:SmartTomcat,代码行数:13,代码来源:TomcatRunConfiguration.java


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