Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian W. Damus2016-06-23 00:43:59 +0000
committerChristian W. Damus2016-06-23 01:30:16 +0000
commit308453f3af877c18a3c33c6b6dc5f223e44007d5 (patch)
tree409c269ae6705671d8191f0e41a32ad5f0588338 /plugins/infra/emf
parent00054db1e3e180fdb00f3201842617df3712d63c (diff)
downloadorg.eclipse.papyrus-308453f3af877c18a3c33c6b6dc5f223e44007d5.tar.gz
org.eclipse.papyrus-308453f3af877c18a3c33c6b6dc5f223e44007d5.tar.xz
org.eclipse.papyrus-308453f3af877c18a3c33c6b6dc5f223e44007d5.zip
Bug 496598: [Utilities] CommandTreeIterator does not follow wrapper chains
https://bugs.eclipse.org/bugs/show_bug.cgi?id=496598 (cherry-picked from streams/2.0-maintenance) Ensure recursive unwrapping of nested wrappers in the tree walk. Change-Id: Id6d87afb5aaf81a75b2ecf59669de99ee6eea780
Diffstat (limited to 'plugins/infra/emf')
-rw-r--r--plugins/infra/emf/org.eclipse.papyrus.infra.emf.gmf/src/org/eclipse/papyrus/infra/emf/gmf/util/CommandTreeIterator.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf.gmf/src/org/eclipse/papyrus/infra/emf/gmf/util/CommandTreeIterator.java b/plugins/infra/emf/org.eclipse.papyrus.infra.emf.gmf/src/org/eclipse/papyrus/infra/emf/gmf/util/CommandTreeIterator.java
index 6f58619012f..cb1f221b061 100644
--- a/plugins/infra/emf/org.eclipse.papyrus.infra.emf.gmf/src/org/eclipse/papyrus/infra/emf/gmf/util/CommandTreeIterator.java
+++ b/plugins/infra/emf/org.eclipse.papyrus.infra.emf.gmf/src/org/eclipse/papyrus/infra/emf/gmf/util/CommandTreeIterator.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2015 Christian W. Damus and others.
+ * Copyright (c) 2015, 2016 Christian W. Damus and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -151,10 +151,10 @@ public class CommandTreeIterator<C> implements Iterator<C> {
Object result = command;
if (command instanceof ICommandWrapper<?>) {
- return ((ICommandWrapper<?>) command).getWrappedCommand();
+ result = ((ICommandWrapper<?>) command).getWrappedCommand();
} else if (ICommandWrapper.isWrapper(command, Object.class)) {
// Try a registered foreign wrapper
- return ICommandWrapper.unwrap(command, Object.class);
+ result = ICommandWrapper.unwrap(command, Object.class);
}
if (result != command) {

Back to the top