Bug 570952 - Use atomic marker API in MarkerTesterTest

The new API has been defined so markers can be created without triggered
resource change events for each attribute set. This change uses this API
in test code.

Change-Id: Ic8db9145252fb83b35f4682ef726e19749c325b2
Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
diff --git a/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/markers/MarkerTesterTest.java b/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/markers/MarkerTesterTest.java
index fe8ffd3..e1eff1b 100644
--- a/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/markers/MarkerTesterTest.java
+++ b/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/markers/MarkerTesterTest.java
@@ -134,10 +134,9 @@
 	@Test
 	public void testPriority() throws Exception {
 
-		IMarker highPriority = project.createMarker(IMarker.PROBLEM);
 		Map<String, Object> attributes = new HashMap<>();
 		attributes.put(IMarker.PRIORITY, Integer.valueOf(IMarker.PRIORITY_HIGH));
-		highPriority.setAttributes(attributes);
+		IMarker highPriority = project.createMarker(IMarker.PROBLEM, attributes);
 
 		EvaluationContext context = new EvaluationContext(null, highPriority);
 		TestExpression testExpression = new TestExpression(MARKER_NAMESPACE,
@@ -145,10 +144,9 @@
 		EvaluationResult result = testExpression.evaluate(context);
 		assertEquals(EvaluationResult.TRUE, result);
 
-		IMarker lowPriority = project.createMarker(IMarker.PROBLEM);
 		attributes = new HashMap<>();
 		attributes.put(IMarker.PRIORITY, Integer.valueOf(IMarker.PRIORITY_LOW));
-		lowPriority.setAttributes(attributes);
+		IMarker lowPriority = project.createMarker(IMarker.PROBLEM, attributes);
 
 		context = new EvaluationContext(null, lowPriority);
 		testExpression = new TestExpression(MARKER_NAMESPACE, "priority", null,
@@ -194,10 +192,9 @@
 	@Test
 	public void testMessage() throws Exception {
 
-		IMarker someTaskMarker = project.createMarker(IMarker.TASK);
 		Map<String, String> attributes = new HashMap<>();
 		attributes.put(IMarker.MESSAGE, "Some nice message to test");
-		someTaskMarker.setAttributes(attributes);
+		IMarker someTaskMarker = project.createMarker(IMarker.TASK, attributes);
 
 		EvaluationContext context = new EvaluationContext(null, someTaskMarker);
 		TestExpression testExpression = new TestExpression(MARKER_NAMESPACE,
@@ -230,10 +227,9 @@
 	@Test
 	public void testResourceType() throws Exception {
 
-		IMarker someTaskMarker = project.createMarker(IMarker.TASK);
 		Map<String, String> attributes = new HashMap<>();
 		attributes.put(IMarker.MESSAGE, "Some nice message to test");
-		someTaskMarker.setAttributes(attributes);
+		IMarker someTaskMarker = project.createMarker(IMarker.TASK, attributes);
 
 		EvaluationContext context = new EvaluationContext(null, someTaskMarker);
 		TestExpression testExpression = new TestExpression(MARKER_NAMESPACE,
@@ -244,10 +240,9 @@
 		IFolder folder = project.getFolder("forMarker");
 		folder.create(true, true, null);
 
-		IMarker someOtherMarker = folder.createMarker(IMarker.TASK);
 		attributes = new HashMap<>();
 		attributes.put(IMarker.MESSAGE, "Some nice message to test");
-		someOtherMarker.setAttributes(attributes);
+		IMarker someOtherMarker = folder.createMarker(IMarker.TASK, attributes);
 
 		context = new EvaluationContext(null, someOtherMarker);
 		testExpression = new TestExpression(MARKER_NAMESPACE, "resourceType",
diff --git a/tests/org.eclipse.ui.tests/META-INF/MANIFEST.MF b/tests/org.eclipse.ui.tests/META-INF/MANIFEST.MF
index 966c91a..fd5c1cb 100644
--- a/tests/org.eclipse.ui.tests/META-INF/MANIFEST.MF
+++ b/tests/org.eclipse.ui.tests/META-INF/MANIFEST.MF
@@ -6,7 +6,7 @@
 Eclipse-BundleShape: dir
 Bundle-Activator: org.eclipse.ui.tests.TestPlugin
 Bundle-Vendor: Eclipse.org
-Require-Bundle: org.eclipse.core.resources,
+Require-Bundle: org.eclipse.core.resources;bundle-version="3.14.0",
  org.eclipse.core.expressions;bundle-version="3.7.0",
  org.eclipse.ui,
  org.junit,