mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
EclipseImlTest — fix test data
This commit is contained in:
@@ -1,111 +1,109 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<root inherit-compiler-output="false">
|
||||
<output url="file://$MODULE_DIR$/bin" />
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src-props-1" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src-props-2" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/test" isTestSource="false" />
|
||||
</content>
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="module-library" exported="">
|
||||
<library name="lib-1">
|
||||
<CLASSES>
|
||||
<root url="file://$MODULE_DIR$/lib-1/copy-every/lib-1" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="file://$MODULE_DIR$/lib-1/copy-every/doc/api" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="file://$MODULE_DIR$/lib-1/copy-every/src" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library" exported="">
|
||||
<library name="lib-2">
|
||||
<CLASSES>
|
||||
<root url="file://$MODULE_DIR$/../ws-internals/lib-2/copy-every/lib-2" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MODULE_DIR$/../ws-internals/lib-2/jar-all-2.zip!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="file://$MODULE_DIR$/../ws-internals/lib-2/copy-every/src" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library" exported="">
|
||||
<library name="lib-3">
|
||||
<CLASSES>
|
||||
<root url="file://$MODULE_DIR$/../../eclipse-externals/lib-3/copy-every/lib-3" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="http://open-space.org" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="file://$MODULE_DIR$/../../eclipse-externals/lib-3/copy-every/src" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library" exported="">
|
||||
<library name="lib-4.jar">
|
||||
<CLASSES>
|
||||
<root url="jar://$MODULE_DIR$/lib-4/jar-every/lib-4.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MODULE_DIR$/lib-4/jar-every/apidoc.zip!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MODULE_DIR$/lib-4/jar-every/src.zip!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library" exported="">
|
||||
<library name="lib-5.jar">
|
||||
<CLASSES>
|
||||
<root url="jar://$MODULE_DIR$/../ws-internals/lib-5/jar-every/lib-5.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MODULE_DIR$/../ws-internals/lib-5/jar-all-5.zip!/doc/api" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MODULE_DIR$/../ws-internals/lib-5/jar-every/src.zip!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library" exported="">
|
||||
<library name="lib-6.jar">
|
||||
<CLASSES>
|
||||
<root url="jar://$MODULE_DIR$/../../eclipse-externals/lib-6/jar-every/lib-6.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MODULE_DIR$/../../eclipse-externals/lib-6/jar-all-6.zip!/doc/api" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MODULE_DIR$/../../eclipse-externals/lib-6/jar-every/src.zip!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="library" exported="" name="lib-8" level="project" />
|
||||
<orderEntry type="module-library">
|
||||
<library name="junit3">
|
||||
<CLASSES>
|
||||
<root url="jar://$JUNIT$/junit.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library name="junit4">
|
||||
<CLASSES>
|
||||
<root url="jar://$JUNIT$/junit-4.12.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
</root>
|
||||
|
||||
<output url="file://$MODULE_DIR$/bin" />
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src-props-1" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src-props-2" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/test" isTestSource="false" />
|
||||
</content>
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="module-library" exported="">
|
||||
<library name="lib-1">
|
||||
<CLASSES>
|
||||
<root url="file://$MODULE_DIR$/lib-1/copy-every/lib-1" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="file://$MODULE_DIR$/lib-1/copy-every/doc/api" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="file://$MODULE_DIR$/lib-1/copy-every/src" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library" exported="">
|
||||
<library name="lib-2">
|
||||
<CLASSES>
|
||||
<root url="file://$MODULE_DIR$/../ws-internals/lib-2/copy-every/lib-2" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MODULE_DIR$/../ws-internals/lib-2/jar-all-2.zip!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="file://$MODULE_DIR$/../ws-internals/lib-2/copy-every/src" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library" exported="">
|
||||
<library name="lib-3">
|
||||
<CLASSES>
|
||||
<root url="file://$MODULE_DIR$/../../eclipse-externals/lib-3/copy-every/lib-3" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="http://open-space.org" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="file://$MODULE_DIR$/../../eclipse-externals/lib-3/copy-every/src" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library" exported="">
|
||||
<library name="lib-4.jar">
|
||||
<CLASSES>
|
||||
<root url="jar://$MODULE_DIR$/lib-4/jar-every/lib-4.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MODULE_DIR$/lib-4/jar-every/apidoc.zip!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MODULE_DIR$/lib-4/jar-every/src.zip!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library" exported="">
|
||||
<library name="lib-5.jar">
|
||||
<CLASSES>
|
||||
<root url="jar://$MODULE_DIR$/../ws-internals/lib-5/jar-every/lib-5.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MODULE_DIR$/../ws-internals/lib-5/jar-all-5.zip!/doc/api" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MODULE_DIR$/../ws-internals/lib-5/jar-every/src.zip!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library" exported="">
|
||||
<library name="lib-6.jar">
|
||||
<CLASSES>
|
||||
<root url="jar://$MODULE_DIR$/../../eclipse-externals/lib-6/jar-every/lib-6.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MODULE_DIR$/../../eclipse-externals/lib-6/jar-all-6.zip!/doc/api" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MODULE_DIR$/../../eclipse-externals/lib-6/jar-every/src.zip!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="library" exported="" name="lib-8" level="project" />
|
||||
<orderEntry type="module-library">
|
||||
<library name="junit3">
|
||||
<CLASSES>
|
||||
<root url="jar://$JUNIT$/junit.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library name="junit4">
|
||||
<CLASSES>
|
||||
<root url="jar://$JUNIT$/junit-4.12.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
</root>
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -23,7 +23,6 @@ package org.jetbrains.idea.eclipse;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class EclipseIml2ModulesTest extends Eclipse2ModulesTest {
|
||||
|
||||
@Override
|
||||
protected String getTestPath() {
|
||||
return "iml";
|
||||
|
||||
@@ -79,14 +79,9 @@ public class EclipseImlTest extends IdeaTestCase {
|
||||
String communityLib = FileUtil.toSystemIndependentName(PathManagerEx.findFileUnderCommunityHome("lib").getAbsolutePath());
|
||||
fileText = fileText.replaceAll("\\$" + JUNIT + "\\$", communityLib);
|
||||
final Element classpathElement = JDOMUtil.loadDocument(fileText).getRootElement();
|
||||
final Module module = WriteCommandAction.runWriteCommandAction(null, new Computable<Module>() {
|
||||
@Override
|
||||
public Module compute() {
|
||||
return ModuleManager.getInstance(project)
|
||||
.newModule(new File(path) + File.separator + EclipseProjectFinder
|
||||
.findProjectName(path) + IdeaXml.IML_EXT, StdModuleTypes.JAVA.getId());
|
||||
}
|
||||
});
|
||||
final Module module = WriteCommandAction.runWriteCommandAction(null, (Computable<Module>)() -> ModuleManager.getInstance(project)
|
||||
.newModule(new File(path) + File.separator + EclipseProjectFinder
|
||||
.findProjectName(path) + IdeaXml.IML_EXT, StdModuleTypes.JAVA.getId()));
|
||||
final ModifiableRootModel rootModel = ModuleRootManager.getInstance(module).getModifiableModel();
|
||||
EclipseClasspathReader classpathReader = new EclipseClasspathReader(path, project, null);
|
||||
classpathReader.init(rootModel);
|
||||
@@ -101,7 +96,7 @@ public class EclipseImlTest extends IdeaTestCase {
|
||||
PathMacroManager.getInstance(project).collapsePaths(actualImlElement);
|
||||
PathMacros.getInstance().removeMacro(JUNIT);
|
||||
|
||||
assertThat(actualImlElement).isEqualTo(FileUtil.loadFile(new File(project.getBaseDir().getPath() + "/expected", "expected.iml")));
|
||||
assertThat(actualImlElement).isEqualTo(new File(project.getBaseDir().getPath() + "/expected", "expected.iml"));
|
||||
}
|
||||
|
||||
public void testWorkspaceOnly() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user