diff options
author | Lars Vogel | 2021-02-05 13:04:44 +0000 |
---|---|---|
committer | Lars Vogel | 2021-02-23 13:05:53 +0000 |
commit | 18952482e54e55ae92014a0fed8673703991aba0 (patch) | |
tree | 822c4cd055324ee7a6a8bc90dd9e8c6428aec46c | |
parent | 9d7194d5b61f010662d7992f85119d5738b12b05 (diff) | |
download | eclipse.platform.ui-Y20210304-1000.tar.gz eclipse.platform.ui-Y20210304-1000.tar.xz eclipse.platform.ui-Y20210304-1000.zip |
Bug 570952 - Use atomic marker API in MarkerTesterTestY20210316-1310Y20210316-0510Y20210315-1000Y20210314-1000Y20210313-1000Y20210312-2250Y20210312-1250Y20210312-1000Y20210311-1000Y20210310-1000Y20210309-1000Y20210307-1000Y20210306-1000Y20210305-1000Y20210304-1000Y20210303-1000Y20210301-1000Y20210228-1000Y20210227-1000Y20210226-1000Y20210225-1000Y20210224-1000Y20210223-1050S4_19_0_RC2S4_19_0_RC1R4_19I20210303-1800I20210303-0600I20210302-1800I20210302-0930I20210302-0720I20210302-0600I20210301-1800I20210301-0600I20210228-1800I20210228-0600I20210227-1800I20210227-0600I20210226-2140I20210226-1800I20210226-0220I20210224-1800I20210224-0840I20210224-0600I20210223-1800
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.java | 15 | ||||
-rw-r--r-- | tests/org.eclipse.ui.tests/META-INF/MANIFEST.MF | 2 |
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, |