Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Lorenzo2020-05-28 12:49:06 +0000
committervincent lorenzo2020-06-03 14:47:55 +0000
commitf18c0065efe56bf8f1d6079bc2a312052a07c81c (patch)
tree9425d73100f079733d74afc46fe19baf85e9f686 /plugins
parenta9a04c1be0bd38c54b132bb8cc03bbb58cb9df34 (diff)
downloadorg.eclipse.papyrus-f18c0065efe56bf8f1d6079bc2a312052a07c81c.tar.gz
org.eclipse.papyrus-f18c0065efe56bf8f1d6079bc2a312052a07c81c.tar.xz
org.eclipse.papyrus-f18c0065efe56bf8f1d6079bc2a312052a07c81c.zip
Bug 561278: [Table] Provide API for actions on single click on cells
- fix a cast to avoid to break existing tests - this patch fix 5 tests Change-Id: Ibb78f1803f3f8fce0f5826e5c804ec7a1a64093c Signed-off-by: Vincent Lorenzo <vincent.lorenzo@cea.fr>
Diffstat (limited to 'plugins')
-rwxr-xr-xplugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/ActionHeaderLabelProvider.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/ActionHeaderLabelProvider.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/ActionHeaderLabelProvider.java
index a4e92150c26..bc425528038 100755
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/ActionHeaderLabelProvider.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/ActionHeaderLabelProvider.java
@@ -38,9 +38,12 @@ public class ActionHeaderLabelProvider extends AbstractNattableCellLabelProvider
*/
@Override
public boolean accept(Object element) {
- final ILabelProviderCellContextElementWrapper contextElement = (ILabelProviderCellContextElementWrapper) element;
- final Object value = contextElement.getObject();
- return ActionUtils.isAction(value);
+ if (element instanceof ILabelProviderContextElementWrapper) {
+ final ILabelProviderContextElementWrapper contextElement = (ILabelProviderContextElementWrapper) element;
+ final Object value = getWrappedValue(contextElement);
+ return ActionUtils.isAction(value);
+ }
+ return false;
}
/**

Back to the top