Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Lorenzo2020-05-15 12:17:12 +0000
committerPatrick Tessier2020-05-26 15:09:19 +0000
commitee72c27b2b3276ff3128148e289061f6f4433f3e (patch)
tree05e1329bc71d96125e4e1ec7fbc3b71653db0247 /plugins
parent1a3305aa62de658f5a3dee738e7d92e666cf1237 (diff)
downloadorg.eclipse.papyrus-ee72c27b2b3276ff3128148e289061f6f4433f3e.tar.gz
org.eclipse.papyrus-ee72c27b2b3276ff3128148e289061f6f4433f3e.tar.xz
org.eclipse.papyrus-ee72c27b2b3276ff3128148e289061f6f4433f3e.zip
Bug 563217: [Table] the axis manager EmptyLineUMLElementTreeAxisManagerForEventList doesn't display empty line in empty table
Change-Id: I99d961ff15d3941ec5f16c0fde124934566f7073 Signed-off-by: Vincent Lorenzo <vincent.lorenzo@cea.fr>
Diffstat (limited to 'plugins')
-rwxr-xr-xplugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/manager/axis/EmptyLineUMLElementTreeAxisManagerForEventList.java27
1 files changed, 21 insertions, 6 deletions
diff --git a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/manager/axis/EmptyLineUMLElementTreeAxisManagerForEventList.java b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/manager/axis/EmptyLineUMLElementTreeAxisManagerForEventList.java
index 5e6d8270d6f..12132e5763d 100755
--- a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/manager/axis/EmptyLineUMLElementTreeAxisManagerForEventList.java
+++ b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/manager/axis/EmptyLineUMLElementTreeAxisManagerForEventList.java
@@ -11,7 +11,7 @@
*
* Contributors:
* Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- *
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - bug 563217
*****************************************************************************/
package org.eclipse.papyrus.uml.nattable.manager.axis;
@@ -27,7 +27,7 @@ import org.eclipse.papyrus.infra.nattable.utils.FillingConfigurationUtils;
/**
* TODO : not yet tested with no {@link TreeFillingConfiguration} for depth==0
* Axis Manager with one empty line at each level
- *
+ *
* @since 5.4
*/
public class EmptyLineUMLElementTreeAxisManagerForEventList extends UMLElementTreeAxisManagerForEventList {
@@ -70,10 +70,24 @@ public class EmptyLineUMLElementTreeAxisManagerForEventList extends UMLElementTr
* @param axis
*/
@Override
- protected void fillChildrenForSemanticElement(ITreeItemAxis axis) {
- if (this.createEmptyRow && axis != null
- && axis.getElement() != null) {// to avoid to add empty axis to an empty axis
- if (axis.getChildren().size() == 0) {
+ protected void fillChildrenForSemanticElement(final ITreeItemAxis axis) {
+ if (this.createEmptyRow) {
+ if (axis == null) {
+ int nextDepth = 0;
+ Object context = getTableContext();
+ final List<TreeFillingConfiguration> confs = FillingConfigurationUtils.getTreeFillingConfigurationForDepth(getTable(), representedAxisManager, nextDepth);
+ for (TreeFillingConfiguration current : confs) {
+ final Collection<?> values = getFilteredValueAsCollection(current, context, nextDepth);
+ // with empty line, we always create a new axis for the TreeFillingConfiguration
+ ITreeItemAxis newAxis = addObject(axis, current);
+ if (nextDepth == 0) {
+ for (Object curr : values) {
+ addObject(newAxis, curr);
+ }
+ }
+ }
+ }
+ if (axis != null && axis.getElement() != null && axis.getChildren().size() == 0) {
int nextDepth = getSemanticDepth(axis) + 1;
Object context = axis.getElement();
Assert.isTrue(!(context instanceof TreeFillingConfiguration));
@@ -95,5 +109,6 @@ public class EmptyLineUMLElementTreeAxisManagerForEventList extends UMLElementTr
} else {
super.fillChildrenForSemanticElement(axis);
}
+
}
}

Back to the top