diff options
author | Jan-Ove Weichel | 2015-04-24 20:03:04 +0000 |
---|---|---|
committer | Lars Vogel | 2015-07-24 09:31:53 +0000 |
commit | b86d5d5882350979d76aa5b3487e87d712a72ae4 (patch) | |
tree | d4a1de96d5fca9ec5490c45e594a8319cd9620ea | |
parent | 593cf76f67d59f0f6766fc70e484bc532d3bb1a7 (diff) | |
download | eclipse.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.java | 5 |
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); |