Lines 5938-5942
Link Here
|
5938 |
JavaCore.removeClasspathVariable("MyVar", null); |
5938 |
JavaCore.removeClasspathVariable("MyVar", null); |
5939 |
} |
5939 |
} |
5940 |
} |
5940 |
} |
|
|
5941 |
/** |
5942 |
* @bug 248661:Axis2: Missing required libraries in Axis 2 WS Client Projects |
5943 |
* @test that a variable classpath entry that is mappped to a folder/jar with external path (but still |
5944 |
* inside the project folder) can be validated using both system absolute path and relative path. |
5945 |
* |
5946 |
* @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=248661" |
5947 |
*/ |
5948 |
public void testBug248661() throws Exception { |
5949 |
IFolder folder = null; |
5950 |
try { |
5951 |
IJavaProject proj = this.createJavaProject("P", new String[] {}, "bin"); |
5952 |
IPath folderPath = proj.getResource().getFullPath().append("classes"); |
5953 |
folder = createFolder(folderPath); |
5954 |
assertNotNull(folder); |
5955 |
IClasspathEntry[] classpath = new IClasspathEntry[1]; |
5956 |
classpath[0] = JavaCore.newVariableEntry(folderPath, null, null); |
5957 |
setClasspath(proj, classpath); |
5958 |
|
5959 |
IClasspathEntry cpe = JavaCore.newLibraryEntry(folder.getFullPath(), null, null); |
5960 |
IJavaModelStatus status = JavaConventions.validateClasspathEntry(proj, cpe, true); |
5961 |
assertEquals(IJavaModelStatus.OK, status.getCode()); |
5962 |
|
5963 |
cpe = JavaCore.newLibraryEntry(folder.getLocation(), null, null); |
5964 |
status = JavaConventions.validateClasspathEntry(proj, cpe, true); |
5965 |
assertEquals(IJavaModelStatus.OK, status.getCode()); |
5966 |
} |
5967 |
finally{ |
5968 |
if (folder != null) { |
5969 |
org.eclipse.jdt.core.tests.util.Util.delete(folder); |
5970 |
} |
5971 |
this.deleteProject("P"); |
5972 |
} |
5973 |
} |
5941 |
|
5974 |
|
5942 |
} |
5975 |
} |