Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Tanasenko2014-03-30 19:09:45 -0400
committerAnton Tanasenko2014-03-30 19:09:45 -0400
commitf1cb31c8e2ab20e80a3fb1c7bc7915ce16a5afbd (patch)
tree02a71118b6b8c5d65cad5679084fcbee24545aae
parenteaff16254c06fad6fa85da0750b5e5f2fe2348e5 (diff)
downloadm2e-core-f1cb31c8e2ab20e80a3fb1c7bc7915ce16a5afbd.tar.gz
m2e-core-f1cb31c8e2ab20e80a3fb1c7bc7915ce16a5afbd.tar.xz
m2e-core-f1cb31c8e2ab20e80a3fb1c7bc7915ce16a5afbd.zip
431587 - PomHierarchyComponent based wizards and dialogs do not work
correctly Current project is at the head of hierarchy. Changed instanceof expression to List instead of LinkedList. Change-Id: Iba0483721ff4e0128f55a4bab6465edde7ad8798 Signed-off-by: Anton Tanasenko <atg.sleepless@gmail.com>
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/components/PomHierarchyComposite.java4
-rw-r--r--org.eclipse.m2e.refactoring/src/org/eclipse/m2e/refactoring/exclude/ExcludeArtifactRefactoring.java2
2 files changed, 3 insertions, 3 deletions
diff --git a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/components/PomHierarchyComposite.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/components/PomHierarchyComposite.java
index 5f8d0caa..9fac2d25 100644
--- a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/components/PomHierarchyComposite.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/components/PomHierarchyComposite.java
@@ -187,7 +187,7 @@ public class PomHierarchyComposite extends Composite implements IInputSelectionP
@SuppressWarnings("unchecked")
public Object[] getElements(Object inputElement) {
- if(inputElement instanceof LinkedList) {
+ if(inputElement instanceof List) {
List<ParentHierarchyEntry> projects = (List<ParentHierarchyEntry>) inputElement;
if(projects.isEmpty()) {
return new Object[0];
@@ -265,6 +265,6 @@ public class PomHierarchyComposite extends Composite implements IInputSelectionP
}
public ParentHierarchyEntry getProject() {
- return hierarchy.get(hierarchy.size() - 1);
+ return hierarchy.get(0);
}
}
diff --git a/org.eclipse.m2e.refactoring/src/org/eclipse/m2e/refactoring/exclude/ExcludeArtifactRefactoring.java b/org.eclipse.m2e.refactoring/src/org/eclipse/m2e/refactoring/exclude/ExcludeArtifactRefactoring.java
index b939d31b..33d11345 100644
--- a/org.eclipse.m2e.refactoring/src/org/eclipse/m2e/refactoring/exclude/ExcludeArtifactRefactoring.java
+++ b/org.eclipse.m2e.refactoring/src/org/eclipse/m2e/refactoring/exclude/ExcludeArtifactRefactoring.java
@@ -85,7 +85,7 @@ public class ExcludeArtifactRefactoring extends Refactoring {
public void setHierarchy(List<ParentHierarchyEntry> hierarchy) {
this.hierarchy = hierarchy;
- this.exclusionPoint = hierarchy != null ? hierarchy.get(hierarchy.size() - 1) : null;
+ this.exclusionPoint = hierarchy != null ? hierarchy.get(0) : null;
}
@Override

Back to the top