本文整理匯總了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);
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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);
}
示例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();
}
}
示例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);
}
}
示例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);
}
示例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();
}
示例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"));
}
示例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);
}
}
示例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;
}
示例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
}
}
示例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);
}
}