當前位置: 首頁>>代碼示例>>Java>>正文


Java InvalidDataException類代碼示例

本文整理匯總了Java中com.intellij.openapi.util.InvalidDataException的典型用法代碼示例。如果您正苦於以下問題:Java InvalidDataException類的具體用法?Java InvalidDataException怎麽用?Java InvalidDataException使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


InvalidDataException類屬於com.intellij.openapi.util包,在下文中一共展示了InvalidDataException類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: readExternal

import com.intellij.openapi.util.InvalidDataException; //導入依賴的package包/類
@Override
public void readExternal(Element element) throws InvalidDataException {
  super.readExternal(element);
  String scriptUrl = element.getAttributeValue(SCRIPT_PATH_URL);
  String scriptParams = element.getAttributeValue(SCRIPT_PARAMETERS);
  String scriptOptions = element.getAttributeValue(SCRIPT_OPTIONS);
  String logEvents = element.getAttributeValue(SCRIPT_SHOW_EVENTS);
  if (!StringUtil.isEmpty(scriptUrl)) {
    scriptPath = scriptUrl;
  }
  if (!StringUtil.isEmpty(scriptParams)) {
    scriptParameters = scriptParams;
  }
  if (!StringUtil.isEmpty(scriptOptions)) {
    this.scriptOptions = scriptOptions;
  }
  if (!StringUtil.isEmpty(logEvents)) myShowAppleEvents = "true".equals(logEvents);
}
 
開發者ID:ant-druha,項目名稱:AppleScript-IDEA,代碼行數:19,代碼來源:AppleScriptRunConfiguration.java

示例2: createModule

import com.intellij.openapi.util.InvalidDataException; //導入依賴的package包/類
@NotNull
@Override
public Module createModule(@NotNull ModifiableModuleModel moduleModel)
  throws InvalidDataException, IOException, ModuleWithNameAlreadyExists, JDOMException, ConfigurationException {
  Module baseModule = super.createModule(moduleModel);
  String languageName = myCourse.getLanguageID();
  Language language = Language.findLanguageByID(languageName);
  if (language != null) {
    EduPluginConfigurator configurator = EduPluginConfigurator.INSTANCE.forLanguage(language);
    if (configurator != null) {
      Project project = baseModule.getProject();
      myGenerator.setSelectedCourse(myCourse);
      myGenerator.generateProject(project, project.getBaseDir());
      Course course = StudyTaskManager.getInstance(project).getCourse();
      if (course == null) {
        LOG.info("failed to generate course");
        return baseModule;
      }
      configurator.createCourseModuleContent(moduleModel, project, course, getModuleFileDirectory());
    }
  }
  return baseModule;
}
 
開發者ID:medvector,項目名稱:educational-plugin,代碼行數:24,代碼來源:EduRemoteCourseModuleBuilder.java

示例3: createModule

import com.intellij.openapi.util.InvalidDataException; //導入依賴的package包/類
@NotNull
@Override
public Module createModule(@NotNull ModifiableModuleModel moduleModel) throws InvalidDataException, IOException, ModuleWithNameAlreadyExists, JDOMException, ConfigurationException {
  Module module = super.createModule(moduleModel);
  Course course = myTask.getLesson().getCourse();
  String directory = getModuleFileDirectory();
  if (directory == null) {
    return module;
  }
  VirtualFile moduleDir = VfsUtil.findFileByIoFile(new File(directory), true);
  if (moduleDir == null) {
    return module;
  }
  VirtualFile src = moduleDir.findChild(EduNames.SRC);
  if (src == null) {
    return module;
  }
  createTask(module.getProject(), course, src);
  ModuleRootModificationUtil.addDependency(module, myUtilModule);
  EduIntellijUtils.addJUnit(module);
  return module;
}
 
開發者ID:medvector,項目名稱:educational-plugin,代碼行數:23,代碼來源:EduTaskModuleBuilder.java

示例4: createModule

import com.intellij.openapi.util.InvalidDataException; //導入依賴的package包/類
@NotNull
@Override
public Module createModule(@NotNull ModifiableModuleModel moduleModel)
  throws InvalidDataException, IOException, ModuleWithNameAlreadyExists, JDOMException, ConfigurationException {
  Module baseModule = super.createModule(moduleModel);
  if (mySelectedCourse != null) {
    String languageName = mySelectedCourse.getLanguageID();
    Language language = Language.findLanguageByID(languageName);
    if (language != null) {
      EduPluginConfigurator configurator = EduPluginConfigurator.INSTANCE.forLanguage(language);
      if (configurator != null) {
        myGenerator.setSelectedCourse(mySelectedCourse);
        Project project = baseModule.getProject();
        myGenerator.generateProject(project, project.getBaseDir());
        Course course = StudyTaskManager.getInstance(project).getCourse();
        if (course == null) {
          LOG.info("failed to generate course");
          return baseModule;
        }
        configurator.createCourseModuleContent(moduleModel, project, course, getModuleFileDirectory());
      }
    }
  }
  return baseModule;
}
 
開發者ID:medvector,項目名稱:educational-plugin,代碼行數:26,代碼來源:EduCustomCourseModuleBuilder.java

示例5: createModule

import com.intellij.openapi.util.InvalidDataException; //導入依賴的package包/類
@NotNull
@Override
public Module createModule(@NotNull ModifiableModuleModel moduleModel) throws InvalidDataException, IOException, ModuleWithNameAlreadyExists, JDOMException, ConfigurationException {
  Module baseModule = super.createModule(moduleModel);
  Project project = baseModule.getProject();
  EduProjectGenerator generator = new EduProjectGenerator();
  if (myCourse == null) {
    File courseRoot = StudyUtils.getBundledCourseRoot(DEFAULT_COURSE_NAME, EduKotlinKoansModuleBuilder.class);
    final Course course = generator.addLocalCourse(FileUtil.join(courseRoot.getPath(), DEFAULT_COURSE_NAME));
    if (course == null) {
      LOG.info("Failed to find course " + DEFAULT_COURSE_NAME);
      return baseModule;
    }
  }
  myCourse.setLanguage("kotlin");
  EduModuleBuilderUtils.createCourseFromCourseInfo(moduleModel, project, generator, myCourse, getModuleFileDirectory());
  return baseModule;
}
 
開發者ID:medvector,項目名稱:educational-plugin,代碼行數:19,代碼來源:EduKotlinKoansModuleBuilder.java

示例6: readExternal

import com.intellij.openapi.util.InvalidDataException; //導入依賴的package包/類
@Override
public void readExternal(Element element) throws InvalidDataException {
    super.readExternal(element);

    String name = ProcessingRunSettings.class.getSimpleName();
    Element settingsElement = element.getChild(name);

    if (settingsElement == null) return;

    ProcessingRunSettings deserializedConfig = XmlSerializer.deserialize(settingsElement, ProcessingRunSettings.class);

    runSettings.setModule(deserializedConfig.getModule());
    runSettings.setSketchClass(deserializedConfig.getSketchClass());
    runSettings.setFullscreen(deserializedConfig.isFullscreen());
    runSettings.setHideStopButton(deserializedConfig.isHideStopButton());
    runSettings.setJvmArguments(deserializedConfig.getJvmArguments());
    runSettings.setSketchArguments(deserializedConfig.getSketchArguments());
    runSettings.setWindowBackgroundColor(deserializedConfig.getWindowBackgroundColor());
    runSettings.setStopButtonColor(deserializedConfig.getStopButtonColor());
    runSettings.setSketchOutputPath(deserializedConfig.getSketchOutputPath());
    runSettings.setLocation(deserializedConfig.getLocation());

    readModule(element);
}
 
開發者ID:mistodev,項目名稱:processing-idea,代碼行數:25,代碼來源:ProcessingRunConfiguration.java

示例7: readExternal

import com.intellij.openapi.util.InvalidDataException; //導入依賴的package包/類
@Override
public void readExternal(final Element element) throws InvalidDataException {
    super.readExternal(element);

    final Element fileElement = element.getChild("file");
    if (fileElement != null) {
        this.runFilePath = fileElement.getText();
    }
}
 
開發者ID:ceddy4395,項目名稱:Goal-Intellij-Plugin,代碼行數:10,代碼來源:GoalDebugConfiguration.java

示例8: readExternal

import com.intellij.openapi.util.InvalidDataException; //導入依賴的package包/類
@Override
public void readExternal(Element element) throws InvalidDataException {
  blazeFlags.readExternal(element);
  exeFlags.readExternal(element);
  setNativeDebuggingEnabled(Boolean.parseBoolean(element.getAttributeValue(NATIVE_DEBUG_ATTR)));

  Element deployTargetStatesElement = element.getChild(DEPLOY_TARGET_STATES_TAG);
  if (deployTargetStatesElement != null) {
    deployTargetManager.readExternal(deployTargetStatesElement);
  }

  Element debuggerStatesElement = element.getChild(DEBUGGER_STATES_TAG);
  if (debuggerStatesElement != null) {
    debuggerManager.readExternal(debuggerStatesElement);
  }
}
 
開發者ID:bazelbuild,項目名稱:intellij,代碼行數:17,代碼來源:BlazeAndroidRunConfigurationCommonState.java

示例9: readExternal

import com.intellij.openapi.util.InvalidDataException; //導入依賴的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

示例10: readAndWriteShouldMatch

import com.intellij.openapi.util.InvalidDataException; //導入依賴的package包/類
@Test
public void readAndWriteShouldMatch() throws InvalidDataException, WriteExternalException {
  state.getBlazeFlagsState().setRawFlags(ImmutableList.of("--flag1", "--flag2"));
  state.getExeFlagsState().setRawFlags(ImmutableList.of("--exe1", "--exe2"));
  state.setNativeDebuggingEnabled(true);

  Element element = new Element("test");
  state.writeExternal(element);
  BlazeAndroidRunConfigurationCommonState readState =
      new BlazeAndroidRunConfigurationCommonState(buildSystem().getName(), false);
  readState.readExternal(element);

  assertThat(readState.getBlazeFlagsState().getRawFlags())
      .containsExactly("--flag1", "--flag2")
      .inOrder();
  assertThat(readState.getExeFlagsState().getRawFlags())
      .containsExactly("--exe1", "--exe2")
      .inOrder();
  assertThat(readState.isNativeDebuggingEnabled()).isTrue();
}
 
開發者ID:bazelbuild,項目名稱:intellij,代碼行數:21,代碼來源:BlazeAndroidRunConfigurationCommonStateTest.java

示例11: readExternal

import com.intellij.openapi.util.InvalidDataException; //導入依賴的package包/類
@Override
public void readExternal(Element element) throws InvalidDataException {
  PathMacroManager.getInstance(getProject()).expandPaths(element);
  super.readExternal(element);
  readModule(element);
  vmParams = JDOMExternalizer.readString(element, "vmparams");
  cmdLine = JDOMExternalizer.readString(element, "cmdLine");

  String sPassParentEnviroment = JDOMExternalizer.readString(element, "passParentEnv");
  passParentEnv = StringUtil.isEmpty(sPassParentEnviroment) || Boolean.parseBoolean(sPassParentEnviroment);

  envs.clear();
  JDOMExternalizer.readMap(element, envs, null, "env");

  JavaRunConfigurationExtensionManager.getInstance().readExternal(this, element);

  depsClasspath = !"false".equals(JDOMExternalizer.readString(element, "depsClasspath"));
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:19,代碼來源:MvcRunConfiguration.java

示例12: readExternal

import com.intellij.openapi.util.InvalidDataException; //導入依賴的package包/類
@Override
public void readExternal(Element element) throws InvalidDataException {
  DefaultJDOMExternalizer.readExternal(this, element);
  PATH = FileUtil.toSystemIndependentName(PATH);
  mySchemeName = element.getAttributeValue(NAME_ATTRIBUTE);
  DATE = new Date(Long.parseLong(element.getAttributeValue(ATTRIBUTE_DATE)));
  myRecycled = Boolean.parseBoolean(element.getAttributeValue(ATTRIBUTE_RECYCLED_CHANGELIST));
  //noinspection unchecked
  final List<Element> children = element.getChildren(ELEMENT_BINARY);
  myBinaryFiles = new ArrayList<ShelvedBinaryFile>(children.size());
  for (Element child : children) {
    ShelvedBinaryFile binaryFile = new ShelvedBinaryFile();
    binaryFile.readExternal(child);
    myBinaryFiles.add(binaryFile);
  }
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:17,代碼來源:ShelvedChangeList.java

示例13: doLoadModule

import com.intellij.openapi.util.InvalidDataException; //導入依賴的package包/類
private static Module doLoadModule(@NotNull String path, @NotNull Project project) throws IOException, JDOMException, InvalidDataException {
  Module module;
  AccessToken token = WriteAction.start();
  try {
    module = ModuleManager.getInstance(project).newModule(path + '/' + EclipseProjectFinder.findProjectName(path) + IdeaXml.IML_EXT, StdModuleTypes.JAVA.getId());
  }
  finally {
    token.finish();
  }

  replaceRoot(path, EclipseXml.DOT_CLASSPATH_EXT, project);

  ModifiableRootModel rootModel = ModuleRootManager.getInstance(module).getModifiableModel();
  new EclipseClasspathConverter(module).readClasspath(rootModel);
  token = WriteAction.start();
  try {
    rootModel.commit();
  }
  finally {
    token.finish();
  }
  return module;
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:24,代碼來源:EclipseEmlTest.java

示例14: readExternal

import com.intellij.openapi.util.InvalidDataException; //導入依賴的package包/類
public void readExternal(Element element) throws InvalidDataException {
  super.readExternal(element);

  // filters
  final List children = element.getChildren(FILTER);
  List<String> filters = new ArrayList<String>();
  //noinspection unchecked
  for (Element child : ((Iterable<Element>)children)) {
    filters.add(child.getValue());
  }
  myFilters = filters.isEmpty() ? null : ArrayUtil.toStringArray(filters);

  // suite to merge
  mySuiteToMerge = element.getAttributeValue(MERGE_SUITE);

  if (getRunner() == null) {
    setRunner(CoverageRunner.getInstance(IDEACoverageRunner.class)); //default
  }
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:20,代碼來源:JavaCoverageSuite.java

示例15: loadState

import com.intellij.openapi.util.InvalidDataException; //導入依賴的package包/類
@Override
public void loadState(final Element object) {
  try {
    final List children = object.getChildren(FILTER);
    for (Object child : children) {
      Element filterElement = (Element)child;
      final LogFilter filter = new LogFilter();
      filter.readExternal(filterElement);
      setFilterSelected(filter, Boolean.parseBoolean(filterElement.getAttributeValue(IS_ACTIVE)));
    }
    DefaultJDOMExternalizer.readExternal(this, object);
  }
  catch (InvalidDataException e) {
    LOG.error(e);
  }
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:17,代碼來源:LogConsolePreferences.java


注:本文中的com.intellij.openapi.util.InvalidDataException類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。