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/manager/axis/CompositeTreeAxisManagerForEventList.java')
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/axis/CompositeTreeAxisManagerForEventList.java28
1 files changed, 28 insertions, 0 deletions
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/axis/CompositeTreeAxisManagerForEventList.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/axis/CompositeTreeAxisManagerForEventList.java
index e7f131ea9eb..6ed642bdf65 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/axis/CompositeTreeAxisManagerForEventList.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/axis/CompositeTreeAxisManagerForEventList.java
@@ -13,6 +13,7 @@
*****************************************************************************/
package org.eclipse.papyrus.infra.nattable.manager.axis;
+import java.util.ArrayList;
import java.util.List;
import org.eclipse.emf.common.notify.Notification;
@@ -22,6 +23,7 @@ import org.eclipse.nebula.widgets.nattable.sort.ISortModel;
import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
import org.eclipse.papyrus.infra.gmfdiag.common.utils.GMFUnsafe;
import org.eclipse.papyrus.infra.nattable.Activator;
+import org.eclipse.papyrus.infra.nattable.manager.table.TreeNattableModelManager;
import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.IAxis;
import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.ITreeItemAxis;
import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.NattableaxisPackage;
@@ -30,7 +32,9 @@ import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfigurati
import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.TableHeaderAxisConfiguration;
import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.TreeFillingConfiguration;
import org.eclipse.papyrus.infra.nattable.utils.EventListHelper;
+import org.eclipse.papyrus.infra.nattable.utils.FillingConfigurationUtils;
import org.eclipse.papyrus.infra.nattable.utils.HeaderAxisConfigurationManagementUtils;
+import org.eclipse.papyrus.infra.nattable.utils.StyleUtils;
import ca.odell.glazedlists.EventList;
@@ -242,4 +246,28 @@ public class CompositeTreeAxisManagerForEventList extends CompositeAxisManagerFo
// required
getTableManager().refreshNatTable();
}
+
+ /**
+ * @see org.eclipse.papyrus.infra.nattable.manager.axis.CompositeAxisManagerForEventList#fillingConfigurationsHaveChanged()
+ *
+ */
+ @Override
+ public void fillingConfigurationsHaveChanged() {
+ super.fillingConfigurationsHaveChanged();
+
+ //fix for the bug 467723: [Tree Table] changing categories when categories are hidden empty the table
+ //we reset the visibility status for all depths to true
+ List<Integer> depths = new ArrayList<Integer>();
+ for(int i=0;i<=FillingConfigurationUtils.getMaxDepthForTree(getTableManager().getTable());i++){
+ depths.add(Integer.valueOf(i));
+ }
+ ((TreeNattableModelManager) getTableManager()).hideShowCategories(null, depths);
+ List<Integer> hiddenDepth = StyleUtils.getHiddenDepths(getTableManager());
+ if (hiddenDepth.size() > 0) {
+ //we reset the hidden depth (allow to expand hidden category too (fix the bug
+ ((TreeNattableModelManager) getTableManager()).hideShowCategories(hiddenDepth, null);
+ }
+ // required
+ getTableManager().refreshNatTable();
+ }
}

Back to the top