summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephan Herrmann2018-05-16 16:38:59 -0400
committerStephan Herrmann2018-05-16 16:38:59 -0400
commit1e19032c8ec7a40528165ad4fc658dfdfd4dd2d8 (patch)
treef2ec1f2723015546c8dd1dfad9b1f5809ec13b82
parent40035f062012183a9073c6ad672b3904f4e7ba91 (diff)
downloadorg.eclipse.objectteams-1e19032c8ec7a40528165ad4fc658dfdfd4dd2d8.zip
org.eclipse.objectteams-1e19032c8ec7a40528165ad4fc658dfdfd4dd2d8.tar.gz
org.eclipse.objectteams-1e19032c8ec7a40528165ad4fc658dfdfd4dd2d8.tar.xz
Update jdt.core to S4_8_0_M7
- complete the update to jclMin1.7 - partially refresh ot.AbstractJavaModelTests from JDT's original
-rw-r--r--testplugins/org.eclipse.objectteams.otdt.test.builder/JCL/jclMin1.7.jarbin13452 -> 19777 bytes
-rw-r--r--testplugins/org.eclipse.objectteams.otdt.test.builder/JCL/jclMin1.7src.zipbin8269 -> 11898 bytes
-rw-r--r--testplugins/org.eclipse.objectteams.otdt.tests/src/org/eclipse/objectteams/otdt/tests/AbstractJavaModelTests.java348
-rw-r--r--testplugins/org.eclipse.objectteams.otdt.tests/workspace/AnonymousInnerclass/.classpath2
-rw-r--r--testplugins/org.eclipse.objectteams.otdt.tests/workspace/CallinMapping/.classpath2
-rw-r--r--testplugins/org.eclipse.objectteams.otdt.tests/workspace/CalloutMapping/.classpath2
-rw-r--r--testplugins/org.eclipse.objectteams.otdt.tests/workspace/CodeSelection/.classpath2
-rw-r--r--testplugins/org.eclipse.objectteams.otdt.tests/workspace/Completion/.classpath2
-rw-r--r--testplugins/org.eclipse.objectteams.otdt.tests/workspace/ExternalDefinedRole/.classpath2
-rw-r--r--testplugins/org.eclipse.objectteams.otdt.tests/workspace/Hierarchy/.classpath2
-rw-r--r--testplugins/org.eclipse.objectteams.otdt.tests/workspace/HierarchyRegression/.classpath2
-rw-r--r--testplugins/org.eclipse.objectteams.otdt.tests/workspace/InternalDefinedRole/.classpath2
-rw-r--r--testplugins/org.eclipse.objectteams.otdt.tests/workspace/JSR-045/.classpath2
-rw-r--r--testplugins/org.eclipse.objectteams.otdt.tests/workspace/OTModelTest/.classpath2
-rw-r--r--testplugins/org.eclipse.objectteams.otdt.tests/workspace/PCAnalysis/.classpath2
-rw-r--r--testplugins/org.eclipse.objectteams.otdt.tests/workspace/ParserTest/.classpath2
-rw-r--r--testplugins/org.eclipse.objectteams.otdt.tests/workspace/Regression/.classpath2
-rw-r--r--testplugins/org.eclipse.objectteams.otdt.tests/workspace/Team/.classpath2
-rw-r--r--testplugins/org.eclipse.objectteams.otdt.tests/workspace/TeamProject/.classpath2
-rw-r--r--testplugins/org.eclipse.objectteams.otdt.tests/workspace/TestDataSample/.classpath2
20 files changed, 300 insertions, 82 deletions
diff --git a/testplugins/org.eclipse.objectteams.otdt.test.builder/JCL/jclMin1.7.jar b/testplugins/org.eclipse.objectteams.otdt.test.builder/JCL/jclMin1.7.jar
index 47bbace..d149e6f 100644
--- a/testplugins/org.eclipse.objectteams.otdt.test.builder/JCL/jclMin1.7.jar
+++ b/testplugins/org.eclipse.objectteams.otdt.test.builder/JCL/jclMin1.7.jar
Binary files differ
diff --git a/testplugins/org.eclipse.objectteams.otdt.test.builder/JCL/jclMin1.7src.zip b/testplugins/org.eclipse.objectteams.otdt.test.builder/JCL/jclMin1.7src.zip
index 411528e..f6d810c 100644
--- a/testplugins/org.eclipse.objectteams.otdt.test.builder/JCL/jclMin1.7src.zip
+++ b/testplugins/org.eclipse.objectteams.otdt.test.builder/JCL/jclMin1.7src.zip
Binary files differ
diff --git a/testplugins/org.eclipse.objectteams.otdt.tests/src/org/eclipse/objectteams/otdt/tests/AbstractJavaModelTests.java b/testplugins/org.eclipse.objectteams.otdt.tests/src/org/eclipse/objectteams/otdt/tests/AbstractJavaModelTests.java
index 388251d..977774a 100644
--- a/testplugins/org.eclipse.objectteams.otdt.tests/src/org/eclipse/objectteams/otdt/tests/AbstractJavaModelTests.java
+++ b/testplugins/org.eclipse.objectteams.otdt.tests/src/org/eclipse/objectteams/otdt/tests/AbstractJavaModelTests.java
@@ -1,11 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2018 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- * $Id: AbstractJavaModelTests.java 23494 2010-02-05 23:06:44Z stephan $
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
* Fraunhofer FIRST - extended API and implementation
@@ -41,13 +40,15 @@ import org.eclipse.jdt.internal.core.NameLookup;
import org.eclipse.jdt.internal.core.JavaProject;
import org.eclipse.jdt.internal.core.ResolvedSourceMethod;
import org.eclipse.jdt.internal.core.ResolvedSourceType;
+import org.eclipse.jdt.internal.core.nd.indexer.Indexer;
import org.eclipse.jdt.internal.core.search.BasicSearchEngine;
import org.eclipse.jdt.internal.core.search.matching.MatchLocator;
import org.eclipse.jdt.internal.core.util.Util;
import org.eclipse.objectteams.otdt.core.ext.OTDTPlugin;
+@SuppressWarnings({"rawtypes", "unchecked"})
public abstract class AbstractJavaModelTests extends SuiteOfTestCases {
-
+
/**
* The java.io.File path to the directory that contains the external jars.
*/
@@ -423,21 +424,33 @@ public abstract class AbstractJavaModelTests extends SuiteOfTestCases {
}
protected void addExternalLibrary(IJavaProject javaProject, String jarPath, String[] pathAndContents, String[] nonJavaResources, String compliance) throws Exception {
- String[] claspath = get15LibraryIfNeeded(compliance);
+ String[] claspath = getJCL15PlusLibraryIfNeeded(compliance);
org.eclipse.jdt.core.tests.util.Util.createJar(pathAndContents, nonJavaResources, jarPath, claspath, compliance);
addLibraryEntry(javaProject, new Path(jarPath), true/*exported*/);
}
protected void addLibrary(String jarName, String sourceZipName, String[] pathAndContents, String compliance) throws CoreException, IOException {
- addLibrary(this.currentProject, jarName, sourceZipName, pathAndContents, null/*no non-Java resources*/, null, null, compliance);
+ addLibrary(this.currentProject, jarName, sourceZipName, pathAndContents, null/*no non-Java resources*/, null, null, compliance, null);
+ }
+ protected void addLibrary(IJavaProject javaProject, String jarName, String sourceZipName, String[] pathAndContents, String compliance, Map options) throws CoreException, IOException {
+ addLibrary(javaProject, jarName, sourceZipName, pathAndContents, null/*no non-Java resources*/, null, null, compliance, options);
}
protected void addLibrary(IJavaProject javaProject, String jarName, String sourceZipName, String[] pathAndContents, String compliance) throws CoreException, IOException {
- addLibrary(javaProject, jarName, sourceZipName, pathAndContents, null/*no non-Java resources*/, null, null, compliance);
+ addLibrary(javaProject, jarName, sourceZipName, pathAndContents, null/*no non-Java resources*/, null, null, compliance, null);
}
protected void addLibrary(IJavaProject javaProject, String jarName, String sourceZipName, String[] pathAndContents, String[] nonJavaResources, String compliance) throws CoreException, IOException {
- addLibrary(javaProject, jarName, sourceZipName, pathAndContents, nonJavaResources, null, null, compliance);
- }
- protected void addLibrary(IJavaProject javaProject, String jarName, String sourceZipName, String[] pathAndContents, String[] nonJavaResources, String[] librariesInclusionPatterns, String[] librariesExclusionPatterns, String compliance) throws CoreException, IOException {
- IProject project = createLibrary(javaProject, jarName, sourceZipName, pathAndContents, nonJavaResources, compliance);
+ addLibrary(javaProject, jarName, sourceZipName, pathAndContents, nonJavaResources, null, null, compliance, null);
+ }
+ protected void addLibrary(
+ IJavaProject javaProject,
+ String jarName,
+ String sourceZipName,
+ String[] pathAndContents,
+ String[] nonJavaResources,
+ String[] librariesInclusionPatterns,
+ String[] librariesExclusionPatterns,
+ String compliance,
+ Map options) throws CoreException, IOException {
+ IProject project = createLibrary(javaProject, jarName, sourceZipName, pathAndContents, nonJavaResources, compliance, options);
String projectPath = '/' + project.getName() + '/';
addLibraryEntry(
javaProject,
@@ -449,13 +462,29 @@ public abstract class AbstractJavaModelTests extends SuiteOfTestCases {
true
);
}
-
- protected IProject createLibrary(IJavaProject javaProject, String jarName, String sourceZipName, String[] pathAndContents, String[] nonJavaResources, String compliance) throws IOException, CoreException {
+ protected IProject createLibrary(
+ IJavaProject javaProject,
+ String jarName,
+ String sourceZipName,
+ String[] pathAndContents,
+ String[] nonJavaResources,
+ String compliance) throws IOException, CoreException {
+ return createLibrary(javaProject, jarName, sourceZipName, pathAndContents, nonJavaResources, compliance, null);
+ }
+
+ protected IProject createLibrary(
+ IJavaProject javaProject,
+ String jarName,
+ String sourceZipName,
+ String[] pathAndContents,
+ String[] nonJavaResources,
+ String compliance,
+ Map options) throws IOException, CoreException {
IProject project = javaProject.getProject();
String projectLocation = project.getLocation().toOSString();
String jarPath = projectLocation + File.separator + jarName;
- String[] claspath = get15LibraryIfNeeded(compliance);
- org.eclipse.jdt.core.tests.util.Util.createJar(pathAndContents, nonJavaResources, jarPath, claspath, compliance);
+ String[] claspath = getJCL15PlusLibraryIfNeeded(compliance);
+ org.eclipse.jdt.core.tests.util.Util.createJar(pathAndContents, nonJavaResources, jarPath, claspath, compliance, options);
if (pathAndContents != null && pathAndContents.length != 0) {
String sourceZipPath = projectLocation + File.separator + sourceZipName;
org.eclipse.jdt.core.tests.util.Util.createSourceZip(pathAndContents, sourceZipPath);
@@ -751,11 +780,21 @@ public abstract class AbstractJavaModelTests extends SuiteOfTestCases {
* The line separators in 'actual' are converted to '\n' before the comparison.
*/
protected void assertSourceEquals(String message, String expected, String actual) {
+ assertSourceEquals(message, expected, actual, true/*convert line delimiter*/);
+ }
+ /*
+ * Asserts that the given actual source is equal to the expected one.
+ * Note that if the line separators in 'actual' are converted to '\n' before the comparison,
+ * 'expected' is assumed to have the same '\n' line separator.
+ */
+ protected void assertSourceEquals(String message, String expected, String actual, boolean convert) {
if (actual == null) {
assertEquals(message, expected, null);
return;
}
- actual = org.eclipse.jdt.core.tests.util.Util.convertToIndependantLineDelimiter(actual);
+ if (convert) {
+ actual = org.eclipse.jdt.core.tests.util.Util.convertToIndependantLineDelimiter(actual);
+ }
if (!actual.equals(expected)) {
System.out.println("Expected source in "+getName()+" should be:");
System.out.print(org.eclipse.jdt.core.tests.util.Util.displayString(actual.toString(), 2));
@@ -777,7 +816,7 @@ public abstract class AbstractJavaModelTests extends SuiteOfTestCases {
assertEquals("Unexpected annotations", expected, actual);
}
- private void appendAnnotation(StringBuffer buffer, IAnnotation annotation) throws JavaModelException {
+ protected void appendAnnotation(StringBuffer buffer, IAnnotation annotation) throws JavaModelException {
buffer.append('@');
buffer.append(annotation.getElementName());
IMemberValuePair[] members = annotation.getMemberValuePairs();
@@ -1061,7 +1100,7 @@ public abstract class AbstractJavaModelTests extends SuiteOfTestCases {
*/
protected void attachSource(IPackageFragmentRoot root, String sourcePath, String sourceRoot) throws JavaModelException {
IJavaProject javaProject = root.getJavaProject();
- IClasspathEntry[] entries = (IClasspathEntry[])javaProject.getRawClasspath().clone();
+ IClasspathEntry[] entries = javaProject.getRawClasspath().clone();
for (int i = 0; i < entries.length; i++){
IClasspathEntry entry = entries[i];
if (entry.getPath().toOSString().toLowerCase().equals(root.getPath().toOSString().toLowerCase())) {
@@ -1077,7 +1116,7 @@ public abstract class AbstractJavaModelTests extends SuiteOfTestCases {
}
/**
* Creates an operation to delete the given element, asserts
- * the operation is successfull, and ensures the element is no
+ * the operation is successful, and ensures the element is no
* longer present in the model.
*/
public void assertDeletion(IJavaElement elementToDelete) throws JavaModelException {
@@ -1170,7 +1209,7 @@ public abstract class AbstractJavaModelTests extends SuiteOfTestCases {
protected void createJar(String[] javaPathsAndContents, String jarPath, Map options) throws IOException {
org.eclipse.jdt.core.tests.util.Util.createJar(javaPathsAndContents, null, jarPath, null, "1.4", options);
}
-
+
protected void createJar(String[] javaPathsAndContents, String jarPath, String[] classpath, String compliance) throws IOException {
org.eclipse.jdt.core.tests.util.Util.createJar(javaPathsAndContents, null,jarPath, classpath, compliance);
}
@@ -1202,7 +1241,7 @@ public abstract class AbstractJavaModelTests extends SuiteOfTestCases {
null/*no source outputs*/,
null/*no inclusion pattern*/,
null/*no exclusion pattern*/,
- "1.4"
+ ""
);
}
/*
@@ -1225,7 +1264,7 @@ public abstract class AbstractJavaModelTests extends SuiteOfTestCases {
sourceOutputs,
null/*no inclusion pattern*/,
null/*no exclusion pattern*/,
- "1.4"
+ ""
);
}
protected IJavaProject createJavaProject(String projectName, String[] sourceFolders, String[] libraries, String output) throws CoreException {
@@ -1245,10 +1284,32 @@ public abstract class AbstractJavaModelTests extends SuiteOfTestCases {
null/*no source outputs*/,
null/*no inclusion pattern*/,
null/*no exclusion pattern*/,
- "1.4",
+ "",
false/*don't import*/
);
}
+ protected IJavaProject createJavaProject(String projectName, String[] sourceFolders, String[] libraries, String output, String compliance, boolean useFullJCL) throws CoreException {
+ return
+ this.createJavaProject(
+ projectName,
+ sourceFolders,
+ libraries,
+ null/*no inclusion pattern*/,
+ null/*no exclusion pattern*/,
+ null/*no project*/,
+ null/*no inclusion pattern*/,
+ null/*no exclusion pattern*/,
+ true,
+ null/*no exported project*/,
+ output,
+ null/*no source outputs*/,
+ null/*no inclusion pattern*/,
+ null/*no exclusion pattern*/,
+ compliance,
+ useFullJCL,
+ false
+ );
+ }
protected IJavaProject createJavaProject(String projectName, String[] sourceFolders, String[] libraries, String output, String compliance) throws CoreException {
return
this.createJavaProject(
@@ -1284,7 +1345,7 @@ public abstract class AbstractJavaModelTests extends SuiteOfTestCases {
null/*no source outputs*/,
null/*no inclusion pattern*/,
null/*no exclusion pattern*/,
- "1.4"
+ ""
);
}
protected SearchPattern createPattern(IJavaElement element, int limitTo) {
@@ -1313,7 +1374,7 @@ public abstract class AbstractJavaModelTests extends SuiteOfTestCases {
null/*no source outputs*/,
null/*no inclusion pattern*/,
null/*no exclusion pattern*/,
- "1.4"
+ ""
);
}
protected IJavaProject createJavaProject(String projectName, String[] sourceFolders, String[] libraries, String[] projects, String projectOutput, String compliance) throws CoreException {
@@ -1404,6 +1465,43 @@ public abstract class AbstractJavaModelTests extends SuiteOfTestCases {
final String[][] exclusionPatterns,
final String compliance,
final boolean simulateImport) throws CoreException {
+ return createJavaProject(
+ projectName,
+ sourceFolders,
+ libraries,
+ librariesInclusionPatterns,
+ librariesExclusionPatterns,
+ projects,
+ projectsInclusionPatterns,
+ projectsExclusionPatterns,
+ combineAccessRestrictions,
+ exportedProjects,
+ projectOutput,
+ sourceOutputs,
+ inclusionPatterns,
+ exclusionPatterns,
+ compliance,
+ false,
+ simulateImport);
+ }
+ protected IJavaProject createJavaProject(
+ final String projectName,
+ final String[] sourceFolders,
+ final String[] libraries,
+ final String[][] librariesInclusionPatterns,
+ final String[][] librariesExclusionPatterns,
+ final String[] projects,
+ final String[][] projectsInclusionPatterns,
+ final String[][] projectsExclusionPatterns,
+ final boolean combineAccessRestrictions,
+ final boolean[] exportedProjects,
+ final String projectOutput,
+ final String[] sourceOutputs,
+ final String[][] inclusionPatterns,
+ final String[][] exclusionPatterns,
+ final String compliance,
+ final boolean fullJCL,
+ final boolean simulateImport) throws CoreException {
final IJavaProject[] result = new IJavaProject[1];
IWorkspaceRunnable create = new IWorkspaceRunnable() {
public void run(IProgressMonitor monitor) throws CoreException {
@@ -1485,7 +1583,7 @@ public abstract class AbstractJavaModelTests extends SuiteOfTestCases {
if (lib.startsWith("JCL")) {
try {
// ensure JCL variables are set
- setUpJCLClasspathVariables(compliance);
+ setUpJCLClasspathVariables(compliance, fullJCL);
} catch (IOException e) {
e.printStackTrace();
}
@@ -1603,14 +1701,49 @@ public abstract class AbstractJavaModelTests extends SuiteOfTestCases {
javaProject.setRawClasspath(entries, projectPath.append(outputPath), monitor);
// set compliance level options
- if ("1.5".equals(compliance)) {
- Map<String, String> options = new HashMap<String, String>();
+ if ("1.4".equals(compliance)) {
+ Map options = new HashMap();
+ options.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_1_4);
+ options.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_4);
+ options.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_4);
+ javaProject.setOptions(options);
+ } else if ("1.5".equals(compliance)) {
+ Map options = new HashMap();
options.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_1_5);
options.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5);
options.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_5);
javaProject.setOptions(options);
+ } else if ("1.6".equals(compliance)) {
+ Map options = new HashMap();
+ options.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_1_6);
+ options.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_6);
+ options.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_6);
+ javaProject.setOptions(options);
+ } else if ("1.7".equals(compliance)) {
+ Map options = new HashMap();
+ options.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_1_7);
+ options.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_7);
+ options.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_7);
+ javaProject.setOptions(options);
+ } else if ("1.8".equals(compliance)) {
+ Map options = new HashMap();
+ options.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_1_8);
+ options.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_8);
+ options.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_8);
+ javaProject.setOptions(options);
+ } else if ("9".equals(compliance)) {
+ Map options = new HashMap();
+ options.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_9);
+ options.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_9);
+ options.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_9);
+ javaProject.setOptions(options);
+ } else if ("10".equals(compliance)) {
+ Map options = new HashMap();
+ options.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_10);
+ options.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_10);
+ options.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_10);
+ javaProject.setOptions(options);
}
-
result[0] = javaProject;
}
};
@@ -1757,8 +1890,13 @@ public abstract class AbstractJavaModelTests extends SuiteOfTestCases {
assertTrue("Did not find sibling", found);
}
}
- protected String[] get15LibraryIfNeeded(String compliance) throws JavaModelException, IOException {
- if (compliance.charAt(compliance.length()-1) >= '5' && (AbstractCompilerTest.getPossibleComplianceLevels() & AbstractCompilerTest.F_1_5) == 0) {
+ protected String[] getJCL15PlusLibraryIfNeeded(String compliance) throws JavaModelException, IOException {
+ if (compliance.charAt(compliance.length()-1) >= '8' && (AbstractCompilerTest.getPossibleComplianceLevels() & AbstractCompilerTest.F_1_8) != 0) {
+ // ensure that the JCL 18 lib is setup (i.e. that the jclMin18.jar is copied)
+ setUpJCLClasspathVariables("1.8");
+ return new String[] {getExternalJCLPathString("1.8")};
+ }
+ if (compliance.charAt(compliance.length()-1) >= '5' && (AbstractCompilerTest.getPossibleComplianceLevels() & AbstractCompilerTest.F_1_5) != 0) {
// ensure that the JCL 15 lib is setup (i.e. that the jclMin15.jar is copied)
setUpJCLClasspathVariables("1.5");
return new String[] {getExternalJCLPathString("1.5")};
@@ -1769,12 +1907,12 @@ public abstract class AbstractJavaModelTests extends SuiteOfTestCases {
* Returns the specified compilation unit in the given project, root, and
* package fragment or <code>null</code> if it does not exist.
*/
- public IClassFile getClassFile(String projectName, String rootPath, String packageName, String className) throws JavaModelException {
+ public IOrdinaryClassFile getClassFile(String projectName, String rootPath, String packageName, String className) throws JavaModelException {
IPackageFragment pkg= getPackageFragment(projectName, rootPath, packageName);
if (pkg == null) {
return null;
}
- return pkg.getClassFile(className);
+ return pkg.getOrdinaryClassFile(className);
}
protected ICompilationUnit getCompilationUnit(String path) {
return (ICompilationUnit)JavaCore.create(getFile(path));
@@ -1851,6 +1989,13 @@ public abstract class AbstractJavaModelTests extends SuiteOfTestCases {
protected String getExternalJCLPathString(String compliance) {
return getExternalPath() + "jclMin" + compliance + ".jar";
}
+ protected String getExternalJCLPathString(String compliance, boolean useFullJCL) {
+ if (useFullJCL) {
+ return getExternalPath() + "jclFull" + compliance + ".jar";
+ } else {
+ return getExternalJCLPathString(compliance);
+ }
+ }
/**
* Returns the IPath to the root source of the external java class library (e.g. "src")
*/
@@ -1954,6 +2099,12 @@ public abstract class AbstractJavaModelTests extends SuiteOfTestCases {
case IJavaElement.ANNOTATION:
nameRange = ((IAnnotation) element).getNameRange();
break;
+ case IJavaElement.PACKAGE_DECLARATION :
+ nameRange = ((IPackageDeclaration) element).getNameRange();
+ break;
+ case IJavaElement.IMPORT_DECLARATION :
+ nameRange = ((IImportDeclaration) element).getNameRange();
+ break;
default:
nameRange = ((IMember) element).getNameRange();
break;
@@ -1984,7 +2135,7 @@ public abstract class AbstractJavaModelTests extends SuiteOfTestCases {
* <code>null</code> if it does not exist.
* If relative, the rootPath must be specified as a project relative path.
* The empty path refers to the package fragment root that is the project
- * folder iteslf.
+ * folder itself.
* If absolute, the rootPath refers to either an external jar, or a resource
* internal to the workspace
*/
@@ -2240,6 +2391,7 @@ public abstract class AbstractJavaModelTests extends SuiteOfTestCases {
protected void refreshExternalArchives(IJavaProject p) throws JavaModelException {
waitForAutoBuild(); // ensure that the auto-build job doesn't interfere with external jar refreshing
getJavaModel().refreshExternalArchives(new IJavaElement[] {p}, null);
+ Indexer.getInstance().waitForIndex(null);
}
protected void removeJavaNature(String projectName) throws CoreException {
@@ -2639,13 +2791,16 @@ public abstract class AbstractJavaModelTests extends SuiteOfTestCases {
// SH}
}
protected IJavaProject setUpJavaProject(final String projectName, String compliance) throws CoreException, IOException {
+ return setUpJavaProject(projectName, compliance, false);
+ }
+ protected IJavaProject setUpJavaProject(final String projectName, String compliance, boolean useFullJCL) throws CoreException, IOException {
// copy files in project from source workspace to target workspace
String sourceWorkspacePath = getSourceWorkspacePath();
String targetWorkspacePath = getWorkspaceRoot().getLocation().toFile().getCanonicalPath();
copyDirectory(new File(sourceWorkspacePath, projectName), new File(targetWorkspacePath, projectName));
// ensure variables are set
- setUpJCLClasspathVariables(compliance);
+ setUpJCLClasspathVariables(compliance, useFullJCL);
// create project
final IProject project = getWorkspaceRoot().getProject(projectName);
@@ -2657,7 +2812,7 @@ public abstract class AbstractJavaModelTests extends SuiteOfTestCases {
};
getWorkspace().run(populate, null);
IJavaProject javaProject = JavaCore.create(project);
- setUpProjectCompliance(javaProject, compliance);
+ setUpProjectCompliance(javaProject, compliance, useFullJCL);
javaProject.setOption(JavaCore.COMPILER_PB_UNUSED_LOCAL, JavaCore.IGNORE);
javaProject.setOption(JavaCore.COMPILER_PB_UNUSED_PRIVATE_MEMBER, JavaCore.IGNORE);
javaProject.setOption(JavaCore.COMPILER_PB_FIELD_HIDING, JavaCore.IGNORE);
@@ -2665,71 +2820,131 @@ public abstract class AbstractJavaModelTests extends SuiteOfTestCases {
javaProject.setOption(JavaCore.COMPILER_PB_TYPE_PARAMETER_HIDING, JavaCore.IGNORE);
return javaProject;
}
-
protected void setUpProjectCompliance(IJavaProject javaProject, String compliance) throws JavaModelException, IOException {
+ setUpProjectCompliance(javaProject, compliance, false);
+ }
+ protected void setUpProjectCompliance(IJavaProject javaProject, String compliance, boolean useFullJCL) throws JavaModelException, IOException {
// Look for version to set and return if that's already done
String version = compliance; // assume that the values of CompilerOptions.VERSION_* are used
if (version.equals(javaProject.getOption(CompilerOptions.OPTION_Compliance, false))) {
return;
}
- String jclLibString;
String newJclLibString;
String newJclSrcString;
- if (compliance.charAt(2) > '4') {
- jclLibString = "JCL_LIB";
- newJclLibString = "JCL15_LIB";
- newJclSrcString = "JCL15_SRC";
+ if (useFullJCL) {
+ newJclLibString = "JCL18_FULL";
+ newJclSrcString = "JCL18_SRC"; // Use the same source
} else {
- jclLibString = "JCL15_LIB";
- newJclLibString = "JCL_LIB";
- newJclSrcString = "JCL_SRC";
+ if (compliance.equals("10")) {
+ newJclLibString = "JCL10_LIB";
+ newJclSrcString = "JCL10_SRC";
+ } else if (compliance.length() < 3) {
+ newJclLibString = "JCL19_LIB";
+ newJclSrcString = "JCL19_SRC";
+ } else if (compliance.charAt(2) > '7') {
+ newJclLibString = "JCL18_LIB";
+ newJclSrcString = "JCL18_SRC";
+ } else if (compliance.charAt(2) > '4') {
+ newJclLibString = "JCL15_LIB";
+ newJclSrcString = "JCL15_SRC";
+ } else {
+ newJclLibString = "JCL_LIB";
+ newJclSrcString = "JCL_SRC";
+ }
}
// ensure variables are set
- setUpJCLClasspathVariables(compliance);
+ setUpJCLClasspathVariables(compliance, useFullJCL);
// set options
- Map<String, String> options = new HashMap<String, String>();
+ Map options = new HashMap();
options.put(CompilerOptions.OPTION_Compliance, version);
options.put(CompilerOptions.OPTION_Source, version);
options.put(CompilerOptions.OPTION_TargetPlatform, version);
javaProject.setOptions(options);
- // replace JCL_LIB with JCL15_LIB, and JCL_SRC with JCL15_SRC
IClasspathEntry[] classpath = javaProject.getRawClasspath();
- IPath jclLib = new Path(jclLibString);
+
for (int i = 0, length = classpath.length; i < length; i++) {
IClasspathEntry entry = classpath[i];
- if (entry.getPath().equals(jclLib)) {
- classpath[i] = JavaCore.newVariableEntry(
- new Path(newJclLibString),
- new Path(newJclSrcString),
- entry.getSourceAttachmentRootPath(),
- entry.getAccessRules(),
- new IClasspathAttribute[0],
- entry.isExported());
- break;
+ final IPath path = entry.getPath();
+ // Choose the new JCL path only if the current JCL path is different
+ if (isJCLPath(path) && !path.toString().equals(newJclLibString)) {
+ classpath[i] = JavaCore.newVariableEntry(
+ new Path(newJclLibString),
+ new Path(newJclSrcString),
+ entry.getSourceAttachmentRootPath(),
+ entry.getAccessRules(),
+ new IClasspathAttribute[0],
+ entry.isExported());
+ break;
}
}
javaProject.setRawClasspath(classpath, null);
}
+ public boolean isJCLPath(IPath path) {
+ IPath jclLib = new Path("JCL_LIB");
+ IPath jcl5Lib = new Path("JCL15_LIB");
+ IPath jcl8Lib = new Path("JCL18_LIB");
+ IPath jcl9Lib = new Path("JCL19_LIB");
+ IPath jcl10Lib = new Path("JCL10_LIB");
+ IPath jclFull = new Path("JCL18_FULL");
+
+ return path.equals(jclLib) || path.equals(jcl5Lib) || path.equals(jcl8Lib) || path.equals(jcl9Lib) || path.equals(jcl10Lib) || path.equals(jclFull);
+ }
public void setUpJCLClasspathVariables(String compliance) throws JavaModelException, IOException {
- if ("1.5".equals(compliance)) {
+ setUpJCLClasspathVariables(compliance, false);
+ }
+ public void setUpJCLClasspathVariables(String compliance, boolean useFullJCL) throws JavaModelException, IOException {
+ if ("1.5".equals(compliance) || "1.6".equals(compliance)) {
if (JavaCore.getClasspathVariable("JCL15_LIB") == null) {
setupExternalJCL("jclMin1.5");
JavaCore.setClasspathVariables(
new String[] {"JCL15_LIB", "JCL15_SRC", "JCL_SRCROOT"},
- new IPath[] {getExternalJCLPath(compliance), getExternalJCLSourcePath(compliance), getExternalJCLRootSourcePath()},
+ new IPath[] {getExternalJCLPath("1.5"), getExternalJCLSourcePath("1.5"), getExternalJCLRootSourcePath()},
null);
}
} else if ("1.7".equals(compliance)) {
- if (JavaCore.getClasspathVariable("JCL17_LIB") == null) {
- setupExternalJCL("jclMin1.7");
+ if (JavaCore.getClasspathVariable("JCL17_LIB") == null) {
+ setupExternalJCL("jclMin1.7");
+ JavaCore.setClasspathVariables(
+ new String[] {"JCL17_LIB", "JCL17_SRC", "JCL_SRCROOT"},
+ new IPath[] {getExternalJCLPath("1.7"), getExternalJCLSourcePath("1.7"), getExternalJCLRootSourcePath()},
+ null);
+ }
+ } else if ("1.8".equals(compliance)) {
+ if (useFullJCL) {
+ if (JavaCore.getClasspathVariable("JCL18_FULL") == null) {
+ setupExternalJCL("jclMin1.8"); // Create the whole mininmal 1.8 set, though we will need only the source zip
+ setupExternalJCL("jclFull1.8");
JavaCore.setClasspathVariables(
- new String[] {"JCL17_LIB", "JCL17_SRC", "JCL_SRCROOT"},
- new IPath[] {getExternalJCLPath(compliance), getExternalJCLSourcePath(compliance), getExternalJCLRootSourcePath()},
+ new String[] {"JCL18_FULL", "JCL18_SRC", "JCL_SRCROOT"},
+ new IPath[] {new Path(getExternalJCLPathString("1.8", true)), getExternalJCLSourcePath("1.8"), getExternalJCLRootSourcePath()},
null);
- }
+ }
+ } else if (JavaCore.getClasspathVariable("JCL18_LIB") == null) {
+ setupExternalJCL("jclMin1.8");
+ JavaCore.setClasspathVariables(
+ new String[] {"JCL18_LIB", "JCL18_SRC", "JCL_SRCROOT"},
+ new IPath[] {getExternalJCLPath("1.8"), getExternalJCLSourcePath("1.8"), getExternalJCLRootSourcePath()},
+ null);
+ }
+ } else if ("9".equals(compliance)) {
+ if (JavaCore.getClasspathVariable("JCL19_LIB") == null) {
+ setupExternalJCL("jclMin9");
+ JavaCore.setClasspathVariables(
+ new String[] {"JCL19_LIB", "JCL19_SRC", "JCL_SRCROOT"},
+ new IPath[] {getExternalJCLPath("9"), getExternalJCLSourcePath("9"), getExternalJCLRootSourcePath()},
+ null);
+ }
+ } else if ("10".equals(compliance)) {
+ if (JavaCore.getClasspathVariable("JCL10_LIB") == null) {
+ setupExternalJCL("jclMin10");
+ JavaCore.setClasspathVariables(
+ new String[] {"JCL10_LIB", "JCL10_SRC", "JCL_SRCROOT"},
+ new IPath[] {getExternalJCLPath("9"), getExternalJCLSourcePath("9"), getExternalJCLRootSourcePath()},
+ null);
+ }
} else {
if (JavaCore.getClasspathVariable("JCL_LIB") == null) {
setupExternalJCL("jclMin");
@@ -2931,6 +3146,7 @@ public abstract class AbstractJavaModelTests extends SuiteOfTestCases {
do {
try {
Job.getJobManager().join(ResourcesPlugin.FAMILY_AUTO_BUILD, null);
+ Indexer.getInstance().waitForIndex(null);
wasInterrupted = false;
} catch (OperationCanceledException e) {
e.printStackTrace();
@@ -2945,6 +3161,7 @@ public abstract class AbstractJavaModelTests extends SuiteOfTestCases {
do {
try {
Job.getJobManager().join(ResourcesPlugin.FAMILY_MANUAL_REFRESH, null);
+ Indexer.getInstance().waitForIndex(null);
wasInterrupted = false;
} catch (OperationCanceledException e) {
e.printStackTrace();
@@ -2959,6 +3176,7 @@ public abstract class AbstractJavaModelTests extends SuiteOfTestCases {
SearchEngine engine = new SearchEngine();
IJavaSearchScope scope = SearchEngine.createWorkspaceScope();
try {
+ Indexer.getInstance().waitForIndex(null);
engine.searchAllTypeNames(
null,
SearchPattern.R_EXACT_MATCH,
diff --git a/testplugins/org.eclipse.objectteams.otdt.tests/workspace/AnonymousInnerclass/.classpath b/testplugins/org.eclipse.objectteams.otdt.tests/workspace/AnonymousInnerclass/.classpath
index 2480008..5d3fe42 100644
--- a/testplugins/org.eclipse.objectteams.otdt.tests/workspace/AnonymousInnerclass/.classpath
+++ b/testplugins/org.eclipse.objectteams.otdt.tests/workspace/AnonymousInnerclass/.classpath
@@ -3,7 +3,7 @@
<classpathentry kind="src" path="teamlevel"/>
<classpathentry kind="src" path="rolelevelinternal"/>
<classpathentry kind="var" path="CONVERTER_JCL_LIB" sourcepath="CONVERTER_JCL_SRC" rootpath="CONVERTER_JCL_SRCROOT"/>
- <classpathentry kind="var" path="JCL_LIB" sourcepath="JCL_SRC" rootpath="JCL_SRCROOT"/>
+ <classpathentry kind="var" path="JCL17_LIB" sourcepath="JCL17_SRC" rootpath="JCL_SRCROOT"/>
<classpathentry kind="output" path="bin"/>
<classpathentry kind="lib" sourcepath="src" path="bins"/>
diff --git a/testplugins/org.eclipse.objectteams.otdt.tests/workspace/CallinMapping/.classpath b/testplugins/org.eclipse.objectteams.otdt.tests/workspace/CallinMapping/.classpath
index 9f49c58..119bc26 100644
--- a/testplugins/org.eclipse.objectteams.otdt.tests/workspace/CallinMapping/.classpath
+++ b/testplugins/org.eclipse.objectteams.otdt.tests/workspace/CallinMapping/.classpath
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
- <classpathentry kind="var" path="JCL_LIB" sourcepath="JCL_SRC" rootpath="JCL_SRCROOT"/>
+ <classpathentry kind="var" path="JCL17_LIB" sourcepath="JCL17_SRC" rootpath="JCL_SRCROOT"/>
<classpathentry kind="output" path="bin"/>
<classpathentry kind="lib" sourcepath="src" path="bins"/>
diff --git a/testplugins/org.eclipse.objectteams.otdt.tests/workspace/CalloutMapping/.classpath b/testplugins/org.eclipse.objectteams.otdt.tests/workspace/CalloutMapping/.classpath
index 9f49c58..119bc26 100644
--- a/testplugins/org.eclipse.objectteams.otdt.tests/workspace/CalloutMapping/.classpath
+++ b/testplugins/org.eclipse.objectteams.otdt.tests/workspace/CalloutMapping/.classpath
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
- <classpathentry kind="var" path="JCL_LIB" sourcepath="JCL_SRC" rootpath="JCL_SRCROOT"/>
+ <classpathentry kind="var" path="JCL17_LIB" sourcepath="JCL17_SRC" rootpath="JCL_SRCROOT"/>
<classpathentry kind="output" path="bin"/>
<classpathentry kind="lib" sourcepath="src" path="bins"/>
diff --git a/testplugins/org.eclipse.objectteams.otdt.tests/workspace/CodeSelection/.classpath b/testplugins/org.eclipse.objectteams.otdt.tests/workspace/CodeSelection/.classpath
index fadab48..217415c 100644
--- a/testplugins/org.eclipse.objectteams.otdt.tests/workspace/CodeSelection/.classpath
+++ b/testplugins/org.eclipse.objectteams.otdt.tests/workspace/CodeSelection/.classpath
@@ -2,7 +2,7 @@
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="var" path="CONVERTER_JCL_LIB" sourcepath="CONVERTER_JCL_SRC" rootpath="CONVERTER_JCL_SRCROOT"/>
- <classpathentry kind="var" path="JCL_LIB" sourcepath="JCL_SRC" rootpath="JCL_SRCROOT"/>
+ <classpathentry kind="var" path="JCL17_LIB" sourcepath="JCL17_SRC" rootpath="JCL_SRCROOT"/>
<classpathentry kind="output" path="bin"/>
<classpathentry kind="lib" sourcepath="src" path="bins"/>
diff --git a/testplugins/org.eclipse.objectteams.otdt.tests/workspace/Completion/.classpath b/testplugins/org.eclipse.objectteams.otdt.tests/workspace/Completion/.classpath
index 5d47b29..4e33bef 100644
--- a/testplugins/org.eclipse.objectteams.otdt.tests/workspace/Completion/.classpath
+++ b/testplugins/org.eclipse.objectteams.otdt.tests/workspace/Completion/.classpath
@@ -2,7 +2,7 @@
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="var" path="CONVERTER_JCL_LIB" sourcepath="CONVERTER_JCL_SRC" rootpath="CONVERTER_JCL_SRCROOT"/>
- <classpathentry kind="var" path="JCL_LIB" sourcepath="JCL_SRC" rootpath="JCL_SRCROOT"/>
+ <classpathentry kind="var" path="JCL17_LIB" sourcepath="JCL17_SRC" rootpath="JCL_SRCROOT"/>
<classpathentry kind="output" path="bin"/>
<classpathentry kind="lib" sourcepath="src" path="bins"/>
<classpathentry kind="con" path="OTRE"/>
diff --git a/testplugins/org.eclipse.objectteams.otdt.tests/workspace/ExternalDefinedRole/.classpath b/testplugins/org.eclipse.objectteams.otdt.tests/workspace/ExternalDefinedRole/.classpath
index c22f3b9..fd04323 100644
--- a/testplugins/org.eclipse.objectteams.otdt.tests/workspace/ExternalDefinedRole/.classpath
+++ b/testplugins/org.eclipse.objectteams.otdt.tests/workspace/ExternalDefinedRole/.classpath
@@ -6,7 +6,7 @@
<classpathentry kind="src" path="bound/toteam"/>
<classpathentry kind="src" path="bound/toordinary"/>
<classpathentry kind="var" path="CONVERTER_JCL_LIB" sourcepath="CONVERTER_JCL_SRC" rootpath="CONVERTER_JCL_SRCROOT"/>
- <classpathentry kind="var" path="JCL_LIB" sourcepath="JCL_SRC" rootpath="JCL_SRCROOT"/>
+ <classpathentry kind="var" path="JCL17_LIB" sourcepath="JCL17_SRC" rootpath="JCL_SRCROOT"/>
<classpathentry kind="output" path="bin"/>
<classpathentry kind="lib" sourcepath="src" path="bins"/>
diff --git a/testplugins/org.eclipse.objectteams.otdt.tests/workspace/Hierarchy/.classpath b/testplugins/org.eclipse.objectteams.otdt.tests/workspace/Hierarchy/.classpath
index f69a1e6..a112489 100644
--- a/testplugins/org.eclipse.objectteams.otdt.tests/workspace/Hierarchy/.classpath
+++ b/testplugins/org.eclipse.objectteams.otdt.tests/workspace/Hierarchy/.classpath
@@ -5,7 +5,7 @@
<classpathentry kind="src" path="implicit"/>
<classpathentry kind="src" path="complete_rolehierarchy_with_classes"/>
<classpathentry kind="src" path="complete_rolehierarchy_with_roles"/>
- <classpathentry kind="var" path="JCL_LIB" sourcepath="JCL_SRC" rootpath="JCL_SRCROOT"/>
+ <classpathentry kind="var" path="JCL17_LIB" sourcepath="JCL17_SRC" rootpath="JCL_SRCROOT"/>
<classpathentry kind="output" path="bin"/>
<classpathentry kind="lib" sourcepath="src" path="bins"/>
diff --git a/testplugins/org.eclipse.objectteams.otdt.tests/workspace/HierarchyRegression/.classpath b/testplugins/org.eclipse.objectteams.otdt.tests/workspace/HierarchyRegression/.classpath
index 3e9f06f..b819049 100644
--- a/testplugins/org.eclipse.objectteams.otdt.tests/workspace/HierarchyRegression/.classpath
+++ b/testplugins/org.eclipse.objectteams.otdt.tests/workspace/HierarchyRegression/.classpath
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
- <classpathentry kind="var" path="JCL_LIB" sourcepath="JCL_SRC" rootpath="JCL_SRCROOT"/>
+ <classpathentry kind="var" path="JCL17_LIB" sourcepath="JCL17_SRC" rootpath="JCL_SRCROOT"/>
<classpathentry kind="output" path="bin"/>
<classpathentry kind="con" path="OTRE"/>
</classpath>
diff --git a/testplugins/org.eclipse.objectteams.otdt.tests/workspace/InternalDefinedRole/.classpath b/testplugins/org.eclipse.objectteams.otdt.tests/workspace/InternalDefinedRole/.classpath
index 1e8ecac..694d21c 100644
--- a/testplugins/org.eclipse.objectteams.otdt.tests/workspace/InternalDefinedRole/.classpath
+++ b/testplugins/org.eclipse.objectteams.otdt.tests/workspace/InternalDefinedRole/.classpath
@@ -6,7 +6,7 @@
<classpathentry kind="src" path="boundtorole"/>
<classpathentry kind="src" path="ordinaryclasses"/>
<classpathentry kind="var" path="CONVERTER_JCL_LIB" sourcepath="CONVERTER_JCL_SRC" rootpath="CONVERTER_JCL_SRCROOT"/>
- <classpathentry kind="var" path="JCL_LIB" sourcepath="JCL_SRC" rootpath="JCL_SRCROOT"/>
+ <classpathentry kind="var" path="JCL17_LIB" sourcepath="JCL17_SRC" rootpath="JCL_SRCROOT"/>
<classpathentry kind="output" path="bin"/>
<classpathentry kind="lib" sourcepath="src" path="bins"/>
diff --git a/testplugins/org.eclipse.objectteams.otdt.tests/workspace/JSR-045/.classpath b/testplugins/org.eclipse.objectteams.otdt.tests/workspace/JSR-045/.classpath
index b77e492..6bfe8e4 100644
--- a/testplugins/org.eclipse.objectteams.otdt.tests/workspace/JSR-045/.classpath
+++ b/testplugins/org.eclipse.objectteams.otdt.tests/workspace/JSR-045/.classpath
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
- <classpathentry kind="var" path="JCL_LIB" sourcepath="JCL_SRC" rootpath="JCL_SRCROOT"/>
+ <classpathentry kind="var" path="JCL17_LIB" sourcepath="JCL17_SRC" rootpath="JCL_SRCROOT"/>
<classpathentry kind="con" path="OTRE"/>
<classpathentry kind="output" path="bin"/>
</classpath>
diff --git a/testplugins/org.eclipse.objectteams.otdt.tests/workspace/OTModelTest/.classpath b/testplugins/org.eclipse.objectteams.otdt.tests/workspace/OTModelTest/.classpath
index 65f74bf..dd29fc9 100644
--- a/testplugins/org.eclipse.objectteams.otdt.tests/workspace/OTModelTest/.classpath
+++ b/testplugins/org.eclipse.objectteams.otdt.tests/workspace/OTModelTest/.classpath
@@ -2,7 +2,7 @@
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="var" path="CONVERTER_JCL_LIB" sourcepath="CONVERTER_JCL_SRC" rootpath="CONVERTER_JCL_SRCROOT"/>
- <classpathentry kind="var" path="JCL_LIB" sourcepath="JCL_SRC" rootpath="JCL_SRCROOT"/>
+ <classpathentry kind="var" path="JCL17_LIB" sourcepath="JCL17_SRC" rootpath="JCL_SRCROOT"/>
<classpathentry kind="output" path="bin"/>
<classpathentry kind="lib" sourcepath="src" path="bins"/>
</classpath>
diff --git a/testplugins/org.eclipse.objectteams.otdt.tests/workspace/PCAnalysis/.classpath b/testplugins/org.eclipse.objectteams.otdt.tests/workspace/PCAnalysis/.classpath
index 132a45b..588528f 100644
--- a/testplugins/org.eclipse.objectteams.otdt.tests/workspace/PCAnalysis/.classpath
+++ b/testplugins/org.eclipse.objectteams.otdt.tests/workspace/PCAnalysis/.classpath
@@ -2,7 +2,7 @@
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="var" path="CONVERTER_JCL_LIB" sourcepath="CONVERTER_JCL_SRC" rootpath="CONVERTER_JCL_SRCROOT"/>
- <classpathentry kind="var" path="JCL_LIB" sourcepath="JCL_SRC" rootpath="JCL_SRCROOT"/>
+ <classpathentry kind="var" path="JCL17_LIB" sourcepath="JCL17_SRC" rootpath="JCL_SRCROOT"/>
<classpathentry kind="output" path="bin"/>
<classpathentry kind="lib" sourcepath="src" path="bins"/>
diff --git a/testplugins/org.eclipse.objectteams.otdt.tests/workspace/ParserTest/.classpath b/testplugins/org.eclipse.objectteams.otdt.tests/workspace/ParserTest/.classpath
index fadab48..217415c 100644
--- a/testplugins/org.eclipse.objectteams.otdt.tests/workspace/ParserTest/.classpath
+++ b/testplugins/org.eclipse.objectteams.otdt.tests/workspace/ParserTest/.classpath
@@ -2,7 +2,7 @@
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="var" path="CONVERTER_JCL_LIB" sourcepath="CONVERTER_JCL_SRC" rootpath="CONVERTER_JCL_SRCROOT"/>
- <classpathentry kind="var" path="JCL_LIB" sourcepath="JCL_SRC" rootpath="JCL_SRCROOT"/>
+ <classpathentry kind="var" path="JCL17_LIB" sourcepath="JCL17_SRC" rootpath="JCL_SRCROOT"/>
<classpathentry kind="output" path="bin"/>
<classpathentry kind="lib" sourcepath="src" path="bins"/>
diff --git a/testplugins/org.eclipse.objectteams.otdt.tests/workspace/Regression/.classpath b/testplugins/org.eclipse.objectteams.otdt.tests/workspace/Regression/.classpath
index d0f0b09..6acf683 100644
--- a/testplugins/org.eclipse.objectteams.otdt.tests/workspace/Regression/.classpath
+++ b/testplugins/org.eclipse.objectteams.otdt.tests/workspace/Regression/.classpath
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
- <classpathentry kind="var" path="JCL_LIB" sourcepath="JCL_SRC" rootpath="JCL_SRCROOT"/>
+ <classpathentry kind="var" path="JCL17_LIB" sourcepath="JCL17_SRC" rootpath="JCL_SRCROOT"/>
<classpathentry kind="output" path="bin"/>
<classpathentry kind="con" path="OTRE"/>
</classpath>
diff --git a/testplugins/org.eclipse.objectteams.otdt.tests/workspace/Team/.classpath b/testplugins/org.eclipse.objectteams.otdt.tests/workspace/Team/.classpath
index 132a45b..588528f 100644
--- a/testplugins/org.eclipse.objectteams.otdt.tests/workspace/Team/.classpath
+++ b/testplugins/org.eclipse.objectteams.otdt.tests/workspace/Team/.classpath
@@ -2,7 +2,7 @@
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="var" path="CONVERTER_JCL_LIB" sourcepath="CONVERTER_JCL_SRC" rootpath="CONVERTER_JCL_SRCROOT"/>
- <classpathentry kind="var" path="JCL_LIB" sourcepath="JCL_SRC" rootpath="JCL_SRCROOT"/>
+ <classpathentry kind="var" path="JCL17_LIB" sourcepath="JCL17_SRC" rootpath="JCL_SRCROOT"/>
<classpathentry kind="output" path="bin"/>
<classpathentry kind="lib" sourcepath="src" path="bins"/>
diff --git a/testplugins/org.eclipse.objectteams.otdt.tests/workspace/TeamProject/.classpath b/testplugins/org.eclipse.objectteams.otdt.tests/workspace/TeamProject/.classpath
index 132a45b..588528f 100644
--- a/testplugins/org.eclipse.objectteams.otdt.tests/workspace/TeamProject/.classpath
+++ b/testplugins/org.eclipse.objectteams.otdt.tests/workspace/TeamProject/.classpath
@@ -2,7 +2,7 @@
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="var" path="CONVERTER_JCL_LIB" sourcepath="CONVERTER_JCL_SRC" rootpath="CONVERTER_JCL_SRCROOT"/>
- <classpathentry kind="var" path="JCL_LIB" sourcepath="JCL_SRC" rootpath="JCL_SRCROOT"/>
+ <classpathentry kind="var" path="JCL17_LIB" sourcepath="JCL17_SRC" rootpath="JCL_SRCROOT"/>
<classpathentry kind="output" path="bin"/>
<classpathentry kind="lib" sourcepath="src" path="bins"/>
diff --git a/testplugins/org.eclipse.objectteams.otdt.tests/workspace/TestDataSample/.classpath b/testplugins/org.eclipse.objectteams.otdt.tests/workspace/TestDataSample/.classpath
index bcdd128..5e306b1 100644
--- a/testplugins/org.eclipse.objectteams.otdt.tests/workspace/TestDataSample/.classpath
+++ b/testplugins/org.eclipse.objectteams.otdt.tests/workspace/TestDataSample/.classpath
@@ -2,7 +2,7 @@
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="var" path="CONVERTER_JCL_LIB" sourcepath="CONVERTER_JCL_SRC" rootpath="CONVERTER_JCL_SRCROOT"/>
- <classpathentry kind="var" path="JCL_LIB" sourcepath="JCL_SRC" rootpath="JCL_SRCROOT"/>
+ <classpathentry kind="var" path="JCL17_LIB" sourcepath="JCL17_SRC" rootpath="JCL_SRCROOT"/>
<classpathentry kind="output" path="bin"/>
<classpathentry kind="lib" sourcepath="src" path="bins"/>
<classpathentry kind="con" path="OTRE"/>