Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilos Kleint2011-02-09 11:22:01 -0500
committerMilos Kleint2011-02-09 11:22:01 -0500
commit4f279be978f98f8c18894975a3e62e0751570efb (patch)
tree74bde313436daf06bb1137d8ee1ef29a9831edf7 /org.eclipse.m2e.discovery/src
parentd61b0c8c16c8205f19e6c3ac1293c8f19539db0d (diff)
downloadm2e-core-4f279be978f98f8c18894975a3e62e0751570efb.tar.gz
m2e-core-4f279be978f98f8c18894975a3e62e0751570efb.tar.xz
m2e-core-4f279be978f98f8c18894975a3e62e0751570efb.zip
fix test
Diffstat (limited to 'org.eclipse.m2e.discovery/src')
-rw-r--r--org.eclipse.m2e.discovery/src/org/eclipse/m2e/internal/discovery/markers/DiscoveryWizardProposal.java11
-rw-r--r--org.eclipse.m2e.discovery/src/org/eclipse/m2e/internal/discovery/markers/MavenDiscoveryMarkerResolutionGenerator.java2
2 files changed, 11 insertions, 2 deletions
diff --git a/org.eclipse.m2e.discovery/src/org/eclipse/m2e/internal/discovery/markers/DiscoveryWizardProposal.java b/org.eclipse.m2e.discovery/src/org/eclipse/m2e/internal/discovery/markers/DiscoveryWizardProposal.java
index 6415115b..8302d7c1 100644
--- a/org.eclipse.m2e.discovery/src/org/eclipse/m2e/internal/discovery/markers/DiscoveryWizardProposal.java
+++ b/org.eclipse.m2e.discovery/src/org/eclipse/m2e/internal/discovery/markers/DiscoveryWizardProposal.java
@@ -28,6 +28,7 @@ import org.eclipse.m2e.internal.discovery.MavenDiscovery;
import org.eclipse.m2e.internal.discovery.MavenDiscoveryIcons;
import org.eclipse.m2e.internal.discovery.Messages;
import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.IMarkerResolution;
import org.eclipse.ui.views.markers.WorkbenchMarkerResolution;
//IMPORANT: if you decide to rename the class please correct code in PomQuickAssistProcessor as well..
@@ -130,7 +131,15 @@ class DiscoveryWizardProposal extends WorkbenchMarkerResolution {
List<IMarker> handled = new ArrayList<IMarker>();
for(IMarker marker : markers) {
if(MavenDiscoveryMarkerResolutionGenerator.canResolve(marker)) {
- handled.add(marker);
+ //a way to filter out the markers with the current proposal
+ try {
+ IMarkerResolution[] cached = (IMarkerResolution[]) marker.getResource().getSessionProperty(MavenDiscoveryMarkerResolutionGenerator.QUALIFIED);
+ if (cached == null || cached[0] != this) {
+ handled.add(marker);
+ }
+ } catch(CoreException e) {
+ handled.add(marker);
+ }
}
}
return handled.toArray(new IMarker[handled.size()]);
diff --git a/org.eclipse.m2e.discovery/src/org/eclipse/m2e/internal/discovery/markers/MavenDiscoveryMarkerResolutionGenerator.java b/org.eclipse.m2e.discovery/src/org/eclipse/m2e/internal/discovery/markers/MavenDiscoveryMarkerResolutionGenerator.java
index 61420a76..e7a06b0c 100644
--- a/org.eclipse.m2e.discovery/src/org/eclipse/m2e/internal/discovery/markers/MavenDiscoveryMarkerResolutionGenerator.java
+++ b/org.eclipse.m2e.discovery/src/org/eclipse/m2e/internal/discovery/markers/MavenDiscoveryMarkerResolutionGenerator.java
@@ -22,7 +22,7 @@ import org.eclipse.ui.IMarkerResolutionGenerator2;
public class MavenDiscoveryMarkerResolutionGenerator implements IMarkerResolutionGenerator, IMarkerResolutionGenerator2 {
- private static QualifiedName QUALIFIED = new QualifiedName("org.eclipse.m2e.discovery", "discoveryResolution");
+ static QualifiedName QUALIFIED = new QualifiedName("org.eclipse.m2e.discovery", "discoveryResolution");
public boolean hasResolutions(IMarker marker) {
return canResolve(marker);

Back to the top