Lines 6026-6032
Link Here
|
6026 |
} |
6026 |
} |
6027 |
} |
6027 |
} |
6028 |
/** |
6028 |
/** |
6029 |
* Additional test for bug 300136 - Test that the the errors are reported when the |
6029 |
* Additional test for bug 300136 - Test that the errors are reported when the |
6030 |
* optional attribute is not used. |
6030 |
* optional attribute is not used. |
6031 |
* |
6031 |
* |
6032 |
* @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=300136" |
6032 |
* @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=300136" |
Lines 6069-6073
Link Here
|
6069 |
JavaCore.removeClasspathVariable("INVALID_LIB", null); |
6069 |
JavaCore.removeClasspathVariable("INVALID_LIB", null); |
6070 |
} |
6070 |
} |
6071 |
} |
6071 |
} |
|
|
6072 |
/** |
6073 |
* @bug 294360:Duplicate entries in Classpath Resolution when importing dependencies from parent project |
6074 |
* Test that duplicate entries are not added to the resolved classpath |
6075 |
* |
6076 |
* @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=294360" |
6077 |
* @throws Exception |
6078 |
*/ |
6079 |
public void testBug294360a() throws Exception { |
6080 |
try { |
6081 |
IJavaProject p = createJavaProject("P"); |
6082 |
addExternalLibrary(p, getExternalResourcePath("lib.jar"), new String[0], |
6083 |
new String[] { |
6084 |
"META-INF/MANIFEST.MF", |
6085 |
"Manifest-Version: 1.0\n", |
6086 |
}, |
6087 |
JavaCore.VERSION_1_4); |
6088 |
IClasspathEntry[] classpath = new IClasspathEntry[2]; |
6089 |
classpath[0] = JavaCore.newLibraryEntry(new Path(getExternalResourcePath("lib.jar")), null, null); |
6090 |
ContainerInitializer.setInitializer(new DefaultContainerInitializer(new String[] {"P", getExternalResourcePath("lib.jar")})); |
6091 |
classpath[1] = JavaCore.newContainerEntry(new Path("org.eclipse.jdt.core.tests.model.TEST_CONTAINER")); |
6092 |
setClasspath(p, classpath); |
6093 |
|
6094 |
StringBuffer buffer = new StringBuffer( |
6095 |
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" + |
6096 |
"<classpath>\n" + |
6097 |
" <classpathentry kind=\"con\" path=\"org.eclipse.jdt.core.tests.model.TEST_CONTAINER\"/>\n" + |
6098 |
" <classpathentry kind=\"lib\" path=\""+ getExternalResourcePath("lib.jar") + "\">\n" + |
6099 |
" <attributes>\n" + |
6100 |
" <attribute name=\"optional\" value=\"true\"/>\n" + |
6101 |
" </attributes>\n" + |
6102 |
" </classpathentry>\n" + |
6103 |
" <classpathentry kind=\"output\" path=\"\"/>\n" + |
6104 |
"</classpath>\n"); |
6105 |
|
6106 |
editFile( |
6107 |
"/P/.classpath", |
6108 |
buffer.toString() |
6109 |
); |
6110 |
|
6111 |
IClasspathEntry[] resolvedClasspath = p.getResolvedClasspath(true); |
6112 |
assertClasspathEquals(resolvedClasspath, |
6113 |
""+ getExternalPath() + "lib.jar[CPE_LIBRARY][K_BINARY][isExported:false]"); |
6114 |
} finally { |
6115 |
deleteProject("P"); |
6116 |
deleteExternalResource("lib.jar"); |
6117 |
} |
6118 |
} |
6072 |
|
6119 |
|
6073 |
} |
6120 |
} |