[279156] Clean up of IJavaScriptProject and JavaScriptCore
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/ASTConverterTest2.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/ASTConverterTest2.java
index 73911b3..ae1421d 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/ASTConverterTest2.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/ASTConverterTest2.java
@@ -5232,7 +5232,7 @@
*/
public void test0571() throws CoreException, IOException {
try {
- IJavaScriptProject p = createJavaProject("P", new String[] {""}, new String[] {"CONVERTER_JCL_LIB"}, "");
+ IJavaScriptProject p = createJavaProject("P", new String[] {""}, new String[] {"CONVERTER_JCL_LIB"});
String source =
"public class X {\n" +
" public class Y {\n" +
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/ASTConverterTestAST3_2.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/ASTConverterTestAST3_2.java
index 9ba4940..99eda9a 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/ASTConverterTestAST3_2.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/ASTConverterTestAST3_2.java
@@ -8262,7 +8262,7 @@
}
public void test0659() throws CoreException, JavaScriptModelException {
- IJavaScriptProject javaProject = createJavaProject("P659", new String[] { "src" }, new String[0], "bin");
+ IJavaScriptProject javaProject = createJavaProject("P659", new String[] { "src" }, new String[0]);
try {
ASTParser parser = ASTParser.newParser(AST.JLS3);
parser.setKind(ASTParser.K_COMPILATION_UNIT);
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/AbstractJavaModelTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/AbstractJavaModelTests.java
index fa93ed6..821dda4 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/AbstractJavaModelTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/AbstractJavaModelTests.java
@@ -740,13 +740,13 @@
* Creates a Java project where prj=src=bin and with JCL_LIB on its classpath.
*/
protected IJavaScriptProject createJavaProject(String projectName) throws CoreException {
- return this.createJavaProject(projectName, new String[] {""}, new String[] {"JCL_LIB"}, "");
+ return this.createJavaProject(projectName, new String[] {""}, new String[] {"JCL_LIB"});
}
/*
* Creates a Java project with the given source folders an output location.
* Add those on the project's classpath.
*/
- protected IJavaScriptProject createJavaProject(String projectName, String[] sourceFolders, String output) throws CoreException {
+ protected IJavaScriptProject createJavaProject(String projectName, String[] sourceFolders) throws CoreException {
return
this.createJavaProject(
projectName,
@@ -758,9 +758,7 @@
null/*no inclusion pattern*/,
null/*no exclusion pattern*/,
null/*no exported project*/,
- output,
- null/*no source outputs*/,
- null/*no inclusion pattern*/,
+ null/*no inclusion pattern*/,
null/*no exclusion pattern*/,
"1.4"
);
@@ -781,14 +779,12 @@
null/*no inclusion pattern*/,
null/*no exclusion pattern*/,
null/*no exported project*/,
- output,
- sourceOutputs,
- null/*no inclusion pattern*/,
+ null/*no inclusion pattern*/,
null/*no exclusion pattern*/,
"1.4"
);
}
- protected IJavaScriptProject createJavaProject(String projectName, String[] sourceFolders, String[] libraries, String output) throws CoreException {
+ protected IJavaScriptProject createJavaProject(String projectName, String[] sourceFolders, String[] libraries) throws CoreException {
return
this.createJavaProject(
projectName,
@@ -800,9 +796,7 @@
null/*no inclusion pattern*/,
null/*no exclusion pattern*/,
null/*no exported project*/,
- output,
- null/*no source outputs*/,
- null/*no inclusion pattern*/,
+ null/*no inclusion pattern*/,
null/*no exclusion pattern*/,
"1.4"
);
@@ -819,14 +813,12 @@
null/*no inclusion pattern*/,
null/*no exclusion pattern*/,
null/*no exported project*/,
- output,
- null/*no source outputs*/,
- null/*no inclusion pattern*/,
+ null/*no inclusion pattern*/,
null/*no exclusion pattern*/,
compliance
);
}
- protected IJavaScriptProject createJavaProject(String projectName, String[] sourceFolders, String[] libraries, String[] projects, String projectOutput) throws CoreException {
+ protected IJavaScriptProject createJavaProject(String projectName, String[] sourceFolders, String[] libraries, String[] projects) throws CoreException {
return
this.createJavaProject(
projectName,
@@ -838,8 +830,6 @@
null/*no inclusion pattern*/,
null/*no exclusion pattern*/,
null/*no exported project*/,
- projectOutput,
- null/*no source outputs*/,
null/*no inclusion pattern*/,
null/*no exclusion pattern*/,
"1.4"
@@ -867,8 +857,6 @@
null/*no inclusion pattern*/,
null/*no exclusion pattern*/,
exportedProject,
- projectOutput,
- null/*no source outputs*/,
null/*no inclusion pattern*/,
null/*no exclusion pattern*/,
"1.4"
@@ -886,9 +874,7 @@
null/*no inclusion pattern*/,
null/*no exclusion pattern*/,
null/*no exported project*/,
- projectOutput,
- null/*no source outputs*/,
- null/*no inclusion pattern*/,
+ null/*no inclusion pattern*/,
null/*no exclusion pattern*/,
compliance
);
@@ -905,8 +891,6 @@
null/*no inclusion pattern*/,
null/*no exclusion pattern*/,
exportedProjects,
- projectOutput,
- sourceOutputs,
inclusionPatterns,
exclusionPatterns,
compliance
@@ -922,8 +906,6 @@
final String[][] projectsInclusionPatterns,
final String[][] projectsExclusionPatterns,
final boolean[] exportedProjects,
- final String projectOutput,
- final String[] sourceOutputs,
final String[][] inclusionPatterns,
final String[][] exclusionPatterns,
final String compliance) throws CoreException {
@@ -938,8 +920,6 @@
projectsExclusionPatterns,
true, // combine access restrictions by default
exportedProjects,
- projectOutput,
- sourceOutputs,
inclusionPatterns,
exclusionPatterns,
compliance);
@@ -955,8 +935,6 @@
final String[][] projectsExclusionPatterns,
final boolean combineAccessRestrictions,
final boolean[] exportedProjects,
- final String projectOutput,
- final String[] sourceOutputs,
final String[][] inclusionPatterns,
final String[][] exclusionPatterns,
final String compliance) throws CoreException {
@@ -998,17 +976,7 @@
container = folder;
}
}
- IPath outputPath = null;
- if (sourceOutputs != null) {
- // create out folder for source entry
- outputPath = sourceOutputs[i] == null ? null : new Path(sourceOutputs[i]);
- if (outputPath != null && outputPath.segmentCount() > 0) {
- IFolder output = project.getFolder(outputPath);
- if (!output.exists()) {
- output.create(true, true, null);
- }
- }
- }
+
// inclusion patterns
IPath[] inclusionPaths;
if (inclusionPatterns == null) {
@@ -1041,7 +1009,7 @@
projectPath.append(sourcePath),
inclusionPaths,
exclusionPaths,
- outputPath == null ? null : projectPath.append(outputPath)
+ null
);
}
@@ -1150,15 +1118,6 @@
isExported);
}
- // create project's output folder
- IPath outputPath = new Path(projectOutput);
- if (outputPath.segmentCount() > 0) {
- IFolder output = project.getFolder(outputPath);
- if (!output.exists()) {
- output.create(true, true, null);
- }
- }
-
// set classpath and output location
IJavaScriptProject javaProject = JavaScriptCore.create(project);
@@ -1170,7 +1129,7 @@
entries[entries.length-1] = jreEntry;
- javaProject.setRawIncludepath(entries, projectPath.append(outputPath), null);
+ javaProject.setRawIncludepath(entries, null);
// set compliance level options
if ("1.5".equals(compliance)) {
@@ -1381,37 +1340,28 @@
}
return result;
}
-
- /**
- * Returns the IPath to the external java class library (e.g. jclMin.jar)
- */
- protected IPath getExternalJCLPath() {
- return new Path(getExternalJCLPathString(""));
- }
+
/**
* Returns the IPath to the external java class library (e.g. jclMin.jar)
*/
protected IPath getExternalJCLPath(String compliance) {
return new Path(getExternalJCLPathString(compliance));
}
- /**
- * Returns the java.io path to the external java class library (e.g. jclMin.jar)
- */
- protected String getExternalJCLPathString() {
- return getSystemJsPath();
-// return SystemLibraries.getLibraryPath("system.js");
-// return getExternalJCLPathString("");
- }
+
/**
* Returns the java.io path to the external java class library (e.g. jclMin.jar)
*/
protected String getExternalJCLPathString(String compliance) {
- return getSystemJsPath();
+ return getSystemJsPathString();
// return SystemLibraries.getLibraryPath("system.js");
// return getExternalPath() + "jclMin" + compliance + ".jar";
}
- private String getSystemJsPath()
+ protected IPath getSystemJsPath() {
+ return new Path(getSystemJsPathString());
+ }
+
+ protected String getSystemJsPathString()
{
IPath targetRoot = (new Path(System.getProperty("user.dir"))).removeLastSegments(1);
IPath pluginDir = targetRoot.append(new Path("org.eclipse.wst.jsdt.core"));
@@ -1637,8 +1587,8 @@
char[] toDisplay =
CharOperation.replace(
toPrint.toCharArray(),
- getExternalJCLPathString().toCharArray(),
- "getExternalJCLPathString()".toCharArray());
+ getSystemJsPathString().toCharArray(),
+ "getSystemJsPathString()".toCharArray());
toDisplay =
CharOperation.replace(
toDisplay,
@@ -2156,7 +2106,7 @@
// setupExternalJCL("jclMin");
JavaScriptCore.setIncludepathVariables(
new String[] {"JCL_LIB", "JCL_SRC", "JCL_SRCROOT"},
- new IPath[] {getExternalJCLPath(), getExternalJCLSourcePath(), getExternalJCLRootSourcePath()},
+ new IPath[] {getExternalJCLPath(""), getExternalJCLSourcePath(), getExternalJCLRootSourcePath()},
null);
}
}
@@ -2186,11 +2136,11 @@
char[] tempJCLPath = "<externalJCLPath>".toCharArray();
String idA = new String(CharOperation.replace(
elementA.toStringWithAncestors().toCharArray(),
- getExternalJCLPathString().toCharArray(),
+ getSystemJsPathString().toCharArray(),
tempJCLPath));
String idB = new String(CharOperation.replace(
elementB.toStringWithAncestors().toCharArray(),
- getExternalJCLPathString().toCharArray(),
+ getSystemJsPathString().toCharArray(),
tempJCLPath));
return idA.compareTo(idB);
}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/AccessRestrictionsTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/AccessRestrictionsTests.java
index 8d1c8d9..00423a3 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/AccessRestrictionsTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/AccessRestrictionsTests.java
@@ -68,8 +68,7 @@
createJavaProject(
"P1",
new String[] {"src"},
- new String[] {"JCL_LIB"},
- "bin");
+ new String[] {"JCL_LIB"});
this.problemRequestor = new ProblemRequestor();
x1 = getWorkingCopy(
"/P1/src/p/X1.js",
@@ -99,7 +98,7 @@
"----------\n"
);
IJavaScriptProject p2 = createJavaProject("P2", new String[] {"src"},
- new String[] {"JCL_LIB"}, "bin");
+ new String[] {"JCL_LIB"});
IIncludePathEntry[] classpath = p2.getRawIncludepath();
int length = classpath.length;
System.arraycopy(classpath, 0, classpath = new IIncludePathEntry[length+1], 0, length);
@@ -175,8 +174,7 @@
createJavaProject(
"P1",
new String[] {"src"},
- new String[] {"JCL_LIB"},
- "bin");
+ new String[] {"JCL_LIB"});
this.problemRequestor = new ProblemRequestor();
x1 = getWorkingCopy(
"/P1/src/p/X1.js",
@@ -205,7 +203,7 @@
"----------\n"
);
IJavaScriptProject p2 = createJavaProject("P2", new String[] {"src"},
- new String[] {"JCL_LIB"}, "bin");
+ new String[] {"JCL_LIB"});
IIncludePathEntry[] classpath = p2.getRawIncludepath();
int length = classpath.length;
System.arraycopy(classpath, 0, classpath = new IIncludePathEntry[length+1], 0, length);
@@ -258,8 +256,7 @@
createJavaProject(
"P1",
new String[] {"src"},
- new String[] {"JCL_LIB"},
- "bin");
+ new String[] {"JCL_LIB"});
this.problemRequestor = new ProblemRequestor();
x1 = getWorkingCopy(
"/P1/src/p/X1.js",
@@ -293,7 +290,7 @@
"----------\n"
);
IJavaScriptProject p2 = createJavaProject("P2", new String[] {"src"},
- new String[] {"JCL_LIB"}, "bin");
+ new String[] {"JCL_LIB"});
IIncludePathEntry[] classpath = p2.getRawIncludepath();
int length = classpath.length;
System.arraycopy(classpath, 0, classpath = new IIncludePathEntry[length+1], 0, length);
@@ -376,8 +373,7 @@
createJavaProject(
"P1",
new String[] {"src"},
- new String[] {"JCL_LIB"},
- "bin");
+ new String[] {"JCL_LIB"});
this.problemRequestor = new ProblemRequestor();
x1 = getWorkingCopy(
"/P1/src/p/X1.js",
@@ -394,7 +390,7 @@
"----------\n"
);
IJavaScriptProject p2 = createJavaProject("P2", new String[] {"src"},
- new String[] {"JCL_LIB"}, "bin");
+ new String[] {"JCL_LIB"});
IIncludePathEntry[] classpath = p2.getRawIncludepath();
int length = classpath.length;
System.arraycopy(classpath, 0, classpath = new IIncludePathEntry[length+1], 0, length);
@@ -448,8 +444,7 @@
createJavaProject(
"P1",
new String[] {"src"},
- new String[] {"JCL_LIB"},
- "bin");
+ new String[] {"JCL_LIB"});
this.problemRequestor = new ProblemRequestor();
x1 = getWorkingCopy(
"/P1/src/p/X1.js",
@@ -496,8 +491,7 @@
IJavaScriptProject p2 = createJavaProject(
"P2",
new String[] {"src"},
- new String[] {"JCL_LIB"},
- "bin");
+ new String[] {"JCL_LIB"});
IIncludePathEntry[] classpath = p2.getRawIncludepath();
int length = classpath.length;
System.arraycopy(classpath, 0,
@@ -551,8 +545,7 @@
IJavaScriptProject p1 = createJavaProject(
"P1",
new String[] {"src"},
- new String[] {"JCL_LIB"},
- "bin");
+ new String[] {"JCL_LIB"});
p1.setOption("org.eclipse.wst.jsdt.core.compiler.compliance", "1.5");
p1.setOption("org.eclipse.wst.jsdt.core.compiler.source", "1.5");
p1.setOption("org.eclipse.wst.jsdt.core.compiler.targetPlatform", "1.5");
@@ -574,8 +567,7 @@
IJavaScriptProject p2 = createJavaProject(
"P2",
new String[] {"src"},
- new String[] {"JCL_LIB"},
- "bin");
+ new String[] {"JCL_LIB"});
p2.setOption("org.eclipse.wst.jsdt.core.compiler.compliance", "1.5");
p2.setOption("org.eclipse.wst.jsdt.core.compiler.source", "1.5");
p2.setOption("org.eclipse.wst.jsdt.core.compiler.targetPlatform", "1.5");
@@ -643,8 +635,7 @@
IJavaScriptProject p1 = createJavaProject(
"P1",
new String[] {"src"},
- new String[] {"JCL_LIB"},
- "bin");
+ new String[] {"JCL_LIB"});
p1.setOption("org.eclipse.wst.jsdt.core.compiler.compliance", "1.5");
p1.setOption("org.eclipse.wst.jsdt.core.compiler.source", "1.5");
p1.setOption("org.eclipse.wst.jsdt.core.compiler.targetPlatform", "1.5");
@@ -669,8 +660,7 @@
IJavaScriptProject p2 = createJavaProject(
"P2",
new String[] {"src"},
- new String[] {"JCL_LIB"},
- "bin");
+ new String[] {"JCL_LIB"});
p2.setOption("org.eclipse.wst.jsdt.core.compiler.compliance", "1.5");
p2.setOption("org.eclipse.wst.jsdt.core.compiler.source", "1.5");
p2.setOption("org.eclipse.wst.jsdt.core.compiler.targetPlatform", "1.5");
@@ -738,8 +728,7 @@
IJavaScriptProject p1 = createJavaProject(
"P1",
new String[] {"src"},
- new String[] {"JCL_LIB"},
- "bin");
+ new String[] {"JCL_LIB"});
p1.setOption("org.eclipse.wst.jsdt.core.compiler.compliance", "1.5");
p1.setOption("org.eclipse.wst.jsdt.core.compiler.source", "1.5");
p1.setOption("org.eclipse.wst.jsdt.core.compiler.targetPlatform", "1.5");
@@ -773,7 +762,7 @@
"----------\n"
);
IJavaScriptProject p2 = createJavaProject("P2", new String[] {"src"},
- new String[] {"JCL_LIB"}, "bin");
+ new String[] {"JCL_LIB"});
p2.setOption("org.eclipse.wst.jsdt.core.compiler.compliance", "1.5");
p2.setOption("org.eclipse.wst.jsdt.core.compiler.source", "1.5");
p2.setOption("org.eclipse.wst.jsdt.core.compiler.targetPlatform", "1.5");
@@ -828,8 +817,7 @@
IJavaScriptProject p1 = createJavaProject(
"P1",
new String[] {"src"},
- new String[] {"JCL_LIB"},
- "bin");
+ new String[] {"JCL_LIB"});
p1.setOption("org.eclipse.wst.jsdt.core.compiler.compliance", "1.5");
p1.setOption("org.eclipse.wst.jsdt.core.compiler.source", "1.5");
p1.setOption("org.eclipse.wst.jsdt.core.compiler.targetPlatform", "1.5");
@@ -862,7 +850,7 @@
"----------\n"
);
IJavaScriptProject p2 = createJavaProject("P2", new String[] {"src"},
- new String[] {"JCL_LIB"}, "bin");
+ new String[] {"JCL_LIB"});
p2.setOption("org.eclipse.wst.jsdt.core.compiler.compliance", "1.5");
p2.setOption("org.eclipse.wst.jsdt.core.compiler.source", "1.5");
p2.setOption("org.eclipse.wst.jsdt.core.compiler.targetPlatform", "1.5");
@@ -917,8 +905,7 @@
IJavaScriptProject p1 = createJavaProject(
"P1",
new String[] {"src"},
- new String[] {"JCL_LIB"},
- "bin");
+ new String[] {"JCL_LIB"});
p1.setOption("org.eclipse.wst.jsdt.core.compiler.compliance", "1.5");
p1.setOption("org.eclipse.wst.jsdt.core.compiler.source", "1.5");
p1.setOption("org.eclipse.wst.jsdt.core.compiler.targetPlatform", "1.5");
@@ -956,7 +943,7 @@
"----------\n"
);
IJavaScriptProject p2 = createJavaProject("P2", new String[] {"src"},
- new String[] {"JCL_LIB"}, "bin");
+ new String[] {"JCL_LIB"});
p2.setOption("org.eclipse.wst.jsdt.core.compiler.compliance", "1.5");
p2.setOption("org.eclipse.wst.jsdt.core.compiler.source", "1.5");
p2.setOption("org.eclipse.wst.jsdt.core.compiler.targetPlatform", "1.5");
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/AttachSourceTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/AttachSourceTests.java
index c85f9d5..dec120e 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/AttachSourceTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/AttachSourceTests.java
@@ -646,7 +646,7 @@
);
IProject p1 = getProject("P1");
p1.build(IncrementalProjectBuilder.FULL_BUILD, null);
- IJavaScriptProject javaProject = createJavaProject("P2", new String[]{""}, new String[]{"/P1"}, "");
+ IJavaScriptProject javaProject = createJavaProject("P2", new String[]{""}, new String[]{"/P1"});
IPackageFragmentRoot root = javaProject.getPackageFragmentRoot(p1);
attachSource(root, "/P1", null);
IClassFile cf = root.getPackageFragment("p").getClassFile("X.class");
@@ -677,7 +677,7 @@
);
IProject p1 = getProject("P1");
p1.build(IncrementalProjectBuilder.FULL_BUILD, null);
- IJavaScriptProject javaProject = createJavaProject("P2", new String[]{""}, new String[]{"/P1"}, "");
+ IJavaScriptProject javaProject = createJavaProject("P2", new String[]{""}, new String[]{"/P1"});
IPackageFragmentRoot root = javaProject.getPackageFragmentRoot(p1);
attachSource(root, "/P1", null);
IClassFile cf = root.getPackageFragment("").getClassFile("X.class");
@@ -698,7 +698,7 @@
*/
public void testProjectAsSourceAttachment() throws CoreException {
try {
- IJavaScriptProject javaProject = createJavaProject("Test", new String[]{""}, new String[]{"/AttachSourceTests/test.jar"}, "");
+ IJavaScriptProject javaProject = createJavaProject("Test", new String[]{""}, new String[]{"/AttachSourceTests/test.jar"});
createFolder("/Test/test1");
createFile("/Test/test1/Test.js",
"package test1;\n" +
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/BufferTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/BufferTests.java
index 07e9ac3..7d1cd0a 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/BufferTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/BufferTests.java
@@ -61,7 +61,7 @@
public void setUpSuite() throws Exception {
super.setUpSuite();
try {
- this.createJavaProject("P", new String[] { "" }, "");
+ this.createJavaProject("P", new String[] { "" });
this.createFolder("P/x/y");
} catch (CoreException e) {
e.printStackTrace();
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ClassFileTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ClassFileTests.java
index c42a723..0f2239d 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ClassFileTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ClassFileTests.java
@@ -622,7 +622,7 @@
*/
public void testSourceRangeNotOnClasspath() throws CoreException {
try {
- createJavaProject("P2", new String[] {"src"}, "bin");
+ createJavaProject("P2", new String[] {"src"});
createFile("/P2/bin/X.class", "");
IClassFile classX = getClassFile("/P2/bin/X.class");
assertNull("Unxepected source range", classX.getSourceRange());
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ClassNameTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ClassNameTests.java
index fe62bbd..8c93245 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ClassNameTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ClassNameTests.java
@@ -52,7 +52,7 @@
for (int i=0; i<SF_LENGTH; i++) {
sourceFolders[i] = "src" + i;
}
- TEST_PROJECT = createJavaProject("TestProject", sourceFolders, new String[] {"JCL_LIB"}, "bin");
+ TEST_PROJECT = createJavaProject("TestProject", sourceFolders, new String[] {"JCL_LIB"});
createFolder("/TestProject/src0/org/eclipse/jdt/core/test0");
createFile(
"/TestProject/src0/org/eclipse/jdt/core/test0/Foo.js",
@@ -527,7 +527,7 @@
tab[369]=0;
tab[370]=0;
tab[371]=0;
- IJavaScriptProject javaProject = createJavaProject("P", new String[] {"src"}, "bin");
+ IJavaScriptProject javaProject = createJavaProject("P", new String[] {"src"});
IFile jarFile = createFile("P/lib.jar", tab);
javaProject.setRawIncludepath(new IIncludePathEntry[] {JavaScriptCore.newLibraryEntry(jarFile.getFullPath(), null, null, false)}, new NullProgressMonitor());
javaProject.findType("p1.A$");
@@ -543,7 +543,7 @@
*/
public void testFindTypeWithDot() throws JavaScriptModelException, CoreException {
try {
- IJavaScriptProject javaProject = createJavaProject("P", new String[] {""}, "");
+ IJavaScriptProject javaProject = createJavaProject("P", new String[] {""});
this.createFolder("/P/p");
this.createFile(
"/P/p/X.js",
@@ -1048,7 +1048,7 @@
tab[475]=0;
tab[476]=0;
tab[477]=0;
- IJavaScriptProject javaProject = createJavaProject("P1", new String[] {"src"}, "bin");
+ IJavaScriptProject javaProject = createJavaProject("P1", new String[] {"src"});
IFile jarFile = createFile("P1/lib.jar", tab);
javaProject.setRawIncludepath(new IIncludePathEntry[] {JavaScriptCore.newLibraryEntry(jarFile.getFullPath(), null, null, false)}, new NullProgressMonitor());
assertNotNull(javaProject.findType("p1.p2.p3.X"));
@@ -1108,7 +1108,7 @@
// duplicate bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=72179
public void testFindSecondaryType_Bug72179() throws JavaScriptModelException, CoreException {
try {
- IJavaScriptProject javaProject = createJavaProject("P", new String[] {""}, "");
+ IJavaScriptProject javaProject = createJavaProject("P", new String[] {""});
createFolder("/P/p1");
createFile(
"/P/p1/jc.js",
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ClasspathInitializerTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ClasspathInitializerTests.java
index 494d03f..24fe843 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ClasspathInitializerTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ClasspathInitializerTests.java
@@ -178,8 +178,7 @@
IJavaScriptProject p2 = createJavaProject(
"P2",
new String[] {},
- new String[] {"org.eclipse.wst.jsdt.core.tests.model.TEST_CONTAINER"},
- "");
+ new String[] {"org.eclipse.wst.jsdt.core.tests.model.TEST_CONTAINER"});
IPackageFragmentRoot root = p2.getPackageFragmentRoot(getFile("/P1/lib.jar"));
assertTrue("/P1/lib.jar should exist", root.exists());
} finally {
@@ -196,8 +195,7 @@
IJavaScriptProject p2 = createJavaProject(
"P2",
new String[] {},
- new String[] {"org.eclipse.wst.jsdt.core.tests.model.TEST_CONTAINER"},
- "");
+ new String[] {"org.eclipse.wst.jsdt.core.tests.model.TEST_CONTAINER"});
// simulate state on startup
simulateExitRestart();
@@ -223,8 +221,7 @@
createJavaProject(
"P2",
new String[] {},
- new String[] {"org.eclipse.wst.jsdt.core.tests.model.TEST_CONTAINER"},
- "");
+ new String[] {"org.eclipse.wst.jsdt.core.tests.model.TEST_CONTAINER"});
// change value of TEST_CONTAINER
createFile("/P1/lib2.jar", "");
@@ -260,8 +257,7 @@
createJavaProject(
"P2",
new String[] {""},
- new String[] {"org.eclipse.wst.jsdt.core.tests.model.TEST_CONTAINER"},
- "");
+ new String[] {"org.eclipse.wst.jsdt.core.tests.model.TEST_CONTAINER"});
// simulate state on startup
simulateExitRestart();
@@ -294,8 +290,7 @@
createJavaProject(
"P1",
new String[] {""},
- new String[] {"org.eclipse.wst.jsdt.core.tests.model.TEST_CONTAINER"},
- "");
+ new String[] {"org.eclipse.wst.jsdt.core.tests.model.TEST_CONTAINER"});
// simulate state on startup
simulateExitRestart();
@@ -352,8 +347,7 @@
createJavaProject(
"P2",
new String[] {"src"},
- new String[] {"org.eclipse.wst.jsdt.core.tests.model.TEST_CONTAINER"},
- "bin");
+ new String[] {"org.eclipse.wst.jsdt.core.tests.model.TEST_CONTAINER"});
createFile(
"/P2/src/X,java",
"public class X {\n" +
@@ -399,8 +393,7 @@
IJavaScriptProject p1 = createJavaProject(
"P1",
new String[] {},
- new String[] {"org.eclipse.wst.jsdt.core.tests.model.TEST_CONTAINER"},
- "");
+ new String[] {"org.eclipse.wst.jsdt.core.tests.model.TEST_CONTAINER"});
p1.getResolvedIncludepath(true);
} catch (OperationCanceledException e) {
gotException = true;
@@ -584,7 +577,7 @@
});
getWorkspace().run(new IWorkspaceRunnable() {
public void run(IProgressMonitor monitor) throws CoreException {
- p2.setRawIncludepath(new IIncludePathEntry[] {JavaScriptCore.newSourceEntry(new Path("/P2/src"))}, new Path("/P2/bin"), null);
+ p2.setRawIncludepath(new IIncludePathEntry[] {JavaScriptCore.newSourceEntry(new Path("/P2/src"))}, null);
createProject("P3");
editFile(
"/P3/.project",
@@ -638,8 +631,7 @@
createJavaProject(
"P",
new String[] {},
- new String[] {"org.eclipse.wst.jsdt.core.tests.model.TEST_CONTAINER"},
- "");
+ new String[] {"org.eclipse.wst.jsdt.core.tests.model.TEST_CONTAINER"});
simulateExitRestart();
ClasspathInitializerTests.DefaultContainerInitializer initializer = new ClasspathInitializerTests.DefaultContainerInitializer(new String[] {}) {
public void initialize(IPath containerPath,IJavaScriptProject project) throws CoreException {
@@ -667,8 +659,7 @@
IJavaScriptProject project = createJavaProject(
"P1",
new String[] {},
- new String[] {"org.eclipse.wst.jsdt.core.tests.model.TEST_CONTAINER"},
- "");
+ new String[] {"org.eclipse.wst.jsdt.core.tests.model.TEST_CONTAINER"});
createFile("/P1/lib.jar", "");
IPackageFragmentRoot root = project.getPackageFragmentRoot(getFile("/P1/lib.jar"));
assertTrue("/P1/lib.jar should exist", root.exists());
@@ -689,8 +680,7 @@
createJavaProject(
"P1",
new String[] {},
- new String[] {"org.eclipse.wst.jsdt.core.tests.model.TEST_CONTAINER"},
- "");
+ new String[] {"org.eclipse.wst.jsdt.core.tests.model.TEST_CONTAINER"});
createFile("/P1/lib.jar", "");
assertTrue("/P1/lib.jar should exist", root.exists());
assertTrue("Should have been initialized", initializer.initialized);
@@ -720,8 +710,7 @@
IJavaScriptProject project = createJavaProject(
"P1",
new String[] {},
- new String[] {"org.eclipse.wst.jsdt.core.tests.model.TEST_CONTAINER"},
- "");
+ new String[] {"org.eclipse.wst.jsdt.core.tests.model.TEST_CONTAINER"});
// simulate state on startup
simulateExitRestart();
@@ -766,8 +755,7 @@
IJavaScriptProject p2 = createJavaProject(
"P2",
new String[] {},
- new String[] {"org.eclipse.wst.jsdt.core.tests.model.TEST_CONTAINER"},
- "");
+ new String[] {"org.eclipse.wst.jsdt.core.tests.model.TEST_CONTAINER"});
p2.getResolvedIncludepath(true);
assertEquals("Unexpected number of initalizations", 1, container.initializeCount);
} finally {
@@ -796,8 +784,7 @@
IJavaScriptProject p1 = createJavaProject(
"P1",
new String[] {},
- new String[] {"org.eclipse.wst.jsdt.core.tests.model.TEST_CONTAINER"},
- "");
+ new String[] {"org.eclipse.wst.jsdt.core.tests.model.TEST_CONTAINER"});
IJsGlobalScopeContainer JsGlobalScopeContainer = JavaScriptCore.getJsGlobalScopeContainer(new Path("org.eclipse.wst.jsdt.core.tests.model.TEST_CONTAINER"), p1);
assertClasspathEquals(JsGlobalScopeContainer.getIncludepathEntries(), "");
} finally {
@@ -816,8 +803,7 @@
IJavaScriptProject p1 = createJavaProject(
"P1",
new String[] {},
- new String[] {"org.eclipse.wst.jsdt.core.tests.model.TEST_CONTAINER"},
- "");
+ new String[] {"org.eclipse.wst.jsdt.core.tests.model.TEST_CONTAINER"});
p1.getResolvedIncludepath(true);
} catch (JavaScriptModelException e) {
exception = e;
@@ -836,7 +822,7 @@
createProject("P1");
createFile("/P1/lib.jar", "");
VariablesInitializer.setInitializer(new DefaultVariableInitializer(new String[] {"TEST_LIB", "/P1/lib.jar"}));
- IJavaScriptProject p2 = createJavaProject("P2", new String[] {}, new String[] {"TEST_LIB"}, "");
+ IJavaScriptProject p2 = createJavaProject("P2", new String[] {}, new String[] {"TEST_LIB"});
IPackageFragmentRoot root = p2.getPackageFragmentRoot(getFile("/P1/lib.jar"));
assertTrue("/P1/lib.jar should exist", root.exists());
} finally {
@@ -855,7 +841,7 @@
"TEST_SRC", "/P1/src.zip",
"TEST_ROOT", "src",
}));
- IJavaScriptProject p2 = createJavaProject("P2", new String[] {}, new String[] {"TEST_LIB,TEST_SRC,TEST_ROOT"}, "");
+ IJavaScriptProject p2 = createJavaProject("P2", new String[] {}, new String[] {"TEST_LIB,TEST_SRC,TEST_ROOT"});
IPackageFragmentRoot root = p2.getPackageFragmentRoot(getFile("/P1/lib.jar"));
assertEquals("Unexpected source attachment path", "/P1/src.zip", root.getSourceAttachmentPath().toString());
assertEquals("Unexpected source attachment root path", "src", root.getSourceAttachmentRootPath().toString());
@@ -876,7 +862,7 @@
"TEST_ROOT", "src",
};
VariablesInitializer.setInitializer(new DefaultVariableInitializer(variableValues));
- createJavaProject("P2", new String[] {}, new String[] {"TEST_LIB,TEST_SRC,TEST_ROOT"}, "");
+ createJavaProject("P2", new String[] {}, new String[] {"TEST_LIB,TEST_SRC,TEST_ROOT"});
// simulate state on startup
simulateExitRestart();
@@ -908,7 +894,7 @@
JavaScriptCore.setIncludepathVariable(variable, path, null);
}
});
- createJavaProject("P", new String[] {}, new String[] {"TEST_LIB,TEST_SRC,TEST_ROOT"}, "");
+ createJavaProject("P", new String[] {}, new String[] {"TEST_LIB,TEST_SRC,TEST_ROOT"});
assertEquals(
"Initializing TEST_LIB\n" +
"Setting variable TEST_LIB to test_lib\n",
@@ -930,7 +916,7 @@
JavaScriptCore.setIncludepathVariable(variable, path, null);
}
});
- createJavaProject("P", new String[] {}, new String[] {"TEST_LIB,TEST_SRC,TEST_ROOT"}, "");
+ createJavaProject("P", new String[] {}, new String[] {"TEST_LIB,TEST_SRC,TEST_ROOT"});
assertEquals(
"Initializing TEST_LIB\n" +
"Initializing TEST_SRC\n" +
@@ -982,7 +968,7 @@
"TEST_ROOT", "src",
};
VariablesInitializer.setInitializer(new DefaultVariableInitializer(variableValues));
- createJavaProject("P2", new String[] {}, new String[] {"TEST_LIB,TEST_SRC,TEST_ROOT"}, "");
+ createJavaProject("P2", new String[] {}, new String[] {"TEST_LIB,TEST_SRC,TEST_ROOT"});
// change value of TEST_LIB
createFile("/P1/lib2.jar", "");
@@ -1027,7 +1013,7 @@
throw new OperationCanceledException("test");
}
});
- IJavaScriptProject p1 = createJavaProject("P1", new String[] {}, new String[] {"TEST_LIB"}, "");
+ IJavaScriptProject p1 = createJavaProject("P1", new String[] {}, new String[] {"TEST_LIB"});
p1.getResolvedIncludepath(true);
} catch (OperationCanceledException e) {
gotException = true;
@@ -1050,7 +1036,7 @@
JavaScriptCore.removeIncludepathVariable("TEST_LIB", null);
}
});
- IJavaScriptProject p1 = createJavaProject("P1", new String[] {}, new String[] {"TEST_LIB"}, "");
+ IJavaScriptProject p1 = createJavaProject("P1", new String[] {}, new String[] {"TEST_LIB"});
IIncludePathEntry[] resolvedClasspath = p1.getResolvedIncludepath(true);
assertClasspathEquals(
resolvedClasspath,
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ClasspathTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ClasspathTests.java
index 04d2362..95a4cff 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ClasspathTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ClasspathTests.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 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
@@ -173,7 +173,7 @@
* the root and ensure that it comes alive.
*/
public void testAddRoot1() throws CoreException {
- IJavaScriptProject project = this.createJavaProject("P", new String[] {"src"}, "bin");
+ IJavaScriptProject project = this.createJavaProject("P", new String[] {"src"});
IIncludePathEntry[] originalCP= project.getRawIncludepath();
try {
@@ -203,7 +203,7 @@
*/
public void testAddRoot2() throws CoreException {
try {
- IJavaScriptProject project = createJavaProject("P", new String[] {}, "bin");
+ IJavaScriptProject project = createJavaProject("P", new String[] {});
project.setRawIncludepath(createClasspath("P", new String[] {"/P/src", ""}), null);
waitForAutoBuild();
@@ -222,10 +222,10 @@
*/
public void testClasspathChangeExternalResources() throws CoreException {
try {
- IJavaScriptProject proj = this.createJavaProject("P", new String[] {"src"}, "bin");
+ IJavaScriptProject proj = this.createJavaProject("P", new String[] {"src"});
IIncludePathEntry[] newEntries = new IIncludePathEntry[2];
- newEntries[0] = JavaScriptCore.newLibraryEntry(getExternalJCLPath(), null, null, false);
+ newEntries[0] = JavaScriptCore.newLibraryEntry(getSystemJsPath(), null, null, false);
newEntries[1] = JavaScriptCore.newLibraryEntry(getExternalJCLSourcePath(), null, null, false);
setClasspath(proj, newEntries);
startDeltas();
@@ -236,9 +236,9 @@
assertDeltas(
"Unexpected delta",
"P[*]: {CHILDREN | CONTENT | CLASSPATH CHANGED}\n" +
- " "+ getExternalJCLPathString() +"[*]: {REORDERED}\n" +
+ " "+ getSystemJsPathString() +"[*]: {REORDERED}\n" +
" "+ getExternalJCLSourcePathString() +"[*]: {REORDERED}\n" +
- " ResourceDelta(/P/.classpath)[*]"
+ " ResourceDelta(/P/.settings)[*]"
);
} finally {
stopDeltas();
@@ -251,26 +251,19 @@
*/
public void testClasspathCorruption() throws CoreException {
try {
- JavaProject p1 = (JavaProject)this.createJavaProject("P1", new String[]{""}, new String[]{}, new String[]{}, "");
- this.createJavaProject("P2", new String[]{""}, new String[]{}, new String[]{}, "");
+ JavaProject p1 = (JavaProject)this.createJavaProject("P1", new String[]{""}, new String[]{}, new String[]{});
+ this.createJavaProject("P2", new String[]{""}, new String[]{}, new String[]{});
this.createFile("P2/foo.txt", "not a project");
String newCPContent =
"<?xml version=\"1.0\" encoding=\"UTF-8\"?> \n"
+"<classpath> \n"
+" <classpathentry kind=\"src\" path=\"\"/> \n"
+" <classpathentry kind=\"src\" path=\"/P2/foo.txt\"/> \n" // corruption here: target isn't a project
- +" <classpathentry kind=\"output\" path=\"\"/> \n"
+"</classpath> \n";
- IFile fileRsc = p1.getProject().getFile(JavaProject.CLASSPATH_FILENAME);
+ IFile fileRsc = p1.getProject().getFile(JavaProject.SHARED_PROPERTIES_DIRECTORY + "/" + JavaProject.CLASSPATH_FILENAME);
fileRsc.setContents(new ByteArrayInputStream(newCPContent.getBytes()), true, false, null);
-/*
- File file = p1.getProject().getFile(JavaProject.CLASSPATH_FILENAME).getLocation().toFile();
- if (file.exists()){
- char[] classpath = Util.getFileCharContent(file, "UTF-8");
- System.out.println(new String(classpath));
- }
-*/
+
p1.close();
JavaModelManager.PerProjectInfo perProjectInfo = JavaModelManager.getJavaModelManager().getPerProjectInfo(p1.getProject(), true/*create if missing*/);
perProjectInfo.setClasspath(null, null, null, null, null, null, null);
@@ -290,7 +283,7 @@
}
/*
- * Test classpath read for non-java project or java project not opened yet (40658)
+ * Test classpath read for non-javascript project or javascript project not opened yet (40658)
*/
public void testClasspathFileRead() throws CoreException {
try {
@@ -299,10 +292,10 @@
"<?xml version=\"1.0\" encoding=\"UTF-8\"?> \n"
+"<classpath> \n"
+" <classpathentry kind=\"src\" path=\"src\"/> \n"
- +" <classpathentry kind=\"output\" path=\"bin\"/> \n"
+"</classpath> \n";
- this.createFile("/P1/"+JavaProject.CLASSPATH_FILENAME, newCPContent);
+ this.createFolder("/P1/.settings/");
+ this.createFile("/P1/.settings/"+JavaProject.CLASSPATH_FILENAME, newCPContent);
final IJavaScriptProject jproj = JavaScriptCore.create(proj);
IWorkspace workspace = ResourcesPlugin.getWorkspace();
workspace.run(new IWorkspaceRunnable() {
@@ -311,8 +304,6 @@
IIncludePathEntry[] entries = jproj.readRawIncludepath(); // force to read classpath
IIncludePathEntry entry = entries[0];
assertEquals("first classpath entry should have been read", "/P1/src", entry.getPath().toString());
-
- assertEquals("output location should have been read", "/P1/bin", jproj.readOutputLocation().toString());
}
}, null);
} finally {
@@ -326,29 +317,25 @@
*/
public void testClasspathForceReload() throws CoreException {
try {
- final JavaProject p1 = (JavaProject)this.createJavaProject("P1", new String[]{""}, new String[]{}, new String[]{}, "");
+ final JavaProject p1 = (JavaProject)this.createJavaProject("P1", new String[]{""}, new String[]{}, new String[]{});
IWorkspace workspace = ResourcesPlugin.getWorkspace();
workspace.run(new IWorkspaceRunnable() {
public void run(IProgressMonitor monitor) throws CoreException {
p1.getRawIncludepath(); // force to read classpath
createFolder("P1/src");
- createFolder("P1/bin");
String newCPContent =
"<?xml version=\"1.0\" encoding=\"UTF-8\"?> \n"
+"<classpath> \n"
+" <classpathentry kind=\"src\" path=\"src\"/> \n"
- +" <classpathentry kind=\"output\" path=\"bin\"/> \n"
+"</classpath> \n";
- IFile fileRsc = p1.getProject().getFile(JavaProject.CLASSPATH_FILENAME);
+ IFile fileRsc = p1.getProject().getFile(JavaProject.SHARED_PROPERTIES_DIRECTORY + "/" + JavaProject.CLASSPATH_FILENAME);
fileRsc.setContents(new ByteArrayInputStream(newCPContent.getBytes()), true, false, null);
p1.close();
- assertEquals("output location should not have been refreshed", "/P1", p1.getOutputLocation().toString());
-
- p1.setRawIncludepath(p1.readRawIncludepath(), p1.readOutputLocation(), null);
- assertEquals("output location should have been refreshed", "/P1/bin", p1.getOutputLocation().toString());
+ IIncludePathEntry[] entries = p1.readRawIncludepath(); // force to read classpath
+ assertEquals("source location should not have been refreshed", "/P1", entries[0].getPath().toString());
}
}, null);
} finally {
@@ -363,9 +350,8 @@
*/
public void testClasspathCreateLibraryEntry() throws CoreException {
try {
- IJavaScriptProject proj = this.createJavaProject("P", new String[] {"src"}, "bin");
- this.createFile("P/src/X.js", "public class X {}");
- this.createFile("P/src/X.class", "");
+ IJavaScriptProject proj = this.createJavaProject("P", new String[] {"src"});
+ this.createFile("P/src/X.js", "function X() {}");
IFolder rootFolder = proj.getProject().getFolder(new Path("src"));
IPackageFragmentRoot root = proj.getPackageFragmentRoot(rootFolder);
@@ -379,10 +365,6 @@
"Unexpected numbers of compilation units",
1,
pkg.getJavaScriptUnits().length);
- assertEquals(
- "Unexpected numbers of .class files",
- 0,
- pkg.getClassFiles().length);
this.setClasspath(
proj,
@@ -397,10 +379,6 @@
"Unexpected numbers of compilation units",
0,
pkg.getJavaScriptUnits().length);
- assertEquals(
- "Unexpected numbers of .class files",
- 1,
- pkg.getClassFiles().length);
//ensure that the new kind has been persisted in the classpath file
proj.close();
@@ -413,47 +391,13 @@
this.deleteProject("P");
}
}
-/**
- * Ensures that the setting the classpath with a new library entry for a
- * local jar works and generates the correct deltas.
- */
-public void testClasspathCreateLocalJarLibraryEntry() throws CoreException {
- IJavaScriptProject proj = this.createJavaProject("P", new String[] {""}, "");
- IPackageFragmentRoot root = getPackageFragmentRoot("P", "");
- IIncludePathEntry newEntry= JavaScriptCore.newLibraryEntry(getExternalJCLPath(), null, null, false);
- IIncludePathEntry[] newEntries= new IIncludePathEntry[]{newEntry};
- IPackageFragmentRoot newRoot= proj.getPackageFragmentRoot(getExternalJCLPathString());
-
- startDeltas();
-
- setClasspath(proj,newEntries);
-
- try {
- assertTrue(
- "should be one delta with 2 grand-children - removed & added",
- this.deltaListener.deltas.length == 1 &&
- this.deltaListener.deltas[0].getAffectedChildren().length == 1 &&
- this.deltaListener.deltas[0].getAffectedChildren()[0].getAffectedChildren().length == 2);
- IJavaScriptElementDelta d= null;
- assertTrue("root should be removed from classpath",(d= getDeltaFor(root, true)) != null &&
- (d.getFlags() & IJavaScriptElementDelta.F_REMOVED_FROM_CLASSPATH) > 0);
-
-
- assertTrue("root should be added to classpath", (d= getDeltaFor(newRoot, true)) != null &&
- (d.getFlags() & IJavaScriptElementDelta.F_ADDED_TO_CLASSPATH) > 0);
- } finally {
- stopDeltas();
-
- this.deleteProject("P");
- }
-}
/**
* Tests the cross project classpath setting
*/
public void testClasspathCrossProject() throws CoreException {
- IJavaScriptProject project = this.createJavaProject("P1", new String[] {""}, "");
- this.createJavaProject("P2", new String[] {}, "");
+ IJavaScriptProject project = this.createJavaProject("P1", new String[] {""});
+ this.createJavaProject("P2", new String[] {});
try {
startDeltas();
IPackageFragmentRoot oldRoot= getPackageFragmentRoot("P1", "");
@@ -475,7 +419,7 @@
* Delete a root and ensure the classpath is not updated (i.e. entry isn't removed).
*/
public void testClasspathDeleteNestedRoot() throws CoreException {
- IJavaScriptProject project = this.createJavaProject("P", new String[] {"nested/src"}, new String[] {getExternalJCLPathString()}, "bin");
+ IJavaScriptProject project = this.createJavaProject("P", new String[] {"nested/src"}, new String[] {});
IPackageFragmentRoot root= getPackageFragmentRoot("P", "nested/src");
IIncludePathEntry[] originalCP= project.getRawIncludepath();
@@ -499,10 +443,10 @@
*/
public void testClasspathDiamond() throws CoreException {
try {
- this.createJavaProject("P1", new String[]{""}, "");
- this.createJavaProject("P2", new String[]{""}, new String[]{}, new String[]{"/P1"}, "");
- this.createJavaProject("P3", new String[]{""}, new String[]{}, new String[]{"/P1", "/P2"}, "");
- IJavaScriptProject p4 = this.createJavaProject("P4", new String[]{""}, new String[]{}, new String[]{"/P2", "/P3"}, "");
+ this.createJavaProject("P1", new String[]{""});
+ this.createJavaProject("P2", new String[]{""}, new String[]{}, new String[]{"/P1"});
+ this.createJavaProject("P3", new String[]{""}, new String[]{}, new String[]{"/P1", "/P2"});
+ IJavaScriptProject p4 = this.createJavaProject("P4", new String[]{""}, new String[]{}, new String[]{"/P2", "/P3"});
assertTrue("Should not detect cycle", !p4.hasIncludepathCycle(null));
@@ -517,7 +461,7 @@
* not updated (i.e. entry isn't removed).
*/
public void testClasspathDeleteNestedRootParent() throws CoreException {
- IJavaScriptProject project = this.createJavaProject("P", new String[] {"nested/src"}, new String[] {getExternalJCLPathString()}, "bin");
+ IJavaScriptProject project = this.createJavaProject("P", new String[] {"nested/src"}, new String[] {});
IPackageFragmentRoot root= getPackageFragmentRoot("P", "nested/src");
IIncludePathEntry[] originalCP= project.getRawIncludepath();
@@ -544,7 +488,7 @@
*/
public void testClasspathExternalize() throws CoreException {
try {
- IJavaScriptProject project= this.createJavaProject("P", new String[] {}, new String[] {getExternalJCLPathString()}, "");
+ IJavaScriptProject project= this.createJavaProject("P", new String[] {}, new String[] {getSystemJsPathString()});
IIncludePathEntry[] classpath= project.getRawIncludepath();
IIncludePathEntry jar= null;
for (int i= 0; i < classpath.length; i++) {
@@ -571,7 +515,7 @@
* Move a root and ensure the classpath is not updated (i.e. entry not renamed).
*/
public void testClasspathMoveNestedRoot() throws CoreException {
- IJavaScriptProject project = this.createJavaProject("P", new String[] {"nested/src"}, new String[] {getExternalJCLPathString()}, "bin");
+ IJavaScriptProject project = this.createJavaProject("P", new String[] {"nested/src"}, new String[] {});
IPackageFragmentRoot root= getPackageFragmentRoot("P", "nested/src");
IIncludePathEntry[] originalCP= project.getRawIncludepath();
@@ -613,7 +557,7 @@
*/
public void testClasspathMoveNestedRootParent() throws CoreException {
try {
- IJavaScriptProject project =this.createJavaProject("P", new String[] {"nested/src"}, new String[] {getExternalJCLPathString()}, "bin");
+ IJavaScriptProject project =this.createJavaProject("P", new String[] {"nested/src"}, new String[] {});
IPackageFragmentRoot root= getPackageFragmentRoot("P", "nested/src");
IIncludePathEntry[] originalCP= project.getRawIncludepath();
@@ -641,7 +585,7 @@
*/
public void testClasspathNoChanges() throws CoreException {
try {
- IJavaScriptProject p = this.createJavaProject("P", new String[] {""}, "");
+ IJavaScriptProject p = this.createJavaProject("P", new String[] {""});
IIncludePathEntry[] oldClasspath= p.getRawIncludepath();
startDeltas();
p.setRawIncludepath(oldClasspath, null);
@@ -656,7 +600,7 @@
* the correct deltas.
*/
public void testClasspathReordering() throws CoreException {
- IJavaScriptProject proj = this.createJavaProject("P", new String[] {"src"}, new String[] {getExternalJCLPathString()}, "bin");
+ IJavaScriptProject proj = this.createJavaProject("P", new String[] {"src"}, new String[] {getSystemJsPathString()});
IIncludePathEntry[] originalCP = proj.getRawIncludepath();
IPackageFragmentRoot root = getPackageFragmentRoot("P", "src");
try {
@@ -683,18 +627,18 @@
*/
public void testClasspathValidation01() throws CoreException {
try {
- IJavaScriptProject proj = this.createJavaProject("P", new String[] {"src"}, "bin");
+ IJavaScriptProject proj = this.createJavaProject("P", new String[] {"src"});
IIncludePathEntry[] originalCP = proj.getRawIncludepath();
IIncludePathEntry[] newCP = new IIncludePathEntry[originalCP.length+1];
System.arraycopy(originalCP, 0, newCP, 0, originalCP.length);
newCP[originalCP.length] = newCP[0];
- IJavaScriptModelStatus status = JavaScriptConventions.validateClasspath(proj, newCP, proj.getOutputLocation());
+ IJavaScriptModelStatus status = JavaScriptConventions.validateClasspath(proj, newCP, null);
assertStatus(
"should have detected duplicate entries on the classpath",
- "Build path contains duplicate entry: \'src\' for project P",
+ "Include path contains duplicate entry: \'src\' for project P",
status);
} finally {
this.deleteProject("P");
@@ -706,14 +650,14 @@
*/
public void testClasspathValidation02() throws CoreException {
try {
- IJavaScriptProject proj = this.createJavaProject("P", new String[] {"src"}, "bin");
+ IJavaScriptProject proj = this.createJavaProject("P", new String[] {"src"});
IIncludePathEntry[] originalCP = proj.getRawIncludepath();
IIncludePathEntry[] newCP = new IIncludePathEntry[originalCP.length+1];
System.arraycopy(originalCP, 0, newCP, 0, originalCP.length);
newCP[originalCP.length] = JavaScriptCore.newSourceEntry(new Path("/P"));
- IJavaScriptModelStatus status = JavaScriptConventions.validateClasspath(proj, newCP, proj.getOutputLocation());
+ IJavaScriptModelStatus status = JavaScriptConventions.validateClasspath(proj, newCP, null);
assertStatus(
"should have detected nested source folders on the classpath",
@@ -729,14 +673,14 @@
*/
public void testClasspathValidation03() throws CoreException {
try {
- IJavaScriptProject proj = this.createJavaProject("P", new String[] {"src"}, "bin");
+ IJavaScriptProject proj = this.createJavaProject("P", new String[] {"src"});
IIncludePathEntry[] originalCP = proj.getRawIncludepath();
IIncludePathEntry[] newCP = new IIncludePathEntry[originalCP.length+1];
System.arraycopy(originalCP, 0, newCP, 0, originalCP.length);
newCP[originalCP.length] = JavaScriptCore.newLibraryEntry(new Path("/P/src/lib"), null, null);
- IJavaScriptModelStatus status = JavaScriptConventions.validateClasspath(proj, newCP, proj.getOutputLocation());
+ IJavaScriptModelStatus status = JavaScriptConventions.validateClasspath(proj, newCP, null);
assertStatus(
"should have detected library folder nested inside source folder on the classpath",
@@ -753,8 +697,8 @@
try {
p = new IJavaScriptProject[]{
- this.createJavaProject("P0", new String[] {"src0"}, "bin0"),
- this.createJavaProject("P1", new String[] {"src1"}, "bin1"),
+ this.createJavaProject("P0", new String[] {"src0"}),
+ this.createJavaProject("P1", new String[] {"src1"}),
};
JavaScriptCore.setIncludepathVariable("var", new Path("/P1"), null);
@@ -765,7 +709,7 @@
};
// validate classpath
- IJavaScriptModelStatus status = JavaScriptConventions.validateClasspath(p[0], newClasspath, p[0].getOutputLocation());
+ IJavaScriptModelStatus status = JavaScriptConventions.validateClasspath(p[0], newClasspath, null);
assertStatus(
"should not detect external source folder through a variable on the classpath",
"OK",
@@ -782,8 +726,8 @@
try {
p = new IJavaScriptProject[]{
- this.createJavaProject("P0", new String[] {"src0", "src1"}, "bin0"),
- this.createJavaProject("P1", new String[] {"src1"}, "bin1"),
+ this.createJavaProject("P0", new String[] {"src0", "src1"}),
+ this.createJavaProject("P1", new String[] {"src1"}),
};
JavaScriptCore.setJsGlobalScopeContainer(
@@ -803,7 +747,7 @@
};
// validate classpath
- IJavaScriptModelStatus status = JavaScriptConventions.validateClasspath(p[0], newClasspath, p[0].getOutputLocation());
+ IJavaScriptModelStatus status = JavaScriptConventions.validateClasspath(p[0], newClasspath, null);
assertStatus(
"should not have detected external source folder through a container on the classpath",
"OK",
@@ -827,7 +771,7 @@
try {
p = new IJavaScriptProject[]{
- this.createJavaProject("P0", new String[] {"src"}, "src"),
+ this.createJavaProject("P0", new String[] {"src"}),
};
// validate classpath entry
@@ -836,7 +780,7 @@
JavaScriptCore.newSourceEntry(new Path("/P0/src")),
};
- IJavaScriptModelStatus status = JavaScriptConventions.validateClasspath(p[0], newClasspath, p[0].getOutputLocation());
+ IJavaScriptModelStatus status = JavaScriptConventions.validateClasspath(p[0], newClasspath, null);
assertStatus(
"should have detected nested source folder",
"Cannot nest \'P0/src\' inside \'P0\'. To enable the nesting exclude \'src/\' from \'P0\'",
@@ -851,14 +795,14 @@
*/
public void testClasspathValidation07() throws CoreException {
try {
- IJavaScriptProject proj = this.createJavaProject("P", new String[] {"src"}, "bin");
+ IJavaScriptProject proj = this.createJavaProject("P", new String[] {"src"});
IIncludePathEntry[] originalCP = proj.getRawIncludepath();
IIncludePathEntry[] newCP = new IIncludePathEntry[originalCP.length+1];
System.arraycopy(originalCP, 0, newCP, 0, originalCP.length);
newCP[originalCP.length] = JavaScriptCore.newSourceEntry(new Path("/P"), new IPath[] {new Path("src/")});
- IJavaScriptModelStatus status = JavaScriptConventions.validateClasspath(proj, newCP, proj.getOutputLocation());
+ IJavaScriptModelStatus status = JavaScriptConventions.validateClasspath(proj, newCP, null);
assertStatus(
"should have allowed nested source folders with exclusion on the classpath",
@@ -874,14 +818,14 @@
*/
public void testClasspathValidation08() throws CoreException {
try {
- IJavaScriptProject proj = this.createJavaProject("P", new String[] {}, new String[] {"lib"}, "bin");
+ IJavaScriptProject proj = this.createJavaProject("P", new String[] {}, new String[] {"lib"});
IIncludePathEntry[] originalCP = proj.getRawIncludepath();
IIncludePathEntry[] newCP = new IIncludePathEntry[originalCP.length+1];
System.arraycopy(originalCP, 0, newCP, 0, originalCP.length);
newCP[originalCP.length] = JavaScriptCore.newSourceEntry(new Path("/P"), new IPath[] {new Path("lib/")});
- IJavaScriptModelStatus status = JavaScriptConventions.validateClasspath(proj, newCP, proj.getOutputLocation());
+ IJavaScriptModelStatus status = JavaScriptConventions.validateClasspath(proj, newCP, null);
assertStatus(
"should have allowed nested lib folders with exclusion on the classpath",
@@ -892,158 +836,18 @@
}
}
/**
- * Should not allow a nested source folder in the project's output folder.
- */
-public void testClasspathValidation09() throws CoreException {
- try {
- IJavaScriptProject proj = this.createJavaProject("P", new String[] {}, "bin");
- IIncludePathEntry[] originalCP = proj.getRawIncludepath();
-
- IIncludePathEntry[] newCP = new IIncludePathEntry[originalCP.length+1];
- System.arraycopy(originalCP, 0, newCP, 0, originalCP.length);
- newCP[originalCP.length] = JavaScriptCore.newSourceEntry(new Path("/P/bin/src"));
-
- IJavaScriptModelStatus status = JavaScriptConventions.validateClasspath(proj, newCP, proj.getOutputLocation());
-
- assertStatus(
- "should not allow nested source folder in putput folder",
- "Cannot nest \'P/bin/src\' inside output folder \'P/bin\'",
- status);
- } finally {
- this.deleteProject("P");
- }
-}
-/**
- * Should not allow a nested output folder in a source folder on the classpath.
- */
-public void testClasspathValidation10() throws CoreException {
- try {
- IJavaScriptProject proj = this.createJavaProject("P", new String[] {"src"}, "bin");
- IIncludePathEntry[] originalCP = proj.getRawIncludepath();
-
- IJavaScriptModelStatus status = JavaScriptConventions.validateClasspath(proj, originalCP, new Path("/P/src/bin"));
-
- assertStatus(
- "should not allow nested output folder in source folder",
- "Cannot nest output folder \'P/src/bin\' inside \'P/src\'",
- status);
- } finally {
- this.deleteProject("P");
- }
-}
-/**
- * Should allow a nested library folder in the project's output folder if the project's output is not used.
-*/
-public void testClasspathValidation11() throws CoreException {
- try {
- IJavaScriptProject proj = this.createJavaProject("P", new String[] {}, "");
- IIncludePathEntry[] originalCP = proj.getRawIncludepath();
-
- IIncludePathEntry[] newCP = new IIncludePathEntry[originalCP.length+1];
- System.arraycopy(originalCP, 0, newCP, 0, originalCP.length);
- newCP[originalCP.length] = JavaScriptCore.newLibraryEntry(new Path("/P/lib"), null, null);
-
- IJavaScriptModelStatus status = JavaScriptConventions.validateClasspath(proj, newCP, proj.getOutputLocation());
-
- assertStatus(
- "should allow nested library folder in output folder",
- "OK",
- status);
- } finally {
- this.deleteProject("P");
- }
-}
-/**
- * Should not allow a nested source folder in an output folder.
- */
-public void testClasspathValidation12() throws CoreException {
- try {
- IJavaScriptProject proj = this.createJavaProject("P", new String[] {}, "bin1");
- IIncludePathEntry[] originalCP = proj.getRawIncludepath();
-
- IIncludePathEntry[] newCP = new IIncludePathEntry[originalCP.length+1];
- System.arraycopy(originalCP, 0, newCP, 0, originalCP.length);
- newCP[originalCP.length] =
- JavaScriptCore.newSourceEntry(
- new Path("/P/bin2/src"),
- new IPath[] {},
- new Path("/P/bin2"));
-
- IJavaScriptModelStatus status = JavaScriptConventions.validateClasspath(proj, newCP, proj.getOutputLocation());
-
- assertStatus(
- "should not allow nested source folder in output folder",
- "Cannot nest \'P/bin2/src\' inside output folder \'P/bin2\'",
- status);
- } finally {
- this.deleteProject("P");
- }
-}
-/**
- * Should not allow a nested output folder in a source folder on the classpath.
- */
-public void testClasspathValidation13() throws CoreException {
- try {
- IJavaScriptProject proj = this.createJavaProject("P", new String[] {}, "bin1");
- IIncludePathEntry[] originalCP = proj.getRawIncludepath();
-
- IIncludePathEntry[] newCP = new IIncludePathEntry[originalCP.length+1];
- System.arraycopy(originalCP, 0, newCP, 0, originalCP.length);
- newCP[originalCP.length] =
- JavaScriptCore.newSourceEntry(
- new Path("/P/src"),
- new IPath[] {},
- new Path("/P/src/bin2"));
-
- IJavaScriptModelStatus status = JavaScriptConventions.validateClasspath(proj, newCP, proj.getOutputLocation());
-
- assertStatus(
- "should not allow nested output folder in source folder",
- "Cannot nest output folder \'P/src/bin2\' inside \'P/src\'",
- status);
- } finally {
- this.deleteProject("P");
- }
-}
-/**
- * Should allow a nested output folder in a source folder that coincidate with the project.
- */
-public void testClasspathValidation14() throws CoreException {
- try {
- IJavaScriptProject proj = this.createJavaProject("P", new String[] {}, "bin");
- IIncludePathEntry[] originalCP = proj.getRawIncludepath();
-
- IIncludePathEntry[] newCP = new IIncludePathEntry[originalCP.length+1];
- System.arraycopy(originalCP, 0, newCP, 0, originalCP.length);
- newCP[originalCP.length] =
- JavaScriptCore.newSourceEntry(
- new Path("/P"),
- new IPath[] {},
- new Path("/P/bin"));
-
- IJavaScriptModelStatus status = JavaScriptConventions.validateClasspath(proj, newCP, proj.getOutputLocation());
-
- assertStatus(
- "should allow nested output folder in source folder which is project",
- "OK",
- status);
- } finally {
- this.deleteProject("P");
- }
-}
-/**
* Should not allow nested source folders on the classpath if exclusion filter has no trailing slash.
*/
public void testClasspathValidation15() throws CoreException {
try {
- IJavaScriptProject proj = this.createJavaProject("P", new String[] {"src"}, "bin");
+ IJavaScriptProject proj = this.createJavaProject("P", new String[] {"src"});
IIncludePathEntry[] originalCP = proj.getRawIncludepath();
IIncludePathEntry[] newCP = new IIncludePathEntry[originalCP.length+1];
System.arraycopy(originalCP, 0, newCP, 0, originalCP.length);
newCP[originalCP.length] = JavaScriptCore.newSourceEntry(new Path("/P"), new IPath[] {new Path("**/src")});
- IJavaScriptModelStatus status = JavaScriptConventions.validateClasspath(proj, newCP, proj.getOutputLocation());
+ IJavaScriptModelStatus status = JavaScriptConventions.validateClasspath(proj, newCP, null);
assertStatus(
"End exclusion filter \'src\' with / to fully exclude \'P/src\'",
@@ -1053,83 +857,18 @@
}
}
/**
- * Should allow custom output folder to be nested in default output folder if default output is not used.
- * (regression test for bug 28596 Default output folder cause of validation error even if not used)
- */
-public void testClasspathValidation16() throws CoreException {
- try {
- IJavaScriptProject proj = this.createJavaProject("P", new String[] {}, "");
- IIncludePathEntry[] originalCP = proj.getRawIncludepath();
-
- IIncludePathEntry[] newCP = new IIncludePathEntry[originalCP.length+1];
- System.arraycopy(originalCP, 0, newCP, 0, originalCP.length);
- newCP[originalCP.length] = JavaScriptCore.newSourceEntry(new Path("/P"), new IPath[0], new Path("/P/bin"));
-
- IJavaScriptModelStatus status = JavaScriptConventions.validateClasspath(proj, newCP, proj.getOutputLocation());
-
- assertStatus(
- "OK",
- status);
- } finally {
- this.deleteProject("P");
- }
-}
-/**
- * Should not allow source folder to be nested in default output folder if default output is used.
- */
-public void testClasspathValidation17() throws CoreException {
- try {
- IJavaScriptProject proj = this.createJavaProject("P", new String[] {"src1"}, "bin");
- IIncludePathEntry[] originalCP = proj.getRawIncludepath();
-
- IIncludePathEntry[] newCP = new IIncludePathEntry[originalCP.length+1];
- System.arraycopy(originalCP, 0, newCP, 0, originalCP.length);
- newCP[originalCP.length] = JavaScriptCore.newSourceEntry(new Path("/P/bin/src2"));
-
- IJavaScriptModelStatus status = JavaScriptConventions.validateClasspath(proj, newCP, proj.getOutputLocation());
-
- assertStatus(
- "Cannot nest \'P/bin/src2\' inside output folder \'P/bin\'",
- status);
- } finally {
- this.deleteProject("P");
- }
-}
-/**
- * Should not allow custom output folder to be external to project.
- * (regression test for bug 29079 Buildpath validation: No check that output folder is inside project)
- */
-public void testClasspathValidation18() throws CoreException {
- try {
- IJavaScriptProject proj = this.createJavaProject("P", new String[] {}, "");
- IIncludePathEntry[] originalCP = proj.getRawIncludepath();
-
- IIncludePathEntry[] newCP = new IIncludePathEntry[originalCP.length+1];
- System.arraycopy(originalCP, 0, newCP, 0, originalCP.length);
- newCP[originalCP.length] = JavaScriptCore.newSourceEntry(new Path("/P/src"), new IPath[0], new Path("/S/bin"));
-
- IJavaScriptModelStatus status = JavaScriptConventions.validateClasspath(proj, newCP, proj.getOutputLocation());
-
- assertStatus(
- "Path \'/S/bin\' must denote location inside project P",
- status);
- } finally {
- this.deleteProject("P");
- }
-}
-/**
* Should detect source folder nested inside library folder on the classpath
*/
public void testClasspathValidation19() throws CoreException {
try {
- IJavaScriptProject proj = this.createJavaProject("P", new String[] {}, new String[] {"lib"}, "bin");
+ IJavaScriptProject proj = this.createJavaProject("P", new String[] {}, new String[] {"lib"});
IIncludePathEntry[] originalCP = proj.getRawIncludepath();
IIncludePathEntry[] newCP = new IIncludePathEntry[originalCP.length+1];
System.arraycopy(originalCP, 0, newCP, 0, originalCP.length);
newCP[originalCP.length] = JavaScriptCore.newSourceEntry(new Path("/P/lib/src"));
- IJavaScriptModelStatus status = JavaScriptConventions.validateClasspath(proj, newCP, proj.getOutputLocation());
+ IJavaScriptModelStatus status = JavaScriptConventions.validateClasspath(proj, newCP, null);
assertStatus(
"should have detected library folder nested inside source folder on the classpath",
@@ -1139,38 +878,12 @@
this.deleteProject("P");
}
}
-
-/**
- * Should not allow custom output folder if project preference disallow them
- */
-public void testClasspathValidation20() throws CoreException {
- try {
- IJavaScriptProject proj = this.createJavaProject("P", new String[] {}, "");
- IIncludePathEntry[] originalCP = proj.getRawIncludepath();
-
- IIncludePathEntry[] newCP = new IIncludePathEntry[originalCP.length+1];
- System.arraycopy(originalCP, 0, newCP, 0, originalCP.length);
- newCP[originalCP.length] = JavaScriptCore.newSourceEntry(new Path("/P/src"), new IPath[0], new Path("/S/bin"));
-
- Map options = new Hashtable(5);
- options.put(JavaScriptCore.CORE_ENABLE_CLASSPATH_MULTIPLE_OUTPUT_LOCATIONS, JavaScriptCore.DISABLED);
- proj.setOptions(options);
- IJavaScriptModelStatus status = JavaScriptConventions.validateClasspath(proj, newCP, proj.getOutputLocation());
-
- assertStatus(
- "Multiple output locations are disabled in project P, cannot associate entry: \'src\' with a specific output",
- status);
- } finally {
- this.deleteProject("P");
- }
-}
-
/**
* Should not allow exclusion patterns if project preference disallow them
*/
public void testClasspathValidation21() throws CoreException {
try {
- IJavaScriptProject proj = this.createJavaProject("P", new String[] {}, "");
+ IJavaScriptProject proj = this.createJavaProject("P", new String[] {});
IIncludePathEntry[] originalCP = proj.getRawIncludepath();
IIncludePathEntry[] newCP = new IIncludePathEntry[originalCP.length+1];
@@ -1180,7 +893,7 @@
Map options = new Hashtable(5);
options.put(JavaScriptCore.CORE_ENABLE_CLASSPATH_EXCLUSION_PATTERNS, JavaScriptCore.DISABLED);
proj.setOptions(options);
- IJavaScriptModelStatus status = JavaScriptConventions.validateClasspath(proj, newCP, proj.getOutputLocation());
+ IJavaScriptModelStatus status = JavaScriptConventions.validateClasspath(proj, newCP, null);
assertStatus(
"Inclusion or exclusion patterns are disabled in project P, cannot selectively include or exclude from entry: \'src\'",
@@ -1189,147 +902,6 @@
this.deleteProject("P");
}
}
-
-/**
- * 33207 - Reject output folder that coincidate with distinct source folder
- */
-public void testClasspathValidation22() throws CoreException {
- try {
- IJavaScriptProject proj = this.createJavaProject("P", new String[] {}, "");
- IIncludePathEntry[] originalCP = proj.getRawIncludepath();
-
- IIncludePathEntry[] newCP = new IIncludePathEntry[originalCP.length+2];
- System.arraycopy(originalCP, 0, newCP, 0, originalCP.length);
- newCP[originalCP.length] = JavaScriptCore.newSourceEntry(new Path("/P/src"), new IPath[0], new Path("/P/src2"));
- newCP[originalCP.length+1] = JavaScriptCore.newSourceEntry(new Path("/P/src2"), new IPath[0], new Path("/P/src"));
-
- IJavaScriptModelStatus status = JavaScriptConventions.validateClasspath(proj, newCP, proj.getOutputLocation());
-
- assertStatus(
- "Source folder \'src\' in project P cannot output to distinct source folder \'src2\'",
- status);
- } finally {
- this.deleteProject("P");
- }
-}
-
-/**
- * 33207 - Reject output folder that coincidate with distinct source folder
- * but 36465 - Unable to create multiple source folders when not using bin for output
- * default output scenarii is still tolerated
- */
-public void testClasspathValidation23() throws CoreException {
- try {
- IJavaScriptProject proj = this.createJavaProject("P", new String[] {}, "");
- IIncludePathEntry[] originalCP = proj.getRawIncludepath();
-
- IIncludePathEntry[] newCP = new IIncludePathEntry[originalCP.length+2];
- System.arraycopy(originalCP, 0, newCP, 0, originalCP.length);
- newCP[originalCP.length] = JavaScriptCore.newSourceEntry(new Path("/P/"), new IPath[]{new Path("src/")}, null);
- newCP[originalCP.length+1] = JavaScriptCore.newSourceEntry(new Path("/P/src"), new IPath[0], null);
-
- IJavaScriptModelStatus status = JavaScriptConventions.validateClasspath(proj, newCP, proj.getOutputLocation());
-
- assertStatus(
- "OK",
- status);
-// assertStatus(
-// "Source folder 'P/src' cannot output to distinct source folder 'P/'.",
-// status);
- } finally {
- this.deleteProject("P");
- }
-}
-
-/**
- * Ensure one cannot nest source entry inside default output folder
- */
-public void testClasspathValidation24() throws CoreException {
- try {
- IJavaScriptProject proj = this.createJavaProject("P", new String[] {}, "");
- IIncludePathEntry[] originalCP = proj.getRawIncludepath();
-
- IIncludePathEntry[] newCP = new IIncludePathEntry[originalCP.length+1];
- System.arraycopy(originalCP, 0, newCP, 0, originalCP.length);
- newCP[originalCP.length] = JavaScriptCore.newSourceEntry(new Path("/P/src"), new IPath[0], null);
-
- IJavaScriptModelStatus status = JavaScriptConventions.validateClasspath(proj, newCP, proj.getOutputLocation());
-
- assertStatus(
- "Cannot nest \'P/src\' inside output folder \'P\'",
- status);
- } finally {
- this.deleteProject("P");
- }
-}
-
-/**
- * Reject output folder that coincidate with library folder
- */
-public void testClasspathValidation25() throws CoreException {
- try {
- IJavaScriptProject proj = this.createJavaProject("P", new String[] {}, "");
- IIncludePathEntry[] originalCP = proj.getRawIncludepath();
-
- IIncludePathEntry[] newCP = new IIncludePathEntry[originalCP.length+2];
- System.arraycopy(originalCP, 0, newCP, 0, originalCP.length);
- newCP[originalCP.length] = JavaScriptCore.newSourceEntry(new Path("/P/src"), new IPath[0], new Path("/P/lib2"));
- newCP[originalCP.length+1] = JavaScriptCore.newLibraryEntry(new Path("/P/lib2"), null, null);
-
- IJavaScriptModelStatus status = JavaScriptConventions.validateClasspath(proj, newCP, proj.getOutputLocation());
-
- assertStatus(
- "Source folder \'src\' in project P cannot output to library \'lib2\'",
- status);
- } finally {
- this.deleteProject("P");
- }
-}
-
-/**
- * Reject output folder that coincidate with library folder
- * default output scenarii
- */
-public void testClasspathValidation26() throws CoreException {
- try {
- IJavaScriptProject proj = this.createJavaProject("P", new String[] {}, "");
- IIncludePathEntry[] originalCP = proj.getRawIncludepath();
-
- IIncludePathEntry[] newCP = new IIncludePathEntry[originalCP.length+2];
- System.arraycopy(originalCP, 0, newCP, 0, originalCP.length);
- newCP[originalCP.length] = JavaScriptCore.newLibraryEntry(new Path("/P/"), null, null);
- newCP[originalCP.length+1] = JavaScriptCore.newSourceEntry(new Path("/P/src"), new IPath[0], null);
-
- IJavaScriptModelStatus status = JavaScriptConventions.validateClasspath(proj, newCP, proj.getOutputLocation());
-
- assertStatus(
- "Cannot nest \'P/src\' inside library \'P/\'",
- status);
- } finally {
- this.deleteProject("P");
- }
-}
-
-/**
- * Checks diagnosis for incompatible binary versions
- */
-public void testClasspathValidation27() throws CoreException {
- try {
- IJavaScriptProject proj1 = this.createJavaProject("P1", new String[] {}, "");
- proj1.setOption(JavaScriptCore.COMPILER_CODEGEN_TARGET_PLATFORM, JavaScriptCore.VERSION_1_4);
-
- IJavaScriptProject proj2 = this.createJavaProject("P2", new String[] {}, "");
- proj2.setOption(JavaScriptCore.COMPILER_CODEGEN_TARGET_PLATFORM, JavaScriptCore.VERSION_1_1);
- proj2.setOption(JavaScriptCore.CORE_INCOMPATIBLE_JDK_LEVEL, JavaScriptCore.WARNING);
-
- IJavaScriptModelStatus status = JavaScriptConventions.validateClasspathEntry(proj2, JavaScriptCore.newProjectEntry(new Path("/P1")), false);
- assertStatus(
- "Incompatible .class files version in required binaries. Project \'P2\' is targeting a 1.1 runtime, but is compiled against \'P1\' which requires a 1.4 runtime",
- status);
- } finally {
- this.deleteProjects(new String[]{"P1", "P2"});
- }
-}
/**
* @bug 159325: Any idea why ClasspathEntry checks for string object reference instead of equals
* @test Ensure that validation is correctly done even for other strings than JavaScriptCore constants...
@@ -1340,13 +912,13 @@
public void testClasspathValidation27_Bug159325_project() throws CoreException {
Hashtable javaCoreOptions = JavaScriptCore.getOptions();
try {
- IJavaScriptProject proj1 = this.createJavaProject("P1", new String[] {}, "");
+ IJavaScriptProject proj1 = this.createJavaProject("P1", new String[] {});
proj1.setOption(JavaScriptCore.COMPILER_CODEGEN_TARGET_PLATFORM, JavaScriptCore.VERSION_1_4);
Hashtable options = JavaScriptCore.getOptions();
options.put(JavaScriptCore.CORE_INCOMPATIBLE_JDK_LEVEL, JavaScriptCore.WARNING);
JavaScriptCore.setOptions(options);
- IJavaScriptProject proj2 = this.createJavaProject("P2", new String[] {}, "");
+ IJavaScriptProject proj2 = this.createJavaProject("P2", new String[] {});
proj2.setOption(JavaScriptCore.COMPILER_CODEGEN_TARGET_PLATFORM, JavaScriptCore.VERSION_1_1);
proj2.setOption(JavaScriptCore.CORE_INCOMPATIBLE_JDK_LEVEL, new String("ignore".toCharArray()));
@@ -1360,7 +932,7 @@
public void testClasspathValidation27_Bug159325_lib() throws CoreException {
Hashtable javaCoreOptions = JavaScriptCore.getOptions();
try {
- IJavaScriptProject proj = this.createJavaProject("P1", new String[] {}, "");
+ IJavaScriptProject proj = this.createJavaProject("P1", new String[] {});
proj.setOption(JavaScriptCore.COMPILER_CODEGEN_TARGET_PLATFORM, JavaScriptCore.VERSION_1_1);
Hashtable options = JavaScriptCore.getOptions();
@@ -1376,157 +948,20 @@
this.deleteProjects(new String[]{"P1", "P2"});
}
}
-
-/**
- * Checks it is legal for an output folder to be an excluded subfolder of some source folder
- */
-public void testClasspathValidation28() throws CoreException {
- try {
- IJavaScriptProject proj = this.createJavaProject("P", new String[] {}, "");
- IIncludePathEntry[] originalCP = proj.getRawIncludepath();
-
- IIncludePathEntry[] newCP = new IIncludePathEntry[originalCP.length+1];
- System.arraycopy(originalCP, 0, newCP, 0, originalCP.length);
- newCP[originalCP.length] = JavaScriptCore.newSourceEntry(new Path("/P/src"), new IPath[]{ new Path("output/") }, new Path("/P/src/output"));
-
- IJavaScriptModelStatus status = JavaScriptConventions.validateClasspath(proj, newCP, proj.getOutputLocation());
-
- assertStatus(
- "Source folder \'src\' in project P should be allowed to output to excluded source subfolder \'src/output\'",
- "OK",
- status);
- } finally {
- this.deleteProject("P");
- }
-}
-
-/**
- * Checks it is illegal for an output folder to be a subfolder of some source folder
- */
-public void testClasspathValidation29() throws CoreException {
- try {
- IJavaScriptProject proj = this.createJavaProject("P", new String[] {}, "");
- IIncludePathEntry[] originalCP = proj.getRawIncludepath();
-
- IIncludePathEntry[] newCP = new IIncludePathEntry[originalCP.length+1];
- System.arraycopy(originalCP, 0, newCP, 0, originalCP.length);
- newCP[originalCP.length] = JavaScriptCore.newSourceEntry(new Path("/P/src"), new IPath[0], new Path("/P/src/output"));
-
- IJavaScriptModelStatus status = JavaScriptConventions.validateClasspath(proj, newCP, proj.getOutputLocation());
-
- assertStatus(
- "Cannot nest output folder \'P/src/output\' inside \'P/src\'",
- status);
- } finally {
- this.deleteProject("P");
- }
-}
-
-/**
- * Checks it is illegal for a nested output folder (sitting inside excluded range of source folder) to be enclosing another source folder
- */
-public void testClasspathValidation30() throws CoreException {
- try {
- IJavaScriptProject proj = this.createJavaProject("P", new String[] {}, "bin");
- IIncludePathEntry[] originalCP = proj.getRawIncludepath();
-
- IIncludePathEntry[] newCP = new IIncludePathEntry[originalCP.length+2];
- System.arraycopy(originalCP, 0, newCP, 0, originalCP.length);
- newCP[originalCP.length] = JavaScriptCore.newSourceEntry(new Path("/P/src1"), new IPath[]{new Path("bin/")}, new Path("/P/src1/bin"));
- newCP[originalCP.length+1] = JavaScriptCore.newSourceEntry(new Path("/P/src1/bin/src2"));
-
- IJavaScriptModelStatus status = JavaScriptConventions.validateClasspath(proj, newCP, proj.getOutputLocation());
-
- assertStatus(
- "Cannot nest \'P/src1/bin/src2\' inside output folder \'P/src1/bin\'",
- status);
- } finally {
- this.deleteProject("P");
- }
-}
-
-/**
- * Checks it is illegal for a nested output folder (sitting inside excluded range of source folder) to be nested in another source folder
- */
-public void testClasspathValidation31() throws CoreException {
- try {
- IJavaScriptProject proj = this.createJavaProject("P", new String[] {}, "bin");
- IIncludePathEntry[] originalCP = proj.getRawIncludepath();
-
- IIncludePathEntry[] newCP = new IIncludePathEntry[originalCP.length+2];
- System.arraycopy(originalCP, 0, newCP, 0, originalCP.length);
- newCP[originalCP.length] = JavaScriptCore.newSourceEntry(new Path("/P/src1"), new IPath[]{new Path("src2/")}, new Path("/P/src1/src2/bin"));
- newCP[originalCP.length+1] = JavaScriptCore.newSourceEntry(new Path("/P/src1/src2"));
-
- IJavaScriptModelStatus status = JavaScriptConventions.validateClasspath(proj, newCP, proj.getOutputLocation());
-
- assertStatus(
- "Cannot nest output folder \'P/src1/src2/bin\' inside \'P/src1/src2\'",
- status);
- } finally {
- this.deleteProject("P");
- }
-}
-
-/**
- * Checks it is illegal for a nested output folder (sitting inside excluded range of source folder) to be coincidating with another source folder
- */
-public void testClasspathValidation32() throws CoreException {
- try {
- IJavaScriptProject proj = this.createJavaProject("P", new String[] {}, "bin");
- IIncludePathEntry[] originalCP = proj.getRawIncludepath();
-
- IIncludePathEntry[] newCP = new IIncludePathEntry[originalCP.length+2];
- System.arraycopy(originalCP, 0, newCP, 0, originalCP.length);
- newCP[originalCP.length] = JavaScriptCore.newSourceEntry(new Path("/P/src1"), new IPath[]{new Path("src2/")}, new Path("/P/src1/src2"));
- newCP[originalCP.length+1] = JavaScriptCore.newSourceEntry(new Path("/P/src1/src2"));
-
- IJavaScriptModelStatus status = JavaScriptConventions.validateClasspath(proj, newCP, proj.getOutputLocation());
-
- assertStatus(
- "Source folder \'src1\' in project P cannot output to distinct source folder \'src1/src2\'",
- status);
- } finally {
- this.deleteProject("P");
- }
-}
-
-/**
- * Checks it is illegal for a source folder to be nested in an output folder (42579)
- */
-public void testClasspathValidation33() throws CoreException {
- try {
- IJavaScriptProject proj = this.createJavaProject("P", new String[] {}, "");
- IIncludePathEntry[] originalCP = proj.getRawIncludepath();
-
- IIncludePathEntry[] newCP = new IIncludePathEntry[originalCP.length+1];
- System.arraycopy(originalCP, 0, newCP, 0, originalCP.length);
- newCP[originalCP.length] = JavaScriptCore.newSourceEntry(new Path("/P/dir/src"), new IPath[]{new Path("src2/")}, new Path("/P/dir"));
-
- IJavaScriptModelStatus status = JavaScriptConventions.validateClasspath(proj, newCP, proj.getOutputLocation());
-
- assertStatus(
- "Cannot nest \'P/dir/src\' inside output folder \'P/dir\'",
- status);
- } finally {
- this.deleteProject("P");
- }
-}
-
/**
* Should not allow nested source folders on the classpath if the outer
* folder includes the inner one.
*/
public void testClasspathValidation34() throws CoreException {
try {
- IJavaScriptProject proj = this.createJavaProject("P", new String[] {"src"}, "bin");
+ IJavaScriptProject proj = this.createJavaProject("P", new String[] {"src"});
IIncludePathEntry[] originalCP = proj.getRawIncludepath();
IIncludePathEntry[] newCP = new IIncludePathEntry[originalCP.length+1];
System.arraycopy(originalCP, 0, newCP, 0, originalCP.length);
newCP[originalCP.length] = JavaScriptCore.newSourceEntry(new Path("/P"), new IPath[] {new Path("src/")}, new IPath[0], null);
- IJavaScriptModelStatus status = JavaScriptConventions.validateClasspath(proj, newCP, proj.getOutputLocation());
+ IJavaScriptModelStatus status = JavaScriptConventions.validateClasspath(proj, newCP, null);
assertStatus(
"should not have allowed nested source folders with inclusion on the classpath",
@@ -1543,14 +978,14 @@
*/
public void testClasspathValidation35() throws CoreException {
try {
- IJavaScriptProject proj = this.createJavaProject("P", new String[] {}, new String[] {"lib"}, "bin");
+ IJavaScriptProject proj = this.createJavaProject("P", new String[] {}, new String[] {"lib"});
IIncludePathEntry[] originalCP = proj.getRawIncludepath();
IIncludePathEntry[] newCP = new IIncludePathEntry[originalCP.length+1];
System.arraycopy(originalCP, 0, newCP, 0, originalCP.length);
newCP[originalCP.length] = JavaScriptCore.newSourceEntry(new Path("/P"), new IPath[] {new Path("lib/")}, new Path[0], null);
- IJavaScriptModelStatus status = JavaScriptConventions.validateClasspath(proj, newCP, proj.getOutputLocation());
+ IJavaScriptModelStatus status = JavaScriptConventions.validateClasspath(proj, newCP, null);
assertStatus(
"should not have allowed nested lib folders with inclusion on the classpath",
@@ -1566,14 +1001,14 @@
*/
public void testClasspathValidation36() throws CoreException {
try {
- IJavaScriptProject proj = this.createJavaProject("P", new String[] {"src"}, "bin");
+ IJavaScriptProject proj = this.createJavaProject("P", new String[] {"src"});
IIncludePathEntry[] originalCP = proj.getRawIncludepath();
IIncludePathEntry[] newCP = new IIncludePathEntry[originalCP.length+1];
System.arraycopy(originalCP, 0, newCP, 0, originalCP.length);
newCP[originalCP.length] = JavaScriptCore.newSourceEntry(new Path("/P"), new IPath[] {new Path("**/src")}, new Path[0], null);
- IJavaScriptModelStatus status = JavaScriptConventions.validateClasspath(proj, newCP, proj.getOutputLocation());
+ IJavaScriptModelStatus status = JavaScriptConventions.validateClasspath(proj, newCP, null);
assertStatus(
"OK",
@@ -1587,7 +1022,7 @@
*/
public void testClasspathValidation37() throws CoreException {
try {
- IJavaScriptProject proj = this.createJavaProject("P", new String[] {}, "");
+ IJavaScriptProject proj = this.createJavaProject("P", new String[] {});
IIncludePathEntry[] originalCP = proj.getRawIncludepath();
IIncludePathEntry[] newCP = new IIncludePathEntry[originalCP.length+1];
@@ -1597,7 +1032,7 @@
Map options = new Hashtable(5);
options.put(JavaScriptCore.CORE_ENABLE_CLASSPATH_EXCLUSION_PATTERNS, JavaScriptCore.DISABLED);
proj.setOptions(options);
- IJavaScriptModelStatus status = JavaScriptConventions.validateClasspath(proj, newCP, proj.getOutputLocation());
+ IJavaScriptModelStatus status = JavaScriptConventions.validateClasspath(proj, newCP, null);
assertStatus(
"Inclusion or exclusion patterns are disabled in project P, cannot selectively include or exclude from entry: \'src\'",
@@ -1606,100 +1041,13 @@
this.deleteProject("P");
}
}
-/**
- * Checks it is illegal for an output folder to be an included subfolder of some source folder
- */
-public void testClasspathValidation38() throws CoreException {
- try {
- IJavaScriptProject proj = this.createJavaProject("P", new String[] {}, "");
- IIncludePathEntry[] originalCP = proj.getRawIncludepath();
-
- IIncludePathEntry[] newCP = new IIncludePathEntry[originalCP.length+1];
- System.arraycopy(originalCP, 0, newCP, 0, originalCP.length);
- newCP[originalCP.length] = JavaScriptCore.newSourceEntry(new Path("/P/src"), new IPath[]{ new Path("output/") }, new Path[0], new Path("/P/src/output"));
-
- IJavaScriptModelStatus status = JavaScriptConventions.validateClasspath(proj, newCP, proj.getOutputLocation());
-
- assertStatus(
- "Source folder \'src\' in project P should not be allowed to output to included source subfolder \'src/output\'",
- "Cannot nest output folder \'P/src/output\' inside \'P/src\'",
- status);
- } finally {
- this.deleteProject("P");
- }
-}
-/**
- * 62713 - check nested output folder detection
- */
-public void testClasspathValidation39() throws CoreException {
- try {
- IJavaScriptProject proj = this.createJavaProject("P", new String[] {}, "");
- IIncludePathEntry[] originalCP = proj.getRawIncludepath();
-
- IIncludePathEntry[] newCP = new IIncludePathEntry[originalCP.length+2];
- System.arraycopy(originalCP, 0, newCP, 0, originalCP.length);
- newCP[originalCP.length] = JavaScriptCore.newSourceEntry(new Path("/P"), new IPath[]{new Path("test/")}, new Path("/P/bin/test"));
- newCP[originalCP.length+1] = JavaScriptCore.newSourceEntry(new Path("/P/test"), new IPath[]{}, new Path("/P/bin"));
-
- IJavaScriptModelStatus status = JavaScriptConventions.validateClasspath(proj, newCP, proj.getOutputLocation());
-
- assertStatus(
- "Cannot nest output folder \'P/bin/test\' inside output folder \'P/bin\'",
- status);
- } finally {
- this.deleteProject("P");
- }
-}
-/**
- * 62713 - variation
- */
-public void testClasspathValidation40() throws CoreException {
- try {
- IJavaScriptProject proj = this.createJavaProject("P", new String[] {}, "");
- IIncludePathEntry[] originalCP = proj.getRawIncludepath();
-
- IIncludePathEntry[] newCP = new IIncludePathEntry[originalCP.length+2];
- System.arraycopy(originalCP, 0, newCP, 0, originalCP.length);
- newCP[originalCP.length] = JavaScriptCore.newSourceEntry(new Path("/P"), new IPath[]{new Path("test/")}, new Path("/P/bin"));
- newCP[originalCP.length+1] = JavaScriptCore.newSourceEntry(new Path("/P/test"), new IPath[]{}, new Path("/P/bin/test"));
-
- IJavaScriptModelStatus status = JavaScriptConventions.validateClasspath(proj, newCP, proj.getOutputLocation());
-
- assertStatus(
- "Cannot nest output folder \'P/bin/test\' inside output folder \'P/bin\'",
- status);
- } finally {
- this.deleteProject("P");
- }
-}
-/**
- * 62713 - variation
- */
-public void testClasspathValidation41() throws CoreException {
- try {
- IJavaScriptProject proj = this.createJavaProject("P", new String[] {}, "bin");
- IIncludePathEntry[] originalCP = proj.getRawIncludepath();
-
- IIncludePathEntry[] newCP = new IIncludePathEntry[originalCP.length+1];
- System.arraycopy(originalCP, 0, newCP, 0, originalCP.length);
- newCP[originalCP.length] = JavaScriptCore.newSourceEntry(new Path("/P/src"), new IPath[]{}, new Path("/P/"));
-
- IJavaScriptModelStatus status = JavaScriptConventions.validateClasspath(proj, newCP, proj.getOutputLocation());
-
- assertStatus(
- "Cannot nest \'P/src\' inside output folder \'P/\'",
- status);
- } finally {
- this.deleteProject("P");
- }
-}
/*
* Should detect nested source folders on the classpath and indicate the preference if disabled
* (regression test for bug 122615 validate classpath propose to exlude a source folder even though exlusion patterns are disabled)
*/
public void testClasspathValidation42() throws CoreException {
try {
- IJavaScriptProject proj = this.createJavaProject("P", new String[] {"src"}, "bin");
+ IJavaScriptProject proj = this.createJavaProject("P", new String[] {"src"});
proj.setOption(JavaScriptCore.CORE_ENABLE_CLASSPATH_EXCLUSION_PATTERNS, JavaScriptCore.DISABLED);
IIncludePathEntry[] originalCP = proj.getRawIncludepath();
@@ -1707,7 +1055,7 @@
System.arraycopy(originalCP, 0, newCP, 0, originalCP.length);
newCP[originalCP.length] = JavaScriptCore.newSourceEntry(new Path("/P"));
- IJavaScriptModelStatus status = JavaScriptConventions.validateClasspath(proj, newCP, proj.getOutputLocation());
+ IJavaScriptModelStatus status = JavaScriptConventions.validateClasspath(proj, newCP, null);
assertStatus(
"should have detected nested source folders on the classpath",
@@ -1723,7 +1071,7 @@
*/
public void testClasspathWithDuplicateEntries() throws CoreException {
try {
- IJavaScriptProject project = this.createJavaProject("P", new String[] {"src"}, "bin");
+ IJavaScriptProject project = this.createJavaProject("P", new String[] {"src"});
IIncludePathEntry[] cp= project.getRawIncludepath();
IIncludePathEntry[] newCp= new IIncludePathEntry[cp.length *2];
System.arraycopy(cp, 0, newCp, 0, cp.length);
@@ -1744,7 +1092,7 @@
*/
public void testClasspathDuplicateExtraAttribute() throws CoreException {
try {
- IJavaScriptProject proj = this.createJavaProject("P1", new String[] {}, "bin");
+ IJavaScriptProject proj = this.createJavaProject("P1", new String[] {});
IIncludePathAttribute[] extraAttributes = new IIncludePathAttribute[2];
extraAttributes[0] = JavaScriptCore.newIncludepathAttribute("javadoc_location", "http://www.sample-url.org/doc/");
extraAttributes[1] = JavaScriptCore.newIncludepathAttribute("javadoc_location", "d:/tmp");
@@ -1753,14 +1101,14 @@
IIncludePathEntry container = JavaScriptCore.newContainerEntry(new Path("JRE_CONTAINER"), ClasspathEntry.NO_ACCESS_RULES, extraAttributes, false);
IJavaScriptModelStatus status = JavaScriptConventions.validateClasspathEntry(proj, container, false);
assertStatus(
- "Duplicate extra attribute: \'javadoc_location\' in classpath entry \'JRE_CONTAINER\' for project P1",
+ "Duplicate extra attribute: \'javadoc_location\' in classpath entry \'JRE_CONTAINER\' for project 'P1'",
status);
// Verify library entry validation
- IIncludePathEntry library = JavaScriptCore.newLibraryEntry(new Path(getExternalJCLPathString()), null, null, ClasspathEntry.NO_ACCESS_RULES, extraAttributes, false);
+ IIncludePathEntry library = JavaScriptCore.newLibraryEntry(new Path(getSystemJsPathString()), null, null, ClasspathEntry.NO_ACCESS_RULES, extraAttributes, false);
status = JavaScriptConventions.validateClasspathEntry(proj, library, false);
assertStatus(
- "Duplicate extra attribute: \'javadoc_location\' in classpath entry \'"+getExternalJCLPath()+"\' for project P1",
+ "Duplicate extra attribute: \'javadoc_location\' in classpath entry \'"+getExternalJCLPath("")+"\' for project 'P1'",
status);
// Verify project entry validation
@@ -1768,7 +1116,7 @@
IIncludePathEntry projectEntry = JavaScriptCore.newProjectEntry(new Path("/P2"), ClasspathEntry.NO_ACCESS_RULES, false, extraAttributes, false);
status = JavaScriptConventions.validateClasspathEntry(proj, projectEntry, false);
assertStatus(
- "Duplicate extra attribute: \'javadoc_location\' in classpath entry \'/P2\' for project P1",
+ "Duplicate extra attribute: \'javadoc_location\' in classpath entry \'/P2\' for project 'P1'",
status);
// Verify source entry validation
@@ -1776,14 +1124,14 @@
IIncludePathEntry sourceEntry = JavaScriptCore.newSourceEntry(new Path("/P1/src"), new IPath[0], new IPath[0], null, extraAttributes);
status = JavaScriptConventions.validateClasspathEntry(proj, sourceEntry, false);
assertStatus(
- "Duplicate extra attribute: \'javadoc_location\' in classpath entry \'src\' for project P1",
+ "Duplicate extra attribute: \'javadoc_location\' in classpath entry \'src\' for project 'P1'",
status);
// Verify variable entry validation
IIncludePathEntry variable = JavaScriptCore.newVariableEntry(new Path("JCL_LIB"), new Path("JCL_SRC"), null, ClasspathEntry.NO_ACCESS_RULES, extraAttributes, false);
status = JavaScriptConventions.validateClasspathEntry(proj, variable, false);
assertStatus(
- "Duplicate extra attribute: \'javadoc_location\' in classpath entry \'"+getExternalJCLPath()+"\' for project P1",
+ "Duplicate extra attribute: \'javadoc_location\' in classpath entry \'"+getExternalJCLPath("")+"\' for project 'P1'",
status);
} finally {
this.deleteProject("P1");
@@ -1798,7 +1146,7 @@
*/
public void testClasspathWithNonExistentLibraryEntry() throws CoreException {
try {
- IJavaScriptProject project= this.createJavaProject("P", new String[] {"src"}, "bin");
+ IJavaScriptProject project= this.createJavaProject("P", new String[] {"src"});
IIncludePathEntry[] originalPath= project.getRawIncludepath();
IPackageFragmentRoot[] originalRoots= project.getPackageFragmentRoots();
@@ -1832,7 +1180,7 @@
*/
public void testClasspathWithNonExistentProjectEntry() throws CoreException {
try {
- IJavaScriptProject project= this.createJavaProject("P", new String[] {"src"}, "bin");
+ IJavaScriptProject project= this.createJavaProject("P", new String[] {"src"});
IIncludePathEntry[] originalPath= project.getRawIncludepath();
IPackageFragmentRoot[] originalRoots= project.getPackageFragmentRoots();
@@ -1866,7 +1214,7 @@
*/
public void testClasspathWithNonExistentSourceEntry() throws CoreException {
try {
- IJavaScriptProject project= this.createJavaProject("P", new String[] {"src"}, "bin");
+ IJavaScriptProject project= this.createJavaProject("P", new String[] {"src"});
IIncludePathEntry[] originalPath= project.getRawIncludepath();
IPackageFragmentRoot[] originalRoots= project.getPackageFragmentRoots();
@@ -1900,9 +1248,9 @@
public void testCycleReport() throws CoreException {
try {
- IJavaScriptProject p1 = this.createJavaProject("P1", new String[] {""}, "");
- IJavaScriptProject p2 = this.createJavaProject("P2", new String[] {""}, "");
- IJavaScriptProject p3 = this.createJavaProject("P3", new String[] {""}, new String[] {}, new String[] {"/P2"}, "");
+ IJavaScriptProject p1 = this.createJavaProject("P1", new String[] {""});
+ IJavaScriptProject p2 = this.createJavaProject("P2", new String[] {""});
+ IJavaScriptProject p3 = this.createJavaProject("P3", new String[] {""}, new String[] {}, new String[] {"/P2"});
// Ensure no cycle reported
IJavaScriptProject[] projects = { p1, p2, p3 };
@@ -1943,18 +1291,15 @@
}
}
/**
- * Ensures that the default classpath and output locations are correct.
+ * Ensures that the default classpath locations are correct.
* The default classpath should be the root of the project.
- * The default output location should be the root of the project.
*/
-public void testDefaultClasspathAndOutputLocation() throws CoreException {
+public void testDefaultClasspathLocation() throws CoreException {
try {
- IJavaScriptProject project = this.createJavaProject("P", new String[] {""}, "bin");
+ IJavaScriptProject project = this.createJavaProject("P", new String[] {""});
IIncludePathEntry[] classpath = project.getRawIncludepath();
- assertTrue("Incorrect default classpath; to many entries", classpath.length == 1);
+ assertTrue("Incorrect default classpath; to many entries", classpath.length == 2);
assertTrue("Incorrect default classpath: " + classpath[0], classpath[0].getPath().equals(project.getUnderlyingResource().getFullPath()));
- IPath output = project.getOutputLocation();
- assertTrue("Incorrect default output location: " + output.toOSString(), output.equals(project.getUnderlyingResource().getFullPath().append("bin")));
} finally {
this.deleteProject("P");
}
@@ -1965,7 +1310,7 @@
* and a delta with removed roots.
*/
public void testEmptyClasspath() throws CoreException {
- IJavaScriptProject project = this.createJavaProject("P", new String[] {""}, "");
+ IJavaScriptProject project = this.createJavaProject("P", new String[] {""});
try {
startDeltas();
setClasspath(project, new IIncludePathEntry[] {});
@@ -1977,7 +1322,8 @@
"Unexpected delta",
"P[*]: {CHILDREN | CONTENT | CLASSPATH CHANGED}\n" +
" <project root>[*]: {REMOVED FROM CLASSPATH}\n" +
- " ResourceDelta(/P/.classpath)[*]"
+ " D:\\WTPDevelopment\\junit-workspace\\.metadata\\.plugins\\org.eclipse.wst.jsdt.core\\libraries\\system.js[*]: {REORDERED}\n" +
+ " ResourceDelta(/P/.settings)[*]"
);
} finally {
stopDeltas();
@@ -1990,15 +1336,16 @@
*/
public void testEncoding() throws CoreException {
try {
- createJavaProject("P", new String[] {"src\u3400"}, "bin");
- IFile file = getFile("/P/.classpath");
+ createJavaProject("P", new String[] {"src\u3400"});
+ IFile file = getFile("/P/.settings/.jsdtscope");
String encodedContents = new String (org.eclipse.wst.jsdt.internal.core.util.Util.getResourceContentsAsCharArray(file, "UTF-8"));
encodedContents = Util.convertToIndependantLineDelimiter(encodedContents);
assertEquals(
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
"<classpath>\n" +
" <classpathentry kind=\"src\" path=\"src\u3400\"/>\n" +
- " <classpathentry kind=\"output\" path=\"bin\"/>\n" +
+ " <classpathentry kind=\"con\" path=\"org.eclipse.wst.jsdt.launching.JRE_CONTAINER\"/>\n" +
+ " <classpathentry kind=\"output\" path=\"\"/>\n" +
"</classpath>\n",
encodedContents);
} finally {
@@ -2021,7 +1368,7 @@
public void testEncodeDecodeEntry02() {
assertEncodeDecodeEntry(
"P",
- "<classpathentry excluding=\"**/X.java\" including=\"**/Y.java\" kind=\"src\" output=\"bin\" path=\"src\">\n" +
+ "<classpathentry excluding=\"**/X.js\" including=\"**/Y.js\" kind=\"src\" output=\"bin\" path=\"src\">\n" +
" <attributes>\n" +
" <attribute name=\"attrName\" value=\"some value\"/>\n" +
" </attributes>\n" +
@@ -2055,7 +1402,7 @@
" <attribute name=\"attr1\" value=\"val1\"/>\n" +
" </attributes>\n" +
" <accessrules>\n" +
- " <accessrule kind=\"accessible\" pattern=\"**/A*.java\"/>\n" +
+ " <accessrule kind=\"accessible\" pattern=\"**/A*.js\"/>\n" +
" </accessrules>\n" +
"</classpathentry>\n",
JavaScriptCore.newLibraryEntry(
@@ -2078,7 +1425,7 @@
" <attribute name=\"attr1\" value=\"val1\"/>\n" +
" </attributes>\n" +
" <accessrules>\n" +
- " <accessrule ignoreifbetter=\"true\" kind=\"accessible\" pattern=\"**/A*.java\"/>\n" +
+ " <accessrule ignoreifbetter=\"true\" kind=\"accessible\" pattern=\"**/A*.js\"/>\n" +
" </accessrules>\n" +
"</classpathentry>\n",
JavaScriptCore.newLibraryEntry(
@@ -2096,7 +1443,7 @@
*/
public void testEmptyContainer() throws CoreException {
try {
- IJavaScriptProject proj = createJavaProject("P", new String[] {}, "bin");
+ IJavaScriptProject proj = createJavaProject("P", new String[] {});
startDeltas();
@@ -2113,11 +1460,12 @@
// set P's classpath with this container
IIncludePathEntry container = JavaScriptCore.newContainerEntry(new Path("container/default"), true);
- proj.setRawIncludepath(new IIncludePathEntry[] {container}, new Path("/P"), null);
+ proj.setRawIncludepath(new IIncludePathEntry[] {container}, null);
assertDeltas(
"Unexpected delta",
"P[*]: {CONTENT | CLASSPATH CHANGED}\n" +
+ " D:\\WTPDevelopment\\junit-workspace\\.metadata\\.plugins\\org.eclipse.wst.jsdt.core\\libraries\\system.js[*]: {REORDERED}\n" +
" ResourceDelta(/P/.classpath)[*]"
);
} finally {
@@ -2131,10 +1479,10 @@
*/
public void testEmptyInclusionPattern() throws CoreException {
try {
- IJavaScriptProject project = createJavaProject("P", new String[] {""}, "bin");
+ IJavaScriptProject project = createJavaProject("P", new String[] {""});
project.open(null);
editFile(
- "/P/.classpath",
+ "/P/.settings/.jsdtscope",
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
"<classpath>\n" +
" <classpathentry including=\"X.java|\" kind=\"src\" path=\"\"/>\n" +
@@ -2159,7 +1507,7 @@
*/
public void testExportContainer() throws CoreException {
try {
- IJavaScriptProject p1 = this.createJavaProject("P1", new String[] {""}, "");
+ IJavaScriptProject p1 = this.createJavaProject("P1", new String[] {""});
// create container
JavaScriptCore.setJsGlobalScopeContainer(
@@ -2169,23 +1517,23 @@
new TestContainer(
new Path("container/default"),
new IIncludePathEntry[] {
- JavaScriptCore.newLibraryEntry(getExternalJCLPath(), null, null)
+ JavaScriptCore.newLibraryEntry(getExternalJCLPath(""), null, null)
})
},
null);
// set P1's classpath with this container
IIncludePathEntry container = JavaScriptCore.newContainerEntry(new Path("container/default"), true);
- p1.setRawIncludepath(new IIncludePathEntry[] {container}, new Path("/P1"), null);
+ p1.setRawIncludepath(new IIncludePathEntry[] {container}, null);
// create dependent project P2
- IJavaScriptProject p2 = this.createJavaProject("P2", new String[] {}, new String[] {}, new String[] {"/P1"}, "");
+ IJavaScriptProject p2 = this.createJavaProject("P2", new String[] {}, new String[] {}, new String[] {"/P1"});
IIncludePathEntry[] classpath = ((JavaProject)p2).getExpandedClasspath();
// ensure container is exported to P2
assertEquals("Unexpected number of classpath entries", 2, classpath.length);
assertEquals("Unexpected first entry", "/P1", classpath[0].getPath().toString());
- assertEquals("Unexpected second entry", getExternalJCLPathString(), classpath[1].getPath().toOSString());
+ assertEquals("Unexpected second entry", getSystemJsPathString(), classpath[1].getPath().toOSString());
} finally {
this.deleteProjects(new String[] {"P1", "P2"});
}
@@ -2198,7 +1546,7 @@
IJavaScriptProject project = createJavaProject("P");
IIncludePathEntry entry = JavaScriptCore.newSourceEntry(new Path("/P"), new IPath[0], new IPath[0], null, new IIncludePathAttribute[] {});
project.setRawIncludepath(new IIncludePathEntry[] {entry}, null);
- String contents = new String (org.eclipse.wst.jsdt.internal.core.util.Util.getResourceContentsAsCharArray(getFile("/P/.classpath")));
+ String contents = new String (org.eclipse.wst.jsdt.internal.core.util.Util.getResourceContentsAsCharArray(getFile("/P/.settings/.jsdtscope")));
assertSourceEquals(
"Unexpected content",
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
@@ -2220,7 +1568,7 @@
IIncludePathAttribute attribute = JavaScriptCore.newIncludepathAttribute("foo", "some value");
IIncludePathEntry entry = JavaScriptCore.newSourceEntry(new Path("/P"), new IPath[0], new IPath[0], null, new IIncludePathAttribute[] {attribute});
project.setRawIncludepath(new IIncludePathEntry[] {entry}, null);
- String contents = new String (org.eclipse.wst.jsdt.internal.core.util.Util.getResourceContentsAsCharArray(getFile("/P/.classpath")));
+ String contents = new String (org.eclipse.wst.jsdt.internal.core.util.Util.getResourceContentsAsCharArray(getFile("/P/.settings/.jsdtscope")));
assertSourceEquals(
"Unexpected content",
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
@@ -2247,7 +1595,7 @@
IIncludePathAttribute attribute2 = JavaScriptCore.newIncludepathAttribute("bar", "other value");
IIncludePathEntry entry = JavaScriptCore.newSourceEntry(new Path("/P"), new IPath[0], new IPath[0], null, new IIncludePathAttribute[] {attribute1, attribute2});
project.setRawIncludepath(new IIncludePathEntry[] {entry}, null);
- String contents = new String (org.eclipse.wst.jsdt.internal.core.util.Util.getResourceContentsAsCharArray(getFile("/P/.classpath")));
+ String contents = new String (org.eclipse.wst.jsdt.internal.core.util.Util.getResourceContentsAsCharArray(getFile("/P/.settings/.jsdtscope")));
assertSourceEquals(
"Unexpected content",
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
@@ -2272,7 +1620,7 @@
try {
IJavaScriptProject project = createJavaProject("P");
editFile(
- "/P/.classpath",
+ "/P/.settings/.jsdtscope",
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
"<classpath>\n" +
" <classpathentry kind=\"src\" path=\"\">\n" +
@@ -2296,9 +1644,9 @@
*/
public void testHasClasspathCycle() throws CoreException {
try {
- IJavaScriptProject p1 = this.createJavaProject("P1", new String[] {""}, "");
- IJavaScriptProject p2 = this.createJavaProject("P2", new String[] {""}, "");
- this.createJavaProject("P3", new String[] {""}, new String[] {}, new String[] {"/P1"}, "");
+ IJavaScriptProject p1 = this.createJavaProject("P1", new String[] {""});
+ IJavaScriptProject p2 = this.createJavaProject("P2", new String[] {""});
+ this.createJavaProject("P3", new String[] {""}, new String[] {}, new String[] {"/P1"});
IIncludePathEntry[] originalP1CP= p1.getRawIncludepath();
IIncludePathEntry[] originalP2CP= p2.getRawIncludepath();
@@ -2343,9 +1691,9 @@
*/
public void testInvalidClasspath1() throws CoreException {
try {
- IJavaScriptProject project = this.createJavaProject("P", new String[] {"src"}, "bin");
+ IJavaScriptProject project = this.createJavaProject("P", new String[] {"src"});
this.editFile(
- "/P/.classpath",
+ "/P/.settings/.jsdtscope",
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
"<classpath>\n" +
" <classpathentry kind=\"src\" path=\"src\"/\n" + // missing closing >
@@ -2365,9 +1713,9 @@
*/
public void testInvalidClasspath2() throws CoreException {
try {
- IJavaScriptProject javaProject = this.createJavaProject("P", new String[] {"src"}, "bin");
+ IJavaScriptProject javaProject = this.createJavaProject("P", new String[] {"src"});
this.editFile(
- "/P/.classpath",
+ "/P/.settings/.jsdtscope",
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
"<classpath>\n" +
" <classpathentry kind=\"src1\" path=\"src\"/>\n" + // invalid kind: src1
@@ -2392,70 +1740,6 @@
this.deleteProject("P");
}
}
-/*
- * Ensures that an external class folder cannot be put on the classpath.
- */
-public void testInvalidExternalClassFolder() throws CoreException {
- try {
- String externalPath = getExternalPath();
- // remove trailing slash
- if (Path.fromOSString(externalPath).segmentCount() > 0)
- externalPath = externalPath.substring(0, externalPath.length()-1);
- IJavaScriptProject proj = createJavaProject("P", new String[] {}, new String[] {externalPath}, "bin");
- assertMarkers(
- "Unexpected markers",
- "Required library cannot denote external folder: \'" + externalPath + "\' for project P",
- proj);
- } finally {
- deleteProject("P");
- }
-}
-/*
- * Ensures that a non existing external jar cannot be put on the classpath.
- */
-public void testInvalidExternalJar() throws CoreException {
- try {
- String jarPath = getExternalPath() + "nonExisting.jar";
- IJavaScriptProject proj = createJavaProject("P", new String[] {}, new String[] {jarPath}, "bin");
- assertMarkers(
- "Unexpected markers",
- "Project P is missing required library: \'" + jarPath + "\'",
- proj);
- } finally {
- deleteProject("P");
- }
-}
-/*
- * Ensures that a non existing internal jar cannot be put on the classpath.
- */
-public void testInvalidInternalJar1() throws CoreException {
- try {
- IJavaScriptProject proj = createJavaProject("P", new String[] {}, new String[] {"/P/nonExisting.jar"}, "bin");
- assertMarkers(
- "Unexpected markers",
- "Project P is missing required library: \'nonExisting.jar\'",
- proj);
- } finally {
- deleteProject("P");
- }
-}
-/*
- * Ensures that a file not ending with .jar or .zip cannot be put on the classpath.
- */
-public void testInvalidInternalJar2() throws CoreException {
- try {
- createProject("P1");
- createFile("/P1/existing.txt", "");
- IJavaScriptProject proj = createJavaProject("P2", new String[] {}, new String[] {"/P1/existing.txt"}, "bin");
- assertMarkers(
- "Unexpected markers",
- "Illegal type of archive for required library: \'/P1/existing.txt\' in project P2",
- proj);
- } finally {
- deleteProject("P1");
- deleteProject("P2");
- }
-}
/*
* Ensures that a non existing source folder cannot be put on the classpath.
@@ -2464,7 +1748,7 @@
public void testInvalidSourceFolder() throws CoreException {
try {
createJavaProject("P1");
- IJavaScriptProject proj = createJavaProject("P2", new String[] {}, new String[] {}, new String[] {"/P1/src1/src2"}, "bin");
+ IJavaScriptProject proj = createJavaProject("P2", new String[] {}, new String[] {}, new String[] {"/P1/src1/src2"});
assertMarkers(
"Unexpected markers",
"Project P2 is missing required source folder: \'/P1/src1/src2\'",
@@ -2484,7 +1768,7 @@
IJavaScriptProject javaProject = createJavaProject("P");
IProject project = javaProject.getProject();
project.close(null);
- deleteFile(new File(project.getLocation().toOSString(), ".classpath"));
+ deleteFile(new File(project.getLocation().toOSString(), ".settings/.jsdtscope"));
waitForAutoBuild();
project.open(null);
waitForAutoBuild();
@@ -2494,7 +1778,7 @@
waitForAutoBuild();
assertMarkers(
"Unexpected markers",
- "Unable to read \'.classpath\' file of project P",
+ "Unable to read \'.jsdtscope\' file of project P",
javaProject);
} finally {
this.deleteProject("P");
@@ -2505,7 +1789,7 @@
*/
public void testMissingPrereq1() throws CoreException {
try {
- IJavaScriptProject javaProject = this.createJavaProject("A", new String[] {}, "");
+ IJavaScriptProject javaProject = this.createJavaProject("A", new String[] {});
IIncludePathEntry[] classpath =
new IIncludePathEntry[] {
JavaScriptCore.newProjectEntry(new Path("/B"))
@@ -2529,8 +1813,7 @@
"A",
new String[] {}, // source folders
new String[] {}, // lib folders
- new String[] {"/B"}, // projects
- "");
+ new String[] {"/B"});
this.assertMarkers(
"Unexpected markers",
"Project A is missing required Java project: \'B\'",
@@ -2549,9 +1832,8 @@
"A",
new String[] {}, // source folders
new String[] {}, // lib folders
- new String[] {"/B"}, // projects
- "");
- this.createJavaProject("B", new String[] {}, "");
+ new String[] {"/B"});
+ this.createJavaProject("B", new String[] {});
this.assertMarkers("Unexpected markers", "", javaProject);
} finally {
this.deleteProjects(new String[] {"A", "B"});
@@ -2569,22 +1851,20 @@
"A",
new String[] {}, // source folders
new String[] {}, // lib folders
- new String[] {"/B"}, // projects
- "");
+ new String[] {"/B"});
IJavaScriptProject projectB =
this.createJavaProject(
"B",
new String[] {}, // source folders
new String[] {}, // lib folders
- new String[] {"/A"}, // projects
- "");
+ new String[] {"/A"});
this.assertMarkers(
"Unexpected markers for project A",
- "A cycle was detected in the build path of project: A",
+ "A cycle was detected in the include path of project: A",
projectA);
this.assertMarkers(
"Unexpected markers for project B",
- "A cycle was detected in the build path of project: B",
+ "A cycle was detected in the include path of project: B",
projectB);
// delete project B
@@ -2600,8 +1880,7 @@
"B",
new String[] {}, // source folders
new String[] {}, // lib folders
- new String[] {"/A"}, // projects
- "");
+ new String[] {"/A"});
this.assertMarkers(
"Unexpected markers for project A after adding project B back",
"A cycle was detected in the build path of project: A",
@@ -2621,7 +1900,7 @@
*/
public void testNullClasspath() throws CoreException {
try {
- IJavaScriptProject project = this.createJavaProject("P", new String[] {""}, "");
+ IJavaScriptProject project = this.createJavaProject("P", new String[] {""});
setClasspath(project, null);
IIncludePathEntry[] cp= project.getRawIncludepath();
assertTrue("classpath should have one root entry", cp.length == 1 && cp[0].getPath().equals(project.getUnderlyingResource().getFullPath()));
@@ -2629,28 +1908,6 @@
this.deleteProject("P");
}
}
-/**
- * Ensure that reading an empty custom output from the .classpath returns a non-null output location.
- * (regression test for 28531 Classpath Entry: Output folder can not be set to project)
- */
-public void testReadEmptyCustomOutput() throws CoreException {
- try {
- IJavaScriptProject project = this.createJavaProject("P", new String[] {}, "");
- this.editFile(
- "/P/.classpath",
- "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
- "<classpath>\n" +
- " <classpathentry kind=\"src\" output=\"\" path=\"\"/>\n" +
- " <classpathentry kind=\"output\" path=\"bin\"/>\n" +
- "</classpath>"
- );
- IIncludePathEntry[] classpath = project.getRawIncludepath();
- assertEquals("Unexpected classpath length", 1, classpath.length);
- assertEquals("Unexpected custom output location", new Path("/P"), null);
- } finally {
- this.deleteProject("P");
- }
-}
/*
* Ensures that setting the 'combineAccessRules' flag to false on a project entry generates the correct .classpath file.
@@ -2661,7 +1918,7 @@
IJavaScriptProject project = createJavaProject("P2");
IIncludePathEntry entry = JavaScriptCore.newProjectEntry(new Path("/P1"), (IAccessRule[]) null, false/*don't combine*/, new IIncludePathAttribute[] {}, false);
project.setRawIncludepath(new IIncludePathEntry[] {entry}, null);
- String contents = new String (org.eclipse.wst.jsdt.internal.core.util.Util.getResourceContentsAsCharArray(getFile("/P2/.classpath")));
+ String contents = new String (org.eclipse.wst.jsdt.internal.core.util.Util.getResourceContentsAsCharArray(getFile("/P2/.settings/.jsdtscope")));
assertSourceEquals(
"Unexpected content",
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
@@ -2685,7 +1942,7 @@
IJavaScriptProject project = createJavaProject("P2");
IIncludePathEntry entry = JavaScriptCore.newProjectEntry(new Path("/P1"), (IAccessRule[]) null, true/*combine*/, new IIncludePathAttribute[] {}, false);
project.setRawIncludepath(new IIncludePathEntry[] {entry}, null);
- String contents = new String (org.eclipse.wst.jsdt.internal.core.util.Util.getResourceContentsAsCharArray(getFile("/P2/.classpath")));
+ String contents = new String (org.eclipse.wst.jsdt.internal.core.util.Util.getResourceContentsAsCharArray(getFile("/P2/.settings/.jsdtscope")));
assertSourceEquals(
"Unexpected content",
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
@@ -2707,7 +1964,7 @@
try {
IJavaScriptProject project = createJavaProject("P2");
editFile(
- "/P2/.classpath",
+ "/P2/.settings/.jsdtscope",
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
"<classpath>\n" +
" <classpathentry kind=\"src\" combineaccessrules=\"false\" path=\"/P1\"/>\n" +
@@ -2730,7 +1987,7 @@
try {
IJavaScriptProject project = createJavaProject("P2");
editFile(
- "/P2/.classpath",
+ "/P2/.settings/.jsdtscope",
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
"<classpath>\n" +
" <classpathentry kind=\"src\" path=\"/P1\"/>\n" +
@@ -2753,7 +2010,7 @@
try {
IJavaScriptProject project = createJavaProject("P2");
editFile(
- "/P2/.classpath",
+ "/P2/.settings/.jsdtscope",
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
"<classpath>\n" +
" <classpathentry kind=\"src\" path=\"src\"/>\n" +
@@ -2777,7 +2034,7 @@
try {
for (int i = 0; i < max; i++) {
projectNames[i] = "P"+i;
- p[i] = this.createJavaProject(projectNames[i], new String[] {""}, "");
+ p[i] = this.createJavaProject(projectNames[i], new String[] {""});
}
IIncludePathEntry[][] extraEntries = new IIncludePathEntry[][]{
@@ -2818,69 +2075,6 @@
}
}
-
-public void testCycleDetectionThroughVariables() throws CoreException {
-
- int max = 5;
- IJavaScriptProject[] p = new IJavaScriptProject[max];
- String[] projectNames = new String[max];
- try {
- for (int i = 0; i < max; i++) {
- projectNames[i] = "P"+i;
- p[i] = this.createJavaProject(projectNames[i], new String[] {""}, "");
- }
-
- String[] var = new String[]{ "v0", "v1", "v2"};
- IIncludePathEntry[][] extraEntries = new IIncludePathEntry[][]{
- { JavaScriptCore.newProjectEntry(p[1].getPath()), JavaScriptCore.newVariableEntry(new Path(var[0]), null, null) },
- { JavaScriptCore.newProjectEntry(p[2].getPath()), JavaScriptCore.newProjectEntry(p[3].getPath()) },
- { JavaScriptCore.newVariableEntry(new Path(var[1]), null, null) },
- { JavaScriptCore.newVariableEntry(new Path(var[2]), null, null)},
- { JavaScriptCore.newProjectEntry(p[3].getPath()), JavaScriptCore.newProjectEntry(p[0].getPath()) }
- };
-
- int[][] expectedCycleParticipants = new int[][] {
- { 0, 0, 0, 0, 0 }, // after setting CP p[0]
- { 0, 0, 0, 0, 0 }, // after setting CP p[1]
- { 0, 0, 0, 0, 0 }, // after setting CP p[2]
- { 0, 0, 0, 0, 0 }, // after setting CP p[3]
- { 1, 1, 1, 1, 1 }, // after setting CP p[4]
- };
-
- IPath[][] variableValues = new IPath[][]{
- { null, null, null },
- { null, null, null },
- { null, null, null },
- { null, null, null },
- { p[3].getPath(), p[1].getPath(), p[4].getPath() },
- };
-
- for (int i = 0; i < p.length; i++){
-
- // append project references
- IIncludePathEntry[] oldClasspath = p[i].getRawIncludepath();
- IIncludePathEntry[] newClasspath = new IIncludePathEntry[oldClasspath.length+extraEntries[i].length];
- System.arraycopy(oldClasspath, 0 , newClasspath, 0, oldClasspath.length);
- for (int j = 0; j < extraEntries[i].length; j++){
- newClasspath[oldClasspath.length+j] = extraEntries[i][j];
- }
- // set classpath
- p[i].setRawIncludepath(newClasspath, null);
-
- // update variable values
- JavaScriptCore.setIncludepathVariables(var, variableValues[i], null);
-
- // check cycle markers
- this.assertCycleMarkers(p[i], p, expectedCycleParticipants[i]);
- }
- //this.startDeltas();
-
- } finally {
- //this.stopDeltas();
- this.deleteProjects(projectNames);
- }
-}
-
public void testCycleDetectionThroughContainers() throws CoreException {
int max = 5;
@@ -2889,7 +2083,7 @@
try {
for (int i = 0; i < max; i++) {
projectNames[i] = "P"+i;
- p[i] = this.createJavaProject(projectNames[i], new String[] {""}, "");
+ p[i] = this.createJavaProject(projectNames[i], new String[] {""});
}
IJsGlobalScopeContainer[] containers = new IJsGlobalScopeContainer[]{
@@ -2971,7 +2165,7 @@
try {
for (int i = 0; i < max; i++) {
projectNames[i] = "P"+i;
- p[i] = this.createJavaProject(projectNames[i], new String[] {""}, "");
+ p[i] = this.createJavaProject(projectNames[i], new String[] {""});
}
class LocalTestContainer implements IJsGlobalScopeContainer {
@@ -3066,7 +2260,7 @@
try {
for (int i = 0; i < max; i++) {
projectNames[i] = "P"+i;
- p[i] = this.createJavaProject(projectNames[i], new String[] {""}, "");
+ p[i] = this.createJavaProject(projectNames[i], new String[] {""});
}
IIncludePathEntry[][] extraEntries = new IIncludePathEntry[][]{
@@ -3116,7 +2310,7 @@
try {
for (int i = 0; i < max; i++) {
projectNames[i] = "P"+i;
- p[i] = this.createJavaProject(projectNames[i], new String[] {""}, "");
+ p[i] = this.createJavaProject(projectNames[i], new String[] {""});
}
IIncludePathEntry[][] extraEntries = new IIncludePathEntry[][]{
@@ -3181,11 +2375,11 @@
}
};
try {
- IJavaScriptProject p1 = createJavaProject("P1", new String[] {}, new String[] {}, new String[] {"/P2"}, "");
+ IJavaScriptProject p1 = createJavaProject("P1", new String[] {}, new String[] {}, new String[] {"/P2"});
TestContainer container = new TestContainer(
new Path("org.eclipse.wst.jsdt.core.tests.model.container/default"),
new IIncludePathEntry[] {});
- IJavaScriptProject p2 = createJavaProject("P2", new String[] {}, new String[] {container.getPath().toString()}, "");
+ IJavaScriptProject p2 = createJavaProject("P2", new String[] {}, new String[] {container.getPath().toString()});
JavaScriptCore.setJsGlobalScopeContainer(container.getPath(), new IJavaScriptProject[] {p2}, new IJsGlobalScopeContainer[] {container}, null);
waitForAutoBuild();
getWorkspace().addResourceChangeListener(listener, IResourceChangeEvent.POST_CHANGE);
@@ -3243,16 +2437,17 @@
*/
public void testNoResourceChange01() throws CoreException {
try {
- IJavaScriptProject project = createJavaProject("P", new String[] {"src1"}, "bin");
+ IJavaScriptProject project = createJavaProject("P", new String[] {"src1"});
IIncludePathEntry[] newClasspath = createClasspath("P", new String[] {"/P/src2", ""});
project.setRawIncludepath(newClasspath, false/*cannot modify resources*/, null/*no progress*/);
- String contents = new String (org.eclipse.wst.jsdt.internal.core.util.Util.getResourceContentsAsCharArray(getFile("/P/.classpath")));
+ String contents = new String (org.eclipse.wst.jsdt.internal.core.util.Util.getResourceContentsAsCharArray(getFile("/P/.settings/.jsdtscope")));
assertSourceEquals(
"Unexpected content",
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
"<classpath>\n" +
" <classpathentry kind=\"src\" path=\"src1\"/>\n" +
- " <classpathentry kind=\"output\" path=\"bin\"/>\n" +
+ " <classpathentry kind=\"con\" path=\"org.eclipse.wst.jsdt.launching.JRE_CONTAINER\"/>\n" +
+ " <classpathentry kind=\"output\" path=\"\"/>\n" +
"</classpath>\n",
contents);
} finally {
@@ -3264,7 +2459,7 @@
*/
public void testNoResourceChange02() throws CoreException {
try {
- IJavaScriptProject project = createJavaProject("P", new String[] {"src1"}, "bin");
+ IJavaScriptProject project = createJavaProject("P", new String[] {"src1"});
IIncludePathEntry[] newClasspath = createClasspath("P", new String[] {"/P/src2", ""});
project.setRawIncludepath(newClasspath, false/*cannot modify resources*/, null/*no progress*/);
assertClasspathEquals(
@@ -3280,7 +2475,7 @@
*/
public void testNoResourceChange03() throws CoreException {
try {
- IJavaScriptProject project = createJavaProject("P", new String[] {"src1"}, "bin");
+ IJavaScriptProject project = createJavaProject("P", new String[] {"src1"});
createFile(
"/P/src1/X.js",
"public class X {\n" +
@@ -3300,7 +2495,7 @@
*/
public void testNoResourceChange04() throws CoreException {
try {
- IJavaScriptProject project = createJavaProject("P", new String[] {"src1"}, "bin");
+ IJavaScriptProject project = createJavaProject("P", new String[] {"src1"});
createFolder("/P/src2");
IIncludePathEntry[] newClasspath = createClasspath("P", new String[] {"/P/src2", ""});
startDeltas();
@@ -3321,11 +2516,12 @@
*/
public void testNoResourceChange05() throws CoreException {
try {
- IJavaScriptProject project = createJavaProject("P", new String[] {"src1"}, "bin");
- project.setRawIncludepath(project.getRawIncludepath(), new Path("/P/bin2"), false/*cannot modify resources*/, null/*no progress*/);
+ IJavaScriptProject project = createJavaProject("P", new String[] {"src1"});
+ project.setRawIncludepath(project.getRawIncludepath(), false/*cannot modify resources*/, null/*no progress*/);
+ IIncludePathEntry[] entries = project.readRawIncludepath(); // force to read classpath
assertEquals(
- "/P/bin2",
- project.getOutputLocation().toString());
+ "/P/src2",
+ entries[0].getPath().toString());
} finally {
deleteProject("P");
}
@@ -3336,9 +2532,9 @@
*/
public void testDuplicateEntries() throws CoreException {
try {
- IJavaScriptProject project = this.createJavaProject("P", new String[] {"src"}, "bin");
+ IJavaScriptProject project = this.createJavaProject("P", new String[] {"src"});
this.editFile(
- "/P/.classpath",
+ "/P/.settings/.jsdtscope",
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
"<classpath>\n" +
" <classpathentry kind=\"src\" path=\"src\"/>\n" +
@@ -3365,7 +2561,7 @@
public void run(IProgressMonitor monitor) throws CoreException {
for (int i = 0; i < numberOfParticipants; i++){
projectNames[i] = "P"+i;
- projects[i] = createJavaProject(projectNames[i], new String[]{""}, "");
+ projects[i] = createJavaProject(projectNames[i], new String[]{""});
allProjectsInCycle[i] = 1;
}
for (int i = 0; i < numberOfParticipants; i++){
@@ -3419,7 +2615,7 @@
public void run(IProgressMonitor monitor) throws CoreException {
for (int i = 0; i < numberOfParticipants; i++){
projectNames[i] = "P"+i;
- projects[i] = createJavaProject(projectNames[i], new String[]{""}, "");
+ projects[i] = createJavaProject(projectNames[i], new String[]{""});
allProjectsInCycle[i] = 0;
}
}
@@ -3431,7 +2627,7 @@
if (!createProjectsFirst) {
for (int i = 0; i < numberOfParticipants; i++){
projectNames[i] = "P"+i;
- projects[i] = createJavaProject(projectNames[i], new String[]{""}, "");
+ projects[i] = createJavaProject(projectNames[i], new String[]{""});
allProjectsInCycle[i] = 0;
}
}
@@ -3539,7 +2735,7 @@
*/
public void testOptionalEntry1() throws CoreException {
try {
- IJavaScriptProject javaProject = this.createJavaProject("A", new String[] {}, "");
+ IJavaScriptProject javaProject = this.createJavaProject("A", new String[] {});
IIncludePathAttribute attribute = JavaScriptCore.newIncludepathAttribute(IIncludePathAttribute.OPTIONAL, "true");
IIncludePathEntry[] classpath =
new IIncludePathEntry[] {
@@ -3559,7 +2755,7 @@
*/
public void testOptionalEntry2() throws CoreException {
try {
- IJavaScriptProject javaProject = this.createJavaProject("A", new String[] {}, "");
+ IJavaScriptProject javaProject = this.createJavaProject("A", new String[] {});
IIncludePathAttribute attribute = JavaScriptCore.newIncludepathAttribute(IIncludePathAttribute.OPTIONAL, "true");
IIncludePathEntry[] classpath =
new IIncludePathEntry[] {
@@ -3579,7 +2775,7 @@
*/
public void testOptionalEntry3() throws CoreException {
try {
- IJavaScriptProject javaProject = this.createJavaProject("A", new String[] {}, "");
+ IJavaScriptProject javaProject = this.createJavaProject("A", new String[] {});
IIncludePathAttribute attribute = JavaScriptCore.newIncludepathAttribute(IIncludePathAttribute.OPTIONAL, "true");
IIncludePathEntry[] classpath =
new IIncludePathEntry[] {
@@ -3594,75 +2790,13 @@
this.deleteProject("A");
}
}
-/*
- * test for bug 32974
- */
-public void testOutputFolder1() throws CoreException, IOException {
- try {
- // create project using Platform/Resources API
- final IProject project = getProject("P");
- IWorkspaceRunnable create = new IWorkspaceRunnable() {
- public void run(IProgressMonitor monitor) throws CoreException {
- project.create(null, null);
- project.open(null);
- }
- };
- getWorkspace().run(create, null);
-
- // create folders src and src/src2 using java.io API
- File pro = project.getLocation().toFile();
- File src = createFolder(pro, "src");
- createFolder(src, "src2");
-
- // create .project using java.io API
- createFile(pro, ".project",
- "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
- "<projectDescription>\n" +
- " <name>org.eclipse.wst.jsdt.core</name>\n" +
- " <comment></comment>\n" +
- " <projects>\n" +
- " </projects>\n" +
- " <buildSpec>\n" +
- " <buildCommand>\n" +
- " <name>org.eclipse.wst.jsdt.core.javabuilder</name>\n" +
- " <arguments>\n" +
- " </arguments>\n" +
- " </buildCommand>\n" +
- " </buildSpec>\n" +
- " <natures>\n" +
- " <nature>org.eclipse.wst.jsdt.core.javanature</nature>\n" +
- " </natures>\n" +
- "</projectDescription>");
-
- // create .classpath using java.io API
- createFile(pro, ".classpath",
- "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
- "<classpath>\n" +
- " <classpathentry kind=\"src\" output=\"bin2\" path=\"src1\"/>\n" +
- " <classpathentry kind=\"src\" path=\"src2\"/>\n" +
- " <classpathentry kind=\"output\" path=\"bin\"/>\n" +
- "</classpath>"
- );
-
- // refresh
- project.refreshLocal(IResource.DEPTH_INFINITE,null);
-
- assertMarkers(
- "Unexpected markers",
- "Project P is missing required source folder: \'src1\'\n" +
- "Project P is missing required source folder: \'src2\'",
- JavaScriptCore.create(project));
- } finally {
- deleteProject("P");
- }
-}
/**
* Ensure classpath is refreshed when project is replaced (43670)
*/
public void testReplaceProject() throws CoreException {
try {
- final IJavaScriptProject javaProject = createJavaProject("P", new String[] {"src"}, "bin");
+ final IJavaScriptProject javaProject = createJavaProject("P", new String[] {"src"});
ResourcesPlugin.getWorkspace().run(
new IWorkspaceRunnable() {
@@ -3671,11 +2805,10 @@
descr.setComment("dummy"); // ensure it is changed
javaProject.getProject().setDescription(descr, monitor);
editFile(
- "/P/.classpath",
+ "/P/.settings/.jsdtscope",
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
"<classpath>\n" +
" <classpathentry kind=\"src\" path=\"src2\"/>\n" +
- " <classpathentry kind=\"output\" path=\"bin\"/>\n" +
"</classpath>"
);
}
@@ -3696,7 +2829,7 @@
try {
IJavaScriptProject project = createJavaProject("P");
editFile(
- "/P/.classpath",
+ "/P/.settings/.jsdtscope",
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
"<classpath>\n" +
" <classpathentry unknown=\"test\" kind=\"src\" path=\"src1\"/>\n" +
@@ -3713,7 +2846,7 @@
project.setRawIncludepath(classpath, null);
// check that .classpath has correct content
- String contents = new String (org.eclipse.wst.jsdt.internal.core.util.Util.getResourceContentsAsCharArray(getFile("/P/.classpath")));
+ String contents = new String (org.eclipse.wst.jsdt.internal.core.util.Util.getResourceContentsAsCharArray(getFile("/P/.settings/.jsdtscope")));
assertSourceEquals(
"Unexpected content",
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
@@ -3736,7 +2869,7 @@
try {
IJavaScriptProject project = createJavaProject("P");
editFile(
- "/P/.classpath",
+ "/P/.settings/.jsdtscope",
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
"<classpath>\n" +
" <classpathentry kind=\"src\" path=\"src1\">\n" +
@@ -3757,7 +2890,7 @@
project.setRawIncludepath(classpath, null);
// check that .classpath has correct content
- String contents = new String (org.eclipse.wst.jsdt.internal.core.util.Util.getResourceContentsAsCharArray(getFile("/P/.classpath")));
+ String contents = new String (org.eclipse.wst.jsdt.internal.core.util.Util.getResourceContentsAsCharArray(getFile("/P/.settings/.jsdtscope")));
assertSourceEquals(
"Unexpected content",
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
@@ -3784,7 +2917,7 @@
try {
IJavaScriptProject project = createJavaProject("P");
editFile(
- "/P/.classpath",
+ "/P/.settings/.jsdtscope",
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
"<classpath>\n" +
" <classpathentry kind=\"src\" unknownattribute=\"abcde\" path=\"src1\">\n" +
@@ -3811,7 +2944,7 @@
project.setRawIncludepath(classpath, null);
// check that .classpath has correct content
- String contents = new String (org.eclipse.wst.jsdt.internal.core.util.Util.getResourceContentsAsCharArray(getFile("/P/.classpath")));
+ String contents = new String (org.eclipse.wst.jsdt.internal.core.util.Util.getResourceContentsAsCharArray(getFile("/P/.settings/.jsdtscope")));
assertSourceEquals(
"Unexpected content",
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
@@ -3844,9 +2977,9 @@
*/
public void testBug55992a() throws CoreException {
try {
- IJavaScriptProject proj = this.createJavaProject("P", new String[] {}, "");
+ IJavaScriptProject proj = this.createJavaProject("P", new String[] {});
- IPath path = getExternalJCLPath();
+ IPath path = getExternalJCLPath("");
IPath sourceAttachmentPath = new Path("jclMin.zip");
JavaScriptCore.setIncludepathVariables(
new String[] {"TEST_LIB", "TEST_SRC"},
@@ -3874,54 +3007,25 @@
this.deleteProject("P");
}
}
-public void testBug55992b() throws CoreException {
-
- boolean autoBuild = getWorkspace().isAutoBuilding();
- IWorkspaceDescription preferences = getWorkspace().getDescription();
- try {
- preferences.setAutoBuilding(false);
- IJavaScriptProject javaProject = this.createJavaProject("P", new String[] {"src", "lib"}, "bin");
- JavaScriptCore.setIncludepathVariables(
- new String[] {"TEST_LIB", "TEST_SRC"},
- new IPath[] {new Path("/lib/tmp.jar"), new Path("tmp.zip")},
- null);
- this.editFile(
- "/P/.classpath",
- "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
- "<classpath>\n" +
- " <classpathentry kind=\"src\" path=\"src\"/>\n" +
- " <classpathentry kind=\"output\" path=\"bin\"/>\n" +
- " <classpathentry kind=\"var\" path=\"TEST_LIB\" sourcepath=\"TEST_SRC\"/>\n" +
- "</classpath>"
- );
- assertMarkers(
- "Unexpected markers",
- "assertion failed: Source attachment path \'tmp.zip\' for IIncludePathEntry must be absolute",
- javaProject);
- } finally {
- this.deleteProject("P");
- preferences.setAutoBuilding(autoBuild);
- }
-}
/*
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=61214
*/
public void testRemoveDuplicates() throws CoreException {
try {
- IJavaScriptProject p1 = this.createJavaProject("P1", new String[] {""}, "");
- IIncludePathEntry[] p1ClasspathEntries = new IIncludePathEntry[]{JavaScriptCore.newLibraryEntry(getExternalJCLPath(), null, null, true)};
+ IJavaScriptProject p1 = this.createJavaProject("P1", new String[] {""});
+ IIncludePathEntry[] p1ClasspathEntries = new IIncludePathEntry[]{JavaScriptCore.newLibraryEntry(getExternalJCLPath(""), null, null, true)};
setClasspath(p1, p1ClasspathEntries);
- IJavaScriptProject p2 = this.createJavaProject("P2", new String[] {""}, "");
+ IJavaScriptProject p2 = this.createJavaProject("P2", new String[] {""});
IIncludePathEntry[] p2ClasspathEntries = new IIncludePathEntry[]{
JavaScriptCore.newProjectEntry(new Path("/P1")),
- JavaScriptCore.newLibraryEntry(getExternalJCLPath(), null, null, false)
+ JavaScriptCore.newLibraryEntry(getExternalJCLPath(""), null, null, false)
};
setClasspath(p2, p2ClasspathEntries);
IIncludePathEntry[] classpath = ((JavaProject)p2).getExpandedClasspath();
assertEquals("Unexpected number of classpath entries", 2, classpath.length);
assertEquals("Unexpected first entry", "/P1", classpath[0].getPath().toString());
- assertEquals("Unexpected second entry", getExternalJCLPathString(), classpath[1].getPath().toOSString());
+ assertEquals("Unexpected second entry", getSystemJsPathString(), classpath[1].getPath().toOSString());
} finally {
this.deleteProjects(new String[] {"P1", "P2"});
}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CompilationUnitTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CompilationUnitTests.java
index de620fb..22017f0 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CompilationUnitTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CompilationUnitTests.java
@@ -30,7 +30,7 @@
public void setUpSuite() throws Exception {
super.setUpSuite();
- this.testProject = createJavaProject("P", new String[] {"src"}, new String[] {getExternalJCLPathString()}, "bin", "1.5");
+ this.testProject = createJavaProject("P", new String[] {"src"}, new String[] {getSystemJsPathString()}, "bin", "1.5");
createFolder("/P/src/p");
createFile(
"/P/src/p/X.js",
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CompletionTests2.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CompletionTests2.java
index 580bf22..3e360d2 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CompletionTests2.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CompletionTests2.java
@@ -236,8 +236,7 @@
IJavaScriptProject p = this.createJavaProject(
"P1",
new String[]{"/"},
- new String[]{},
- "");
+ new String[]{});
IFile libFile = this.createFile("/P1/ZZZ.js", f.getContents());
this.addLibraryEntry(p, libFile.getLocation().toString(), true);
@@ -246,8 +245,7 @@
"P2",
new String[]{"/"},
new String[]{},
- new String[]{"/P1"},
- "bin");
+ new String[]{"/P1"});
this.createFile(
"/P2/X.js",
"function testZZZClass {\n"+
@@ -364,8 +362,7 @@
IJavaScriptProject p = this.createJavaProject(
"P1",
new String[]{"/"},
- new String[]{},
- "");;
+ new String[]{});;
IFile libFile = this.createFile("/P1/ZZZ.js", f.getContents());
this.addLibraryEntry(p, libFile.getLocation().toString(), true);
@@ -374,16 +371,14 @@
"P2",
new String[]{"/"},
new String[]{},
- new String[]{"/P1"},
- "bin");
+ new String[]{"/P1"});
// create P3
this.createJavaProject(
"P3",
new String[]{"/"},
new String[]{},
- new String[]{"/P1"},
- "bin");
+ new String[]{"/P1"});
this.createFile(
"/P3/X.js",
"function testZZZClass {\n"+
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CompletionWithMissingTypesTests2.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CompletionWithMissingTypesTests2.java
index e65e7b6..2e5980b 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CompletionWithMissingTypesTests2.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CompletionWithMissingTypesTests2.java
@@ -87,8 +87,7 @@
this.createJavaProject(
"P1",
new String[]{"src"},
- new String[]{"JCL_LIB"},
- "bin");
+ new String[]{"JCL_LIB"});
this.createFolder("/P1/src/a");
this.createFile(
@@ -117,8 +116,6 @@
new String[][]{{}},
new String[][]{{"a/*"}},
new boolean[]{false},
- "bin",
- null,
null,
null,
"1.4");
@@ -181,8 +178,7 @@
this.createJavaProject(
"P1",
new String[]{"src"},
- new String[]{"JCL_LIB"},
- "bin");
+ new String[]{"JCL_LIB"});
this.createFolder("/P1/src/a");
this.createFile(
@@ -211,8 +207,6 @@
new String[][]{{}},
new String[][]{{"a/*"}},
new boolean[]{false},
- "bin",
- null,
null,
null,
"1.4");
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CopyMoveElementsTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CopyMoveElementsTests.java
index e7c095b..042c329 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CopyMoveElementsTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CopyMoveElementsTests.java
@@ -24,7 +24,7 @@
public void setUpSuite() throws Exception {
super.setUpSuite();
- IJavaScriptProject project = this.createJavaProject("BinaryProject", new String[] {"src"}, new String[] {"JCL_LIB"}, "bin");
+ IJavaScriptProject project = this.createJavaProject("BinaryProject", new String[] {"src"}, new String[] {"JCL_LIB"});
this.createFile(
"/BinaryProject/src/X.js",
"public class X {\n" +
@@ -42,7 +42,7 @@
public void setUp() throws Exception {
super.setUp();
- this.createJavaProject("P", new String[] {"src"}, new String[] {"/BinaryProject/bin"}, "bin");
+ this.createJavaProject("P", new String[] {"src"}, new String[] {"/BinaryProject/bin"});
}
// Use this static initializer to specify subset for tests
// All specified tests which do not belong to the class are skipped...
@@ -206,7 +206,7 @@
IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IField fieldSource= typeSource.getField("bar");
- this.createJavaProject("P2", new String[] {"src"}, "bin");
+ this.createJavaProject("P2", new String[] {"src"});
this.createFile(
"/P2/src/Y.js",
"public class Y {\n" +
@@ -234,7 +234,7 @@
IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IField fieldSource= typeSource.getField("bar");
- this.createJavaProject("P2", new String[] {"src"}, "bin");
+ this.createJavaProject("P2", new String[] {"src"});
this.createFile(
"/P2/src/Y.js",
"public class Y {\n" +
@@ -309,7 +309,7 @@
IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IField fieldSource= typeSource.getField("foo");
- this.createJavaProject("P2", new String[] {"src"}, "bin");
+ this.createJavaProject("P2", new String[] {"src"});
this.createFile(
"/P2/src/Y.js",
"public class Y {\n" +
@@ -338,7 +338,7 @@
IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IField fieldSource= typeSource.getField("foo");
- this.createJavaProject("P2", new String[] {"src"}, "bin");
+ this.createJavaProject("P2", new String[] {"src"});
this.createFile(
"/P2/src/Y.js",
"public class Y {\n" +
@@ -438,7 +438,7 @@
);
IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
- this.createJavaProject("P2", new String[] {"src"}, "bin");
+ this.createJavaProject("P2", new String[] {"src"});
this.createFile(
"/P2/src/Y.js",
"public class Y {\n" +
@@ -521,7 +521,7 @@
IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IField fieldSource= typeSource.getField("bar");
- this.createJavaProject("P2", new String[] {"src"}, "bin");
+ this.createJavaProject("P2", new String[] {"src"});
this.createFile(
"/P2/src/Y.js",
"public class Y {\n" +
@@ -566,7 +566,7 @@
IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IField fieldSource= typeSource.getField("foo");
- this.createJavaProject("P2", new String[] {"src"}, new String[] {"/BinaryProject/bin"}, "bin");
+ this.createJavaProject("P2", new String[] {"src"}, new String[] {"/BinaryProject/bin"});
IClassFile cf = getClassFile("P2", "/BinaryProject/bin", "", "X.class");
copyNegative(fieldSource, cf.getType(), null, null, false, IJavaScriptModelStatusConstants.INVALID_DESTINATION);
@@ -618,7 +618,7 @@
IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IField fieldSource= typeSource.getField("foo");
- this.createJavaProject("P2", new String[] {"src"}, "bin");
+ this.createJavaProject("P2", new String[] {"src"});
this.createFile(
"/P2/src/Y.js",
"public class Y {\n" +
@@ -675,7 +675,7 @@
IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IField fieldSource= typeSource.getField("foo");
- this.createJavaProject("P2", new String[] {"src"}, "bin");
+ this.createJavaProject("P2", new String[] {"src"});
this.createFile(
"/P2/src/Y.js",
"public class Y {\n" +
@@ -781,7 +781,7 @@
IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IInitializer initializerSource= typeSource.getInitializer(1);
- this.createJavaProject("P2", new String[] {"src"}, "bin");
+ this.createJavaProject("P2", new String[] {"src"});
this.createFile(
"/P2/src/Y.js",
"public class Y {\n" +
@@ -836,7 +836,7 @@
IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IInitializer initializerSource= typeSource.getInitializer(1);
- this.createJavaProject("P2", new String[] {"src"}, "bin");
+ this.createJavaProject("P2", new String[] {"src"});
this.createFile(
"/P2/src/Y.js",
"public class Y {\n" +
@@ -867,7 +867,7 @@
IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IInitializer initializerSource= typeSource.getInitializer(1);
- this.createJavaProject("P2", new String[] {"src"}, "bin");
+ this.createJavaProject("P2", new String[] {"src"});
this.createFile(
"/P2/src/Y.js",
"public class Y {\n" +
@@ -895,7 +895,7 @@
);
IType typeSource = getCompilationUnit("/P/src/X.js").getType("X").getType("Inner");
- this.createJavaProject("P2", new String[] {"src"}, "bin");
+ this.createJavaProject("P2", new String[] {"src"});
this.createFile(
"/P2/src/Y.js",
"public class Y {\n" +
@@ -967,7 +967,7 @@
);
IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
- this.createJavaProject("P2", new String[] {"src"}, "bin");
+ this.createJavaProject("P2", new String[] {"src"});
this.createFile(
"/P2/src/Y.js",
"public class Y {\n" +
@@ -1045,7 +1045,7 @@
IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IFunction methodSource= typeSource.getFunction("foo", new String[] {"QString;"});
- this.createJavaProject("P2", new String[] {"src"}, "bin");
+ this.createJavaProject("P2", new String[] {"src"});
this.createFile(
"/P2/src/Y.js",
"public class Y {\n" +
@@ -1075,7 +1075,7 @@
IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IFunction methodSource= typeSource.getFunction("foo", new String[] {"QString;"});
- this.createJavaProject("P2", new String[] {"src"}, "bin");
+ this.createJavaProject("P2", new String[] {"src"});
this.createFile(
"/P2/src/Y.js",
"public class Y {\n" +
@@ -1154,7 +1154,7 @@
IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IFunction methodSource= typeSource.getFunction("foo", new String[] {"QString;"});
- this.createJavaProject("P2", new String[] {"src"}, "bin");
+ this.createJavaProject("P2", new String[] {"src"});
this.createFile(
"/P2/src/Y.js",
"public class Y {\n" +
@@ -1185,7 +1185,7 @@
IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IFunction methodSource= typeSource.getFunction("foo", new String[] {"QString;"});
- this.createJavaProject("P2", new String[] {"src"}, "bin");
+ this.createJavaProject("P2", new String[] {"src"});
this.createFile(
"/P2/src/Y.js",
"public class Y {\n" +
@@ -1257,7 +1257,7 @@
IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IFunction methodSource= typeSource.getFunction("foo", new String[] {"QString;"});
- this.createJavaProject("P2", new String[] {"src"}, "bin");
+ this.createJavaProject("P2", new String[] {"src"});
this.createFile(
"/P2/src/Y.js",
"public class Y {\n" +
@@ -1303,7 +1303,7 @@
IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IFunction methodSource = typeSource.getFunction("foo", new String[] {"QString;"});
- this.createJavaProject("P2", new String[] {"src"}, "bin");
+ this.createJavaProject("P2", new String[] {"src"});
this.createFile(
"/P2/src/Y.js",
"public class Y {\n" +
@@ -1334,7 +1334,7 @@
IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IFunction methodSource = typeSource.getFunction("foo", new String[] {"QString;"});
- this.createJavaProject("P2", new String[] {"src"}, "bin");
+ this.createJavaProject("P2", new String[] {"src"});
this.createFile(
"/P2/src/Y.js",
"public class Y {\n" +
@@ -1409,7 +1409,7 @@
IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IFunction methodSource= typeSource.getFunction("foo", new String[] {"QString;"});
- this.createJavaProject("P2", new String[] {"src"}, "bin");
+ this.createJavaProject("P2", new String[] {"src"});
this.createFile(
"/P2/src/Y.js",
"public class Y {\n" +
@@ -1458,7 +1458,7 @@
);
IType typeSource = getCompilationUnit("/P/src/X.js").getType("Z");
- this.createJavaProject("P2", new String[] {"src"}, "bin");
+ this.createJavaProject("P2", new String[] {"src"});
this.createFile(
"/P2/src/Y.js",
"public class Y {\n" +
@@ -1485,7 +1485,7 @@
);
IType typeSource = getCompilationUnit("/P/src/X.js").getType("Z");
- this.createJavaProject("P2", new String[] {"src"}, "bin");
+ this.createJavaProject("P2", new String[] {"src"});
this.createFile(
"/P2/src/Y.js",
"public class Y {\n" +
@@ -1543,7 +1543,7 @@
IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IFunction methodSource= typeSource.getFunction("X", new String[] {"QString;"});
- this.createJavaProject("P2", new String[] {"src"}, "bin");
+ this.createJavaProject("P2", new String[] {"src"});
this.createFile(
"/P2/src/Y.js",
"public class Y {\n" +
@@ -1621,7 +1621,7 @@
IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IField fieldSource= typeSource.getField("bar");
- this.createJavaProject("P2", new String[] {"src"}, "bin");
+ this.createJavaProject("P2", new String[] {"src"});
this.createFile(
"/P2/src/Y.js",
"public class Y {\n" +
@@ -1649,7 +1649,7 @@
IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IField fieldSource= typeSource.getField("bar");
- this.createJavaProject("P2", new String[] {"src"}, "bin");
+ this.createJavaProject("P2", new String[] {"src"});
this.createFile(
"/P2/src/Y.js",
"public class Y {\n" +
@@ -1724,7 +1724,7 @@
IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IField fieldSource= typeSource.getField("foo");
- this.createJavaProject("P2", new String[] {"src"}, "bin");
+ this.createJavaProject("P2", new String[] {"src"});
this.createFile(
"/P2/src/Y.js",
"public class Y {\n" +
@@ -1753,7 +1753,7 @@
IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IField fieldSource= typeSource.getField("foo");
- this.createJavaProject("P2", new String[] {"src"}, "bin");
+ this.createJavaProject("P2", new String[] {"src"});
this.createFile(
"/P2/src/Y.js",
"public class Y {\n" +
@@ -1781,7 +1781,7 @@
IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IField fieldSource= typeSource.getField("foo");
- this.createJavaProject("P2", new String[] {"src"}, "bin");
+ this.createJavaProject("P2", new String[] {"src"});
this.createFile(
"/P2/src/Y.js",
"public class Y {\n" +
@@ -1850,7 +1850,7 @@
IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IField fieldSource= typeSource.getField("bar");
- this.createJavaProject("P2", new String[] {"src"}, "bin");
+ this.createJavaProject("P2", new String[] {"src"});
this.createFile(
"/P2/src/Y.js",
"public class Y {\n" +
@@ -1895,7 +1895,7 @@
IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IField fieldSource= typeSource.getField("foo");
- this.createJavaProject("P2", new String[] {"src"}, new String[] {"/BinaryProject/bin"}, "bin");
+ this.createJavaProject("P2", new String[] {"src"}, new String[] {"/BinaryProject/bin"});
IClassFile cf = getClassFile("P2", "/BinaryProject/bin", "", "X.class");
moveNegative(fieldSource, cf.getType(), null, null, false, IJavaScriptModelStatusConstants.INVALID_DESTINATION);
@@ -1918,7 +1918,7 @@
IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IField fieldSource= typeSource.getField("foo");
- this.createJavaProject("P2", new String[] {"src"}, "bin");
+ this.createJavaProject("P2", new String[] {"src"});
this.createFile(
"/P2/src/Y.js",
"public class Y {\n" +
@@ -1975,7 +1975,7 @@
IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IInitializer initializerSource= typeSource.getInitializer(1);
- this.createJavaProject("P2", new String[] {"src"}, "bin");
+ this.createJavaProject("P2", new String[] {"src"});
this.createFile(
"/P2/src/Y.js",
"public class Y {\n" +
@@ -2030,7 +2030,7 @@
IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IInitializer initializerSource= typeSource.getInitializer(1);
- this.createJavaProject("P2", new String[] {"src"}, "bin");
+ this.createJavaProject("P2", new String[] {"src"});
this.createFile(
"/P2/src/Y.js",
"public class Y {\n" +
@@ -2061,7 +2061,7 @@
IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IInitializer initializerSource= typeSource.getInitializer(1);
- this.createJavaProject("P2", new String[] {"src"}, "bin");
+ this.createJavaProject("P2", new String[] {"src"});
this.createFile(
"/P2/src/Y.js",
"public class Y {\n" +
@@ -2090,7 +2090,7 @@
);
IType typeSource = getCompilationUnit("/P/src/X.js").getType("X").getType("Inner");
- this.createJavaProject("P2", new String[] {"src"}, "bin");
+ this.createJavaProject("P2", new String[] {"src"});
this.createFile(
"/P2/src/Y.js",
"public class Y {\n" +
@@ -2121,7 +2121,7 @@
);
IType typeSource = getCompilationUnit("/P/src/X.js").getType("X").getType("Inner");
- this.createJavaProject("P2", new String[] {"src"}, "bin");
+ this.createJavaProject("P2", new String[] {"src"});
this.createFile(
"/P2/src/Y.js",
"public class Y {\n" +
@@ -2226,7 +2226,7 @@
IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IFunction methodSource= typeSource.getFunction("foo", new String[] {"QString;"});
- this.createJavaProject("P2", new String[] {"src"}, "bin");
+ this.createJavaProject("P2", new String[] {"src"});
this.createFile(
"/P2/src/Y.js",
"public class Y {\n" +
@@ -2256,7 +2256,7 @@
IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IFunction methodSource= typeSource.getFunction("foo", new String[] {"QString;"});
- this.createJavaProject("P2", new String[] {"src"}, "bin");
+ this.createJavaProject("P2", new String[] {"src"});
this.createFile(
"/P2/src/Y.js",
"public class Y {\n" +
@@ -2335,7 +2335,7 @@
IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IFunction methodSource= typeSource.getFunction("foo", new String[] {"QString;"});
- this.createJavaProject("P2", new String[] {"src"}, "bin");
+ this.createJavaProject("P2", new String[] {"src"});
this.createFile(
"/P2/src/Y.js",
"public class Y {\n" +
@@ -2366,7 +2366,7 @@
IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IFunction methodSource= typeSource.getFunction("foo", new String[] {"QString;"});
- this.createJavaProject("P2", new String[] {"src"}, "bin");
+ this.createJavaProject("P2", new String[] {"src"});
this.createFile(
"/P2/src/Y.js",
"public class Y {\n" +
@@ -2395,7 +2395,7 @@
IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IFunction methodSource = typeSource.getFunction("foo", new String[] {"QString;"});
- this.createJavaProject("P2", new String[] {"src"}, "bin");
+ this.createJavaProject("P2", new String[] {"src"});
this.createFile(
"/P2/src/Y.js",
"public class Y {\n" +
@@ -2476,7 +2476,7 @@
);
final IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
- this.createJavaProject("P2", new String[] {"src"}, "bin");
+ this.createJavaProject("P2", new String[] {"src"});
this.createFile(
"/P2/src/Y.js",
"public class Y {\n" +
@@ -2541,7 +2541,7 @@
IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IFunction methodSource= typeSource.getFunction("foo", new String[] {"QString;"});
- this.createJavaProject("P2", new String[] {"src"}, "bin");
+ this.createJavaProject("P2", new String[] {"src"});
this.createFile(
"/P2/src/Y.js",
"public class Y {\n" +
@@ -2587,7 +2587,7 @@
IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IFunction methodSource = typeSource.getFunction("foo", new String[] {"QString;"});
- this.createJavaProject("P2", new String[] {"src"}, "bin");
+ this.createJavaProject("P2", new String[] {"src"});
this.createFile(
"/P2/src/Y.js",
"public class Y {\n" +
@@ -2619,7 +2619,7 @@
IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IFunction methodSource = typeSource.getFunction("foo", new String[] {"QString;"});
- this.createJavaProject("P2", new String[] {"src"}, "bin");
+ this.createJavaProject("P2", new String[] {"src"});
this.createFile(
"/P2/src/Y.js",
"public class Y {\n" +
@@ -2673,7 +2673,7 @@
IType typeSource = getCompilationUnit("/P/src/X.js").getType("X");
IFunction methodSource= typeSource.getFunction("foo", new String[] {"QString;"});
- this.createJavaProject("P2", new String[] {"src"}, "bin");
+ this.createJavaProject("P2", new String[] {"src"});
this.createFile(
"/P2/src/Y.js",
"public class Y {\n" +
@@ -2700,7 +2700,7 @@
);
IType typeSource = getCompilationUnit("/P/src/X.js").getType("Z");
- this.createJavaProject("P2", new String[] {"src"}, "bin");
+ this.createJavaProject("P2", new String[] {"src"});
this.createFile(
"/P2/src/Y.js",
"public class Y {\n" +
@@ -2727,7 +2727,7 @@
);
IType typeSource = getCompilationUnit("/P/src/X.js").getType("Z");
- this.createJavaProject("P2", new String[] {"src"}, "bin");
+ this.createJavaProject("P2", new String[] {"src"});
this.createFile(
"/P2/src/Y.js",
"public class Y {\n" +
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CopyMoveResourcesTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CopyMoveResourcesTests.java
index f67a24a..2839bdf 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CopyMoveResourcesTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CopyMoveResourcesTests.java
@@ -195,7 +195,7 @@
public void setUp() throws Exception {
super.setUp();
- this.createJavaProject("P", new String[] {"src", "src2"}, "bin");
+ this.createJavaProject("P", new String[] {"src", "src2"});
}
static {
// TESTS_NAMES = new String[] { "testCopyWorkingCopyDestination"};
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/DeleteTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/DeleteTests.java
index a2e3827..c066596 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/DeleteTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/DeleteTests.java
@@ -101,7 +101,7 @@
*/
public void testDeleteBinaryMethod() throws CoreException {
try {
- createJavaProject("P1", new String[] {}, new String[] {"lib"}, "");
+ createJavaProject("P1", new String[] {}, new String[] {"lib"});
/* Evaluate the following in a scrapbook:
org.eclipse.wst.jsdt.core.tests.model.ModifyingResourceTests.generateClassFile(
@@ -137,7 +137,7 @@
*/
public void testDeleteBinaryType() throws CoreException {
try {
- createJavaProject("P1", new String[] {}, new String[] {"lib"}, "");
+ createJavaProject("P1", new String[] {}, new String[] {"lib"});
/* Evaluate the following in a scrapbook:
org.eclipse.wst.jsdt.core.tests.model.ModifyingResourceTests.generateClassFile(
@@ -709,7 +709,7 @@
*/
public void testDeletePackageFragment2() throws CoreException {
try {
- createJavaProject("P1", new String[] {"src"}, "bin");
+ createJavaProject("P1", new String[] {"src"});
IFile file = createFile(
"P1/src/X.js",
"public class X {\n" +
@@ -986,7 +986,7 @@
*/
public void testDeleteType2() throws CoreException {
try {
- createJavaProject("P1", new String[] {"src"}, "bin");
+ createJavaProject("P1", new String[] {"src"});
createFile(
"P1/src/X.js",
"public class X {\n" +
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/EncodingTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/EncodingTests.java
index 785c27a..4c31ac7 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/EncodingTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/EncodingTests.java
@@ -139,7 +139,7 @@
ResourcesPlugin.getPlugin().savePluginPreferences();
- IJavaScriptProject newProject = createJavaProject("P", new String[] { "" }, "");
+ IJavaScriptProject newProject = createJavaProject("P", new String[] { "" });
IPackageFragment pkg = getPackageFragment("P", "", "");
String source = "public class A {\r\n" +
" public static main(String[] args) {\r\n" +
@@ -510,7 +510,7 @@
IJavaScriptUnit workingCopy = null;
try {
String encoding = "UTF-8";
- this.createJavaProject("P", new String[] {""}, "");
+ this.createJavaProject("P", new String[] {""});
String initialContent = "/**\n"+
" */\n"+
"public class Test {}";
@@ -556,7 +556,7 @@
IJavaScriptUnit workingCopy = null;
try {
String encoding = "UTF-8";
- this.createJavaProject("P", new String[] {""}, "");
+ this.createJavaProject("P", new String[] {""});
String initialContent = "/**\n"+
" */\n"+
"public class Test {}";
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ExclusionPatternsTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ExclusionPatternsTests.java
index 90e134d..dc4edf1 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ExclusionPatternsTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ExclusionPatternsTests.java
@@ -33,7 +33,7 @@
}
protected void setUp() throws Exception {
super.setUp();
- this.project = createJavaProject("P", new String[] {"src"}, "bin");
+ this.project = createJavaProject("P", new String[] {"src"});
startDeltas();
}
@@ -94,7 +94,7 @@
*/
public void testAddExclusionOnFolderUnderProject() throws CoreException {
try {
- IJavaScriptProject javaProject = createJavaProject("P1", new String[] {""}, "");
+ IJavaScriptProject javaProject = createJavaProject("P1", new String[] {""});
createFolder("/P1/doc");
clearDeltas();
@@ -803,7 +803,7 @@
try {
JavaScriptCore.run(new IWorkspaceRunnable() {
public void run(IProgressMonitor monitor) throws CoreException {
- IJavaScriptProject javaProject = createJavaProject("P2", new String[] {}, "bin");
+ IJavaScriptProject javaProject = createJavaProject("P2", new String[] {});
javaProject.setRawIncludepath(createClasspath(new String[] {"/P2", "src/", "/P2/src", ""}, false/*no inclusion*/, true/*exclusion*/), null);
createFile(
"/P2/bin/X.js",
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ExistenceTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ExistenceTests.java
index 38841e1..dde28f1 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ExistenceTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ExistenceTests.java
@@ -64,8 +64,8 @@
}
public void testBinaryMethodAfterNonExistingMember() throws CoreException {
try {
- IJavaScriptProject project = createJavaProject("P", new String[] {}, new String[] {"JCL_LIB"}, "");
- IClassFile classFile = project.getPackageFragmentRoot(getExternalJCLPathString()).getPackageFragment("java.lang").getClassFile("Object.class");
+ IJavaScriptProject project = createJavaProject("P", new String[] {}, new String[] {"JCL_LIB"});
+ IClassFile classFile = project.getPackageFragmentRoot(getSystemJsPathString()).getPackageFragment("java.lang").getClassFile("Object.class");
classFile.open(null);
IType type = classFile.getType();
type.getFunction("foo", new String[0]).exists();
@@ -76,7 +76,7 @@
}
public void testClassFileInBinary() throws CoreException {
try {
- this.createJavaProject("P", new String[] {"src"}, "bin");
+ this.createJavaProject("P", new String[] {"src"});
this.createFile("P/bin/X.class", "");
IClassFile classFile = this.getClassFile("P/bin/X.class");
assertTrue(!classFile.exists());
@@ -86,7 +86,7 @@
}
public void testClassFileInLibrary() throws CoreException {
try {
- this.createJavaProject("P", new String[] {}, new String[] {"lib"}, "bin");
+ this.createJavaProject("P", new String[] {}, new String[] {"lib"});
this.createFile("P/lib/X.class", "");
IClassFile classFile = this.getClassFile("P/lib/X.class");
assertTrue(classFile.exists());
@@ -96,11 +96,11 @@
}
public void testClassFileInLibraryInOtherProject() throws CoreException {
try {
- this.createJavaProject("P2", new String[] {}, "bin");
+ this.createJavaProject("P2", new String[] {});
this.createFolder("P2/lib");
String path = "P2/lib/X.class";
IFile file = this.createFile(path, "");
- IJavaScriptProject p1 = createJavaProject("P1", new String[] {}, new String[] {"/P2/lib"}, "bin");
+ IJavaScriptProject p1 = createJavaProject("P1", new String[] {}, new String[] {"/P2/lib"});
IClassFile nonExistingFile = getClassFile(path);
assertFalse("File '"+path+"' should not exist in P2!", nonExistingFile.exists());
IJavaScriptElement element = JavaScriptCore.create(getFolder("/P2/lib"));
@@ -122,7 +122,7 @@
"}",
};
addLibrary(p2, "lib.jar", "libsrc.zip", pathsAndContents, JavaScriptCore.VERSION_1_5);
- IJavaScriptProject p1 = createJavaProject("P1", new String[] {}, new String[] {"/P2/lib.jar"}, "bin");
+ IJavaScriptProject p1 = createJavaProject("P1", new String[] {}, new String[] {"/P2/lib.jar"});
IPackageFragmentRoot root2 = getPackageFragmentRoot("/P2/lib.jar");
assertTrue(root2.exists());
assertEquals(p1.getPackageFragmentRoots()[0], root2);
@@ -138,7 +138,7 @@
*/
public void testClassFileInSource1() throws CoreException {
try {
- this.createJavaProject("P", new String[] {"src"}, "bin");
+ this.createJavaProject("P", new String[] {"src"});
this.createFile("P/src/X.class", "");
IClassFile classFile = this.getClassFile("P/src/X.class");
assertTrue("Class file should not exist", !classFile.exists());
@@ -153,7 +153,7 @@
*/
public void testClassFileInSource2() throws CoreException {
try {
- this.createJavaProject("P", new String[] {"src"}, "bin");
+ this.createJavaProject("P", new String[] {"src"});
this.createFile("P/src/X.class", "");
IClassFile classFile = this.getClassFile("P/src/X.class");
assertOpenFails(
@@ -170,7 +170,7 @@
*/
public void testCompilationUnitInLibrary1() throws CoreException {
try {
- this.createJavaProject("P", new String[] {}, new String[] {"lib"}, "bin");
+ this.createJavaProject("P", new String[] {}, new String[] {"lib"});
this.createFile(
"P/lib/X.js",
"public class X {}"
@@ -188,7 +188,7 @@
*/
public void testCompilationUnitInLibrary2() throws CoreException {
try {
- this.createJavaProject("P", new String[] {}, new String[] {"lib"}, "bin");
+ this.createJavaProject("P", new String[] {}, new String[] {"lib"});
this.createFile(
"P/lib/X.js",
"public class X {}"
@@ -223,7 +223,7 @@
*/
public void testNonExistingClassFile1() throws CoreException {
try {
- this.createJavaProject("P", new String[] {"src"}, new String[] {"lib"}, "bin");
+ this.createJavaProject("P", new String[] {"src"}, new String[] {"lib"});
IClassFile classFile = getClassFile("/P/lib/X.class");
assertOpenFails(
"X.class [in <default> [in lib [in P]]] does not exist",
@@ -238,7 +238,7 @@
*/
public void testNonExistingClassFile2() throws CoreException {
try {
- this.createJavaProject("P", new String[] {"src"}, new String[] {}, "bin");
+ this.createJavaProject("P", new String[] {"src"}, new String[] {});
IClassFile classFile = getClassFile("/P/lib/X.class");
assertOpenFails(
"lib [in P] is not on its project\'s build path",
@@ -253,7 +253,7 @@
*/
public void testNonExistingCompilationUnit() throws CoreException {
try {
- this.createJavaProject("P", new String[] {"src"}, "bin");
+ this.createJavaProject("P", new String[] {"src"});
IJavaScriptUnit cu = getCompilationUnit("/P/src/X.js");
assertOpenFails(
"X.java [in <default> [in src [in P]]] does not exist",
@@ -267,7 +267,7 @@
*/
public void testNonExistingPackageFragment1() throws CoreException {
try {
- this.createJavaProject("P", new String[] {"src"}, "bin");
+ this.createJavaProject("P", new String[] {"src"});
IPackageFragment pkg = this.getPackage("/P/src/x");
assertOpenFails(
"x [in src [in P]] does not exist",
@@ -281,7 +281,7 @@
*/
public void testNonExistingPackageFragment2() throws CoreException {
try {
- IJavaScriptProject project = createJavaProject("P", new String[] {}, "bin");
+ IJavaScriptProject project = createJavaProject("P", new String[] {});
IFolder folder = createFolder("/P/src/x");
IPackageFragment pkg = project.getPackageFragmentRoot(folder).getPackageFragment("x");
assertOpenFails(
@@ -333,7 +333,7 @@
*/
public void testPkgFragmentRootNotInClasspath() throws CoreException {
try {
- IJavaScriptProject project = createJavaProject("P", new String[] {"src"}, "bin");
+ IJavaScriptProject project = createJavaProject("P", new String[] {"src"});
IFolder folder = createFolder("/P/otherRoot");
IPackageFragmentRoot root = project.getPackageFragmentRoot(folder);
assertTrue("Root should not exist", !root.exists());
@@ -400,7 +400,7 @@
*/
public void testCorrespondingResourceNonExistingClassFile() throws CoreException {
try {
- createJavaProject("P", new String[] {"src"}, new String[] {"lib"}, "bin");
+ createJavaProject("P", new String[] {"src"}, new String[] {"lib"});
IClassFile classFile = getClassFile("/P/lib/X.class");
assertCorrespondingResourceFails(classFile);
} finally {
@@ -412,7 +412,7 @@
*/
public void testCorrespondingResourceNonExistingCompilationUnit() throws CoreException {
try {
- createJavaProject("P", new String[] {"src"}, "bin");
+ createJavaProject("P", new String[] {"src"});
IJavaScriptUnit compilationUnit = getCompilationUnit("/P/src/X.js");
assertCorrespondingResourceFails(compilationUnit);
} finally {
@@ -424,7 +424,7 @@
*/
public void testCorrespondingResourceNonExistingJarPkgFragmentRoot() throws CoreException {
try {
- IJavaScriptProject project = createJavaProject("P", new String[] {"src"}, "bin");
+ IJavaScriptProject project = createJavaProject("P", new String[] {"src"});
IPackageFragmentRoot root = project.getPackageFragmentRoot("/nonExisting.jar");
assertCorrespondingResourceFails(root);
} finally {
@@ -436,7 +436,7 @@
*/
public void testCorrespondingResourceNonExistingPkgFragment() throws CoreException {
try {
- createJavaProject("P", new String[] {"src"}, "bin");
+ createJavaProject("P", new String[] {"src"});
IPackageFragment pkg = getPackage("/P/src/nonExisting");
assertCorrespondingResourceFails(pkg);
} finally {
@@ -448,7 +448,7 @@
*/
public void testCorrespondingResourceNonExistingPkgFragmentRoot() throws CoreException {
try {
- IJavaScriptProject project = createJavaProject("P", new String[] {"src"}, "bin");
+ IJavaScriptProject project = createJavaProject("P", new String[] {"src"});
IFolder folder = createFolder("/P/nonExistingRoot");
IPackageFragmentRoot root = project.getPackageFragmentRoot(folder);
assertCorrespondingResourceFails(root);
@@ -469,7 +469,7 @@
*/
public void testCorrespondingResourceNonExistingType() throws CoreException {
try {
- createJavaProject("P", new String[] {"src"}, "bin");
+ createJavaProject("P", new String[] {"src"});
createFile(
"/P/src/X.js",
"public class X{\n" +
@@ -486,7 +486,7 @@
*/
public void testUnderlyingResourceNonExistingClassFile() throws CoreException {
try {
- createJavaProject("P", new String[] {"src"}, new String[] {"lib"}, "bin");
+ createJavaProject("P", new String[] {"src"}, new String[] {"lib"});
IClassFile classFile = getClassFile("/P/lib/X.class");
assertUnderlyingResourceFails(classFile);
} finally {
@@ -498,7 +498,7 @@
*/
public void testUnderlyingResourceNonExistingCompilationUnit() throws CoreException {
try {
- createJavaProject("P", new String[] {"src"}, "bin");
+ createJavaProject("P", new String[] {"src"});
IJavaScriptUnit compilationUnit = getCompilationUnit("/P/src/X.js");
assertUnderlyingResourceFails(compilationUnit);
} finally {
@@ -510,7 +510,7 @@
*/
public void testUnderlyingResourceNonExistingJarPkgFragmentRoot() throws CoreException {
try {
- IJavaScriptProject project = createJavaProject("P", new String[] {"src"}, "bin");
+ IJavaScriptProject project = createJavaProject("P", new String[] {"src"});
IPackageFragmentRoot root = project.getPackageFragmentRoot("/nonExisting.jar");
assertUnderlyingResourceFails(root);
} finally {
@@ -522,7 +522,7 @@
*/
public void testUnderlyingResourceNonExistingPkgFragment() throws CoreException {
try {
- createJavaProject("P", new String[] {"src"}, "bin");
+ createJavaProject("P", new String[] {"src"});
IPackageFragment pkg = getPackage("/P/src/nonExisting");
assertUnderlyingResourceFails(pkg);
} finally {
@@ -534,7 +534,7 @@
*/
public void testUnderlyingResourceNonExistingPkgFragmentRoot() throws CoreException {
try {
- IJavaScriptProject project = createJavaProject("P", new String[] {"src"}, "bin");
+ IJavaScriptProject project = createJavaProject("P", new String[] {"src"});
IFolder folder = createFolder("/P/nonExistingRoot");
IPackageFragmentRoot root = project.getPackageFragmentRoot(folder);
assertUnderlyingResourceFails(root);
@@ -555,7 +555,7 @@
*/
public void testUnderlyingResourceNonExistingType() throws CoreException {
try {
- createJavaProject("P", new String[] {"src"}, "bin");
+ createJavaProject("P", new String[] {"src"});
createFile(
"/P/src/X.js",
"public class X{\n" +
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ExternalJarDeltaTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ExternalJarDeltaTests.java
index bfe9b02..2c6a7fe 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ExternalJarDeltaTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ExternalJarDeltaTests.java
@@ -55,7 +55,7 @@
public void testExternalJar0() throws CoreException, IOException {
File f = null;
try {
- IJavaScriptProject project = this.createJavaProject("P", new String[] {""}, "");
+ IJavaScriptProject project = this.createJavaProject("P", new String[] {""});
String pPath = getExternalPath() + "p.jar";
setClasspath(project, new IIncludePathEntry[]{JavaScriptCore.newLibraryEntry(new Path(pPath), null, null)});
@@ -86,7 +86,7 @@
public void testExternalJarChanged1() throws CoreException, IOException {
File f = null;
try {
- IJavaScriptProject project = this.createJavaProject("P", new String[] {""}, "");
+ IJavaScriptProject project = this.createJavaProject("P", new String[] {""});
String pPath = getExternalPath() + "p.jar";
setClasspath(project, new IIncludePathEntry[]{JavaScriptCore.newLibraryEntry(new Path(pPath), null, null)});
@@ -119,7 +119,7 @@
public void testExternalJarChanged2() throws CoreException, IOException {
File f = null;
try {
- IJavaScriptProject project = this.createJavaProject("P", new String[] {""}, "");
+ IJavaScriptProject project = this.createJavaProject("P", new String[] {""});
String pPath = getExternalPath() + "p.jar";
setClasspath(project, new IIncludePathEntry[]{JavaScriptCore.newLibraryEntry(new Path(pPath), null, null)});
@@ -152,7 +152,7 @@
public void testExternalJarChanged3() throws CoreException, IOException {
File f = null;
try {
- IJavaScriptProject project = this.createJavaProject("P", new String[] {""}, "");
+ IJavaScriptProject project = this.createJavaProject("P", new String[] {""});
String pPath = getExternalPath() + "p.jar";
setClasspath(project, new IIncludePathEntry[]{JavaScriptCore.newLibraryEntry(new Path(pPath), null, null)});
@@ -187,7 +187,7 @@
public void testExternalJarChanged4() throws CoreException, IOException {
File f = null;
try {
- IJavaScriptProject project = this.createJavaProject("P", new String[] {""}, "");
+ IJavaScriptProject project = this.createJavaProject("P", new String[] {""});
String pPath = getExternalPath() + "p.jar";
setClasspath(project, new IIncludePathEntry[]{JavaScriptCore.newLibraryEntry(new Path(pPath), null, null)});
@@ -225,7 +225,7 @@
public void testExternalJarChanged5() throws CoreException, IOException {
File f = null;
try {
- IJavaScriptProject project = this.createJavaProject("P", new String[] {""}, "");
+ IJavaScriptProject project = this.createJavaProject("P", new String[] {""});
String pPath = getExternalPath() + "p.jar";
setClasspath(project, new IIncludePathEntry[]{JavaScriptCore.newLibraryEntry(new Path(pPath), null, null)});
@@ -266,7 +266,7 @@
String pPath = getExternalPath() + "p.jar";
f = new File(pPath);
f.createNewFile();
- createJavaProject("P", new String[] {""}, new String[] {"JCL_LIB", pPath}, "");
+ createJavaProject("P", new String[] {""}, new String[] {"JCL_LIB", pPath});
createFile("/P/X.js", "public class X{}");
getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
getJavaModel().refreshExternalArchives(null,null);
@@ -299,7 +299,7 @@
public void testExternalJarAdded1() throws CoreException, IOException {
File f = null;
try {
- IJavaScriptProject project = this.createJavaProject("P", new String[] {""}, "");
+ IJavaScriptProject project = this.createJavaProject("P", new String[] {""});
String pPath = getExternalPath() + "pAdded1.jar";
setClasspath(project, new IIncludePathEntry[]{JavaScriptCore.newLibraryEntry(new Path(pPath), null, null)});
@@ -331,7 +331,7 @@
public void testExternalJarAdded2() throws CoreException, IOException {
File f = null;
try {
- IJavaScriptProject project = this.createJavaProject("P", new String[] {""}, "");
+ IJavaScriptProject project = this.createJavaProject("P", new String[] {""});
String pPath = getExternalPath() + "pAdded2.jar";
setClasspath(project, new IIncludePathEntry[]{JavaScriptCore.newLibraryEntry(new Path(pPath), null, null)});
@@ -363,7 +363,7 @@
public void testExternalJarAdded3() throws CoreException, IOException {
File f = null;
try {
- IJavaScriptProject project = this.createJavaProject("P", new String[] {""}, "");
+ IJavaScriptProject project = this.createJavaProject("P", new String[] {""});
String pPath = getExternalPath() + "pAdded3.jar";
setClasspath(project, new IIncludePathEntry[]{JavaScriptCore.newLibraryEntry(new Path(pPath), null, null)});
@@ -396,7 +396,7 @@
public void testExternalJarRemoved1() throws CoreException, IOException {
File f = null;
try {
- IJavaScriptProject project = this.createJavaProject("P", new String[] {""}, "");
+ IJavaScriptProject project = this.createJavaProject("P", new String[] {""});
String pPath = getExternalPath() + "p.jar";
setClasspath(project, new IIncludePathEntry[]{JavaScriptCore.newLibraryEntry(new Path(pPath), null, null)});
@@ -429,7 +429,7 @@
public void testExternalJarRemoved2() throws CoreException, IOException {
File f = null;
try {
- IJavaScriptProject project = this.createJavaProject("P", new String[] {""}, "");
+ IJavaScriptProject project = this.createJavaProject("P", new String[] {""});
String pPath = getExternalPath() + "p.jar";
setClasspath(project, new IIncludePathEntry[]{JavaScriptCore.newLibraryEntry(new Path(pPath), null, null)});
@@ -462,7 +462,7 @@
public void testExternalJarRemoved3() throws CoreException, IOException {
File f = null;
try {
- IJavaScriptProject project = this.createJavaProject("P", new String[] {""}, "");
+ IJavaScriptProject project = this.createJavaProject("P", new String[] {""});
String pPath = getExternalPath() + "p.jar";
setClasspath(project, new IIncludePathEntry[]{JavaScriptCore.newLibraryEntry(new Path(pPath), null, null)});
@@ -498,7 +498,7 @@
public void testExternalJarInternalExternalJar() throws CoreException, IOException {
File f = null;
try {
- IJavaScriptProject project = this.createJavaProject("P", new String[] {""}, "");
+ IJavaScriptProject project = this.createJavaProject("P", new String[] {""});
String internalFooPath = "/P/foo.jar";
IFile fooIFile = this.createFile(internalFooPath, new byte[0]);
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/FactoryTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/FactoryTests.java
index c77b78a..e044ab0 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/FactoryTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/FactoryTests.java
@@ -30,7 +30,7 @@
*/
public void testCreateBinaryToolObject() throws CoreException {
try {
- this.createJavaProject("P", new String[] {}, new String[] {"lib"}, "bin");
+ this.createJavaProject("P", new String[] {}, new String[] {"lib"});
IFile file = this.createFile("/P/lib/X.class", "");
IJavaScriptElement object = JavaScriptCore.create(file);
@@ -48,7 +48,7 @@
*/
public void testCreateCompilationUnits() throws CoreException {
try {
- this.createJavaProject("P", new String[] {"src"}, "bin");
+ this.createJavaProject("P", new String[] {"src"});
this.createFolder("/P/src/x/y/z");
IFile fileA = this.createFile(
"/P/src/x/y/z/A.js",
@@ -84,7 +84,7 @@
*/
public void testCreateCompilationUnitsNotOnClasspath() throws CoreException {
try {
- this.createJavaProject("P", new String[] {"src"}, "bin");
+ this.createJavaProject("P", new String[] {"src"});
this.createFolder("/P/other/nested");
IFile fileA = this.createFile("/P/other/A.js", "public class A {}");
IFile fileB = this.createFile("/P/other/nested/B.js", "public class B {}");
@@ -124,7 +124,7 @@
*/
public void testCreateFolderToolObjects() throws CoreException {
try {
- IJavaScriptProject javaProject = this.createJavaProject("P", new String[] {}, "bin");
+ IJavaScriptProject javaProject = this.createJavaProject("P", new String[] {});
this.createFolder("/P/src/x/y/z");
IFolder src =this.getFolder("/P/src");
@@ -169,7 +169,7 @@
*/
public void testCreateFromEmptyJavaFile() throws CoreException {
try {
- this.createJavaProject("P", new String[] {"src"}, "bin");
+ this.createJavaProject("P", new String[] {"src"});
IFile file = this.createFile("/P/src/X.js", "");
IJavaScriptElement cu = JavaScriptCore.create(file);
@@ -183,7 +183,7 @@
*/
public void testCreateFromFileWithoutExtension() throws CoreException {
try {
- this.createJavaProject("P", new String[] {"src"}, "bin");
+ this.createJavaProject("P", new String[] {"src"});
IFile file = this.createFile("/P/src/FileWithoutExtension", "public class X {}");
IJavaScriptElement cu = JavaScriptCore.create(file);
@@ -205,7 +205,7 @@
*/
public void testCreateJarToolObject() throws CoreException {
try {
- this.createJavaProject("P", new String[] {}, new String[] {"/P/lib.jar"}, "");
+ this.createJavaProject("P", new String[] {}, new String[] {"/P/lib.jar"});
IFile file = this.createFile("/P/lib.jar", "");
IJavaScriptElement jar = JavaScriptCore.create(file);
@@ -220,7 +220,7 @@
*/
public void testCreateLibInOutput() throws CoreException {
try {
- this.createJavaProject("P", new String[] {}, new String[] {"/P/lib"}, "");
+ this.createJavaProject("P", new String[] {}, new String[] {"/P/lib"});
IFolder folder = this.createFolder("/P/lib");
IJavaScriptElement lib = JavaScriptCore.create(folder);
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/HierarchyOnWorkingCopiesTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/HierarchyOnWorkingCopiesTests.java
index 59e389f..b0de5ad 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/HierarchyOnWorkingCopiesTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/HierarchyOnWorkingCopiesTests.java
@@ -58,7 +58,7 @@
assertHierarchyEquals(
"Focus: B [in B.js [in x.y [in src [in P]]]]\n" +
"Super types:\n" +
- " Object [in Object.class [in java.lang [in "+ getExternalJCLPathString() + " [in P]]]]\n" +
+ " Object [in Object.class [in java.lang [in "+ getSystemJsPathString() + " [in P]]]]\n" +
"Sub types:\n" +
" A [in [Working copy] A.js [in x.y [in src [in P]]]]\n",
h);
@@ -95,7 +95,7 @@
"Focus: C [in C.js [in x.y [in src [in P]]]]\n" +
"Super types:\n" +
" B [in [Working copy] A.js [in x.y [in src [in P]]]]\n" +
- " Object [in Object.class [in java.lang [in "+ getExternalJCLPathString() + " [in P]]]]\n" +
+ " Object [in Object.class [in java.lang [in "+ getSystemJsPathString() + " [in P]]]]\n" +
"Sub types:\n",
h);
} finally {
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/InclusionPatternsTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/InclusionPatternsTests.java
index ec69bae..4531c77 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/InclusionPatternsTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/InclusionPatternsTests.java
@@ -87,7 +87,7 @@
*/
public void testAddInclusionOnFolderUnderProject() throws CoreException {
try {
- IJavaScriptProject javaProject = createJavaProject("P1", new String[] {""}, "");
+ IJavaScriptProject javaProject = createJavaProject("P1", new String[] {""});
createFolder("/P1/doc");
clearDeltas();
@@ -392,7 +392,7 @@
*/
public void testIncludeCUOnly01() throws CoreException {
setClasspath(new String[] {"/P/src", "p1/p2/*.java|q/*.js"});
- addLibraryEntry(getJavaProject("P"), getExternalJCLPathString(), false);
+ addLibraryEntry(getJavaProject("P"), getSystemJsPathString(), false);
createFolder("/P/src/p1/p2");
createFile(
"/P/src/p1/p2/X.js",
@@ -426,7 +426,7 @@
*/
public void testIncludeCUOnly02() throws CoreException {
setClasspath(new String[] {"/P/src", "p1/p2/p3/*.java|q/*.js"});
- addLibraryEntry(getJavaProject("P"), getExternalJCLPathString(), false);
+ addLibraryEntry(getJavaProject("P"), getSystemJsPathString(), false);
createFolder("/P/src/p1/p2/p3");
createFile(
"/P/src/p1/p2/p3/X.js",
@@ -902,7 +902,7 @@
try {
JavaScriptCore.run(new IWorkspaceRunnable() {
public void run(IProgressMonitor monitor) throws CoreException {
- IJavaScriptProject javaProject = createJavaProject("P2", new String[] {}, "bin");
+ IJavaScriptProject javaProject = createJavaProject("P2", new String[] {});
javaProject.setRawIncludepath(createClasspath(new String[] {"/P2", "**/X.js", "/P2/src", ""}, true/*inclusion*/, false/*no exclusion*/), null);
createFile(
"/P2/bin/X.js",
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaElementDeltaTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaElementDeltaTests.java
index 180ca72..15f775f 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaElementDeltaTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaElementDeltaTests.java
@@ -113,7 +113,7 @@
ElementChangedEvent.POST_CHANGE);
IJavaScriptUnit copy = null;
try {
- createJavaProject("P", new String[] { "" }, "");
+ createJavaProject("P", new String[] { "" });
createFile("P/X.js", "function X() {\n" + "}");
IJavaScriptUnit unit = getCompilationUnit("P", "", "", "X.js");
copy = unit.getWorkingCopy(null);
@@ -146,7 +146,7 @@
*/
public void testAddCuInDefaultPkg1() throws CoreException {
try {
- createJavaProject("P", new String[] { "" }, "");
+ createJavaProject("P", new String[] { "" });
startDeltas();
createFile("P/X.js", "function X() {\n" + "}");
assertDeltas("Unexpected delta", "P[*]: {CHILDREN}\n"
@@ -163,7 +163,7 @@
*/
public void testAddCuInDefaultPkg2() throws CoreException {
try {
- createJavaProject("P", new String[] { "src" }, "bin");
+ createJavaProject("P", new String[] { "src" });
startDeltas();
createFile("P/src/X.js", "function X() {\n" + "}");
assertDeltas("Unexpected delta", "P[*]: {CHILDREN}\n"
@@ -182,9 +182,9 @@
public void testAddCuAfterProjectOpen() throws CoreException {
try {
IJavaScriptProject p1 = createJavaProject("P1",
- new String[] { "src" }, "bin");
+ new String[] { "src" });
IJavaScriptProject p2 = createJavaProject("P2",
- new String[] { "src" }, "bin");
+ new String[] { "src" });
createFile("P2/src/X.js", "function X() {\n" + "}");
IProject project = p2.getProject();
project.close(null);
@@ -341,7 +341,7 @@
getJavaProject("P").setRawIncludepath(
new IIncludePathEntry[] { JavaScriptCore
.newSourceEntry(new Path("/P/src")) },
- new Path("/P/bin"), null);
+ null);
}
}, null);
startDeltas();
@@ -361,7 +361,7 @@
public void testAddJavaProject() throws CoreException {
try {
startDeltas();
- createJavaProject("P", new String[] { "" }, "");
+ createJavaProject("P", new String[] { "" });
assertDeltas("Unexpected delta", "P[+]: {}");
} finally {
stopDeltas();
@@ -386,7 +386,7 @@
public void testAddPackageSourceIsBin() throws CoreException {
try {
- createJavaProject("P", new String[] { "src" }, "src");
+ createJavaProject("P", new String[] { "src" });
startDeltas();
createFolder("P/src/x");
assertDeltas("Unexpected delta", "P[*]: {CHILDREN}\n"
@@ -405,8 +405,8 @@
startDeltas();
ResourcesPlugin.getWorkspace().run(new IWorkspaceRunnable() {
public void run(IProgressMonitor monitor) throws CoreException {
- createJavaProject("P1", new String[] { "" }, "");
- createJavaProject("P2", new String[] { "src" }, "bin");
+ createJavaProject("P1", new String[] { "" });
+ createJavaProject("P2", new String[] { "src" });
}
}, null);
assertEquals("Unexpected delta", "P1[+]: {}\n" + "P2[+]: {}",
@@ -428,12 +428,11 @@
ResourcesPlugin.getWorkspace().run(new IWorkspaceRunnable() {
public void run(IProgressMonitor monitor) throws CoreException {
IJavaScriptProject p1 = createJavaProject("P1",
- new String[] { "" }, "");
+ new String[] { "" });
// should be a no-op and no extra delta volley should be
// fired
- p1.setRawIncludepath(p1.getRawIncludepath(), p1
- .getOutputLocation(), null);
- createJavaProject("P2", new String[] { "src" }, "bin");
+ p1.setRawIncludepath(p1.getRawIncludepath(), null);
+ createJavaProject("P2", new String[] { "src" });
}
}, null);
assertEquals("Unexpected delta", "P1[+]: {}\n" + "P2[+]: {}",
@@ -450,7 +449,7 @@
*/
public void testBatchOperation() throws CoreException {
try {
- createJavaProject("P", new String[] { "src" }, "bin");
+ createJavaProject("P", new String[] { "src" });
createFolder("P/src/x");
createFile("P/src/x/A.js", "function A() {\n" + "}");
startDeltas();
@@ -482,9 +481,9 @@
public void testBuildProjectUsedAsLib() throws CoreException {
try {
IJavaScriptProject p1 = createJavaProject("P1",
- new String[] { "src1" }, new String[] { "JCL_LIB" }, "bin1");
+ new String[] { "src1" }, new String[] { "JCL_LIB" });
createJavaProject("P2", new String[] { "src2" },
- new String[] { "/P1/bin1" }, "bin2");
+ new String[] { "/P1/bin1" });
createFile("/P1/src1/X.js", "function X() {\n" + "}");
// force opening of project to avoid external jar delta
@@ -580,7 +579,7 @@
public void testChangeRootKind() throws CoreException {
try {
IJavaScriptProject proj = createJavaProject("P",
- new String[] { "src" }, "bin");
+ new String[] { "src" });
startDeltas();
setClasspath(proj, new IIncludePathEntry[] { JavaScriptCore
.newLibraryEntry(new Path("/P/src"), null, null, false) });
@@ -600,7 +599,7 @@
*/
public void testCloseJavaProject() throws CoreException {
try {
- createJavaProject("P", new String[] { "" }, "");
+ createJavaProject("P", new String[] { "" });
IProject project = getProject("P");
startDeltas();
project.close(null);
@@ -689,7 +688,7 @@
public void testCreateSharedWorkingCopy() throws CoreException {
IJavaScriptUnit copy = null;
try {
- createJavaProject("P", new String[] { "" }, "");
+ createJavaProject("P", new String[] { "" });
createFile("P/X.js", "function X() {\n" + "}");
IJavaScriptUnit unit = getCompilationUnit("P", "", "", "X.js");
startDeltas();
@@ -710,7 +709,7 @@
public void testCreateWorkingCopy() throws CoreException {
IJavaScriptUnit copy = null;
try {
- createJavaProject("P", new String[] { "" }, "");
+ createJavaProject("P", new String[] { "" });
createFile("P/X.js", "function X() {\n" + "}");
IJavaScriptUnit unit = getCompilationUnit("P", "", "", "X.js");
startDeltas();
@@ -734,7 +733,7 @@
*/
public void testCopyAndOverwritePackage() throws CoreException {
try {
- createJavaProject("P", new String[] { "src1", "src2" }, "bin");
+ createJavaProject("P", new String[] { "src1", "src2" });
// createFolder("/P/src1/p");
createFile("P/src1/X.js", "function X() {\n" + "}");
createFolder("/P/src2");
@@ -757,7 +756,7 @@
*/
public void testCUNotOnClasspath() throws CoreException {
try {
- createJavaProject("P", new String[] {}, "bin");
+ createJavaProject("P", new String[] {});
// createFolder("/P/src/p");
IFile file = createFile("/P/src/p/X.js", "function X() {\n" + "}");
@@ -811,7 +810,7 @@
*/
public void testDeleteNonJavaFolder() throws CoreException {
try {
- createJavaProject("P", new String[] { "foo/bar" }, "bin");
+ createJavaProject("P", new String[] { "foo/bar" });
IFolder folder = getFolder("/P/foo");
startDeltas();
deleteResource(folder);
@@ -834,7 +833,7 @@
IWorkspaceRunnable runnable = new IWorkspaceRunnable() {
public void run(IProgressMonitor monitor) throws CoreException {
project.setRawIncludepath(createClasspath("P",
- new String[] { "/P/src", "" }), new Path("/P/bin"),
+ new String[] { "/P/src", "" }),
monitor);
deleteProject("P");
}
@@ -854,8 +853,8 @@
public void testDeleteProjectSetCPAnotherProject() throws CoreException {
final IJavaScriptProject project = createJavaProject("P1",
- new String[] { "src" }, "bin");
- createJavaProject("P2", new String[] {}, "");
+ new String[] { "src" });
+ createJavaProject("P2", new String[] {});
try {
startDeltas();
@@ -884,7 +883,7 @@
// testDestroyWorkingCopy
IJavaScriptUnit copy = null;
try {
- createJavaProject("P", new String[] { "" }, "");
+ createJavaProject("P", new String[] { "" });
createFile("P/X.js", "public class X {\n" + "}");
IJavaScriptUnit unit = getCompilationUnit("P", "", "", "X.js");
copy = unit.getWorkingCopy(null);
@@ -906,7 +905,7 @@
// testDestroySharedWorkingCopy
IJavaScriptUnit copy = null;
try {
- createJavaProject("P", new String[] { "" }, "");
+ createJavaProject("P", new String[] { "" });
createFile("P/X.js", "public class X {\n" + "}");
IJavaScriptUnit unit = getCompilationUnit("P", "", "", "X.js");
copy = unit.getWorkingCopy(new WorkingCopyOwner() {
@@ -934,7 +933,7 @@
ElementChangedEvent.POST_CHANGE);
IJavaScriptUnit wc = null;
try {
- createJavaProject("P", new String[] { "" }, "");
+ createJavaProject("P", new String[] { "" });
JavaScriptCore.addElementChangedListener(listener,
ElementChangedEvent.POST_CHANGE);
@@ -1027,7 +1026,7 @@
ElementChangedEvent.POST_RECONCILE);
IJavaScriptUnit wc = null;
try {
- createJavaProject("P", new String[] { "" }, "");
+ createJavaProject("P", new String[] { "" });
JavaScriptCore.addElementChangedListener(listener,
ElementChangedEvent.POST_RECONCILE);
@@ -1097,7 +1096,7 @@
*/
public void testMergeResourceDeltas() throws CoreException {
try {
- createJavaProject("P", new String[] { "" }, "");
+ createJavaProject("P", new String[] { "" });
startDeltas();
ResourcesPlugin.getWorkspace().run(new IWorkspaceRunnable() {
public void run(IProgressMonitor monitor) throws CoreException {
@@ -1124,7 +1123,7 @@
public void testModifyMethodBodyAndSave() throws CoreException {
IJavaScriptUnit workingCopy = null;
try {
- createJavaProject("P", new String[] { "" }, "");
+ createJavaProject("P", new String[] { "" });
createFolder("P/x/y");
createFile("P/x/y/A.js", "package x.y;\n" + "public class A {\n"
+ " public void foo() {\n" + " }\n" + "}");
@@ -1156,7 +1155,7 @@
*/
public void testModifyOutputLocation1() throws CoreException {
try {
- createJavaProject("P", new String[] { "src" }, "bin");
+ createJavaProject("P", new String[] { "src" });
startDeltas();
createFile("/P/bin/X.class", "");
@@ -1267,7 +1266,7 @@
*/
public void testMoveCuInEnclosingPkg() throws CoreException {
try {
- createJavaProject("P", new String[] { "" }, "");
+ createJavaProject("P", new String[] { "" });
createFolder("P/x/y");
createFile("P/x/y/A.js", "package x.y;\n" + "public class A {\n"
+ "}");
@@ -1301,7 +1300,7 @@
*/
public void testMoveResInDotNamedFolder() throws CoreException {
try {
- createJavaProject("P", new String[] {}, "");
+ createJavaProject("P", new String[] {});
IProject project = getProject("P");
createFolder("P/x.y");
IFile file = createFile("P/x.y/test.txt", "");
@@ -1324,7 +1323,7 @@
*/
public void testMoveTwoResInRoot() throws CoreException {
try {
- createJavaProject("P", new String[] { "src" }, "bin");
+ createJavaProject("P", new String[] { "src" });
final IFile f1 = createFile("P/X.js", "public class X {}");
final IFile f2 = createFile("P/Y.js", "public class Y {}");
@@ -1353,7 +1352,7 @@
public void testNestedRootParentMove() throws CoreException {
try {
createJavaProject("P",
- new String[] { "nested2/src", "nested/src" }, "bin");
+ new String[] { "nested2/src", "nested/src" });
deleteFolder("/P/nested2/src");
startDeltas();
@@ -1375,7 +1374,7 @@
*/
public void testNonJavaResourceRemoveAndAdd() throws CoreException {
try {
- createJavaProject("P", new String[] { "src" }, "bin");
+ createJavaProject("P", new String[] { "src" });
IFile file = createFile("/P/src/read.txt", "");
startDeltas();
@@ -1401,7 +1400,7 @@
*/
public void testOpenJavaProject() throws CoreException {
try {
- createJavaProject("P", new String[] { "" }, "");
+ createJavaProject("P", new String[] { "" });
IProject project = getProject("P");
project.close(null);
startDeltas();
@@ -1437,7 +1436,7 @@
*/
public void testOverwriteClasspath() throws CoreException {
try {
- createJavaProject("P", new String[] { "" }, "");
+ createJavaProject("P", new String[] { "" });
createFolder("P/src");
createFolder("P/bin");
final IFile newCP = createFile(
@@ -1474,7 +1473,7 @@
*/
public void testPackageFragmentAddAndRemove() throws CoreException {
try {
- createJavaProject("P", new String[] { "src" }, "bin");
+ createJavaProject("P", new String[] { "src" });
startDeltas();
IFolder folder = createFolder("/P/src/p");
@@ -1497,7 +1496,7 @@
*/
public void testPackageFragmentMove() throws CoreException {
try {
- createJavaProject("P", new String[] { "src" }, "bin");
+ createJavaProject("P", new String[] { "src" });
IFolder folder = createFolder("/P/src/p");
startDeltas();
@@ -1518,7 +1517,7 @@
*/
public void testPackageFragmentRootRemoveAndAdd() throws CoreException {
try {
- createJavaProject("P", new String[] { "src" }, "bin");
+ createJavaProject("P", new String[] { "src" });
startDeltas();
deleteFolder("/P/src");
@@ -1543,7 +1542,7 @@
public void testRemoveAddBinaryProject() throws CoreException {
try {
IJavaScriptProject project = createJavaProject("P",
- new String[] { "" }, "");
+ new String[] { "" });
createFile("P/lib.jar", "");
project.setRawIncludepath(new IIncludePathEntry[] { JavaScriptCore
.newLibraryEntry(new Path("/P/lib.jar"), null, null) },
@@ -1553,7 +1552,7 @@
getWorkspace().run(new IWorkspaceRunnable() {
public void run(IProgressMonitor monitor) throws CoreException {
deleteProject("P");
- createJavaProject("P", new String[] { "" }, "");
+ createJavaProject("P", new String[] { "" });
}
}, null);
assertDeltas("Unexpected delta",
@@ -1573,12 +1572,12 @@
*/
public void testRemoveAddJavaProject() throws CoreException {
try {
- createJavaProject("P", new String[] { "" }, "");
+ createJavaProject("P", new String[] { "" });
startDeltas();
getWorkspace().run(new IWorkspaceRunnable() {
public void run(IProgressMonitor monitor) throws CoreException {
deleteProject("P");
- createJavaProject("P", new String[] { "" }, "");
+ createJavaProject("P", new String[] { "" });
}
}, null);
assertDeltas("Unexpected delta",
@@ -1599,7 +1598,7 @@
public void testRemoveCPEntryAndRoot1() throws CoreException {
try {
IJavaScriptProject project = createJavaProject("P",
- new String[] { "src" }, "bin");
+ new String[] { "src" });
// ensure that the project is open (there are clients of the delta
// only if the project is open)
@@ -1633,7 +1632,7 @@
public void testRemoveCPEntryAndRoot2() throws CoreException {
try {
final IJavaScriptProject project = createJavaProject("P",
- new String[] { "src" }, "bin");
+ new String[] { "src" });
// ensure that the project is open (there are clients of the delta
// only if the project is open)
@@ -1663,7 +1662,7 @@
public void testRemoveCPEntryAndRoot3() throws CoreException {
try {
final IJavaScriptProject project = createJavaProject("P",
- new String[] { "src" }, "bin");
+ new String[] { "src" });
// ensure that the project is open (there are clients of the delta
// only if the project is open)
@@ -1690,7 +1689,7 @@
*/
public void testRemoveJavaNature() throws CoreException {
try {
- createJavaProject("P", new String[] { "" }, "");
+ createJavaProject("P", new String[] { "" });
startDeltas();
removeJavaNature("P");
assertDeltas("Unexpected delta", "P[-]: {}\n" + "ResourceDelta(/P)");
@@ -1702,7 +1701,7 @@
public void testRemoveJavaProject() throws CoreException {
try {
- createJavaProject("P", new String[] { "" }, "");
+ createJavaProject("P", new String[] { "" });
startDeltas();
deleteProject("P");
assertDeltas("Unexpected delta", "P[-]: {}");
@@ -1737,7 +1736,7 @@
createProject("SP");
createFile("/SP/x.jar", "");
createJavaProject("JP", new String[] { "" },
- new String[] { "/SP/x.jar" }, "");
+ new String[] { "/SP/x.jar" });
startDeltas();
deleteProject("SP");
assertDeltas("Unexpected delta", "JP[*]: {CHILDREN}\n"
@@ -1759,7 +1758,7 @@
try {
createProject("SP");
createJavaProject("JP", new String[] { "" },
- new String[] { "/SP/missing" }, "");
+ new String[] { "/SP/missing" });
startDeltas();
deleteProject("SP");
assertDeltas("Unexpected delta", "ResourceDelta(/SP)");
@@ -1781,7 +1780,7 @@
createProject("SP");
createFile("/SP/x.jar", "");
createJavaProject("JP", new String[] { "" },
- new String[] { "/SP/x.jar" }, "");
+ new String[] { "/SP/x.jar" });
// simulate start-up state of DeltaProcessor
DeltaProcessingState deltaState = JavaModelManager
@@ -1811,7 +1810,7 @@
*/
public void testRenameJavaProject() throws CoreException {
try {
- createJavaProject("P", new String[] { "" }, "");
+ createJavaProject("P", new String[] { "" });
startDeltas();
renameProject("P", "P1");
assertDeltas("Unexpected delta", "P[-]: {MOVED_TO(P1)}\n"
@@ -1826,7 +1825,7 @@
public void testRenameMethodAndSave() throws CoreException {
IJavaScriptUnit workingCopy = null;
try {
- createJavaProject("P", new String[] { "" }, "");
+ createJavaProject("P", new String[] { "" });
createFolder("P/x/y");
createFile("P/x/y/A.js", "package x.y;\n" + "public class A {\n"
+ " public void foo1() {\n" + " }\n" + "}");
@@ -1879,7 +1878,7 @@
*/
public void testRenameOuterPkgFragment() throws CoreException {
try {
- createJavaProject("P", new String[] { "" }, "");
+ createJavaProject("P", new String[] { "" });
createFolder("P/x/y");
createFile("P/x/y/X.js", "package x.y;\n" + "public class X {\n"
+ "}");
@@ -1901,7 +1900,7 @@
public void testSaveWorkingCopy() throws CoreException {
IJavaScriptUnit copy = null;
try {
- createJavaProject("P", new String[] { "" }, "");
+ createJavaProject("P", new String[] { "" });
createFile("P/X.js", "public class X {\n" + "}");
IJavaScriptUnit unit = getCompilationUnit("P", "", "", "X.js");
copy = unit.getWorkingCopy(null);
@@ -1935,7 +1934,7 @@
createProject("LibProj");
createFile("LibProj/mylib.jar", "");
JavaProject p1 = (JavaProject) createJavaProject("P1",
- new String[] { "" }, "bin");
+ new String[] { "" });
createFolder("P1/src2");
p1.getProject().close(null);
@@ -1973,8 +1972,7 @@
createFile("LibProj/otherlib.jar", "");
JavaScriptCore.setIncludepathVariables(new String[] { "LIB" },
new IPath[] { new Path("/LibProj/mylib.jar") }, null);
- createJavaProject("P", new String[] { "" }, new String[] { "LIB" },
- "");
+ createJavaProject("P", new String[] { "" }, new String[] { "LIB" });
startDeltas();
JavaScriptCore.setIncludepathVariables(new String[] { "LIB" },
new IPath[] { new Path("/LibProj/otherlib.jar") }, null);
@@ -2002,9 +2000,9 @@
JavaScriptCore.setIncludepathVariables(new String[] { "LIB" },
new IPath[] { new Path("/LibProj/mylib.jar") }, null);
createJavaProject("P1", new String[] { "" },
- new String[] { "LIB" }, "");
+ new String[] { "LIB" });
createJavaProject("P2", new String[] { "" },
- new String[] { "LIB" }, "");
+ new String[] { "LIB" });
startDeltas();
JavaScriptCore.setIncludepathVariables(new String[] { "LIB" },
new IPath[] { new Path("/LibProj/otherlib.jar") }, null);
@@ -2030,7 +2028,7 @@
*/
public void testWorkingCopyCommit() throws CoreException {
try {
- createJavaProject("P", new String[] { "" }, "");
+ createJavaProject("P", new String[] { "" });
createFolder("P/x/y");
createFile("P/x/y/A.js", "package x.y;\n" + "public class A {\n"
+ "}");
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaModelTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaModelTests.java
index 2ecd1d4..bb4cf93 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaModelTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaModelTests.java
@@ -89,7 +89,7 @@
*/
public void testContains1() throws CoreException {
try {
- IJavaScriptProject project = this.createJavaProject("P", new String[] {""}, "");
+ IJavaScriptProject project = this.createJavaProject("P", new String[] {""});
// .java file
IFile file = this.getFile("/P/X.js");
@@ -123,7 +123,7 @@
public void testContains2() throws CoreException {
try {
// Java project
- IProject project = this.createJavaProject("P1", new String[] {""}, "").getProject();
+ IProject project = this.createJavaProject("P1", new String[] {""}).getProject();
assertTrue("/P1 should be in model", getJavaModel().contains(project));
// non-Java project
@@ -140,7 +140,7 @@
*/
public void testContains3() throws CoreException {
try {
- this.createJavaProject("P", new String[] {""}, "");
+ this.createJavaProject("P", new String[] {""});
// .java file
IFile file = this.createFile("/P/X.js", "");
@@ -167,7 +167,7 @@
*/
public void testContains4() throws CoreException {
try {
- this.createJavaProject("P", new String[] {}, "bin");
+ this.createJavaProject("P", new String[] {});
// .java file
IFile file = this.createFile("/P/X.js", "");
@@ -207,7 +207,7 @@
*/
public void testContains5() throws CoreException {
try {
- this.createJavaProject("P", new String[] {"src"}, "bin");
+ this.createJavaProject("P", new String[] {"src"});
// .java file
IFile file = this.createFile("/P/src/X.js", "");
@@ -248,7 +248,7 @@
*/
public void testContains6() throws CoreException {
try {
- this.createJavaProject("P", new String[] {""}, "bin");
+ this.createJavaProject("P", new String[] {""});
// .java file
IFile file = this.createFile("/P/X.js", "");
@@ -291,9 +291,9 @@
*/
public void testCreatePkgHandleInDifferentProject() throws CoreException {
try {
- createJavaProject("P1", new String[] {}, "bin");
+ createJavaProject("P1", new String[] {});
IFolder folder = createFolder("/P1/lib/x/y");
- createJavaProject("P2", new String[] {}, new String[] {"/P1/lib"}, "");
+ createJavaProject("P2", new String[] {}, new String[] {"/P1/lib"});
IJavaScriptElement element = JavaScriptCore.create(folder);
assertElementEquals(
"Unexpected element",
@@ -391,7 +391,7 @@
this.indexOf("P", projects) == -1
);
try {
- this.createJavaProject("P", new String[] {}, "");
+ this.createJavaProject("P", new String[] {});
projects = model.getJavaScriptProjects();
assertTrue(
"Project P should be present",
@@ -435,7 +435,7 @@
try {
IJavaScriptModel model = this.getJavaModel();
- this.createJavaProject("JP", new String[]{}, "");
+ this.createJavaProject("JP", new String[]{});
assertResourceNamesEqual(
"Unexpected non-Java resources",
"",
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaProjectTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaProjectTests.java
index f0fdd7a..3172120 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaProjectTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaProjectTests.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 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
@@ -162,42 +162,6 @@
assertTrue("incorrect corresponding resource", corr == null);
}
/**
- * When the output location is changed, package fragments can be added/removed
- */
-public void testChangeOutputLocation() throws JavaScriptModelException, CoreException {
- IJavaScriptProject project= getJavaProject("JavaProjectTests");
- IContainer underLyingResource = (IContainer)project.getUnderlyingResource();
- IFolder folder= underLyingResource.getFolder(new Path("output"));
-
- try {
- startDeltas();
- project.setOutputLocation(folder.getFullPath(), null);
- assertDeltas(
- "Unexpected delta 1",
- "JavaProjectTests[*]: {CHILDREN | CONTENT | CLASSPATH CHANGED}\n" +
- " <project root>[*]: {CHILDREN}\n" +
- " bin[+]: {}\n" +
- " ResourceDelta(/JavaProjectTests/.classpath)[*]"
- );
- } finally {
- stopDeltas();
- try {
- startDeltas();
- folder= underLyingResource.getFolder(new Path("bin"));
- project.setOutputLocation(folder.getFullPath(), null);
- assertDeltas(
- "Unexpected delta 2",
- "JavaProjectTests[*]: {CHILDREN | CONTENT | CLASSPATH CHANGED}\n" +
- " <project root>[*]: {CHILDREN}\n" +
- " bin[-]: {}\n" +
- " ResourceDelta(/JavaProjectTests/.classpath)[*]"
- );
- } finally {
- stopDeltas();
- }
- }
-}
-/**
* Test that a class file
* has a corresponding resource.
*/
@@ -270,7 +234,7 @@
*/
public void testExternalArchiveCorrespondingResource() throws JavaScriptModelException {
IJavaScriptProject project= getJavaProject("JavaProjectTests");
- IPackageFragmentRoot element= project.getPackageFragmentRoot(getExternalJCLPathString());
+ IPackageFragmentRoot element= project.getPackageFragmentRoot(getSystemJsPathString());
IResource corr= element.getCorrespondingResource();
assertTrue("incorrect corresponding resource", corr == null);
}
@@ -380,7 +344,7 @@
public void testFindElementPrereqSimpleProject() throws CoreException {
try {
this.createProject("R");
- IJavaScriptProject project = this.createJavaProject("J", new String[] {"src"}, new String[] {}, new String[] {"/R"}, "bin");
+ IJavaScriptProject project = this.createJavaProject("J", new String[] {"src"}, new String[] {}, new String[] {"/R"});
this.createFile(
"J/src/X.js",
"public class X {\n" +
@@ -468,7 +432,7 @@
*/
public void testGetNonJavaResources1() throws CoreException {
try {
- IJavaScriptProject project = this.createJavaProject("P", new String[] {"src"}, "bin");
+ IJavaScriptProject project = this.createJavaProject("P", new String[] {"src"});
assertResourcesEqual(
"Unexpected non-java resources for project",
"/P/.classpath\n" +
@@ -499,7 +463,7 @@
*/
public void testGetNonJavaResources3() throws CoreException {
try {
- IJavaScriptProject project = this.createJavaProject("P", new String[] {""}, "");
+ IJavaScriptProject project = this.createJavaProject("P", new String[] {""});
this.createFolder("/P/p1");
assertResourcesEqual(
"Unexpected non-java resources for project",
@@ -538,8 +502,7 @@
"P",
new String[] {},
new String[] {},
- new String[] {"/JavaProjectTests", "/P1", "/P0", "/P2", "/JavaProjectSrcTests"},
- "");
+ new String[] {"/JavaProjectTests", "/P1", "/P0", "/P2", "/JavaProjectSrcTests"});
String[] requiredProjectNames = project.getRequiredProjectNames();
StringBuffer buffer = new StringBuffer();
for (int i = 0, length = requiredProjectNames.length; i < length; i++) {
@@ -592,25 +555,6 @@
assertTrue("incorrect corresponding resource", corr == null);
}
/**
- * Test that an output location can't be set to a location inside a package fragment
- * root, except the root project folder.
- */
-public void testOutputLocationNestedInRoot() throws JavaScriptModelException, CoreException {
- IPackageFragmentRoot root= getPackageFragmentRoot("JavaProjectSrcTests", "src");
- IFolder folder= (IFolder) root.getUnderlyingResource();
- IJavaScriptProject project= getJavaProject("JavaProjectSrcTests");
- folder= folder.getFolder("x");
- boolean failed= false;
- try {
- project.setOutputLocation(folder.getFullPath(), null);
- } catch (JavaScriptModelException e) {
- assertTrue("should be an invalid classpath", e.getStatus().getCode() == IJavaScriptModelStatusConstants.INVALID_INCLUDEPATH);
- failed= true;
- }
- assertTrue("should have failed", failed);
-
-}
-/**
* Test that an output location folder is not created as a package fragment.
*/
public void testOutputLocationNotAddedAsPackageFragment() throws JavaScriptModelException, CoreException {
@@ -660,8 +604,8 @@
assertTrue("x should have subpackages", x.hasSubpackages());
assertTrue("x.y should NOT have subpackages", !y.hasSubpackages());
- IPackageFragment java = getPackageFragment("JavaProjectTests", getExternalJCLPathString(), "java");
- IPackageFragment lang= getPackageFragment("JavaProjectTests", getExternalJCLPathString(), "java.lang");
+ IPackageFragment java = getPackageFragment("JavaProjectTests", getSystemJsPathString(), "java");
+ IPackageFragment lang= getPackageFragment("JavaProjectTests", getSystemJsPathString(), "java.lang");
assertTrue("java should have subpackages", java.hasSubpackages());
assertTrue("java.lang should NOT have subpackages", !lang.hasSubpackages());
@@ -892,7 +836,7 @@
try {
String libPath = getExternalPath() + "lib";
JavaScriptCore.setIncludepathVariable("MyVar", new Path(libPath), null);
- IJavaScriptProject proj = this.createJavaProject("P", new String[] {}, "bin");
+ IJavaScriptProject proj = this.createJavaProject("P", new String[] {});
libDir = new File(libPath);
libDir.mkdirs();
final int length = 200;
@@ -930,7 +874,7 @@
String externalPath = getExternalPath();
String libPath = externalPath + "lib";
JavaScriptCore.setIncludepathVariable("MyVar", new Path(externalPath), null);
- IJavaScriptProject proj = this.createJavaProject("P", new String[] {}, "bin");
+ IJavaScriptProject proj = this.createJavaProject("P", new String[] {});
libDir = new File(libPath);
libDir.mkdirs();
IIncludePathEntry[] classpath = new IIncludePathEntry[2];
@@ -960,7 +904,7 @@
public void testProjectOpen() throws CoreException {
try {
createJavaProject("P1");
- createJavaProject("P2", new String[0], new String[0], new String[] {"/P1"}, "");
+ createJavaProject("P2", new String[0], new String[0], new String[] {"/P1"});
IProject p2 = getProject("P2");
p2.close(null);
p2.open(null);
@@ -1028,7 +972,7 @@
assertElementsEqual(
"Unexpected package fragment roots",
"<project root> [in JavaProjectTests]\n" +
- getExternalJCLPathString() + "\n" +
+ getSystemJsPathString() + "\n" +
"lib.jar [in JavaProjectTests]\n" +
"lib142530.jar [in JavaProjectTests]\n" +
"lib148949.jar [in JavaProjectTests]",
@@ -1042,14 +986,14 @@
IPackageFragment[] fragments= project.getPackageFragments();
assertSortedElementsEqual(
"unexpected package fragments",
- "<default> [in "+ getExternalJCLPathString() + "]\n" +
+ "<default> [in "+ getSystemJsPathString() + "]\n" +
"<default> [in <project root> [in JavaProjectTests]]\n" +
"<default> [in lib.jar [in JavaProjectTests]]\n" +
"<default> [in lib142530.jar [in JavaProjectTests]]\n" +
"<default> [in lib148949.jar [in JavaProjectTests]]\n" +
- "java [in "+ getExternalJCLPathString() + "]\n" +
- "java.io [in "+ getExternalJCLPathString() + "]\n" +
- "java.lang [in "+ getExternalJCLPathString() + "]\n" +
+ "java [in "+ getSystemJsPathString() + "]\n" +
+ "java.io [in "+ getSystemJsPathString() + "]\n" +
+ "java.lang [in "+ getSystemJsPathString() + "]\n" +
"p [in lib.jar [in JavaProjectTests]]\n" +
"p [in lib142530.jar [in JavaProjectTests]]\n" +
"p [in lib148949.jar [in JavaProjectTests]]\n" +
@@ -1180,7 +1124,7 @@
*/
public void testSourceFolderWithJarName() throws CoreException {
try {
- this.createJavaProject("P", new String[] {"src.jar"}, "bin");
+ this.createJavaProject("P", new String[] {"src.jar"});
IFile file = createFile("/P/src.jar/X.js", "class X {}");
IJavaScriptUnit unit = (IJavaScriptUnit)JavaScriptCore.create(file);
unit.getAllTypes(); // force to open
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaSearchBugsTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaSearchBugsTests.java
index 9c9124e..33e7db8 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaSearchBugsTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaSearchBugsTests.java
@@ -7000,7 +7000,7 @@
*/
public void testBug156340() throws CoreException {
TypeNameRequestor requestor = new SearchTests.SearchTypeNameRequestor();
- IPackageFragment fragment = getPackageFragment("JavaSearchBugs", getExternalJCLPathString(), "java.lang");
+ IPackageFragment fragment = getPackageFragment("JavaSearchBugs", getSystemJsPathString(), "java.lang");
IJavaScriptSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaScriptElement[] { fragment });
new SearchEngine().searchAllTypeNames(
null,
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaSearchMultipleProjectsTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaSearchMultipleProjectsTests.java
index 69618b6..8213e34 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaSearchMultipleProjectsTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaSearchMultipleProjectsTests.java
@@ -59,7 +59,7 @@
);
// setup project P2
- IJavaScriptProject p2 = createJavaProject("P2", new String[] {""}, new String[] {"JCL_LIB"}, new String[] {"/P1"}, "");
+ IJavaScriptProject p2 = createJavaProject("P2", new String[] {""}, new String[] {"JCL_LIB"}, new String[] {"/P1"});
createFolder("/P2/p2");
createFile(
"/P2/p2/Y.js",
@@ -136,7 +136,7 @@
" }\n" +
"}"
);
- createJavaProject("P2", new String[] {""}, new String[] {"JCL_LIB"}, new String[] {"/P1"}, "");
+ createJavaProject("P2", new String[] {""}, new String[] {"JCL_LIB"}, new String[] {"/P1"});
createFile(
"/P2/Y.js",
"import p.X;\n" +
@@ -183,7 +183,7 @@
" }\n" +
"}"
);
- createJavaProject("P2", new String[] {""}, new String[] {"JCL_LIB"}, new String[] {"/P1"}, "");
+ createJavaProject("P2", new String[] {""}, new String[] {"JCL_LIB"}, new String[] {"/P1"});
createFile(
"/P2/Y.js",
"import p.X;\n" +
@@ -235,7 +235,7 @@
" }\n" +
"}"
);
- createJavaProject("P2", new String[] {""}, new String[] {"JCL_LIB"}, new String[] {"/P1"}, "");
+ createJavaProject("P2", new String[] {""}, new String[] {"JCL_LIB"}, new String[] {"/P1"});
createFolder("/P2/q");
createFile(
"/P2/q/Y.js",
@@ -284,7 +284,7 @@
" }\n" +
"}"
);
- createJavaProject("P1", new String[] {""}, new String[] {"JCL_LIB"}, new String[] {"/P0"}, "");
+ createJavaProject("P1", new String[] {""}, new String[] {"JCL_LIB"}, new String[] {"/P0"});
createFolder("/P1/p1");
createFile(
"/P1/p1/T.js",
@@ -296,7 +296,7 @@
" }\n" +
"}"
);
- createJavaProject("P2", new String[] {""}, new String[] {"JCL_LIB"}, new String[] {"/P0", "/P1"}, "");
+ createJavaProject("P2", new String[] {""}, new String[] {"JCL_LIB"}, new String[] {"/P0", "/P1"});
createFolder("/P2/p2");
createFile(
"/P2/p2/Y.js",
@@ -309,7 +309,7 @@
" }\n" +
"}"
);
- createJavaProject("P3", new String[] {""}, new String[] {"JCL_LIB"}, new String[] {"/P0", "/P2"}, "");
+ createJavaProject("P3", new String[] {""}, new String[] {"JCL_LIB"}, new String[] {"/P0", "/P2"});
createFolder("/P3/p3");
createFile(
"/P3/p3/Z.js",
@@ -451,8 +451,7 @@
"P2",
new String[] {""},
new String[] {"JCL_LIB"},
- new String[] {"/P1"},
- "");
+ new String[] {"/P1"});
createFolder("/P2/p");
createFile(
"/P2/p/Y.js",
@@ -559,8 +558,7 @@
"P2",
new String[] {""},
new String[] {"JCL_LIB"},
- new String[] {"/P1"},
- "");
+ new String[] {"/P1"});
createFolder("/P2/p2");
createFile(
"/P2/p2/Y.js",
@@ -630,8 +628,8 @@
*/
public void testTypeDeclarationInJar() throws CoreException {
try {
- IJavaScriptProject p1 = createJavaProject("P1", new String[] {}, new String[] {"JCL_LIB"}, "");
- IJavaScriptProject p2 = createJavaProject("P2", new String[] {}, new String[] {"JCL_LIB"}, "");
+ IJavaScriptProject p1 = createJavaProject("P1", new String[] {}, new String[] {"JCL_LIB"});
+ IJavaScriptProject p2 = createJavaProject("P2", new String[] {}, new String[] {"JCL_LIB"});
IJavaScriptSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaScriptElement[] {p1});
JavaSearchResultCollector resultCollector = new JavaSearchResultCollector();
@@ -644,7 +642,7 @@
resultCollector);
assertSearchResults(
"Unexpected result in scope of P1",
- getExternalJCLPathString() + " [in P1] java.lang.Object",
+ getSystemJsPathString() + " [in P1] java.lang.Object",
resultCollector);
scope = SearchEngine.createJavaSearchScope(new IJavaScriptElement[] {p2});
@@ -658,7 +656,7 @@
resultCollector);
assertSearchResults(
"Unexpected result in scope of P2",
- getExternalJCLPathString() + " [in P2] java.lang.Object",
+ getSystemJsPathString() + " [in P2] java.lang.Object",
resultCollector);
} finally {
deleteProject("P1");
@@ -691,7 +689,7 @@
);
// setup project P2
- createJavaProject("P2", new String[] {""}, new String[] {"JCL_LIB"}, new String[] { "/P1" }, "");
+ createJavaProject("P2", new String[] {""}, new String[] {"JCL_LIB"}, new String[] { "/P1" });
createFolder("/P2/test");
createFile(
"/P2/test/Declaration_bis.js",
@@ -759,7 +757,7 @@
);
// setup project P2
- IJavaScriptProject p2 = createJavaProject("P2", new String[] {""}, new String[] {"JCL_LIB"}, new String[] { "/P1" }, "");
+ IJavaScriptProject p2 = createJavaProject("P2", new String[] {""}, new String[] {"JCL_LIB"}, new String[] { "/P1" });
createFolder("/P2/test");
createFile(
"/P2/test/Declaration_bis.js",
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaSearchScopeTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaSearchScopeTests.java
index efaf65a..a4ccbc6 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaSearchScopeTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaSearchScopeTests.java
@@ -79,7 +79,7 @@
IJavaScriptSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaScriptElement[] {project}, IJavaScriptSearchScope.APPLICATION_LIBRARIES);
assertScopeEquals(
"JavaSearchScope on [\n" +
- " "+ getExternalJCLPath().toOSString() +"\n" +
+ " "+ getExternalJCLPath("").toOSString() +"\n" +
"]",
scope);
} finally {
@@ -92,7 +92,7 @@
*/
public void testApplicationLibrairiesJarAndClassFolder() throws CoreException {
try {
- IJavaScriptProject project = createJavaProject("P", new String[] {"src"}, new String[] {"/P/internal.jar", "/P/classfolder"}, "bin");
+ IJavaScriptProject project = createJavaProject("P", new String[] {"src"}, new String[] {"/P/internal.jar", "/P/classfolder"});
IJavaScriptSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaScriptElement[] {project}, IJavaScriptSearchScope.APPLICATION_LIBRARIES);
assertScopeEquals(
"JavaSearchScope on [\n" +
@@ -111,7 +111,7 @@
public void testApplicationLibrairiesClasspathVariable() throws CoreException {
try {
VariablesInitializer.setInitializer(new ClasspathInitializerTests.DefaultVariableInitializer(new String[] {"TEST_LIB", "/P/lib.jar"}));
- IJavaScriptProject project = createJavaProject("P", new String[] {}, new String[] {"TEST_LIB"}, "");
+ IJavaScriptProject project = createJavaProject("P", new String[] {}, new String[] {"TEST_LIB"});
IJavaScriptSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaScriptElement[] {project}, IJavaScriptSearchScope.APPLICATION_LIBRARIES);
assertScopeEquals(
"JavaSearchScope on [\n" +
@@ -130,7 +130,7 @@
public void testApplicationLibrairiesJsGlobalScopeContainer() throws CoreException {
try {
ContainerInitializer.setInitializer(new ClasspathInitializerTests.DefaultContainerInitializer(new String[] {"P", "/P/lib.jar"}));
- IJavaScriptProject project = createJavaProject("P", new String[] {}, new String[] {"org.eclipse.wst.jsdt.core.tests.model.TEST_CONTAINER"}, "");
+ IJavaScriptProject project = createJavaProject("P", new String[] {}, new String[] {"org.eclipse.wst.jsdt.core.tests.model.TEST_CONTAINER"});
IJavaScriptSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaScriptElement[] {project}, IJavaScriptSearchScope.APPLICATION_LIBRARIES);
assertScopeEquals(
"JavaSearchScope on [\n" +
@@ -157,7 +157,7 @@
}
};
ContainerInitializer.setInitializer(intializer);
- IJavaScriptProject project = createJavaProject("P", new String[] {}, new String[] {"org.eclipse.wst.jsdt.core.tests.model.TEST_CONTAINER"}, "");
+ IJavaScriptProject project = createJavaProject("P", new String[] {}, new String[] {"org.eclipse.wst.jsdt.core.tests.model.TEST_CONTAINER"});
IJavaScriptSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaScriptElement[] {project}, IJavaScriptSearchScope.SYSTEM_LIBRARIES);
assertScopeEquals(
"JavaSearchScope on [\n" +
@@ -175,7 +175,7 @@
public void testSourcesOrDirectReferencedProjects() throws CoreException {
try {
createJavaProject("P1");
- IJavaScriptProject project = createJavaProject("P2", new String[] {"src"}, new String[] {}, new String[] {"/P1"}, "bin");
+ IJavaScriptProject project = createJavaProject("P2", new String[] {"src"}, new String[] {}, new String[] {"/P1"});
IJavaScriptSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaScriptElement[] {project}, IJavaScriptSearchScope.SOURCES | IJavaScriptSearchScope.REFERENCED_PROJECTS);
assertScopeEquals(
"JavaSearchScope on [\n" +
@@ -196,7 +196,7 @@
try {
createJavaProject("P1");
ContainerInitializer.setInitializer(new ClasspathInitializerTests.DefaultContainerInitializer(new String[] {"P2", "/P1"}));
- IJavaScriptProject project = createJavaProject("P2", new String[] {"src"}, new String[] {"org.eclipse.wst.jsdt.core.tests.model.TEST_CONTAINER"}, "bin");
+ IJavaScriptProject project = createJavaProject("P2", new String[] {"src"}, new String[] {"org.eclipse.wst.jsdt.core.tests.model.TEST_CONTAINER"});
IJavaScriptSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaScriptElement[] {project}, IJavaScriptSearchScope.SOURCES | IJavaScriptSearchScope.REFERENCED_PROJECTS);
assertScopeEquals(
"JavaSearchScope on [\n" +
@@ -391,7 +391,7 @@
*/
public void testScopeEncloses14() throws CoreException {
try {
- IJavaScriptProject project = createJavaProject("P", new String[] {"src"}, "bin");
+ IJavaScriptProject project = createJavaProject("P", new String[] {"src"});
IJavaScriptSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaScriptElement[] {project});
assertFalse("scope on P should not enclose \"/P\"", scope.encloses("/P"));
} finally {
@@ -404,7 +404,7 @@
*/
public void testScopeEncloses14b() throws CoreException {
try {
- IJavaScriptProject project = createJavaProject("P", new String[] {"src"}, "bin");
+ IJavaScriptProject project = createJavaProject("P", new String[] {"src"});
IJavaScriptSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaScriptElement[] {project});
assertFalse("scope on P should not enclose \"/\"", scope.encloses("/"));
} finally {
@@ -417,7 +417,7 @@
*/
public void testScopeEncloses14c() throws CoreException {
try {
- IJavaScriptProject project = createJavaProject("P", new String[] {"src"}, "bin");
+ IJavaScriptProject project = createJavaProject("P", new String[] {"src"});
IJavaScriptSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaScriptElement[] {project});
assertFalse("scope on P should not enclose \"\"", scope.encloses(""));
} finally {
@@ -430,7 +430,7 @@
*/
public void testScopeEncloses15() throws CoreException {
try {
- IJavaScriptProject project = createJavaProject("P", new String[] {"src"}, "bin");
+ IJavaScriptProject project = createJavaProject("P", new String[] {"src"});
IJavaScriptSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaScriptElement[] {project});
assertFalse("scope on P should enclose P", scope.encloses(project));
} finally {
@@ -443,7 +443,7 @@
*/
public void testScopeEncloses16() throws CoreException {
try {
- IJavaScriptProject project = createJavaProject("P", new String[] {"src"}, "bin");
+ IJavaScriptProject project = createJavaProject("P", new String[] {"src"});
IJavaScriptSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaScriptElement[] {project});
assertTrue("scope on P should enclose \"/P/src\"", scope.encloses("/P/src"));
} finally {
@@ -456,7 +456,7 @@
*/
public void testScopeEncloses17() throws CoreException {
try {
- IJavaScriptProject project = createJavaProject("P", new String[] {"src"}, "bin");
+ IJavaScriptProject project = createJavaProject("P", new String[] {"src"});
IJavaScriptSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaScriptElement[] {project});
assertTrue("scope on P should enclose \"/P/src/\"", scope.encloses("/P/src/"));
} finally {
@@ -469,7 +469,7 @@
*/
public void testScopeEncloses18() throws CoreException {
try {
- IJavaScriptProject project = createJavaProject("P", new String[] {"src"}, "bin");
+ IJavaScriptProject project = createJavaProject("P", new String[] {"src"});
IJavaScriptSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaScriptElement[] {project});
IPackageFragmentRoot root = project.getPackageFragmentRoot(project.getProject().getFolder("src"));
assertTrue("scope on P should enclose root P/src", scope.encloses(root));
@@ -483,7 +483,7 @@
*/
public void testScopeEncloses19() throws CoreException {
try {
- IJavaScriptProject project = createJavaProject("P", new String[] {"src"}, "bin");
+ IJavaScriptProject project = createJavaProject("P", new String[] {"src"});
IJavaScriptSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaScriptElement[] {project});
assertTrue("scope on P should enclose \"/P/src/x/y\"", scope.encloses("/P/src/x/y"));
} finally {
@@ -496,7 +496,7 @@
*/
public void testScopeEncloses20() throws CoreException {
try {
- IJavaScriptProject project = createJavaProject("P", new String[] {"src"}, "bin");
+ IJavaScriptProject project = createJavaProject("P", new String[] {"src"});
IJavaScriptSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaScriptElement[] {project});
assertTrue("scope on P should enclose \"/P/src/x/y/\"", scope.encloses("/P/src/x/y/"));
} finally {
@@ -509,7 +509,7 @@
*/
public void testScopeEncloses21() throws CoreException {
try {
- IJavaScriptProject project = createJavaProject("P", new String[] {"src"}, "bin");
+ IJavaScriptProject project = createJavaProject("P", new String[] {"src"});
IJavaScriptSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaScriptElement[] {project});
IPackageFragment pkg = getPackage("/P/src/x/y");
assertTrue("scope on P should enclose package x.y", scope.encloses(pkg));
@@ -523,7 +523,7 @@
*/
public void testScopeEncloses22() throws CoreException {
try {
- IJavaScriptProject project = createJavaProject("P", new String[] {"src"}, "bin");
+ IJavaScriptProject project = createJavaProject("P", new String[] {"src"});
IJavaScriptSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaScriptElement[] {project});
IPackageFragment pkg = getPackage("/P/src");
assertTrue("scope on P should enclose default package", scope.encloses(pkg));
@@ -537,7 +537,7 @@
*/
public void testScopeEncloses23() throws CoreException {
try {
- IJavaScriptProject project = createJavaProject("P", new String[] {"src"}, "bin");
+ IJavaScriptProject project = createJavaProject("P", new String[] {"src"});
IJavaScriptSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaScriptElement[] {project});
assertTrue("scope on P should enclose \"/P/src/x/y/A.java\"", scope.encloses("/P/src/x/y/A.js"));
} finally {
@@ -550,7 +550,7 @@
*/
public void testScopeEncloses24() throws CoreException {
try {
- IJavaScriptProject project = createJavaProject("P", new String[] {"src"}, "bin");
+ IJavaScriptProject project = createJavaProject("P", new String[] {"src"});
IJavaScriptSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaScriptElement[] {project});
IJavaScriptUnit cu = getCompilationUnit("/P/src/x/y/A.js");
assertTrue("scope on P should enclose compilation unit A.js", scope.encloses(cu));
@@ -564,7 +564,7 @@
*/
public void testScopeEncloses25() throws CoreException {
try {
- IJavaScriptProject project = createJavaProject("P", new String[] {"src"}, "bin");
+ IJavaScriptProject project = createJavaProject("P", new String[] {"src"});
IJavaScriptSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaScriptElement[] {project});
assertTrue("scope on P should enclose \"/P/src/A.java\"", scope.encloses("/P/src/A.js"));
} finally {
@@ -577,7 +577,7 @@
*/
public void testScopeEncloses26() throws CoreException {
try {
- IJavaScriptProject project = createJavaProject("P", new String[] {"src"}, "bin");
+ IJavaScriptProject project = createJavaProject("P", new String[] {"src"});
IJavaScriptSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaScriptElement[] {project});
IJavaScriptUnit cu = getCompilationUnit("/P/src/A.js");
assertTrue("scope on P should enclose compilation unit A.js", scope.encloses(cu));
@@ -591,7 +591,7 @@
*/
public void testScopeEncloses27() throws CoreException {
try {
- IJavaScriptProject project = createJavaProject("P", new String[] {"src"}, "bin");
+ IJavaScriptProject project = createJavaProject("P", new String[] {"src"});
IJavaScriptSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaScriptElement[] {project});
IJavaScriptUnit cu = getCompilationUnit("/P/src/x/y/A.js");
IType type = cu.getType("A");
@@ -606,7 +606,7 @@
*/
public void testScopeEncloses28() throws CoreException {
try {
- IJavaScriptProject project = createJavaProject("P", new String[] {"src/"}, "bin");
+ IJavaScriptProject project = createJavaProject("P", new String[] {"src/"});
IJavaScriptSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaScriptElement[] {project});
assertFalse("scope on P should not enclose \"/P\"", scope.encloses("/P"));
} finally {
@@ -619,7 +619,7 @@
*/
public void testScopeEncloses28b() throws CoreException {
try {
- IJavaScriptProject project = createJavaProject("P", new String[] {"src/"}, "bin");
+ IJavaScriptProject project = createJavaProject("P", new String[] {"src/"});
IJavaScriptSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaScriptElement[] {project});
assertFalse("scope on P should not enclose \"/P\"", scope.encloses("/"));
} finally {
@@ -632,7 +632,7 @@
*/
public void testScopeEncloses28c() throws CoreException {
try {
- IJavaScriptProject project = createJavaProject("P", new String[] {"src/"}, "bin");
+ IJavaScriptProject project = createJavaProject("P", new String[] {"src/"});
IJavaScriptSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaScriptElement[] {project});
assertFalse("scope on P should not enclose \"/P\"", scope.encloses(""));
} finally {
@@ -645,7 +645,7 @@
*/
public void testScopeEncloses29() throws CoreException {
try {
- IJavaScriptProject project = createJavaProject("P", new String[] {"src/"}, "bin");
+ IJavaScriptProject project = createJavaProject("P", new String[] {"src/"});
IJavaScriptSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaScriptElement[] {project});
assertFalse("scope on P should enclose P", scope.encloses(project));
} finally {
@@ -658,7 +658,7 @@
*/
public void testScopeEncloses30() throws CoreException {
try {
- IJavaScriptProject project = createJavaProject("P", new String[] {"src/"}, "bin");
+ IJavaScriptProject project = createJavaProject("P", new String[] {"src/"});
IJavaScriptSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaScriptElement[] {project});
assertTrue("scope on P should enclose \"/P/src\"", scope.encloses("/P/src"));
} finally {
@@ -671,7 +671,7 @@
*/
public void testScopeEncloses31() throws CoreException {
try {
- IJavaScriptProject project = createJavaProject("P", new String[] {"src/"}, "bin");
+ IJavaScriptProject project = createJavaProject("P", new String[] {"src/"});
IJavaScriptSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaScriptElement[] {project});
assertTrue("scope on P should enclose \"/P/src/\"", scope.encloses("/P/src/"));
} finally {
@@ -684,7 +684,7 @@
*/
public void testScopeEncloses32() throws CoreException {
try {
- IJavaScriptProject project = createJavaProject("P", new String[] {"src/"}, "bin");
+ IJavaScriptProject project = createJavaProject("P", new String[] {"src/"});
IJavaScriptSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaScriptElement[] {project});
IPackageFragmentRoot root = project.getPackageFragmentRoot(project.getProject().getFolder("src"));
assertTrue("scope on P should enclose root P/src", scope.encloses(root));
@@ -698,7 +698,7 @@
*/
public void testScopeEncloses33() throws CoreException {
try {
- IJavaScriptProject project = createJavaProject("P", new String[] {"src/"}, "bin");
+ IJavaScriptProject project = createJavaProject("P", new String[] {"src/"});
IJavaScriptSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaScriptElement[] {project});
assertTrue("scope on P should enclose \"/P/src/x/y\"", scope.encloses("/P/src/x/y"));
} finally {
@@ -711,7 +711,7 @@
*/
public void testScopeEncloses34() throws CoreException {
try {
- IJavaScriptProject project = createJavaProject("P", new String[] {"src/"}, "bin");
+ IJavaScriptProject project = createJavaProject("P", new String[] {"src/"});
IJavaScriptSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaScriptElement[] {project});
assertTrue("scope on P should enclose \"/P/src/x/y/\"", scope.encloses("/P/src/x/y/"));
} finally {
@@ -724,7 +724,7 @@
*/
public void testScopeEncloses35() throws CoreException {
try {
- IJavaScriptProject project = createJavaProject("P", new String[] {"src/"}, "bin");
+ IJavaScriptProject project = createJavaProject("P", new String[] {"src/"});
IJavaScriptSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaScriptElement[] {project});
IPackageFragment pkg = getPackage("/P/src/x/y");
assertTrue("scope on P should enclose package x.y", scope.encloses(pkg));
@@ -738,7 +738,7 @@
*/
public void testScopeEncloses36() throws CoreException {
try {
- IJavaScriptProject project = createJavaProject("P", new String[] {"src/"}, "bin");
+ IJavaScriptProject project = createJavaProject("P", new String[] {"src/"});
IJavaScriptSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaScriptElement[] {project});
IPackageFragment pkg = getPackage("/P/src");
assertTrue("scope on P should enclose default package", scope.encloses(pkg));
@@ -752,7 +752,7 @@
*/
public void testScopeEncloses37() throws CoreException {
try {
- IJavaScriptProject project = createJavaProject("P", new String[] {"src/"}, "bin");
+ IJavaScriptProject project = createJavaProject("P", new String[] {"src/"});
IJavaScriptSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaScriptElement[] {project});
assertTrue("scope on P should enclose \"/P/src/x/y/A.java\"", scope.encloses("/P/src/x/y/A.js"));
} finally {
@@ -765,7 +765,7 @@
*/
public void testScopeEncloses38() throws CoreException {
try {
- IJavaScriptProject project = createJavaProject("P", new String[] {"src/"}, "bin");
+ IJavaScriptProject project = createJavaProject("P", new String[] {"src/"});
IJavaScriptSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaScriptElement[] {project});
IJavaScriptUnit cu = getCompilationUnit("/P/src/x/y/A.js");
assertTrue("scope on P should enclose compilation unit A.js", scope.encloses(cu));
@@ -779,7 +779,7 @@
*/
public void testScopeEncloses39() throws CoreException {
try {
- IJavaScriptProject project = createJavaProject("P", new String[] {"src/"}, "bin");
+ IJavaScriptProject project = createJavaProject("P", new String[] {"src/"});
IJavaScriptSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaScriptElement[] {project});
assertTrue("scope on P should enclose \"/P/src/A.java\"", scope.encloses("/P/src/A.js"));
} finally {
@@ -792,7 +792,7 @@
*/
public void testScopeEncloses40() throws CoreException {
try {
- IJavaScriptProject project = createJavaProject("P", new String[] {"src/"}, "bin");
+ IJavaScriptProject project = createJavaProject("P", new String[] {"src/"});
IJavaScriptSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaScriptElement[] {project});
IJavaScriptUnit cu = getCompilationUnit("/P/src/A.js");
assertTrue("scope on P should enclose compilation unit A.js", scope.encloses(cu));
@@ -806,7 +806,7 @@
*/
public void testScopeEncloses41() throws CoreException {
try {
- IJavaScriptProject project = createJavaProject("P", new String[] {"src/"}, "bin");
+ IJavaScriptProject project = createJavaProject("P", new String[] {"src/"});
IJavaScriptSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaScriptElement[] {project});
IJavaScriptUnit cu = getCompilationUnit("/P/src/x/y/A.js");
IType type = cu.getType("A");
@@ -822,7 +822,7 @@
*/
public void testBug101022() throws CoreException {
try {
- IJavaScriptProject project = createJavaProject("P1", new String[] {"src", "test", "test2"}, "bin");
+ IJavaScriptProject project = createJavaProject("P1", new String[] {"src", "test", "test2"});
createFile(
"/P1/src/Test.js",
"public class Test {\n" +
@@ -861,7 +861,7 @@
*/
public void testBug101426() throws CoreException {
try {
- IJavaScriptProject project = createJavaProject("P1", new String[] {"src/", "test/", "test2/"}, new String[] {"JCL_LIB"}, "bin");
+ IJavaScriptProject project = createJavaProject("P1", new String[] {"src/", "test/", "test2/"}, new String[] {"JCL_LIB"});
createFile(
"/P1/src/Test.js",
"public interface ITest {\n" +
@@ -939,7 +939,7 @@
*/
public void testBug119203() throws CoreException {
try {
- IJavaScriptProject project = createJavaProject("P1", new String[] {"src"}, "bin");
+ IJavaScriptProject project = createJavaProject("P1", new String[] {"src"});
createFile(
"/P1/src/Test.js",
"public class Test {\n" +
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaSearchTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaSearchTests.java
index 78128da..c78046f 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaSearchTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaSearchTests.java
@@ -1610,7 +1610,7 @@
* (regression test for 1GHDA2V: ITPJCORE:WINNT - ClassCastException when doing a search)
*/
public void testMethodReference14() throws CoreException { // was testMethodReferenceThroughArray
- IType type = getClassFile("JSSearch", getExternalJCLPathString(), "java.lang", "Object.class").getType();
+ IType type = getClassFile("JSSearch", getSystemJsPathString(), "java.lang", "Object.class").getType();
IFunction method = type.getFunction("clone", new String[] {});
search(
@@ -1719,7 +1719,7 @@
* (regression test for bug 62698 NPE while searching for declaration of binary package)
*/
public void testPackageDeclaration3() throws CoreException { // was testPackageDeclaration
- IPackageFragment pkg = getPackageFragment("JSSearch", getExternalJCLPathString(), "java.lang");
+ IPackageFragment pkg = getPackageFragment("JSSearch", getSystemJsPathString(), "java.lang");
search(
pkg,
@@ -1727,7 +1727,7 @@
getJavaSearchScope(),
this.resultCollector);
assertSearchResults(
- getExternalJCLPath() + " java.lang",
+ getExternalJCLPath("") + " java.lang",
this.resultCollector);
}
/**
@@ -3469,28 +3469,28 @@
search("RE", TYPE, DECLARATIONS, SearchPattern.R_CAMELCASE_MATCH, getJavaSearchScope());
assertSearchResults(
"src/a3/References.java a3.References [References]\n" +
- ""+ getExternalJCLPathString() + " java.lang.RuntimeException"
+ ""+ getSystemJsPathString() + " java.lang.RuntimeException"
);
}
public void testCamelCaseTypePattern02() throws CoreException {
search("RException", TYPE, DECLARATIONS, SearchPattern.R_CAMELCASE_MATCH, getJavaSearchScope());
assertSearchResults(
- ""+ getExternalJCLPathString() + " java.lang.RuntimeException"
+ ""+ getSystemJsPathString() + " java.lang.RuntimeException"
);
}
public void testCamelCaseTypePattern03() throws CoreException {
search("RuntimeException", TYPE, DECLARATIONS, SearchPattern.R_CAMELCASE_MATCH, getJavaSearchScope());
assertSearchResults(
- ""+ getExternalJCLPathString() + " java.lang.RuntimeException"
+ ""+ getSystemJsPathString() + " java.lang.RuntimeException"
);
}
public void testCamelCaseTypePattern04() throws CoreException {
search("RUNTIMEEXCEPTION", TYPE, DECLARATIONS, SearchPattern.R_CAMELCASE_MATCH, getJavaSearchScope());
assertSearchResults(
- ""+ getExternalJCLPathString() + " java.lang.RuntimeException"
+ ""+ getSystemJsPathString() + " java.lang.RuntimeException"
);
}
@@ -3498,7 +3498,7 @@
search("R*E*", TYPE, DECLARATIONS, SearchPattern.R_CAMELCASE_MATCH, getJavaSearchScope());
assertSearchResults(
"src/a3/References.java a3.References [References]\n" +
- ""+ getExternalJCLPathString() + " java.lang.RuntimeException"
+ ""+ getSystemJsPathString() + " java.lang.RuntimeException"
);
}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/MementoTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/MementoTests.java
index 60885b9..c675ff6 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/MementoTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/MementoTests.java
@@ -65,7 +65,7 @@
restored);
}
protected String getEscapedExternalJCLPath() {
- String path = getExternalJCLPath().toString();
+ String path = getExternalJCLPath("").toString();
StringBuffer buffer = new StringBuffer();
for (int i = 0; i < path.length(); i++) {
char character = path.charAt(i);
@@ -81,13 +81,12 @@
"P",
new String[] {"src"},
new String[] {
- getExternalJCLPathString(),
+ getSystemJsPathString(),
"/P/lib",
"/P/lib/myLib.jar",
"/OtherProj/lib",
"/OtherProj/lib/myLib.jar",
- },
- "bin");
+ });
}
public void tearDownSuite() throws Exception {
this.deleteProject("P");
@@ -255,7 +254,7 @@
* Tests that a binary field in an external jar can be persisted and restored using its memento.
*/
public void testExternalJarBinaryFieldMemento() throws JavaScriptModelException {
- IType type = getClassFile("P", getExternalJCLPathString(), "p", "X.class").getType();
+ IType type = getClassFile("P", getSystemJsPathString(), "p", "X.class").getType();
IField field = type.getField("field");
assertMemento(
"=P/"+ getEscapedExternalJCLPath() + "<p(X.class[X^field",
@@ -265,7 +264,7 @@
* Tests that a inner binary type and field in an external jar can be persisted and restored using its memento.
*/
public void testExternalJarBinaryInnerTypeMemento() throws JavaScriptModelException {
- IType type = getClassFile("P", getExternalJCLPathString(), "p", "X$Inner.class").getType();
+ IType type = getClassFile("P", getSystemJsPathString(), "p", "X$Inner.class").getType();
assertMemento(
"=P/" + getEscapedExternalJCLPath() + "<p(X$Inner.class[Inner",
type);
@@ -274,7 +273,7 @@
* Tests that a binary method in an external jar can be persisted and restored using its memento.
*/
public void testExternalJarBinaryMethodMemento() throws JavaScriptModelException {
- IType type = getClassFile("P", getExternalJCLPathString(), "p", "X.class").getType();
+ IType type = getClassFile("P", getSystemJsPathString(), "p", "X.class").getType();
IFunction method = type.getFunction("foo", new String[] {"[Ljava.lang.String;"});
assertMemento(
"=P/" + getEscapedExternalJCLPath() + "<p(X.class[X~foo~\\[Ljava.lang.String;",
@@ -284,7 +283,7 @@
* Tests that a binary type in an external jar can be persisted and restored using its memento.
*/
public void testExternalJarBinaryTypeMemento() throws JavaScriptModelException {
- IType type = getClassFile("P", getExternalJCLPathString(), "p", "X.class").getType();
+ IType type = getClassFile("P", getSystemJsPathString(), "p", "X.class").getType();
assertMemento(
"=P/" + getEscapedExternalJCLPath() + "<p(X.class[X",
type);
@@ -491,7 +490,7 @@
*/
public void testPackageFragmentMemento2() throws CoreException {
try {
- createJavaProject("P1", new String[] {""}, "");
+ createJavaProject("P1", new String[] {""});
IPackageFragment pkg = getPackage("/P1/p");
assertMemento(
"=P1/<p",
@@ -516,7 +515,7 @@
*/
public void testPackageFragmentRootMemento2() throws CoreException {
try {
- IJavaScriptProject project = this.createJavaProject("P1", new String[] {""}, "");
+ IJavaScriptProject project = this.createJavaProject("P1", new String[] {""});
IPackageFragmentRoot root = project.getPackageFragmentRoot(project.getProject());
assertMemento(
"=P1/",
@@ -578,7 +577,7 @@
* can be persisted and restored using its memento.
*/
public void testPackageFragmentRootMemento7() throws CoreException {
- IPackageFragmentRoot root = getPackageFragmentRoot("P", getExternalJCLPathString());
+ IPackageFragmentRoot root = getPackageFragmentRoot("P", getSystemJsPathString());
assertMemento(
"=P/" + getEscapedExternalJCLPath() + "",
root);
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/NameLookupTests2.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/NameLookupTests2.java
index 090d892..c3124d8 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/NameLookupTests2.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/NameLookupTests2.java
@@ -50,8 +50,8 @@
}
public void testAddPackageFragmentRootAndPackageFrament() throws CoreException {
try {
- IJavaScriptProject p1 = createJavaProject("P1", new String[] {"src1"}, "bin");
- IJavaScriptProject p2 = createJavaProject("P2", new String[] {}, "");
+ IJavaScriptProject p1 = createJavaProject("P1", new String[] {"src1"});
+ IJavaScriptProject p2 = createJavaProject("P2", new String[] {});
IIncludePathEntry[] classpath =
new IIncludePathEntry[] {
JavaScriptCore.newProjectEntry(new Path("/P1"))
@@ -83,8 +83,8 @@
}
public void testAddPackageFragment() throws CoreException {
try {
- createJavaProject("P1", new String[] {"src1"}, "bin");
- IJavaScriptProject p2 = createJavaProject("P2", new String[] {}, "");
+ createJavaProject("P1", new String[] {"src1"});
+ IJavaScriptProject p2 = createJavaProject("P2", new String[] {});
IIncludePathEntry[] classpath =
new IIncludePathEntry[] {
JavaScriptCore.newProjectEntry(new Path("/P1"))
@@ -114,7 +114,7 @@
*/
public void testAddPackageFragment2() throws CoreException {
try {
- JavaProject project = (JavaProject)createJavaProject("P", new String[] {"src"}, "bin");
+ JavaProject project = (JavaProject)createJavaProject("P", new String[] {"src"});
createFolder("/P/src/p1");
IPackageFragment[] pkgs = getNameLookup(project).findPackageFragments("p1", false);
@@ -176,7 +176,7 @@
*/
public void testFindDefaultPackageFragmentInNonDefaultRoot() throws CoreException {
try {
- JavaProject project = (JavaProject)createJavaProject("P", new String[] {"src"}, "bin");
+ JavaProject project = (JavaProject)createJavaProject("P", new String[] {"src"});
IPackageFragment pkg = getNameLookup(project).findPackageFragment(new Path("/P/src"));
assertElementsEqual(
@@ -247,7 +247,7 @@
*/
public void testFindBinaryTypeWithSameNameAsMember() throws CoreException, IOException {
try {
- IJavaScriptProject project = createJavaProject("P", new String[] {}, new String[] {"/P/lib"}, new String[] {}, "bin");
+ IJavaScriptProject project = createJavaProject("P", new String[] {}, new String[] {"/P/lib"}, new String[] {});
createFolder("/P/lib/p");
createFile("/P/lib/p/X.class", "");
createFile("/P/lib/p/X$X.class", "");
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/NamingConventionTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/NamingConventionTests.java
index c335209..33a9219 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/NamingConventionTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/NamingConventionTests.java
@@ -39,7 +39,7 @@
public void setUp() throws Exception {
super.setUp();
- project = createJavaProject("P", new String[]{"src"}, "bin"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ project = createJavaProject("P", new String[]{"src"}); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
/**
* Cleanup after the previous test.
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/OptionTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/OptionTests.java
index 10f98f9..5c440e0 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/OptionTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/OptionTests.java
@@ -64,15 +64,13 @@
"A",
new String[] {}, // source folders
new String[] {}, // lib folders
- new String[] {}, // projects
- "");
+ new String[] {});
IJavaScriptProject projectB =
this.createJavaProject(
"B",
new String[] {}, // source folders
new String[] {}, // lib folders
- new String[] {}, // projects
- "");
+ new String[] {});
Hashtable options = new Hashtable();
options.put(JavaScriptCore.COMPILER_PB_DEPRECATION_IN_DEPRECATED_CODE, JavaScriptCore.DISABLED);
@@ -117,15 +115,13 @@
"A",
new String[] {}, // source folders
new String[] {}, // lib folders
- new String[] {}, // projects
- "");
+ new String[] {});
IJavaScriptProject projectB =
this.createJavaProject(
"B",
new String[] {}, // source folders
new String[] {}, // lib folders
- new String[] {}, // projects
- "");
+ new String[] {});
String globalEncoding = JavaScriptCore.getOption(JavaScriptCore.CORE_ENCODING);
@@ -159,15 +155,13 @@
"A",
new String[] {}, // source folders
new String[] {}, // lib folders
- new String[] {}, // projects
- "");
+ new String[] {});
IJavaScriptProject projectB =
this.createJavaProject(
"B",
new String[] {}, // source folders
new String[] {}, // lib folders
- new String[] {}, // projects
- "");
+ new String[] {});
Hashtable options = new Hashtable();
options.put(JavaScriptCore.COMPILER_PB_DEPRECATION_IN_DEPRECATED_CODE, JavaScriptCore.DISABLED);
@@ -211,15 +205,13 @@
"A",
new String[] {}, // source folders
new String[] {}, // lib folders
- new String[] {}, // projects
- "");
+ new String[] {});
IJavaScriptProject projectB =
this.createJavaProject(
"B",
new String[] {}, // source folders
new String[] {}, // lib folders
- new String[] {}, // projects
- "");
+ new String[] {});
Hashtable options = new Hashtable();
options.put(JavaScriptCore.COMPILER_PB_DEPRECATION_IN_DEPRECATED_CODE, JavaScriptCore.DISABLED);
@@ -264,15 +256,13 @@
"A",
new String[] {}, // source folders
new String[] {}, // lib folders
- new String[] {}, // projects
- "");
+ new String[] {});
IJavaScriptProject projectB =
this.createJavaProject(
"B",
new String[] {}, // source folders
new String[] {}, // lib folders
- new String[] {}, // projects
- "");
+ new String[] {});
String globalEncoding = JavaScriptCore.getOption(JavaScriptCore.CORE_ENCODING);
@@ -306,15 +296,13 @@
"A",
new String[] {}, // source folders
new String[] {}, // lib folders
- new String[] {}, // projects
- "");
+ new String[] {});
IJavaScriptProject projectB =
this.createJavaProject(
"B",
new String[] {}, // source folders
new String[] {}, // lib folders
- new String[] {}, // projects
- "");
+ new String[] {});
Hashtable options = new Hashtable();
options.put(JavaScriptCore.COMPILER_PB_DEPRECATION_IN_DEPRECATED_CODE, JavaScriptCore.DISABLED);
@@ -361,8 +349,7 @@
"A",
new String[] {}, // source folders
new String[] {}, // lib folders
- new String[] {}, // projects
- "");
+ new String[] {});
// Preferences preferences = projectA.getPreferences();
// preferences.addPropertyChangeListener(new TestPropertyListener());
IEclipsePreferences eclipsePreferences = projectA.getEclipsePreferences();
@@ -407,8 +394,7 @@
"A",
new String[] {}, // source folders
new String[] {}, // lib folders
- new String[] {}, // projects
- "");
+ new String[] {});
Hashtable options = new Hashtable();
options.put(JavaScriptCore.COMPILER_TASK_TAGS, "TODO:");
@@ -448,7 +434,7 @@
public void test09() throws CoreException {
try {
this.eventCount = 0;
- JavaProject projectA = (JavaProject) this.createJavaProject("A", new String[] {}, "");
+ JavaProject projectA = (JavaProject) this.createJavaProject("A", new String[] {});
// Preferences preferences = projectA.getPreferences();
// preferences.addPropertyChangeListener(new TestPropertyListener());
IEclipsePreferences eclipsePreferences = projectA.getEclipsePreferences();
@@ -467,7 +453,7 @@
// delete/create project A and verify that options are well reset
this.deleteProject("A");
- projectA = (JavaProject) this.createJavaProject("A", new String[] {}, "");
+ projectA = (JavaProject) this.createJavaProject("A", new String[] {});
assertEquals("projA:unexpected custom value for deprecation option", JavaScriptCore.getOption(JavaScriptCore.COMPILER_PB_DEPRECATION_IN_DEPRECATED_CODE), projectA.getOptions(true).get(JavaScriptCore.COMPILER_PB_DEPRECATION_IN_DEPRECATED_CODE));
assertEquals("projA:unexpected custom value for compliance option", JavaScriptCore.getOption(JavaScriptCore.COMPILER_COMPLIANCE), projectA.getOptions(true).get(JavaScriptCore.COMPILER_COMPLIANCE));
assertTrue("projA:preferences should not be reset", eclipsePreferences != projectA.getEclipsePreferences());
@@ -513,9 +499,9 @@
public void test12() throws CoreException {
IEclipsePreferences preferences = JavaModelManager.getJavaModelManager().getInstancePreferences();
try {
- IJavaScriptProject project = createJavaProject("P", new String[0], new String[] {"TEST"}, "");
+ IJavaScriptProject project = createJavaProject("P", new String[0], new String[] {"TEST"});
waitForAutoBuild();
- preferences.put(JavaModelManager.CP_VARIABLE_PREFERENCES_PREFIX+"TEST", getExternalJCLPathString());
+ preferences.put(JavaModelManager.CP_VARIABLE_PREFERENCES_PREFIX+"TEST", getSystemJsPathString());
assertMarkers("Unexpected markers", "", project);
} finally {
deleteProject("P");
@@ -533,8 +519,7 @@
"A",
new String[] {}, // source folders
new String[] {}, // lib folders
- new String[] {}, // projects
- "");
+ new String[] {});
// Store project eclipse prefs
IEclipsePreferences eclipsePreferences = projectA.getEclipsePreferences();
@@ -610,8 +595,7 @@
"P",
new String[] {}, // source folders
new String[] {}, // lib folders
- new String[] {}, // projects
- "");
+ new String[] {});
project.setOption(JavaScriptCore.COMPILER_SOURCE, JavaScriptCore.VERSION_1_4);
project.setOption(JavaScriptCore.COMPILER_SOURCE, JavaScriptCore.VERSION_1_3);
String option = project.getOption(JavaScriptCore.COMPILER_SOURCE, true);
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/OverflowingCacheTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/OverflowingCacheTests.java
index 85e173d..f28779a 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/OverflowingCacheTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/OverflowingCacheTests.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 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
@@ -307,7 +307,7 @@
classpath[i] = JavaScriptCore.newSourceEntry(new Path("/P/src" + i));
}
classpath[rootSize] = JavaScriptCore.newVariableEntry(new Path("JCL_LIB"), null, null);
- project.setRawIncludepath(classpath, new Path("/P/bin"), null);
+ project.setRawIncludepath(classpath, null);
// Open all roots
IJavaScriptElement[] roots = project.getChildren();
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ReconcilerStatementsRecoveryTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ReconcilerStatementsRecoveryTests.java
index f49b50b..290a3fd 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ReconcilerStatementsRecoveryTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ReconcilerStatementsRecoveryTests.java
@@ -129,7 +129,7 @@
super.setUpSuite();
// Create project with 1.4 compliance
- IJavaScriptProject project14 = createJavaProject("Reconciler", new String[] {"src"}, new String[] {"JCL_LIB"}, "bin");
+ IJavaScriptProject project14 = createJavaProject("Reconciler", new String[] {"src"}, new String[] {"JCL_LIB"});
createFolder("/Reconciler/src/p1");
createFolder("/Reconciler/src/p2");
createFile(
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ReconcilerTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ReconcilerTests.java
index 696a6df..fec5149 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ReconcilerTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ReconcilerTests.java
@@ -162,7 +162,7 @@
super.setUpSuite();
// Create project with 1.4 compliance
- IJavaScriptProject project14 = createJavaProject("Reconciler", new String[] {"src"}, new String[] {"JCL_LIB"}, "bin");
+ IJavaScriptProject project14 = createJavaProject("Reconciler", new String[] {"src"}, new String[] {"JCL_LIB"});
createFolder("/Reconciler/src/p1");
createFolder("/Reconciler/src/p2");
createFile(
@@ -275,10 +275,10 @@
public void testAccessRestriction() throws CoreException {
try {
- createJavaProject("P1", new String[] {"src"}, new String[] {"JCL_LIB"}, null, null, new String[0], null, null, new boolean[0], "bin", null, new String[][] {{"**/X.js"}}, null, "1.4");
+ createJavaProject("P1", new String[] {"src"}, new String[] {"JCL_LIB"}, null, null, new String[0], null, null, new boolean[0], new String[][] {{"**/X.js"}}, null, "1.4");
createFile("/P1/src/X.js", "function foo() {}");
- createJavaProject("P2", new String[] {"src"}, new String[] {"JCL_LIB"}, new String[] {"/P1"}, "bin");
+ createJavaProject("P2", new String[] {"src"}, new String[] {"JCL_LIB"}, new String[] {"/P1"});
setUpWorkingCopy("/P2/src/Y.js", "foo();");
assertProblems(
"Unexpected problems",
@@ -2873,7 +2873,7 @@
public void testBug36032a() throws CoreException, InterruptedException {
try {
// Resources creation
- createJavaProject("P", new String[] {""}, new String[] {"JCL_LIB"}, "bin");
+ createJavaProject("P", new String[] {""}, new String[] {"JCL_LIB"});
String source =
"public class Test {\n" +
" public static void main(String[] args) {\n" +
@@ -2923,7 +2923,7 @@
public void testBug36032b() throws CoreException, InterruptedException {
try {
// Resources creation
- createJavaProject("P", new String[] {""}, new String[] {"JCL_LIB"}, "bin");
+ createJavaProject("P", new String[] {""}, new String[] {"JCL_LIB"});
String source =
"public class Test {\n" +
" public static void main(String[] args) {\n" +
@@ -2987,7 +2987,7 @@
public void testBug36032c() throws CoreException, InterruptedException {
try {
// Create first project
- createJavaProject("P1", new String[] {""}, new String[] {"JCL_LIB"}, "bin");
+ createJavaProject("P1", new String[] {""}, new String[] {"JCL_LIB"});
createFolder("/P1/test");
createFile(
"/P1/test/Foo.js",
@@ -3005,7 +3005,7 @@
);
// Create second project
- createJavaProject("P2", new String[] {""}, new String[] {"JCL_LIB"}, new String[] { "/P1" }, "bin");
+ createJavaProject("P2", new String[] {""}, new String[] {"JCL_LIB"}, new String[] { "/P1" });
String source =
"package test;\n" +
"public class Test2 {\n" +
@@ -3038,13 +3038,13 @@
public void testBug118823() throws CoreException, InterruptedException, IOException {
try {
// Resources creation
- createJavaProject("P1", new String[] {""}, new String[] {"JCL_LIB"}, "bin");
+ createJavaProject("P1", new String[] {""}, new String[] {"JCL_LIB"});
String source = "class Test {}\n";
createFile(
"/P1/Test.js",
source
);
- createJavaProject("P2", new String[] {""}, new String[] {"JCL_LIB"}, new String[] { "/P1" }, "bin");
+ createJavaProject("P2", new String[] {""}, new String[] {"JCL_LIB"}, new String[] { "/P1" });
String source2 =
"class A {\n" +
" Secondary s;\n" +
@@ -3120,13 +3120,13 @@
public void testBug118823b() throws CoreException, InterruptedException {
try {
// Resources creation
- createJavaProject("P1", new String[] {""}, new String[] {"JCL_LIB"}, "bin");
+ createJavaProject("P1", new String[] {""}, new String[] {"JCL_LIB"});
String source1 = "class Test {}\n";
createFile(
"/P1/Test.js",
source1
);
- createJavaProject("P2", new String[] {""}, new String[] {"JCL_LIB"}, new String[] { "/P1" }, "bin");
+ createJavaProject("P2", new String[] {""}, new String[] {"JCL_LIB"}, new String[] { "/P1" });
String source2 =
"class A {\n" +
" Secondary s;\n" +
@@ -3188,13 +3188,13 @@
public void testBug118823c() throws CoreException, InterruptedException {
try {
// Resources creation
- createJavaProject("P1", new String[] {""}, new String[] {"JCL_LIB"}, "bin");
+ createJavaProject("P1", new String[] {""}, new String[] {"JCL_LIB"});
String source1 = "class Test {}\n";
createFile(
"/P1/Test.js",
source1
);
- createJavaProject("P2", new String[] {""}, new String[] {"JCL_LIB"}, new String[] { "/P1" }, "bin");
+ createJavaProject("P2", new String[] {""}, new String[] {"JCL_LIB"}, new String[] { "/P1" });
String source2 =
"class A {\n" +
" Secondary s;\n" +
@@ -3270,13 +3270,13 @@
// Resources creation
String sources[] = new String[3];
char[] sourcesAsCharArrays[] = new char[3][];
- createJavaProject("P1", new String[] {""}, new String[] {"JCL_LIB"}, "bin");
+ createJavaProject("P1", new String[] {""}, new String[] {"JCL_LIB"});
sources[0] = "class X {}\n";
createFile(
"/P1/X.js",
sources[0]
);
- createJavaProject("P2", new String[] {""}, new String[] {"JCL_LIB"}, new String[] { "/P1" }, "bin");
+ createJavaProject("P2", new String[] {""}, new String[] {"JCL_LIB"}, new String[] { "/P1" });
sources[1] =
"interface I {\n" +
" void foo();\n" +
@@ -3286,7 +3286,7 @@
"/P2/I.js",
sources[1]
);
- createJavaProject("P3", new String[] {""}, new String[] {"JCL_LIB"}, new String[] { "/P2" }, "bin");
+ createJavaProject("P3", new String[] {""}, new String[] {"JCL_LIB"}, new String[] { "/P2" });
sources[2] =
"class Y implements I {\n" +
" // public void foo() { }\n" +
@@ -3344,13 +3344,13 @@
// Resources creation
String sources[] = new String[3];
char[] sourcesAsCharArrays[] = new char[3][];
- createJavaProject("P1", new String[] {""}, new String[] {"JCL_LIB"}, "bin");
+ createJavaProject("P1", new String[] {""}, new String[] {"JCL_LIB"});
sources[0] = "class X {}\n";
createFile(
"/P1/X.js",
sources[0]
);
- createJavaProject("P2", new String[] {""}, new String[] {"JCL_LIB"}, new String[] { "/P1" }, "bin");
+ createJavaProject("P2", new String[] {""}, new String[] {"JCL_LIB"}, new String[] { "/P1" });
sources[1] =
"interface I {\n" +
" void foo();\n" +
@@ -3360,7 +3360,7 @@
"/P2/I.js",
sources[1]
);
- createJavaProject("P3", new String[] {""}, new String[] {"JCL_LIB"}, new String[] { "/P1" /* compare with test1001 */, "/P2" }, "bin");
+ createJavaProject("P3", new String[] {""}, new String[] {"JCL_LIB"}, new String[] { "/P1" /* compare with test1001 */, "/P2" });
sources[2] =
"class Y implements I {\n" +
" // public void foo() { }\n" +
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/RenameTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/RenameTests.java
index a72fce8..0f12206 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/RenameTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/RenameTests.java
@@ -137,7 +137,7 @@
public void setUp() throws Exception {
super.setUp();
- this.createJavaProject("P", new String[] {"src"}, "bin");
+ this.createJavaProject("P", new String[] {"src"});
this.createFile(
"/P/src/X.js",
"public class X {\n" +
@@ -161,7 +161,7 @@
public void setUpSuite() throws Exception {
super.setUpSuite();
- IJavaScriptProject project = this.createJavaProject("BinaryProject", new String[] {"src"}, new String[] {"JCL_LIB"}, "lib");
+ IJavaScriptProject project = this.createJavaProject("BinaryProject", new String[] {"src"}, new String[] {"JCL_LIB"});
this.createFile(
"/BinaryProject/src/X.js",
"public class X {\n" +
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/RootManipulationsTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/RootManipulationsTests.java
index aa09f93..dfb44f6 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/RootManipulationsTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/RootManipulationsTests.java
@@ -131,8 +131,8 @@
*/
public void testCopySourceFolder1() throws CoreException {
try {
- this.createJavaProject("P1", new String[] {"src"}, "bin");
- this.createJavaProject("P2", new String[] {}, "bin");
+ this.createJavaProject("P1", new String[] {"src"});
+ this.createJavaProject("P2", new String[] {});
this.createFolder("/P1/src/p");
this.createFile(
"/P1/src/p/X.js",
@@ -163,8 +163,8 @@
*/
public void testCopySourceFolder2() throws CoreException {
try {
- this.createJavaProject("P1", new String[] {"src"}, "bin");
- this.createJavaProject("P2", new String[] {}, "bin");
+ this.createJavaProject("P1", new String[] {"src"});
+ this.createJavaProject("P2", new String[] {});
this.createFolder("/P1/src/p");
this.createFile(
"/P1/src/p/X.js",
@@ -195,9 +195,9 @@
*/
public void testCopySourceFolder3() throws CoreException {
try {
- IJavaScriptProject p1 = this.createJavaProject("P1", new String[] {}, "bin");
+ IJavaScriptProject p1 = this.createJavaProject("P1", new String[] {});
p1.setRawIncludepath(createClasspath(new String[] {"/P1/src1", "src2/**", "/P1/src1/src2", ""}, false/*no inclusion*/, true/*exclusion*/), null);
- this.createJavaProject("P2", new String[] {}, "bin");
+ this.createJavaProject("P2", new String[] {});
this.createFolder("/P1/src1/p");
this.createFile(
"/P1/src1/p/X.js",
@@ -237,8 +237,8 @@
*/
public void testCopySourceFolder4() throws CoreException {
try {
- this.createJavaProject("P1", new String[] {"src"}, "bin");
- IJavaScriptProject p2 = this.createJavaProject("P2", new String[] {"src1", "src2"}, "bin");
+ this.createJavaProject("P1", new String[] {"src"});
+ IJavaScriptProject p2 = this.createJavaProject("P2", new String[] {"src1", "src2"});
IPackageFragmentRoot root = this.getPackageFragmentRoot("/P1/src");
// insert first
@@ -309,8 +309,8 @@
*/
public void testCopySourceFolder5() throws CoreException {
try {
- this.createJavaProject("P1", new String[] {"src"}, "bin");
- IJavaScriptProject p2 = this.createJavaProject("P2", new String[] {"src"}, "bin");
+ this.createJavaProject("P1", new String[] {"src"});
+ IJavaScriptProject p2 = this.createJavaProject("P2", new String[] {"src"});
this.createFolder("/P1/src/p");
this.createFile(
"/P1/src/p/X.js",
@@ -350,7 +350,7 @@
*/
public void testCopySourceFolder6() throws CoreException {
try {
- IJavaScriptProject project = this.createJavaProject("P", new String[] {"src"}, "bin");
+ IJavaScriptProject project = this.createJavaProject("P", new String[] {"src"});
this.createFolder("/P/src/p");
this.createFile(
"/P/src/p/X.js",
@@ -398,8 +398,8 @@
*/
public void testFailCopySourceFolder1() throws CoreException {
try {
- this.createJavaProject("P1", new String[] {"src"}, "bin");
- this.createJavaProject("P2", new String[] {"src"}, "bin");
+ this.createJavaProject("P1", new String[] {"src"});
+ this.createJavaProject("P2", new String[] {"src"});
IPackageFragmentRoot root = this.getPackageFragmentRoot("/P1/src");
try {
@@ -421,8 +421,8 @@
*/
public void testFailCopySourceFolder2() throws CoreException {
try {
- this.createJavaProject("P1", new String[] {"src"}, "bin");
- this.createJavaProject("P2", new String[] {"src"}, "bin");
+ this.createJavaProject("P1", new String[] {"src"});
+ this.createJavaProject("P2", new String[] {"src"});
this.deleteFolder("/P2/src");
IPackageFragmentRoot root = this.getPackageFragmentRoot("/P1/src");
@@ -444,7 +444,7 @@
*/
public void testDeleteJarFile1() throws CoreException {
try {
- IJavaScriptProject project = this.createJavaProject("P", new String[] {"src"}, new String[] {"/P/myLib.jar"}, "bin");
+ IJavaScriptProject project = this.createJavaProject("P", new String[] {"src"}, new String[] {"/P/myLib.jar"});
this.createFile("/P/myLib.jar", "");
IPackageFragmentRoot root = this.getPackageFragmentRoot("/P/myLib.jar");
@@ -475,15 +475,15 @@
*/
public void testDeleteJarFile3() throws CoreException {
try {
- IJavaScriptProject project = this.createJavaProject("P", new String[] {"src"}, new String[] {getExternalJCLPathString()}, "bin");
+ IJavaScriptProject project = this.createJavaProject("P", new String[] {"src"}, new String[] {getSystemJsPathString()});
- IPackageFragmentRoot root = project.getPackageFragmentRoot(getExternalJCLPathString());
+ IPackageFragmentRoot root = project.getPackageFragmentRoot(getSystemJsPathString());
this.startDeltas();
this.delete(root);
assertDeltas(
"Unexpected delta",
"P[*]: {CHILDREN | CONTENT | CLASSPATH CHANGED}\n" +
- " " + getExternalJCLPathString() + "[*]: {REMOVED FROM CLASSPATH}\n" +
+ " " + getSystemJsPathString() + "[*]: {REMOVED FROM CLASSPATH}\n" +
" ResourceDelta(/P/.classpath)[*]"
);
assertJavaProject(
@@ -504,9 +504,9 @@
*/
public void testDeleteJarFile2() throws CoreException {
try {
- IJavaScriptProject p1 = this.createJavaProject("P1", new String[] {"src"}, new String[] {"/P1/myLib.jar"}, "bin");
+ IJavaScriptProject p1 = this.createJavaProject("P1", new String[] {"src"}, new String[] {"/P1/myLib.jar"});
this.createFile("/P1/myLib.jar", "");
- IJavaScriptProject p2 = this.createJavaProject("P2", new String[] {"src"}, new String[] {"/P1/myLib.jar"}, "bin");
+ IJavaScriptProject p2 = this.createJavaProject("P2", new String[] {"src"}, new String[] {"/P1/myLib.jar"});
IPackageFragmentRoot root = this.getPackageFragmentRoot("/P1/myLib.jar");
this.startDeltas();
@@ -546,7 +546,7 @@
*/
public void testDeleteSourceFolder1() throws CoreException {
try {
- IJavaScriptProject project = this.createJavaProject("P", new String[] {"src"}, "bin");
+ IJavaScriptProject project = this.createJavaProject("P", new String[] {"src"});
this.createFolder("/P/src/p");
this.createFile(
"/P/src/p/X.js",
@@ -579,7 +579,7 @@
*/
public void testDeleteSourceFolder2() throws CoreException {
try {
- IJavaScriptProject project = this.createJavaProject("P", new String[] {}, "bin");
+ IJavaScriptProject project = this.createJavaProject("P", new String[] {});
project.setRawIncludepath(createClasspath(new String[] {"/P/src1", "src2/**", "/P/src1/src2", ""}, false/*no inclusion*/, true/*exclusion*/), null);
IFolder folder = this.createFolder("/P/src1/p");
IFile file = this.createFile(
@@ -632,8 +632,8 @@
*/
public void testMoveSourceFolder1() throws CoreException {
try {
- IJavaScriptProject p1 = this.createJavaProject("P1", new String[] {"src"}, "bin");
- IJavaScriptProject p2 = this.createJavaProject("P2", new String[] {}, "bin");
+ IJavaScriptProject p1 = this.createJavaProject("P1", new String[] {"src"});
+ IJavaScriptProject p2 = this.createJavaProject("P2", new String[] {});
this.createFolder("/P1/src/p");
this.createFile(
"/P1/src/p/X.js",
@@ -679,8 +679,8 @@
*/
public void testMoveSourceFolder2() throws CoreException {
try {
- IJavaScriptProject p1 = this.createJavaProject("P1", new String[] {"src"}, "bin");
- IJavaScriptProject p2 = this.createJavaProject("P2", new String[] {}, "bin");
+ IJavaScriptProject p1 = this.createJavaProject("P1", new String[] {"src"});
+ IJavaScriptProject p2 = this.createJavaProject("P2", new String[] {});
this.createFolder("/P1/src/p");
this.createFile(
"/P1/src/p/X.js",
@@ -728,9 +728,9 @@
*/
public void testMoveSourceFolder3() throws CoreException {
try {
- IJavaScriptProject p1 = this.createJavaProject("P1", new String[] {}, "bin");
+ IJavaScriptProject p1 = this.createJavaProject("P1", new String[] {});
p1.setRawIncludepath(createClasspath(new String[] {"/P1/src1", "src2/**", "/P1/src1/src2", ""}, false/*no inclusion*/, true/*exclusion*/), null);
- IJavaScriptProject p2 = this.createJavaProject("P2", new String[] {}, "bin");
+ IJavaScriptProject p2 = this.createJavaProject("P2", new String[] {});
this.createFolder("/P1/src1/p");
this.createFile(
"/P1/src1/p/X.js",
@@ -792,8 +792,8 @@
*/
public void testMoveSourceFolder4() throws CoreException {
try {
- IJavaScriptProject p1 = this.createJavaProject("P1", new String[] {"src"}, "bin");
- IJavaScriptProject p2 = this.createJavaProject("P2", new String[] {"src1", "src2"}, "bin");
+ IJavaScriptProject p1 = this.createJavaProject("P1", new String[] {"src"});
+ IJavaScriptProject p2 = this.createJavaProject("P2", new String[] {"src1", "src2"});
IPackageFragmentRoot root = this.getPackageFragmentRoot("/P1/src");
// insert first
@@ -839,8 +839,8 @@
*/
public void testMoveSourceFolder5() throws CoreException {
try {
- IJavaScriptProject p1 = this.createJavaProject("P1", new String[] {"src"}, "bin");
- IJavaScriptProject p2 = this.createJavaProject("P2", new String[] {"src1", "src2"}, "bin");
+ IJavaScriptProject p1 = this.createJavaProject("P1", new String[] {"src"});
+ IJavaScriptProject p2 = this.createJavaProject("P2", new String[] {"src1", "src2"});
IPackageFragmentRoot root = this.getPackageFragmentRoot("/P1/src");
// insert in the middle
@@ -885,8 +885,8 @@
*/
public void testMoveSourceFolder6() throws CoreException {
try {
- IJavaScriptProject p1 = this.createJavaProject("P1", new String[] {"src"}, "bin");
- IJavaScriptProject p2 = this.createJavaProject("P2", new String[] {"src1", "src2"}, "bin");
+ IJavaScriptProject p1 = this.createJavaProject("P1", new String[] {"src"});
+ IJavaScriptProject p2 = this.createJavaProject("P2", new String[] {"src1", "src2"});
IPackageFragmentRoot root = this.getPackageFragmentRoot("/P1/src");
// insert last
@@ -929,7 +929,7 @@
*/
public void testRenameSourceFolder1() throws CoreException {
try {
- IJavaScriptProject project = this.createJavaProject("P", new String[] {"src1"}, "bin");
+ IJavaScriptProject project = this.createJavaProject("P", new String[] {"src1"});
this.createFolder("/P/src1/p");
this.createFile(
"/P/src1/p/X.js",
@@ -1030,7 +1030,7 @@
*/
public void testRenameSourceFolder2() throws CoreException {
try {
- IJavaScriptProject project = this.createJavaProject("P", new String[] {"src1", "src2", "src3"}, "bin");
+ IJavaScriptProject project = this.createJavaProject("P", new String[] {"src1", "src2", "src3"});
// rename src1
IPackageFragmentRoot root = this.getPackageFragmentRoot("/P/src1");
@@ -1111,7 +1111,7 @@
*/
public void testRenameJarFile1() throws CoreException {
try {
- IJavaScriptProject project = this.createJavaProject("P", new String[] {"src"}, new String[] {"/P/myLib.jar"}, "bin");
+ IJavaScriptProject project = this.createJavaProject("P", new String[] {"src"}, new String[] {"/P/myLib.jar"});
this.createFile("/P/myLib.jar", "");
IPackageFragmentRoot root = this.getPackageFragmentRoot("/P/myLib.jar");
@@ -1143,9 +1143,9 @@
*/
public void testRenameJarFile2() throws CoreException {
try {
- IJavaScriptProject p1 = this.createJavaProject("P1", new String[] {"src"}, new String[] {"/P1/myLib.jar"}, "bin");
+ IJavaScriptProject p1 = this.createJavaProject("P1", new String[] {"src"}, new String[] {"/P1/myLib.jar"});
this.createFile("/P1/myLib.jar", "");
- IJavaScriptProject p2 = this.createJavaProject("P2", new String[] {"src"}, new String[] {"/P1/myLib.jar"}, "bin");
+ IJavaScriptProject p2 = this.createJavaProject("P2", new String[] {"src"}, new String[] {"/P1/myLib.jar"});
IPackageFragmentRoot root = this.getPackageFragmentRoot("/P1/myLib.jar");
this.startDeltas();
@@ -1189,7 +1189,7 @@
*/
public void testRenameJarFile3() throws CoreException {
try {
- IJavaScriptProject project = this.createJavaProject("P", new String[] {"src"}, new String[] {"/P/myLib1.jar", "/P/myLib2.jar"}, "bin");
+ IJavaScriptProject project = this.createJavaProject("P", new String[] {"src"}, new String[] {"/P/myLib1.jar", "/P/myLib2.jar"});
this.createFile("/P/myLib1.jar", "");
this.createFile("/P/myLib2.jar", "");
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/SearchTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/SearchTests.java
index 9832a04..dcf5641 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/SearchTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/SearchTests.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 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
@@ -267,7 +267,7 @@
*/
public void testChangeClasspath2() throws CoreException {
try {
- final IJavaScriptProject project = createJavaProject("P1", new String[] {""}, "bin");
+ final IJavaScriptProject project = createJavaProject("P1", new String[] {""});
createFile(
"/P1/X.js",
"function bar() {\n" +
@@ -330,7 +330,7 @@
indexManager.disable();
JavaScriptCore.run(new IWorkspaceRunnable() {
public void run(IProgressMonitor monitor) throws CoreException {
- createJavaProject("P1", new String[] {}, new String[] {"/P1/jclMin.jar"}, "bin");
+ createJavaProject("P1", new String[] {}, new String[] {"/P1/jclMin.jar"});
createFile("/P1/jclMin.jar", EMPTY_JAR);
}
}, null);
@@ -379,7 +379,7 @@
monitor.sem.acquire(30000); // wait 30s max
// change jar contents
- getFile("/P1/jclMin.jar").setContents(new FileInputStream(getExternalJCLPathString()), IResource.NONE, null);
+ getFile("/P1/jclMin.jar").setContents(new FileInputStream(getSystemJsPathString()), IResource.NONE, null);
// resume waiting job
job.runningSem.release();
@@ -432,7 +432,7 @@
*/
public void _testProjectLib() throws CoreException { // TODO disabled due to transcient failures (see bug 84164)
try {
- IJavaScriptProject javaProject = createJavaProject("P1", new String[0], new String[] {"/P1"}, "bin");
+ IJavaScriptProject javaProject = createJavaProject("P1", new String[0], new String[] {"/P1"});
createClassFile("/P1", "X.class", "public class X {}");
IProject project = javaProject.getProject();
project.close(null);
@@ -460,7 +460,6 @@
IJavaScriptProject project = createJavaProject("P1");
project.setRawIncludepath(
createClasspath(new String[] {"/P1/src1", "src2/", "/P1/src1/src2", ""}, false/*no inclusion*/, true/*exclusion*/),
- new Path("/P1/bin"),
null);
createFolder("/P1/src1/src2");
createFile(
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/SortCompilationUnitElementsTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/SortCompilationUnitElementsTests.java
index 8532f86..1b1cde8 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/SortCompilationUnitElementsTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/SortCompilationUnitElementsTests.java
@@ -43,7 +43,7 @@
public void setUpSuite() throws Exception {
super.setUpSuite();
- this.createJavaProject("P", new String[] {"src"}, new String[] {getExternalJCLPathString()}, "bin", "1.5"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ this.createJavaProject("P", new String[] {"src"}, new String[] {getSystemJsPathString()}, "bin", "1.5"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
this.createFolder("/P/src/p"); //$NON-NLS-1$
}
/** @deprecated */
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ThreadSafetyTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ThreadSafetyTests.java
index 5119f31..c911ec1 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ThreadSafetyTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ThreadSafetyTests.java
@@ -43,8 +43,7 @@
final IJavaScriptProject project = this.createJavaProject(
"P",
new String[] {},
- new String[] {"org.eclipse.wst.jsdt.core.tests.model.TEST_CONTAINER"},
- "");
+ new String[] {"org.eclipse.wst.jsdt.core.tests.model.TEST_CONTAINER"});
// simulate state on startup (flush containers, and discard their previous values)
waitUntilIndexesReady();
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/TypeHierarchyNotificationTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/TypeHierarchyNotificationTests.java
index 68c7975..8d06ea4 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/TypeHierarchyNotificationTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/TypeHierarchyNotificationTests.java
@@ -328,7 +328,7 @@
assertCreation(newCU3);
this.assertOneChange(h);
h.refresh(null);
- IType throwableClass = getClassFile("TypeHierarchyNotification", getExternalJCLPathString(), "java.lang", "Throwable.class").getType();
+ IType throwableClass = getClassFile("TypeHierarchyNotification", getSystemJsPathString(), "java.lang", "Throwable.class").getType();
assertEquals("Superclass of Z3 should be java.lang.Throwable", throwableClass, h.getSuperclass(newCU3.getType("Z3")));
} finally {
// cleanup
@@ -384,7 +384,7 @@
ITypeHierarchy h = type.newTypeHierarchy(javaProject, null);
try {
- this.createJavaProject("Other", new String[] {"src"}, "bin");
+ this.createJavaProject("Other", new String[] {"src"});
h.addTypeHierarchyChangedListener(this);
@@ -676,7 +676,7 @@
);
h = getCompilationUnit("/P1/p/X.js").getType("X").newTypeHierarchy(null);
h.addTypeHierarchyChangedListener(this);
- createJavaProject("P2", new String[] {""}, new String[0], new String[] {"/P1"}, "");
+ createJavaProject("P2", new String[] {""}, new String[0], new String[] {"/P1"});
assertOneChange(h);
} finally {
if (h != null)
@@ -1025,7 +1025,7 @@
*/
public void testRemoveExternalProject() throws CoreException {
try {
- this.createJavaProject("External", new String[] {""}, new String[] {"JCL_LIB"}, new String[]{"/TypeHierarchyNotification"}, "");
+ this.createJavaProject("External", new String[] {""}, new String[] {"JCL_LIB"}, new String[]{"/TypeHierarchyNotification"});
this.createFolder("/External/p");
this.createFile("/External/p/Y.js", "package p; public class Y extends X {}");
IJavaScriptUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p", "X.js");
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/TypeHierarchyTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/TypeHierarchyTests.java
index 6a0ba34..c1280d0 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/TypeHierarchyTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/TypeHierarchyTests.java
@@ -181,7 +181,7 @@
"Focus: <anonymous #1> [in <initializer #1> [in A [in A.java [in p7 [in src [in TypeHierarchy]]]]]]\n" +
"Super types:\n" +
" X [in X.java [in p7 [in src [in TypeHierarchy]]]]\n" +
- " Object [in Object.class [in java.lang [in "+ getExternalJCLPathString() + "]]]\n" +
+ " Object [in Object.class [in java.lang [in "+ getSystemJsPathString() + "]]]\n" +
"Sub types:\n",
hierarchy);
}
@@ -196,7 +196,7 @@
"Focus: <anonymous #1> [in <initializer #2> [in A [in A.java [in p7 [in src [in TypeHierarchy]]]]]]\n" +
"Super types:\n" +
" X [in X.java [in p7 [in src [in TypeHierarchy]]]]\n" +
- " Object [in Object.class [in java.lang [in "+ getExternalJCLPathString() + "]]]\n" +
+ " Object [in Object.class [in java.lang [in "+ getSystemJsPathString() + "]]]\n" +
"Sub types:\n",
hierarchy);
}
@@ -211,7 +211,7 @@
"Focus: <anonymous #1> [in field1 [in A [in A.java [in p7 [in src [in TypeHierarchy]]]]]]\n" +
"Super types:\n" +
" X [in X.java [in p7 [in src [in TypeHierarchy]]]]\n" +
- " Object [in Object.class [in java.lang [in "+ getExternalJCLPathString() + "]]]\n" +
+ " Object [in Object.class [in java.lang [in "+ getSystemJsPathString() + "]]]\n" +
"Sub types:\n",
hierarchy);
}
@@ -226,7 +226,7 @@
"Focus: <anonymous #1> [in field2 [in A [in A.java [in p7 [in src [in TypeHierarchy]]]]]]\n" +
"Super types:\n" +
" X [in X.java [in p7 [in src [in TypeHierarchy]]]]\n" +
- " Object [in Object.class [in java.lang [in "+ getExternalJCLPathString() + "]]]\n" +
+ " Object [in Object.class [in java.lang [in "+ getSystemJsPathString() + "]]]\n" +
"Sub types:\n",
hierarchy);
type = typeA.getField("field2").getType("", 2);
@@ -235,7 +235,7 @@
"Focus: <anonymous #2> [in field2 [in A [in A.java [in p7 [in src [in TypeHierarchy]]]]]]\n" +
"Super types:\n" +
" X [in X.java [in p7 [in src [in TypeHierarchy]]]]\n" +
- " Object [in Object.class [in java.lang [in "+ getExternalJCLPathString() + "]]]\n" +
+ " Object [in Object.class [in java.lang [in "+ getSystemJsPathString() + "]]]\n" +
"Sub types:\n",
hierarchy);
}
@@ -250,7 +250,7 @@
"Focus: <anonymous #1> [in foo() [in A [in A.java [in p7 [in src [in TypeHierarchy]]]]]]\n" +
"Super types:\n" +
" X [in X.java [in p7 [in src [in TypeHierarchy]]]]\n" +
- " Object [in Object.class [in java.lang [in "+ getExternalJCLPathString() + "]]]\n" +
+ " Object [in Object.class [in java.lang [in "+ getSystemJsPathString() + "]]]\n" +
"Sub types:\n",
hierarchy);
}
@@ -266,7 +266,7 @@
"Focus: <anonymous #1> [in foo() [in X [in X.java [in p8 [in src [in TypeHierarchy]]]]]]\n" +
"Super types:\n" +
" X [in X.java [in p8 [in src [in TypeHierarchy]]]]\n" +
- " Object [in Object.class [in java.lang [in "+ getExternalJCLPathString() + "]]]\n" +
+ " Object [in Object.class [in java.lang [in "+ getSystemJsPathString() + "]]]\n" +
"Sub types:\n",
hierarchy);
}
@@ -328,7 +328,7 @@
assertHierarchyEquals(
"Focus: Member [in X [in X.java [in q7 [in src [in TypeHierarchy]]]]]\n" +
"Super types:\n" +
- " Object [in Object.class [in java.lang [in "+ getExternalJCLPathString() + "]]]\n" +
+ " Object [in Object.class [in java.lang [in "+ getSystemJsPathString() + "]]]\n" +
"Sub types:\n" +
" <anonymous #1> [in foo(X) [in Y [in X.java [in q7 [in src [in TypeHierarchy]]]]]]\n",
hierarchy);
@@ -362,7 +362,7 @@
*/
public void testBinaryInWrongPackage() throws CoreException {
try {
- createJavaProject("P", new String[] {"src"}, new String[] {"JCL_LIB", "lib"}, "bin");
+ createJavaProject("P", new String[] {"src"}, new String[] {"JCL_LIB", "lib"});
createFolder("/P/src/p");
createFile(
"/P/src/p/X.js",
@@ -394,7 +394,7 @@
assertHierarchyEquals(
"Focus: X48459 [in X48459.java [in p48459.p1 [in src [in TypeHierarchy]]]]\n" +
"Super types:\n" +
- " Object [in Object.class [in java.lang [in "+ getExternalJCLPathString() + "]]]\n" +
+ " Object [in Object.class [in java.lang [in "+ getSystemJsPathString() + "]]]\n" +
"Sub types:\n" +
" <anonymous #1> [in foo [in Z48459 [in Z48459.java [in p48459.p1 [in src [in TypeHierarchy]]]]]]\n" +
" Y48459 [in Y48459.class [in p48459.p2 [in lib48459 [in TypeHierarchy]]]]\n",
@@ -489,13 +489,13 @@
new HashMap(),
externalJar2
);
- IJavaScriptProject project = createJavaProject("P", new String[] {}, new String[] {"JCL_LIB", externalJar1, externalJar2}, "");
+ IJavaScriptProject project = createJavaProject("P", new String[] {}, new String[] {"JCL_LIB", externalJar1, externalJar2});
IType focus = project.getPackageFragmentRoot(externalJar2).getPackageFragment("p").getClassFile("Y.class").getType();
assertHierarchyEquals(
"Focus: Y [in Y.class [in p [in " + externalJar2 + "]]]\n" +
"Super types:\n" +
" X [in X.class [in p [in " + externalJar1 + "]]]\n" +
- " Object [in Object.class [in java.lang [in "+ getExternalJCLPathString() + "]]]\n" +
+ " Object [in Object.class [in java.lang [in "+ getSystemJsPathString() + "]]]\n" +
"Sub types:\n",
focus.newTypeHierarchy(null)
);
@@ -533,12 +533,12 @@
new HashMap(),
externalJar
);
- IJavaScriptProject project = createJavaProject("P", new String[] {}, new String[] {"JCL_LIB", externalJar}, "");
+ IJavaScriptProject project = createJavaProject("P", new String[] {}, new String[] {"JCL_LIB", externalJar});
IType focus = project.getPackageFragmentRoot(externalJar).getPackageFragment("p").getClassFile("X.class").getType();
assertHierarchyEquals(
"Focus: X [in X.class [in p [in " + externalJar + "]]]\n" +
"Super types:\n" +
- " Object [in Object.class [in java.lang [in "+ getExternalJCLPathString() + "]]]\n" +
+ " Object [in Object.class [in java.lang [in "+ getSystemJsPathString() + "]]]\n" +
"Sub types:\n" +
" <anonymous> [in Y$1.class [in p [in " + externalJar + "]]]\n",
focus.newTypeHierarchy(null)
@@ -577,7 +577,7 @@
assertTrue("X must be included", this.typeHierarchy.contains(type));
// root class
- cf = getClassFile("TypeHierarchy", getExternalJCLPathString(), "java.lang", "Object.class");
+ cf = getClassFile("TypeHierarchy", getSystemJsPathString(), "java.lang", "Object.class");
type = cf.getType();
assertTrue("Object must be included", this.typeHierarchy.contains(type));
@@ -613,9 +613,9 @@
*/
public void testEfficiencyMultipleProjects() throws CoreException {
try {
- createJavaProject("P1", new String[] {""}, new String[] {"JCL_LIB"}, "");
- createJavaProject("P2", new String[] {""}, new String[] {"JCL_LIB"}, new String[] {"/P1"}, "");
- createJavaProject("P3", new String[] {""}, new String[] {"JCL_LIB"}, new String[] {"/P1"}, "");
+ createJavaProject("P1", new String[] {""}, new String[] {"JCL_LIB"});
+ createJavaProject("P2", new String[] {""}, new String[] {"JCL_LIB"}, new String[] {"/P1"});
+ createJavaProject("P3", new String[] {""}, new String[] {"JCL_LIB"}, new String[] {"/P1"});
createFile("/P1/X.js", "public class X {}");
createFile("/P3/Y.js", "public class Y extends X {}");
createFile("/P3/Z.js", "public class Z extends X {}");
@@ -652,7 +652,7 @@
assertHierarchyEquals(
"Focus: X [in X.java [in q4 [in src [in TypeHierarchy]]]]\n" +
"Super types:\n" +
- " Object [in Object.class [in java.lang [in "+ getExternalJCLPathString() + "]]]\n" +
+ " Object [in Object.class [in java.lang [in "+ getSystemJsPathString() + "]]]\n" +
"Sub types:\n",
hierarchy);
} finally {
@@ -669,7 +669,7 @@
assertHierarchyEquals(
"Focus: X [in X.java [in p7 [in src [in TypeHierarchy]]]]\n" +
"Super types:\n" +
- " Object [in Object.class [in java.lang [in "+ getExternalJCLPathString() + "]]]\n" +
+ " Object [in Object.class [in java.lang [in "+ getSystemJsPathString() + "]]]\n" +
"Sub types:\n" +
" <anonymous #1> [in <initializer #2> [in A [in A.java [in p7 [in src [in TypeHierarchy]]]]]]\n" +
" Y2 [in foo() [in A [in A.java [in p7 [in src [in TypeHierarchy]]]]]]\n" +
@@ -1284,7 +1284,7 @@
"Focus: Y [in Y.class [in p58440 [in test58440.jar [in TypeHierarchy]]]]\n" +
"Super types:\n" +
" Inner [in X$Inner.class [in p58440 [in test58440.jar [in TypeHierarchy]]]]\n" +
- " Object [in Object.class [in java.lang [in "+ getExternalJCLPathString() + "]]]\n" +
+ " Object [in Object.class [in java.lang [in "+ getSystemJsPathString() + "]]]\n" +
"Sub types:\n",
hierarchy);
}
@@ -1302,7 +1302,7 @@
assertHierarchyEquals(
"Focus: Inner [in X [in X.java [in p5 [in src [in TypeHierarchy]]]]]\n" +
"Super types:\n" +
- " Object [in Object.class [in java.lang [in "+ getExternalJCLPathString() + "]]]\n" +
+ " Object [in Object.class [in java.lang [in "+ getSystemJsPathString() + "]]]\n" +
"Sub types:\n",
hierarchy);
}
@@ -1323,7 +1323,7 @@
assertHierarchyEquals(
"Focus: Inner [in A [in A.java [in p6 [in src [in TypeHierarchy]]]]]\n" +
"Super types:\n" +
- " Object [in Object.class [in java.lang [in "+ getExternalJCLPathString() + "]]]\n" +
+ " Object [in Object.class [in java.lang [in "+ getSystemJsPathString() + "]]]\n" +
"Sub types:\n" +
" B [in A.java [in p6 [in src [in TypeHierarchy]]]]\n",
hierarchy);
@@ -1339,7 +1339,7 @@
"Focus: Y1 [in <initializer #1> [in A [in A.java [in p7 [in src [in TypeHierarchy]]]]]]\n" +
"Super types:\n" +
" X [in X.java [in p7 [in src [in TypeHierarchy]]]]\n" +
- " Object [in Object.class [in java.lang [in "+ getExternalJCLPathString() + "]]]\n" +
+ " Object [in Object.class [in java.lang [in "+ getSystemJsPathString() + "]]]\n" +
"Sub types:\n" +
" Y2 [in <initializer #1> [in A [in A.java [in p7 [in src [in TypeHierarchy]]]]]]\n",
hierarchy);
@@ -1354,7 +1354,7 @@
assertHierarchyEquals(
"Focus: Y3 [in <initializer #2> [in A [in A.java [in p7 [in src [in TypeHierarchy]]]]]]\n" +
"Super types:\n" +
- " Object [in Object.class [in java.lang [in "+ getExternalJCLPathString() + "]]]\n" +
+ " Object [in Object.class [in java.lang [in "+ getSystemJsPathString() + "]]]\n" +
"Sub types:\n",
hierarchy);
}
@@ -1370,7 +1370,7 @@
"Super types:\n" +
" Y1 [in foo() [in A [in A.java [in p7 [in src [in TypeHierarchy]]]]]]\n" +
" X [in X.java [in p7 [in src [in TypeHierarchy]]]]\n" +
- " Object [in Object.class [in java.lang [in "+ getExternalJCLPathString() + "]]]\n" +
+ " Object [in Object.class [in java.lang [in "+ getSystemJsPathString() + "]]]\n" +
"Sub types:\n",
hierarchy);
}
@@ -1386,7 +1386,7 @@
"Focus: Y1 [in foo() [in A [in A.java [in p7 [in src [in TypeHierarchy]]]]]]\n" +
"Super types:\n" +
" X [in X.java [in p7 [in src [in TypeHierarchy]]]]\n" +
- " Object [in Object.class [in java.lang [in "+ getExternalJCLPathString() + "]]]\n" +
+ " Object [in Object.class [in java.lang [in "+ getSystemJsPathString() + "]]]\n" +
"Sub types:\n",
hierarchy);
}
@@ -1404,7 +1404,7 @@
" }\n" +
"}"
);
- createJavaProject("P2", new String[] {""}, new String[] {"JCL_LIB"}, new String[] {"/P1"}, "");
+ createJavaProject("P2", new String[] {""}, new String[] {"JCL_LIB"}, new String[] {"/P1"});
createFile(
"/P2/Y.js",
"public class Y extends X.Member {\n" +
@@ -1415,7 +1415,7 @@
assertHierarchyEquals(
"Focus: Member [in X [in X.java [in <default> [in <project root> [in P1]]]]]\n" +
"Super types:\n" +
- " Object [in Object.class [in java.lang [in "+ getExternalJCLPathString() + "]]]\n" +
+ " Object [in Object.class [in java.lang [in "+ getSystemJsPathString() + "]]]\n" +
"Sub types:\n" +
" Y [in Y.java [in <default> [in <project root> [in P2]]]]\n",
hierarchy);
@@ -1438,7 +1438,7 @@
assertHierarchyEquals(
"Focus: X [in X.java [in p4 [in src [in TypeHierarchy]]]]\n" +
"Super types:\n" +
- " Object [in Object.class [in java.lang [in "+ getExternalJCLPathString() + "]]]\n" +
+ " Object [in Object.class [in java.lang [in "+ getSystemJsPathString() + "]]]\n" +
"Sub types:\n",
hierarchy);
}
@@ -1514,8 +1514,8 @@
public void testRegion4() throws CoreException {
try {
IJavaScriptProject p1 = createJavaProject("P1");
- IJavaScriptProject p2 = createJavaProject("P2", new String[] {""}, new String[] {"JCL_LIB"}, new String[] {"/P1"}, "");
- IJavaScriptProject p3 = createJavaProject("P3", new String[] {""}, new String[] {"JCL_LIB"}, new String[] {"/P1"}, "");
+ IJavaScriptProject p2 = createJavaProject("P2", new String[] {""}, new String[] {"JCL_LIB"}, new String[] {"/P1"});
+ IJavaScriptProject p3 = createJavaProject("P3", new String[] {""}, new String[] {"JCL_LIB"}, new String[] {"/P1"});
createFile(
"/P1/X.js",
"public class X {\n" +
@@ -1539,17 +1539,17 @@
assertHierarchyEquals(
"Focus: <NONE>\n" +
"Sub types of root classes:\n" +
- " Class [in Class.class [in java.lang [in "+ getExternalJCLPathString() + "]]]\n" +
+ " Class [in Class.class [in java.lang [in "+ getSystemJsPathString() + "]]]\n" +
" Y [in Y.java [in <default> [in <project root> [in P2]]]]\n" +
" Z [in Z.java [in <default> [in <project root> [in P3]]]]\n" +
- " String [in String.class [in java.lang [in "+ getExternalJCLPathString() + "]]]\n" +
- " Error [in Error.class [in java.lang [in "+ getExternalJCLPathString() + "]]]\n" +
- " CloneNotSupportedException [in CloneNotSupportedException.class [in java.lang [in "+ getExternalJCLPathString() + "]]]\n" +
- " IllegalMonitorStateException [in IllegalMonitorStateException.class [in java.lang [in "+ getExternalJCLPathString() + "]]]\n" +
- " InterruptedException [in InterruptedException.class [in java.lang [in "+ getExternalJCLPathString() + "]]]\n" +
- " RuntimeException [in RuntimeException.class [in java.lang [in "+ getExternalJCLPathString() + "]]]\n" +
- " Exception [in Exception.class [in java.lang [in "+ getExternalJCLPathString() + "]]]\n" +
- " Throwable [in Throwable.class [in java.lang [in "+ getExternalJCLPathString() + "]]]\n" +
+ " String [in String.class [in java.lang [in "+ getSystemJsPathString() + "]]]\n" +
+ " Error [in Error.class [in java.lang [in "+ getSystemJsPathString() + "]]]\n" +
+ " CloneNotSupportedException [in CloneNotSupportedException.class [in java.lang [in "+ getSystemJsPathString() + "]]]\n" +
+ " IllegalMonitorStateException [in IllegalMonitorStateException.class [in java.lang [in "+ getSystemJsPathString() + "]]]\n" +
+ " InterruptedException [in InterruptedException.class [in java.lang [in "+ getSystemJsPathString() + "]]]\n" +
+ " RuntimeException [in RuntimeException.class [in java.lang [in "+ getSystemJsPathString() + "]]]\n" +
+ " Exception [in Exception.class [in java.lang [in "+ getSystemJsPathString() + "]]]\n" +
+ " Throwable [in Throwable.class [in java.lang [in "+ getSystemJsPathString() + "]]]\n" +
" X [in X.java [in <default> [in <project root> [in P1]]]]\n",
hierarchy);
} finally {
@@ -1568,7 +1568,7 @@
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=144976
public void testResilienceToMissingBinaries() throws CoreException {
try {
- createJavaProject("P", new String[] {"src"}, new String[] {"JCL_LIB", "/TypeHierarchy/test144976.jar"}, "bin");
+ createJavaProject("P", new String[] {"src"}, new String[] {"JCL_LIB", "/TypeHierarchy/test144976.jar"});
createFolder("/P/src/tools/");
createFile(
"/P/src/tools/DisplayTestResult2.js",
@@ -1640,7 +1640,7 @@
*/
public void testRootOrder() throws CoreException, IOException {
try {
- IJavaScriptProject project = createJavaProject("P", new String[] {"abc"}, new String[] {"JCL_LIB"}, "bin");
+ IJavaScriptProject project = createJavaProject("P", new String[] {"abc"}, new String[] {"JCL_LIB"});
createFolder("/P/abc/p");
createFile(
"/P/abc/p/X.js",
@@ -1665,7 +1665,7 @@
assertHierarchyEquals(
"Focus: X [in X.java [in p [in abc [in P]]]]\n" +
"Super types:\n" +
- " Object [in Object.class [in java.lang [in "+ getExternalJCLPathString() + "]]]\n" +
+ " Object [in Object.class [in java.lang [in "+ getSystemJsPathString() + "]]]\n" +
"Sub types:\n" +
" Y [in Y.java [in p [in abc [in P]]]]\n",
hierarchy);
@@ -1742,7 +1742,7 @@
* Ensures that no subclasses exist in a super type hierarchy for the focus type.
*/
public void testSupertypeHierarchyGetSubclasses() throws JavaScriptModelException {
- IType type = getClassFile("TypeHierarchy", getExternalJCLPathString(), "java.lang", "Object.class").getType();
+ IType type = getClassFile("TypeHierarchy", getSystemJsPathString(), "java.lang", "Object.class").getType();
ITypeHierarchy hierarchy = type.newSupertypeHierarchy(null);
IType[] types = hierarchy.getSubclasses(type);
assertTypesEqual(
@@ -1763,7 +1763,7 @@
* Ensures that no subtypes exist in a super type hierarchy for the focus type.
*/
public void testSupertypeHierarchyGetSubtypes() throws JavaScriptModelException {
- IType type = getClassFile("TypeHierarchy", getExternalJCLPathString(), "java.lang", "Object.class").getType();
+ IType type = getClassFile("TypeHierarchy", getSystemJsPathString(), "java.lang", "Object.class").getType();
ITypeHierarchy hierarchy = type.newSupertypeHierarchy(null);
IType[] types = hierarchy.getSubtypes(type);
assertTypesEqual(
@@ -1855,7 +1855,7 @@
"Focus: Y [in Y.java [in q6 [in src [in TypeHierarchy]]]]\n" +
"Super types:\n" +
" NonVisibleClass [in X.java [in q5 [in src [in TypeHierarchy]]]]\n" +
- " Object [in Object.class [in java.lang [in "+ getExternalJCLPathString() + "]]]\n" +
+ " Object [in Object.class [in java.lang [in "+ getSystemJsPathString() + "]]]\n" +
"Sub types:\n",
hierarchy
);
@@ -1870,7 +1870,7 @@
"Focus: Z [in Z.java [in q6 [in src [in TypeHierarchy]]]]\n" +
"Super types:\n" +
" NonVisibleInterface [in X.java [in q5 [in src [in TypeHierarchy]]]]\n" +
- " Object [in Object.class [in java.lang [in "+ getExternalJCLPathString() + "]]]\n" +
+ " Object [in Object.class [in java.lang [in "+ getSystemJsPathString() + "]]]\n" +
"Sub types:\n",
hierarchy
);
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/WorkingCopyNotInClasspathTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/WorkingCopyNotInClasspathTests.java
index 1acfc0e..5a32ac8 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/WorkingCopyNotInClasspathTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/WorkingCopyNotInClasspathTests.java
@@ -39,7 +39,7 @@
public void setUp() throws Exception {
super.setUp();
try {
- this.createJavaProject("P", new String[] {"src"}, "bin");
+ this.createJavaProject("P", new String[] {"src"});
this.createFolder("P/txt");
IFile file = this.createFile("P/txt/X.js",
"public class X {\n" +
@@ -116,7 +116,7 @@
public void testGetSource() throws CoreException {
IJavaScriptUnit copy = null;
try {
- this.createJavaProject("P1", new String[] {}, "bin");
+ this.createJavaProject("P1", new String[] {});
this.createFolder("/P1/src/junit/test");
String source =
"package junit.test;\n" +
@@ -277,7 +277,7 @@
public void testReconcileAndCommit1() throws CoreException {
IJavaScriptUnit copy = null;
try {
- this.createJavaProject("JavaProject", new String[] {"src"}, "bin");
+ this.createJavaProject("JavaProject", new String[] {"src"});
this.createFolder("/JavaProject/src/native.1");
String source =
"class X {}";
@@ -430,7 +430,7 @@
public void testReconcileAndCommit5() throws CoreException {
IJavaScriptUnit copy = null;
try {
- this.createJavaProject("JavaProject", new String[] {"src"}, "bin");
+ this.createJavaProject("JavaProject", new String[] {"src"});
this.createFolder("/JavaProject/src/p");
String source =
"package p; \n" +
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/WorkingCopyOwnerTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/WorkingCopyOwnerTests.java
index 55c288c..65e317e 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/WorkingCopyOwnerTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/WorkingCopyOwnerTests.java
@@ -1118,7 +1118,7 @@
*/
public void testParseCompilationUnit3() throws CoreException {
try {
- createJavaProject("P1", new String[] {"src"}, new String[] {"JCL_LIB", "lib"}, "bin");
+ createJavaProject("P1", new String[] {"src"}, new String[] {"JCL_LIB", "lib"});
// create X.class in lib folder
/* Evaluate the following in a scrapbook:
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/WorkingCopyTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/WorkingCopyTests.java
index eafa464..08b3024 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/WorkingCopyTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/WorkingCopyTests.java
@@ -48,8 +48,7 @@
this.createJavaProject(
"P",
new String[] {"src"},
- new String[] {this.getExternalJCLPathString(), "lib"},
- "bin");
+ new String[] {this.getSystemJsPathString(), "lib"});
// this.createFolder("P/src");
this.createFile("P/src/A.js",
" var FIELD;\n" +
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/describing/ASTRewritingTest.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/describing/ASTRewritingTest.java
index 3358ea0..acec46d 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/describing/ASTRewritingTest.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/describing/ASTRewritingTest.java
@@ -81,7 +81,7 @@
protected void setUp() throws Exception {
super.setUp();
- IJavaScriptProject proj= createJavaProject("P", new String[] {"src"}, "bin");
+ IJavaScriptProject proj= createJavaProject("P", new String[] {"src"});
proj.setOption(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaScriptCore.SPACE);
proj.setOption(DefaultCodeFormatterConstants.FORMATTER_TAB_SIZE, "4");
proj.setOption(JavaScriptCore.COMPILER_COMPLIANCE, JavaScriptCore.VERSION_1_5);
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/describing/ImportRewriteTest.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/describing/ImportRewriteTest.java
index bbb8ebf..755e643 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/describing/ImportRewriteTest.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/describing/ImportRewriteTest.java
@@ -62,7 +62,7 @@
protected void setUp() throws Exception {
super.setUp();
- IJavaScriptProject proj= createJavaProject("P", new String[] {"src"}, new String[] {"JCL_LIB"}, "bin");
+ IJavaScriptProject proj= createJavaProject("P", new String[] {"src"}, new String[] {"JCL_LIB"});
proj.setOption(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaScriptCore.SPACE);
proj.setOption(DefaultCodeFormatterConstants.FORMATTER_TAB_SIZE, "4");
proj.setOption(JavaScriptCore.COMPILER_COMPLIANCE, JavaScriptCore.VERSION_1_5);
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/modifying/ASTRewritingModifyingTest.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/modifying/ASTRewritingModifyingTest.java
index 9f0820d..cca2d00 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/modifying/ASTRewritingModifyingTest.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/modifying/ASTRewritingModifyingTest.java
@@ -64,7 +64,7 @@
public void setUpSuite() throws Exception {
super.setUpSuite();
- fJProject1 = createJavaProject("P", new String[] {"src"}, "bin");
+ fJProject1 = createJavaProject("P", new String[] {"src"});
fSourceFolder = this.getPackageFragmentRoot("P", "src");
Hashtable options = JavaScriptCore.getOptions();