Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan-Ove Weichel2015-04-24 20:03:04 +0000
committerLars Vogel2015-07-24 09:31:53 +0000
commitb86d5d5882350979d76aa5b3487e87d712a72ae4 (patch)
treed4a1de96d5fca9ec5490c45e594a8319cd9620ea
parent593cf76f67d59f0f6766fc70e484bc532d3bb1a7 (diff)
downloadeclipse.platform.ui-b86d5d5882350979d76aa5b3487e87d712a72ae4.tar.gz
eclipse.platform.ui-b86d5d5882350979d76aa5b3487e87d712a72ae4.tar.xz
eclipse.platform.ui-b86d5d5882350979d76aa5b3487e87d712a72ae4.zip
Bug 441573 - [Markers] Duplicate quick-fix when applying a
WorkbenchMarkerResolution Change-Id: I38702f2784fc80de32a6c34e04101ccc459c402f Signed-off-by: Jan-Ove Weichel <ovi.weichel@gmail.com>
-rw-r--r--bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/QuickFixHandler.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/QuickFixHandler.java b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/QuickFixHandler.java
index 6925ec2f56c..3c8e0bc73e1 100644
--- a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/QuickFixHandler.java
+++ b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/QuickFixHandler.java
@@ -7,6 +7,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * Jan-Ove Weichel <ovi.weichel@gmail.com> - Bug 441573
*******************************************************************************/
package org.eclipse.ui.internal.views.markers;
@@ -15,6 +16,7 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.LinkedHashMap;
+import java.util.LinkedHashSet;
import java.util.Map;
import org.eclipse.core.commands.ExecutionEvent;
@@ -89,7 +91,8 @@ public class QuickFixHandler extends MarkerViewHandler {
if (markerResolution instanceof WorkbenchMarkerResolution) {
IMarker[] other = ((WorkbenchMarkerResolution)markerResolution).findOtherMarkers(allMarkers);
if (containsAllButFirst(other, selectedMarkers)) {
- Collection<IMarker> markers = new ArrayList<>(other.length + 1);
+ Collection<IMarker> markers = new LinkedHashSet<IMarker>(other.length + 1);
+ // Duplicates will not be added due to set
markers.add(firstSelectedMarker);
markers.addAll(Arrays.asList(other));
resolutionsMap.put(markerResolution, markers);

Back to the top