Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFred Bricon2015-06-25 15:48:02 -0400
committerFred Bricon2015-06-25 19:08:14 -0400
commit8d6b4bf5acaa79a05ffdba6532c35688264ab612 (patch)
treeb49887394e6c4f65428dfcea7800bf369713c4f3 /org.eclipse.m2e.core
parente4081286397bbab392a86241a5115b587739cfb6 (diff)
downloadm2e-core-8d6b4bf5acaa79a05ffdba6532c35688264ab612.tar.gz
m2e-core-8d6b4bf5acaa79a05ffdba6532c35688264ab612.tar.xz
m2e-core-8d6b4bf5acaa79a05ffdba6532c35688264ab612.zip
471038 : fix project configurator sort
Change-Id: I1b656cc41c7160f9936ab765da6cfae914d4b391 Signed-off-by: Fred Bricon <fbricon@gmail.com>
Diffstat (limited to 'org.eclipse.m2e.core')
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/lifecyclemapping/ProjectConfigurationElementSorter.java16
1 files changed, 12 insertions, 4 deletions
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/lifecyclemapping/ProjectConfigurationElementSorter.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/lifecyclemapping/ProjectConfigurationElementSorter.java
index 2df199ab..33a6b1b7 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/lifecyclemapping/ProjectConfigurationElementSorter.java
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/lifecyclemapping/ProjectConfigurationElementSorter.java
@@ -169,10 +169,18 @@ public class ProjectConfigurationElementSorter {
continue;
}
- List<String> children = fullDag.getChildLabels(id);
- if(children == null || children.isEmpty()) {
- //found primary configurator
- //get secondaries now
+ List<String> predecessors = fullDag.getChildLabels(id);
+
+ boolean addAsPrimary = true;
+ if(predecessors != null && !predecessors.isEmpty()) {
+ for(String p : predecessors) {
+ if(configuratorIds.contains(p)) {
+ addAsPrimary = false;
+ break;
+ }
+ }
+ }
+ if(addAsPrimary) {
Set<String> secondaries = new LinkedHashSet<>();
getDependents(id, fullDag, secondaries);
primaryConfigurators.put(id, new ArrayList<>(secondaries));

Back to the top