Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2016-04-12 13:15:08 +0000
committerAlexander Kurtakov2016-04-12 13:15:08 +0000
commit0ec7af2fd91d38268cfcad656fdf3d1452599d86 (patch)
treec3d1bb136d61617689d4372ea26040468d57445c
parent7521fa3ce98b09ec1c893dfa23143db45b1eb419 (diff)
downloadorg.eclipse.dltk.core-0ec7af2fd91d38268cfcad656fdf3d1452599d86.tar.gz
org.eclipse.dltk.core-0ec7af2fd91d38268cfcad656fdf3d1452599d86.tar.xz
org.eclipse.dltk.core-0ec7af2fd91d38268cfcad656fdf3d1452599d86.zip
Make AbstractModelTests.deleteProject static.
Change to call it in the new static way in the bundle. Change-Id: I0edfeeee9a4666958746c30a517f9c16f061d1f9 Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
-rw-r--r--core/tests/org.eclipse.dltk.core.tests/src/org/eclipse/dltk/core/tests/BundledProjectSetup.java4
-rw-r--r--core/tests/org.eclipse.dltk.core.tests/src/org/eclipse/dltk/core/tests/buildpath/BuildpathTests.java54
-rw-r--r--core/tests/org.eclipse.dltk.core.tests/src/org/eclipse/dltk/core/tests/model/AbstractModelTests.java5
-rw-r--r--core/tests/org.eclipse.dltk.core.tests/src/org/eclipse/dltk/core/tests/model/AbstractSingleProjectSearchTests.java4
-rw-r--r--core/tests/org.eclipse.dltk.core.tests/src/org/eclipse/dltk/core/tests/model/BufferTests.java5
-rw-r--r--core/tests/org.eclipse.dltk.core.tests/src/org/eclipse/dltk/core/tests/model/WorkingCopyTests.java5
6 files changed, 38 insertions, 39 deletions
diff --git a/core/tests/org.eclipse.dltk.core.tests/src/org/eclipse/dltk/core/tests/BundledProjectSetup.java b/core/tests/org.eclipse.dltk.core.tests/src/org/eclipse/dltk/core/tests/BundledProjectSetup.java
index e9b891362..7aee95434 100644
--- a/core/tests/org.eclipse.dltk.core.tests/src/org/eclipse/dltk/core/tests/BundledProjectSetup.java
+++ b/core/tests/org.eclipse.dltk.core.tests/src/org/eclipse/dltk/core/tests/BundledProjectSetup.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 NumberFour AG
+ * Copyright (c) 2011, 2016 NumberFour AG
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -183,7 +183,7 @@ public class BundledProjectSetup extends TestSetup {
@Override
protected void tearDown() throws Exception {
for (String projectName : projectNames) {
- helper.deleteProject(projectName);
+ AbstractModelTests.deleteProject(projectName);
}
if (disableIndexer) {
ModelManager.getModelManager().getIndexManager().enable();
diff --git a/core/tests/org.eclipse.dltk.core.tests/src/org/eclipse/dltk/core/tests/buildpath/BuildpathTests.java b/core/tests/org.eclipse.dltk.core.tests/src/org/eclipse/dltk/core/tests/buildpath/BuildpathTests.java
index 34f2e2328..2290a8550 100644
--- a/core/tests/org.eclipse.dltk.core.tests/src/org/eclipse/dltk/core/tests/buildpath/BuildpathTests.java
+++ b/core/tests/org.eclipse.dltk.core.tests/src/org/eclipse/dltk/core/tests/buildpath/BuildpathTests.java
@@ -1,11 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2016 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
-
*******************************************************************************/
package org.eclipse.dltk.core.tests.buildpath;
@@ -43,6 +42,7 @@ import org.eclipse.dltk.core.ModelException;
import org.eclipse.dltk.core.environment.EnvironmentPathUtils;
import org.eclipse.dltk.core.environment.IEnvironment;
import org.eclipse.dltk.core.internal.environment.LocalEnvironment;
+import org.eclipse.dltk.core.tests.model.AbstractModelTests;
import org.eclipse.dltk.core.tests.model.ModelTestsPlugin;
import org.eclipse.dltk.core.tests.model.ModifyingResourceTests;
import org.eclipse.dltk.core.tests.util.Util;
@@ -336,7 +336,7 @@ public class BuildpathTests extends ModifyingResourceTests {
printer.flush();
} finally {
- this.deleteProject("P");
+ AbstractModelTests.deleteProject("P");
}
}
@@ -371,7 +371,7 @@ public class BuildpathTests extends ModifyingResourceTests {
((ScriptProject) proj).printNode(printer);
printer.flush();
} finally {
- this.deleteProject("P");
+ AbstractModelTests.deleteProject("P");
}
}
@@ -439,7 +439,7 @@ public class BuildpathTests extends ModifyingResourceTests {
+ " ResourceDelta(/P/.buildpath)[*]");
} finally {
stopDeltas();
- this.deleteProject("P");
+ AbstractModelTests.deleteProject("P");
}
}
@@ -482,7 +482,7 @@ public class BuildpathTests extends ModifyingResourceTests {
"Build path contains duplicate entry: \'src\' for project P",
status);
} finally {
- this.deleteProject("P");
+ AbstractModelTests.deleteProject("P");
}
}
@@ -507,7 +507,7 @@ public class BuildpathTests extends ModifyingResourceTests {
+ EnvironmentPathUtils.getLocalPath(libPath)
.toString() + "\' for project Pv0", status);
} finally {
- this.deleteProject("Pv0");
+ AbstractModelTests.deleteProject("Pv0");
}
}
@@ -530,7 +530,7 @@ public class BuildpathTests extends ModifyingResourceTests {
"Cannot nest \'P/src\' inside \'P\'. To enable the nesting exclude \'src/\' from \'P\'",
status);
} finally {
- this.deleteProject("P");
+ AbstractModelTests.deleteProject("P");
}
}
@@ -555,7 +555,7 @@ public class BuildpathTests extends ModifyingResourceTests {
"Cannot nest \'P/src/lib\' inside \'P/src\'. To enable the nesting exclude \'lib/\' from \'P/src\'",
status);
} finally {
- this.deleteProject("P");
+ AbstractModelTests.deleteProject("P");
}
}
@@ -584,8 +584,8 @@ public class BuildpathTests extends ModifyingResourceTests {
"OK", status);
} finally {
- this.deleteProject("P0var");
- this.deleteProject("P1var");
+ AbstractModelTests.deleteProject("P0var");
+ AbstractModelTests.deleteProject("P1var");
}
}
@@ -629,8 +629,8 @@ public class BuildpathTests extends ModifyingResourceTests {
status);
} finally {
- this.deleteProject("P0v");
- this.deleteProject("P1v");
+ AbstractModelTests.deleteProject("P0v");
+ AbstractModelTests.deleteProject("P1v");
}
}
@@ -654,7 +654,7 @@ public class BuildpathTests extends ModifyingResourceTests {
"Cannot nest \'P0/src\' inside \'P0\'. To enable the nesting exclude \'src/\' from \'P0\'",
status);
} finally {
- this.deleteProject("P0");
+ AbstractModelTests.deleteProject("P0");
}
}
@@ -679,7 +679,7 @@ public class BuildpathTests extends ModifyingResourceTests {
"should have allowed nested source folders with exclusion on the buildpath",
"OK", status);
} finally {
- this.deleteProject("P");
+ AbstractModelTests.deleteProject("P");
}
}
@@ -704,7 +704,7 @@ public class BuildpathTests extends ModifyingResourceTests {
"should have allowed nested lib folders with exclusion on the buildpath",
"OK", status);
} finally {
- this.deleteProject("P");
+ AbstractModelTests.deleteProject("P");
}
}
@@ -729,7 +729,7 @@ public class BuildpathTests extends ModifyingResourceTests {
"End exclusion filter \'src\' with / to fully exclude \'P/src\'",
status);
} finally {
- this.deleteProject("P");
+ AbstractModelTests.deleteProject("P");
}
}
@@ -757,7 +757,7 @@ public class BuildpathTests extends ModifyingResourceTests {
"Inclusion or exclusion patterns are disabled in project P, cannot selectively include or exclude from entry: \'src\'",
status);
} finally {
- this.deleteProject("P");
+ AbstractModelTests.deleteProject("P");
}
}
@@ -786,7 +786,7 @@ public class BuildpathTests extends ModifyingResourceTests {
"Cannot nest 'P/src' inside 'P/'. To enable the nesting exclude 'src/' from 'P/'",
status);
} finally {
- this.deleteProject("P");
+ AbstractModelTests.deleteProject("P");
}
}
@@ -812,7 +812,7 @@ public class BuildpathTests extends ModifyingResourceTests {
"Cannot nest \'P/src\' inside \'P\'. To enable the nesting exclude \'src/\' from \'P\'",
status);
} finally {
- this.deleteProject("P");
+ AbstractModelTests.deleteProject("P");
}
}
@@ -835,7 +835,7 @@ public class BuildpathTests extends ModifyingResourceTests {
assertStatus("OK", status);
} finally {
- this.deleteProject("P");
+ AbstractModelTests.deleteProject("P");
}
}
@@ -864,7 +864,7 @@ public class BuildpathTests extends ModifyingResourceTests {
"Inclusion or exclusion patterns are disabled in project P, cannot selectively include or exclude from entry: \'src\'",
status);
} finally {
- this.deleteProject("P");
+ AbstractModelTests.deleteProject("P");
}
}
@@ -893,7 +893,7 @@ public class BuildpathTests extends ModifyingResourceTests {
"Cannot nest \'P/src\' inside \'P\'. To allow the nesting enable use of exclusion patterns in the preferences of project \'P\' and exclude \'src/\' from \'P\'",
status);
} finally {
- this.deleteProject("P");
+ AbstractModelTests.deleteProject("P");
}
}
@@ -918,7 +918,7 @@ public class BuildpathTests extends ModifyingResourceTests {
"Setting the buildpath with two entries specifying the same path should fail",
false);
} finally {
- this.deleteProject("P");
+ AbstractModelTests.deleteProject("P");
}
}
@@ -959,7 +959,7 @@ public class BuildpathTests extends ModifyingResourceTests {
.equals(newRoots[i]));
}
} finally {
- this.deleteProject("P");
+ AbstractModelTests.deleteProject("P");
}
}
@@ -1000,7 +1000,7 @@ public class BuildpathTests extends ModifyingResourceTests {
.equals(newRoots[i]));
}
} finally {
- this.deleteProject("P");
+ AbstractModelTests.deleteProject("P");
}
}
@@ -1157,7 +1157,7 @@ public class BuildpathTests extends ModifyingResourceTests {
+ " ResourceDelta(/P/.buildpath)[*]");
} finally {
stopDeltas();
- this.deleteProject("P");
+ AbstractModelTests.deleteProject("P");
}
}
diff --git a/core/tests/org.eclipse.dltk.core.tests/src/org/eclipse/dltk/core/tests/model/AbstractModelTests.java b/core/tests/org.eclipse.dltk.core.tests/src/org/eclipse/dltk/core/tests/model/AbstractModelTests.java
index 98740175d..e54cdc6af 100644
--- a/core/tests/org.eclipse.dltk.core.tests/src/org/eclipse/dltk/core/tests/model/AbstractModelTests.java
+++ b/core/tests/org.eclipse.dltk.core.tests/src/org/eclipse/dltk/core/tests/model/AbstractModelTests.java
@@ -1,11 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 2016 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
-
*******************************************************************************/
package org.eclipse.dltk.core.tests.model;
@@ -589,7 +588,7 @@ public abstract class AbstractModelTests extends SuiteOfTestCases {
return folder;
}
- public void deleteProject(String projectName) throws CoreException {
+ public static void deleteProject(String projectName) throws CoreException {
IProject project = getProject(projectName);
if (project.exists() && !project.isOpen()) { // force opening so that
// project can be
diff --git a/core/tests/org.eclipse.dltk.core.tests/src/org/eclipse/dltk/core/tests/model/AbstractSingleProjectSearchTests.java b/core/tests/org.eclipse.dltk.core.tests/src/org/eclipse/dltk/core/tests/model/AbstractSingleProjectSearchTests.java
index bea518336..f1755dd46 100644
--- a/core/tests/org.eclipse.dltk.core.tests/src/org/eclipse/dltk/core/tests/model/AbstractSingleProjectSearchTests.java
+++ b/core/tests/org.eclipse.dltk.core.tests/src/org/eclipse/dltk/core/tests/model/AbstractSingleProjectSearchTests.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008 xored software, Inc.
+ * Copyright (c) 2008, 2016 xored software, Inc. and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -39,6 +39,7 @@ public class AbstractSingleProjectSearchTests extends AbstractModelTests
this.scriptProjectName = scriptProjectName;
}
+ @Override
public void setUpSuite() throws Exception {
super.setUpSuite();
setUpScriptProject(scriptProjectName);
@@ -61,6 +62,7 @@ public class AbstractSingleProjectSearchTests extends AbstractModelTests
return getScriptProject(scriptProjectName);
}
+ @Override
public void tearDownSuite() throws Exception {
deleteProject(scriptProjectName);
super.tearDownSuite();
diff --git a/core/tests/org.eclipse.dltk.core.tests/src/org/eclipse/dltk/core/tests/model/BufferTests.java b/core/tests/org.eclipse.dltk.core.tests/src/org/eclipse/dltk/core/tests/model/BufferTests.java
index 290337071..d82341bab 100644
--- a/core/tests/org.eclipse.dltk.core.tests/src/org/eclipse/dltk/core/tests/model/BufferTests.java
+++ b/core/tests/org.eclipse.dltk.core.tests/src/org/eclipse/dltk/core/tests/model/BufferTests.java
@@ -1,11 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 2016 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
-
*******************************************************************************/
package org.eclipse.dltk.core.tests.model;
@@ -58,7 +57,7 @@ public class BufferTests extends ModifyingResourceTests implements IBufferChange
@Override
public void tearDownSuite() throws Exception {
super.tearDownSuite();
- this.deleteProject("P");
+ BufferTests.deleteProject("P");
}
diff --git a/core/tests/org.eclipse.dltk.core.tests/src/org/eclipse/dltk/core/tests/model/WorkingCopyTests.java b/core/tests/org.eclipse.dltk.core.tests/src/org/eclipse/dltk/core/tests/model/WorkingCopyTests.java
index 9399dd119..1f7d61c50 100644
--- a/core/tests/org.eclipse.dltk.core.tests/src/org/eclipse/dltk/core/tests/model/WorkingCopyTests.java
+++ b/core/tests/org.eclipse.dltk.core.tests/src/org/eclipse/dltk/core/tests/model/WorkingCopyTests.java
@@ -1,11 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2016 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
-
*******************************************************************************/
package org.eclipse.dltk.core.tests.model;
@@ -69,7 +68,7 @@ public class WorkingCopyTests extends ModifyingResourceTests {
protected void tearDown() throws Exception {
if (this.copy != null)
this.copy.discardWorkingCopy();
- this.deleteProject("P");
+ AbstractModelTests.deleteProject("P");
super.tearDown();
}

Back to the top