Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAsma Smaoui2021-05-31 08:15:57 +0000
committerPatrick Tessier2021-10-28 13:50:57 +0000
commit4f2ca938abf46ea689b454493f6dd36e6f98fb01 (patch)
tree5cf1c94273bbd3d2f77bdf60b7206859fa370e02
parentaa30e36bf029740d83549c0d2816d5cc4132d30a (diff)
downloadorg.eclipse.papyrus-4f2ca938abf46ea689b454493f6dd36e6f98fb01.tar.gz
org.eclipse.papyrus-4f2ca938abf46ea689b454493f6dd36e6f98fb01.tar.xz
org.eclipse.papyrus-4f2ca938abf46ea689b454493f6dd36e6f98fb01.zip
Bug 573840 - [Properties] empty line table displayed in the Properties
view is not linked to AF, KindId is null to be able to display an empty line table in the Properties view, we should not rely on the KindId property of the table. the table config is not always referenced in the AF. use the typeID instead Change-Id: Ie25f17fbea3b5787d3a9db2af1af7b6dc343fe4f Signed-off-by: Asma Smaoui <asma.smaoui@cea.fr>
-rwxr-xr-xexamples/uml/org.eclipse.papyrus.example.uml.nattable.empty.line/resources/uml.architecture2
-rwxr-xr-xexamples/uml/org.eclipse.papyrus.example.uml.nattable.empty.line/src/org/eclipse/papyrus/example/uml/nattable/empty/line/Activator.java5
-rwxr-xr-xexamples/uml/org.eclipse.papyrus.example.uml.nattable.empty.line/src/org/eclipse/papyrus/example/uml/nattable/empty/line/managers/cell/CustomEmptyAxisCellManager.java5
-rwxr-xr-xexamples/uml/org.eclipse.papyrus.example.uml.nattable.empty.line/src/org/eclipse/papyrus/example/uml/nattable/empty/line/providers/CustomRowHeaderLabelProvider.java5
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/widgets/NattablePropertyEditor.java7
5 files changed, 14 insertions, 10 deletions
diff --git a/examples/uml/org.eclipse.papyrus.example.uml.nattable.empty.line/resources/uml.architecture b/examples/uml/org.eclipse.papyrus.example.uml.nattable.empty.line/resources/uml.architecture
index fba163a48f0..4ee6fcd3141 100755
--- a/examples/uml/org.eclipse.papyrus.example.uml.nattable.empty.line/resources/uml.architecture
+++ b/examples/uml/org.eclipse.papyrus.example.uml.nattable.empty.line/resources/uml.architecture
@@ -32,7 +32,7 @@
<elementTypes xmi:type="elementtypesconfigurations:ElementTypeSetConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/umldi.elementtypesconfigurations#_ScP1oFYCEeS0WsAAtVmToA"/>
<elementTypes xmi:type="elementtypesconfigurations:ElementTypeSetConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types.ui/model/uml-advice.elementtypesconfigurations#_ScP1oFYCEeS0WsAAtVmToA"/>
<elementTypes xmi:type="elementtypesconfigurations:ElementTypeSetConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.diagram.sequence/model/SequenceDiagram.elementtypesconfigurations#_uuwoQENKEeimO7ZhVBpjkg"/>
- <representationKinds xmi:type="nattablerepresentation:PapyrusTable" xmi:id="_P3J1cEa7EeSVGbM3cmVSqQ" id="org.eclipse.papyrus.uml.table.genericTree.empty.lines" name="Example Generic Tree Table With Empty Lines" icon="platform:/plugin/org.eclipse.papyrus.example.uml.nattable.empty.line/icons/table.png" concerns="_HQhf48SYEeaKZJ_pGfaSiA" grayedIcon="platform:/plugin/org.eclipse.papyrus.example.uml.nattable.empty.line/icons/table_grayed.png" implementationID="ExampleGenericTreeTableEmptyLines">
+ <representationKinds xmi:type="nattablerepresentation:PapyrusTable" xmi:id="_P3J1cEa7EeSVGbM3cmVSqQ" id="ExampleGenericTreeTableEmptyLines" name="Example Generic Tree Table With Empty Lines" icon="platform:/plugin/org.eclipse.papyrus.example.uml.nattable.empty.line/icons/table.png" concerns="_HQhf48SYEeaKZJ_pGfaSiA" grayedIcon="platform:/plugin/org.eclipse.papyrus.example.uml.nattable.empty.line/icons/table_grayed.png" implementationID="ExampleGenericTreeTableEmptyLines">
<modelRules xmi:type="representation:ModelRule" xmi:id="_vZwgkEr7EeSVGbM3cmVSqQ" permit="true" elementMultiplicity="1" multiplicity="-1">
<element xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
</modelRules>
diff --git a/examples/uml/org.eclipse.papyrus.example.uml.nattable.empty.line/src/org/eclipse/papyrus/example/uml/nattable/empty/line/Activator.java b/examples/uml/org.eclipse.papyrus.example.uml.nattable.empty.line/src/org/eclipse/papyrus/example/uml/nattable/empty/line/Activator.java
index 24fe93e517c..9f36529c049 100755
--- a/examples/uml/org.eclipse.papyrus.example.uml.nattable.empty.line/src/org/eclipse/papyrus/example/uml/nattable/empty/line/Activator.java
+++ b/examples/uml/org.eclipse.papyrus.example.uml.nattable.empty.line/src/org/eclipse/papyrus/example/uml/nattable/empty/line/Activator.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2020 CEA LIST
+ * Copyright (c) 2020,2021 CEA LIST
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -10,6 +10,7 @@
*
* Contributors:
* Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ * Asma SMAOUI (CEA LIST) - bug 573840
*****************************************************************************/
package org.eclipse.papyrus.example.uml.nattable.empty.line;
@@ -27,7 +28,7 @@ public class Activator extends AbstractUIPlugin {
public static final String TABLE_TYPE = "ExampleGenericTreeTableEmptyLines";//$NON-NLS-1$
- public static final String TABLE_KIND_ID = "org.eclipse.papyrus.uml.table.genericTree.empty.lines"; //$NON-NLS-1$
+ // public static final String TABLE_KIND_ID = "org.eclipse.papyrus.uml.table.genericTree.empty.lines"; //$NON-NLS-1$
// The shared instance
private static Activator plugin;
diff --git a/examples/uml/org.eclipse.papyrus.example.uml.nattable.empty.line/src/org/eclipse/papyrus/example/uml/nattable/empty/line/managers/cell/CustomEmptyAxisCellManager.java b/examples/uml/org.eclipse.papyrus.example.uml.nattable.empty.line/src/org/eclipse/papyrus/example/uml/nattable/empty/line/managers/cell/CustomEmptyAxisCellManager.java
index dceeda26c2f..1bf362c227a 100755
--- a/examples/uml/org.eclipse.papyrus.example.uml.nattable.empty.line/src/org/eclipse/papyrus/example/uml/nattable/empty/line/managers/cell/CustomEmptyAxisCellManager.java
+++ b/examples/uml/org.eclipse.papyrus.example.uml.nattable.empty.line/src/org/eclipse/papyrus/example/uml/nattable/empty/line/managers/cell/CustomEmptyAxisCellManager.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2020 CEA LIST
+ * Copyright (c) 2020,2021 CEA LIST
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -10,6 +10,7 @@
*
* Contributors:
* Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ * Asma SMAOUI (CEA LIST) - bug 573840
*****************************************************************************/
package org.eclipse.papyrus.example.uml.nattable.empty.line.managers.cell;
@@ -29,7 +30,7 @@ public class CustomEmptyAxisCellManager extends AbstractEmptyAxisCellManager {
* @param tableKindId
*/
public CustomEmptyAxisCellManager() {
- super(Activator.TABLE_KIND_ID);
+ super(Activator.TABLE_TYPE);
}
}
diff --git a/examples/uml/org.eclipse.papyrus.example.uml.nattable.empty.line/src/org/eclipse/papyrus/example/uml/nattable/empty/line/providers/CustomRowHeaderLabelProvider.java b/examples/uml/org.eclipse.papyrus.example.uml.nattable.empty.line/src/org/eclipse/papyrus/example/uml/nattable/empty/line/providers/CustomRowHeaderLabelProvider.java
index 16a3d028bf2..95ac7b9cd96 100755
--- a/examples/uml/org.eclipse.papyrus.example.uml.nattable.empty.line/src/org/eclipse/papyrus/example/uml/nattable/empty/line/providers/CustomRowHeaderLabelProvider.java
+++ b/examples/uml/org.eclipse.papyrus.example.uml.nattable.empty.line/src/org/eclipse/papyrus/example/uml/nattable/empty/line/providers/CustomRowHeaderLabelProvider.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2020 CEA LIST
+ * Copyright (c) 2020,2021 CEA LIST
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -10,6 +10,7 @@
*
* Contributors:
* Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ * Asma SMAOUI (CEA LIST) - bug 573840
*****************************************************************************/
package org.eclipse.papyrus.example.uml.nattable.empty.line.providers;
@@ -30,7 +31,7 @@ public class CustomRowHeaderLabelProvider extends AbstractEmptyLineRowHeaderLabe
* @param tableKind
*/
public CustomRowHeaderLabelProvider() {
- super(Activator.TABLE_KIND_ID);
+ super(Activator.TABLE_TYPE);
}
/**
diff --git a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/widgets/NattablePropertyEditor.java b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/widgets/NattablePropertyEditor.java
index 12827e3d84a..4681a8a2652 100644
--- a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/widgets/NattablePropertyEditor.java
+++ b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/widgets/NattablePropertyEditor.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2015, 2016, 2017 CEA LIST, Christian W. Damus, and others.
+ * Copyright (c) 2015, 2016, 2017, 2021 CEA LIST, 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 2.0
@@ -12,7 +12,7 @@
* Nicolas FAUVERGUE (CEA LIST) nicolas.fauvergue@cea.fr - Initial API and implementation, Bug 502160, 494531
* Christian W. Damus - bugs 493858, 493853, 516310, 517313
* Vincent Lorenzo (CEA-LIST) vincent.lorenzo@cea.fr - bugs 494537, 504745
- *
+ * Asma SMAOUI (CEA LIST) - bug 573840
*****************************************************************************/
package org.eclipse.papyrus.uml.properties.widgets;
@@ -802,7 +802,8 @@ public class NattablePropertyEditor extends AbstractPropertyEditor {
}
table.setName(getLabel());
-
+ // for table used in property view, the kindId was null, because it is given by the AF. So we propose to use the type for kindId
+ table.setTableKindId(table.getTableConfiguration().getType());
AbstractAxisProvider rowProvider = tableConfiguration.getDefaultRowAxisProvider();
if (rowProvider == null) {
rowProvider = NattableaxisproviderFactory.eINSTANCE.createMasterObjectAxisProvider();

Back to the top