Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Vogel2021-02-05 13:04:44 +0000
committerLars Vogel2021-02-23 13:05:53 +0000
commit18952482e54e55ae92014a0fed8673703991aba0 (patch)
tree822c4cd055324ee7a6a8bc90dd9e8c6428aec46c
parent9d7194d5b61f010662d7992f85119d5738b12b05 (diff)
downloadeclipse.platform.ui-Y20210304-1000.tar.gz
eclipse.platform.ui-Y20210304-1000.tar.xz
eclipse.platform.ui-Y20210304-1000.zip
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>
-rw-r--r--tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/markers/MarkerTesterTest.java15
-rw-r--r--tests/org.eclipse.ui.tests/META-INF/MANIFEST.MF2
2 files changed, 6 insertions, 11 deletions
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 fe8ffd35b91..e1eff1b0f8f 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 @@ public class MarkerTesterTest extends UITestCase {
@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 @@ public class MarkerTesterTest extends UITestCase {
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 @@ public class MarkerTesterTest extends UITestCase {
@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 @@ public class MarkerTesterTest extends UITestCase {
@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 @@ public class MarkerTesterTest extends UITestCase {
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 966c91af020..fd5c1cb7a12 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 @@ Bundle-Version: 3.15.100.qualifier
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,

Back to the top