avoid maintaining a branch of org.eclipse.jdt.core.tests.builder by applying this tiny adaption using a team.
diff --git a/testplugins/org.eclipse.objectteams.otdt.test.builder/META-INF/MANIFEST.MF b/testplugins/org.eclipse.objectteams.otdt.test.builder/META-INF/MANIFEST.MF
index f8a917f..b989e37 100644
--- a/testplugins/org.eclipse.objectteams.otdt.test.builder/META-INF/MANIFEST.MF
+++ b/testplugins/org.eclipse.objectteams.otdt.test.builder/META-INF/MANIFEST.MF
@@ -16,6 +16,7 @@
org.eclipse.jdt.core.tests.compiler,
org.eclipse.jdt.core,
org.eclipse.test.performance,
- org.eclipse.objectteams.otdt.tests
+ org.eclipse.objectteams.otdt.tests,
+ org.objectteams.otequinox
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
diff --git a/testplugins/org.eclipse.objectteams.otdt.test.builder/build.properties b/testplugins/org.eclipse.objectteams.otdt.test.builder/build.properties
index 60c266b..e761a5e 100644
--- a/testplugins/org.eclipse.objectteams.otdt.test.builder/build.properties
+++ b/testplugins/org.eclipse.objectteams.otdt.test.builder/build.properties
@@ -4,4 +4,5 @@
test.xml,\
JCL/,\
workspace/,\
- META-INF/
+ META-INF/,\
+ plugin.xml
diff --git a/testplugins/org.eclipse.objectteams.otdt.test.builder/plugin.xml b/testplugins/org.eclipse.objectteams.otdt.test.builder/plugin.xml
new file mode 100644
index 0000000..7ed74f1
--- /dev/null
+++ b/testplugins/org.eclipse.objectteams.otdt.test.builder/plugin.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.objectteams.otequinox.aspectBindings">
+ <aspectBinding
+ icon="platform:/plugin/org.objectteams.otdt.ui/icons/ot/calloutbinding_obj.gif">
+ <basePlugin
+ icon="platform:/plugin/org.eclipse.pde.ui/icons/obj16/plugin_obj.gif"
+ id="org.eclipse.jdt.core.tests.builder">
+ </basePlugin>
+ <team
+ activation="ALL_THREADS"
+ class="org.eclipse.objectteams.otdt.test.builder.OTTestingEnvironment"
+ icon="platform:/plugin/org.objectteams.otdt.ui/icons/ot/team_obj.gif">
+ </team>
+ </aspectBinding>
+ </extension>
+ <extension
+ point="org.objectteams.otequinox.aspectBindings">
+ <aspectBinding
+ icon="platform:/plugin/org.objectteams.otdt.ui/icons/ot/calloutbinding_obj.gif">
+ <basePlugin
+ icon="platform:/plugin/org.eclipse.pde.ui/icons/obj16/plugin_obj.gif"
+ id="org.eclipse.jdt.core.tests.builder">
+ </basePlugin>
+ <team
+ class="org.eclipse.objectteams.otdt.test.builder.OTTestingEnvironment"
+ icon="platform:/plugin/org.objectteams.otdt.ui/icons/ot/team_obj.gif">
+ </team>
+ </aspectBinding>
+ </extension>
+ <extension
+ point="org.objectteams.otequinox.aspectBindings">
+ <aspectBinding
+ icon="platform:/plugin/org.objectteams.otdt.ui/icons/ot/calloutbinding_obj.gif">
+ <basePlugin
+ icon="platform:/plugin/org.eclipse.pde.ui/icons/obj16/plugin_obj.gif"
+ id="org.eclipse.jdt.core.tests.builder">
+ </basePlugin>
+ <team
+ class="org.eclipse.objectteams.otdt.test.builder.Team1"
+ icon="platform:/plugin/org.objectteams.otdt.ui/icons/ot/team_obj.gif">
+ </team>
+ </aspectBinding>
+ </extension>
+
+</plugin>
diff --git a/testplugins/org.eclipse.objectteams.otdt.test.builder/src/org/eclipse/objectteams/otdt/test/builder/OTTestingEnvironment.java b/testplugins/org.eclipse.objectteams.otdt.test.builder/src/org/eclipse/objectteams/otdt/test/builder/OTTestingEnvironment.java
index fdb86e4..297edfd 100644
--- a/testplugins/org.eclipse.objectteams.otdt.test.builder/src/org/eclipse/objectteams/otdt/test/builder/OTTestingEnvironment.java
+++ b/testplugins/org.eclipse.objectteams.otdt.test.builder/src/org/eclipse/objectteams/otdt/test/builder/OTTestingEnvironment.java
@@ -24,19 +24,32 @@
import org.eclipse.core.resources.IProjectDescription;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jdt.core.tests.builder.TestingEnvironment;
+import base org.eclipse.jdt.core.tests.builder.TestingEnvironment;
-public class OTTestingEnvironment extends TestingEnvironment {
+/** Purpose: add OTJ_NATURE to test projects (method not normally overridable). */
+public team class OTTestingEnvironment {
+
+ protected class TestingEnvironment playedBy TestingEnvironment {
- @Override // in order to set OT nature: // FIXME: request jdt.method to become protected or use a role for overriding
- protected void addBuilderSpecs(String projectName) {
- try {
- IProject project = getProject(projectName);
- IProjectDescription description = project.getDescription();
- description.setNatureIds(new String[] { JavaCore.NATURE_ID, JavaCore.OTJ_NATURE_ID });
- project.setDescription(description, null);
- } catch (CoreException e) {
- handleCoreException(e);
+ @SuppressWarnings("decapsulation")
+ void handleCoreException(CoreException e) -> void handleCoreException(CoreException e);
+
+ IProject getProject(String projectName) -> IProject getProject(String projectName);
+
+ @SuppressWarnings("basecall")
+ callin void addBuilderSpecs(String projectName) {
+ try {
+ IProject project = getProject(projectName);
+ IProjectDescription description = project.getDescription();
+ description.setNatureIds(new String[] { JavaCore.NATURE_ID, JavaCore.OTJ_NATURE_ID });
+ project.setDescription(description, null);
+ } catch (CoreException e) {
+ handleCoreException(e);
+ }
}
+
+ @SuppressWarnings("decapsulation")
+ addBuilderSpecs <- replace addBuilderSpecs;
+
}
}