Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIgor Fedorenko2015-01-08 22:07:39 -0500
committerIgor Fedorenko2015-01-09 09:06:17 -0500
commit128c07f4deb66bff4b1f4da41472f7f5f54581b5 (patch)
treecd11b1f95cb2817b736aa90cec754934d5519205
parent226d57bb04f23fd424764f4fed1d3e5db3e8f873 (diff)
downloadm2e-core-128c07f4deb66bff4b1f4da41472f7f5f54581b5.tar.gz
m2e-core-128c07f4deb66bff4b1f4da41472f7f5f54581b5.tar.xz
m2e-core-128c07f4deb66bff4b1f4da41472f7f5f54581b5.zip
457093 quickfix does not find required configurators in the catalog
Change-Id: I05ec538be43d8832574067c645a7b36d32444744 Signed-off-by: Igor Fedorenko <igor@ifedorenko.com>
-rw-r--r--org.eclipse.m2e.discovery/src/org/eclipse/m2e/internal/discovery/wizards/MavenCatalogViewer.java18
1 files changed, 8 insertions, 10 deletions
diff --git a/org.eclipse.m2e.discovery/src/org/eclipse/m2e/internal/discovery/wizards/MavenCatalogViewer.java b/org.eclipse.m2e.discovery/src/org/eclipse/m2e/internal/discovery/wizards/MavenCatalogViewer.java
index 054ef62b..16340a1d 100644
--- a/org.eclipse.m2e.discovery/src/org/eclipse/m2e/internal/discovery/wizards/MavenCatalogViewer.java
+++ b/org.eclipse.m2e.discovery/src/org/eclipse/m2e/internal/discovery/wizards/MavenCatalogViewer.java
@@ -12,7 +12,9 @@
package org.eclipse.m2e.internal.discovery.wizards;
import java.lang.reflect.InvocationTargetException;
+import java.util.ArrayList;
import java.util.Collection;
+import java.util.List;
import java.util.Set;
import org.slf4j.Logger;
@@ -24,7 +26,6 @@ import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.SubMonitor;
import org.eclipse.equinox.internal.p2.discovery.Catalog;
import org.eclipse.equinox.internal.p2.discovery.model.CatalogItem;
-import org.eclipse.equinox.internal.p2.discovery.model.Tag;
import org.eclipse.equinox.internal.p2.ui.discovery.wizards.CatalogConfiguration;
import org.eclipse.equinox.internal.p2.ui.discovery.wizards.CatalogViewer;
import org.eclipse.jface.dialogs.IMessageProvider;
@@ -47,10 +48,6 @@ import org.eclipse.m2e.internal.discovery.Messages;
public class MavenCatalogViewer extends CatalogViewer {
public static final Logger log = LoggerFactory.getLogger(MavenCatalogViewer.class);
- private static final String CONFIGURATOR_PREFIX = "configurator:"; //$NON-NLS-1$
-
- private static final String LIFECYCLE_PREFIX = "lifecycle:"; //$NON-NLS-1$
-
private Set<String> installedFeatures;
private boolean noneApplicable;
@@ -115,10 +112,12 @@ public class MavenCatalogViewer extends CatalogViewer {
}
}
+ List<String> projectConfigurators = new ArrayList<String>();
+ List<String> mappingStrategies = new ArrayList<String>();
+ MavenDiscovery.getProvidedProjectConfigurators(ci, projectConfigurators, mappingStrategies);
+
for(String configuratorId : selectedConfiguratorIds) {
- Tag configuratorIdTag = new Tag(CONFIGURATOR_PREFIX + configuratorId, CONFIGURATOR_PREFIX
- + configuratorId);
- if(ci.hasTag(configuratorIdTag)) {
+ if(projectConfigurators.contains(configuratorId)) {
selected = true;
select(ci);
break;
@@ -129,8 +128,7 @@ public class MavenCatalogViewer extends CatalogViewer {
}
for(String lifecycleId : selectedLifecycleIds) {
- Tag lifecycleIdTag = new Tag(LIFECYCLE_PREFIX + lifecycleId, LIFECYCLE_PREFIX + lifecycleId);
- if(ci.hasTag(lifecycleIdTag)) {
+ if(mappingStrategies.contains(lifecycleId)) {
select(ci);
break;
}

Back to the top