Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/AbstractTreeRowHideShowCategoryHandler.java')
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/AbstractTreeRowHideShowCategoryHandler.java19
1 files changed, 9 insertions, 10 deletions
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/AbstractTreeRowHideShowCategoryHandler.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/AbstractTreeRowHideShowCategoryHandler.java
index 5bf3284dd15..93ef172d0e2 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/AbstractTreeRowHideShowCategoryHandler.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/AbstractTreeRowHideShowCategoryHandler.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2014 CEA LIST and others.
+ * Copyright (c) 2014, 2020 CEA LIST and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -10,7 +10,7 @@
*
* Contributors:
* CEA LIST - Initial API and implementation
- *
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Bug 562864
*****************************************************************************/
package org.eclipse.papyrus.infra.nattable.handler;
@@ -55,17 +55,16 @@ public abstract class AbstractTreeRowHideShowCategoryHandler extends AbstractTre
}
/**
- * @see org.eclipse.papyrus.infra.nattable.handler.AbstractTableHandler#setEnabled(java.lang.Object)
+ * @see org.eclipse.papyrus.infra.nattable.handler.AbstractTableHandler#computeEnable(Object)
*
- * @param evaluationContext
+ * @return
*/
@Override
- public void setEnabled(Object evaluationContext) {
- super.setEnabled(evaluationContext);
- if (isEnabled()) {
- if (FillingConfigurationUtils.getAllTreeFillingConfiguration(getTable()).size() == 0) {
- setBaseEnabled(false);
- }
+ protected boolean computeEnable(Object evaluationContext) {
+ boolean calculatedValue = super.computeEnable(evaluationContext);
+ if (calculatedValue) {
+ calculatedValue = FillingConfigurationUtils.getAllTreeFillingConfiguration(getTable()).size() != 0;
}
+ return calculatedValue;
}
}

Back to the top