Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas FAUVERGUE2015-11-17 22:51:59 +0000
committerGerrit Code Review @ Eclipse.org2015-11-18 07:41:07 +0000
commit7dbaf8867e0b3e43d606caa8f2d342dbf479d3d6 (patch)
tree456c49e0df6f28358cebc7d70bb0eb41c839ea08
parent2496e30940ce49f733c53371e32f703ccc787221 (diff)
downloadorg.eclipse.papyrus-7dbaf8867e0b3e43d606caa8f2d342dbf479d3d6.tar.gz
org.eclipse.papyrus-7dbaf8867e0b3e43d606caa8f2d342dbf479d3d6.tar.xz
org.eclipse.papyrus-7dbaf8867e0b3e43d606caa8f2d342dbf479d3d6.zip
Bug 476618: [Table] Improve the re-import mechanism in an existing table
https://bugs.eclipse.org/bugs/show_bug.cgi?id=476618 Implementation of feature paste/insert/import in table. Change-Id: I86e4fae0c2c12c32e6ac5170dcf3e5362cd2ebeb Signed-off-by: Nicolas FAUVERGUE <nicolas.fauvergue@all4tec.net>
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/manager/axis/EObjectAxisManager.java38
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/manager/axis/EObjectTreeAxisManagerForEventList.java40
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/manager/axis/EOperationAxisManager.java83
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/manager/axis/EStructuralFeatureAxisManager.java77
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/manager/cell/EMFFeatureValueCellManager.java1039
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/provider/EMFFeatureHeaderLabelProvider.java513
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/provider/TreeFillingFeatureLabelProvider.java172
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/provider/TreeFillingOperationLabelProvider.java4
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model.edit/plugin.properties471
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/provider/PasteEObjectConfigurationItemProvider.java346
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/model/nattable.ecore4100
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/model/nattable.genmodel602
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/NattableaxisconfigurationPackage.java4438
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/PasteEObjectConfiguration.java206
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/impl/NattableaxisconfigurationPackageImpl.java1793
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/impl/PasteEObjectConfigurationImpl.java550
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties/META-INF/MANIFEST.MF4
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties/model/ui/CanPasteEObjectColumnSection.xwt55
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties/model/ui/CanPasteEObjectRowSection.xwt53
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties/src/org/eclipse/papyrus/infra/nattable/properties/modelelement/NatTableModelElement.java1295
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties/src/org/eclipse/papyrus/infra/nattable/properties/observable/ColumnPasteEObjectAxisIdentifierObservableValue.java58
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties/src/org/eclipse/papyrus/infra/nattable/properties/observable/RowPasteEObjectAxisIdentifierObservableValue.java58
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties/src/org/eclipse/papyrus/infra/nattable/properties/provider/AbstractAxisIdentifierContentProvider.java90
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties/src/org/eclipse/papyrus/infra/nattable/properties/provider/AxisIdentifierLabelProvider.java143
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties/src/org/eclipse/papyrus/infra/nattable/properties/provider/ColumnAxisIdentifierContentProvider.java32
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties/src/org/eclipse/papyrus/infra/nattable/properties/provider/RowAxisIdentifierContentProvider.java32
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties/src/org/eclipse/papyrus/infra/nattable/properties/utils/Constants.java214
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/icons/insert.gifbin0 -> 545 bytes
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/icons/insert_row.gifbin0 -> 865 bytes
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/icons/paste_edit.pngbin0 -> 531 bytes
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/plugin.xml191
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/command/ErrorTransactionalCommand.java98
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/configuration/ClearSelectionUIBindingConfiguration.java47
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/dialog/PasteImportStatusDialog.java264
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/ImportTableHandler.java128
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/InsertInTableHandler.java113
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/PasteInTableHandler.java183
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/layer/PapyrusSelectionLayer.java243
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/AbstractInsertImportInNattableManager.java351
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/AbstractPasteImportInNattableManager.java1110
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/AbstractPasteImportInsertInNattableManager.java540
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/ImportAxisAsInsertInNattableManager.java (renamed from plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/ImportAxisInNattableManager.java)161
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/ImportAxisAsPasteInNattableManager.java89
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/InsertInNattableManager.java98
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/PasteAxisInNattableManager.java196
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/axis/AbstractAxisManager.java28
-rwxr-xr-xplugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/axis/CompositeAxisManager.java1677
-rwxr-xr-xplugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/axis/CompositeAxisManagerForEventList.java51
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/axis/IAxisManager.java615
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/cell/StringResolutionProblemWrapperCellManager.java8
-rwxr-xr-xplugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/table/AbstractNattableWidgetManager.java13
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/table/INattableModelManager.java416
-rwxr-xr-xplugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/table/NattableModelManager.java142
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/messages/Messages.java103
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/messages/messages.properties63
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/AbstractNattableCellLabelProvider.java376
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/AbstractPasteInSelectionNattableCommandProvider.java2036
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/PasteEObjectAxisInNattableCommandProvider.java1727
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/PasteEObjectAxisInTableCommandProvider.java1391
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/PasteEObjectTreeAxisInNattableCommandProvider.java16
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/PasteInSelectionNattableCommandProvider.java328
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/PasteInSelectionTreeNattableCommandProvider.java465
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/PasteNattableCommandProvider.java34
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/TableSelectionProvider.java824
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/selection/PapyrusSelectColumnCommandHandler.java161
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/selection/PapyrusSelectRowCommandHandler.java235
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/selection/event/PapyrusColumnSelectionEvent.java81
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/selection/event/PapyrusRowSelectionEvent.java85
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/AbstractPasteInsertInTableHandler.java127
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/ExtendedCompoundCommand.java85
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/IPapyrusNattableStatus.java44
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/InsertedElementInNattable.java165
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/NattableConfigAttributes.java256
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/PapyrusNattableMultiStatus.java108
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/PapyrusNattableStatus.java168
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/PasteHelperUtils.java79
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/PastePropertyTester.java135
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/TableSelectionWrapper.java333
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/TypeSelectionEnum.java67
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/UserActionConstants.java46
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/wizard/ImportTableWizard.java316
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/wizard/pages/ImportFilePage.java368
-rw-r--r--plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.allocation.config/resources/allocation.nattableconfiguration74
-rw-r--r--plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration60
-rw-r--r--plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config/configs/class_synchronized_tree.nattableconfiguration126
-rw-r--r--plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.stereotype.display/src/org/eclipse/papyrus/uml/nattable/stereotype/display/label/provider/StereotypeDisplayPropertyHeaderLabelProvider.java7
-rw-r--r--plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/manager/axis/UMLElementAxisManager.java131
-rw-r--r--plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/manager/axis/UMLElementTreeAxisManagerForEventList.java502
-rw-r--r--plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/manager/axis/UMLStereotypePropertyAxisManager.java80
-rw-r--r--plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/provider/StereotypePropertyHeaderLabelProvider.java20
-rw-r--r--plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/provider/TreeFillingStereotypePropertyLabelProvider.java170
-rwxr-xr-xtests/junit/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/tests/RevealRequirementTableTest.java2
92 files changed, 21315 insertions, 13347 deletions
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/manager/axis/EObjectAxisManager.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/manager/axis/EObjectAxisManager.java
index f2318f2571c..8112a7dc12d 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/manager/axis/EObjectAxisManager.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/manager/axis/EObjectAxisManager.java
@@ -82,6 +82,39 @@ public class EObjectAxisManager extends AbstractAxisManager {
*/
@Override
public Command getAddAxisCommand(final TransactionalEditingDomain domain, final Collection<Object> objectToAdd) {
+ final Collection<IAxis> toAdd = getAxisToAdd(objectToAdd);
+ if (!toAdd.isEmpty()) {
+ return AddCommand.create(domain, getRepresentedContentProvider(), NattableaxisproviderPackage.eINSTANCE.getAxisProvider_Axis(), toAdd);
+ }
+ return null;
+ }
+
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.axis.AbstractAxisManager#getAddAxisCommand(org.eclipse.emf.transaction.TransactionalEditingDomain, java.util.Collection, int)
+ *
+ * @param domain
+ * @param objectToAdd
+ * @param index
+ * @return
+ */
+ @Override
+ public Command getAddAxisCommand(final TransactionalEditingDomain domain, final Collection<Object> objectToAdd, final int index) {
+ final Collection<IAxis> toAdd = getAxisToAdd(objectToAdd);
+ if (!toAdd.isEmpty()) {
+ return AddCommand.create(domain, getRepresentedContentProvider(), NattableaxisproviderPackage.eINSTANCE.getAxisProvider_Axis(), toAdd, index);
+ }
+ return null;
+ }
+
+ /**
+ * Get the axis to add from the objects to add.
+ *
+ * @param objectToAdd The objects to add.
+ * @return The axis to add.
+ */
+ protected Collection<IAxis> getAxisToAdd(final Collection<Object> objectToAdd){
final Collection<IAxis> toAdd = new ArrayList<IAxis>();
for (final Object object : objectToAdd) {
if (isAllowedContents(object) && !isAlreadyManaged(object)) {
@@ -92,10 +125,7 @@ public class EObjectAxisManager extends AbstractAxisManager {
managedObject.add(object);
}
}
- if (!toAdd.isEmpty()) {
- return AddCommand.create(domain, getRepresentedContentProvider(), NattableaxisproviderPackage.eINSTANCE.getAxisProvider_Axis(), toAdd);
- }
- return null;
+ return toAdd;
}
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/manager/axis/EObjectTreeAxisManagerForEventList.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/manager/axis/EObjectTreeAxisManagerForEventList.java
index cf375726ba9..45547a8e3d2 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/manager/axis/EObjectTreeAxisManagerForEventList.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/manager/axis/EObjectTreeAxisManagerForEventList.java
@@ -53,7 +53,39 @@ public class EObjectTreeAxisManagerForEventList extends AbstractTreeAxisManagerF
* @return
*/
@Override
- public Command getAddAxisCommand(TransactionalEditingDomain domain, Collection<Object> objectToAdd) {
+ public Command getAddAxisCommand(final TransactionalEditingDomain domain, final Collection<Object> objectToAdd) {
+ final Collection<IAxis> toAdd = getAxisToAdd(objectToAdd);
+ if (!toAdd.isEmpty()) {
+ return AddCommand.create(domain, getRepresentedContentProvider(), NattableaxisproviderPackage.eINSTANCE.getAxisProvider_Axis(), toAdd);
+ }
+ return null;
+ }
+
+
+ /**
+ * @see org.eclipse.papyrus.infra.nattable.manager.axis.AbstractAxisManager#getAddAxisCommand(org.eclipse.emf.transaction.TransactionalEditingDomain, java.util.Collection, int)
+ *
+ * @param domain
+ * @param objectToAdd
+ * @param index
+ * @return
+ */
+ @Override
+ public Command getAddAxisCommand(final TransactionalEditingDomain domain, final Collection<Object> objectToAdd, final int index) {
+ final Collection<IAxis> toAdd = getAxisToAdd(objectToAdd);
+ if (!toAdd.isEmpty()) {
+ return AddCommand.create(domain, getRepresentedContentProvider(), NattableaxisproviderPackage.eINSTANCE.getAxisProvider_Axis(), toAdd, index);
+ }
+ return null;
+ }
+
+ /**
+ * Get the axis to add from the objects to add.
+ *
+ * @param objectToAdd The objects to add.
+ * @return The axis to add.
+ */
+ protected Collection<IAxis> getAxisToAdd(final Collection<Object> objectToAdd){
final Collection<IAxis> toAdd = new ArrayList<IAxis>();
for (final Object object : objectToAdd) {
if (isAllowedContents(object, null, null, 0) && !isAlreadyManaged(object)) {
@@ -63,14 +95,10 @@ public class EObjectTreeAxisManagerForEventList extends AbstractTreeAxisManagerF
toAdd.add(horizontalAxis);
}
}
- if (!toAdd.isEmpty()) {
- return AddCommand.create(domain, getRepresentedContentProvider(), NattableaxisproviderPackage.eINSTANCE.getAxisProvider_Axis(), toAdd);
- }
- return null;
+ return toAdd;
}
-
/**
* @param objectToTest
* @param depth
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/manager/axis/EOperationAxisManager.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/manager/axis/EOperationAxisManager.java
index 90902021e1a..7313e9456b2 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/manager/axis/EOperationAxisManager.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/manager/axis/EOperationAxisManager.java
@@ -24,6 +24,7 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EOperation;
import org.eclipse.emf.edit.command.AddCommand;
import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.EObjectAxis;
import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.EOperationAxis;
import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.IAxis;
import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.NattableaxisFactory;
@@ -80,6 +81,39 @@ public class EOperationAxisManager extends EObjectAxisManager {
*/
@Override
public Command getAddAxisCommand(final TransactionalEditingDomain domain, final Collection<Object> objectToAdd) {
+ final Collection<IAxis> toAdd = getAxisToAdd(objectToAdd);
+ if (!toAdd.isEmpty()) {
+ return AddCommand.create(domain, getRepresentedContentProvider(), NattableaxisproviderPackage.eINSTANCE.getAxisProvider_Axis(), toAdd);
+ }
+ return null;
+ }
+
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.emf.nattable.manager.axis.EObjectAxisManager#getAddAxisCommand(org.eclipse.emf.transaction.TransactionalEditingDomain, java.util.Collection, int)
+ *
+ * @param domain
+ * @param objectToAdd
+ * @param index
+ * @return
+ */
+ @Override
+ public Command getAddAxisCommand(final TransactionalEditingDomain domain, final Collection<Object> objectToAdd, final int index) {
+ final Collection<IAxis> toAdd = getAxisToAdd(objectToAdd);
+ if (!toAdd.isEmpty()) {
+ return AddCommand.create(domain, getRepresentedContentProvider(), NattableaxisproviderPackage.eINSTANCE.getAxisProvider_Axis(), toAdd, index);
+ }
+ return null;
+ }
+
+ /**
+ * Get the axis to add from the objects to add.
+ *
+ * @param objectToAdd The objects to add.
+ * @return The axis to add.
+ */
+ protected Collection<IAxis> getAxisToAdd(final Collection<Object> objectToAdd){
final Collection<IAxis> toAdd = new ArrayList<IAxis>();
for (final Object current : objectToAdd) {
if (isAllowedContents(current) && !isAlreadyManaged(current)) {
@@ -90,14 +124,10 @@ public class EOperationAxisManager extends EObjectAxisManager {
managedObject.add(current);
}
}
- if (!toAdd.isEmpty()) {
- return AddCommand.create(domain, getRepresentedContentProvider(), NattableaxisproviderPackage.eINSTANCE.getAxisProvider_Axis(), toAdd);
- }
- return null;
+ return toAdd;
}
-
/**
*
* @see org.eclipse.papyrus.infra.nattable.manager.axis.AbstractAxisManager#getComplementaryAddAxisCommand(TransactionalEditingDomain, java.util.Collection)
@@ -108,17 +138,46 @@ public class EOperationAxisManager extends EObjectAxisManager {
*/
@Override
public Command getComplementaryAddAxisCommand(final TransactionalEditingDomain domain, final Collection<Object> objectToAdd) {
- final Set<Object> features = new HashSet<Object>();
+ final Set<Object> operations = getOperationsToAdd(objectToAdd);
+ if (!operations.isEmpty()) {
+ return getAddAxisCommand(domain, operations);
+ }
+ return null;
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.axis.AbstractAxisManager#getComplementaryAddAxisCommand(org.eclipse.emf.transaction.TransactionalEditingDomain, java.util.Collection, int)
+ *
+ * @param domain
+ * @param objectToAdd
+ * @param index
+ * @return
+ */
+ @Override
+ public Command getComplementaryAddAxisCommand(final TransactionalEditingDomain domain, final Collection<Object> objectToAdd, final int index) {
+ final Set<Object> operations = getOperationsToAdd(objectToAdd);
+ if (!operations.isEmpty()) {
+ return getAddAxisCommand(domain, operations, index);
+ }
+ return null;
+ }
+
+ /**
+ * Get the operations to add.
+ *
+ * @param objectToAdd The initial objects to add.
+ * @return The operations to add.
+ */
+ protected Set<Object> getOperationsToAdd(final Collection<Object> objectToAdd){
+ final Set<Object> operations = new HashSet<Object>();
for (final Object current : objectToAdd) {
if (current instanceof EObject) {
- features.addAll(((EObject) current).eClass().getEAllStructuralFeatures());
+ operations.addAll(((EObject) current).eClass().getEAllOperations());
}
}
- features.removeAll(getElements());
- if (!features.isEmpty()) {
- return getAddAxisCommand(domain, features);
- }
- return null;
+ operations.removeAll(getElements());
+ return operations;
}
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/manager/axis/EStructuralFeatureAxisManager.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/manager/axis/EStructuralFeatureAxisManager.java
index 64f0955b33e..74de45d5eb0 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/manager/axis/EStructuralFeatureAxisManager.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/manager/axis/EStructuralFeatureAxisManager.java
@@ -26,6 +26,7 @@ import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.edit.command.AddCommand;
import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.EObjectAxis;
import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.EStructuralFeatureAxis;
import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.IAxis;
import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.NattableaxisFactory;
@@ -85,6 +86,38 @@ public class EStructuralFeatureAxisManager extends EObjectAxisManager {
*/
@Override
public Command getAddAxisCommand(final TransactionalEditingDomain domain, final Collection<Object> objectToAdd) {
+ final Collection<IAxis> toAdd = getAxisToAdd(objectToAdd);
+ if (!toAdd.isEmpty()) {
+ return AddCommand.create(domain, getRepresentedContentProvider(), NattableaxisproviderPackage.eINSTANCE.getAxisProvider_Axis(), toAdd);
+ }
+ return null;
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.emf.nattable.manager.axis.EObjectAxisManager#getAddAxisCommand(org.eclipse.emf.transaction.TransactionalEditingDomain, java.util.Collection, int)
+ *
+ * @param domain
+ * @param objectToAdd
+ * @param index
+ * @return
+ */
+ @Override
+ public Command getAddAxisCommand(final TransactionalEditingDomain domain, final Collection<Object> objectToAdd, final int index) {
+ final Collection<IAxis> toAdd = getAxisToAdd(objectToAdd);
+ if (!toAdd.isEmpty()) {
+ return AddCommand.create(domain, getRepresentedContentProvider(), NattableaxisproviderPackage.eINSTANCE.getAxisProvider_Axis(), toAdd, index);
+ }
+ return null;
+ }
+
+ /**
+ * Get the axis to add from the objects to add.
+ *
+ * @param objectToAdd The objects to add.
+ * @return The axis to add.
+ */
+ protected Collection<IAxis> getAxisToAdd(final Collection<Object> objectToAdd){
final Collection<IAxis> toAdd = new ArrayList<IAxis>();
for (final Object current : objectToAdd) {
if (isAllowedContents(current) && !isAlreadyManaged(current)) {
@@ -95,16 +128,12 @@ public class EStructuralFeatureAxisManager extends EObjectAxisManager {
managedObject.add(current);
}
}
- if (!toAdd.isEmpty()) {
- return AddCommand.create(domain, getRepresentedContentProvider(), NattableaxisproviderPackage.eINSTANCE.getAxisProvider_Axis(), toAdd);
- }
- return null;
+ return toAdd;
}
/**
* calculus of the contents of the axis
*/
-
public Collection<Object> getAllPossibleAxis() {
Set<Object> objects = new HashSet<Object>();
for (final Object current : getAllManagedAxis()) {
@@ -127,6 +156,38 @@ public class EStructuralFeatureAxisManager extends EObjectAxisManager {
*/
@Override
public Command getComplementaryAddAxisCommand(final TransactionalEditingDomain domain, final Collection<Object> objectToAdd) {
+ final Set<Object> features = getFeaturesToAdd(objectToAdd);
+ if (!features.isEmpty()) {
+ return getAddAxisCommand(domain, features);
+ }
+ return null;
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.axis.AbstractAxisManager#getComplementaryAddAxisCommand(org.eclipse.emf.transaction.TransactionalEditingDomain, java.util.Collection, int)
+ *
+ * @param domain
+ * @param objectToAdd
+ * @param index
+ * @return
+ */
+ @Override
+ public Command getComplementaryAddAxisCommand(final TransactionalEditingDomain domain, final Collection<Object> objectToAdd, final int index) {
+ final Set<Object> features = getFeaturesToAdd(objectToAdd);
+ if (!features.isEmpty()) {
+ return getAddAxisCommand(domain, features, index);
+ }
+ return null;
+ }
+
+ /**
+ * Get the features to add.
+ *
+ * @param objectToAdd The initial objects to add.
+ * @return The features to add.
+ */
+ protected Set<Object> getFeaturesToAdd(final Collection<Object> objectToAdd){
final Set<Object> features = new HashSet<Object>();
for (final Object current : objectToAdd) {
if (current instanceof EObject) {
@@ -134,13 +195,9 @@ public class EStructuralFeatureAxisManager extends EObjectAxisManager {
}
}
features.removeAll(getElements());
- if (!features.isEmpty()) {
- return getAddAxisCommand(domain, features);
- }
- return null;
+ return features;
}
-
/**
*
* @see org.eclipse.papyrus.infra.nattable.manager.axis.IAxisManager#getDestroyAxisElementCommand(org.eclipse.emf.transaction.TransactionalEditingDomain, java.lang.Integer)
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/manager/cell/EMFFeatureValueCellManager.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/manager/cell/EMFFeatureValueCellManager.java
index 889beb892ea..e4678d87a7a 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/manager/cell/EMFFeatureValueCellManager.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/manager/cell/EMFFeatureValueCellManager.java
@@ -1,519 +1,520 @@
-/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.infra.emf.nattable.manager.cell;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.common.command.UnexecutableCommand;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EReference;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.edit.command.SetCommand;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.AbstractEditCommandRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.papyrus.commands.wrappers.EMFtoGMFCommandWrapper;
-import org.eclipse.papyrus.commands.wrappers.GMFtoEMFCommandWrapper;
-import org.eclipse.papyrus.infra.emf.utils.EMFStringValueConverter;
-import org.eclipse.papyrus.infra.nattable.manager.cell.AbstractCellManager;
-import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattablecell.Cell;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableproblem.Problem;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableproblem.StringResolutionProblem;
-import org.eclipse.papyrus.infra.nattable.paste.IValueSetter;
-import org.eclipse.papyrus.infra.nattable.paste.ReferenceValueSetter;
-import org.eclipse.papyrus.infra.nattable.utils.AxisUtils;
-import org.eclipse.papyrus.infra.nattable.utils.CellHelper;
-import org.eclipse.papyrus.infra.nattable.utils.Constants;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.infra.tools.converter.AbstractStringValueConverter;
-import org.eclipse.papyrus.infra.tools.converter.ConvertedValueContainer;
-import org.eclipse.swt.widgets.Display;
-
-/**
- * Cell Manager which allows to get the value of an {@link EStructuralFeature} for an {@link EObject}
- *
- * @author Vincent Lorenzo
- *
- */
-public class EMFFeatureValueCellManager extends AbstractCellManager {
-
- /**
- *
- * @see org.eclipse.papyrus.infra.nattable.manager.cell.ICellManager#handles(java.lang.Object, java.lang.Object)
- *
- * @param columnElement
- * @param rowElement
- * @return
- */
- @Override
- public boolean handles(final Object columnElement, final Object rowElement) {
- return organizeAndResolvedObjects(columnElement, rowElement, null) != null;
- }
-
-
- /**
- *
- * @see org.eclipse.papyrus.infra.nattable.manager.cell.AbstractCellManager#doGetValue(java.lang.Object, java.lang.Object, org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager)
- *
- * @param columnElement
- * @param rowElement
- * @param tableManager
- * @return
- */
- @Override
- protected Object doGetValue(Object columnElement, Object rowElement, INattableModelManager tableManager) {
- final List<Object> objects = organizeAndResolvedObjects(columnElement, rowElement, null);
- final EObject eobject = (EObject) objects.get(0);
- final EStructuralFeature feature = (EStructuralFeature) objects.get(1);
- if (eobject.eClass().getEAllStructuralFeatures().contains(feature)) {
- return eobject.eGet(feature);
- }
- return NOT_AVALAIBLE;
- }
-
- /**
- *
- * @param columnElement
- * the column element
- * @param rowElement
- * the row element
- * @param sharedMap
- * a map with interesting informations
- * @return
- * <code>null</code> or a list of 2 objects.
- * <ul>
- * <li>the first element is the edited EObject</li>
- * <li>the second one is the edited feature</li>
- * </ul>
- */
- protected List<Object> organizeAndResolvedObjects(final Object columnElement, final Object rowElement, Map<?, ?> sharedMap) {
- List<Object> objects = null;
- final Object row = AxisUtils.getRepresentedElement(rowElement);
- final Object column = AxisUtils.getRepresentedElement(columnElement);
- if (row instanceof EObject && column instanceof EStructuralFeature) {
- objects = new ArrayList<Object>();
- objects.add(row);
- objects.add(column);
- } else if (column instanceof EObject && row instanceof EStructuralFeature) {
- objects = new ArrayList<Object>();
- objects.add(column);
- objects.add(row);
- }
- return objects;
- }
-
-
- /**
- *
- * @see org.eclipse.papyrus.infra.nattable.manager.cell.ICellManager#isCellEditable(java.lang.Object, java.lang.Object)
- *
- * @param columnElement
- * @param rowElement
- * @return
- */
- @Override
- public boolean isCellEditable(final Object columnElement, final Object rowElement) {
- final List<Object> objects = organizeAndResolvedObjects(columnElement, rowElement, null);
- final EObject object = (EObject) objects.get(0);
- final EStructuralFeature feature = (EStructuralFeature) objects.get(1);
- if (object.eClass().getEAllStructuralFeatures().contains(feature)) {
- if (!feature.isDerived()) {
- return feature.isChangeable();
- }
- }
- return false;
- }
-
- /**
- *
- * @see org.eclipse.papyrus.infra.nattable.manager.cell.AbstractCellManager#getSetValueCommand(org.eclipse.emf.transaction.TransactionalEditingDomain, java.lang.Object, java.lang.Object, java.lang.Object,
- * org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager)
- *
- * @param domain
- * @param columnElement
- * @param rowElement
- * @param newValue
- * @param tableManager
- * @return
- */
- @Override
- public Command getSetValueCommand(final TransactionalEditingDomain domain, final Object columnElement, final Object rowElement, final Object newValue, final INattableModelManager tableManager) {
- final List<Object> objects = organizeAndResolvedObjects(columnElement, rowElement, null);
- return getSetValueCommand(domain, (EObject) objects.get(0), (EStructuralFeature) objects.get(1), newValue, columnElement, rowElement, tableManager);
- }
-
- /**
- *
- * @param domain
- * the editing domain
- * @param elementToEdit
- * the element to edit
- * @param featureToEdit
- * the feature to edit
- * @param newValue
- * the new value
- * @return
- * the command to set the value
- */
- protected Command getSetValueCommand(final TransactionalEditingDomain domain, final EObject elementToEdit, final EStructuralFeature featureToEdit, final Object newValue, final Object columnElement, final Object rowElement,
- final INattableModelManager tableManager) {
- final CompositeCommand result = new CompositeCommand("Set Value Command"); //$NON-NLS-1$
-
- // 426731: [Table 2] Opening then closing cells editors without modifying values execute a command in the stack
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=426731
- // 1. we verify that the new value is not the same as the current value
- final Object currentValue = elementToEdit.eGet(featureToEdit);
- if ((newValue == null && currentValue != null) || (newValue != null && !newValue.equals(currentValue))) {
- // 2. if not we do the job
- final AbstractEditCommandRequest request = new SetRequest(domain, elementToEdit, featureToEdit, newValue);
- final IElementEditService provider = ElementEditServiceUtils.getCommandProvider(elementToEdit);
- final ICommand cmd = provider.getEditCommand(request);
- ICommand returnedCommand = cmd;
- if (cmd.canExecute() && featureToEdit instanceof EReference) {
- boolean shouldOpenDialog = false;
- final EReference editedReference = (EReference) featureToEdit;
-
- // we are editing a containment feature
- if (editedReference.isContainment()) {
- if (newValue instanceof Collection<?>) {
- if (!editedReference.isMany()) {
- return UnexecutableCommand.INSTANCE;
- } else {
- final Collection<?> currentValues = new ArrayList<Object>((Collection<?>) elementToEdit.eGet(editedReference));
- final Collection<?> addedValues = new ArrayList<Object>((Collection<?>) newValue);
- addedValues.removeAll(currentValues);
- // we need to test the added values
- final Iterator<?> iter = ((Collection<?>) addedValues).iterator();
- while (iter.hasNext() && !shouldOpenDialog) {
- final Object current = iter.next();
- if (current instanceof EObject) {
- if (elementToEdit == current) {
- // an element can be owned by itself
- return UnexecutableCommand.INSTANCE;
- } else {
- shouldOpenDialog = ((EObject) current).eContainer() != elementToEdit;
- }
- }
- }
- }
- } else if (elementToEdit == newValue) {
- // an element cannot be owned by itself
- return UnexecutableCommand.INSTANCE;
- } else if (newValue instanceof EObject) {
- shouldOpenDialog = ((EObject) newValue).eContainer() != elementToEdit;
- }
-
- if (shouldOpenDialog) {
- returnedCommand = getOpenConfirmChangeContainmentDialogCommand(domain, returnedCommand, editedReference.isMany());
- }
-
- }
- }
- result.add(returnedCommand);
- }
- return result.isEmpty() ? null : new GMFtoEMFCommandWrapper(result);
- }
-
-
- protected final ICommand getOpenConfirmChangeContainmentDialogCommand(final TransactionalEditingDomain domain, final ICommand defaultCommand, final boolean isMany) {
- final String messageDialog;
- if (isMany) {
- messageDialog = "Your are setting a value in a containment feature. This action will change the owner of the dropped element(s).\nContinue?"; //$NON-NLS-1$
- } else {
- messageDialog = "Your are setting a value in a containment feature. The previous value will be erased and the owner of the dropped element(s) will be changed.\nContinue?"; //$NON-NLS-1$
- }
- final ICommand cmd = new AbstractTransactionalCommand(domain, "Set Value Command Dialog", null) { //$NON-NLS-1$
-
- @Override
- protected CommandResult doExecuteWithResult(final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
- final boolean result = MessageDialog.openConfirm(Display.getDefault().getActiveShell(), "Set Containment Value", messageDialog); //$NON-NLS-1$
- if (result) {
- defaultCommand.execute(monitor, info);
- return CommandResult.newOKCommandResult();
- } else {
- return CommandResult.newCancelledCommandResult();
- }
- }
- };
- return cmd;
- }
-
- /**
- *
- * @see org.eclipse.papyrus.infra.emf.nattable.manager.cell.EMFFeatureValueCellManager#getSetStringValueCommand(org.eclipse.emf.edit.domain.EditingDomain, EObject, java.lang.Object, java.lang.Object, java.lang.String, java.util.Map)
- *
- * @param domain
- * @param columnElement
- * @param rowElement
- * @param newValue
- * @param stringResolvers
- * @return
- */
- @Override
- public Command getSetStringValueCommand(final TransactionalEditingDomain domain, final Object columnElement, final Object rowElement, final String newValue, final AbstractStringValueConverter valueSolver, final INattableModelManager tableManager) {
- final List<Object> objects = organizeAndResolvedObjects(columnElement, rowElement, null);
- final EObject editedObject = (EObject) objects.get(0);
- final EStructuralFeature editedFeature = (EStructuralFeature) objects.get(1);
- ConvertedValueContainer<?> solvedValue = valueSolver.deduceValueFromString(editedFeature, newValue);
- Object convertedValue = solvedValue.getConvertedValue();
- Command setValueCommand = getSetValueCommand(domain, editedObject, editedFeature, convertedValue, columnElement, rowElement, tableManager);
- return setValueCommand;
- }
-
-
- /**
- *
- * @param domain
- * the editing domain
- * @param tableManager
- * the table manager
- * @param rowElement
- * the row element
- * @param columnElement
- * the column element
- * @param pastedText
- * the pasted text
- * @param valueContainer
- * the converted value
- * @return
- * the command to create a String resolution Problem
- */
- @Deprecated
- // use CellHelper.getCreateStringResolutionProblemCommand(
- protected Command getCreateStringResolutionProblemCommand(final TransactionalEditingDomain domain, final INattableModelManager tableManager, final Object columnElement, final Object rowElement, final String pastedText,
- final ConvertedValueContainer<?> valueContainer) {
- return CellHelper.getCreateStringResolutionProblemCommand(domain, tableManager, columnElement, rowElement, pastedText, valueContainer);
- }
-
- /**
- *
- * @see org.eclipse.papyrus.infra.nattable.manager.cell.AbstractCellManager#getOrCreateStringValueConverterClass(org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager, java.util.Map, java.lang.String)
- *
- * @param tableManager
- * @param existingConverters
- * @param multiValueSeparator
- * @return
- */
- @Override
- public AbstractStringValueConverter getOrCreateStringValueConverterClass(INattableModelManager tableManager, Map<Class<? extends AbstractStringValueConverter>, AbstractStringValueConverter> existingConverters, final String multiValueSeparator) {
- AbstractStringValueConverter converter = existingConverters.get(EMFStringValueConverter.class);
- if (converter == null) {
- converter = new EMFStringValueConverter(tableManager.getTable().getContext(), multiValueSeparator);
- existingConverters.put(EMFStringValueConverter.class, converter);
- }
- return converter;
- }
-
- /**
- *
- * @see org.eclipse.papyrus.infra.nattable.manager.cell.AbstractCellManager#setValue(org.eclipse.emf.transaction.TransactionalEditingDomain, java.lang.Object, java.lang.Object, java.lang.Object,
- * org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager)
- *
- * @param domain
- * @param columnElement
- * @param rowElement
- * @param newValue
- * @param tableManager
- */
- @Override
- public void setValue(final TransactionalEditingDomain domain, final Object columnElement, final Object rowElement, final Object newValue, final INattableModelManager tableManager) {
- if (domain == null) {
- final List<Object> objects = organizeAndResolvedObjects(columnElement, rowElement, null);
- final EObject elementToEdit = (EObject) objects.get(0);
- final EStructuralFeature editedFeature = (EStructuralFeature) objects.get(1);
- elementToEdit.eSet(editedFeature, newValue);
- } else {
- super.setValue(domain, columnElement, rowElement, newValue, tableManager);
- }
- }
-
- /**
- * Create the string problems if required
- *
- * @param tableManager
- * @param columnElement
- * @param rowElement
- * @param pastedText
- * @param valueContainer
- * @param sharedMap
- */
- @Deprecated //problem must no be managed here, since Eclipse Mars
- // use CellHelper.createStringResolutionProblem
- protected void createStringResolutionProblem(final INattableModelManager tableManager, final Object columnElement, final Object rowElement, final String pastedText, final ConvertedValueContainer<?> valueContainer, final Map<?, ?> sharedMap) {
- CellHelper.createStringResolutionProblem(tableManager, columnElement, rowElement, pastedText, valueContainer, sharedMap);
- }
-
- /**
- *
- * @see org.eclipse.papyrus.infra.nattable.manager.cell.ICellManager#setStringValue(java.lang.Object, java.lang.Object, java.lang.String, org.eclipse.papyrus.infra.tools.converter.AbstractStringValueConverter,
- * org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager, java.util.Map)
- *
- * @param columnElement
- * @param rowElement
- * @param valueAsString
- * @param valueConverter
- * @param tableManager
- * @param sharedMap
- */
- @Override
- public void setStringValue(final Object columnElement, final Object rowElement, final String valueAsString, final AbstractStringValueConverter valueConverter, final INattableModelManager tableManager, final Map<?, ?> sharedMap) {
- final List<Object> objects = organizeAndResolvedObjects(columnElement, rowElement, sharedMap);
- final EObject editedObject = (EObject) objects.get(0);
- final EStructuralFeature editedFeature = (EStructuralFeature) objects.get(1);
- ConvertedValueContainer<?> solvedValue = valueConverter.deduceValueFromString(editedFeature, valueAsString);
- if (editedFeature instanceof EReference) {
- @SuppressWarnings("unchecked")
- final List<IValueSetter> references = (List<IValueSetter>) sharedMap.get(Constants.REFERENCES_TO_SET_KEY);
- final ReferenceValueSetter structure = new ReferenceValueSetter(editedObject, (EReference) editedFeature, solvedValue.getConvertedValue());
- references.add(structure);
- } else {
- editedObject.eSet(editedFeature, solvedValue.getConvertedValue());
- }
- }
-
-
- /**
- * @see org.eclipse.papyrus.infra.nattable.manager.cell.AbstractCellManager#unsetCellValue(org.eclipse.emf.transaction.TransactionalEditingDomain, java.lang.Object, java.lang.Object, org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager)
- *
- * @param domain
- * @param columnElement
- * @param rowElement
- * @param tableManager
- */
- @Override
- public void unsetCellValue(TransactionalEditingDomain domain, Object columnElement, Object rowElement, INattableModelManager tableManager) {
- Command cmd = getUnsetCellValueCommand(domain, columnElement, rowElement, tableManager);
- if (cmd != null && cmd.canExecute()) {
- domain.getCommandStack().execute(cmd);
- }
- }
-
- /**
- *
- * @see org.eclipse.papyrus.infra.nattable.manager.cell.AbstractCellManager#getUnsetCellValueCommand(org.eclipse.emf.transaction.TransactionalEditingDomain, java.lang.Object, java.lang.Object,
- * org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager)
- *
- * @param domain
- * @param columnElement
- * @param rowElement
- * @param tableManager
- * @return
- */
- @Override
- public Command getUnsetCellValueCommand(TransactionalEditingDomain domain, Object columnElement, Object rowElement, INattableModelManager tableManager) {
- if (isCellEditable(columnElement, rowElement)) {
- final List<Object> objects = organizeAndResolvedObjects(columnElement, rowElement, null);
- final EObject elementToEdit = (EObject) objects.get(0);
- final EStructuralFeature editedFeature = (EStructuralFeature) objects.get(1);
- return doGetUnsetCellValueCommand(domain, elementToEdit, editedFeature, tableManager);
- }
- return null;
- }
-
- /**
- *
- * @param domain
- * the editing domain to use
- *
- * @param elementToEdit
- * the edited element
- * @param editedFeature
- * the edited feature
- * @param tableManager
- * the table manager
- * @return
- * the command to use to do the unset
- */
- protected Command doGetUnsetCellValueCommand(TransactionalEditingDomain domain, EObject elementToEdit, EStructuralFeature editedFeature, INattableModelManager tableManager) {
- final IElementEditService provider = ElementEditServiceUtils.getCommandProvider(elementToEdit);
- CompositeCommand cc = new CompositeCommand("Unset cell value"); //$NON-NLS-1$
-
- // manage many features
- if (editedFeature.isMany()) {
- if (editedFeature instanceof EReference && ((EReference) editedFeature).isContainment()) {
- // we need to destroy existing value
- for (Object current : (Collection<?>) elementToEdit.eGet(editedFeature)) {
- if (current instanceof EObject) {
- DestroyElementRequest request = new DestroyElementRequest(domain, (EObject) current, false);
- ICommand command = provider.getEditCommand(request);
- if (command != null && command.canExecute()) {
- cc.add(command);
- }
- }
- }
- } else {
- // we clean the list
- SetRequest request = new SetRequest(domain, elementToEdit, editedFeature, Collections.emptyList());
- ICommand command = provider.getEditCommand(request);
- if (command != null && command.canExecute()) {
- cc.add(command);
- }
- }
- }
-
- // we reset the default value
- ICommand setDefaultValueCommand = getSetDefaultValueCommand(domain, elementToEdit, editedFeature);
- if (setDefaultValueCommand != null && setDefaultValueCommand.canExecute()) {
- cc.add(setDefaultValueCommand);
- }
- if (!cc.isEmpty() && cc.canExecute()) {
- return new GMFtoEMFCommandWrapper(cc);
- }
- return null;
- }
-
- /**
- *
- * @param domain
- * the editing domain to use
- * @param elementToEdit
- * the edited element
- * @param editedFeature
- * the edited feature
- * @return
- * the command to use to reset the default value
- */
- protected final ICommand getSetDefaultValueCommand(TransactionalEditingDomain domain, EObject elementToEdit, EStructuralFeature editedFeature) {
- final IElementEditService provider = ElementEditServiceUtils.getCommandProvider(elementToEdit);
- Object defaultValue = editedFeature.getDefaultValue();
- String defaultLiteralValue = editedFeature.getDefaultValueLiteral();
- ICommand cmd = null;
- if (defaultValue != null) {
- SetRequest setRequest = new SetRequest(domain, elementToEdit, editedFeature, defaultValue);
- cmd = provider.getEditCommand(setRequest);
- }
- if (cmd == null || !cmd.canExecute()) {
- SetRequest setRequest = new SetRequest(domain, elementToEdit, editedFeature, defaultLiteralValue);
- cmd = provider.getEditCommand(setRequest);
- }
- return cmd;
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 476618
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.emf.nattable.manager.cell;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.command.UnexecutableCommand;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.AbstractEditCommandRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.papyrus.commands.wrappers.GMFtoEMFCommandWrapper;
+import org.eclipse.papyrus.infra.emf.utils.EMFStringValueConverter;
+import org.eclipse.papyrus.infra.nattable.command.ErrorTransactionalCommand;
+import org.eclipse.papyrus.infra.nattable.manager.cell.AbstractCellManager;
+import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
+import org.eclipse.papyrus.infra.nattable.paste.IValueSetter;
+import org.eclipse.papyrus.infra.nattable.paste.ReferenceValueSetter;
+import org.eclipse.papyrus.infra.nattable.utils.AxisUtils;
+import org.eclipse.papyrus.infra.nattable.utils.CellHelper;
+import org.eclipse.papyrus.infra.nattable.utils.Constants;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.infra.tools.converter.AbstractStringValueConverter;
+import org.eclipse.papyrus.infra.tools.converter.ConvertedValueContainer;
+import org.eclipse.swt.widgets.Display;
+
+/**
+ * Cell Manager which allows to get the value of an {@link EStructuralFeature} for an {@link EObject}
+ *
+ * @author Vincent Lorenzo
+ *
+ */
+public class EMFFeatureValueCellManager extends AbstractCellManager {
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.cell.ICellManager#handles(java.lang.Object, java.lang.Object)
+ *
+ * @param columnElement
+ * @param rowElement
+ * @return
+ */
+ @Override
+ public boolean handles(final Object columnElement, final Object rowElement) {
+ return organizeAndResolvedObjects(columnElement, rowElement, null) != null;
+ }
+
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.cell.AbstractCellManager#doGetValue(java.lang.Object, java.lang.Object, org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager)
+ *
+ * @param columnElement
+ * @param rowElement
+ * @param tableManager
+ * @return
+ */
+ @Override
+ protected Object doGetValue(Object columnElement, Object rowElement, INattableModelManager tableManager) {
+ final List<Object> objects = organizeAndResolvedObjects(columnElement, rowElement, null);
+ final EObject eobject = (EObject) objects.get(0);
+ final EStructuralFeature feature = (EStructuralFeature) objects.get(1);
+ if (eobject.eClass().getEAllStructuralFeatures().contains(feature)) {
+ return eobject.eGet(feature);
+ }
+ return NOT_AVALAIBLE;
+ }
+
+ /**
+ *
+ * @param columnElement
+ * the column element
+ * @param rowElement
+ * the row element
+ * @param sharedMap
+ * a map with interesting informations
+ * @return
+ * <code>null</code> or a list of 2 objects.
+ * <ul>
+ * <li>the first element is the edited EObject</li>
+ * <li>the second one is the edited feature</li>
+ * </ul>
+ */
+ protected List<Object> organizeAndResolvedObjects(final Object columnElement, final Object rowElement, Map<?, ?> sharedMap) {
+ List<Object> objects = null;
+ final Object row = AxisUtils.getRepresentedElement(rowElement);
+ final Object column = AxisUtils.getRepresentedElement(columnElement);
+ if (row instanceof EObject && column instanceof EStructuralFeature) {
+ objects = new ArrayList<Object>();
+ objects.add(row);
+ objects.add(column);
+ } else if (column instanceof EObject && row instanceof EStructuralFeature) {
+ objects = new ArrayList<Object>();
+ objects.add(column);
+ objects.add(row);
+ }
+ return objects;
+ }
+
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.cell.ICellManager#isCellEditable(java.lang.Object, java.lang.Object)
+ *
+ * @param columnElement
+ * @param rowElement
+ * @return
+ */
+ @Override
+ public boolean isCellEditable(final Object columnElement, final Object rowElement) {
+ final List<Object> objects = organizeAndResolvedObjects(columnElement, rowElement, null);
+ final EObject object = (EObject) objects.get(0);
+ final EStructuralFeature feature = (EStructuralFeature) objects.get(1);
+ if (object.eClass().getEAllStructuralFeatures().contains(feature)) {
+ if (!feature.isDerived()) {
+ return feature.isChangeable();
+ }
+ }
+ return false;
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.cell.AbstractCellManager#getSetValueCommand(org.eclipse.emf.transaction.TransactionalEditingDomain, java.lang.Object, java.lang.Object, java.lang.Object,
+ * org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager)
+ *
+ * @param domain
+ * @param columnElement
+ * @param rowElement
+ * @param newValue
+ * @param tableManager
+ * @return
+ */
+ @Override
+ public Command getSetValueCommand(final TransactionalEditingDomain domain, final Object columnElement, final Object rowElement, final Object newValue, final INattableModelManager tableManager) {
+ final List<Object> objects = organizeAndResolvedObjects(columnElement, rowElement, null);
+ return getSetValueCommand(domain, (EObject) objects.get(0), (EStructuralFeature) objects.get(1), newValue, columnElement, rowElement, tableManager);
+ }
+
+ /**
+ *
+ * @param domain
+ * the editing domain
+ * @param elementToEdit
+ * the element to edit
+ * @param featureToEdit
+ * the feature to edit
+ * @param newValue
+ * the new value
+ * @return
+ * the command to set the value
+ */
+ protected Command getSetValueCommand(final TransactionalEditingDomain domain, final EObject elementToEdit, final EStructuralFeature featureToEdit, final Object newValue, final Object columnElement, final Object rowElement,
+ final INattableModelManager tableManager) {
+ final CompositeCommand result = new CompositeCommand("Set Value Command"); //$NON-NLS-1$
+
+ // 426731: [Table 2] Opening then closing cells editors without modifying values execute a command in the stack
+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=426731
+ // 1. we verify that the new value is not the same as the current value
+ final Object currentValue = elementToEdit.eGet(featureToEdit);
+ if ((newValue == null && currentValue != null) || (newValue != null && !newValue.equals(currentValue))) {
+ // 2. if not we do the job
+ final AbstractEditCommandRequest request = new SetRequest(domain, elementToEdit, featureToEdit, newValue);
+ final IElementEditService provider = ElementEditServiceUtils.getCommandProvider(elementToEdit);
+ final ICommand cmd = provider.getEditCommand(request);
+ ICommand returnedCommand = cmd;
+ if (cmd.canExecute() && featureToEdit instanceof EReference) {
+ boolean shouldOpenDialog = false;
+ final EReference editedReference = (EReference) featureToEdit;
+
+ // we are editing a containment feature
+ if (editedReference.isContainment()) {
+ if (newValue instanceof Collection<?>) {
+ if (!editedReference.isMany()) {
+ return UnexecutableCommand.INSTANCE;
+ } else {
+ final Collection<?> currentValues = new ArrayList<Object>((Collection<?>) elementToEdit.eGet(editedReference));
+ final Collection<?> addedValues = new ArrayList<Object>((Collection<?>) newValue);
+ addedValues.removeAll(currentValues);
+ // we need to test the added values
+ final Iterator<?> iter = ((Collection<?>) addedValues).iterator();
+ while (iter.hasNext() && !shouldOpenDialog) {
+ final Object current = iter.next();
+ if (current instanceof EObject) {
+ if (elementToEdit == current) {
+ // an element can be owned by itself
+ return UnexecutableCommand.INSTANCE;
+ } else {
+ shouldOpenDialog = ((EObject) current).eContainer() != elementToEdit;
+ }
+ }
+ }
+ }
+ } else if (elementToEdit == newValue) {
+ // an element cannot be owned by itself
+ return UnexecutableCommand.INSTANCE;
+ } else if (newValue instanceof EObject) {
+ shouldOpenDialog = ((EObject) newValue).eContainer() != elementToEdit;
+ }
+
+ if (shouldOpenDialog) {
+ returnedCommand = getOpenConfirmChangeContainmentDialogCommand(domain, returnedCommand, editedReference.isMany());
+ }
+
+ }
+ }
+ result.add(returnedCommand);
+ }
+ return result.isEmpty() ? null : new GMFtoEMFCommandWrapper(result);
+ }
+
+
+ protected final ICommand getOpenConfirmChangeContainmentDialogCommand(final TransactionalEditingDomain domain, final ICommand defaultCommand, final boolean isMany) {
+ final String messageDialog;
+ if (isMany) {
+ messageDialog = "Your are setting a value in a containment feature. This action will change the owner of the dropped element(s).\nContinue?"; //$NON-NLS-1$
+ } else {
+ messageDialog = "Your are setting a value in a containment feature. The previous value will be erased and the owner of the dropped element(s) will be changed.\nContinue?"; //$NON-NLS-1$
+ }
+ final ICommand cmd = new AbstractTransactionalCommand(domain, "Set Value Command Dialog", null) { //$NON-NLS-1$
+
+ @Override
+ protected CommandResult doExecuteWithResult(final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
+ final boolean result = MessageDialog.openConfirm(Display.getDefault().getActiveShell(), "Set Containment Value", messageDialog); //$NON-NLS-1$
+ if (result) {
+ defaultCommand.execute(monitor, info);
+ return CommandResult.newOKCommandResult();
+ } else {
+ return CommandResult.newCancelledCommandResult();
+ }
+ }
+ };
+ return cmd;
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.emf.nattable.manager.cell.EMFFeatureValueCellManager#getSetStringValueCommand(org.eclipse.emf.edit.domain.EditingDomain, EObject, java.lang.Object, java.lang.Object, java.lang.String, java.util.Map)
+ *
+ * @param domain
+ * @param columnElement
+ * @param rowElement
+ * @param newValue
+ * @param stringResolvers
+ * @return
+ */
+ @Override
+ public Command getSetStringValueCommand(final TransactionalEditingDomain domain, final Object columnElement, final Object rowElement, final String newValue, final AbstractStringValueConverter valueSolver, final INattableModelManager tableManager) {
+ final List<Object> objects = organizeAndResolvedObjects(columnElement, rowElement, null);
+ final EObject editedObject = (EObject) objects.get(0);
+ final EStructuralFeature editedFeature = (EStructuralFeature) objects.get(1);
+ ConvertedValueContainer<?> solvedValue = valueSolver.deduceValueFromString(editedFeature, newValue);
+ Object convertedValue = solvedValue.getConvertedValue();
+ Command setValueCommand = getSetValueCommand(domain, editedObject, editedFeature, convertedValue, columnElement, rowElement, tableManager);
+ if(null != setValueCommand && !solvedValue.getStatus().isOK()){
+ setValueCommand = new GMFtoEMFCommandWrapper(new ErrorTransactionalCommand(domain, null, null, solvedValue.getStatus()));
+ }
+ return setValueCommand;
+ }
+
+
+ /**
+ *
+ * @param domain
+ * the editing domain
+ * @param tableManager
+ * the table manager
+ * @param rowElement
+ * the row element
+ * @param columnElement
+ * the column element
+ * @param pastedText
+ * the pasted text
+ * @param valueContainer
+ * the converted value
+ * @return
+ * the command to create a String resolution Problem
+ */
+ @Deprecated
+ // use CellHelper.getCreateStringResolutionProblemCommand(
+ protected Command getCreateStringResolutionProblemCommand(final TransactionalEditingDomain domain, final INattableModelManager tableManager, final Object columnElement, final Object rowElement, final String pastedText,
+ final ConvertedValueContainer<?> valueContainer) {
+ return CellHelper.getCreateStringResolutionProblemCommand(domain, tableManager, columnElement, rowElement, pastedText, valueContainer);
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.cell.AbstractCellManager#getOrCreateStringValueConverterClass(org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager, java.util.Map, java.lang.String)
+ *
+ * @param tableManager
+ * @param existingConverters
+ * @param multiValueSeparator
+ * @return
+ */
+ @Override
+ public AbstractStringValueConverter getOrCreateStringValueConverterClass(INattableModelManager tableManager, Map<Class<? extends AbstractStringValueConverter>, AbstractStringValueConverter> existingConverters, final String multiValueSeparator) {
+ AbstractStringValueConverter converter = existingConverters.get(EMFStringValueConverter.class);
+ if (converter == null) {
+ converter = new EMFStringValueConverter(tableManager.getTable().getContext(), multiValueSeparator);
+ existingConverters.put(EMFStringValueConverter.class, converter);
+ }
+ return converter;
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.cell.AbstractCellManager#setValue(org.eclipse.emf.transaction.TransactionalEditingDomain, java.lang.Object, java.lang.Object, java.lang.Object,
+ * org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager)
+ *
+ * @param domain
+ * @param columnElement
+ * @param rowElement
+ * @param newValue
+ * @param tableManager
+ */
+ @Override
+ public void setValue(final TransactionalEditingDomain domain, final Object columnElement, final Object rowElement, final Object newValue, final INattableModelManager tableManager) {
+ if (domain == null) {
+ final List<Object> objects = organizeAndResolvedObjects(columnElement, rowElement, null);
+ final EObject elementToEdit = (EObject) objects.get(0);
+ final EStructuralFeature editedFeature = (EStructuralFeature) objects.get(1);
+ elementToEdit.eSet(editedFeature, newValue);
+ } else {
+ super.setValue(domain, columnElement, rowElement, newValue, tableManager);
+ }
+ }
+
+ /**
+ * Create the string problems if required
+ *
+ * @param tableManager
+ * @param columnElement
+ * @param rowElement
+ * @param pastedText
+ * @param valueContainer
+ * @param sharedMap
+ */
+ @Deprecated //problem must no be managed here, since Eclipse Mars
+ // use CellHelper.createStringResolutionProblem
+ protected void createStringResolutionProblem(final INattableModelManager tableManager, final Object columnElement, final Object rowElement, final String pastedText, final ConvertedValueContainer<?> valueContainer, final Map<?, ?> sharedMap) {
+ CellHelper.createStringResolutionProblem(tableManager, columnElement, rowElement, pastedText, valueContainer, sharedMap);
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.cell.ICellManager#setStringValue(java.lang.Object, java.lang.Object, java.lang.String, org.eclipse.papyrus.infra.tools.converter.AbstractStringValueConverter,
+ * org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager, java.util.Map)
+ *
+ * @param columnElement
+ * @param rowElement
+ * @param valueAsString
+ * @param valueConverter
+ * @param tableManager
+ * @param sharedMap
+ */
+ @Override
+ public void setStringValue(final Object columnElement, final Object rowElement, final String valueAsString, final AbstractStringValueConverter valueConverter, final INattableModelManager tableManager, final Map<?, ?> sharedMap) {
+ final List<Object> objects = organizeAndResolvedObjects(columnElement, rowElement, sharedMap);
+ final EObject editedObject = (EObject) objects.get(0);
+ final EStructuralFeature editedFeature = (EStructuralFeature) objects.get(1);
+ ConvertedValueContainer<?> solvedValue = valueConverter.deduceValueFromString(editedFeature, valueAsString);
+ if (editedFeature instanceof EReference) {
+ @SuppressWarnings("unchecked")
+ final List<IValueSetter> references = (List<IValueSetter>) sharedMap.get(Constants.REFERENCES_TO_SET_KEY);
+ final ReferenceValueSetter structure = new ReferenceValueSetter(editedObject, (EReference) editedFeature, solvedValue.getConvertedValue());
+ references.add(structure);
+ } else {
+ editedObject.eSet(editedFeature, solvedValue.getConvertedValue());
+ }
+ }
+
+
+ /**
+ * @see org.eclipse.papyrus.infra.nattable.manager.cell.AbstractCellManager#unsetCellValue(org.eclipse.emf.transaction.TransactionalEditingDomain, java.lang.Object, java.lang.Object, org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager)
+ *
+ * @param domain
+ * @param columnElement
+ * @param rowElement
+ * @param tableManager
+ */
+ @Override
+ public void unsetCellValue(TransactionalEditingDomain domain, Object columnElement, Object rowElement, INattableModelManager tableManager) {
+ Command cmd = getUnsetCellValueCommand(domain, columnElement, rowElement, tableManager);
+ if (cmd != null && cmd.canExecute()) {
+ domain.getCommandStack().execute(cmd);
+ }
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.cell.AbstractCellManager#getUnsetCellValueCommand(org.eclipse.emf.transaction.TransactionalEditingDomain, java.lang.Object, java.lang.Object,
+ * org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager)
+ *
+ * @param domain
+ * @param columnElement
+ * @param rowElement
+ * @param tableManager
+ * @return
+ */
+ @Override
+ public Command getUnsetCellValueCommand(TransactionalEditingDomain domain, Object columnElement, Object rowElement, INattableModelManager tableManager) {
+ if (isCellEditable(columnElement, rowElement)) {
+ final List<Object> objects = organizeAndResolvedObjects(columnElement, rowElement, null);
+ final EObject elementToEdit = (EObject) objects.get(0);
+ final EStructuralFeature editedFeature = (EStructuralFeature) objects.get(1);
+ return doGetUnsetCellValueCommand(domain, elementToEdit, editedFeature, tableManager);
+ }
+ return null;
+ }
+
+ /**
+ *
+ * @param domain
+ * the editing domain to use
+ *
+ * @param elementToEdit
+ * the edited element
+ * @param editedFeature
+ * the edited feature
+ * @param tableManager
+ * the table manager
+ * @return
+ * the command to use to do the unset
+ */
+ protected Command doGetUnsetCellValueCommand(TransactionalEditingDomain domain, EObject elementToEdit, EStructuralFeature editedFeature, INattableModelManager tableManager) {
+ final IElementEditService provider = ElementEditServiceUtils.getCommandProvider(elementToEdit);
+ CompositeCommand cc = new CompositeCommand("Unset cell value"); //$NON-NLS-1$
+
+ // manage many features
+ if (editedFeature.isMany()) {
+ if (editedFeature instanceof EReference && ((EReference) editedFeature).isContainment()) {
+ // we need to destroy existing value
+ for (Object current : (Collection<?>) elementToEdit.eGet(editedFeature)) {
+ if (current instanceof EObject) {
+ DestroyElementRequest request = new DestroyElementRequest(domain, (EObject) current, false);
+ ICommand command = provider.getEditCommand(request);
+ if (command != null && command.canExecute()) {
+ cc.add(command);
+ }
+ }
+ }
+ } else {
+ // we clean the list
+ SetRequest request = new SetRequest(domain, elementToEdit, editedFeature, Collections.emptyList());
+ ICommand command = provider.getEditCommand(request);
+ if (command != null && command.canExecute()) {
+ cc.add(command);
+ }
+ }
+ }
+
+ // we reset the default value
+ ICommand setDefaultValueCommand = getSetDefaultValueCommand(domain, elementToEdit, editedFeature);
+ if (setDefaultValueCommand != null && setDefaultValueCommand.canExecute()) {
+ cc.add(setDefaultValueCommand);
+ }
+ if (!cc.isEmpty() && cc.canExecute()) {
+ return new GMFtoEMFCommandWrapper(cc);
+ }
+ return null;
+ }
+
+ /**
+ *
+ * @param domain
+ * the editing domain to use
+ * @param elementToEdit
+ * the edited element
+ * @param editedFeature
+ * the edited feature
+ * @return
+ * the command to use to reset the default value
+ */
+ protected final ICommand getSetDefaultValueCommand(TransactionalEditingDomain domain, EObject elementToEdit, EStructuralFeature editedFeature) {
+ final IElementEditService provider = ElementEditServiceUtils.getCommandProvider(elementToEdit);
+ Object defaultValue = editedFeature.getDefaultValue();
+ String defaultLiteralValue = editedFeature.getDefaultValueLiteral();
+ ICommand cmd = null;
+ if (defaultValue != null) {
+ SetRequest setRequest = new SetRequest(domain, elementToEdit, editedFeature, defaultValue);
+ cmd = provider.getEditCommand(setRequest);
+ }
+ if (cmd == null || !cmd.canExecute()) {
+ SetRequest setRequest = new SetRequest(domain, elementToEdit, editedFeature, defaultLiteralValue);
+ cmd = provider.getEditCommand(setRequest);
+ }
+ return cmd;
+ }
+}
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/provider/EMFFeatureHeaderLabelProvider.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/provider/EMFFeatureHeaderLabelProvider.java
index e695794ae7e..673796af6af 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/provider/EMFFeatureHeaderLabelProvider.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/provider/EMFFeatureHeaderLabelProvider.java
@@ -1,256 +1,257 @@
-/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.infra.emf.nattable.provider;
-
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EClassifier;
-import org.eclipse.emf.ecore.EReference;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.nebula.widgets.nattable.config.IConfigRegistry;
-import org.eclipse.papyrus.infra.emf.nattable.registry.EStructuralFeatureImageRegistry;
-import org.eclipse.papyrus.infra.nattable.Activator;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.EStructuralFeatureAxis;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattablelabelprovider.FeatureLabelProviderConfiguration;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattablelabelprovider.ILabelProviderConfiguration;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattablelabelprovider.ObjectLabelProviderConfiguration;
-import org.eclipse.papyrus.infra.nattable.utils.ILabelProviderContextElementWrapper;
-import org.eclipse.papyrus.infra.nattable.utils.LabelProviderCellContextElementWrapper;
-import org.eclipse.papyrus.infra.services.labelprovider.service.LabelProviderService;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * Provides the label for the EstructuralFeature
- *
- * @author Vincent Lorenzo
- *
- */
-public class EMFFeatureHeaderLabelProvider extends EMFEObjectHeaderLabelProvider {
-
- /**
- *
- * @see org.eclipse.papyrus.infra.nattable.provider.AbstractNattableCellLabelProvider#accept(java.lang.Object)
- *
- * @param element
- * @return
- * <code>true</code> if we are looking for the label of an EStructuralFeature
- */
- @Override
- public boolean accept(Object element) {
- if (element instanceof ILabelProviderContextElementWrapper) {
- final Object object = ((ILabelProviderContextElementWrapper) element).getObject();
- return object instanceof EStructuralFeature || object instanceof EStructuralFeatureAxis;
- }
- return false;
- }
-
- /**
- *
- * @param featureConf
- * the configuration to use to know what display in the label
- * @param configRegistry
- * the configRegistry
- * @param name
- * the name of the feature
- * @param type
- * the type of the feature
- * @param isDerived
- * <code>true</code> if the feature is derived
- * @param lowerBound
- * the lower bound of the feature
- * @param upperBounds
- * the upper bound of the feature
- * @return
- * the text to display for the feature according to these informations and the preferences of the user
- */
- protected String getText(FeatureLabelProviderConfiguration featureConf, final IConfigRegistry configRegistry, final String name, final Object type, final boolean isDerived, final int lowerBound, final int upperBounds) {
- // we collect the required values
- boolean displayName = false;
- try {
- displayName = featureConf.isDisplayName();
- } catch (Exception e) {
- Activator.log.error(e);
- }
- boolean displayMultiplicity = featureConf.isDisplayMultiplicity();
- boolean displayType = featureConf.isDisplayType();
- boolean displayIsDerived = featureConf.isDisplayIsDerived();
-
- String displayedText = ""; //$NON-NLS-1$
- if (isDerived && displayIsDerived) {
- displayedText += "/"; //$NON-NLS-1$
- }
- if (displayName) {
- displayedText += name;
- }
- if (displayType) {
- if (displayName) {
- displayedText += " : "; //$NON-NLS-1$
- }
- displayedText += getTypeName(configRegistry, type);
- }
- if (displayMultiplicity) {
- displayedText += " ["; //$NON-NLS-1$
- if (upperBounds == -1 && lowerBound <= 1) {
- displayedText += "*"; //$NON-NLS-1$
- } else if (lowerBound == upperBounds) {
- displayedText += Integer.toString(lowerBound);
- } else {
- displayedText += Integer.toString(lowerBound);
- displayedText += ".."; //$NON-NLS-1$
- if (upperBounds == -1) {
- displayedText += "*"; //$NON-NLS-1$
- } else {
- displayedText += Integer.toString(upperBounds);
- }
- }
- displayedText += "]"; //$NON-NLS-1$
- }
-
- return displayedText;
- }
-
- /**
- *
- * @param configRegistry
- * the configRegistry
- * @param type
- * the type of the feature
- * @return
- * the name to display for the type
- */
- protected String getTypeName(final IConfigRegistry configRegistry, final Object type) {
- final LabelProviderService serv = getLabelProviderService(configRegistry);
- if (type instanceof EClassifier) {
- return ((EClassifier) type).getName();
- } else {
- return serv.getLabelProvider(type).getText(type);
- }
- }
-
-
- /**
- *
- * @see org.eclipse.papyrus.infra.nattable.provider.AbstractNattableCellLabelProvider#getText(java.lang.Object)
- *
- * @param element
- * @return
- */
- @Override
- public String getText(Object element) {
- final ILabelProviderContextElementWrapper wrapper = (ILabelProviderContextElementWrapper) element;
- final IConfigRegistry configRegistry = wrapper.getConfigRegistry();
-
- final Object value = getWrappedValue(wrapper);
- EStructuralFeature feature = null;
- String alias = "";//$NON-NLS-1$
- if (value instanceof EStructuralFeatureAxis) {
- feature = ((EStructuralFeatureAxis) value).getElement();
- alias = ((EStructuralFeatureAxis) value).getAlias();
- } else if (value instanceof EStructuralFeature) {
- feature = (EStructuralFeature) value;
- }
-
- String returnedValue = null;
- if (alias != null && !alias.isEmpty()) {
- returnedValue = alias;
- } else {
- returnedValue = feature.getName();
- }
- ILabelProviderConfiguration conf = null;
- if (wrapper instanceof LabelProviderCellContextElementWrapper) {
- conf = getLabelConfiguration((LabelProviderCellContextElementWrapper) wrapper);
- }
- if (conf instanceof ObjectLabelProviderConfiguration && !((ObjectLabelProviderConfiguration) conf).isDisplayLabel()) {
- returnedValue = ""; //$NON-NLS-1$
- } else {
- if (conf instanceof FeatureLabelProviderConfiguration) {
- returnedValue = getText((FeatureLabelProviderConfiguration) conf, configRegistry, returnedValue, feature.getEType(), feature.isDerived(), feature.getLowerBound(), feature.getUpperBound());
- }
- }
- return returnedValue;
- }
-
- /**
- *
- * @see org.eclipse.papyrus.infra.nattable.provider.AbstractNattableCellLabelProvider#getImage(java.lang.Object)
- *
- * @param element
- * @return
- */
- @Override
- public Image getImage(Object element) {
- ILabelProviderConfiguration conf = null;
- if (element instanceof LabelProviderCellContextElementWrapper) {
- conf = getLabelConfiguration((LabelProviderCellContextElementWrapper) element);
- }
- if (conf instanceof ObjectLabelProviderConfiguration && !((ObjectLabelProviderConfiguration) conf).isDisplayIcon()) {
- return null;
- }
-
- final Object object = getWrappedValue((ILabelProviderContextElementWrapper) element);
- EStructuralFeature feature = null;
- if (object instanceof EStructuralFeatureAxis) {
- feature = ((EStructuralFeatureAxis) object).getElement();
- } else if (object instanceof EStructuralFeature) {
- feature = (EStructuralFeature) object;
- }
- if (feature instanceof EAttribute) {
- return EStructuralFeatureImageRegistry.getAttributeIcon();
-
- } else if (feature instanceof EReference) {
- return getEReferenceImage((EReference) feature);
- }
- if (feature == null) {
- return null;
- }
- return super.getImage(feature);
- }
-
-
- /**
- *
- * @param reference
- * an EReference
- * @return
- * the image for this reference
- */
- public static Image getEReferenceImage(final EReference reference) {
- final EReference opposite = reference.getEOpposite();
-
- if (reference.isContainment()) {
- if (opposite == null) {
- return EStructuralFeatureImageRegistry.getUnidirectionalAggregIcon();
- }
- return EStructuralFeatureImageRegistry.getAggregIcon();
- }
-
- if (opposite != null && opposite.isContainment()) {
- return EStructuralFeatureImageRegistry.getInvAggregIcon();
- }
-
- if (opposite == null) {
- return EStructuralFeatureImageRegistry.getUnidirectionalLinkIcon();
- }
- return EStructuralFeatureImageRegistry.getLinkIcon();
- }
-
- /**
- * @param wrapper
- * @return
- * the wrapped value to use to calculate the label
- */
- protected Object getWrappedValue(final ILabelProviderContextElementWrapper wrapper) {
- return wrapper.getObject();
- }
-
-}
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.emf.nattable.provider;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClassifier;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.nebula.widgets.nattable.config.IConfigRegistry;
+import org.eclipse.papyrus.infra.emf.nattable.registry.EStructuralFeatureImageRegistry;
+import org.eclipse.papyrus.infra.nattable.Activator;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.EStructuralFeatureAxis;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattablelabelprovider.FeatureLabelProviderConfiguration;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattablelabelprovider.ILabelProviderConfiguration;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattablelabelprovider.ObjectLabelProviderConfiguration;
+import org.eclipse.papyrus.infra.nattable.utils.ILabelProviderCellContextElementWrapper;
+import org.eclipse.papyrus.infra.nattable.utils.ILabelProviderContextElementWrapper;
+import org.eclipse.papyrus.infra.nattable.utils.LabelProviderCellContextElementWrapper;
+import org.eclipse.papyrus.infra.services.labelprovider.service.LabelProviderService;
+import org.eclipse.swt.graphics.Image;
+
+/**
+ * Provides the label for the EstructuralFeature
+ *
+ * @author Vincent Lorenzo
+ *
+ */
+public class EMFFeatureHeaderLabelProvider extends EMFEObjectHeaderLabelProvider {
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.provider.AbstractNattableCellLabelProvider#accept(java.lang.Object)
+ *
+ * @param element
+ * @return
+ * <code>true</code> if we are looking for the label of an EStructuralFeature
+ */
+ @Override
+ public boolean accept(Object element) {
+ if (element instanceof ILabelProviderContextElementWrapper) {
+ final Object object = ((ILabelProviderContextElementWrapper) element).getObject();
+ return object instanceof EStructuralFeature || object instanceof EStructuralFeatureAxis;
+ }
+ return false;
+ }
+
+ /**
+ *
+ * @param featureConf
+ * the configuration to use to know what display in the label
+ * @param configRegistry
+ * the configRegistry
+ * @param name
+ * the name of the feature
+ * @param type
+ * the type of the feature
+ * @param isDerived
+ * <code>true</code> if the feature is derived
+ * @param lowerBound
+ * the lower bound of the feature
+ * @param upperBounds
+ * the upper bound of the feature
+ * @return
+ * the text to display for the feature according to these informations and the preferences of the user
+ */
+ protected String getText(FeatureLabelProviderConfiguration featureConf, final IConfigRegistry configRegistry, final String name, final Object type, final boolean isDerived, final int lowerBound, final int upperBounds) {
+ // we collect the required values
+ boolean displayName = false;
+ try {
+ displayName = featureConf.isDisplayName();
+ } catch (Exception e) {
+ Activator.log.error(e);
+ }
+ boolean displayMultiplicity = featureConf.isDisplayMultiplicity();
+ boolean displayType = featureConf.isDisplayType();
+ boolean displayIsDerived = featureConf.isDisplayIsDerived();
+
+ String displayedText = ""; //$NON-NLS-1$
+ if (isDerived && displayIsDerived) {
+ displayedText += "/"; //$NON-NLS-1$
+ }
+ if (displayName) {
+ displayedText += name;
+ }
+ if (displayType) {
+ if (displayName) {
+ displayedText += " : "; //$NON-NLS-1$
+ }
+ displayedText += getTypeName(configRegistry, type);
+ }
+ if (displayMultiplicity) {
+ displayedText += " ["; //$NON-NLS-1$
+ if (upperBounds == -1 && lowerBound <= 1) {
+ displayedText += "*"; //$NON-NLS-1$
+ } else if (lowerBound == upperBounds) {
+ displayedText += Integer.toString(lowerBound);
+ } else {
+ displayedText += Integer.toString(lowerBound);
+ displayedText += ".."; //$NON-NLS-1$
+ if (upperBounds == -1) {
+ displayedText += "*"; //$NON-NLS-1$
+ } else {
+ displayedText += Integer.toString(upperBounds);
+ }
+ }
+ displayedText += "]"; //$NON-NLS-1$
+ }
+
+ return displayedText;
+ }
+
+ /**
+ *
+ * @param configRegistry
+ * the configRegistry
+ * @param type
+ * the type of the feature
+ * @return
+ * the name to display for the type
+ */
+ protected String getTypeName(final IConfigRegistry configRegistry, final Object type) {
+ final LabelProviderService serv = getLabelProviderService(configRegistry);
+ if (type instanceof EClassifier) {
+ return ((EClassifier) type).getName();
+ } else {
+ return serv.getLabelProvider(type).getText(type);
+ }
+ }
+
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.provider.AbstractNattableCellLabelProvider#getText(java.lang.Object)
+ *
+ * @param element
+ * @return
+ */
+ @Override
+ public String getText(Object element) {
+ final ILabelProviderContextElementWrapper wrapper = (ILabelProviderContextElementWrapper) element;
+ final IConfigRegistry configRegistry = wrapper.getConfigRegistry();
+
+ final Object value = getWrappedValue(wrapper);
+ EStructuralFeature feature = null;
+ String alias = "";//$NON-NLS-1$
+ if (value instanceof EStructuralFeatureAxis) {
+ feature = ((EStructuralFeatureAxis) value).getElement();
+ alias = ((EStructuralFeatureAxis) value).getAlias();
+ } else if (value instanceof EStructuralFeature) {
+ feature = (EStructuralFeature) value;
+ }
+
+ String returnedValue = null;
+ if (alias != null && !alias.isEmpty()) {
+ returnedValue = alias;
+ } else {
+ returnedValue = feature.getName();
+ }
+ ILabelProviderConfiguration conf = null;
+ if (wrapper instanceof ILabelProviderCellContextElementWrapper) {
+ conf = getLabelConfiguration((ILabelProviderCellContextElementWrapper) wrapper);
+ }
+ if (conf instanceof ObjectLabelProviderConfiguration && !((ObjectLabelProviderConfiguration) conf).isDisplayLabel()) {
+ returnedValue = ""; //$NON-NLS-1$
+ } else {
+ if (conf instanceof FeatureLabelProviderConfiguration) {
+ returnedValue = getText((FeatureLabelProviderConfiguration) conf, configRegistry, returnedValue, feature.getEType(), feature.isDerived(), feature.getLowerBound(), feature.getUpperBound());
+ }
+ }
+ return returnedValue;
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.provider.AbstractNattableCellLabelProvider#getImage(java.lang.Object)
+ *
+ * @param element
+ * @return
+ */
+ @Override
+ public Image getImage(Object element) {
+ ILabelProviderConfiguration conf = null;
+ if (element instanceof LabelProviderCellContextElementWrapper) {
+ conf = getLabelConfiguration((LabelProviderCellContextElementWrapper) element);
+ }
+ if (conf instanceof ObjectLabelProviderConfiguration && !((ObjectLabelProviderConfiguration) conf).isDisplayIcon()) {
+ return null;
+ }
+
+ final Object object = getWrappedValue((ILabelProviderContextElementWrapper) element);
+ EStructuralFeature feature = null;
+ if (object instanceof EStructuralFeatureAxis) {
+ feature = ((EStructuralFeatureAxis) object).getElement();
+ } else if (object instanceof EStructuralFeature) {
+ feature = (EStructuralFeature) object;
+ }
+ if (feature instanceof EAttribute) {
+ return EStructuralFeatureImageRegistry.getAttributeIcon();
+
+ } else if (feature instanceof EReference) {
+ return getEReferenceImage((EReference) feature);
+ }
+ if (feature == null) {
+ return null;
+ }
+ return super.getImage(feature);
+ }
+
+
+ /**
+ *
+ * @param reference
+ * an EReference
+ * @return
+ * the image for this reference
+ */
+ public static Image getEReferenceImage(final EReference reference) {
+ final EReference opposite = reference.getEOpposite();
+
+ if (reference.isContainment()) {
+ if (opposite == null) {
+ return EStructuralFeatureImageRegistry.getUnidirectionalAggregIcon();
+ }
+ return EStructuralFeatureImageRegistry.getAggregIcon();
+ }
+
+ if (opposite != null && opposite.isContainment()) {
+ return EStructuralFeatureImageRegistry.getInvAggregIcon();
+ }
+
+ if (opposite == null) {
+ return EStructuralFeatureImageRegistry.getUnidirectionalLinkIcon();
+ }
+ return EStructuralFeatureImageRegistry.getLinkIcon();
+ }
+
+ /**
+ * @param wrapper
+ * @return
+ * the wrapped value to use to calculate the label
+ */
+ protected Object getWrappedValue(final ILabelProviderContextElementWrapper wrapper) {
+ return wrapper.getObject();
+ }
+
+}
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/provider/TreeFillingFeatureLabelProvider.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/provider/TreeFillingFeatureLabelProvider.java
index 413b5e5801c..4212aaee6b5 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/provider/TreeFillingFeatureLabelProvider.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/provider/TreeFillingFeatureLabelProvider.java
@@ -1,86 +1,86 @@
-/*****************************************************************************
- * Copyright (c) 2014 CEA LIST and others.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-
-package org.eclipse.papyrus.infra.emf.nattable.provider;
-
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.EStructuralFeatureAxis;
-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.nattableaxisconfiguration.TreeFillingConfiguration;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattablelabelprovider.ILabelProviderConfiguration;
-import org.eclipse.papyrus.infra.nattable.utils.ILabelProviderContextElementWrapper;
-import org.eclipse.papyrus.infra.nattable.utils.LabelProviderCellContextElementWrapper;
-
-/**
- * @author VL222926
- *
- */
-public class TreeFillingFeatureLabelProvider extends EMFFeatureHeaderLabelProvider {
-
- /**
- * @see org.eclipse.papyrus.infra.emf.nattable.provider.EMFFeatureHeaderLabelProvider#accept(java.lang.Object)
- *
- * @param element
- * @return
- */
- @Override
- public boolean accept(Object element) {
- if (element instanceof ILabelProviderContextElementWrapper) {
- final Object object = ((ILabelProviderContextElementWrapper) element).getObject();
- if (object instanceof ITreeItemAxis) {
- ITreeItemAxis curr = (ITreeItemAxis) object;
- Object el = curr.getElement();
- if (el instanceof TreeFillingConfiguration) {
- final IAxis axis = ((TreeFillingConfiguration) el).getAxisUsedAsAxisProvider();
- return axis instanceof EStructuralFeature || axis instanceof EStructuralFeatureAxis;
- }
- }
- }
- return false;
- }
-
- /**
- * @see org.eclipse.papyrus.infra.nattable.provider.AbstractNattableCellLabelProvider#getLabelConfiguration(org.eclipse.papyrus.infra.nattable.utils.LabelProviderCellContextElementWrapper)
- *
- * @param element
- * @return
- */
- @Override
- protected ILabelProviderConfiguration getLabelConfiguration(LabelProviderCellContextElementWrapper element) {
- if (element instanceof ILabelProviderContextElementWrapper) {
- final Object object = ((ILabelProviderContextElementWrapper) element).getObject();
- if (object instanceof IAxis && ((IAxis) object).getElement() instanceof TreeFillingConfiguration) {
- return ((TreeFillingConfiguration) ((IAxis) object).getElement()).getLabelProvider();
- }
- }
- return null;
- }
-
-
- /**
- *
- * @param wrapper
- * @return
- * the wrapped value to use to calculate the label
- */
- @Override
- protected Object getWrappedValue(final ILabelProviderContextElementWrapper wrapper) {
- Object value = wrapper.getObject();
- if (value instanceof IAxis && ((IAxis) value).getElement() instanceof TreeFillingConfiguration) {
- return ((TreeFillingConfiguration) ((IAxis) value).getElement()).getAxisUsedAsAxisProvider();
- }
- return super.getWrappedValue(wrapper);
- }
-
-}
+/*****************************************************************************
+ * Copyright (c) 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.emf.nattable.provider;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.EStructuralFeatureAxis;
+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.nattableaxisconfiguration.TreeFillingConfiguration;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattablelabelprovider.ILabelProviderConfiguration;
+import org.eclipse.papyrus.infra.nattable.utils.ILabelProviderCellContextElementWrapper;
+import org.eclipse.papyrus.infra.nattable.utils.ILabelProviderContextElementWrapper;
+
+/**
+ * @author VL222926
+ *
+ */
+public class TreeFillingFeatureLabelProvider extends EMFFeatureHeaderLabelProvider {
+
+ /**
+ * @see org.eclipse.papyrus.infra.emf.nattable.provider.EMFFeatureHeaderLabelProvider#accept(java.lang.Object)
+ *
+ * @param element
+ * @return
+ */
+ @Override
+ public boolean accept(Object element) {
+ if (element instanceof ILabelProviderContextElementWrapper) {
+ final Object object = ((ILabelProviderContextElementWrapper) element).getObject();
+ if (object instanceof ITreeItemAxis) {
+ ITreeItemAxis curr = (ITreeItemAxis) object;
+ Object el = curr.getElement();
+ if (el instanceof TreeFillingConfiguration) {
+ final IAxis axis = ((TreeFillingConfiguration) el).getAxisUsedAsAxisProvider();
+ return axis instanceof EStructuralFeature || axis instanceof EStructuralFeatureAxis;
+ }
+ }
+ }
+ return false;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.nattable.provider.AbstractNattableCellLabelProvider#getLabelConfiguration(org.eclipse.papyrus.infra.nattable.utils.LabelProviderCellContextElementWrapper)
+ *
+ * @param element
+ * @return
+ */
+ @Override
+ protected ILabelProviderConfiguration getLabelConfiguration(ILabelProviderCellContextElementWrapper element) {
+ if (element instanceof ILabelProviderContextElementWrapper) {
+ final Object object = ((ILabelProviderContextElementWrapper) element).getObject();
+ if (object instanceof IAxis && ((IAxis) object).getElement() instanceof TreeFillingConfiguration) {
+ return ((TreeFillingConfiguration) ((IAxis) object).getElement()).getLabelProvider();
+ }
+ }
+ return null;
+ }
+
+
+ /**
+ *
+ * @param wrapper
+ * @return
+ * the wrapped value to use to calculate the label
+ */
+ @Override
+ protected Object getWrappedValue(final ILabelProviderContextElementWrapper wrapper) {
+ Object value = wrapper.getObject();
+ if (value instanceof IAxis && ((IAxis) value).getElement() instanceof TreeFillingConfiguration) {
+ return ((TreeFillingConfiguration) ((IAxis) value).getElement()).getAxisUsedAsAxisProvider();
+ }
+ return super.getWrappedValue(wrapper);
+ }
+
+}
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/provider/TreeFillingOperationLabelProvider.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/provider/TreeFillingOperationLabelProvider.java
index fa00e2f8a3b..49409cafb34 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/provider/TreeFillingOperationLabelProvider.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/provider/TreeFillingOperationLabelProvider.java
@@ -19,8 +19,8 @@ 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.nattableaxisconfiguration.TreeFillingConfiguration;
import org.eclipse.papyrus.infra.nattable.model.nattable.nattablelabelprovider.ILabelProviderConfiguration;
+import org.eclipse.papyrus.infra.nattable.utils.ILabelProviderCellContextElementWrapper;
import org.eclipse.papyrus.infra.nattable.utils.ILabelProviderContextElementWrapper;
-import org.eclipse.papyrus.infra.nattable.utils.LabelProviderCellContextElementWrapper;
/**
* The label provider for the tree filling operation
@@ -55,7 +55,7 @@ public class TreeFillingOperationLabelProvider extends EMFEOperationHeaderLabelP
* @see org.eclipse.papyrus.infra.nattable.provider.AbstractNattableCellLabelProvider#getLabelConfiguration(org.eclipse.papyrus.infra.nattable.utils.LabelProviderCellContextElementWrapper)
*/
@Override
- protected ILabelProviderConfiguration getLabelConfiguration(final LabelProviderCellContextElementWrapper element) {
+ protected ILabelProviderConfiguration getLabelConfiguration(final ILabelProviderCellContextElementWrapper element) {
ILabelProviderConfiguration result = null;
if (element instanceof ILabelProviderContextElementWrapper) {
final Object object = ((ILabelProviderContextElementWrapper) element).getObject();
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model.edit/plugin.properties b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model.edit/plugin.properties
index 2d576fd3529..1dc00b9e8c5 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model.edit/plugin.properties
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model.edit/plugin.properties
@@ -1,237 +1,238 @@
-# Copyright (c) 2013 CEA LIST.
-#
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
-
-pluginName = Nattable Edit Support
-providerName = Eclipse Modeling Project
-
-_UI_CreateChild_text = {0}
-_UI_CreateChild_text2 = {1} {0}
-_UI_CreateChild_text3 = {1}
-_UI_CreateChild_tooltip = Create New {0} Under {1} Feature
-_UI_CreateChild_description = Create a new child of type {0} for the {1} feature of the selected {2}.
-_UI_CreateSibling_description = Create a new sibling of type {0} for the selected {2}, under the {1} feature of their parent.
-
-_UI_PropertyDescriptor_description = The {0} of the {1}
-
-_UI_Table_type = Table
-_UI_TableNamedElement_type = Table Named Element
-_UI_TableConfiguration_type = Table Configuration
-_UI_AbstractAxisProvider_type = Abstract Axis Provider
-_UI_IMasterAxisProvider_type = IMaster Axis Provider
-_UI_ISlaveAxisProvider_type = ISlave Axis Provider
-_UI_AxisProvider_type = Axis Provider
-_UI_SlaveObjectAxisProvider_type = Slave Object Axis Provider
-_UI_MasterObjectAxisProvider_type = Master Object Axis Provider
-_UI_ILabelProviderConfiguration_type = ILabel Provider Configuration
-_UI_FeatureLabelProviderConfiguration_type = Feature Label Provider Configuration
-_UI_ObjectLabelProviderConfiguration_type = Object Label Provider Configuration
-_UI_AbstractHeaderAxisConfiguration_type = Abstract Header Axis Configuration
-_UI_AxisManagerRepresentation_type = Axis Manager Representation
-_UI_AxisManagerConfiguration_type = Axis Manager Configuration
-_UI_TableHeaderAxisConfiguration_type = Table Header Axis Configuration
-_UI_LocalTableHeaderAxisConfiguration_type = Local Table Header Axis Configuration
-_UI_IAxisConfiguration_type = IAxis Configuration
-_UI_FeatureAxisConfiguration_type = Feature Axis Configuration
-_UI_IFillingConfiguration_type = IFilling Configuration
-_UI_EStructuralFeatureValueFillingConfiguration_type = EStructural Feature Value Filling Configuration
-_UI_IPasteConfiguration_type = IPaste Configuration
-_UI_PasteEObjectConfiguration_type = Paste EObject Configuration
-_UI_AbstractTableTester_type = Abstract Table Tester
-_UI_JavaTableTester_type = Java Table Tester
-_UI_IAxis_type = IAxis
-_UI_IdAxis_type = Id Axis
-_UI_EObjectAxis_type = EObject Axis
-_UI_FeatureAxis_type = Feature Axis
-_UI_ObjectAxis_type = Object Axis
-_UI_FeatureIdAxis_type = Feature Id Axis
-_UI_EStructuralFeatureAxis_type = EStructural Feature Axis
-_UI_ObjectIdAxis_type = Object Id Axis
-_UI_IHierarchicalAxis_type = IHierarchical Axis
-_UI_AxisGroup_type = Axis Group
-_UI_Cell_type = Cell
-_UI_ICellAxisWrapper_type = ICell Axis Wrapper
-_UI_EObjectAxisWrapper_type = EObject Axis Wrapper
-_UI_IdAxisWrapper_type = Id Axis Wrapper
-_UI_Problem_type = Problem
-_UI_StringResolutionProblem_type = String Resolution Problem
-_UI_Style_type = Style
-_UI_NamedStyle_type = Named Style
-_UI_FontStyle_type = Font Style
-_UI_CellTextStyle_type = Cell Text Style
-_UI_IntValueStyle_type = Int Value Style
-_UI_IntListValueStyle_type = Int List Value Style
-_UI_BooleanValueStyle_type = Boolean Value Style
-_UI_BooleanListValueStyle_type = Boolean List Value Style
-_UI_DoubleValueStyle_type = Double Value Style
-_UI_DoubleListValueStyle_type = Double List Value Style
-_UI_StringValueStyle_type = String Value Style
-_UI_StringListValueStyle_type = String List Value Style
-_UI_StyledElement_type = Styled Element
-_UI_TableDisplayStyle_type = Table Display Style
-_UI_Unknown_type = Object
-
-_UI_Unknown_datatype= Value
-
-_UI_Table_context_feature = Context
-_UI_Table_owner_feature = Owner
-_UI_Table_prototype_feature = Prototype
-_UI_Table_tableConfiguration_feature = Table Configuration
-_UI_Table_invertAxis_feature = Invert Axis
-_UI_Table_columnAxisProvidersHistory_feature = Column Axis Providers History
-_UI_Table_rowAxisProvidersHistory_feature = Row Axis Providers History
-_UI_Table_localRowHeaderAxisConfiguration_feature = Local Row Header Axis Configuration
-_UI_Table_localColumnHeaderAxisConfiguration_feature = Local Column Header Axis Configuration
-_UI_Table_currentRowAxisProvider_feature = Current Row Axis Provider
-_UI_Table_currentColumnAxisProvider_feature = Current Column Axis Provider
-_UI_Table_cells_feature = Cells
-_UI_TableNamedElement_description_feature = Description
-_UI_TableNamedElement_name_feature = Name
-_UI_TableConfiguration_type_feature = Type
-_UI_TableConfiguration_iconPath_feature = Icon Path
-_UI_TableConfiguration_creationTester_feature = Creation Tester
-_UI_TableConfiguration_cellEditorDeclaration_feature = Cell Editor Declaration
-_UI_TableConfiguration_rowHeaderAxisConfiguration_feature = Row Header Axis Configuration
-_UI_TableConfiguration_columnHeaderAxisConfiguration_feature = Column Header Axis Configuration
-_UI_TableConfiguration_columnAxisProviders_feature = Column Axis Providers
-_UI_TableConfiguration_rowAxisProviders_feature = Row Axis Providers
-_UI_TableConfiguration_defaultRowAxisProvider_feature = Default Row Axis Provider
-_UI_TableConfiguration_defaultColumnAxisProvider_feature = Default Column Axis Provider
-_UI_IMasterAxisProvider_disconnectSlave_feature = Disconnect Slave
-_UI_AxisProvider_axis_feature = Axis
-_UI_FeatureLabelProviderConfiguration_displayIsDerived_feature = Display Is Derived
-_UI_FeatureLabelProviderConfiguration_displayType_feature = Display Type
-_UI_FeatureLabelProviderConfiguration_displayMultiplicity_feature = Display Multiplicity
-_UI_FeatureLabelProviderConfiguration_displayName_feature = Display Name
-_UI_ObjectLabelProviderConfiguration_displayIcon_feature = Display Icon
-_UI_ObjectLabelProviderConfiguration_displayLabel_feature = Display Label
-_UI_AbstractHeaderAxisConfiguration_indexStyle_feature = Index Style
-_UI_AbstractHeaderAxisConfiguration_displayLabel_feature = Display Label
-_UI_AbstractHeaderAxisConfiguration_displayFilter_feature = Display Filter
-_UI_AbstractHeaderAxisConfiguration_displayIndex_feature = Display Index
-_UI_AbstractHeaderAxisConfiguration_ownedLabelConfigurations_feature = Owned Label Configurations
-_UI_AbstractHeaderAxisConfiguration_ownedAxisConfigurations_feature = Owned Axis Configurations
-_UI_AxisManagerRepresentation_axisManagerId_feature = Axis Manager Id
-_UI_AxisManagerRepresentation_labelProviderContext_feature = Label Provider Context
-_UI_AxisManagerRepresentation_headerLabelConfiguration_feature = Header Label Configuration
-_UI_AxisManagerRepresentation_specificAxisConfigurations_feature = Specific Axis Configurations
-_UI_AxisManagerConfiguration_localHeaderLabelConfiguration_feature = Local Header Label Configuration
-_UI_AxisManagerConfiguration_axisManager_feature = Axis Manager
-_UI_AxisManagerConfiguration_localSpecificConfigurations_feature = Local Specific Configurations
-_UI_TableHeaderAxisConfiguration_axisManagers_feature = Axis Managers
-_UI_LocalTableHeaderAxisConfiguration_axisManagerConfigurations_feature = Axis Manager Configurations
-_UI_FeatureAxisConfiguration_showOnlyCommonFeature_feature = Show Only Common Feature
-_UI_EStructuralFeatureValueFillingConfiguration_listenFeature_feature = Listen Feature
-_UI_IPasteConfiguration_postActions_feature = Post Actions
-_UI_IPasteConfiguration_detachedMode_feature = Detached Mode
-_UI_PasteEObjectConfiguration_pastedElementId_feature = Pasted Element Id
-_UI_PasteEObjectConfiguration_pasteElementContainementFeature_feature = Paste Element Containement Feature
-_UI_JavaTableTester_tester_feature = Tester
-_UI_IAxis_manager_feature = Manager
-_UI_IAxis_alias_feature = Alias
-_UI_IdAxis_element_feature = Element
-_UI_EObjectAxis_element_feature = Element
-_UI_FeatureAxis_localLabelConfiguration_feature = Local Label Configuration
-_UI_ObjectAxis_localLabelConfiguration_feature = Local Label Configuration
-_UI_EStructuralFeatureAxis_element_feature = Element
-_UI_IHierarchicalAxis_parent_feature = Parent
-_UI_AxisGroup_groupedAxis_feature = Grouped Axis
-_UI_Cell_columnWrapper_feature = Column Wrapper
-_UI_Cell_rowWrapper_feature = Row Wrapper
-_UI_Cell_problems_feature = Problems
-_UI_EObjectAxisWrapper_element_feature = Element
-_UI_IdAxisWrapper_element_feature = Element
-_UI_StringResolutionProblem_valueAsString_feature = Value As String
-_UI_StringResolutionProblem_unresolvedString_feature = Unresolved String
-_UI_NamedStyle_name_feature = Name
-_UI_FontStyle_fontColor_feature = Font Color
-_UI_FontStyle_fontName_feature = Font Name
-_UI_FontStyle_fontHeight_feature = Font Height
-_UI_FontStyle_bold_feature = Bold
-_UI_FontStyle_italic_feature = Italic
-_UI_FontStyle_underline_feature = Underline
-_UI_FontStyle_strikeThrough_feature = Strike Through
-_UI_CellTextStyle_alignment_feature = Alignment
-_UI_IntValueStyle_intValue_feature = Int Value
-_UI_IntListValueStyle_intListValue_feature = Int List Value
-_UI_BooleanValueStyle_booleanValue_feature = Boolean Value
-_UI_BooleanListValueStyle_booleanListValue_feature = Boolean List Value
-_UI_DoubleValueStyle_doubleValue_feature = Double Value
-_UI_DoubleListValueStyle_doubleListValue_feature = Double List Value
-_UI_StringValueStyle_stringValue_feature = String Value
-_UI_StringListValueStyle_stringListValue_feature = String List Value
-_UI_StyledElement_styles_feature = Styles
-_UI_TableDisplayStyle_displayStyle_feature = Display Style
-_UI_Unknown_feature = Unspecified
-
-_UI_CellEditorDeclaration_COLUMN_literal = COLUMN
-_UI_CellEditorDeclaration_ROW_literal = ROW
-_UI_CellEditorDeclaration_CELL_literal = CELL
-_UI_AxisIndexStyle_ALPHABETIC_literal = ALPHABETIC
-_UI_AxisIndexStyle_NUMERIC_literal = NUMERIC
-_UI_CellTextAlignment_TOP_LEFT_literal = TOP_LEFT
-_UI_CellTextAlignment_TOP_CENTER_literal = TOP_CENTER
-_UI_CellTextAlignment_TOP_RIGHT_literal = TOP_RIGHT
-_UI_CellTextAlignment_MIDDLE_LEFT_literal = MIDDLE_LEFT
-_UI_CellTextAlignment_MIDDLE_CENTER_literal = MIDDLE_CENTER
-_UI_CellTextAlignment_MIDDLE_RIGHT_literal = MIDDLE_RIGHT
-_UI_CellTextAlignment_BOTTOM_LEFT_literal = BOTTOM_LEFT
-_UI_CellTextAlignment_BOTTOM_CENTER_literal = BOTTOM_CENTER
-_UI_CellTextAlignment_BOTTOM_RIGHT_literal = BOTTOM_RIGHT
-_UI_DisplayStyle_NORMAL_literal = NORMAL
-_UI_HierarchicalAxis_type = Hierarchical Axis
-_UI_HierarchicalAxis_parent_feature = Parent
-_UI_HierarchicalAxis_fillingConfiguration_feature = Filling Configuration
-_UI_IHierarchicalFillingConfiguration_type = IHierarchical Filling Configuration
-_UI_HierarchicalEStructuralFeatureFillingConfiguration_type = Hierarchical EStructural Feature Filling Configuration
-_UI_IHierarchicalFillingConfiguration_hierarchicalLevel_feature = Hierarchical Level
-_UI_HierarchicalEStructuralFeatureFillingConfiguration_listenFeatures_feature = Listen Features
-_UI_IHierarchicalFillingConfiguration_depth_feature = Depth
-_UI_ITreeItemAxis_type = ITree Item Axis
-_UI_IdTreeItemAxis_type = Id Tree Item Axis
-_UI_EObjectTreeItemAxis_type = EObject Tree Item Axis
-_UI_FeatureTreeItemAxis_type = Feature Tree Item Axis
-_UI_ObjectTreeItemAxis_type = Object Tree Item Axis
-_UI_FeatureIdTreeItemAxis_type = Feature Id Tree Item Axis
-_UI_EStructuralFeatureTreeItemAxis_type = EStructural Feature Tree Item Axis
-_UI_ObjectIdTreeItemAxis_type = Object Id Tree Item Axis
-_UI_ITreeItemAxis_parent_feature = Parent
-_UI_DisplayStyle_HIERARCHIC_SINGLE_TREE_COLUMN_literal = HIERARCHIC_SINGLE_TREE_COLUMN
-_UI_DisplayStyle_HIERARCHIC_MULTI_TREE_COLUMN_literal = HIERARCHIC_MULTI_TREE_COLUMN
-_UI_ITreeItemAxis_expanded_feature = Expanded
-_UI_ITreeItemAxis_children_feature = Children
-_UI_HierarchicalFeatureFillingConfiguration_type = Hierarchical Feature Filling Configuration
-_UI_HierarchicalFeatureFillingConfiguration_axisUsedAsAxisProvider_feature = Axis Used As Axis Provider
-_UI_HierarchicalFeatureFillingConfiguration_pasteConfiguration_feature = Paste Configuration
-_UI_HierarchicalFeatureFillingConfiguration_depth_feature = Depth
-_UI_TreeFillingConfiguration_type = Tree Filling Configuration
-_UI_TreeFillingConfiguration_axisUsedAsAxisProvider_feature = Axis Used As Axis Provider
-_UI_TreeFillingConfiguration_pasteConfiguration_feature = Paste Configuration
-_UI_TreeFillingConfiguration_depth_feature = Depth
-_UI_TreeFillingConfiguration_labelProvider_feature = Label Provider
-_UI_TreeFillingConfiguration_labelProviderContext_feature = Label Provider Context
+# Copyright (c) 2013 CEA LIST.
+#
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+
+pluginName = Nattable Edit Support
+providerName = Eclipse Modeling Project
+
+_UI_CreateChild_text = {0}
+_UI_CreateChild_text2 = {1} {0}
+_UI_CreateChild_text3 = {1}
+_UI_CreateChild_tooltip = Create New {0} Under {1} Feature
+_UI_CreateChild_description = Create a new child of type {0} for the {1} feature of the selected {2}.
+_UI_CreateSibling_description = Create a new sibling of type {0} for the selected {2}, under the {1} feature of their parent.
+
+_UI_PropertyDescriptor_description = The {0} of the {1}
+
+_UI_Table_type = Table
+_UI_TableNamedElement_type = Table Named Element
+_UI_TableConfiguration_type = Table Configuration
+_UI_AbstractAxisProvider_type = Abstract Axis Provider
+_UI_IMasterAxisProvider_type = IMaster Axis Provider
+_UI_ISlaveAxisProvider_type = ISlave Axis Provider
+_UI_AxisProvider_type = Axis Provider
+_UI_SlaveObjectAxisProvider_type = Slave Object Axis Provider
+_UI_MasterObjectAxisProvider_type = Master Object Axis Provider
+_UI_ILabelProviderConfiguration_type = ILabel Provider Configuration
+_UI_FeatureLabelProviderConfiguration_type = Feature Label Provider Configuration
+_UI_ObjectLabelProviderConfiguration_type = Object Label Provider Configuration
+_UI_AbstractHeaderAxisConfiguration_type = Abstract Header Axis Configuration
+_UI_AxisManagerRepresentation_type = Axis Manager Representation
+_UI_AxisManagerConfiguration_type = Axis Manager Configuration
+_UI_TableHeaderAxisConfiguration_type = Table Header Axis Configuration
+_UI_LocalTableHeaderAxisConfiguration_type = Local Table Header Axis Configuration
+_UI_IAxisConfiguration_type = IAxis Configuration
+_UI_FeatureAxisConfiguration_type = Feature Axis Configuration
+_UI_IFillingConfiguration_type = IFilling Configuration
+_UI_EStructuralFeatureValueFillingConfiguration_type = EStructural Feature Value Filling Configuration
+_UI_IPasteConfiguration_type = IPaste Configuration
+_UI_PasteEObjectConfiguration_type = Paste EObject Configuration
+_UI_AbstractTableTester_type = Abstract Table Tester
+_UI_JavaTableTester_type = Java Table Tester
+_UI_IAxis_type = IAxis
+_UI_IdAxis_type = Id Axis
+_UI_EObjectAxis_type = EObject Axis
+_UI_FeatureAxis_type = Feature Axis
+_UI_ObjectAxis_type = Object Axis
+_UI_FeatureIdAxis_type = Feature Id Axis
+_UI_EStructuralFeatureAxis_type = EStructural Feature Axis
+_UI_ObjectIdAxis_type = Object Id Axis
+_UI_IHierarchicalAxis_type = IHierarchical Axis
+_UI_AxisGroup_type = Axis Group
+_UI_Cell_type = Cell
+_UI_ICellAxisWrapper_type = ICell Axis Wrapper
+_UI_EObjectAxisWrapper_type = EObject Axis Wrapper
+_UI_IdAxisWrapper_type = Id Axis Wrapper
+_UI_Problem_type = Problem
+_UI_StringResolutionProblem_type = String Resolution Problem
+_UI_Style_type = Style
+_UI_NamedStyle_type = Named Style
+_UI_FontStyle_type = Font Style
+_UI_CellTextStyle_type = Cell Text Style
+_UI_IntValueStyle_type = Int Value Style
+_UI_IntListValueStyle_type = Int List Value Style
+_UI_BooleanValueStyle_type = Boolean Value Style
+_UI_BooleanListValueStyle_type = Boolean List Value Style
+_UI_DoubleValueStyle_type = Double Value Style
+_UI_DoubleListValueStyle_type = Double List Value Style
+_UI_StringValueStyle_type = String Value Style
+_UI_StringListValueStyle_type = String List Value Style
+_UI_StyledElement_type = Styled Element
+_UI_TableDisplayStyle_type = Table Display Style
+_UI_Unknown_type = Object
+
+_UI_Unknown_datatype= Value
+
+_UI_Table_context_feature = Context
+_UI_Table_owner_feature = Owner
+_UI_Table_prototype_feature = Prototype
+_UI_Table_tableConfiguration_feature = Table Configuration
+_UI_Table_invertAxis_feature = Invert Axis
+_UI_Table_columnAxisProvidersHistory_feature = Column Axis Providers History
+_UI_Table_rowAxisProvidersHistory_feature = Row Axis Providers History
+_UI_Table_localRowHeaderAxisConfiguration_feature = Local Row Header Axis Configuration
+_UI_Table_localColumnHeaderAxisConfiguration_feature = Local Column Header Axis Configuration
+_UI_Table_currentRowAxisProvider_feature = Current Row Axis Provider
+_UI_Table_currentColumnAxisProvider_feature = Current Column Axis Provider
+_UI_Table_cells_feature = Cells
+_UI_TableNamedElement_description_feature = Description
+_UI_TableNamedElement_name_feature = Name
+_UI_TableConfiguration_type_feature = Type
+_UI_TableConfiguration_iconPath_feature = Icon Path
+_UI_TableConfiguration_creationTester_feature = Creation Tester
+_UI_TableConfiguration_cellEditorDeclaration_feature = Cell Editor Declaration
+_UI_TableConfiguration_rowHeaderAxisConfiguration_feature = Row Header Axis Configuration
+_UI_TableConfiguration_columnHeaderAxisConfiguration_feature = Column Header Axis Configuration
+_UI_TableConfiguration_columnAxisProviders_feature = Column Axis Providers
+_UI_TableConfiguration_rowAxisProviders_feature = Row Axis Providers
+_UI_TableConfiguration_defaultRowAxisProvider_feature = Default Row Axis Provider
+_UI_TableConfiguration_defaultColumnAxisProvider_feature = Default Column Axis Provider
+_UI_IMasterAxisProvider_disconnectSlave_feature = Disconnect Slave
+_UI_AxisProvider_axis_feature = Axis
+_UI_FeatureLabelProviderConfiguration_displayIsDerived_feature = Display Is Derived
+_UI_FeatureLabelProviderConfiguration_displayType_feature = Display Type
+_UI_FeatureLabelProviderConfiguration_displayMultiplicity_feature = Display Multiplicity
+_UI_FeatureLabelProviderConfiguration_displayName_feature = Display Name
+_UI_ObjectLabelProviderConfiguration_displayIcon_feature = Display Icon
+_UI_ObjectLabelProviderConfiguration_displayLabel_feature = Display Label
+_UI_AbstractHeaderAxisConfiguration_indexStyle_feature = Index Style
+_UI_AbstractHeaderAxisConfiguration_displayLabel_feature = Display Label
+_UI_AbstractHeaderAxisConfiguration_displayFilter_feature = Display Filter
+_UI_AbstractHeaderAxisConfiguration_displayIndex_feature = Display Index
+_UI_AbstractHeaderAxisConfiguration_ownedLabelConfigurations_feature = Owned Label Configurations
+_UI_AbstractHeaderAxisConfiguration_ownedAxisConfigurations_feature = Owned Axis Configurations
+_UI_AxisManagerRepresentation_axisManagerId_feature = Axis Manager Id
+_UI_AxisManagerRepresentation_labelProviderContext_feature = Label Provider Context
+_UI_AxisManagerRepresentation_headerLabelConfiguration_feature = Header Label Configuration
+_UI_AxisManagerRepresentation_specificAxisConfigurations_feature = Specific Axis Configurations
+_UI_AxisManagerConfiguration_localHeaderLabelConfiguration_feature = Local Header Label Configuration
+_UI_AxisManagerConfiguration_axisManager_feature = Axis Manager
+_UI_AxisManagerConfiguration_localSpecificConfigurations_feature = Local Specific Configurations
+_UI_TableHeaderAxisConfiguration_axisManagers_feature = Axis Managers
+_UI_LocalTableHeaderAxisConfiguration_axisManagerConfigurations_feature = Axis Manager Configurations
+_UI_FeatureAxisConfiguration_showOnlyCommonFeature_feature = Show Only Common Feature
+_UI_EStructuralFeatureValueFillingConfiguration_listenFeature_feature = Listen Feature
+_UI_IPasteConfiguration_postActions_feature = Post Actions
+_UI_IPasteConfiguration_detachedMode_feature = Detached Mode
+_UI_PasteEObjectConfiguration_pastedElementId_feature = Pasted Element Id
+_UI_PasteEObjectConfiguration_pasteElementContainementFeature_feature = Paste Element Containement Feature
+_UI_JavaTableTester_tester_feature = Tester
+_UI_IAxis_manager_feature = Manager
+_UI_IAxis_alias_feature = Alias
+_UI_IdAxis_element_feature = Element
+_UI_EObjectAxis_element_feature = Element
+_UI_FeatureAxis_localLabelConfiguration_feature = Local Label Configuration
+_UI_ObjectAxis_localLabelConfiguration_feature = Local Label Configuration
+_UI_EStructuralFeatureAxis_element_feature = Element
+_UI_IHierarchicalAxis_parent_feature = Parent
+_UI_AxisGroup_groupedAxis_feature = Grouped Axis
+_UI_Cell_columnWrapper_feature = Column Wrapper
+_UI_Cell_rowWrapper_feature = Row Wrapper
+_UI_Cell_problems_feature = Problems
+_UI_EObjectAxisWrapper_element_feature = Element
+_UI_IdAxisWrapper_element_feature = Element
+_UI_StringResolutionProblem_valueAsString_feature = Value As String
+_UI_StringResolutionProblem_unresolvedString_feature = Unresolved String
+_UI_NamedStyle_name_feature = Name
+_UI_FontStyle_fontColor_feature = Font Color
+_UI_FontStyle_fontName_feature = Font Name
+_UI_FontStyle_fontHeight_feature = Font Height
+_UI_FontStyle_bold_feature = Bold
+_UI_FontStyle_italic_feature = Italic
+_UI_FontStyle_underline_feature = Underline
+_UI_FontStyle_strikeThrough_feature = Strike Through
+_UI_CellTextStyle_alignment_feature = Alignment
+_UI_IntValueStyle_intValue_feature = Int Value
+_UI_IntListValueStyle_intListValue_feature = Int List Value
+_UI_BooleanValueStyle_booleanValue_feature = Boolean Value
+_UI_BooleanListValueStyle_booleanListValue_feature = Boolean List Value
+_UI_DoubleValueStyle_doubleValue_feature = Double Value
+_UI_DoubleListValueStyle_doubleListValue_feature = Double List Value
+_UI_StringValueStyle_stringValue_feature = String Value
+_UI_StringListValueStyle_stringListValue_feature = String List Value
+_UI_StyledElement_styles_feature = Styles
+_UI_TableDisplayStyle_displayStyle_feature = Display Style
+_UI_Unknown_feature = Unspecified
+
+_UI_CellEditorDeclaration_COLUMN_literal = COLUMN
+_UI_CellEditorDeclaration_ROW_literal = ROW
+_UI_CellEditorDeclaration_CELL_literal = CELL
+_UI_AxisIndexStyle_ALPHABETIC_literal = ALPHABETIC
+_UI_AxisIndexStyle_NUMERIC_literal = NUMERIC
+_UI_CellTextAlignment_TOP_LEFT_literal = TOP_LEFT
+_UI_CellTextAlignment_TOP_CENTER_literal = TOP_CENTER
+_UI_CellTextAlignment_TOP_RIGHT_literal = TOP_RIGHT
+_UI_CellTextAlignment_MIDDLE_LEFT_literal = MIDDLE_LEFT
+_UI_CellTextAlignment_MIDDLE_CENTER_literal = MIDDLE_CENTER
+_UI_CellTextAlignment_MIDDLE_RIGHT_literal = MIDDLE_RIGHT
+_UI_CellTextAlignment_BOTTOM_LEFT_literal = BOTTOM_LEFT
+_UI_CellTextAlignment_BOTTOM_CENTER_literal = BOTTOM_CENTER
+_UI_CellTextAlignment_BOTTOM_RIGHT_literal = BOTTOM_RIGHT
+_UI_DisplayStyle_NORMAL_literal = NORMAL
+_UI_HierarchicalAxis_type = Hierarchical Axis
+_UI_HierarchicalAxis_parent_feature = Parent
+_UI_HierarchicalAxis_fillingConfiguration_feature = Filling Configuration
+_UI_IHierarchicalFillingConfiguration_type = IHierarchical Filling Configuration
+_UI_HierarchicalEStructuralFeatureFillingConfiguration_type = Hierarchical EStructural Feature Filling Configuration
+_UI_IHierarchicalFillingConfiguration_hierarchicalLevel_feature = Hierarchical Level
+_UI_HierarchicalEStructuralFeatureFillingConfiguration_listenFeatures_feature = Listen Features
+_UI_IHierarchicalFillingConfiguration_depth_feature = Depth
+_UI_ITreeItemAxis_type = ITree Item Axis
+_UI_IdTreeItemAxis_type = Id Tree Item Axis
+_UI_EObjectTreeItemAxis_type = EObject Tree Item Axis
+_UI_FeatureTreeItemAxis_type = Feature Tree Item Axis
+_UI_ObjectTreeItemAxis_type = Object Tree Item Axis
+_UI_FeatureIdTreeItemAxis_type = Feature Id Tree Item Axis
+_UI_EStructuralFeatureTreeItemAxis_type = EStructural Feature Tree Item Axis
+_UI_ObjectIdTreeItemAxis_type = Object Id Tree Item Axis
+_UI_ITreeItemAxis_parent_feature = Parent
+_UI_DisplayStyle_HIERARCHIC_SINGLE_TREE_COLUMN_literal = HIERARCHIC_SINGLE_TREE_COLUMN
+_UI_DisplayStyle_HIERARCHIC_MULTI_TREE_COLUMN_literal = HIERARCHIC_MULTI_TREE_COLUMN
+_UI_ITreeItemAxis_expanded_feature = Expanded
+_UI_ITreeItemAxis_children_feature = Children
+_UI_HierarchicalFeatureFillingConfiguration_type = Hierarchical Feature Filling Configuration
+_UI_HierarchicalFeatureFillingConfiguration_axisUsedAsAxisProvider_feature = Axis Used As Axis Provider
+_UI_HierarchicalFeatureFillingConfiguration_pasteConfiguration_feature = Paste Configuration
+_UI_HierarchicalFeatureFillingConfiguration_depth_feature = Depth
+_UI_TreeFillingConfiguration_type = Tree Filling Configuration
+_UI_TreeFillingConfiguration_axisUsedAsAxisProvider_feature = Axis Used As Axis Provider
+_UI_TreeFillingConfiguration_pasteConfiguration_feature = Paste Configuration
+_UI_TreeFillingConfiguration_depth_feature = Depth
+_UI_TreeFillingConfiguration_labelProvider_feature = Label Provider
+_UI_TreeFillingConfiguration_labelProviderContext_feature = Label Provider Context
+
+_UI_EObjectValueStyle_type = EObject Value Style
+_UI_EObjectListValueStyle_type = EObject List Value Style
+_UI_EObjectValueStyle_eObjectValue_feature = EObject Value
+_UI_EObjectListValueStyle_eObjectValue_feature = EObject Value
-_UI_EObjectValueStyle_type = EObject Value Style
-_UI_EObjectListValueStyle_type = EObject List Value Style
-_UI_EObjectValueStyle_eObjectValue_feature = EObject Value
-_UI_EObjectListValueStyle_eObjectValue_feature = EObject Value
-
pluginDescription=This plugin provides the metamodel used by the nattable editor.
-
-_UI_OperationLabelProviderConfiguration_type = Operation Label Provider Configuration
-_UI_OperationAxis_type = Operation Axis
-_UI_OperationTreeItemAxis_type = Operation Tree Item Axis
-_UI_EOperationAxis_type = EOperation Axis
-_UI_EOperationTreeItemAxis_type = EOperation Tree Item Axis
-_UI_OperationLabelProviderConfiguration_displayType_feature = Display Type
-_UI_OperationLabelProviderConfiguration_displayMultiplicity_feature = Display Multiplicity
-_UI_OperationLabelProviderConfiguration_displayName_feature = Display Name
-_UI_OperationAxis_localLabelConfiguration_feature = Local Label Configuration
-_UI_EOperationAxis_element_feature = Element
+
+_UI_OperationLabelProviderConfiguration_type = Operation Label Provider Configuration
+_UI_OperationAxis_type = Operation Axis
+_UI_OperationTreeItemAxis_type = Operation Tree Item Axis
+_UI_EOperationAxis_type = EOperation Axis
+_UI_EOperationTreeItemAxis_type = EOperation Tree Item Axis
+_UI_OperationLabelProviderConfiguration_displayType_feature = Display Type
+_UI_OperationLabelProviderConfiguration_displayMultiplicity_feature = Display Multiplicity
+_UI_OperationLabelProviderConfiguration_displayName_feature = Display Name
+_UI_OperationAxis_localLabelConfiguration_feature = Local Label Configuration
+_UI_EOperationAxis_element_feature = Element
+_UI_PasteEObjectConfiguration_axisIdentifier_feature = Axis Identifier
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/provider/PasteEObjectConfigurationItemProvider.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/provider/PasteEObjectConfigurationItemProvider.java
index a5e44b913e0..489da314eb4 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/provider/PasteEObjectConfigurationItemProvider.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/provider/PasteEObjectConfigurationItemProvider.java
@@ -1,161 +1,185 @@
-/**
- * Copyright (c) 2013 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- */
-package org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.provider;
-
-
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
-import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
-import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
-import org.eclipse.emf.edit.provider.ViewerNotification;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.NattableaxisconfigurationPackage;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.PasteEObjectConfiguration;
-
-/**
- * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.PasteEObjectConfiguration} object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-public class PasteEObjectConfigurationItemProvider extends IPasteConfigurationItemProvider {
- /**
- * This constructs an instance from a factory and a notifier.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public PasteEObjectConfigurationItemProvider(AdapterFactory adapterFactory) {
- super(adapterFactory);
- }
-
- /**
- * This returns the property descriptors for the adapted class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
- if (itemPropertyDescriptors == null) {
- super.getPropertyDescriptors(object);
-
- addPastedElementIdPropertyDescriptor(object);
- addPasteElementContainementFeaturePropertyDescriptor(object);
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This adds a property descriptor for the Pasted Element Id feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void addPastedElementIdPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_PasteEObjectConfiguration_pastedElementId_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_PasteEObjectConfiguration_pastedElementId_feature", "_UI_PasteEObjectConfiguration_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- NattableaxisconfigurationPackage.Literals.PASTE_EOBJECT_CONFIGURATION__PASTED_ELEMENT_ID,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
- }
-
- /**
- * This adds a property descriptor for the Paste Element Containement Feature feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void addPasteElementContainementFeaturePropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_PasteEObjectConfiguration_pasteElementContainementFeature_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_PasteEObjectConfiguration_pasteElementContainementFeature_feature", "_UI_PasteEObjectConfiguration_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- NattableaxisconfigurationPackage.Literals.PASTE_EOBJECT_CONFIGURATION__PASTE_ELEMENT_CONTAINEMENT_FEATURE,
- true,
- false,
- true,
- null,
- null,
- null));
- }
-
- /**
- * This returns PasteEObjectConfiguration.gif.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object getImage(Object object) {
- return overlayImage(object, getResourceLocator().getImage("full/obj16/PasteEObjectConfiguration")); //$NON-NLS-1$
- }
-
- /**
- * This returns the label text for the adapted class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String getText(Object object) {
- PasteEObjectConfiguration pasteEObjectConfiguration = (PasteEObjectConfiguration)object;
- return getString("_UI_PasteEObjectConfiguration_type") + " " + pasteEObjectConfiguration.isDetachedMode(); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
-
- /**
- * This handles model notifications by calling {@link #updateChildren} to update any cached
- * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void notifyChanged(Notification notification) {
- updateChildren(notification);
-
- switch (notification.getFeatureID(PasteEObjectConfiguration.class)) {
- case NattableaxisconfigurationPackage.PASTE_EOBJECT_CONFIGURATION__PASTED_ELEMENT_ID:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
- return;
- }
- super.notifyChanged(notification);
- }
-
- /**
- * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
- * that can be created under this object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
- super.collectNewChildDescriptors(newChildDescriptors, object);
- }
-
-}
+/**
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ */
+package org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.NattableaxisconfigurationPackage;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.PasteEObjectConfiguration;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.PasteEObjectConfiguration} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class PasteEObjectConfigurationItemProvider extends IPasteConfigurationItemProvider {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PasteEObjectConfigurationItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addPastedElementIdPropertyDescriptor(object);
+ addPasteElementContainementFeaturePropertyDescriptor(object);
+ addAxisIdentifierPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Pasted Element Id feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addPastedElementIdPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_PasteEObjectConfiguration_pastedElementId_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_PasteEObjectConfiguration_pastedElementId_feature", "_UI_PasteEObjectConfiguration_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ NattableaxisconfigurationPackage.Literals.PASTE_EOBJECT_CONFIGURATION__PASTED_ELEMENT_ID,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Paste Element Containement Feature feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addPasteElementContainementFeaturePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_PasteEObjectConfiguration_pasteElementContainementFeature_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_PasteEObjectConfiguration_pasteElementContainementFeature_feature", "_UI_PasteEObjectConfiguration_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ NattableaxisconfigurationPackage.Literals.PASTE_EOBJECT_CONFIGURATION__PASTE_ELEMENT_CONTAINEMENT_FEATURE,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Axis Identifier feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addAxisIdentifierPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_PasteEObjectConfiguration_axisIdentifier_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_PasteEObjectConfiguration_axisIdentifier_feature", "_UI_PasteEObjectConfiguration_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ NattableaxisconfigurationPackage.Literals.PASTE_EOBJECT_CONFIGURATION__AXIS_IDENTIFIER,
+ true,
+ false,
+ false,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This returns PasteEObjectConfiguration.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/PasteEObjectConfiguration")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ PasteEObjectConfiguration pasteEObjectConfiguration = (PasteEObjectConfiguration)object;
+ return getString("_UI_PasteEObjectConfiguration_type") + " " + pasteEObjectConfiguration.isDetachedMode(); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(PasteEObjectConfiguration.class)) {
+ case NattableaxisconfigurationPackage.PASTE_EOBJECT_CONFIGURATION__PASTED_ELEMENT_ID:
+ case NattableaxisconfigurationPackage.PASTE_EOBJECT_CONFIGURATION__AXIS_IDENTIFIER:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+}
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/model/nattable.ecore b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/model/nattable.ecore
index 0a20779b9e8..33d01d8d9ea 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/model/nattable.ecore
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/model/nattable.ecore
@@ -1,2049 +1,2051 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ecore:EPackage
- xmi:version="2.0"
- xmlns:xmi="http://www.omg.org/XMI"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
- name="nattable"
- nsURI="http://www.eclipse.org/papyrus/nattable/model"
- nsPrefix="nattable">
- <eAnnotations
- source="http://www.eclipse.org/OCL/Import">
- <details
- key="ecore"
- value="http://www.eclipse.org/emf/2002/Ecore#/"/>
- </eAnnotations>
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/Ecore">
- <details
- key="invocationDelegates"
- value="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"/>
- <details
- key="settingDelegates"
- value="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"/>
- <details
- key="validationDelegates"
- value="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"/>
- </eAnnotations>
- <eClassifiers
- xsi:type="ecore:EClass"
- name="Table"
- eSuperTypes="#//nattableconfiguration/TableNamedElement">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/Ecore">
- <details
- key="constraints"
- value="currentRowAxisInHistory currentColumnAxisInHistory currentAxisProvidersTypes"/>
- </eAnnotations>
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
- <details
- key="currentRowAxisInHistory"
- value="rowAxisProvidersHistory->includes(currentRowAxisProvider)"/>
- <details
- key="currentColumnAxisInHistory"
- value="columnAxisProvidersHistory->includes(currentColumnAxisProvider)"/>
- <details
- key="currentAxisProvidersTypes"
- value="not (currentRowAxisProvider.oclIsKindOf(nattableaxisprovider::ISlaveAxisProvider) and currentColumnAxisProvider.oclIsKindOf(nattableaxisprovider::ISlaveAxisProvider))"/>
- </eAnnotations>
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="This object represents the table. It is used to save the interesting informations of the graphical table.&#xD;&#xA;&#xD;&#xA;The currentAxisProviders can be : Master/Master, Master/Slave, Slave/Master and never Slave/Slave."/>
- </eAnnotations>
- <eStructuralFeatures
- xsi:type="ecore:EReference"
- name="context"
- lowerBound="1"
- eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="The context is used for two things : &#xD;&#xA;&lt;ul> &lt;li>&quot;virtual&quot; parent to display the table in the Papyrus Model Explorer &lt;/li>&#xD;&#xA;&lt;li>container of the objects created in the table&lt;/li>&#xD;&#xA;&lt;/ul> &#xD;&#xA;The context can't be null;"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures
- xsi:type="ecore:EReference"
- name="owner"
- lowerBound="1"
- eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
- <eStructuralFeatures
- xsi:type="ecore:EReference"
- name="prototype"
- lowerBound="1"
- eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
- <eStructuralFeatures
- xsi:type="ecore:EReference"
- name="tableConfiguration"
- lowerBound="1"
- eType="#//nattableconfiguration/TableConfiguration">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="Reference the configuration used by the table. This field can't be null."/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures
- xsi:type="ecore:EAttribute"
- name="invertAxis"
- lowerBound="1"
- eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
- defaultValueLiteral="false">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="If true, the axis will be inverted on the screen. When the user inverts the axis, &#xD;&#xA;only this boolean is changed. We must not invert the currentRowAxis and the currentColumnAxis neither the histories or the AxisConfiguration"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures
- xsi:type="ecore:EReference"
- name="columnAxisProvidersHistory"
- lowerBound="1"
- upperBound="-1"
- eType="#//nattableaxisprovider/AbstractAxisProvider"
- containment="true">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="This list contains all the columns configurations already used by the user and saved in this list by him."/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures
- xsi:type="ecore:EReference"
- name="rowAxisProvidersHistory"
- lowerBound="1"
- upperBound="-1"
- eType="#//nattableaxisprovider/AbstractAxisProvider"
- containment="true">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="This list contains all the rowsconfigurations already used by the user and saved in this list by him."/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures
- xsi:type="ecore:EReference"
- name="localRowHeaderAxisConfiguration"
- eType="#//nattableaxisconfiguration/LocalTableHeaderAxisConfiguration"
- containment="true">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="This field contains the row headerAxisConfiguration. It could be null. &#xD;&#xA;In this case we use the row TableHeaderAxisConfiguration stored in the TableConfiguration of this table."/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures
- xsi:type="ecore:EReference"
- name="localColumnHeaderAxisConfiguration"
- eType="#//nattableaxisconfiguration/LocalTableHeaderAxisConfiguration"
- containment="true">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="This field contains the columnheaderAxisConfiguration. It could be null. &#xD;&#xA;In this case we use the column TableHeaderAxisConfiguration stored in the TableConfiguration of this table."/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures
- xsi:type="ecore:EReference"
- name="currentRowAxisProvider"
- lowerBound="1"
- eType="#//nattableaxisprovider/AbstractAxisProvider">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="References the current row AxisProvider used in the table.&#xD;&#xA;The value must be owned by rowAxisProviderHistory"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures
- xsi:type="ecore:EReference"
- name="currentColumnAxisProvider"
- lowerBound="1"
- eType="#//nattableaxisprovider/AbstractAxisProvider">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="References the current column AxisProvider used in the table.&#xD;&#xA;The value must be owned by column AxisProviderHistory"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures
- xsi:type="ecore:EReference"
- name="cells"
- upperBound="-1"
- eType="#//nattablecell/Cell"
- containment="true">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="Cells of the table. They are used when the value to display can't be deduced of&#xD;&#xA;the intersection of the row and the column."/>
- </eAnnotations>
- </eStructuralFeatures>
- </eClassifiers>
- <eSubpackages
- name="nattableconfiguration"
- nsURI="http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration"
- nsPrefix="nattableconfiguration">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/Ecore">
- <details
- key="invocationDelegates"
- value="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"/>
- <details
- key="settingDelegates"
- value="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"/>
- <details
- key="validationDelegates"
- value="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"/>
- </eAnnotations>
- <eClassifiers
- xsi:type="ecore:EClass"
- name="TableNamedElement"
- abstract="true"
- eSuperTypes="#//nattablestyle/StyledElement">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="Abstract Element used in this metamodel for named element which have a description."/>
- </eAnnotations>
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/Ecore">
- <details
- key="constraints"
- value="nonEmptyName"/>
- </eAnnotations>
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
- <details
- key="nonEmptyName"
- value="not (name.oclIsUndefined() or name = '')"/>
- </eAnnotations>
- <eStructuralFeatures
- xsi:type="ecore:EAttribute"
- name="description"
- eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="The description of the named element."/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures
- xsi:type="ecore:EAttribute"
- name="name"
- lowerBound="1"
- eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="The name of the named element."/>
- </eAnnotations>
- </eStructuralFeatures>
- </eClassifiers>
- <eClassifiers
- xsi:type="ecore:EClass"
- name="TableConfiguration"
- eSuperTypes="#//nattableconfiguration/TableNamedElement">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/Ecore">
- <details
- key="constraints"
- value="defaultRowAxisProviderExistsInCollection defaultColumnAxisProviderExistsInCollection defaultAxisProvidersTypes typeNonNullNonEmpty iconPath"/>
- </eAnnotations>
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
- <details
- key="defaultRowAxisProviderExistsInCollection"
- value="rowAxisProviders->includes(defaultRowAxisProvider)"/>
- <details
- key="defaultColumnAxisProviderExistsInCollection"
- value="columnAxisProviders->includes(defaultColumnAxisProvider)"/>
- <details
- key="typeNonNullNonEmpty"
- value="not (type.oclIsUndefined() or type = '')"/>
- <details
- key="iconPath"
- value="not (iconPath.oclIsUndefined() or iconPath = '')"/>
- <details
- key="defaultAxisProvidersTypes"
- value="not (defaultRowAxisProvider.oclIsKindOf(nattableaxisprovider::ISlaveAxisProvider) and defaultColumnAxisProvider.oclIsKindOf(nattableaxisprovider::ISlaveAxisProvider))"/>
- </eAnnotations>
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="This object is used to configure a table. To create a new type of table, you must create &#xD;&#xA;a new file *.nattableConfiguration and register it using the extension point org.eclipse.papyrus.infra.nattable.configuration&#xD;&#xA;&#xD;&#xA;the defaultAxisProviders can be : Master/Master, Master/Slave, Slave/Master and never Slave/Slave."/>
- </eAnnotations>
- <eStructuralFeatures
- xsi:type="ecore:EAttribute"
- name="type"
- lowerBound="1"
- eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="The type of the table. This value is used to be able to open/close easily the table editor in Papyrus. &#xD;&#xA;Moreover it allows to distinghuish easily the table."/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures
- xsi:type="ecore:EAttribute"
- name="iconPath"
- lowerBound="1"
- eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="The path of the icon to use for the table which references this TableConfiguration."/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures
- xsi:type="ecore:EReference"
- name="creationTester"
- eType="#//nattabletester/AbstractTableTester"
- containment="true">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="This value could be null. The tester is used to know if this tableConfiguration can be used&#xD;&#xA;to create a new table using as context the selected element."/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures
- xsi:type="ecore:EAttribute"
- name="cellEditorDeclaration"
- lowerBound="1"
- eType="#//nattableconfiguration/CellEditorDeclaration"
- defaultValueLiteral="COLUMN">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="This value can't be null. Indicates how the CellEditor must be declared. &#xD;&#xA;In the common table, we display features as columns and objects as line. &#xD;&#xA;In this case the cell editors are specific to features, so the cell editor must be declared on the columns."/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures
- xsi:type="ecore:EReference"
- name="rowHeaderAxisConfiguration"
- lowerBound="1"
- eType="#//nattableaxisconfiguration/TableHeaderAxisConfiguration"
- containment="true">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="This value can't be null. Gives the initial row configuration of the table."/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures
- xsi:type="ecore:EReference"
- name="columnHeaderAxisConfiguration"
- lowerBound="1"
- eType="#//nattableaxisconfiguration/TableHeaderAxisConfiguration"
- containment="true">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="This value can't be null. Gives the initial column configuration of the table."/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures
- xsi:type="ecore:EReference"
- name="columnAxisProviders"
- lowerBound="1"
- upperBound="-1"
- eType="#//nattableaxisprovider/AbstractAxisProvider"
- containment="true">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="This list can't be empty. Contains list of possible column AxisProvider for the table."/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures
- xsi:type="ecore:EReference"
- name="rowAxisProviders"
- lowerBound="1"
- upperBound="-1"
- eType="#//nattableaxisprovider/AbstractAxisProvider"
- containment="true">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="This list can't be empty. Contains a list of possible row AxisProvider for the table."/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures
- xsi:type="ecore:EReference"
- name="defaultRowAxisProvider"
- lowerBound="1"
- eType="#//nattableaxisprovider/AbstractAxisProvider">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="This value can't be null. References the Axis Provider to use by default for rows."/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures
- xsi:type="ecore:EReference"
- name="defaultColumnAxisProvider"
- lowerBound="1"
- eType="#//nattableaxisprovider/AbstractAxisProvider">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="This value can't be null. References the Axis Provider to use by default for columns."/>
- </eAnnotations>
- </eStructuralFeatures>
- </eClassifiers>
- <eClassifiers
- xsi:type="ecore:EEnum"
- name="CellEditorDeclaration">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="Indicates how the CellEditor must be declared. &#xD;&#xA;In the common table, we display features as columns and objects as line. &#xD;&#xA;In this case the cell editors are specific to features, so the cell editor must be declared on the columns."/>
- </eAnnotations>
- <eLiterals
- name="COLUMN"/>
- <eLiterals
- name="ROW"
- value="1"/>
- <eLiterals
- name="CELL"
- value="2"/>
- </eClassifiers>
- </eSubpackages>
- <eSubpackages
- name="nattableaxisprovider"
- nsURI="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider"
- nsPrefix="nattableaxisprovider">
- <eClassifiers
- xsi:type="ecore:EClass"
- name="AbstractAxisProvider"
- abstract="true"
- eSuperTypes="#//nattableconfiguration/TableNamedElement">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="Abstract Element for the AxisProvider. This one only provides a method getAxis()."/>
- </eAnnotations>
- <eOperations
- name="getAxis"
- upperBound="-1"
- eType="#//nattableaxis/IAxis">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="This method must returns the IAxis owned by the AxisProvider.&#xD;&#xA;Warning, in case of syncrhonized table, the list often will be empty. This method&#xD;&#xA;only returns the IAxis serialized in the model. Displayed elements are not necessary serialized.&#xD;&#xA;"/>
- </eAnnotations>
- </eOperations>
- </eClassifiers>
- <eClassifiers
- xsi:type="ecore:EClass"
- name="IMasterAxisProvider"
- abstract="true"
- interface="true"
- eSuperTypes="#//nattableaxisprovider/AxisProvider">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="Interface used to distinghuish master axis provider from slave axis provider. &#xD;&#xA;The master are able to disconnect the slave."/>
- </eAnnotations>
- <eStructuralFeatures
- xsi:type="ecore:EAttribute"
- name="disconnectSlave"
- eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="if true, the slave won't be updated when the elements owned by the master will be changed."/>
- </eAnnotations>
- </eStructuralFeatures>
- </eClassifiers>
- <eClassifiers
- xsi:type="ecore:EClass"
- name="ISlaveAxisProvider"
- abstract="true"
- interface="true"
- eSuperTypes="#//nattableaxisprovider/AxisProvider">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="Interface used to distinghuish the master from the slave axis provider."/>
- </eAnnotations>
- </eClassifiers>
- <eClassifiers
- xsi:type="ecore:EClass"
- name="AxisProvider"
- abstract="true"
- eSuperTypes="#//nattableaxisprovider/AbstractAxisProvider">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="AbstractAxisProvider. This one owns IAxis"/>
- </eAnnotations>
- <eStructuralFeatures
- xsi:type="ecore:EReference"
- name="axis"
- upperBound="-1"
- eType="#//nattableaxis/IAxis"
- containment="true">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="IAxis owned by the AxisProvider. The list can be empty in case of synchronized table."/>
- </eAnnotations>
- </eStructuralFeatures>
- </eClassifiers>
- <eClassifiers
- xsi:type="ecore:EClass"
- name="SlaveObjectAxisProvider"
- eSuperTypes="#//nattableaxisprovider/ISlaveAxisProvider">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="Concret implementation of ISlaveAxisProvider"/>
- </eAnnotations>
- </eClassifiers>
- <eClassifiers
- xsi:type="ecore:EClass"
- name="MasterObjectAxisProvider"
- eSuperTypes="#//nattableaxisprovider/IMasterAxisProvider">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="Concret implementation of IMasterAxisProvider"/>
- </eAnnotations>
- </eClassifiers>
- </eSubpackages>
- <eSubpackages
- name="nattablelabelprovider"
- nsURI="http://www.eclipse.org/papyrus/nattable/model/table/nattablecontentprovider"
- nsPrefix="nattablelabelprovider">
- <eClassifiers
- xsi:type="ecore:EClass"
- name="ILabelProviderConfiguration"
- abstract="true"
- interface="true"
- eSuperTypes="#//nattablestyle/StyledElement">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="Common Interface for LabelProviderConfiguration"/>
- </eAnnotations>
- </eClassifiers>
- <eClassifiers
- xsi:type="ecore:EClass"
- name="FeatureLabelProviderConfiguration"
- eSuperTypes="#//nattablelabelprovider/ObjectLabelProviderConfiguration">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="LabelProviderConfiguration for Feature. In case of Feature. we have two display options : &#xD;&#xA;&lt;ul>&lt;li>display the icon of the feature &lt;/li> &#xD;&#xA;&lt;li>display the label of the feature &lt;/li>&#xD;&#xA;&lt;li>display the multiplicity of the feature &lt;/li>&#xD;&#xA;&lt;li>display the type of the feature &lt;/li>&#xD;&#xA;&lt;li>display the '/' for isDerived of the feature &lt;/li>&#xD;&#xA;&lt;li>display the name of the feature &lt;/li>&#xD;&#xA; &lt;/ul>"/>
- </eAnnotations>
- <eStructuralFeatures
- xsi:type="ecore:EAttribute"
- name="displayIsDerived"
- lowerBound="1"
- eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
- defaultValueLiteral="true">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="If true, we will display the '/' for isDerived"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures
- xsi:type="ecore:EAttribute"
- name="displayType"
- lowerBound="1"
- eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
- defaultValueLiteral="true">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="If true, we will display the typeof the feature"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures
- xsi:type="ecore:EAttribute"
- name="displayMultiplicity"
- lowerBound="1"
- eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
- defaultValueLiteral="true">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="If true, we will display the multiplicity of the feature"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures
- xsi:type="ecore:EAttribute"
- name="displayName"
- lowerBound="1"
- eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
- defaultValueLiteral="true">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="If true, we will display the name of the feature"/>
- </eAnnotations>
- </eStructuralFeatures>
- </eClassifiers>
- <eClassifiers
- xsi:type="ecore:EClass"
- name="ObjectLabelProviderConfiguration"
- eSuperTypes="#//nattablelabelprovider/ILabelProviderConfiguration">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="LabelProviderConfiguration for Object. In case of Object we have two display options : &#xD;&#xA;&lt;ul>&lt;li>display the icon of the object&lt;/li> &#xD;&#xA;&lt;li>display the label of the object&lt;/li> &lt;/ul>"/>
- </eAnnotations>
- <eStructuralFeatures
- xsi:type="ecore:EAttribute"
- name="displayIcon"
- lowerBound="1"
- eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
- defaultValueLiteral="true">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="If true, we will display the icon of the object"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures
- xsi:type="ecore:EAttribute"
- name="displayLabel"
- lowerBound="1"
- eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
- defaultValueLiteral="true">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="If true, we will display the label of the object"/>
- </eAnnotations>
- </eStructuralFeatures>
- </eClassifiers>
- <eClassifiers
- xsi:type="ecore:EClass"
- name="OperationLabelProviderConfiguration"
- eSuperTypes="#//nattablelabelprovider/ObjectLabelProviderConfiguration">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="LabelProviderConfiguration for Operation. In case of Operation, we have four display options : &#xD;&#xA;&lt;ul>&lt;li>display the icon of the Operation&lt;/li> &#xD;&#xA;&lt;li>display the label of the Operation&lt;/li>&#xD;&#xA;&lt;li>display the multiplicity of the Operation&lt;/li>&#xD;&#xA;&lt;li>display the type of the Operation&lt;/li>&#xD;&#xA;&lt;li>display the '/' for isDerived of the feature &lt;/li>&#xD;&#xA;&lt;li>display the name of the feature &lt;/li>&#xD;&#xA; &lt;/ul>"/>
- </eAnnotations>
- <eStructuralFeatures
- xsi:type="ecore:EAttribute"
- name="displayType"
- lowerBound="1"
- eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
- defaultValueLiteral="true"/>
- <eStructuralFeatures
- xsi:type="ecore:EAttribute"
- name="displayMultiplicity"
- lowerBound="1"
- eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
- defaultValueLiteral="true"/>
- <eStructuralFeatures
- xsi:type="ecore:EAttribute"
- name="displayName"
- lowerBound="1"
- eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
- defaultValueLiteral="true"/>
- </eClassifiers>
- </eSubpackages>
- <eSubpackages
- name="nattableaxisconfiguration"
- nsURI="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration"
- nsPrefix="nattableaxisconfiguration">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/Ecore">
- <details
- key="invocationDelegates"
- value="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"/>
- <details
- key="settingDelegates"
- value="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"/>
- <details
- key="validationDelegates"
- value="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"/>
- </eAnnotations>
- <eClassifiers
- xsi:type="ecore:EClass"
- name="AbstractHeaderAxisConfiguration"
- abstract="true"
- eSuperTypes="#//nattablestyle/StyledElement">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="Abstract Class for the HeaderAxisConfiguration. This class provides : &#xD;&#xA;&lt;ul>&lt;li>informations on the appearance of the header&lt;/li>&#xD;&#xA;&lt;li> a list of label configuration which can be used by the header&lt;/li>&#xD;&#xA;&lt;li> a list of axisConfiguration. These axis configuration are used to provide the contents of the axis&lt;/li>&#xD;&#xA;&lt;/ul>"/>
- </eAnnotations>
- <eStructuralFeatures
- xsi:type="ecore:EAttribute"
- name="indexStyle"
- lowerBound="1"
- eType="#//nattableaxisconfiguration/AxisIndexStyle">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="This value can't be null. Indicates how to display the index of the Axis : using letter or using number."/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures
- xsi:type="ecore:EAttribute"
- name="displayLabel"
- lowerBound="1"
- eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
- defaultValueLiteral="true">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="If true, the label header will be displayed."/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures
- xsi:type="ecore:EAttribute"
- name="displayFilter"
- lowerBound="1"
- eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
- defaultValueLiteral="false">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="If true AND if the axisConfiguration is used as column, the row filter will be displayed."/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures
- xsi:type="ecore:EAttribute"
- name="displayIndex"
- lowerBound="1"
- eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
- defaultValueLiteral="true">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="If true, the index header will be displayed."/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures
- xsi:type="ecore:EReference"
- name="ownedLabelConfigurations"
- upperBound="-1"
- eType="#//nattablelabelprovider/ILabelProviderConfiguration"
- containment="true">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="The list of the possible label configuration, referenced by the axis configuration."/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures
- xsi:type="ecore:EReference"
- name="ownedAxisConfigurations"
- upperBound="-1"
- eType="#//nattableaxisconfiguration/IAxisConfiguration"
- containment="true">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="The list of the owned axis configuration."/>
- </eAnnotations>
- </eStructuralFeatures>
- </eClassifiers>
- <eClassifiers
- xsi:type="ecore:EClass"
- name="AxisManagerRepresentation"
- eSuperTypes="#//nattablestyle/StyledElement">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="This class is used to represents in the model the java Axis Manager."/>
- </eAnnotations>
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/Ecore">
- <details
- key="constraints"
- value="nonEmptyAxisManager"/>
- </eAnnotations>
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
- <details
- key="nonEmptyAxisManager"
- value="not (axisManagerId.oclIsUndefined() or axisManagerId = '')"/>
- </eAnnotations>
- <eStructuralFeatures
- xsi:type="ecore:EAttribute"
- name="axisManagerId"
- lowerBound="1"
- eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="This id allows to find the Java Axis Manager represented by this element.&#xD;&#xA;To find it you must use AxisManagerFactory.INSTANCE.getAxisManager(AxisManagerRepresentation)&#xD;&#xA;To register a Java Axis Manager,you must use the extension point : org.eclipse.papyrus.infra.nattable.axismanager"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures
- xsi:type="ecore:EAttribute"
- name="labelProviderContext"
- eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="The context on which the label provider to use for this AxisManagerRepresentation are declared.&#xD;&#xA;(see the Papyrus Label Provider Service for further informations)"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures
- xsi:type="ecore:EReference"
- name="headerLabelConfiguration"
- lowerBound="1"
- eType="#//nattablelabelprovider/ILabelProviderConfiguration">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="The label provider configuration to use for the header of the axis provided by the represented AxisManager"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures
- xsi:type="ecore:EReference"
- name="specificAxisConfigurations"
- upperBound="-1"
- eType="#//nattableaxisconfiguration/IAxisConfiguration">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="A list of specific configurations to use for this axis."/>
- </eAnnotations>
- </eStructuralFeatures>
- </eClassifiers>
- <eClassifiers
- xsi:type="ecore:EClass"
- name="AxisManagerConfiguration"
- eSuperTypes="#//nattablestyle/StyledElement">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="This object allows to define and configure a Java AxisManager"/>
- </eAnnotations>
- <eStructuralFeatures
- xsi:type="ecore:EReference"
- name="localHeaderLabelConfiguration"
- eType="#//nattablelabelprovider/ILabelProviderConfiguration">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="Reference the local header label configuration."/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures
- xsi:type="ecore:EReference"
- name="axisManager"
- lowerBound="1"
- eType="#//nattableaxisconfiguration/AxisManagerRepresentation">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="This value can't be null. the axis manager representation"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures
- xsi:type="ecore:EReference"
- name="localSpecificConfigurations"
- upperBound="-1"
- eType="#//nattableaxisconfiguration/IAxisConfiguration">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="specific configurations for the axis manager."/>
- </eAnnotations>
- </eStructuralFeatures>
- </eClassifiers>
- <eClassifiers
- xsi:type="ecore:EClass"
- name="TableHeaderAxisConfiguration"
- eSuperTypes="#//nattableaxisconfiguration/AbstractHeaderAxisConfiguration">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/Ecore">
- <details
- key="constraints"
- value="axisManagersIdUnique"/>
- </eAnnotations>
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
- <details
- key="axisManagersIdUnique"
- value="axisManagers->forAll(am1 : AxisManagerRepresentation | ( (axisManagers->excluding (am1))->forAll(am2 : AxisManagerRepresentation | am1.axisManagerId&lt;>am2.axisManagerId) ))"/>
- </eAnnotations>
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="Defines the configuration of the axis in the TableConfiguration"/>
- </eAnnotations>
- <eStructuralFeatures
- xsi:type="ecore:EReference"
- name="axisManagers"
- lowerBound="1"
- upperBound="-1"
- eType="#//nattableaxisconfiguration/AxisManagerRepresentation"
- containment="true">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="This list can't be empty. The list of the AxisManager used to fill the axis."/>
- </eAnnotations>
- </eStructuralFeatures>
- </eClassifiers>
- <eClassifiers
- xsi:type="ecore:EClass"
- name="LocalTableHeaderAxisConfiguration"
- eSuperTypes="#//nattableaxisconfiguration/AbstractHeaderAxisConfiguration">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="Define the configuration of the axis (rows or columns) in the table."/>
- </eAnnotations>
- <eStructuralFeatures
- xsi:type="ecore:EReference"
- name="axisManagerConfigurations"
- upperBound="-1"
- eType="#//nattableaxisconfiguration/AxisManagerConfiguration"
- containment="true">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="This list contains the configuration of the axis managers used in the table."/>
- </eAnnotations>
- </eStructuralFeatures>
- </eClassifiers>
- <eClassifiers
- xsi:type="ecore:EClass"
- name="IAxisConfiguration"
- abstract="true"
- interface="true"
- eSuperTypes="#//nattablestyle/StyledElement">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="Comon Interface for axis configuration."/>
- </eAnnotations>
- </eClassifiers>
- <eClassifiers
- xsi:type="ecore:EClass"
- name="FeatureAxisConfiguration"
- eSuperTypes="#//nattableaxisconfiguration/IAxisConfiguration">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="Configuration to use for Axis representing features"/>
- </eAnnotations>
- <eStructuralFeatures
- xsi:type="ecore:EAttribute"
- name="showOnlyCommonFeature"
- eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="If true, only the common features will be displayed on the axis."/>
- </eAnnotations>
- </eStructuralFeatures>
- </eClassifiers>
- <eClassifiers
- xsi:type="ecore:EClass"
- name="IFillingConfiguration"
- abstract="true"
- interface="true"
- eSuperTypes="#//nattableaxisconfiguration/IAxisConfiguration">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="Comon Interface for filling configurations."/>
- </eAnnotations>
- </eClassifiers>
- <eClassifiers
- xsi:type="ecore:EClass"
- name="EStructuralFeatureValueFillingConfiguration"
- eSuperTypes="#//nattableaxisconfiguration/IFillingConfiguration">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="Configuration used to fill the table listening a feature of the context of the table"/>
- </eAnnotations>
- <eStructuralFeatures
- xsi:type="ecore:EReference"
- name="listenFeature"
- lowerBound="1"
- eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EStructuralFeature">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="This field can't be null. References the feature of the context of the table to listen.&#xD;&#xA;It is possible that the context doesn't have this feature."/>
- </eAnnotations>
- </eStructuralFeatures>
- </eClassifiers>
- <eClassifiers
- xsi:type="ecore:EClass"
- name="IPasteConfiguration"
- eSuperTypes="#//nattableaxisconfiguration/IAxisConfiguration">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="Common Interface for the paste configuration."/>
- </eAnnotations>
- <eStructuralFeatures
- xsi:type="ecore:EAttribute"
- name="postActions"
- upperBound="-1"
- eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="This field references post actions, using a string to do during the paste, after the creation of the element. "/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures
- xsi:type="ecore:EAttribute"
- name="detachedMode"
- eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
- defaultValueLiteral="true">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="If true, the created elements will be added at the end of the paste and the set values&#xD;&#xA;won't be do using the service edit"/>
- </eAnnotations>
- </eStructuralFeatures>
- </eClassifiers>
- <eClassifiers
- xsi:type="ecore:EClass"
- name="PasteEObjectConfiguration"
- eSuperTypes="#//nattableaxisconfiguration/IPasteConfiguration">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="Configuration to use to paste EObject in the table."/>
- </eAnnotations>
- <eStructuralFeatures
- xsi:type="ecore:EAttribute"
- name="pastedElementId"
- eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="The String representing the EClass of the elements to create (see papyrus services types for further information)"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures
- xsi:type="ecore:EReference"
- name="pasteElementContainementFeature"
- eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EStructuralFeature">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="This field references the feature of the context of the table in which the created element will be added."/>
- </eAnnotations>
- </eStructuralFeatures>
- </eClassifiers>
- <eClassifiers
- xsi:type="ecore:EEnum"
- name="AxisIndexStyle">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="Enumeration used to describe the possible style of the index of the headers."/>
- </eAnnotations>
- <eLiterals
- name="ALPHABETIC"
- value="1">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="Index Headers count will be : A-B-C-...Y-Z-AA-AB-..."/>
- </eAnnotations>
- </eLiterals>
- <eLiterals
- name="NUMERIC">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="Index Headers count will be : 1-2-3-..."/>
- </eAnnotations>
- </eLiterals>
- </eClassifiers>
- <eClassifiers
- xsi:type="ecore:EClass"
- name="TreeFillingConfiguration"
- eSuperTypes="#//nattableaxisconfiguration/IFillingConfiguration">
- <eStructuralFeatures
- xsi:type="ecore:EReference"
- name="axisUsedAsAxisProvider"
- lowerBound="1"
- eType="#//nattableaxis/IAxis"
- containment="true"/>
- <eStructuralFeatures
- xsi:type="ecore:EReference"
- name="pasteConfiguration"
- eType="#//nattableaxisconfiguration/PasteEObjectConfiguration"/>
- <eStructuralFeatures
- xsi:type="ecore:EAttribute"
- name="depth"
- eType="ecore:EDataType ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EInt"/>
- <eStructuralFeatures
- xsi:type="ecore:EReference"
- name="labelProvider"
- lowerBound="1"
- eType="#//nattablelabelprovider/ILabelProviderConfiguration">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="le label provider used to display string and image for this level in the tree"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures
- xsi:type="ecore:EAttribute"
- name="labelProviderContext"
- lowerBound="1"
- eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- </eClassifiers>
- </eSubpackages>
- <eSubpackages
- name="nattabletester"
- nsURI="http://www.eclipse.org/papyrus/nattable/model/table/nattabletester"
- nsPrefix="nattabletester">
- <eClassifiers
- xsi:type="ecore:EClass"
- name="AbstractTableTester"
- abstract="true"
- eSuperTypes="#//nattablestyle/StyledElement">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="Abstract class for the tester."/>
- </eAnnotations>
- <eOperations
- name="getTester"
- eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="Returns an object representing the tester"/>
- </eAnnotations>
- </eOperations>
- </eClassifiers>
- <eClassifiers
- xsi:type="ecore:EClass"
- name="JavaTableTester"
- eSuperTypes="#//nattabletester/AbstractTableTester">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="This class allows to references a JavaTableTester. The Java class is declared with an id, using the extension point org.eclipse.papyrus.infra.nattable.tester.&#xD;&#xA;The field tester must be the id declared in this extension point."/>
- </eAnnotations>
- <eStructuralFeatures
- xsi:type="ecore:EAttribute"
- name="tester"
- lowerBound="1"
- eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="The id of the java tester declared using the extension point org.eclispe.papyrus.infra.nattable.tester"/>
- </eAnnotations>
- </eStructuralFeatures>
- </eClassifiers>
- </eSubpackages>
- <eSubpackages
- name="nattableaxis"
- nsURI="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis"
- nsPrefix="nattableaxis">
- <eClassifiers
- xsi:type="ecore:EClass"
- name="IAxis"
- abstract="true"
- interface="true"
- eSuperTypes="#//nattablestyle/StyledElement">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="Common interface for the axis of the table. (An axis is a specific row or a specific column)"/>
- </eAnnotations>
- <eOperations
- name="getElement"
- eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="Returns the elements represented by the IAxis"/>
- </eAnnotations>
- </eOperations>
- <eOperations
- name="getLocalLabelConfiguration"
- eType="#//nattablelabelprovider/ILabelProviderConfiguration">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="Returns the local label configuration to use for this IAxis. This configuration&#xD;&#xA;will override the label configuration defined in the AxisManagerConfiguration."/>
- </eAnnotations>
- </eOperations>
- <eStructuralFeatures
- xsi:type="ecore:EReference"
- name="manager"
- eType="#//nattableaxisconfiguration/AxisManagerRepresentation">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="This field can't be null. Reference the axis manager providing this IAxis."/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures
- xsi:type="ecore:EAttribute"
- name="alias"
- eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="An element can be displayed using an alias instead of its real name."/>
- </eAnnotations>
- </eStructuralFeatures>
- </eClassifiers>
- <eClassifiers
- xsi:type="ecore:EClass"
- name="ITreeItemAxis"
- abstract="true"
- interface="true"
- eSuperTypes="#//nattableaxis/IAxis">
- <eStructuralFeatures
- xsi:type="ecore:EReference"
- name="parent"
- eType="#//nattableaxis/ITreeItemAxis"
- eOpposite="#//nattableaxis/ITreeItemAxis/children"/>
- <eStructuralFeatures
- xsi:type="ecore:EAttribute"
- name="expanded"
- lowerBound="1"
- eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
- transient="true"
- defaultValueLiteral="false"/>
- <eStructuralFeatures
- xsi:type="ecore:EReference"
- name="children"
- upperBound="-1"
- eType="#//nattableaxis/ITreeItemAxis"
- derived="true"
- eOpposite="#//nattableaxis/ITreeItemAxis/parent"/>
- </eClassifiers>
- <eClassifiers
- xsi:type="ecore:EClass"
- name="IdAxis"
- abstract="true"
- eSuperTypes="#//nattableaxis/IAxis">
- <eStructuralFeatures
- xsi:type="ecore:EAttribute"
- name="element"
- lowerBound="1"
- eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="This obejct allows to reference an element using a string instead of referencing it directly."/>
- </eAnnotations>
- </eStructuralFeatures>
- </eClassifiers>
- <eClassifiers
- xsi:type="ecore:EClass"
- name="IdTreeItemAxis"
- eSuperTypes="#//nattableaxis/IdAxis #//nattableaxis/ITreeItemAxis"/>
- <eClassifiers
- xsi:type="ecore:EClass"
- name="EObjectAxis"
- eSuperTypes="#//nattableaxis/ObjectAxis">
- <eStructuralFeatures
- xsi:type="ecore:EReference"
- name="element"
- lowerBound="1"
- eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="This IAxis allows to reference an EObject."/>
- </eAnnotations>
- </eStructuralFeatures>
- </eClassifiers>
- <eClassifiers
- xsi:type="ecore:EClass"
- name="EObjectTreeItemAxis"
- eSuperTypes="#//nattableaxis/EObjectAxis #//nattableaxis/ITreeItemAxis"/>
- <eClassifiers
- xsi:type="ecore:EClass"
- name="FeatureAxis"
- abstract="true"
- eSuperTypes="#//nattableaxis/IAxis">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="Abstract class used to reference features."/>
- </eAnnotations>
- <eStructuralFeatures
- xsi:type="ecore:EReference"
- name="localLabelConfiguration"
- eType="#//nattablelabelprovider/FeatureLabelProviderConfiguration"
- containment="true">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="Returns the local label configuration to use for this IAxis. This configuration&#xD;&#xA;will override the label configuration defined in the AxisManagerConfiguration."/>
- </eAnnotations>
- </eStructuralFeatures>
- </eClassifiers>
- <eClassifiers
- xsi:type="ecore:EClass"
- name="OperationAxis"
- abstract="true"
- eSuperTypes="#//nattableaxis/IAxis">
- <eStructuralFeatures
- xsi:type="ecore:EReference"
- name="localLabelConfiguration"
- eType="#//nattablelabelprovider/OperationLabelProviderConfiguration"
- containment="true"/>
- </eClassifiers>
- <eClassifiers
- xsi:type="ecore:EClass"
- name="FeatureTreeItemAxis"
- abstract="true"
- eSuperTypes="#//nattableaxis/FeatureAxis #//nattableaxis/ITreeItemAxis"/>
- <eClassifiers
- xsi:type="ecore:EClass"
- name="OperationTreeItemAxis"
- abstract="true"
- eSuperTypes="#//nattableaxis/OperationAxis #//nattableaxis/ITreeItemAxis"/>
- <eClassifiers
- xsi:type="ecore:EClass"
- name="ObjectAxis"
- abstract="true"
- eSuperTypes="#//nattableaxis/IAxis">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="Abstract class used to reference object"/>
- </eAnnotations>
- <eStructuralFeatures
- xsi:type="ecore:EReference"
- name="localLabelConfiguration"
- eType="#//nattablelabelprovider/ObjectLabelProviderConfiguration"
- containment="true">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="Returns the local label configuration to use for this IAxis. This configuration&#xD;&#xA;will override the label configuration defined in the AxisManagerConfiguration."/>
- </eAnnotations>
- </eStructuralFeatures>
- </eClassifiers>
- <eClassifiers
- xsi:type="ecore:EClass"
- name="ObjectTreeItemAxis"
- abstract="true"
- eSuperTypes="#//nattableaxis/ObjectAxis #//nattableaxis/ITreeItemAxis"/>
- <eClassifiers
- xsi:type="ecore:EClass"
- name="FeatureIdAxis"
- eSuperTypes="#//nattableaxis/IdAxis #//nattableaxis/FeatureAxis">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="IAxis used to represent feature using a string."/>
- </eAnnotations>
- </eClassifiers>
- <eClassifiers
- xsi:type="ecore:EClass"
- name="FeatureIdTreeItemAxis"
- eSuperTypes="#//nattableaxis/FeatureIdAxis #//nattableaxis/ITreeItemAxis"/>
- <eClassifiers
- xsi:type="ecore:EClass"
- name="EStructuralFeatureAxis"
- eSuperTypes="#//nattableaxis/FeatureAxis">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="IAxis used to reference EMF EStructuralFeature."/>
- </eAnnotations>
- <eStructuralFeatures
- xsi:type="ecore:EReference"
- name="element"
- lowerBound="1"
- eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EStructuralFeature">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="The represented EStructuralFeature."/>
- </eAnnotations>
- </eStructuralFeatures>
- </eClassifiers>
- <eClassifiers
- xsi:type="ecore:EClass"
- name="EOperationAxis"
- eSuperTypes="#//nattableaxis/OperationAxis">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="IAxis used to reference EMF EOperation."/>
- </eAnnotations>
- <eStructuralFeatures
- xsi:type="ecore:EReference"
- name="element"
- lowerBound="1"
- eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EOperation"/>
- </eClassifiers>
- <eClassifiers
- xsi:type="ecore:EClass"
- name="EStructuralFeatureTreeItemAxis"
- eSuperTypes="#//nattableaxis/EStructuralFeatureAxis #//nattableaxis/ITreeItemAxis"/>
- <eClassifiers
- xsi:type="ecore:EClass"
- name="EOperationTreeItemAxis"
- eSuperTypes="#//nattableaxis/EOperationAxis #//nattableaxis/ITreeItemAxis"/>
- <eClassifiers
- xsi:type="ecore:EClass"
- name="ObjectIdAxis"
- eSuperTypes="#//nattableaxis/IdAxis #//nattableaxis/ObjectAxis">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="IAxis used to represent object using a string."/>
- </eAnnotations>
- </eClassifiers>
- <eClassifiers
- xsi:type="ecore:EClass"
- name="ObjectIdTreeItemAxis"
- eSuperTypes="#//nattableaxis/ObjectIdAxis #//nattableaxis/ITreeItemAxis"/>
- <eClassifiers
- xsi:type="ecore:EClass"
- name="AxisGroup"
- eSuperTypes="#//nattableaxis/IAxis">
- <eStructuralFeatures
- xsi:type="ecore:EReference"
- name="groupedAxis"
- upperBound="-1"
- eType="#//nattableaxis/IAxis"/>
- </eClassifiers>
- </eSubpackages>
- <eSubpackages
- name="nattablecell"
- nsURI="http://www.eclipse.org/papyrus/nattable/model/table/nattablecell"
- nsPrefix="nattablecell">
- <eClassifiers
- xsi:type="ecore:EClass"
- name="Cell"
- eSuperTypes="../../org.eclipse.emf.ecore/model/Ecore.ecore#//EModelElement">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="Cell elements used to store specific information which can't be stored in the edited model"/>
- </eAnnotations>
- <eStructuralFeatures
- xsi:type="ecore:EReference"
- name="columnWrapper"
- lowerBound="1"
- eType="#//nattablecell/ICellAxisWrapper"
- containment="true">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="The column element on which this cell must be displayed."/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures
- xsi:type="ecore:EReference"
- name="rowWrapper"
- lowerBound="1"
- eType="#//nattablecell/ICellAxisWrapper"
- containment="true">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="The row element on which this cell must be displayed."/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures
- xsi:type="ecore:EReference"
- name="problems"
- upperBound="-1"
- eType="#//nattableproblem/Problem"
- containment="true">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="a list of problem founds on this cell"/>
- </eAnnotations>
- </eStructuralFeatures>
- </eClassifiers>
- <eClassifiers
- xsi:type="ecore:EClass"
- name="ICellAxisWrapper"
- abstract="true"
- interface="true"
- eSuperTypes="../../org.eclipse.emf.ecore/model/Ecore.ecore#//EModelElement">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="This class encapsulates the real axis object."/>
- </eAnnotations>
- <eOperations
- name="getElement"
- lowerBound="1"
- eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="Return the wrapped object"/>
- </eAnnotations>
- </eOperations>
- </eClassifiers>
- <eClassifiers
- xsi:type="ecore:EClass"
- name="EObjectAxisWrapper"
- eSuperTypes="#//nattablecell/ICellAxisWrapper">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="Wrapper for EObject"/>
- </eAnnotations>
- <eStructuralFeatures
- xsi:type="ecore:EReference"
- name="element"
- lowerBound="1"
- eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="The wrapped element"/>
- </eAnnotations>
- </eStructuralFeatures>
- </eClassifiers>
- <eClassifiers
- xsi:type="ecore:EClass"
- name="IdAxisWrapper"
- eSuperTypes="#//nattablecell/ICellAxisWrapper">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="Wrapper for Id"/>
- </eAnnotations>
- <eStructuralFeatures
- xsi:type="ecore:EAttribute"
- name="element"
- eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="The id used to identifies an element."/>
- </eAnnotations>
- </eStructuralFeatures>
- </eClassifiers>
- </eSubpackages>
- <eSubpackages
- name="nattableproblem"
- nsURI="http://www.eclipse.org/papyrus/nattable/model/table/nattableproblem"
- nsPrefix="nattableproblem">
- <eClassifiers
- xsi:type="ecore:EClass"
- name="Problem"
- eSuperTypes="#//nattableconfiguration/TableNamedElement">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="A problem"/>
- </eAnnotations>
- </eClassifiers>
- <eClassifiers
- xsi:type="ecore:EClass"
- name="StringResolutionProblem"
- eSuperTypes="#//nattableproblem/Problem">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="This kind of problem is used when the user set a value as a text in a Cell and the system can't convert this string value into the correct type"/>
- </eAnnotations>
- <eStructuralFeatures
- xsi:type="ecore:EAttribute"
- name="valueAsString"
- lowerBound="1"
- eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="The text which is the source of the problem"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures
- xsi:type="ecore:EAttribute"
- name="unresolvedString"
- lowerBound="1"
- upperBound="-1"
- eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="the text or a substring of it, which is the source of the problem"/>
- </eAnnotations>
- </eStructuralFeatures>
- </eClassifiers>
- </eSubpackages>
- <eSubpackages
- name="nattablestyle"
- nsURI="http://www.eclipse.org/papyrus/nattable/model/table/nattablestyle"
- nsPrefix="nattablestyle">
- <eClassifiers
- xsi:type="ecore:EClass"
- name="Style"
- abstract="true"
- interface="true"
- eSuperTypes="../../org.eclipse.emf.ecore/model/Ecore.ecore#//EModelElement">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="Style from which all substyles originate"/>
- </eAnnotations>
- </eClassifiers>
- <eClassifiers
- xsi:type="ecore:EClass"
- name="NamedStyle"
- eSuperTypes="#//nattablestyle/Style">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="used to represent character and paragraph styles"/>
- </eAnnotations>
- <eStructuralFeatures
- xsi:type="ecore:EAttribute"
- name="name"
- eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- </eClassifiers>
- <eClassifiers
- xsi:type="ecore:EEnum"
- name="CellTextAlignment">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="Alignment of the text inside its cell"/>
- </eAnnotations>
- <eLiterals
- name="TOP_LEFT"
- value="1"
- literal="TOP_LEFT"/>
- <eLiterals
- name="TOP_CENTER"
- value="2"
- literal="TOP_CENTER"/>
- <eLiterals
- name="TOP_RIGHT"
- value="3"
- literal="TOP_RIGHT"/>
- <eLiterals
- name="MIDDLE_LEFT"
- value="4"
- literal="MIDDLE_LEFT"/>
- <eLiterals
- name="MIDDLE_CENTER"
- value="5"
- literal="MIDDLE_CENTER"/>
- <eLiterals
- name="MIDDLE_RIGHT"
- value="6"
- literal="MIDDLE_RIGHT"/>
- <eLiterals
- name="BOTTOM_LEFT"
- value="7"
- literal="BOTTOM_LEFT"/>
- <eLiterals
- name="BOTTOM_CENTER"
- value="8"
- literal="BOTTOM_CENTER"/>
- <eLiterals
- name="BOTTOM_RIGHT"
- value="9"
- literal="BOTTOM_RIGHT"/>
- </eClassifiers>
- <eClassifiers
- xsi:type="ecore:EClass"
- name="FontStyle"
- eSuperTypes="#//nattablestyle/Style">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="Font style of the cell's text"/>
- </eAnnotations>
- <eStructuralFeatures
- xsi:type="ecore:EAttribute"
- name="fontColor"
- eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"
- defaultValueLiteral="0"/>
- <eStructuralFeatures
- xsi:type="ecore:EAttribute"
- name="fontName"
- eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"
- defaultValueLiteral="Tahoma"/>
- <eStructuralFeatures
- xsi:type="ecore:EAttribute"
- name="fontHeight"
- eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"
- defaultValueLiteral="9"/>
- <eStructuralFeatures
- xsi:type="ecore:EAttribute"
- name="bold"
- eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
- defaultValueLiteral="false"/>
- <eStructuralFeatures
- xsi:type="ecore:EAttribute"
- name="italic"
- eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
- defaultValueLiteral="false"/>
- <eStructuralFeatures
- xsi:type="ecore:EAttribute"
- name="underline"
- eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
- defaultValueLiteral="false"/>
- <eStructuralFeatures
- xsi:type="ecore:EAttribute"
- name="strikeThrough"
- eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
- defaultValueLiteral="false"/>
- </eClassifiers>
- <eClassifiers
- xsi:type="ecore:EClass"
- name="CellTextStyle"
- eSuperTypes="#//nattablestyle/Style">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="Text representation"/>
- </eAnnotations>
- <eStructuralFeatures
- xsi:type="ecore:EAttribute"
- name="alignment"
- eType="#//nattablestyle/CellTextAlignment"
- defaultValueLiteral="MIDDLE_LEFT"/>
- </eClassifiers>
- <eClassifiers
- xsi:type="ecore:EClass"
- name="IntValueStyle"
- eSuperTypes="#//nattablestyle/NamedStyle">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="Int representation"/>
- </eAnnotations>
- <eStructuralFeatures
- xsi:type="ecore:EAttribute"
- name="intValue"
- eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
- </eClassifiers>
- <eClassifiers
- xsi:type="ecore:EClass"
- name="IntListValueStyle"
- eSuperTypes="#//nattablestyle/NamedStyle">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="Int lists representation"/>
- </eAnnotations>
- <eStructuralFeatures
- xsi:type="ecore:EAttribute"
- name="intListValue"
- unique="false"
- upperBound="-1"
- eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
- </eClassifiers>
- <eClassifiers
- xsi:type="ecore:EClass"
- name="BooleanValueStyle"
- eSuperTypes="#//nattablestyle/NamedStyle">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="Boolean representation"/>
- </eAnnotations>
- <eStructuralFeatures
- xsi:type="ecore:EAttribute"
- name="booleanValue"
- eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
- </eClassifiers>
- <eClassifiers
- xsi:type="ecore:EClass"
- name="BooleanListValueStyle"
- eSuperTypes="#//nattablestyle/NamedStyle">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="Boolean lists representation"/>
- </eAnnotations>
- <eStructuralFeatures
- xsi:type="ecore:EAttribute"
- name="booleanListValue"
- unique="false"
- upperBound="-1"
- eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBooleanObject"/>
- </eClassifiers>
- <eClassifiers
- xsi:type="ecore:EClass"
- name="DoubleValueStyle"
- eSuperTypes="#//nattablestyle/NamedStyle">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="Double representation"/>
- </eAnnotations>
- <eStructuralFeatures
- xsi:type="ecore:EAttribute"
- name="doubleValue"
- eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDouble"/>
- </eClassifiers>
- <eClassifiers
- xsi:type="ecore:EClass"
- name="DoubleListValueStyle"
- eSuperTypes="#//nattablestyle/NamedStyle">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="Double lists representation"/>
- </eAnnotations>
- <eStructuralFeatures
- xsi:type="ecore:EAttribute"
- name="doubleListValue"
- unique="false"
- upperBound="-1"
- eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDoubleObject"/>
- </eClassifiers>
- <eClassifiers
- xsi:type="ecore:EClass"
- name="StringValueStyle"
- eSuperTypes="#//nattablestyle/NamedStyle">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="String representation"/>
- </eAnnotations>
- <eStructuralFeatures
- xsi:type="ecore:EAttribute"
- name="stringValue"
- eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- </eClassifiers>
- <eClassifiers
- xsi:type="ecore:EClass"
- name="StringListValueStyle"
- eSuperTypes="#//nattablestyle/NamedStyle">
- <eAnnotations
- source="http://www.eclipse.org/emf/2002/GenModel">
- <details
- key="documentation"
- value="String lists representation"/>
- </eAnnotations>
- <eStructuralFeatures
- xsi:type="ecore:EAttribute"
- name="stringListValue"
- unique="false"
- upperBound="-1"
- eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- </eClassifiers>
- <eClassifiers
- xsi:type="ecore:EClass"
- name="StyledElement"
- abstract="true"
- eSuperTypes="../../org.eclipse.emf.ecore/model/Ecore.ecore#//EModelElement">
- <eOperations
- name="getNamedStyle"
- eType="#//nattablestyle/NamedStyle">
- <eParameters
- name="eClass"
- eType="ecore:EClass ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EClass"/>
- <eParameters
- name="name"
- eType="ecore:EDataType ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/>
- </eOperations>
- <eOperations
- name="getStyle"
- eType="#//nattablestyle/Style">
- <eParameters
- name="eClass"
- eType="ecore:EClass ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EClass"/>
- </eOperations>
- <eOperations
- name="createStyle"
- eType="#//nattablestyle/Style">
- <eParameters
- name="eClass"
- eType="ecore:EClass ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EClass"/>
- </eOperations>
- <eStructuralFeatures
- xsi:type="ecore:EReference"
- name="styles"
- upperBound="-1"
- eType="#//nattablestyle/Style"
- containment="true"/>
- </eClassifiers>
- <eClassifiers
- xsi:type="ecore:EClass"
- name="TableDisplayStyle"
- eSuperTypes="#//nattablestyle/Style">
- <eStructuralFeatures
- xsi:type="ecore:EAttribute"
- name="displayStyle"
- lowerBound="1"
- eType="#//nattablestyle/DisplayStyle"
- defaultValueLiteral="NORMAL"/>
- </eClassifiers>
- <eClassifiers
- xsi:type="ecore:EEnum"
- name="DisplayStyle">
- <eLiterals
- name="NORMAL"
- literal="NORMAL"/>
- <eLiterals
- name="HIERARCHIC_SINGLE_TREE_COLUMN"
- value="1"
- literal="HIERARCHIC_SINGLE_TREE_COLUMN"/>
- <eLiterals
- name="HIERARCHIC_MULTI_TREE_COLUMN"
- value="2"
- literal="HIERARCHIC_MULTI_TREE_COLUMN"/>
- </eClassifiers>
- <eClassifiers
- xsi:type="ecore:EClass"
- name="EObjectValueStyle"
- eSuperTypes="#//nattablestyle/NamedStyle">
- <eStructuralFeatures
- xsi:type="ecore:EReference"
- name="eObjectValue"
- eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
- </eClassifiers>
- <eClassifiers
- xsi:type="ecore:EClass"
- name="EObjectListValueStyle"
- eSuperTypes="#//nattablestyle/NamedStyle">
- <eStructuralFeatures
- xsi:type="ecore:EReference"
- name="eObjectValue"
- upperBound="-1"
- eType="ecore:EClass ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EObject"/>
- </eClassifiers>
- </eSubpackages>
-</ecore:EPackage>
+<?xml version="1.0" encoding="UTF-8"?>
+<ecore:EPackage
+ xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ name="nattable"
+ nsURI="http://www.eclipse.org/papyrus/nattable/model"
+ nsPrefix="nattable">
+ <eAnnotations
+ source="http://www.eclipse.org/OCL/Import">
+ <details
+ key="ecore"
+ value="http://www.eclipse.org/emf/2002/Ecore#/"/>
+ </eAnnotations>
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/Ecore">
+ <details
+ key="invocationDelegates"
+ value="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"/>
+ <details
+ key="settingDelegates"
+ value="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"/>
+ <details
+ key="validationDelegates"
+ value="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"/>
+ </eAnnotations>
+ <eClassifiers
+ xsi:type="ecore:EClass"
+ name="Table"
+ eSuperTypes="#//nattableconfiguration/TableNamedElement">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/Ecore">
+ <details
+ key="constraints"
+ value="currentRowAxisInHistory currentColumnAxisInHistory currentAxisProvidersTypes"/>
+ </eAnnotations>
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
+ <details
+ key="currentRowAxisInHistory"
+ value="rowAxisProvidersHistory->includes(currentRowAxisProvider)"/>
+ <details
+ key="currentColumnAxisInHistory"
+ value="columnAxisProvidersHistory->includes(currentColumnAxisProvider)"/>
+ <details
+ key="currentAxisProvidersTypes"
+ value="not (currentRowAxisProvider.oclIsKindOf(nattableaxisprovider::ISlaveAxisProvider) and currentColumnAxisProvider.oclIsKindOf(nattableaxisprovider::ISlaveAxisProvider))"/>
+ </eAnnotations>
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="This object represents the table. It is used to save the interesting informations of the graphical table.&#xD;&#xA;&#xD;&#xA;The currentAxisProviders can be : Master/Master, Master/Slave, Slave/Master and never Slave/Slave."/>
+ </eAnnotations>
+ <eStructuralFeatures
+ xsi:type="ecore:EReference"
+ name="context"
+ lowerBound="1"
+ eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="The context is used for two things : &#xD;&#xA;&lt;ul> &lt;li>&quot;virtual&quot; parent to display the table in the Papyrus Model Explorer &lt;/li>&#xD;&#xA;&lt;li>container of the objects created in the table&lt;/li>&#xD;&#xA;&lt;/ul> &#xD;&#xA;The context can't be null;"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures
+ xsi:type="ecore:EReference"
+ name="owner"
+ lowerBound="1"
+ eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+ <eStructuralFeatures
+ xsi:type="ecore:EReference"
+ name="prototype"
+ lowerBound="1"
+ eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+ <eStructuralFeatures
+ xsi:type="ecore:EReference"
+ name="tableConfiguration"
+ lowerBound="1"
+ eType="#//nattableconfiguration/TableConfiguration">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="Reference the configuration used by the table. This field can't be null."/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures
+ xsi:type="ecore:EAttribute"
+ name="invertAxis"
+ lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
+ defaultValueLiteral="false">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="If true, the axis will be inverted on the screen. When the user inverts the axis, &#xD;&#xA;only this boolean is changed. We must not invert the currentRowAxis and the currentColumnAxis neither the histories or the AxisConfiguration"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures
+ xsi:type="ecore:EReference"
+ name="columnAxisProvidersHistory"
+ lowerBound="1"
+ upperBound="-1"
+ eType="#//nattableaxisprovider/AbstractAxisProvider"
+ containment="true">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="This list contains all the columns configurations already used by the user and saved in this list by him."/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures
+ xsi:type="ecore:EReference"
+ name="rowAxisProvidersHistory"
+ lowerBound="1"
+ upperBound="-1"
+ eType="#//nattableaxisprovider/AbstractAxisProvider"
+ containment="true">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="This list contains all the rowsconfigurations already used by the user and saved in this list by him."/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures
+ xsi:type="ecore:EReference"
+ name="localRowHeaderAxisConfiguration"
+ eType="#//nattableaxisconfiguration/LocalTableHeaderAxisConfiguration"
+ containment="true">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="This field contains the row headerAxisConfiguration. It could be null. &#xD;&#xA;In this case we use the row TableHeaderAxisConfiguration stored in the TableConfiguration of this table."/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures
+ xsi:type="ecore:EReference"
+ name="localColumnHeaderAxisConfiguration"
+ eType="#//nattableaxisconfiguration/LocalTableHeaderAxisConfiguration"
+ containment="true">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="This field contains the columnheaderAxisConfiguration. It could be null. &#xD;&#xA;In this case we use the column TableHeaderAxisConfiguration stored in the TableConfiguration of this table."/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures
+ xsi:type="ecore:EReference"
+ name="currentRowAxisProvider"
+ lowerBound="1"
+ eType="#//nattableaxisprovider/AbstractAxisProvider">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="References the current row AxisProvider used in the table.&#xD;&#xA;The value must be owned by rowAxisProviderHistory"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures
+ xsi:type="ecore:EReference"
+ name="currentColumnAxisProvider"
+ lowerBound="1"
+ eType="#//nattableaxisprovider/AbstractAxisProvider">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="References the current column AxisProvider used in the table.&#xD;&#xA;The value must be owned by column AxisProviderHistory"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures
+ xsi:type="ecore:EReference"
+ name="cells"
+ upperBound="-1"
+ eType="#//nattablecell/Cell"
+ containment="true">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="Cells of the table. They are used when the value to display can't be deduced of&#xD;&#xA;the intersection of the row and the column."/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eSubpackages
+ name="nattableconfiguration"
+ nsURI="http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration"
+ nsPrefix="nattableconfiguration">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/Ecore">
+ <details
+ key="invocationDelegates"
+ value="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"/>
+ <details
+ key="settingDelegates"
+ value="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"/>
+ <details
+ key="validationDelegates"
+ value="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"/>
+ </eAnnotations>
+ <eClassifiers
+ xsi:type="ecore:EClass"
+ name="TableNamedElement"
+ abstract="true"
+ eSuperTypes="#//nattablestyle/StyledElement">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="Abstract Element used in this metamodel for named element which have a description."/>
+ </eAnnotations>
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/Ecore">
+ <details
+ key="constraints"
+ value="nonEmptyName"/>
+ </eAnnotations>
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
+ <details
+ key="nonEmptyName"
+ value="not (name.oclIsUndefined() or name = '')"/>
+ </eAnnotations>
+ <eStructuralFeatures
+ xsi:type="ecore:EAttribute"
+ name="description"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="The description of the named element."/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures
+ xsi:type="ecore:EAttribute"
+ name="name"
+ lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="The name of the named element."/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers
+ xsi:type="ecore:EClass"
+ name="TableConfiguration"
+ eSuperTypes="#//nattableconfiguration/TableNamedElement">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/Ecore">
+ <details
+ key="constraints"
+ value="defaultRowAxisProviderExistsInCollection defaultColumnAxisProviderExistsInCollection defaultAxisProvidersTypes typeNonNullNonEmpty iconPath"/>
+ </eAnnotations>
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
+ <details
+ key="defaultRowAxisProviderExistsInCollection"
+ value="rowAxisProviders->includes(defaultRowAxisProvider)"/>
+ <details
+ key="defaultColumnAxisProviderExistsInCollection"
+ value="columnAxisProviders->includes(defaultColumnAxisProvider)"/>
+ <details
+ key="typeNonNullNonEmpty"
+ value="not (type.oclIsUndefined() or type = '')"/>
+ <details
+ key="iconPath"
+ value="not (iconPath.oclIsUndefined() or iconPath = '')"/>
+ <details
+ key="defaultAxisProvidersTypes"
+ value="not (defaultRowAxisProvider.oclIsKindOf(nattableaxisprovider::ISlaveAxisProvider) and defaultColumnAxisProvider.oclIsKindOf(nattableaxisprovider::ISlaveAxisProvider))"/>
+ </eAnnotations>
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="This object is used to configure a table. To create a new type of table, you must create &#xD;&#xA;a new file *.nattableConfiguration and register it using the extension point org.eclipse.papyrus.infra.nattable.configuration&#xD;&#xA;&#xD;&#xA;the defaultAxisProviders can be : Master/Master, Master/Slave, Slave/Master and never Slave/Slave."/>
+ </eAnnotations>
+ <eStructuralFeatures
+ xsi:type="ecore:EAttribute"
+ name="type"
+ lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="The type of the table. This value is used to be able to open/close easily the table editor in Papyrus. &#xD;&#xA;Moreover it allows to distinghuish easily the table."/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures
+ xsi:type="ecore:EAttribute"
+ name="iconPath"
+ lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="The path of the icon to use for the table which references this TableConfiguration."/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures
+ xsi:type="ecore:EReference"
+ name="creationTester"
+ eType="#//nattabletester/AbstractTableTester"
+ containment="true">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="This value could be null. The tester is used to know if this tableConfiguration can be used&#xD;&#xA;to create a new table using as context the selected element."/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures
+ xsi:type="ecore:EAttribute"
+ name="cellEditorDeclaration"
+ lowerBound="1"
+ eType="#//nattableconfiguration/CellEditorDeclaration"
+ defaultValueLiteral="COLUMN">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="This value can't be null. Indicates how the CellEditor must be declared. &#xD;&#xA;In the common table, we display features as columns and objects as line. &#xD;&#xA;In this case the cell editors are specific to features, so the cell editor must be declared on the columns."/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures
+ xsi:type="ecore:EReference"
+ name="rowHeaderAxisConfiguration"
+ lowerBound="1"
+ eType="#//nattableaxisconfiguration/TableHeaderAxisConfiguration"
+ containment="true">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="This value can't be null. Gives the initial row configuration of the table."/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures
+ xsi:type="ecore:EReference"
+ name="columnHeaderAxisConfiguration"
+ lowerBound="1"
+ eType="#//nattableaxisconfiguration/TableHeaderAxisConfiguration"
+ containment="true">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="This value can't be null. Gives the initial column configuration of the table."/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures
+ xsi:type="ecore:EReference"
+ name="columnAxisProviders"
+ lowerBound="1"
+ upperBound="-1"
+ eType="#//nattableaxisprovider/AbstractAxisProvider"
+ containment="true">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="This list can't be empty. Contains list of possible column AxisProvider for the table."/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures
+ xsi:type="ecore:EReference"
+ name="rowAxisProviders"
+ lowerBound="1"
+ upperBound="-1"
+ eType="#//nattableaxisprovider/AbstractAxisProvider"
+ containment="true">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="This list can't be empty. Contains a list of possible row AxisProvider for the table."/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures
+ xsi:type="ecore:EReference"
+ name="defaultRowAxisProvider"
+ lowerBound="1"
+ eType="#//nattableaxisprovider/AbstractAxisProvider">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="This value can't be null. References the Axis Provider to use by default for rows."/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures
+ xsi:type="ecore:EReference"
+ name="defaultColumnAxisProvider"
+ lowerBound="1"
+ eType="#//nattableaxisprovider/AbstractAxisProvider">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="This value can't be null. References the Axis Provider to use by default for columns."/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers
+ xsi:type="ecore:EEnum"
+ name="CellEditorDeclaration">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="Indicates how the CellEditor must be declared. &#xD;&#xA;In the common table, we display features as columns and objects as line. &#xD;&#xA;In this case the cell editors are specific to features, so the cell editor must be declared on the columns."/>
+ </eAnnotations>
+ <eLiterals
+ name="COLUMN"/>
+ <eLiterals
+ name="ROW"
+ value="1"/>
+ <eLiterals
+ name="CELL"
+ value="2"/>
+ </eClassifiers>
+ </eSubpackages>
+ <eSubpackages
+ name="nattableaxisprovider"
+ nsURI="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider"
+ nsPrefix="nattableaxisprovider">
+ <eClassifiers
+ xsi:type="ecore:EClass"
+ name="AbstractAxisProvider"
+ abstract="true"
+ eSuperTypes="#//nattableconfiguration/TableNamedElement">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="Abstract Element for the AxisProvider. This one only provides a method getAxis()."/>
+ </eAnnotations>
+ <eOperations
+ name="getAxis"
+ upperBound="-1"
+ eType="#//nattableaxis/IAxis">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="This method must returns the IAxis owned by the AxisProvider.&#xD;&#xA;Warning, in case of syncrhonized table, the list often will be empty. This method&#xD;&#xA;only returns the IAxis serialized in the model. Displayed elements are not necessary serialized.&#xD;&#xA;"/>
+ </eAnnotations>
+ </eOperations>
+ </eClassifiers>
+ <eClassifiers
+ xsi:type="ecore:EClass"
+ name="IMasterAxisProvider"
+ abstract="true"
+ interface="true"
+ eSuperTypes="#//nattableaxisprovider/AxisProvider">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="Interface used to distinghuish master axis provider from slave axis provider. &#xD;&#xA;The master are able to disconnect the slave."/>
+ </eAnnotations>
+ <eStructuralFeatures
+ xsi:type="ecore:EAttribute"
+ name="disconnectSlave"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="if true, the slave won't be updated when the elements owned by the master will be changed."/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers
+ xsi:type="ecore:EClass"
+ name="ISlaveAxisProvider"
+ abstract="true"
+ interface="true"
+ eSuperTypes="#//nattableaxisprovider/AxisProvider">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="Interface used to distinghuish the master from the slave axis provider."/>
+ </eAnnotations>
+ </eClassifiers>
+ <eClassifiers
+ xsi:type="ecore:EClass"
+ name="AxisProvider"
+ abstract="true"
+ eSuperTypes="#//nattableaxisprovider/AbstractAxisProvider">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="AbstractAxisProvider. This one owns IAxis"/>
+ </eAnnotations>
+ <eStructuralFeatures
+ xsi:type="ecore:EReference"
+ name="axis"
+ upperBound="-1"
+ eType="#//nattableaxis/IAxis"
+ containment="true">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="IAxis owned by the AxisProvider. The list can be empty in case of synchronized table."/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers
+ xsi:type="ecore:EClass"
+ name="SlaveObjectAxisProvider"
+ eSuperTypes="#//nattableaxisprovider/ISlaveAxisProvider">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="Concret implementation of ISlaveAxisProvider"/>
+ </eAnnotations>
+ </eClassifiers>
+ <eClassifiers
+ xsi:type="ecore:EClass"
+ name="MasterObjectAxisProvider"
+ eSuperTypes="#//nattableaxisprovider/IMasterAxisProvider">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="Concret implementation of IMasterAxisProvider"/>
+ </eAnnotations>
+ </eClassifiers>
+ </eSubpackages>
+ <eSubpackages
+ name="nattablelabelprovider"
+ nsURI="http://www.eclipse.org/papyrus/nattable/model/table/nattablecontentprovider"
+ nsPrefix="nattablelabelprovider">
+ <eClassifiers
+ xsi:type="ecore:EClass"
+ name="ILabelProviderConfiguration"
+ abstract="true"
+ interface="true"
+ eSuperTypes="#//nattablestyle/StyledElement">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="Common Interface for LabelProviderConfiguration"/>
+ </eAnnotations>
+ </eClassifiers>
+ <eClassifiers
+ xsi:type="ecore:EClass"
+ name="FeatureLabelProviderConfiguration"
+ eSuperTypes="#//nattablelabelprovider/ObjectLabelProviderConfiguration">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="LabelProviderConfiguration for Feature. In case of Feature. we have two display options : &#xD;&#xA;&lt;ul>&lt;li>display the icon of the feature &lt;/li> &#xD;&#xA;&lt;li>display the label of the feature &lt;/li>&#xD;&#xA;&lt;li>display the multiplicity of the feature &lt;/li>&#xD;&#xA;&lt;li>display the type of the feature &lt;/li>&#xD;&#xA;&lt;li>display the '/' for isDerived of the feature &lt;/li>&#xD;&#xA;&lt;li>display the name of the feature &lt;/li>&#xD;&#xA; &lt;/ul>"/>
+ </eAnnotations>
+ <eStructuralFeatures
+ xsi:type="ecore:EAttribute"
+ name="displayIsDerived"
+ lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
+ defaultValueLiteral="true">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="If true, we will display the '/' for isDerived"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures
+ xsi:type="ecore:EAttribute"
+ name="displayType"
+ lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
+ defaultValueLiteral="true">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="If true, we will display the typeof the feature"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures
+ xsi:type="ecore:EAttribute"
+ name="displayMultiplicity"
+ lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
+ defaultValueLiteral="true">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="If true, we will display the multiplicity of the feature"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures
+ xsi:type="ecore:EAttribute"
+ name="displayName"
+ lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
+ defaultValueLiteral="true">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="If true, we will display the name of the feature"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers
+ xsi:type="ecore:EClass"
+ name="ObjectLabelProviderConfiguration"
+ eSuperTypes="#//nattablelabelprovider/ILabelProviderConfiguration">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="LabelProviderConfiguration for Object. In case of Object we have two display options : &#xD;&#xA;&lt;ul>&lt;li>display the icon of the object&lt;/li> &#xD;&#xA;&lt;li>display the label of the object&lt;/li> &lt;/ul>"/>
+ </eAnnotations>
+ <eStructuralFeatures
+ xsi:type="ecore:EAttribute"
+ name="displayIcon"
+ lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
+ defaultValueLiteral="true">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="If true, we will display the icon of the object"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures
+ xsi:type="ecore:EAttribute"
+ name="displayLabel"
+ lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
+ defaultValueLiteral="true">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="If true, we will display the label of the object"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers
+ xsi:type="ecore:EClass"
+ name="OperationLabelProviderConfiguration"
+ eSuperTypes="#//nattablelabelprovider/ObjectLabelProviderConfiguration">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="LabelProviderConfiguration for Operation. In case of Operation, we have four display options : &#xD;&#xA;&lt;ul>&lt;li>display the icon of the Operation&lt;/li> &#xD;&#xA;&lt;li>display the label of the Operation&lt;/li>&#xD;&#xA;&lt;li>display the multiplicity of the Operation&lt;/li>&#xD;&#xA;&lt;li>display the type of the Operation&lt;/li>&#xD;&#xA;&lt;li>display the '/' for isDerived of the feature &lt;/li>&#xD;&#xA;&lt;li>display the name of the feature &lt;/li>&#xD;&#xA; &lt;/ul>"/>
+ </eAnnotations>
+ <eStructuralFeatures
+ xsi:type="ecore:EAttribute"
+ name="displayType"
+ lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
+ defaultValueLiteral="true"/>
+ <eStructuralFeatures
+ xsi:type="ecore:EAttribute"
+ name="displayMultiplicity"
+ lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
+ defaultValueLiteral="true"/>
+ <eStructuralFeatures
+ xsi:type="ecore:EAttribute"
+ name="displayName"
+ lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
+ defaultValueLiteral="true"/>
+ </eClassifiers>
+ </eSubpackages>
+ <eSubpackages
+ name="nattableaxisconfiguration"
+ nsURI="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration"
+ nsPrefix="nattableaxisconfiguration">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/Ecore">
+ <details
+ key="invocationDelegates"
+ value="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"/>
+ <details
+ key="settingDelegates"
+ value="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"/>
+ <details
+ key="validationDelegates"
+ value="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"/>
+ </eAnnotations>
+ <eClassifiers
+ xsi:type="ecore:EClass"
+ name="AbstractHeaderAxisConfiguration"
+ abstract="true"
+ eSuperTypes="#//nattablestyle/StyledElement">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="Abstract Class for the HeaderAxisConfiguration. This class provides : &#xD;&#xA;&lt;ul>&lt;li>informations on the appearance of the header&lt;/li>&#xD;&#xA;&lt;li> a list of label configuration which can be used by the header&lt;/li>&#xD;&#xA;&lt;li> a list of axisConfiguration. These axis configuration are used to provide the contents of the axis&lt;/li>&#xD;&#xA;&lt;/ul>"/>
+ </eAnnotations>
+ <eStructuralFeatures
+ xsi:type="ecore:EAttribute"
+ name="indexStyle"
+ lowerBound="1"
+ eType="#//nattableaxisconfiguration/AxisIndexStyle">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="This value can't be null. Indicates how to display the index of the Axis : using letter or using number."/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures
+ xsi:type="ecore:EAttribute"
+ name="displayLabel"
+ lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
+ defaultValueLiteral="true">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="If true, the label header will be displayed."/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures
+ xsi:type="ecore:EAttribute"
+ name="displayFilter"
+ lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
+ defaultValueLiteral="false">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="If true AND if the axisConfiguration is used as column, the row filter will be displayed."/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures
+ xsi:type="ecore:EAttribute"
+ name="displayIndex"
+ lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
+ defaultValueLiteral="true">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="If true, the index header will be displayed."/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures
+ xsi:type="ecore:EReference"
+ name="ownedLabelConfigurations"
+ upperBound="-1"
+ eType="#//nattablelabelprovider/ILabelProviderConfiguration"
+ containment="true">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="The list of the possible label configuration, referenced by the axis configuration."/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures
+ xsi:type="ecore:EReference"
+ name="ownedAxisConfigurations"
+ upperBound="-1"
+ eType="#//nattableaxisconfiguration/IAxisConfiguration"
+ containment="true">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="The list of the owned axis configuration."/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers
+ xsi:type="ecore:EClass"
+ name="AxisManagerRepresentation"
+ eSuperTypes="#//nattablestyle/StyledElement">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="This class is used to represents in the model the java Axis Manager."/>
+ </eAnnotations>
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/Ecore">
+ <details
+ key="constraints"
+ value="nonEmptyAxisManager"/>
+ </eAnnotations>
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
+ <details
+ key="nonEmptyAxisManager"
+ value="not (axisManagerId.oclIsUndefined() or axisManagerId = '')"/>
+ </eAnnotations>
+ <eStructuralFeatures
+ xsi:type="ecore:EAttribute"
+ name="axisManagerId"
+ lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="This id allows to find the Java Axis Manager represented by this element.&#xD;&#xA;To find it you must use AxisManagerFactory.INSTANCE.getAxisManager(AxisManagerRepresentation)&#xD;&#xA;To register a Java Axis Manager,you must use the extension point : org.eclipse.papyrus.infra.nattable.axismanager"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures
+ xsi:type="ecore:EAttribute"
+ name="labelProviderContext"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="The context on which the label provider to use for this AxisManagerRepresentation are declared.&#xD;&#xA;(see the Papyrus Label Provider Service for further informations)"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures
+ xsi:type="ecore:EReference"
+ name="headerLabelConfiguration"
+ lowerBound="1"
+ eType="#//nattablelabelprovider/ILabelProviderConfiguration">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="The label provider configuration to use for the header of the axis provided by the represented AxisManager"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures
+ xsi:type="ecore:EReference"
+ name="specificAxisConfigurations"
+ upperBound="-1"
+ eType="#//nattableaxisconfiguration/IAxisConfiguration">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="A list of specific configurations to use for this axis."/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers
+ xsi:type="ecore:EClass"
+ name="AxisManagerConfiguration"
+ eSuperTypes="#//nattablestyle/StyledElement">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="This object allows to define and configure a Java AxisManager"/>
+ </eAnnotations>
+ <eStructuralFeatures
+ xsi:type="ecore:EReference"
+ name="localHeaderLabelConfiguration"
+ eType="#//nattablelabelprovider/ILabelProviderConfiguration">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="Reference the local header label configuration."/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures
+ xsi:type="ecore:EReference"
+ name="axisManager"
+ lowerBound="1"
+ eType="#//nattableaxisconfiguration/AxisManagerRepresentation">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="This value can't be null. the axis manager representation"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures
+ xsi:type="ecore:EReference"
+ name="localSpecificConfigurations"
+ upperBound="-1"
+ eType="#//nattableaxisconfiguration/IAxisConfiguration">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="specific configurations for the axis manager."/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers
+ xsi:type="ecore:EClass"
+ name="TableHeaderAxisConfiguration"
+ eSuperTypes="#//nattableaxisconfiguration/AbstractHeaderAxisConfiguration">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/Ecore">
+ <details
+ key="constraints"
+ value="axisManagersIdUnique"/>
+ </eAnnotations>
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
+ <details
+ key="axisManagersIdUnique"
+ value="axisManagers->forAll(am1 : AxisManagerRepresentation | ( (axisManagers->excluding (am1))->forAll(am2 : AxisManagerRepresentation | am1.axisManagerId&lt;>am2.axisManagerId) ))"/>
+ </eAnnotations>
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="Defines the configuration of the axis in the TableConfiguration"/>
+ </eAnnotations>
+ <eStructuralFeatures
+ xsi:type="ecore:EReference"
+ name="axisManagers"
+ lowerBound="1"
+ upperBound="-1"
+ eType="#//nattableaxisconfiguration/AxisManagerRepresentation"
+ containment="true">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="This list can't be empty. The list of the AxisManager used to fill the axis."/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers
+ xsi:type="ecore:EClass"
+ name="LocalTableHeaderAxisConfiguration"
+ eSuperTypes="#//nattableaxisconfiguration/AbstractHeaderAxisConfiguration">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="Define the configuration of the axis (rows or columns) in the table."/>
+ </eAnnotations>
+ <eStructuralFeatures
+ xsi:type="ecore:EReference"
+ name="axisManagerConfigurations"
+ upperBound="-1"
+ eType="#//nattableaxisconfiguration/AxisManagerConfiguration"
+ containment="true">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="This list contains the configuration of the axis managers used in the table."/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers
+ xsi:type="ecore:EClass"
+ name="IAxisConfiguration"
+ abstract="true"
+ interface="true"
+ eSuperTypes="#//nattablestyle/StyledElement">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="Comon Interface for axis configuration."/>
+ </eAnnotations>
+ </eClassifiers>
+ <eClassifiers
+ xsi:type="ecore:EClass"
+ name="FeatureAxisConfiguration"
+ eSuperTypes="#//nattableaxisconfiguration/IAxisConfiguration">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="Configuration to use for Axis representing features"/>
+ </eAnnotations>
+ <eStructuralFeatures
+ xsi:type="ecore:EAttribute"
+ name="showOnlyCommonFeature"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="If true, only the common features will be displayed on the axis."/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers
+ xsi:type="ecore:EClass"
+ name="IFillingConfiguration"
+ abstract="true"
+ interface="true"
+ eSuperTypes="#//nattableaxisconfiguration/IAxisConfiguration">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="Comon Interface for filling configurations."/>
+ </eAnnotations>
+ </eClassifiers>
+ <eClassifiers
+ xsi:type="ecore:EClass"
+ name="EStructuralFeatureValueFillingConfiguration"
+ eSuperTypes="#//nattableaxisconfiguration/IFillingConfiguration">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="Configuration used to fill the table listening a feature of the context of the table"/>
+ </eAnnotations>
+ <eStructuralFeatures
+ xsi:type="ecore:EReference"
+ name="listenFeature"
+ lowerBound="1"
+ eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EStructuralFeature">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="This field can't be null. References the feature of the context of the table to listen.&#xD;&#xA;It is possible that the context doesn't have this feature."/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers
+ xsi:type="ecore:EClass"
+ name="IPasteConfiguration"
+ eSuperTypes="#//nattableaxisconfiguration/IAxisConfiguration">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="Common Interface for the paste configuration."/>
+ </eAnnotations>
+ <eStructuralFeatures
+ xsi:type="ecore:EAttribute"
+ name="postActions"
+ upperBound="-1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="This field references post actions, using a string to do during the paste, after the creation of the element. "/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures
+ xsi:type="ecore:EAttribute"
+ name="detachedMode"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
+ defaultValueLiteral="true">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="If true, the created elements will be added at the end of the paste and the set values&#xD;&#xA;won't be do using the service edit"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers
+ xsi:type="ecore:EClass"
+ name="PasteEObjectConfiguration"
+ eSuperTypes="#//nattableaxisconfiguration/IPasteConfiguration">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="Configuration to use to paste EObject in the table."/>
+ </eAnnotations>
+ <eStructuralFeatures
+ xsi:type="ecore:EAttribute"
+ name="pastedElementId"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="The String representing the EClass of the elements to create (see papyrus services types for further information)"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures
+ xsi:type="ecore:EReference"
+ name="pasteElementContainementFeature"
+ eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EStructuralFeature">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="This field references the feature of the context of the table in which the created element will be added."/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="axisIdentifier" eType="#//nattableaxis/IAxis"
+ containment="true"/>
+ </eClassifiers>
+ <eClassifiers
+ xsi:type="ecore:EEnum"
+ name="AxisIndexStyle">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="Enumeration used to describe the possible style of the index of the headers."/>
+ </eAnnotations>
+ <eLiterals
+ name="ALPHABETIC"
+ value="1">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="Index Headers count will be : A-B-C-...Y-Z-AA-AB-..."/>
+ </eAnnotations>
+ </eLiterals>
+ <eLiterals
+ name="NUMERIC">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="Index Headers count will be : 1-2-3-..."/>
+ </eAnnotations>
+ </eLiterals>
+ </eClassifiers>
+ <eClassifiers
+ xsi:type="ecore:EClass"
+ name="TreeFillingConfiguration"
+ eSuperTypes="#//nattableaxisconfiguration/IFillingConfiguration">
+ <eStructuralFeatures
+ xsi:type="ecore:EReference"
+ name="axisUsedAsAxisProvider"
+ lowerBound="1"
+ eType="#//nattableaxis/IAxis"
+ containment="true"/>
+ <eStructuralFeatures
+ xsi:type="ecore:EReference"
+ name="pasteConfiguration"
+ eType="#//nattableaxisconfiguration/PasteEObjectConfiguration"/>
+ <eStructuralFeatures
+ xsi:type="ecore:EAttribute"
+ name="depth"
+ eType="ecore:EDataType ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EInt"/>
+ <eStructuralFeatures
+ xsi:type="ecore:EReference"
+ name="labelProvider"
+ lowerBound="1"
+ eType="#//nattablelabelprovider/ILabelProviderConfiguration">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="le label provider used to display string and image for this level in the tree"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures
+ xsi:type="ecore:EAttribute"
+ name="labelProviderContext"
+ lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eClassifiers>
+ </eSubpackages>
+ <eSubpackages
+ name="nattabletester"
+ nsURI="http://www.eclipse.org/papyrus/nattable/model/table/nattabletester"
+ nsPrefix="nattabletester">
+ <eClassifiers
+ xsi:type="ecore:EClass"
+ name="AbstractTableTester"
+ abstract="true"
+ eSuperTypes="#//nattablestyle/StyledElement">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="Abstract class for the tester."/>
+ </eAnnotations>
+ <eOperations
+ name="getTester"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="Returns an object representing the tester"/>
+ </eAnnotations>
+ </eOperations>
+ </eClassifiers>
+ <eClassifiers
+ xsi:type="ecore:EClass"
+ name="JavaTableTester"
+ eSuperTypes="#//nattabletester/AbstractTableTester">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="This class allows to references a JavaTableTester. The Java class is declared with an id, using the extension point org.eclipse.papyrus.infra.nattable.tester.&#xD;&#xA;The field tester must be the id declared in this extension point."/>
+ </eAnnotations>
+ <eStructuralFeatures
+ xsi:type="ecore:EAttribute"
+ name="tester"
+ lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="The id of the java tester declared using the extension point org.eclispe.papyrus.infra.nattable.tester"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ </eClassifiers>
+ </eSubpackages>
+ <eSubpackages
+ name="nattableaxis"
+ nsURI="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis"
+ nsPrefix="nattableaxis">
+ <eClassifiers
+ xsi:type="ecore:EClass"
+ name="IAxis"
+ abstract="true"
+ interface="true"
+ eSuperTypes="#//nattablestyle/StyledElement">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="Common interface for the axis of the table. (An axis is a specific row or a specific column)"/>
+ </eAnnotations>
+ <eOperations
+ name="getElement"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="Returns the elements represented by the IAxis"/>
+ </eAnnotations>
+ </eOperations>
+ <eOperations
+ name="getLocalLabelConfiguration"
+ eType="#//nattablelabelprovider/ILabelProviderConfiguration">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="Returns the local label configuration to use for this IAxis. This configuration&#xD;&#xA;will override the label configuration defined in the AxisManagerConfiguration."/>
+ </eAnnotations>
+ </eOperations>
+ <eStructuralFeatures
+ xsi:type="ecore:EReference"
+ name="manager"
+ eType="#//nattableaxisconfiguration/AxisManagerRepresentation">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="This field can't be null. Reference the axis manager providing this IAxis."/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures
+ xsi:type="ecore:EAttribute"
+ name="alias"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="An element can be displayed using an alias instead of its real name."/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers
+ xsi:type="ecore:EClass"
+ name="ITreeItemAxis"
+ abstract="true"
+ interface="true"
+ eSuperTypes="#//nattableaxis/IAxis">
+ <eStructuralFeatures
+ xsi:type="ecore:EReference"
+ name="parent"
+ eType="#//nattableaxis/ITreeItemAxis"
+ eOpposite="#//nattableaxis/ITreeItemAxis/children"/>
+ <eStructuralFeatures
+ xsi:type="ecore:EAttribute"
+ name="expanded"
+ lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
+ transient="true"
+ defaultValueLiteral="false"/>
+ <eStructuralFeatures
+ xsi:type="ecore:EReference"
+ name="children"
+ upperBound="-1"
+ eType="#//nattableaxis/ITreeItemAxis"
+ derived="true"
+ eOpposite="#//nattableaxis/ITreeItemAxis/parent"/>
+ </eClassifiers>
+ <eClassifiers
+ xsi:type="ecore:EClass"
+ name="IdAxis"
+ abstract="true"
+ eSuperTypes="#//nattableaxis/IAxis">
+ <eStructuralFeatures
+ xsi:type="ecore:EAttribute"
+ name="element"
+ lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="This obejct allows to reference an element using a string instead of referencing it directly."/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers
+ xsi:type="ecore:EClass"
+ name="IdTreeItemAxis"
+ eSuperTypes="#//nattableaxis/IdAxis #//nattableaxis/ITreeItemAxis"/>
+ <eClassifiers
+ xsi:type="ecore:EClass"
+ name="EObjectAxis"
+ eSuperTypes="#//nattableaxis/ObjectAxis">
+ <eStructuralFeatures
+ xsi:type="ecore:EReference"
+ name="element"
+ lowerBound="1"
+ eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="This IAxis allows to reference an EObject."/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers
+ xsi:type="ecore:EClass"
+ name="EObjectTreeItemAxis"
+ eSuperTypes="#//nattableaxis/EObjectAxis #//nattableaxis/ITreeItemAxis"/>
+ <eClassifiers
+ xsi:type="ecore:EClass"
+ name="FeatureAxis"
+ abstract="true"
+ eSuperTypes="#//nattableaxis/IAxis">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="Abstract class used to reference features."/>
+ </eAnnotations>
+ <eStructuralFeatures
+ xsi:type="ecore:EReference"
+ name="localLabelConfiguration"
+ eType="#//nattablelabelprovider/FeatureLabelProviderConfiguration"
+ containment="true">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="Returns the local label configuration to use for this IAxis. This configuration&#xD;&#xA;will override the label configuration defined in the AxisManagerConfiguration."/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers
+ xsi:type="ecore:EClass"
+ name="OperationAxis"
+ abstract="true"
+ eSuperTypes="#//nattableaxis/IAxis">
+ <eStructuralFeatures
+ xsi:type="ecore:EReference"
+ name="localLabelConfiguration"
+ eType="#//nattablelabelprovider/OperationLabelProviderConfiguration"
+ containment="true"/>
+ </eClassifiers>
+ <eClassifiers
+ xsi:type="ecore:EClass"
+ name="FeatureTreeItemAxis"
+ abstract="true"
+ eSuperTypes="#//nattableaxis/FeatureAxis #//nattableaxis/ITreeItemAxis"/>
+ <eClassifiers
+ xsi:type="ecore:EClass"
+ name="OperationTreeItemAxis"
+ abstract="true"
+ eSuperTypes="#//nattableaxis/OperationAxis #//nattableaxis/ITreeItemAxis"/>
+ <eClassifiers
+ xsi:type="ecore:EClass"
+ name="ObjectAxis"
+ abstract="true"
+ eSuperTypes="#//nattableaxis/IAxis">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="Abstract class used to reference object"/>
+ </eAnnotations>
+ <eStructuralFeatures
+ xsi:type="ecore:EReference"
+ name="localLabelConfiguration"
+ eType="#//nattablelabelprovider/ObjectLabelProviderConfiguration"
+ containment="true">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="Returns the local label configuration to use for this IAxis. This configuration&#xD;&#xA;will override the label configuration defined in the AxisManagerConfiguration."/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers
+ xsi:type="ecore:EClass"
+ name="ObjectTreeItemAxis"
+ abstract="true"
+ eSuperTypes="#//nattableaxis/ObjectAxis #//nattableaxis/ITreeItemAxis"/>
+ <eClassifiers
+ xsi:type="ecore:EClass"
+ name="FeatureIdAxis"
+ eSuperTypes="#//nattableaxis/IdAxis #//nattableaxis/FeatureAxis">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="IAxis used to represent feature using a string."/>
+ </eAnnotations>
+ </eClassifiers>
+ <eClassifiers
+ xsi:type="ecore:EClass"
+ name="FeatureIdTreeItemAxis"
+ eSuperTypes="#//nattableaxis/FeatureIdAxis #//nattableaxis/ITreeItemAxis"/>
+ <eClassifiers
+ xsi:type="ecore:EClass"
+ name="EStructuralFeatureAxis"
+ eSuperTypes="#//nattableaxis/FeatureAxis">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="IAxis used to reference EMF EStructuralFeature."/>
+ </eAnnotations>
+ <eStructuralFeatures
+ xsi:type="ecore:EReference"
+ name="element"
+ lowerBound="1"
+ eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EStructuralFeature">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="The represented EStructuralFeature."/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers
+ xsi:type="ecore:EClass"
+ name="EOperationAxis"
+ eSuperTypes="#//nattableaxis/OperationAxis">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="IAxis used to reference EMF EOperation."/>
+ </eAnnotations>
+ <eStructuralFeatures
+ xsi:type="ecore:EReference"
+ name="element"
+ lowerBound="1"
+ eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EOperation"/>
+ </eClassifiers>
+ <eClassifiers
+ xsi:type="ecore:EClass"
+ name="EStructuralFeatureTreeItemAxis"
+ eSuperTypes="#//nattableaxis/EStructuralFeatureAxis #//nattableaxis/ITreeItemAxis"/>
+ <eClassifiers
+ xsi:type="ecore:EClass"
+ name="EOperationTreeItemAxis"
+ eSuperTypes="#//nattableaxis/EOperationAxis #//nattableaxis/ITreeItemAxis"/>
+ <eClassifiers
+ xsi:type="ecore:EClass"
+ name="ObjectIdAxis"
+ eSuperTypes="#//nattableaxis/IdAxis #//nattableaxis/ObjectAxis">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="IAxis used to represent object using a string."/>
+ </eAnnotations>
+ </eClassifiers>
+ <eClassifiers
+ xsi:type="ecore:EClass"
+ name="ObjectIdTreeItemAxis"
+ eSuperTypes="#//nattableaxis/ObjectIdAxis #//nattableaxis/ITreeItemAxis"/>
+ <eClassifiers
+ xsi:type="ecore:EClass"
+ name="AxisGroup"
+ eSuperTypes="#//nattableaxis/IAxis">
+ <eStructuralFeatures
+ xsi:type="ecore:EReference"
+ name="groupedAxis"
+ upperBound="-1"
+ eType="#//nattableaxis/IAxis"/>
+ </eClassifiers>
+ </eSubpackages>
+ <eSubpackages
+ name="nattablecell"
+ nsURI="http://www.eclipse.org/papyrus/nattable/model/table/nattablecell"
+ nsPrefix="nattablecell">
+ <eClassifiers
+ xsi:type="ecore:EClass"
+ name="Cell"
+ eSuperTypes="../../org.eclipse.emf.ecore/model/Ecore.ecore#//EModelElement">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="Cell elements used to store specific information which can't be stored in the edited model"/>
+ </eAnnotations>
+ <eStructuralFeatures
+ xsi:type="ecore:EReference"
+ name="columnWrapper"
+ lowerBound="1"
+ eType="#//nattablecell/ICellAxisWrapper"
+ containment="true">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="The column element on which this cell must be displayed."/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures
+ xsi:type="ecore:EReference"
+ name="rowWrapper"
+ lowerBound="1"
+ eType="#//nattablecell/ICellAxisWrapper"
+ containment="true">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="The row element on which this cell must be displayed."/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures
+ xsi:type="ecore:EReference"
+ name="problems"
+ upperBound="-1"
+ eType="#//nattableproblem/Problem"
+ containment="true">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="a list of problem founds on this cell"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers
+ xsi:type="ecore:EClass"
+ name="ICellAxisWrapper"
+ abstract="true"
+ interface="true"
+ eSuperTypes="../../org.eclipse.emf.ecore/model/Ecore.ecore#//EModelElement">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="This class encapsulates the real axis object."/>
+ </eAnnotations>
+ <eOperations
+ name="getElement"
+ lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="Return the wrapped object"/>
+ </eAnnotations>
+ </eOperations>
+ </eClassifiers>
+ <eClassifiers
+ xsi:type="ecore:EClass"
+ name="EObjectAxisWrapper"
+ eSuperTypes="#//nattablecell/ICellAxisWrapper">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="Wrapper for EObject"/>
+ </eAnnotations>
+ <eStructuralFeatures
+ xsi:type="ecore:EReference"
+ name="element"
+ lowerBound="1"
+ eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="The wrapped element"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers
+ xsi:type="ecore:EClass"
+ name="IdAxisWrapper"
+ eSuperTypes="#//nattablecell/ICellAxisWrapper">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="Wrapper for Id"/>
+ </eAnnotations>
+ <eStructuralFeatures
+ xsi:type="ecore:EAttribute"
+ name="element"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="The id used to identifies an element."/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ </eClassifiers>
+ </eSubpackages>
+ <eSubpackages
+ name="nattableproblem"
+ nsURI="http://www.eclipse.org/papyrus/nattable/model/table/nattableproblem"
+ nsPrefix="nattableproblem">
+ <eClassifiers
+ xsi:type="ecore:EClass"
+ name="Problem"
+ eSuperTypes="#//nattableconfiguration/TableNamedElement">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="A problem"/>
+ </eAnnotations>
+ </eClassifiers>
+ <eClassifiers
+ xsi:type="ecore:EClass"
+ name="StringResolutionProblem"
+ eSuperTypes="#//nattableproblem/Problem">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="This kind of problem is used when the user set a value as a text in a Cell and the system can't convert this string value into the correct type"/>
+ </eAnnotations>
+ <eStructuralFeatures
+ xsi:type="ecore:EAttribute"
+ name="valueAsString"
+ lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="The text which is the source of the problem"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures
+ xsi:type="ecore:EAttribute"
+ name="unresolvedString"
+ lowerBound="1"
+ upperBound="-1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="the text or a substring of it, which is the source of the problem"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ </eClassifiers>
+ </eSubpackages>
+ <eSubpackages
+ name="nattablestyle"
+ nsURI="http://www.eclipse.org/papyrus/nattable/model/table/nattablestyle"
+ nsPrefix="nattablestyle">
+ <eClassifiers
+ xsi:type="ecore:EClass"
+ name="Style"
+ abstract="true"
+ interface="true"
+ eSuperTypes="../../org.eclipse.emf.ecore/model/Ecore.ecore#//EModelElement">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="Style from which all substyles originate"/>
+ </eAnnotations>
+ </eClassifiers>
+ <eClassifiers
+ xsi:type="ecore:EClass"
+ name="NamedStyle"
+ eSuperTypes="#//nattablestyle/Style">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="used to represent character and paragraph styles"/>
+ </eAnnotations>
+ <eStructuralFeatures
+ xsi:type="ecore:EAttribute"
+ name="name"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eClassifiers>
+ <eClassifiers
+ xsi:type="ecore:EEnum"
+ name="CellTextAlignment">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="Alignment of the text inside its cell"/>
+ </eAnnotations>
+ <eLiterals
+ name="TOP_LEFT"
+ value="1"
+ literal="TOP_LEFT"/>
+ <eLiterals
+ name="TOP_CENTER"
+ value="2"
+ literal="TOP_CENTER"/>
+ <eLiterals
+ name="TOP_RIGHT"
+ value="3"
+ literal="TOP_RIGHT"/>
+ <eLiterals
+ name="MIDDLE_LEFT"
+ value="4"
+ literal="MIDDLE_LEFT"/>
+ <eLiterals
+ name="MIDDLE_CENTER"
+ value="5"
+ literal="MIDDLE_CENTER"/>
+ <eLiterals
+ name="MIDDLE_RIGHT"
+ value="6"
+ literal="MIDDLE_RIGHT"/>
+ <eLiterals
+ name="BOTTOM_LEFT"
+ value="7"
+ literal="BOTTOM_LEFT"/>
+ <eLiterals
+ name="BOTTOM_CENTER"
+ value="8"
+ literal="BOTTOM_CENTER"/>
+ <eLiterals
+ name="BOTTOM_RIGHT"
+ value="9"
+ literal="BOTTOM_RIGHT"/>
+ </eClassifiers>
+ <eClassifiers
+ xsi:type="ecore:EClass"
+ name="FontStyle"
+ eSuperTypes="#//nattablestyle/Style">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="Font style of the cell's text"/>
+ </eAnnotations>
+ <eStructuralFeatures
+ xsi:type="ecore:EAttribute"
+ name="fontColor"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"
+ defaultValueLiteral="0"/>
+ <eStructuralFeatures
+ xsi:type="ecore:EAttribute"
+ name="fontName"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"
+ defaultValueLiteral="Tahoma"/>
+ <eStructuralFeatures
+ xsi:type="ecore:EAttribute"
+ name="fontHeight"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"
+ defaultValueLiteral="9"/>
+ <eStructuralFeatures
+ xsi:type="ecore:EAttribute"
+ name="bold"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
+ defaultValueLiteral="false"/>
+ <eStructuralFeatures
+ xsi:type="ecore:EAttribute"
+ name="italic"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
+ defaultValueLiteral="false"/>
+ <eStructuralFeatures
+ xsi:type="ecore:EAttribute"
+ name="underline"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
+ defaultValueLiteral="false"/>
+ <eStructuralFeatures
+ xsi:type="ecore:EAttribute"
+ name="strikeThrough"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
+ defaultValueLiteral="false"/>
+ </eClassifiers>
+ <eClassifiers
+ xsi:type="ecore:EClass"
+ name="CellTextStyle"
+ eSuperTypes="#//nattablestyle/Style">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="Text representation"/>
+ </eAnnotations>
+ <eStructuralFeatures
+ xsi:type="ecore:EAttribute"
+ name="alignment"
+ eType="#//nattablestyle/CellTextAlignment"
+ defaultValueLiteral="MIDDLE_LEFT"/>
+ </eClassifiers>
+ <eClassifiers
+ xsi:type="ecore:EClass"
+ name="IntValueStyle"
+ eSuperTypes="#//nattablestyle/NamedStyle">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="Int representation"/>
+ </eAnnotations>
+ <eStructuralFeatures
+ xsi:type="ecore:EAttribute"
+ name="intValue"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
+ </eClassifiers>
+ <eClassifiers
+ xsi:type="ecore:EClass"
+ name="IntListValueStyle"
+ eSuperTypes="#//nattablestyle/NamedStyle">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="Int lists representation"/>
+ </eAnnotations>
+ <eStructuralFeatures
+ xsi:type="ecore:EAttribute"
+ name="intListValue"
+ unique="false"
+ upperBound="-1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
+ </eClassifiers>
+ <eClassifiers
+ xsi:type="ecore:EClass"
+ name="BooleanValueStyle"
+ eSuperTypes="#//nattablestyle/NamedStyle">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="Boolean representation"/>
+ </eAnnotations>
+ <eStructuralFeatures
+ xsi:type="ecore:EAttribute"
+ name="booleanValue"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
+ </eClassifiers>
+ <eClassifiers
+ xsi:type="ecore:EClass"
+ name="BooleanListValueStyle"
+ eSuperTypes="#//nattablestyle/NamedStyle">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="Boolean lists representation"/>
+ </eAnnotations>
+ <eStructuralFeatures
+ xsi:type="ecore:EAttribute"
+ name="booleanListValue"
+ unique="false"
+ upperBound="-1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBooleanObject"/>
+ </eClassifiers>
+ <eClassifiers
+ xsi:type="ecore:EClass"
+ name="DoubleValueStyle"
+ eSuperTypes="#//nattablestyle/NamedStyle">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="Double representation"/>
+ </eAnnotations>
+ <eStructuralFeatures
+ xsi:type="ecore:EAttribute"
+ name="doubleValue"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDouble"/>
+ </eClassifiers>
+ <eClassifiers
+ xsi:type="ecore:EClass"
+ name="DoubleListValueStyle"
+ eSuperTypes="#//nattablestyle/NamedStyle">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="Double lists representation"/>
+ </eAnnotations>
+ <eStructuralFeatures
+ xsi:type="ecore:EAttribute"
+ name="doubleListValue"
+ unique="false"
+ upperBound="-1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDoubleObject"/>
+ </eClassifiers>
+ <eClassifiers
+ xsi:type="ecore:EClass"
+ name="StringValueStyle"
+ eSuperTypes="#//nattablestyle/NamedStyle">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="String representation"/>
+ </eAnnotations>
+ <eStructuralFeatures
+ xsi:type="ecore:EAttribute"
+ name="stringValue"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eClassifiers>
+ <eClassifiers
+ xsi:type="ecore:EClass"
+ name="StringListValueStyle"
+ eSuperTypes="#//nattablestyle/NamedStyle">
+ <eAnnotations
+ source="http://www.eclipse.org/emf/2002/GenModel">
+ <details
+ key="documentation"
+ value="String lists representation"/>
+ </eAnnotations>
+ <eStructuralFeatures
+ xsi:type="ecore:EAttribute"
+ name="stringListValue"
+ unique="false"
+ upperBound="-1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eClassifiers>
+ <eClassifiers
+ xsi:type="ecore:EClass"
+ name="StyledElement"
+ abstract="true"
+ eSuperTypes="../../org.eclipse.emf.ecore/model/Ecore.ecore#//EModelElement">
+ <eOperations
+ name="getNamedStyle"
+ eType="#//nattablestyle/NamedStyle">
+ <eParameters
+ name="eClass"
+ eType="ecore:EClass ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EClass"/>
+ <eParameters
+ name="name"
+ eType="ecore:EDataType ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/>
+ </eOperations>
+ <eOperations
+ name="getStyle"
+ eType="#//nattablestyle/Style">
+ <eParameters
+ name="eClass"
+ eType="ecore:EClass ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EClass"/>
+ </eOperations>
+ <eOperations
+ name="createStyle"
+ eType="#//nattablestyle/Style">
+ <eParameters
+ name="eClass"
+ eType="ecore:EClass ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EClass"/>
+ </eOperations>
+ <eStructuralFeatures
+ xsi:type="ecore:EReference"
+ name="styles"
+ upperBound="-1"
+ eType="#//nattablestyle/Style"
+ containment="true"/>
+ </eClassifiers>
+ <eClassifiers
+ xsi:type="ecore:EClass"
+ name="TableDisplayStyle"
+ eSuperTypes="#//nattablestyle/Style">
+ <eStructuralFeatures
+ xsi:type="ecore:EAttribute"
+ name="displayStyle"
+ lowerBound="1"
+ eType="#//nattablestyle/DisplayStyle"
+ defaultValueLiteral="NORMAL"/>
+ </eClassifiers>
+ <eClassifiers
+ xsi:type="ecore:EEnum"
+ name="DisplayStyle">
+ <eLiterals
+ name="NORMAL"
+ literal="NORMAL"/>
+ <eLiterals
+ name="HIERARCHIC_SINGLE_TREE_COLUMN"
+ value="1"
+ literal="HIERARCHIC_SINGLE_TREE_COLUMN"/>
+ <eLiterals
+ name="HIERARCHIC_MULTI_TREE_COLUMN"
+ value="2"
+ literal="HIERARCHIC_MULTI_TREE_COLUMN"/>
+ </eClassifiers>
+ <eClassifiers
+ xsi:type="ecore:EClass"
+ name="EObjectValueStyle"
+ eSuperTypes="#//nattablestyle/NamedStyle">
+ <eStructuralFeatures
+ xsi:type="ecore:EReference"
+ name="eObjectValue"
+ eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+ </eClassifiers>
+ <eClassifiers
+ xsi:type="ecore:EClass"
+ name="EObjectListValueStyle"
+ eSuperTypes="#//nattablestyle/NamedStyle">
+ <eStructuralFeatures
+ xsi:type="ecore:EReference"
+ name="eObjectValue"
+ upperBound="-1"
+ eType="ecore:EClass ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EObject"/>
+ </eClassifiers>
+ </eSubpackages>
+</ecore:EPackage>
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/model/nattable.genmodel b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/model/nattable.genmodel
index f8dd153e090..ce4a906a00c 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/model/nattable.genmodel
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/model/nattable.genmodel
@@ -1,275 +1,327 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<genmodel:GenModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
- xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" copyrightText="Copyright (c) 2013 CEA LIST.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;All rights reserved. This program and the accompanying materials&#xD;&#xA;are made available under the terms of the Eclipse Public License v1.0&#xD;&#xA;which accompanies this distribution, and is available at&#xD;&#xA;http://www.eclipse.org/legal/epl-v10.html&#xD;&#xA;&#xD;&#xA;Contributors:&#xD;&#xA;&#x9;Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation"
- modelDirectory="/org.eclipse.papyrus.infra.nattable.model/src-gen" editDirectory="/org.eclipse.papyrus.infra.nattable.model.edit/src-gen"
- editorDirectory="/org.eclipse.papyrus.infra.nattable.model.editor/src-gen" modelPluginID="org.eclipse.papyrus.infra.nattable.model"
- modelName="Nattable" nonNLSMarkers="true" rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl$Container"
- testsDirectory="/org.eclipse.papyrus.infra.nattable.model.tests/src-gen" importerID="org.eclipse.emf.importer.ecore"
- complianceLevel="5.0" copyrightFields="false" usedGenPackages="../../org.eclipse.emf.ecore/model/Ecore.genmodel#//ecore"
- operationReflection="true" importOrganizing="true">
- <foreignModel>nattable.ecore</foreignModel>
- <genPackages prefix="Nattable" basePackage="org.eclipse.papyrus.infra.nattable.model"
- disposableProviderFactory="true" ecorePackage="nattable.ecore#/">
- <genClasses ecoreClass="nattable.ecore#//Table">
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference nattable.ecore#//Table/context"/>
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference nattable.ecore#//Table/owner"/>
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference nattable.ecore#//Table/prototype"/>
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference nattable.ecore#//Table/tableConfiguration"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//Table/invertAxis"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference nattable.ecore#//Table/columnAxisProvidersHistory"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference nattable.ecore#//Table/rowAxisProvidersHistory"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference nattable.ecore#//Table/localRowHeaderAxisConfiguration"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference nattable.ecore#//Table/localColumnHeaderAxisConfiguration"/>
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference nattable.ecore#//Table/currentRowAxisProvider"/>
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference nattable.ecore#//Table/currentColumnAxisProvider"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference nattable.ecore#//Table/cells"/>
- </genClasses>
- <nestedGenPackages prefix="Nattableconfiguration" basePackage="org.eclipse.papyrus.infra.nattable.model.nattable"
- disposableProviderFactory="true" ecorePackage="nattable.ecore#//nattableconfiguration">
- <genEnums typeSafeEnumCompatible="false" ecoreEnum="nattable.ecore#//nattableconfiguration/CellEditorDeclaration">
- <genEnumLiterals ecoreEnumLiteral="nattable.ecore#//nattableconfiguration/CellEditorDeclaration/COLUMN"/>
- <genEnumLiterals ecoreEnumLiteral="nattable.ecore#//nattableconfiguration/CellEditorDeclaration/ROW"/>
- <genEnumLiterals ecoreEnumLiteral="nattable.ecore#//nattableconfiguration/CellEditorDeclaration/CELL"/>
- </genEnums>
- <genClasses image="false" ecoreClass="nattable.ecore#//nattableconfiguration/TableNamedElement">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattableconfiguration/TableNamedElement/description"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattableconfiguration/TableNamedElement/name"/>
- </genClasses>
- <genClasses ecoreClass="nattable.ecore#//nattableconfiguration/TableConfiguration">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattableconfiguration/TableConfiguration/type"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattableconfiguration/TableConfiguration/iconPath"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference nattable.ecore#//nattableconfiguration/TableConfiguration/creationTester"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattableconfiguration/TableConfiguration/cellEditorDeclaration"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference nattable.ecore#//nattableconfiguration/TableConfiguration/rowHeaderAxisConfiguration"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference nattable.ecore#//nattableconfiguration/TableConfiguration/columnHeaderAxisConfiguration"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference nattable.ecore#//nattableconfiguration/TableConfiguration/columnAxisProviders"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference nattable.ecore#//nattableconfiguration/TableConfiguration/rowAxisProviders"/>
- <genFeatures notify="false" createChild="false" propertySortChoices="true"
- ecoreFeature="ecore:EReference nattable.ecore#//nattableconfiguration/TableConfiguration/defaultRowAxisProvider"/>
- <genFeatures notify="false" createChild="false" propertySortChoices="true"
- ecoreFeature="ecore:EReference nattable.ecore#//nattableconfiguration/TableConfiguration/defaultColumnAxisProvider"/>
- </genClasses>
- </nestedGenPackages>
- <nestedGenPackages prefix="Nattableaxisprovider" basePackage="org.eclipse.papyrus.infra.nattable.model.nattable"
- disposableProviderFactory="true" ecorePackage="nattable.ecore#//nattableaxisprovider">
- <genClasses image="false" ecoreClass="nattable.ecore#//nattableaxisprovider/AbstractAxisProvider">
- <genOperations ecoreOperation="nattable.ecore#//nattableaxisprovider/AbstractAxisProvider/getAxis"/>
- </genClasses>
- <genClasses image="false" ecoreClass="nattable.ecore#//nattableaxisprovider/IMasterAxisProvider">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattableaxisprovider/IMasterAxisProvider/disconnectSlave"/>
- </genClasses>
- <genClasses image="false" ecoreClass="nattable.ecore#//nattableaxisprovider/ISlaveAxisProvider"/>
- <genClasses image="false" ecoreClass="nattable.ecore#//nattableaxisprovider/AxisProvider">
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference nattable.ecore#//nattableaxisprovider/AxisProvider/axis"/>
- </genClasses>
- <genClasses ecoreClass="nattable.ecore#//nattableaxisprovider/SlaveObjectAxisProvider"/>
- <genClasses ecoreClass="nattable.ecore#//nattableaxisprovider/MasterObjectAxisProvider"/>
- </nestedGenPackages>
- <nestedGenPackages prefix="Nattablelabelprovider" basePackage="org.eclipse.papyrus.infra.nattable.model.nattable"
- disposableProviderFactory="true" ecorePackage="nattable.ecore#//nattablelabelprovider">
- <genClasses image="false" ecoreClass="nattable.ecore#//nattablelabelprovider/ILabelProviderConfiguration"/>
- <genClasses ecoreClass="nattable.ecore#//nattablelabelprovider/FeatureLabelProviderConfiguration">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattablelabelprovider/FeatureLabelProviderConfiguration/displayIsDerived"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattablelabelprovider/FeatureLabelProviderConfiguration/displayType"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattablelabelprovider/FeatureLabelProviderConfiguration/displayMultiplicity"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattablelabelprovider/FeatureLabelProviderConfiguration/displayName"/>
- </genClasses>
- <genClasses ecoreClass="nattable.ecore#//nattablelabelprovider/ObjectLabelProviderConfiguration">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattablelabelprovider/ObjectLabelProviderConfiguration/displayIcon"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattablelabelprovider/ObjectLabelProviderConfiguration/displayLabel"/>
- </genClasses>
- </nestedGenPackages>
- <nestedGenPackages prefix="Nattableaxisconfiguration" basePackage="org.eclipse.papyrus.infra.nattable.model.nattable"
- disposableProviderFactory="true" ecorePackage="nattable.ecore#//nattableaxisconfiguration">
- <genEnums typeSafeEnumCompatible="false" ecoreEnum="nattable.ecore#//nattableaxisconfiguration/AxisIndexStyle">
- <genEnumLiterals ecoreEnumLiteral="nattable.ecore#//nattableaxisconfiguration/AxisIndexStyle/ALPHABETIC"/>
- <genEnumLiterals ecoreEnumLiteral="nattable.ecore#//nattableaxisconfiguration/AxisIndexStyle/NUMERIC"/>
- </genEnums>
- <genClasses image="false" ecoreClass="nattable.ecore#//nattableaxisconfiguration/AbstractHeaderAxisConfiguration">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattableaxisconfiguration/AbstractHeaderAxisConfiguration/indexStyle"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattableaxisconfiguration/AbstractHeaderAxisConfiguration/displayLabel"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattableaxisconfiguration/AbstractHeaderAxisConfiguration/displayFilter"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattableaxisconfiguration/AbstractHeaderAxisConfiguration/displayIndex"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference nattable.ecore#//nattableaxisconfiguration/AbstractHeaderAxisConfiguration/ownedLabelConfigurations"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference nattable.ecore#//nattableaxisconfiguration/AbstractHeaderAxisConfiguration/ownedAxisConfigurations"/>
- </genClasses>
- <genClasses ecoreClass="nattable.ecore#//nattableaxisconfiguration/AxisManagerRepresentation">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattableaxisconfiguration/AxisManagerRepresentation/axisManagerId"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattableaxisconfiguration/AxisManagerRepresentation/labelProviderContext"/>
- <genFeatures notify="false" createChild="false" propertySortChoices="true"
- ecoreFeature="ecore:EReference nattable.ecore#//nattableaxisconfiguration/AxisManagerRepresentation/headerLabelConfiguration"/>
- <genFeatures notify="false" createChild="false" propertySortChoices="true"
- ecoreFeature="ecore:EReference nattable.ecore#//nattableaxisconfiguration/AxisManagerRepresentation/specificAxisConfigurations"/>
- </genClasses>
- <genClasses ecoreClass="nattable.ecore#//nattableaxisconfiguration/AxisManagerConfiguration">
- <genFeatures notify="false" createChild="false" propertySortChoices="true"
- ecoreFeature="ecore:EReference nattable.ecore#//nattableaxisconfiguration/AxisManagerConfiguration/localHeaderLabelConfiguration"/>
- <genFeatures notify="false" createChild="false" propertySortChoices="true"
- ecoreFeature="ecore:EReference nattable.ecore#//nattableaxisconfiguration/AxisManagerConfiguration/axisManager"/>
- <genFeatures notify="false" createChild="false" propertySortChoices="true"
- ecoreFeature="ecore:EReference nattable.ecore#//nattableaxisconfiguration/AxisManagerConfiguration/localSpecificConfigurations"/>
- </genClasses>
- <genClasses ecoreClass="nattable.ecore#//nattableaxisconfiguration/TableHeaderAxisConfiguration">
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference nattable.ecore#//nattableaxisconfiguration/TableHeaderAxisConfiguration/axisManagers"/>
- </genClasses>
- <genClasses ecoreClass="nattable.ecore#//nattableaxisconfiguration/LocalTableHeaderAxisConfiguration">
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference nattable.ecore#//nattableaxisconfiguration/LocalTableHeaderAxisConfiguration/axisManagerConfigurations"/>
- </genClasses>
- <genClasses image="false" ecoreClass="nattable.ecore#//nattableaxisconfiguration/IAxisConfiguration"/>
- <genClasses ecoreClass="nattable.ecore#//nattableaxisconfiguration/FeatureAxisConfiguration">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattableaxisconfiguration/FeatureAxisConfiguration/showOnlyCommonFeature"/>
- </genClasses>
- <genClasses image="false" ecoreClass="nattable.ecore#//nattableaxisconfiguration/IFillingConfiguration"/>
- <genClasses ecoreClass="nattable.ecore#//nattableaxisconfiguration/EStructuralFeatureValueFillingConfiguration">
- <genFeatures notify="false" createChild="false" propertySortChoices="true"
- ecoreFeature="ecore:EReference nattable.ecore#//nattableaxisconfiguration/EStructuralFeatureValueFillingConfiguration/listenFeature"/>
- </genClasses>
- <genClasses ecoreClass="nattable.ecore#//nattableaxisconfiguration/IPasteConfiguration">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattableaxisconfiguration/IPasteConfiguration/postActions"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattableaxisconfiguration/IPasteConfiguration/detachedMode"/>
- </genClasses>
- <genClasses ecoreClass="nattable.ecore#//nattableaxisconfiguration/PasteEObjectConfiguration">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattableaxisconfiguration/PasteEObjectConfiguration/pastedElementId"/>
- <genFeatures notify="false" createChild="false" propertySortChoices="true"
- ecoreFeature="ecore:EReference nattable.ecore#//nattableaxisconfiguration/PasteEObjectConfiguration/pasteElementContainementFeature"/>
- </genClasses>
- </nestedGenPackages>
- <nestedGenPackages prefix="Nattabletester" basePackage="org.eclipse.papyrus.infra.nattable.model.nattable"
- disposableProviderFactory="true" ecorePackage="nattable.ecore#//nattabletester">
- <genClasses image="false" ecoreClass="nattable.ecore#//nattabletester/AbstractTableTester">
- <genOperations ecoreOperation="nattable.ecore#//nattabletester/AbstractTableTester/getTester"/>
- </genClasses>
- <genClasses ecoreClass="nattable.ecore#//nattabletester/JavaTableTester">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattabletester/JavaTableTester/tester"/>
- </genClasses>
- </nestedGenPackages>
- <nestedGenPackages prefix="Nattableaxis" basePackage="org.eclipse.papyrus.infra.nattable.model.nattable"
- disposableProviderFactory="true" ecorePackage="nattable.ecore#//nattableaxis">
- <genClasses image="false" ecoreClass="nattable.ecore#//nattableaxis/IAxis">
- <genFeatures notify="false" createChild="false" propertySortChoices="true"
- ecoreFeature="ecore:EReference nattable.ecore#//nattableaxis/IAxis/manager"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattableaxis/IAxis/alias"/>
- <genOperations ecoreOperation="nattable.ecore#//nattableaxis/IAxis/getElement"/>
- <genOperations ecoreOperation="nattable.ecore#//nattableaxis/IAxis/getLocalLabelConfiguration"/>
- </genClasses>
- <genClasses image="false" ecoreClass="nattable.ecore#//nattableaxis/IdAxis">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattableaxis/IdAxis/element"/>
- </genClasses>
- <genClasses ecoreClass="nattable.ecore#//nattableaxis/EObjectAxis">
- <genFeatures notify="false" createChild="false" propertySortChoices="true"
- ecoreFeature="ecore:EReference nattable.ecore#//nattableaxis/EObjectAxis/element"/>
- </genClasses>
- <genClasses image="false" ecoreClass="nattable.ecore#//nattableaxis/FeatureAxis">
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference nattable.ecore#//nattableaxis/FeatureAxis/localLabelConfiguration"/>
- </genClasses>
- <genClasses image="false" ecoreClass="nattable.ecore#//nattableaxis/ObjectAxis">
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference nattable.ecore#//nattableaxis/ObjectAxis/localLabelConfiguration"/>
- </genClasses>
- <genClasses ecoreClass="nattable.ecore#//nattableaxis/FeatureIdAxis"/>
- <genClasses ecoreClass="nattable.ecore#//nattableaxis/EStructuralFeatureAxis">
- <genFeatures notify="false" createChild="false" propertySortChoices="true"
- ecoreFeature="ecore:EReference nattable.ecore#//nattableaxis/EStructuralFeatureAxis/element"/>
- </genClasses>
- <genClasses ecoreClass="nattable.ecore#//nattableaxis/ObjectIdAxis"/>
- <genClasses ecoreClass="nattable.ecore#//nattableaxis/IHierarchicalAxis">
- <genFeatures notify="false" createChild="false" propertySortChoices="true"
- ecoreFeature="ecore:EReference nattable.ecore#//nattableaxis/IHierarchicalAxis/parent"/>
- </genClasses>
- <genClasses ecoreClass="nattable.ecore#//nattableaxis/AxisGroup">
- <genFeatures notify="false" createChild="false" propertySortChoices="true"
- ecoreFeature="ecore:EReference nattable.ecore#//nattableaxis/AxisGroup/groupedAxis"/>
- </genClasses>
- </nestedGenPackages>
- <nestedGenPackages prefix="Nattablecell" basePackage="org.eclipse.papyrus.infra.nattable.model.nattable"
- disposableProviderFactory="true" ecorePackage="nattable.ecore#//nattablecell">
- <genClasses ecoreClass="nattable.ecore#//nattablecell/Cell">
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference nattable.ecore#//nattablecell/Cell/columnWrapper"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference nattable.ecore#//nattablecell/Cell/rowWrapper"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference nattable.ecore#//nattablecell/Cell/problems"/>
- </genClasses>
- <genClasses image="false" ecoreClass="nattable.ecore#//nattablecell/ICellAxisWrapper">
- <genOperations ecoreOperation="nattable.ecore#//nattablecell/ICellAxisWrapper/getElement"/>
- </genClasses>
- <genClasses ecoreClass="nattable.ecore#//nattablecell/EObjectAxisWrapper">
- <genFeatures notify="false" createChild="false" propertySortChoices="true"
- ecoreFeature="ecore:EReference nattable.ecore#//nattablecell/EObjectAxisWrapper/element"/>
- </genClasses>
- <genClasses ecoreClass="nattable.ecore#//nattablecell/IdAxisWrapper">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattablecell/IdAxisWrapper/element"/>
- </genClasses>
- </nestedGenPackages>
- <nestedGenPackages prefix="Nattableproblem" basePackage="org.eclipse.papyrus.infra.nattable.model.nattable"
- disposableProviderFactory="true" ecorePackage="nattable.ecore#//nattableproblem">
- <genClasses ecoreClass="nattable.ecore#//nattableproblem/Problem"/>
- <genClasses ecoreClass="nattable.ecore#//nattableproblem/StringResolutionProblem">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattableproblem/StringResolutionProblem/valueAsString"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattableproblem/StringResolutionProblem/unresolvedString"/>
- </genClasses>
- </nestedGenPackages>
- <nestedGenPackages prefix="Nattablestyle" basePackage="org.eclipse.papyrus.infra.nattable.model.nattable"
- disposableProviderFactory="true" ecorePackage="nattable.ecore#//nattablestyle">
- <genEnums typeSafeEnumCompatible="false" ecoreEnum="nattable.ecore#//nattablestyle/CellTextAlignment">
- <genEnumLiterals ecoreEnumLiteral="nattable.ecore#//nattablestyle/CellTextAlignment/TOP_LEFT"/>
- <genEnumLiterals ecoreEnumLiteral="nattable.ecore#//nattablestyle/CellTextAlignment/TOP_CENTER"/>
- <genEnumLiterals ecoreEnumLiteral="nattable.ecore#//nattablestyle/CellTextAlignment/TOP_RIGHT"/>
- <genEnumLiterals ecoreEnumLiteral="nattable.ecore#//nattablestyle/CellTextAlignment/MIDDLE_LEFT"/>
- <genEnumLiterals ecoreEnumLiteral="nattable.ecore#//nattablestyle/CellTextAlignment/MIDDLE_CENTER"/>
- <genEnumLiterals ecoreEnumLiteral="nattable.ecore#//nattablestyle/CellTextAlignment/MIDDLE_RIGHT"/>
- <genEnumLiterals ecoreEnumLiteral="nattable.ecore#//nattablestyle/CellTextAlignment/BOTTOM_LEFT"/>
- <genEnumLiterals ecoreEnumLiteral="nattable.ecore#//nattablestyle/CellTextAlignment/BOTTOM_CENTER"/>
- <genEnumLiterals ecoreEnumLiteral="nattable.ecore#//nattablestyle/CellTextAlignment/BOTTOM_RIGHT"/>
- </genEnums>
- <genEnums typeSafeEnumCompatible="false" ecoreEnum="nattable.ecore#//nattablestyle/DisplayStyle">
- <genEnumLiterals ecoreEnumLiteral="nattable.ecore#//nattablestyle/DisplayStyle/NORMAL"/>
- <genEnumLiterals ecoreEnumLiteral="nattable.ecore#//nattablestyle/DisplayStyle/HIERARCHIC"/>
- <genEnumLiterals ecoreEnumLiteral="nattable.ecore#//nattablestyle/DisplayStyle/TREE_COLUMN"/>
- </genEnums>
- <genClasses image="false" ecoreClass="nattable.ecore#//nattablestyle/Style"/>
- <genClasses ecoreClass="nattable.ecore#//nattablestyle/NamedStyle">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattablestyle/NamedStyle/name"/>
- </genClasses>
- <genClasses ecoreClass="nattable.ecore#//nattablestyle/FontStyle">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattablestyle/FontStyle/fontColor"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattablestyle/FontStyle/fontName"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattablestyle/FontStyle/fontHeight"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattablestyle/FontStyle/bold"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattablestyle/FontStyle/italic"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattablestyle/FontStyle/underline"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattablestyle/FontStyle/strikeThrough"/>
- </genClasses>
- <genClasses ecoreClass="nattable.ecore#//nattablestyle/CellTextStyle">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattablestyle/CellTextStyle/alignment"/>
- </genClasses>
- <genClasses ecoreClass="nattable.ecore#//nattablestyle/IntValueStyle">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattablestyle/IntValueStyle/intValue"/>
- </genClasses>
- <genClasses ecoreClass="nattable.ecore#//nattablestyle/IntListValueStyle">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattablestyle/IntListValueStyle/intListValue"/>
- </genClasses>
- <genClasses ecoreClass="nattable.ecore#//nattablestyle/BooleanValueStyle">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattablestyle/BooleanValueStyle/booleanValue"/>
- </genClasses>
- <genClasses ecoreClass="nattable.ecore#//nattablestyle/BooleanListValueStyle">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattablestyle/BooleanListValueStyle/booleanListValue"/>
- </genClasses>
- <genClasses ecoreClass="nattable.ecore#//nattablestyle/DoubleValueStyle">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattablestyle/DoubleValueStyle/doubleValue"/>
- </genClasses>
- <genClasses ecoreClass="nattable.ecore#//nattablestyle/DoubleListValueStyle">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattablestyle/DoubleListValueStyle/doubleListValue"/>
- </genClasses>
- <genClasses ecoreClass="nattable.ecore#//nattablestyle/StringValueStyle">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattablestyle/StringValueStyle/stringValue"/>
- </genClasses>
- <genClasses ecoreClass="nattable.ecore#//nattablestyle/StringListValueStyle">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattablestyle/StringListValueStyle/stringListValue"/>
- </genClasses>
- <genClasses image="false" ecoreClass="nattable.ecore#//nattablestyle/StyledElement">
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference nattable.ecore#//nattablestyle/StyledElement/styles"/>
- </genClasses>
- <genClasses ecoreClass="nattable.ecore#//nattablestyle/TableDisplayStyle">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattablestyle/TableDisplayStyle/displayStyle"/>
- </genClasses>
- </nestedGenPackages>
- </genPackages>
-</genmodel:GenModel>
+<?xml version="1.0" encoding="UTF-8"?>
+<genmodel:GenModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" copyrightText="Copyright (c) 2013 CEA LIST.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;All rights reserved. This program and the accompanying materials&#xD;&#xA;are made available under the terms of the Eclipse Public License v1.0&#xD;&#xA;which accompanies this distribution, and is available at&#xD;&#xA;http://www.eclipse.org/legal/epl-v10.html&#xD;&#xA;&#xD;&#xA;Contributors:&#xD;&#xA;&#x9;Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation"
+ modelDirectory="/org.eclipse.papyrus.infra.nattable.model/src-gen" editDirectory="/org.eclipse.papyrus.infra.nattable.model.edit/src-gen"
+ editorDirectory="/org.eclipse.papyrus.infra.nattable.model.editor/src-gen" modelPluginID="org.eclipse.papyrus.infra.nattable.model"
+ modelName="Nattable" nonNLSMarkers="true" rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl$Container"
+ testsDirectory="/org.eclipse.papyrus.infra.nattable.model.tests/src-gen" importerID="org.eclipse.emf.importer.ecore"
+ complianceLevel="5.0" copyrightFields="false" usedGenPackages="../../org.eclipse.emf.ecore/model/Ecore.genmodel#//ecore"
+ operationReflection="true" importOrganizing="true">
+ <foreignModel>nattable.ecore</foreignModel>
+ <genPackages prefix="Nattable" basePackage="org.eclipse.papyrus.infra.nattable.model"
+ disposableProviderFactory="true" ecorePackage="nattable.ecore#/">
+ <genClasses ecoreClass="nattable.ecore#//Table">
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference nattable.ecore#//Table/context"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference nattable.ecore#//Table/owner"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference nattable.ecore#//Table/prototype"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference nattable.ecore#//Table/tableConfiguration"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//Table/invertAxis"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference nattable.ecore#//Table/columnAxisProvidersHistory"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference nattable.ecore#//Table/rowAxisProvidersHistory"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference nattable.ecore#//Table/localRowHeaderAxisConfiguration"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference nattable.ecore#//Table/localColumnHeaderAxisConfiguration"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference nattable.ecore#//Table/currentRowAxisProvider"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference nattable.ecore#//Table/currentColumnAxisProvider"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference nattable.ecore#//Table/cells"/>
+ </genClasses>
+ <nestedGenPackages prefix="Nattableconfiguration" basePackage="org.eclipse.papyrus.infra.nattable.model.nattable"
+ disposableProviderFactory="true" ecorePackage="nattable.ecore#//nattableconfiguration">
+ <genEnums typeSafeEnumCompatible="false" ecoreEnum="nattable.ecore#//nattableconfiguration/CellEditorDeclaration">
+ <genEnumLiterals ecoreEnumLiteral="nattable.ecore#//nattableconfiguration/CellEditorDeclaration/COLUMN"/>
+ <genEnumLiterals ecoreEnumLiteral="nattable.ecore#//nattableconfiguration/CellEditorDeclaration/ROW"/>
+ <genEnumLiterals ecoreEnumLiteral="nattable.ecore#//nattableconfiguration/CellEditorDeclaration/CELL"/>
+ </genEnums>
+ <genClasses image="false" ecoreClass="nattable.ecore#//nattableconfiguration/TableNamedElement">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattableconfiguration/TableNamedElement/description"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattableconfiguration/TableNamedElement/name"/>
+ </genClasses>
+ <genClasses ecoreClass="nattable.ecore#//nattableconfiguration/TableConfiguration">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattableconfiguration/TableConfiguration/type"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattableconfiguration/TableConfiguration/iconPath"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference nattable.ecore#//nattableconfiguration/TableConfiguration/creationTester"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattableconfiguration/TableConfiguration/cellEditorDeclaration"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference nattable.ecore#//nattableconfiguration/TableConfiguration/rowHeaderAxisConfiguration"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference nattable.ecore#//nattableconfiguration/TableConfiguration/columnHeaderAxisConfiguration"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference nattable.ecore#//nattableconfiguration/TableConfiguration/columnAxisProviders"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference nattable.ecore#//nattableconfiguration/TableConfiguration/rowAxisProviders"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true"
+ ecoreFeature="ecore:EReference nattable.ecore#//nattableconfiguration/TableConfiguration/defaultRowAxisProvider"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true"
+ ecoreFeature="ecore:EReference nattable.ecore#//nattableconfiguration/TableConfiguration/defaultColumnAxisProvider"/>
+ </genClasses>
+ </nestedGenPackages>
+ <nestedGenPackages prefix="Nattableaxisprovider" basePackage="org.eclipse.papyrus.infra.nattable.model.nattable"
+ disposableProviderFactory="true" ecorePackage="nattable.ecore#//nattableaxisprovider">
+ <genClasses image="false" ecoreClass="nattable.ecore#//nattableaxisprovider/AbstractAxisProvider">
+ <genOperations ecoreOperation="nattable.ecore#//nattableaxisprovider/AbstractAxisProvider/getAxis"/>
+ </genClasses>
+ <genClasses image="false" ecoreClass="nattable.ecore#//nattableaxisprovider/IMasterAxisProvider">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattableaxisprovider/IMasterAxisProvider/disconnectSlave"/>
+ </genClasses>
+ <genClasses image="false" ecoreClass="nattable.ecore#//nattableaxisprovider/ISlaveAxisProvider"/>
+ <genClasses image="false" ecoreClass="nattable.ecore#//nattableaxisprovider/AxisProvider">
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference nattable.ecore#//nattableaxisprovider/AxisProvider/axis"/>
+ </genClasses>
+ <genClasses ecoreClass="nattable.ecore#//nattableaxisprovider/SlaveObjectAxisProvider"/>
+ <genClasses ecoreClass="nattable.ecore#//nattableaxisprovider/MasterObjectAxisProvider"/>
+ </nestedGenPackages>
+ <nestedGenPackages prefix="Nattablelabelprovider" basePackage="org.eclipse.papyrus.infra.nattable.model.nattable"
+ disposableProviderFactory="true" ecorePackage="nattable.ecore#//nattablelabelprovider">
+ <genClasses image="false" ecoreClass="nattable.ecore#//nattablelabelprovider/ILabelProviderConfiguration"/>
+ <genClasses ecoreClass="nattable.ecore#//nattablelabelprovider/FeatureLabelProviderConfiguration">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattablelabelprovider/FeatureLabelProviderConfiguration/displayIsDerived"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattablelabelprovider/FeatureLabelProviderConfiguration/displayType"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattablelabelprovider/FeatureLabelProviderConfiguration/displayMultiplicity"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattablelabelprovider/FeatureLabelProviderConfiguration/displayName"/>
+ </genClasses>
+ <genClasses ecoreClass="nattable.ecore#//nattablelabelprovider/ObjectLabelProviderConfiguration">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattablelabelprovider/ObjectLabelProviderConfiguration/displayIcon"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattablelabelprovider/ObjectLabelProviderConfiguration/displayLabel"/>
+ </genClasses>
+ <genClasses ecoreClass="nattable.ecore#//nattablelabelprovider/OperationLabelProviderConfiguration">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattablelabelprovider/OperationLabelProviderConfiguration/displayType"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattablelabelprovider/OperationLabelProviderConfiguration/displayMultiplicity"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattablelabelprovider/OperationLabelProviderConfiguration/displayName"/>
+ </genClasses>
+ </nestedGenPackages>
+ <nestedGenPackages prefix="Nattableaxisconfiguration" basePackage="org.eclipse.papyrus.infra.nattable.model.nattable"
+ disposableProviderFactory="true" ecorePackage="nattable.ecore#//nattableaxisconfiguration">
+ <genEnums typeSafeEnumCompatible="false" ecoreEnum="nattable.ecore#//nattableaxisconfiguration/AxisIndexStyle">
+ <genEnumLiterals ecoreEnumLiteral="nattable.ecore#//nattableaxisconfiguration/AxisIndexStyle/ALPHABETIC"/>
+ <genEnumLiterals ecoreEnumLiteral="nattable.ecore#//nattableaxisconfiguration/AxisIndexStyle/NUMERIC"/>
+ </genEnums>
+ <genClasses image="false" ecoreClass="nattable.ecore#//nattableaxisconfiguration/AbstractHeaderAxisConfiguration">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattableaxisconfiguration/AbstractHeaderAxisConfiguration/indexStyle"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattableaxisconfiguration/AbstractHeaderAxisConfiguration/displayLabel"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattableaxisconfiguration/AbstractHeaderAxisConfiguration/displayFilter"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattableaxisconfiguration/AbstractHeaderAxisConfiguration/displayIndex"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference nattable.ecore#//nattableaxisconfiguration/AbstractHeaderAxisConfiguration/ownedLabelConfigurations"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference nattable.ecore#//nattableaxisconfiguration/AbstractHeaderAxisConfiguration/ownedAxisConfigurations"/>
+ </genClasses>
+ <genClasses ecoreClass="nattable.ecore#//nattableaxisconfiguration/AxisManagerRepresentation">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattableaxisconfiguration/AxisManagerRepresentation/axisManagerId"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattableaxisconfiguration/AxisManagerRepresentation/labelProviderContext"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true"
+ ecoreFeature="ecore:EReference nattable.ecore#//nattableaxisconfiguration/AxisManagerRepresentation/headerLabelConfiguration"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true"
+ ecoreFeature="ecore:EReference nattable.ecore#//nattableaxisconfiguration/AxisManagerRepresentation/specificAxisConfigurations"/>
+ </genClasses>
+ <genClasses ecoreClass="nattable.ecore#//nattableaxisconfiguration/AxisManagerConfiguration">
+ <genFeatures notify="false" createChild="false" propertySortChoices="true"
+ ecoreFeature="ecore:EReference nattable.ecore#//nattableaxisconfiguration/AxisManagerConfiguration/localHeaderLabelConfiguration"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true"
+ ecoreFeature="ecore:EReference nattable.ecore#//nattableaxisconfiguration/AxisManagerConfiguration/axisManager"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true"
+ ecoreFeature="ecore:EReference nattable.ecore#//nattableaxisconfiguration/AxisManagerConfiguration/localSpecificConfigurations"/>
+ </genClasses>
+ <genClasses ecoreClass="nattable.ecore#//nattableaxisconfiguration/TableHeaderAxisConfiguration">
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference nattable.ecore#//nattableaxisconfiguration/TableHeaderAxisConfiguration/axisManagers"/>
+ </genClasses>
+ <genClasses ecoreClass="nattable.ecore#//nattableaxisconfiguration/LocalTableHeaderAxisConfiguration">
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference nattable.ecore#//nattableaxisconfiguration/LocalTableHeaderAxisConfiguration/axisManagerConfigurations"/>
+ </genClasses>
+ <genClasses image="false" ecoreClass="nattable.ecore#//nattableaxisconfiguration/IAxisConfiguration"/>
+ <genClasses ecoreClass="nattable.ecore#//nattableaxisconfiguration/FeatureAxisConfiguration">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattableaxisconfiguration/FeatureAxisConfiguration/showOnlyCommonFeature"/>
+ </genClasses>
+ <genClasses image="false" ecoreClass="nattable.ecore#//nattableaxisconfiguration/IFillingConfiguration"/>
+ <genClasses ecoreClass="nattable.ecore#//nattableaxisconfiguration/EStructuralFeatureValueFillingConfiguration">
+ <genFeatures notify="false" createChild="false" propertySortChoices="true"
+ ecoreFeature="ecore:EReference nattable.ecore#//nattableaxisconfiguration/EStructuralFeatureValueFillingConfiguration/listenFeature"/>
+ </genClasses>
+ <genClasses ecoreClass="nattable.ecore#//nattableaxisconfiguration/IPasteConfiguration">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattableaxisconfiguration/IPasteConfiguration/postActions"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattableaxisconfiguration/IPasteConfiguration/detachedMode"/>
+ </genClasses>
+ <genClasses ecoreClass="nattable.ecore#//nattableaxisconfiguration/PasteEObjectConfiguration">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattableaxisconfiguration/PasteEObjectConfiguration/pastedElementId"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true"
+ ecoreFeature="ecore:EReference nattable.ecore#//nattableaxisconfiguration/PasteEObjectConfiguration/pasteElementContainementFeature"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EReference nattable.ecore#//nattableaxisconfiguration/PasteEObjectConfiguration/axisIdentifier"/>
+ </genClasses>
+ <genClasses ecoreClass="nattable.ecore#//nattableaxisconfiguration/TreeFillingConfiguration">
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference nattable.ecore#//nattableaxisconfiguration/TreeFillingConfiguration/axisUsedAsAxisProvider"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true"
+ ecoreFeature="ecore:EReference nattable.ecore#//nattableaxisconfiguration/TreeFillingConfiguration/pasteConfiguration"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattableaxisconfiguration/TreeFillingConfiguration/depth"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true"
+ ecoreFeature="ecore:EReference nattable.ecore#//nattableaxisconfiguration/TreeFillingConfiguration/labelProvider"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattableaxisconfiguration/TreeFillingConfiguration/labelProviderContext"/>
+ </genClasses>
+ </nestedGenPackages>
+ <nestedGenPackages prefix="Nattabletester" basePackage="org.eclipse.papyrus.infra.nattable.model.nattable"
+ disposableProviderFactory="true" ecorePackage="nattable.ecore#//nattabletester">
+ <genClasses image="false" ecoreClass="nattable.ecore#//nattabletester/AbstractTableTester">
+ <genOperations ecoreOperation="nattable.ecore#//nattabletester/AbstractTableTester/getTester"/>
+ </genClasses>
+ <genClasses ecoreClass="nattable.ecore#//nattabletester/JavaTableTester">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattabletester/JavaTableTester/tester"/>
+ </genClasses>
+ </nestedGenPackages>
+ <nestedGenPackages prefix="Nattableaxis" basePackage="org.eclipse.papyrus.infra.nattable.model.nattable"
+ disposableProviderFactory="true" ecorePackage="nattable.ecore#//nattableaxis">
+ <genClasses image="false" ecoreClass="nattable.ecore#//nattableaxis/IAxis">
+ <genFeatures notify="false" createChild="false" propertySortChoices="true"
+ ecoreFeature="ecore:EReference nattable.ecore#//nattableaxis/IAxis/manager"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattableaxis/IAxis/alias"/>
+ <genOperations ecoreOperation="nattable.ecore#//nattableaxis/IAxis/getElement"/>
+ <genOperations ecoreOperation="nattable.ecore#//nattableaxis/IAxis/getLocalLabelConfiguration"/>
+ </genClasses>
+ <genClasses image="false" ecoreClass="nattable.ecore#//nattableaxis/ITreeItemAxis">
+ <genFeatures notify="false" createChild="false" propertySortChoices="true"
+ ecoreFeature="ecore:EReference nattable.ecore#//nattableaxis/ITreeItemAxis/parent"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattableaxis/ITreeItemAxis/expanded"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true"
+ ecoreFeature="ecore:EReference nattable.ecore#//nattableaxis/ITreeItemAxis/children"/>
+ </genClasses>
+ <genClasses image="false" ecoreClass="nattable.ecore#//nattableaxis/IdAxis">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattableaxis/IdAxis/element"/>
+ </genClasses>
+ <genClasses ecoreClass="nattable.ecore#//nattableaxis/IdTreeItemAxis"/>
+ <genClasses ecoreClass="nattable.ecore#//nattableaxis/EObjectAxis">
+ <genFeatures notify="false" createChild="false" propertySortChoices="true"
+ ecoreFeature="ecore:EReference nattable.ecore#//nattableaxis/EObjectAxis/element"/>
+ </genClasses>
+ <genClasses ecoreClass="nattable.ecore#//nattableaxis/EObjectTreeItemAxis"/>
+ <genClasses image="false" ecoreClass="nattable.ecore#//nattableaxis/FeatureAxis">
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference nattable.ecore#//nattableaxis/FeatureAxis/localLabelConfiguration"/>
+ </genClasses>
+ <genClasses image="false" ecoreClass="nattable.ecore#//nattableaxis/OperationAxis">
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference nattable.ecore#//nattableaxis/OperationAxis/localLabelConfiguration"/>
+ </genClasses>
+ <genClasses image="false" ecoreClass="nattable.ecore#//nattableaxis/FeatureTreeItemAxis"/>
+ <genClasses image="false" ecoreClass="nattable.ecore#//nattableaxis/OperationTreeItemAxis"/>
+ <genClasses image="false" ecoreClass="nattable.ecore#//nattableaxis/ObjectAxis">
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference nattable.ecore#//nattableaxis/ObjectAxis/localLabelConfiguration"/>
+ </genClasses>
+ <genClasses image="false" ecoreClass="nattable.ecore#//nattableaxis/ObjectTreeItemAxis"/>
+ <genClasses ecoreClass="nattable.ecore#//nattableaxis/FeatureIdAxis"/>
+ <genClasses ecoreClass="nattable.ecore#//nattableaxis/FeatureIdTreeItemAxis"/>
+ <genClasses ecoreClass="nattable.ecore#//nattableaxis/EStructuralFeatureAxis">
+ <genFeatures notify="false" createChild="false" propertySortChoices="true"
+ ecoreFeature="ecore:EReference nattable.ecore#//nattableaxis/EStructuralFeatureAxis/element"/>
+ </genClasses>
+ <genClasses ecoreClass="nattable.ecore#//nattableaxis/EOperationAxis">
+ <genFeatures notify="false" createChild="false" propertySortChoices="true"
+ ecoreFeature="ecore:EReference nattable.ecore#//nattableaxis/EOperationAxis/element"/>
+ </genClasses>
+ <genClasses ecoreClass="nattable.ecore#//nattableaxis/EStructuralFeatureTreeItemAxis"/>
+ <genClasses ecoreClass="nattable.ecore#//nattableaxis/EOperationTreeItemAxis"/>
+ <genClasses ecoreClass="nattable.ecore#//nattableaxis/ObjectIdAxis"/>
+ <genClasses ecoreClass="nattable.ecore#//nattableaxis/ObjectIdTreeItemAxis"/>
+ <genClasses ecoreClass="nattable.ecore#//nattableaxis/AxisGroup">
+ <genFeatures notify="false" createChild="false" propertySortChoices="true"
+ ecoreFeature="ecore:EReference nattable.ecore#//nattableaxis/AxisGroup/groupedAxis"/>
+ </genClasses>
+ </nestedGenPackages>
+ <nestedGenPackages prefix="Nattablecell" basePackage="org.eclipse.papyrus.infra.nattable.model.nattable"
+ disposableProviderFactory="true" ecorePackage="nattable.ecore#//nattablecell">
+ <genClasses ecoreClass="nattable.ecore#//nattablecell/Cell">
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference nattable.ecore#//nattablecell/Cell/columnWrapper"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference nattable.ecore#//nattablecell/Cell/rowWrapper"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference nattable.ecore#//nattablecell/Cell/problems"/>
+ </genClasses>
+ <genClasses image="false" ecoreClass="nattable.ecore#//nattablecell/ICellAxisWrapper">
+ <genOperations ecoreOperation="nattable.ecore#//nattablecell/ICellAxisWrapper/getElement"/>
+ </genClasses>
+ <genClasses ecoreClass="nattable.ecore#//nattablecell/EObjectAxisWrapper">
+ <genFeatures notify="false" createChild="false" propertySortChoices="true"
+ ecoreFeature="ecore:EReference nattable.ecore#//nattablecell/EObjectAxisWrapper/element"/>
+ </genClasses>
+ <genClasses ecoreClass="nattable.ecore#//nattablecell/IdAxisWrapper">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattablecell/IdAxisWrapper/element"/>
+ </genClasses>
+ </nestedGenPackages>
+ <nestedGenPackages prefix="Nattableproblem" basePackage="org.eclipse.papyrus.infra.nattable.model.nattable"
+ disposableProviderFactory="true" ecorePackage="nattable.ecore#//nattableproblem">
+ <genClasses ecoreClass="nattable.ecore#//nattableproblem/Problem"/>
+ <genClasses ecoreClass="nattable.ecore#//nattableproblem/StringResolutionProblem">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattableproblem/StringResolutionProblem/valueAsString"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattableproblem/StringResolutionProblem/unresolvedString"/>
+ </genClasses>
+ </nestedGenPackages>
+ <nestedGenPackages prefix="Nattablestyle" basePackage="org.eclipse.papyrus.infra.nattable.model.nattable"
+ disposableProviderFactory="true" ecorePackage="nattable.ecore#//nattablestyle">
+ <genEnums typeSafeEnumCompatible="false" ecoreEnum="nattable.ecore#//nattablestyle/CellTextAlignment">
+ <genEnumLiterals ecoreEnumLiteral="nattable.ecore#//nattablestyle/CellTextAlignment/TOP_LEFT"/>
+ <genEnumLiterals ecoreEnumLiteral="nattable.ecore#//nattablestyle/CellTextAlignment/TOP_CENTER"/>
+ <genEnumLiterals ecoreEnumLiteral="nattable.ecore#//nattablestyle/CellTextAlignment/TOP_RIGHT"/>
+ <genEnumLiterals ecoreEnumLiteral="nattable.ecore#//nattablestyle/CellTextAlignment/MIDDLE_LEFT"/>
+ <genEnumLiterals ecoreEnumLiteral="nattable.ecore#//nattablestyle/CellTextAlignment/MIDDLE_CENTER"/>
+ <genEnumLiterals ecoreEnumLiteral="nattable.ecore#//nattablestyle/CellTextAlignment/MIDDLE_RIGHT"/>
+ <genEnumLiterals ecoreEnumLiteral="nattable.ecore#//nattablestyle/CellTextAlignment/BOTTOM_LEFT"/>
+ <genEnumLiterals ecoreEnumLiteral="nattable.ecore#//nattablestyle/CellTextAlignment/BOTTOM_CENTER"/>
+ <genEnumLiterals ecoreEnumLiteral="nattable.ecore#//nattablestyle/CellTextAlignment/BOTTOM_RIGHT"/>
+ </genEnums>
+ <genEnums typeSafeEnumCompatible="false" ecoreEnum="nattable.ecore#//nattablestyle/DisplayStyle">
+ <genEnumLiterals ecoreEnumLiteral="nattable.ecore#//nattablestyle/DisplayStyle/NORMAL"/>
+ <genEnumLiterals ecoreEnumLiteral="nattable.ecore#//nattablestyle/DisplayStyle/HIERARCHIC_SINGLE_TREE_COLUMN"/>
+ <genEnumLiterals ecoreEnumLiteral="nattable.ecore#//nattablestyle/DisplayStyle/HIERARCHIC_MULTI_TREE_COLUMN"/>
+ </genEnums>
+ <genClasses image="false" ecoreClass="nattable.ecore#//nattablestyle/Style"/>
+ <genClasses ecoreClass="nattable.ecore#//nattablestyle/NamedStyle">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattablestyle/NamedStyle/name"/>
+ </genClasses>
+ <genClasses ecoreClass="nattable.ecore#//nattablestyle/FontStyle">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattablestyle/FontStyle/fontColor"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattablestyle/FontStyle/fontName"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattablestyle/FontStyle/fontHeight"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattablestyle/FontStyle/bold"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattablestyle/FontStyle/italic"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattablestyle/FontStyle/underline"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattablestyle/FontStyle/strikeThrough"/>
+ </genClasses>
+ <genClasses ecoreClass="nattable.ecore#//nattablestyle/CellTextStyle">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattablestyle/CellTextStyle/alignment"/>
+ </genClasses>
+ <genClasses ecoreClass="nattable.ecore#//nattablestyle/IntValueStyle">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattablestyle/IntValueStyle/intValue"/>
+ </genClasses>
+ <genClasses ecoreClass="nattable.ecore#//nattablestyle/IntListValueStyle">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattablestyle/IntListValueStyle/intListValue"/>
+ </genClasses>
+ <genClasses ecoreClass="nattable.ecore#//nattablestyle/BooleanValueStyle">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattablestyle/BooleanValueStyle/booleanValue"/>
+ </genClasses>
+ <genClasses ecoreClass="nattable.ecore#//nattablestyle/BooleanListValueStyle">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattablestyle/BooleanListValueStyle/booleanListValue"/>
+ </genClasses>
+ <genClasses ecoreClass="nattable.ecore#//nattablestyle/DoubleValueStyle">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattablestyle/DoubleValueStyle/doubleValue"/>
+ </genClasses>
+ <genClasses ecoreClass="nattable.ecore#//nattablestyle/DoubleListValueStyle">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattablestyle/DoubleListValueStyle/doubleListValue"/>
+ </genClasses>
+ <genClasses ecoreClass="nattable.ecore#//nattablestyle/StringValueStyle">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattablestyle/StringValueStyle/stringValue"/>
+ </genClasses>
+ <genClasses ecoreClass="nattable.ecore#//nattablestyle/StringListValueStyle">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattablestyle/StringListValueStyle/stringListValue"/>
+ </genClasses>
+ <genClasses image="false" ecoreClass="nattable.ecore#//nattablestyle/StyledElement">
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference nattable.ecore#//nattablestyle/StyledElement/styles"/>
+ <genOperations ecoreOperation="nattable.ecore#//nattablestyle/StyledElement/getNamedStyle">
+ <genParameters ecoreParameter="nattable.ecore#//nattablestyle/StyledElement/getNamedStyle/eClass"/>
+ <genParameters ecoreParameter="nattable.ecore#//nattablestyle/StyledElement/getNamedStyle/name"/>
+ </genOperations>
+ <genOperations ecoreOperation="nattable.ecore#//nattablestyle/StyledElement/getStyle">
+ <genParameters ecoreParameter="nattable.ecore#//nattablestyle/StyledElement/getStyle/eClass"/>
+ </genOperations>
+ <genOperations ecoreOperation="nattable.ecore#//nattablestyle/StyledElement/createStyle">
+ <genParameters ecoreParameter="nattable.ecore#//nattablestyle/StyledElement/createStyle/eClass"/>
+ </genOperations>
+ </genClasses>
+ <genClasses ecoreClass="nattable.ecore#//nattablestyle/TableDisplayStyle">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nattable.ecore#//nattablestyle/TableDisplayStyle/displayStyle"/>
+ </genClasses>
+ <genClasses ecoreClass="nattable.ecore#//nattablestyle/EObjectValueStyle">
+ <genFeatures notify="false" createChild="false" propertySortChoices="true"
+ ecoreFeature="ecore:EReference nattable.ecore#//nattablestyle/EObjectValueStyle/eObjectValue"/>
+ </genClasses>
+ <genClasses ecoreClass="nattable.ecore#//nattablestyle/EObjectListValueStyle">
+ <genFeatures notify="false" createChild="false" propertySortChoices="true"
+ ecoreFeature="ecore:EReference nattable.ecore#//nattablestyle/EObjectListValueStyle/eObjectValue"/>
+ </genClasses>
+ </nestedGenPackages>
+ </genPackages>
+</genmodel:GenModel>
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/NattableaxisconfigurationPackage.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/NattableaxisconfigurationPackage.java
index f24a8287b12..ec7472c9ceb 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/NattableaxisconfigurationPackage.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/NattableaxisconfigurationPackage.java
@@ -1,2205 +1,2233 @@
-/**
- * Copyright (c) 2013 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- */
-package org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration;
-
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EEnum;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EReference;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattablestyle.NattablestylePackage;
-
-/**
- * <!-- begin-user-doc -->
- * The <b>Package</b> for the model.
- * It contains accessors for the meta objects to represent
- * <ul>
- * <li>each class,</li>
- * <li>each feature of each class,</li>
- * <li>each operation of each class,</li>
- * <li>each enum,</li>
- * <li>and each data type</li>
- * </ul>
- * <!-- end-user-doc -->
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.NattableaxisconfigurationFactory
- * @model kind="package"
- * annotation="http://www.eclipse.org/emf/2002/Ecore invocationDelegates='http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot' settingDelegates='http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot' validationDelegates='http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot'"
- * @generated
- */
-public interface NattableaxisconfigurationPackage extends EPackage {
-
- /**
- * The package name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- String eNAME = "nattableaxisconfiguration"; //$NON-NLS-1$
-
- /**
- * The package namespace URI.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- String eNS_URI = "http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration"; //$NON-NLS-1$
-
- /**
- * The package namespace name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- String eNS_PREFIX = "nattableaxisconfiguration"; //$NON-NLS-1$
-
- /**
- * The singleton instance of the package.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- NattableaxisconfigurationPackage eINSTANCE = org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.NattableaxisconfigurationPackageImpl.init();
-
- /**
- * The meta object id for the '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.AbstractHeaderAxisConfigurationImpl <em>Abstract Header Axis Configuration</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.AbstractHeaderAxisConfigurationImpl
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.NattableaxisconfigurationPackageImpl#getAbstractHeaderAxisConfiguration()
- * @generated
- */
- int ABSTRACT_HEADER_AXIS_CONFIGURATION = 0;
-
- /**
- * The feature id for the '<em><b>EAnnotations</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int ABSTRACT_HEADER_AXIS_CONFIGURATION__EANNOTATIONS = NattablestylePackage.STYLED_ELEMENT__EANNOTATIONS;
-
- /**
- * The feature id for the '<em><b>Styles</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int ABSTRACT_HEADER_AXIS_CONFIGURATION__STYLES = NattablestylePackage.STYLED_ELEMENT__STYLES;
-
- /**
- * The feature id for the '<em><b>Index Style</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int ABSTRACT_HEADER_AXIS_CONFIGURATION__INDEX_STYLE = NattablestylePackage.STYLED_ELEMENT_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Display Label</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int ABSTRACT_HEADER_AXIS_CONFIGURATION__DISPLAY_LABEL = NattablestylePackage.STYLED_ELEMENT_FEATURE_COUNT + 1;
-
- /**
- * The feature id for the '<em><b>Display Filter</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int ABSTRACT_HEADER_AXIS_CONFIGURATION__DISPLAY_FILTER = NattablestylePackage.STYLED_ELEMENT_FEATURE_COUNT + 2;
-
- /**
- * The feature id for the '<em><b>Display Index</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int ABSTRACT_HEADER_AXIS_CONFIGURATION__DISPLAY_INDEX = NattablestylePackage.STYLED_ELEMENT_FEATURE_COUNT + 3;
-
- /**
- * The feature id for the '<em><b>Owned Label Configurations</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int ABSTRACT_HEADER_AXIS_CONFIGURATION__OWNED_LABEL_CONFIGURATIONS = NattablestylePackage.STYLED_ELEMENT_FEATURE_COUNT + 4;
-
- /**
- * The feature id for the '<em><b>Owned Axis Configurations</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int ABSTRACT_HEADER_AXIS_CONFIGURATION__OWNED_AXIS_CONFIGURATIONS = NattablestylePackage.STYLED_ELEMENT_FEATURE_COUNT + 5;
-
- /**
- * The number of structural features of the '<em>Abstract Header Axis Configuration</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int ABSTRACT_HEADER_AXIS_CONFIGURATION_FEATURE_COUNT = NattablestylePackage.STYLED_ELEMENT_FEATURE_COUNT + 6;
-
- /**
- * The operation id for the '<em>Get EAnnotation</em>' operation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int ABSTRACT_HEADER_AXIS_CONFIGURATION___GET_EANNOTATION__STRING = NattablestylePackage.STYLED_ELEMENT___GET_EANNOTATION__STRING;
-
- /**
- * The operation id for the '<em>Get Named Style</em>' operation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int ABSTRACT_HEADER_AXIS_CONFIGURATION___GET_NAMED_STYLE__ECLASS_STRING = NattablestylePackage.STYLED_ELEMENT___GET_NAMED_STYLE__ECLASS_STRING;
-
- /**
- * The operation id for the '<em>Get Style</em>' operation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int ABSTRACT_HEADER_AXIS_CONFIGURATION___GET_STYLE__ECLASS = NattablestylePackage.STYLED_ELEMENT___GET_STYLE__ECLASS;
-
- /**
- * The operation id for the '<em>Create Style</em>' operation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int ABSTRACT_HEADER_AXIS_CONFIGURATION___CREATE_STYLE__ECLASS = NattablestylePackage.STYLED_ELEMENT___CREATE_STYLE__ECLASS;
-
- /**
- * The number of operations of the '<em>Abstract Header Axis Configuration</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int ABSTRACT_HEADER_AXIS_CONFIGURATION_OPERATION_COUNT = NattablestylePackage.STYLED_ELEMENT_OPERATION_COUNT + 0;
-
- /**
- * The meta object id for the '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.AxisManagerRepresentationImpl <em>Axis Manager Representation</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.AxisManagerRepresentationImpl
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.NattableaxisconfigurationPackageImpl#getAxisManagerRepresentation()
- * @generated
- */
- int AXIS_MANAGER_REPRESENTATION = 1;
-
- /**
- * The feature id for the '<em><b>EAnnotations</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int AXIS_MANAGER_REPRESENTATION__EANNOTATIONS = NattablestylePackage.STYLED_ELEMENT__EANNOTATIONS;
-
- /**
- * The feature id for the '<em><b>Styles</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int AXIS_MANAGER_REPRESENTATION__STYLES = NattablestylePackage.STYLED_ELEMENT__STYLES;
-
- /**
- * The feature id for the '<em><b>Axis Manager Id</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int AXIS_MANAGER_REPRESENTATION__AXIS_MANAGER_ID = NattablestylePackage.STYLED_ELEMENT_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Label Provider Context</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int AXIS_MANAGER_REPRESENTATION__LABEL_PROVIDER_CONTEXT = NattablestylePackage.STYLED_ELEMENT_FEATURE_COUNT + 1;
-
- /**
- * The feature id for the '<em><b>Header Label Configuration</b></em>' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int AXIS_MANAGER_REPRESENTATION__HEADER_LABEL_CONFIGURATION = NattablestylePackage.STYLED_ELEMENT_FEATURE_COUNT + 2;
-
- /**
- * The feature id for the '<em><b>Specific Axis Configurations</b></em>' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int AXIS_MANAGER_REPRESENTATION__SPECIFIC_AXIS_CONFIGURATIONS = NattablestylePackage.STYLED_ELEMENT_FEATURE_COUNT + 3;
-
- /**
- * The number of structural features of the '<em>Axis Manager Representation</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int AXIS_MANAGER_REPRESENTATION_FEATURE_COUNT = NattablestylePackage.STYLED_ELEMENT_FEATURE_COUNT + 4;
-
- /**
- * The operation id for the '<em>Get EAnnotation</em>' operation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int AXIS_MANAGER_REPRESENTATION___GET_EANNOTATION__STRING = NattablestylePackage.STYLED_ELEMENT___GET_EANNOTATION__STRING;
-
- /**
- * The operation id for the '<em>Get Named Style</em>' operation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int AXIS_MANAGER_REPRESENTATION___GET_NAMED_STYLE__ECLASS_STRING = NattablestylePackage.STYLED_ELEMENT___GET_NAMED_STYLE__ECLASS_STRING;
-
- /**
- * The operation id for the '<em>Get Style</em>' operation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int AXIS_MANAGER_REPRESENTATION___GET_STYLE__ECLASS = NattablestylePackage.STYLED_ELEMENT___GET_STYLE__ECLASS;
-
- /**
- * The operation id for the '<em>Create Style</em>' operation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int AXIS_MANAGER_REPRESENTATION___CREATE_STYLE__ECLASS = NattablestylePackage.STYLED_ELEMENT___CREATE_STYLE__ECLASS;
-
- /**
- * The number of operations of the '<em>Axis Manager Representation</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int AXIS_MANAGER_REPRESENTATION_OPERATION_COUNT = NattablestylePackage.STYLED_ELEMENT_OPERATION_COUNT + 0;
-
- /**
- * The meta object id for the '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.AxisManagerConfigurationImpl <em>Axis Manager Configuration</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.AxisManagerConfigurationImpl
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.NattableaxisconfigurationPackageImpl#getAxisManagerConfiguration()
- * @generated
- */
- int AXIS_MANAGER_CONFIGURATION = 2;
-
- /**
- * The feature id for the '<em><b>EAnnotations</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int AXIS_MANAGER_CONFIGURATION__EANNOTATIONS = NattablestylePackage.STYLED_ELEMENT__EANNOTATIONS;
-
- /**
- * The feature id for the '<em><b>Styles</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int AXIS_MANAGER_CONFIGURATION__STYLES = NattablestylePackage.STYLED_ELEMENT__STYLES;
-
- /**
- * The feature id for the '<em><b>Local Header Label Configuration</b></em>' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int AXIS_MANAGER_CONFIGURATION__LOCAL_HEADER_LABEL_CONFIGURATION = NattablestylePackage.STYLED_ELEMENT_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Axis Manager</b></em>' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int AXIS_MANAGER_CONFIGURATION__AXIS_MANAGER = NattablestylePackage.STYLED_ELEMENT_FEATURE_COUNT + 1;
-
- /**
- * The feature id for the '<em><b>Local Specific Configurations</b></em>' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int AXIS_MANAGER_CONFIGURATION__LOCAL_SPECIFIC_CONFIGURATIONS = NattablestylePackage.STYLED_ELEMENT_FEATURE_COUNT + 2;
-
- /**
- * The number of structural features of the '<em>Axis Manager Configuration</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int AXIS_MANAGER_CONFIGURATION_FEATURE_COUNT = NattablestylePackage.STYLED_ELEMENT_FEATURE_COUNT + 3;
-
- /**
- * The operation id for the '<em>Get EAnnotation</em>' operation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int AXIS_MANAGER_CONFIGURATION___GET_EANNOTATION__STRING = NattablestylePackage.STYLED_ELEMENT___GET_EANNOTATION__STRING;
-
- /**
- * The operation id for the '<em>Get Named Style</em>' operation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int AXIS_MANAGER_CONFIGURATION___GET_NAMED_STYLE__ECLASS_STRING = NattablestylePackage.STYLED_ELEMENT___GET_NAMED_STYLE__ECLASS_STRING;
-
- /**
- * The operation id for the '<em>Get Style</em>' operation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int AXIS_MANAGER_CONFIGURATION___GET_STYLE__ECLASS = NattablestylePackage.STYLED_ELEMENT___GET_STYLE__ECLASS;
-
- /**
- * The operation id for the '<em>Create Style</em>' operation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int AXIS_MANAGER_CONFIGURATION___CREATE_STYLE__ECLASS = NattablestylePackage.STYLED_ELEMENT___CREATE_STYLE__ECLASS;
-
- /**
- * The number of operations of the '<em>Axis Manager Configuration</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int AXIS_MANAGER_CONFIGURATION_OPERATION_COUNT = NattablestylePackage.STYLED_ELEMENT_OPERATION_COUNT + 0;
-
- /**
- * The meta object id for the '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.TableHeaderAxisConfigurationImpl <em>Table Header Axis Configuration</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.TableHeaderAxisConfigurationImpl
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.NattableaxisconfigurationPackageImpl#getTableHeaderAxisConfiguration()
- * @generated
- */
- int TABLE_HEADER_AXIS_CONFIGURATION = 3;
-
- /**
- * The feature id for the '<em><b>EAnnotations</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int TABLE_HEADER_AXIS_CONFIGURATION__EANNOTATIONS = ABSTRACT_HEADER_AXIS_CONFIGURATION__EANNOTATIONS;
-
- /**
- * The feature id for the '<em><b>Styles</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int TABLE_HEADER_AXIS_CONFIGURATION__STYLES = ABSTRACT_HEADER_AXIS_CONFIGURATION__STYLES;
-
- /**
- * The feature id for the '<em><b>Index Style</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int TABLE_HEADER_AXIS_CONFIGURATION__INDEX_STYLE = ABSTRACT_HEADER_AXIS_CONFIGURATION__INDEX_STYLE;
-
- /**
- * The feature id for the '<em><b>Display Label</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int TABLE_HEADER_AXIS_CONFIGURATION__DISPLAY_LABEL = ABSTRACT_HEADER_AXIS_CONFIGURATION__DISPLAY_LABEL;
-
- /**
- * The feature id for the '<em><b>Display Filter</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int TABLE_HEADER_AXIS_CONFIGURATION__DISPLAY_FILTER = ABSTRACT_HEADER_AXIS_CONFIGURATION__DISPLAY_FILTER;
-
- /**
- * The feature id for the '<em><b>Display Index</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int TABLE_HEADER_AXIS_CONFIGURATION__DISPLAY_INDEX = ABSTRACT_HEADER_AXIS_CONFIGURATION__DISPLAY_INDEX;
-
- /**
- * The feature id for the '<em><b>Owned Label Configurations</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int TABLE_HEADER_AXIS_CONFIGURATION__OWNED_LABEL_CONFIGURATIONS = ABSTRACT_HEADER_AXIS_CONFIGURATION__OWNED_LABEL_CONFIGURATIONS;
-
- /**
- * The feature id for the '<em><b>Owned Axis Configurations</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int TABLE_HEADER_AXIS_CONFIGURATION__OWNED_AXIS_CONFIGURATIONS = ABSTRACT_HEADER_AXIS_CONFIGURATION__OWNED_AXIS_CONFIGURATIONS;
-
- /**
- * The feature id for the '<em><b>Axis Managers</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int TABLE_HEADER_AXIS_CONFIGURATION__AXIS_MANAGERS = ABSTRACT_HEADER_AXIS_CONFIGURATION_FEATURE_COUNT + 0;
-
- /**
- * The number of structural features of the '<em>Table Header Axis Configuration</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int TABLE_HEADER_AXIS_CONFIGURATION_FEATURE_COUNT = ABSTRACT_HEADER_AXIS_CONFIGURATION_FEATURE_COUNT + 1;
-
- /**
- * The operation id for the '<em>Get EAnnotation</em>' operation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int TABLE_HEADER_AXIS_CONFIGURATION___GET_EANNOTATION__STRING = ABSTRACT_HEADER_AXIS_CONFIGURATION___GET_EANNOTATION__STRING;
-
- /**
- * The operation id for the '<em>Get Named Style</em>' operation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int TABLE_HEADER_AXIS_CONFIGURATION___GET_NAMED_STYLE__ECLASS_STRING = ABSTRACT_HEADER_AXIS_CONFIGURATION___GET_NAMED_STYLE__ECLASS_STRING;
-
- /**
- * The operation id for the '<em>Get Style</em>' operation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int TABLE_HEADER_AXIS_CONFIGURATION___GET_STYLE__ECLASS = ABSTRACT_HEADER_AXIS_CONFIGURATION___GET_STYLE__ECLASS;
-
- /**
- * The operation id for the '<em>Create Style</em>' operation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int TABLE_HEADER_AXIS_CONFIGURATION___CREATE_STYLE__ECLASS = ABSTRACT_HEADER_AXIS_CONFIGURATION___CREATE_STYLE__ECLASS;
-
- /**
- * The number of operations of the '<em>Table Header Axis Configuration</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int TABLE_HEADER_AXIS_CONFIGURATION_OPERATION_COUNT = ABSTRACT_HEADER_AXIS_CONFIGURATION_OPERATION_COUNT + 0;
-
- /**
- * The meta object id for the '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.LocalTableHeaderAxisConfigurationImpl <em>Local Table Header Axis Configuration</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.LocalTableHeaderAxisConfigurationImpl
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.NattableaxisconfigurationPackageImpl#getLocalTableHeaderAxisConfiguration()
- * @generated
- */
- int LOCAL_TABLE_HEADER_AXIS_CONFIGURATION = 4;
-
- /**
- * The feature id for the '<em><b>EAnnotations</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int LOCAL_TABLE_HEADER_AXIS_CONFIGURATION__EANNOTATIONS = ABSTRACT_HEADER_AXIS_CONFIGURATION__EANNOTATIONS;
-
- /**
- * The feature id for the '<em><b>Styles</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int LOCAL_TABLE_HEADER_AXIS_CONFIGURATION__STYLES = ABSTRACT_HEADER_AXIS_CONFIGURATION__STYLES;
-
- /**
- * The feature id for the '<em><b>Index Style</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int LOCAL_TABLE_HEADER_AXIS_CONFIGURATION__INDEX_STYLE = ABSTRACT_HEADER_AXIS_CONFIGURATION__INDEX_STYLE;
-
- /**
- * The feature id for the '<em><b>Display Label</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int LOCAL_TABLE_HEADER_AXIS_CONFIGURATION__DISPLAY_LABEL = ABSTRACT_HEADER_AXIS_CONFIGURATION__DISPLAY_LABEL;
-
- /**
- * The feature id for the '<em><b>Display Filter</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int LOCAL_TABLE_HEADER_AXIS_CONFIGURATION__DISPLAY_FILTER = ABSTRACT_HEADER_AXIS_CONFIGURATION__DISPLAY_FILTER;
-
- /**
- * The feature id for the '<em><b>Display Index</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int LOCAL_TABLE_HEADER_AXIS_CONFIGURATION__DISPLAY_INDEX = ABSTRACT_HEADER_AXIS_CONFIGURATION__DISPLAY_INDEX;
-
- /**
- * The feature id for the '<em><b>Owned Label Configurations</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int LOCAL_TABLE_HEADER_AXIS_CONFIGURATION__OWNED_LABEL_CONFIGURATIONS = ABSTRACT_HEADER_AXIS_CONFIGURATION__OWNED_LABEL_CONFIGURATIONS;
-
- /**
- * The feature id for the '<em><b>Owned Axis Configurations</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int LOCAL_TABLE_HEADER_AXIS_CONFIGURATION__OWNED_AXIS_CONFIGURATIONS = ABSTRACT_HEADER_AXIS_CONFIGURATION__OWNED_AXIS_CONFIGURATIONS;
-
- /**
- * The feature id for the '<em><b>Axis Manager Configurations</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int LOCAL_TABLE_HEADER_AXIS_CONFIGURATION__AXIS_MANAGER_CONFIGURATIONS = ABSTRACT_HEADER_AXIS_CONFIGURATION_FEATURE_COUNT + 0;
-
- /**
- * The number of structural features of the '<em>Local Table Header Axis Configuration</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int LOCAL_TABLE_HEADER_AXIS_CONFIGURATION_FEATURE_COUNT = ABSTRACT_HEADER_AXIS_CONFIGURATION_FEATURE_COUNT + 1;
-
- /**
- * The operation id for the '<em>Get EAnnotation</em>' operation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int LOCAL_TABLE_HEADER_AXIS_CONFIGURATION___GET_EANNOTATION__STRING = ABSTRACT_HEADER_AXIS_CONFIGURATION___GET_EANNOTATION__STRING;
-
- /**
- * The operation id for the '<em>Get Named Style</em>' operation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int LOCAL_TABLE_HEADER_AXIS_CONFIGURATION___GET_NAMED_STYLE__ECLASS_STRING = ABSTRACT_HEADER_AXIS_CONFIGURATION___GET_NAMED_STYLE__ECLASS_STRING;
-
- /**
- * The operation id for the '<em>Get Style</em>' operation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int LOCAL_TABLE_HEADER_AXIS_CONFIGURATION___GET_STYLE__ECLASS = ABSTRACT_HEADER_AXIS_CONFIGURATION___GET_STYLE__ECLASS;
-
- /**
- * The operation id for the '<em>Create Style</em>' operation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int LOCAL_TABLE_HEADER_AXIS_CONFIGURATION___CREATE_STYLE__ECLASS = ABSTRACT_HEADER_AXIS_CONFIGURATION___CREATE_STYLE__ECLASS;
-
- /**
- * The number of operations of the '<em>Local Table Header Axis Configuration</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int LOCAL_TABLE_HEADER_AXIS_CONFIGURATION_OPERATION_COUNT = ABSTRACT_HEADER_AXIS_CONFIGURATION_OPERATION_COUNT + 0;
-
- /**
- * The meta object id for the '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.IAxisConfiguration <em>IAxis Configuration</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.IAxisConfiguration
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.NattableaxisconfigurationPackageImpl#getIAxisConfiguration()
- * @generated
- */
- int IAXIS_CONFIGURATION = 5;
-
- /**
- * The feature id for the '<em><b>EAnnotations</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int IAXIS_CONFIGURATION__EANNOTATIONS = NattablestylePackage.STYLED_ELEMENT__EANNOTATIONS;
-
- /**
- * The feature id for the '<em><b>Styles</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int IAXIS_CONFIGURATION__STYLES = NattablestylePackage.STYLED_ELEMENT__STYLES;
-
- /**
- * The number of structural features of the '<em>IAxis Configuration</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int IAXIS_CONFIGURATION_FEATURE_COUNT = NattablestylePackage.STYLED_ELEMENT_FEATURE_COUNT + 0;
-
- /**
- * The operation id for the '<em>Get EAnnotation</em>' operation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int IAXIS_CONFIGURATION___GET_EANNOTATION__STRING = NattablestylePackage.STYLED_ELEMENT___GET_EANNOTATION__STRING;
-
- /**
- * The operation id for the '<em>Get Named Style</em>' operation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int IAXIS_CONFIGURATION___GET_NAMED_STYLE__ECLASS_STRING = NattablestylePackage.STYLED_ELEMENT___GET_NAMED_STYLE__ECLASS_STRING;
-
- /**
- * The operation id for the '<em>Get Style</em>' operation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int IAXIS_CONFIGURATION___GET_STYLE__ECLASS = NattablestylePackage.STYLED_ELEMENT___GET_STYLE__ECLASS;
-
- /**
- * The operation id for the '<em>Create Style</em>' operation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int IAXIS_CONFIGURATION___CREATE_STYLE__ECLASS = NattablestylePackage.STYLED_ELEMENT___CREATE_STYLE__ECLASS;
-
- /**
- * The number of operations of the '<em>IAxis Configuration</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int IAXIS_CONFIGURATION_OPERATION_COUNT = NattablestylePackage.STYLED_ELEMENT_OPERATION_COUNT + 0;
-
- /**
- * The meta object id for the '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.FeatureAxisConfigurationImpl <em>Feature Axis Configuration</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.FeatureAxisConfigurationImpl
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.NattableaxisconfigurationPackageImpl#getFeatureAxisConfiguration()
- * @generated
- */
- int FEATURE_AXIS_CONFIGURATION = 6;
-
- /**
- * The feature id for the '<em><b>EAnnotations</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int FEATURE_AXIS_CONFIGURATION__EANNOTATIONS = IAXIS_CONFIGURATION__EANNOTATIONS;
-
- /**
- * The feature id for the '<em><b>Styles</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int FEATURE_AXIS_CONFIGURATION__STYLES = IAXIS_CONFIGURATION__STYLES;
-
- /**
- * The feature id for the '<em><b>Show Only Common Feature</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int FEATURE_AXIS_CONFIGURATION__SHOW_ONLY_COMMON_FEATURE = IAXIS_CONFIGURATION_FEATURE_COUNT + 0;
-
- /**
- * The number of structural features of the '<em>Feature Axis Configuration</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int FEATURE_AXIS_CONFIGURATION_FEATURE_COUNT = IAXIS_CONFIGURATION_FEATURE_COUNT + 1;
-
- /**
- * The operation id for the '<em>Get EAnnotation</em>' operation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int FEATURE_AXIS_CONFIGURATION___GET_EANNOTATION__STRING = IAXIS_CONFIGURATION___GET_EANNOTATION__STRING;
-
- /**
- * The operation id for the '<em>Get Named Style</em>' operation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int FEATURE_AXIS_CONFIGURATION___GET_NAMED_STYLE__ECLASS_STRING = IAXIS_CONFIGURATION___GET_NAMED_STYLE__ECLASS_STRING;
-
- /**
- * The operation id for the '<em>Get Style</em>' operation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int FEATURE_AXIS_CONFIGURATION___GET_STYLE__ECLASS = IAXIS_CONFIGURATION___GET_STYLE__ECLASS;
-
- /**
- * The operation id for the '<em>Create Style</em>' operation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int FEATURE_AXIS_CONFIGURATION___CREATE_STYLE__ECLASS = IAXIS_CONFIGURATION___CREATE_STYLE__ECLASS;
-
- /**
- * The number of operations of the '<em>Feature Axis Configuration</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int FEATURE_AXIS_CONFIGURATION_OPERATION_COUNT = IAXIS_CONFIGURATION_OPERATION_COUNT + 0;
-
- /**
- * The meta object id for the '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.IFillingConfiguration <em>IFilling Configuration</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.IFillingConfiguration
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.NattableaxisconfigurationPackageImpl#getIFillingConfiguration()
- * @generated
- */
- int IFILLING_CONFIGURATION = 7;
-
- /**
- * The feature id for the '<em><b>EAnnotations</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int IFILLING_CONFIGURATION__EANNOTATIONS = IAXIS_CONFIGURATION__EANNOTATIONS;
-
- /**
- * The feature id for the '<em><b>Styles</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int IFILLING_CONFIGURATION__STYLES = IAXIS_CONFIGURATION__STYLES;
-
- /**
- * The number of structural features of the '<em>IFilling Configuration</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int IFILLING_CONFIGURATION_FEATURE_COUNT = IAXIS_CONFIGURATION_FEATURE_COUNT + 0;
-
- /**
- * The operation id for the '<em>Get EAnnotation</em>' operation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int IFILLING_CONFIGURATION___GET_EANNOTATION__STRING = IAXIS_CONFIGURATION___GET_EANNOTATION__STRING;
-
- /**
- * The operation id for the '<em>Get Named Style</em>' operation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int IFILLING_CONFIGURATION___GET_NAMED_STYLE__ECLASS_STRING = IAXIS_CONFIGURATION___GET_NAMED_STYLE__ECLASS_STRING;
-
- /**
- * The operation id for the '<em>Get Style</em>' operation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int IFILLING_CONFIGURATION___GET_STYLE__ECLASS = IAXIS_CONFIGURATION___GET_STYLE__ECLASS;
-
- /**
- * The operation id for the '<em>Create Style</em>' operation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int IFILLING_CONFIGURATION___CREATE_STYLE__ECLASS = IAXIS_CONFIGURATION___CREATE_STYLE__ECLASS;
-
- /**
- * The number of operations of the '<em>IFilling Configuration</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int IFILLING_CONFIGURATION_OPERATION_COUNT = IAXIS_CONFIGURATION_OPERATION_COUNT + 0;
-
- /**
- * The meta object id for the '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.EStructuralFeatureValueFillingConfigurationImpl <em>EStructural Feature Value Filling Configuration</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.EStructuralFeatureValueFillingConfigurationImpl
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.NattableaxisconfigurationPackageImpl#getEStructuralFeatureValueFillingConfiguration()
- * @generated
- */
- int ESTRUCTURAL_FEATURE_VALUE_FILLING_CONFIGURATION = 8;
-
- /**
- * The feature id for the '<em><b>EAnnotations</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int ESTRUCTURAL_FEATURE_VALUE_FILLING_CONFIGURATION__EANNOTATIONS = IFILLING_CONFIGURATION__EANNOTATIONS;
-
- /**
- * The feature id for the '<em><b>Styles</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int ESTRUCTURAL_FEATURE_VALUE_FILLING_CONFIGURATION__STYLES = IFILLING_CONFIGURATION__STYLES;
-
- /**
- * The feature id for the '<em><b>Listen Feature</b></em>' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int ESTRUCTURAL_FEATURE_VALUE_FILLING_CONFIGURATION__LISTEN_FEATURE = IFILLING_CONFIGURATION_FEATURE_COUNT + 0;
-
- /**
- * The number of structural features of the '<em>EStructural Feature Value Filling Configuration</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int ESTRUCTURAL_FEATURE_VALUE_FILLING_CONFIGURATION_FEATURE_COUNT = IFILLING_CONFIGURATION_FEATURE_COUNT + 1;
-
- /**
- * The operation id for the '<em>Get EAnnotation</em>' operation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int ESTRUCTURAL_FEATURE_VALUE_FILLING_CONFIGURATION___GET_EANNOTATION__STRING = IFILLING_CONFIGURATION___GET_EANNOTATION__STRING;
-
- /**
- * The operation id for the '<em>Get Named Style</em>' operation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int ESTRUCTURAL_FEATURE_VALUE_FILLING_CONFIGURATION___GET_NAMED_STYLE__ECLASS_STRING = IFILLING_CONFIGURATION___GET_NAMED_STYLE__ECLASS_STRING;
-
- /**
- * The operation id for the '<em>Get Style</em>' operation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int ESTRUCTURAL_FEATURE_VALUE_FILLING_CONFIGURATION___GET_STYLE__ECLASS = IFILLING_CONFIGURATION___GET_STYLE__ECLASS;
-
- /**
- * The operation id for the '<em>Create Style</em>' operation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int ESTRUCTURAL_FEATURE_VALUE_FILLING_CONFIGURATION___CREATE_STYLE__ECLASS = IFILLING_CONFIGURATION___CREATE_STYLE__ECLASS;
-
- /**
- * The number of operations of the '<em>EStructural Feature Value Filling Configuration</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int ESTRUCTURAL_FEATURE_VALUE_FILLING_CONFIGURATION_OPERATION_COUNT = IFILLING_CONFIGURATION_OPERATION_COUNT + 0;
-
- /**
- * The meta object id for the '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.IPasteConfigurationImpl <em>IPaste Configuration</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.IPasteConfigurationImpl
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.NattableaxisconfigurationPackageImpl#getIPasteConfiguration()
- * @generated
- */
- int IPASTE_CONFIGURATION = 9;
-
- /**
- * The feature id for the '<em><b>EAnnotations</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int IPASTE_CONFIGURATION__EANNOTATIONS = IAXIS_CONFIGURATION__EANNOTATIONS;
-
- /**
- * The feature id for the '<em><b>Styles</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int IPASTE_CONFIGURATION__STYLES = IAXIS_CONFIGURATION__STYLES;
-
- /**
- * The feature id for the '<em><b>Post Actions</b></em>' attribute list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int IPASTE_CONFIGURATION__POST_ACTIONS = IAXIS_CONFIGURATION_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Detached Mode</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int IPASTE_CONFIGURATION__DETACHED_MODE = IAXIS_CONFIGURATION_FEATURE_COUNT + 1;
-
- /**
- * The number of structural features of the '<em>IPaste Configuration</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int IPASTE_CONFIGURATION_FEATURE_COUNT = IAXIS_CONFIGURATION_FEATURE_COUNT + 2;
-
- /**
- * The operation id for the '<em>Get EAnnotation</em>' operation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int IPASTE_CONFIGURATION___GET_EANNOTATION__STRING = IAXIS_CONFIGURATION___GET_EANNOTATION__STRING;
-
- /**
- * The operation id for the '<em>Get Named Style</em>' operation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int IPASTE_CONFIGURATION___GET_NAMED_STYLE__ECLASS_STRING = IAXIS_CONFIGURATION___GET_NAMED_STYLE__ECLASS_STRING;
-
- /**
- * The operation id for the '<em>Get Style</em>' operation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int IPASTE_CONFIGURATION___GET_STYLE__ECLASS = IAXIS_CONFIGURATION___GET_STYLE__ECLASS;
-
- /**
- * The operation id for the '<em>Create Style</em>' operation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int IPASTE_CONFIGURATION___CREATE_STYLE__ECLASS = IAXIS_CONFIGURATION___CREATE_STYLE__ECLASS;
-
- /**
- * The number of operations of the '<em>IPaste Configuration</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int IPASTE_CONFIGURATION_OPERATION_COUNT = IAXIS_CONFIGURATION_OPERATION_COUNT + 0;
-
- /**
- * The meta object id for the '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.PasteEObjectConfigurationImpl <em>Paste EObject Configuration</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.PasteEObjectConfigurationImpl
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.NattableaxisconfigurationPackageImpl#getPasteEObjectConfiguration()
- * @generated
- */
- int PASTE_EOBJECT_CONFIGURATION = 10;
-
- /**
- * The feature id for the '<em><b>EAnnotations</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int PASTE_EOBJECT_CONFIGURATION__EANNOTATIONS = IPASTE_CONFIGURATION__EANNOTATIONS;
-
- /**
- * The feature id for the '<em><b>Styles</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int PASTE_EOBJECT_CONFIGURATION__STYLES = IPASTE_CONFIGURATION__STYLES;
-
- /**
- * The feature id for the '<em><b>Post Actions</b></em>' attribute list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int PASTE_EOBJECT_CONFIGURATION__POST_ACTIONS = IPASTE_CONFIGURATION__POST_ACTIONS;
-
- /**
- * The feature id for the '<em><b>Detached Mode</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int PASTE_EOBJECT_CONFIGURATION__DETACHED_MODE = IPASTE_CONFIGURATION__DETACHED_MODE;
-
- /**
- * The feature id for the '<em><b>Pasted Element Id</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int PASTE_EOBJECT_CONFIGURATION__PASTED_ELEMENT_ID = IPASTE_CONFIGURATION_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Paste Element Containement Feature</b></em>' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int PASTE_EOBJECT_CONFIGURATION__PASTE_ELEMENT_CONTAINEMENT_FEATURE = IPASTE_CONFIGURATION_FEATURE_COUNT + 1;
-
- /**
- * The number of structural features of the '<em>Paste EObject Configuration</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int PASTE_EOBJECT_CONFIGURATION_FEATURE_COUNT = IPASTE_CONFIGURATION_FEATURE_COUNT + 2;
-
- /**
- * The operation id for the '<em>Get EAnnotation</em>' operation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int PASTE_EOBJECT_CONFIGURATION___GET_EANNOTATION__STRING = IPASTE_CONFIGURATION___GET_EANNOTATION__STRING;
-
- /**
- * The operation id for the '<em>Get Named Style</em>' operation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int PASTE_EOBJECT_CONFIGURATION___GET_NAMED_STYLE__ECLASS_STRING = IPASTE_CONFIGURATION___GET_NAMED_STYLE__ECLASS_STRING;
-
- /**
- * The operation id for the '<em>Get Style</em>' operation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int PASTE_EOBJECT_CONFIGURATION___GET_STYLE__ECLASS = IPASTE_CONFIGURATION___GET_STYLE__ECLASS;
-
- /**
- * The operation id for the '<em>Create Style</em>' operation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int PASTE_EOBJECT_CONFIGURATION___CREATE_STYLE__ECLASS = IPASTE_CONFIGURATION___CREATE_STYLE__ECLASS;
-
- /**
- * The number of operations of the '<em>Paste EObject Configuration</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int PASTE_EOBJECT_CONFIGURATION_OPERATION_COUNT = IPASTE_CONFIGURATION_OPERATION_COUNT + 0;
-
- /**
- * The meta object id for the '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.TreeFillingConfigurationImpl <em>Tree Filling Configuration</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.TreeFillingConfigurationImpl
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.NattableaxisconfigurationPackageImpl#getTreeFillingConfiguration()
- * @generated
- */
- int TREE_FILLING_CONFIGURATION = 11;
-
- /**
- * The feature id for the '<em><b>EAnnotations</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int TREE_FILLING_CONFIGURATION__EANNOTATIONS = IFILLING_CONFIGURATION__EANNOTATIONS;
-
- /**
- * The feature id for the '<em><b>Styles</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int TREE_FILLING_CONFIGURATION__STYLES = IFILLING_CONFIGURATION__STYLES;
-
- /**
- * The feature id for the '<em><b>Axis Used As Axis Provider</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int TREE_FILLING_CONFIGURATION__AXIS_USED_AS_AXIS_PROVIDER = IFILLING_CONFIGURATION_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Paste Configuration</b></em>' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int TREE_FILLING_CONFIGURATION__PASTE_CONFIGURATION = IFILLING_CONFIGURATION_FEATURE_COUNT + 1;
-
- /**
- * The feature id for the '<em><b>Depth</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int TREE_FILLING_CONFIGURATION__DEPTH = IFILLING_CONFIGURATION_FEATURE_COUNT + 2;
-
- /**
- * The feature id for the '<em><b>Label Provider</b></em>' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int TREE_FILLING_CONFIGURATION__LABEL_PROVIDER = IFILLING_CONFIGURATION_FEATURE_COUNT + 3;
-
- /**
- * The feature id for the '<em><b>Label Provider Context</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int TREE_FILLING_CONFIGURATION__LABEL_PROVIDER_CONTEXT = IFILLING_CONFIGURATION_FEATURE_COUNT + 4;
-
- /**
- * The number of structural features of the '<em>Tree Filling Configuration</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int TREE_FILLING_CONFIGURATION_FEATURE_COUNT = IFILLING_CONFIGURATION_FEATURE_COUNT + 5;
-
- /**
- * The operation id for the '<em>Get EAnnotation</em>' operation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int TREE_FILLING_CONFIGURATION___GET_EANNOTATION__STRING = IFILLING_CONFIGURATION___GET_EANNOTATION__STRING;
-
- /**
- * The operation id for the '<em>Get Named Style</em>' operation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int TREE_FILLING_CONFIGURATION___GET_NAMED_STYLE__ECLASS_STRING = IFILLING_CONFIGURATION___GET_NAMED_STYLE__ECLASS_STRING;
-
- /**
- * The operation id for the '<em>Get Style</em>' operation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int TREE_FILLING_CONFIGURATION___GET_STYLE__ECLASS = IFILLING_CONFIGURATION___GET_STYLE__ECLASS;
-
- /**
- * The operation id for the '<em>Create Style</em>' operation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int TREE_FILLING_CONFIGURATION___CREATE_STYLE__ECLASS = IFILLING_CONFIGURATION___CREATE_STYLE__ECLASS;
-
- /**
- * The number of operations of the '<em>Tree Filling Configuration</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int TREE_FILLING_CONFIGURATION_OPERATION_COUNT = IFILLING_CONFIGURATION_OPERATION_COUNT + 0;
-
- /**
- * The meta object id for the '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AxisIndexStyle <em>Axis Index Style</em>}' enum.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AxisIndexStyle
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.NattableaxisconfigurationPackageImpl#getAxisIndexStyle()
- * @generated
- */
- int AXIS_INDEX_STYLE = 12;
-
- /**
- * Returns the meta object for class '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AbstractHeaderAxisConfiguration <em>Abstract Header Axis Configuration</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Abstract Header Axis Configuration</em>'.
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AbstractHeaderAxisConfiguration
- * @generated
- */
- EClass getAbstractHeaderAxisConfiguration();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AbstractHeaderAxisConfiguration#getIndexStyle <em>Index Style</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Index Style</em>'.
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AbstractHeaderAxisConfiguration#getIndexStyle()
- * @see #getAbstractHeaderAxisConfiguration()
- * @generated
- */
- EAttribute getAbstractHeaderAxisConfiguration_IndexStyle();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AbstractHeaderAxisConfiguration#isDisplayLabel <em>Display Label</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Display Label</em>'.
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AbstractHeaderAxisConfiguration#isDisplayLabel()
- * @see #getAbstractHeaderAxisConfiguration()
- * @generated
- */
- EAttribute getAbstractHeaderAxisConfiguration_DisplayLabel();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AbstractHeaderAxisConfiguration#isDisplayFilter <em>Display Filter</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Display Filter</em>'.
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AbstractHeaderAxisConfiguration#isDisplayFilter()
- * @see #getAbstractHeaderAxisConfiguration()
- * @generated
- */
- EAttribute getAbstractHeaderAxisConfiguration_DisplayFilter();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AbstractHeaderAxisConfiguration#isDisplayIndex <em>Display Index</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Display Index</em>'.
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AbstractHeaderAxisConfiguration#isDisplayIndex()
- * @see #getAbstractHeaderAxisConfiguration()
- * @generated
- */
- EAttribute getAbstractHeaderAxisConfiguration_DisplayIndex();
-
- /**
- * Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AbstractHeaderAxisConfiguration#getOwnedLabelConfigurations <em>Owned Label Configurations</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>Owned Label Configurations</em>'.
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AbstractHeaderAxisConfiguration#getOwnedLabelConfigurations()
- * @see #getAbstractHeaderAxisConfiguration()
- * @generated
- */
- EReference getAbstractHeaderAxisConfiguration_OwnedLabelConfigurations();
-
- /**
- * Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AbstractHeaderAxisConfiguration#getOwnedAxisConfigurations <em>Owned Axis Configurations</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>Owned Axis Configurations</em>'.
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AbstractHeaderAxisConfiguration#getOwnedAxisConfigurations()
- * @see #getAbstractHeaderAxisConfiguration()
- * @generated
- */
- EReference getAbstractHeaderAxisConfiguration_OwnedAxisConfigurations();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AxisManagerRepresentation <em>Axis Manager Representation</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Axis Manager Representation</em>'.
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AxisManagerRepresentation
- * @generated
- */
- EClass getAxisManagerRepresentation();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AxisManagerRepresentation#getAxisManagerId <em>Axis Manager Id</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Axis Manager Id</em>'.
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AxisManagerRepresentation#getAxisManagerId()
- * @see #getAxisManagerRepresentation()
- * @generated
- */
- EAttribute getAxisManagerRepresentation_AxisManagerId();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AxisManagerRepresentation#getLabelProviderContext <em>Label Provider Context</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Label Provider Context</em>'.
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AxisManagerRepresentation#getLabelProviderContext()
- * @see #getAxisManagerRepresentation()
- * @generated
- */
- EAttribute getAxisManagerRepresentation_LabelProviderContext();
-
- /**
- * Returns the meta object for the reference '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AxisManagerRepresentation#getHeaderLabelConfiguration <em>Header Label Configuration</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the reference '<em>Header Label Configuration</em>'.
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AxisManagerRepresentation#getHeaderLabelConfiguration()
- * @see #getAxisManagerRepresentation()
- * @generated
- */
- EReference getAxisManagerRepresentation_HeaderLabelConfiguration();
-
- /**
- * Returns the meta object for the reference list '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AxisManagerRepresentation#getSpecificAxisConfigurations <em>Specific Axis Configurations</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the reference list '<em>Specific Axis Configurations</em>'.
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AxisManagerRepresentation#getSpecificAxisConfigurations()
- * @see #getAxisManagerRepresentation()
- * @generated
- */
- EReference getAxisManagerRepresentation_SpecificAxisConfigurations();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AxisManagerConfiguration <em>Axis Manager Configuration</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Axis Manager Configuration</em>'.
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AxisManagerConfiguration
- * @generated
- */
- EClass getAxisManagerConfiguration();
-
- /**
- * Returns the meta object for the reference '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AxisManagerConfiguration#getLocalHeaderLabelConfiguration <em>Local Header Label Configuration</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the reference '<em>Local Header Label Configuration</em>'.
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AxisManagerConfiguration#getLocalHeaderLabelConfiguration()
- * @see #getAxisManagerConfiguration()
- * @generated
- */
- EReference getAxisManagerConfiguration_LocalHeaderLabelConfiguration();
-
- /**
- * Returns the meta object for the reference '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AxisManagerConfiguration#getAxisManager <em>Axis Manager</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the reference '<em>Axis Manager</em>'.
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AxisManagerConfiguration#getAxisManager()
- * @see #getAxisManagerConfiguration()
- * @generated
- */
- EReference getAxisManagerConfiguration_AxisManager();
-
- /**
- * Returns the meta object for the reference list '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AxisManagerConfiguration#getLocalSpecificConfigurations <em>Local Specific Configurations</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the reference list '<em>Local Specific Configurations</em>'.
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AxisManagerConfiguration#getLocalSpecificConfigurations()
- * @see #getAxisManagerConfiguration()
- * @generated
- */
- EReference getAxisManagerConfiguration_LocalSpecificConfigurations();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.TableHeaderAxisConfiguration <em>Table Header Axis Configuration</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Table Header Axis Configuration</em>'.
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.TableHeaderAxisConfiguration
- * @generated
- */
- EClass getTableHeaderAxisConfiguration();
-
- /**
- * Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.TableHeaderAxisConfiguration#getAxisManagers <em>Axis Managers</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>Axis Managers</em>'.
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.TableHeaderAxisConfiguration#getAxisManagers()
- * @see #getTableHeaderAxisConfiguration()
- * @generated
- */
- EReference getTableHeaderAxisConfiguration_AxisManagers();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.LocalTableHeaderAxisConfiguration <em>Local Table Header Axis Configuration</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Local Table Header Axis Configuration</em>'.
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.LocalTableHeaderAxisConfiguration
- * @generated
- */
- EClass getLocalTableHeaderAxisConfiguration();
-
- /**
- * Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.LocalTableHeaderAxisConfiguration#getAxisManagerConfigurations <em>Axis Manager Configurations</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>Axis Manager Configurations</em>'.
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.LocalTableHeaderAxisConfiguration#getAxisManagerConfigurations()
- * @see #getLocalTableHeaderAxisConfiguration()
- * @generated
- */
- EReference getLocalTableHeaderAxisConfiguration_AxisManagerConfigurations();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.IAxisConfiguration <em>IAxis Configuration</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>IAxis Configuration</em>'.
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.IAxisConfiguration
- * @generated
- */
- EClass getIAxisConfiguration();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.FeatureAxisConfiguration <em>Feature Axis Configuration</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Feature Axis Configuration</em>'.
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.FeatureAxisConfiguration
- * @generated
- */
- EClass getFeatureAxisConfiguration();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.FeatureAxisConfiguration#isShowOnlyCommonFeature <em>Show Only Common Feature</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Show Only Common Feature</em>'.
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.FeatureAxisConfiguration#isShowOnlyCommonFeature()
- * @see #getFeatureAxisConfiguration()
- * @generated
- */
- EAttribute getFeatureAxisConfiguration_ShowOnlyCommonFeature();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.IFillingConfiguration <em>IFilling Configuration</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>IFilling Configuration</em>'.
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.IFillingConfiguration
- * @generated
- */
- EClass getIFillingConfiguration();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.EStructuralFeatureValueFillingConfiguration <em>EStructural Feature Value Filling Configuration</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>EStructural Feature Value Filling Configuration</em>'.
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.EStructuralFeatureValueFillingConfiguration
- * @generated
- */
- EClass getEStructuralFeatureValueFillingConfiguration();
-
- /**
- * Returns the meta object for the reference '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.EStructuralFeatureValueFillingConfiguration#getListenFeature <em>Listen Feature</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the reference '<em>Listen Feature</em>'.
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.EStructuralFeatureValueFillingConfiguration#getListenFeature()
- * @see #getEStructuralFeatureValueFillingConfiguration()
- * @generated
- */
- EReference getEStructuralFeatureValueFillingConfiguration_ListenFeature();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.IPasteConfiguration <em>IPaste Configuration</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>IPaste Configuration</em>'.
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.IPasteConfiguration
- * @generated
- */
- EClass getIPasteConfiguration();
-
- /**
- * Returns the meta object for the attribute list '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.IPasteConfiguration#getPostActions <em>Post Actions</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute list '<em>Post Actions</em>'.
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.IPasteConfiguration#getPostActions()
- * @see #getIPasteConfiguration()
- * @generated
- */
- EAttribute getIPasteConfiguration_PostActions();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.IPasteConfiguration#isDetachedMode <em>Detached Mode</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Detached Mode</em>'.
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.IPasteConfiguration#isDetachedMode()
- * @see #getIPasteConfiguration()
- * @generated
- */
- EAttribute getIPasteConfiguration_DetachedMode();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.PasteEObjectConfiguration <em>Paste EObject Configuration</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Paste EObject Configuration</em>'.
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.PasteEObjectConfiguration
- * @generated
- */
- EClass getPasteEObjectConfiguration();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.PasteEObjectConfiguration#getPastedElementId <em>Pasted Element Id</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Pasted Element Id</em>'.
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.PasteEObjectConfiguration#getPastedElementId()
- * @see #getPasteEObjectConfiguration()
- * @generated
- */
- EAttribute getPasteEObjectConfiguration_PastedElementId();
-
- /**
- * Returns the meta object for the reference '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.PasteEObjectConfiguration#getPasteElementContainementFeature <em>Paste Element Containement Feature</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the reference '<em>Paste Element Containement Feature</em>'.
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.PasteEObjectConfiguration#getPasteElementContainementFeature()
- * @see #getPasteEObjectConfiguration()
- * @generated
- */
- EReference getPasteEObjectConfiguration_PasteElementContainementFeature();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.TreeFillingConfiguration <em>Tree Filling Configuration</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Tree Filling Configuration</em>'.
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.TreeFillingConfiguration
- * @generated
- */
- EClass getTreeFillingConfiguration();
-
- /**
- * Returns the meta object for the containment reference '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.TreeFillingConfiguration#getAxisUsedAsAxisProvider <em>Axis Used As Axis Provider</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference '<em>Axis Used As Axis Provider</em>'.
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.TreeFillingConfiguration#getAxisUsedAsAxisProvider()
- * @see #getTreeFillingConfiguration()
- * @generated
- */
- EReference getTreeFillingConfiguration_AxisUsedAsAxisProvider();
-
- /**
- * Returns the meta object for the reference '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.TreeFillingConfiguration#getPasteConfiguration <em>Paste Configuration</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the reference '<em>Paste Configuration</em>'.
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.TreeFillingConfiguration#getPasteConfiguration()
- * @see #getTreeFillingConfiguration()
- * @generated
- */
- EReference getTreeFillingConfiguration_PasteConfiguration();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.TreeFillingConfiguration#getDepth <em>Depth</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Depth</em>'.
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.TreeFillingConfiguration#getDepth()
- * @see #getTreeFillingConfiguration()
- * @generated
- */
- EAttribute getTreeFillingConfiguration_Depth();
-
- /**
- * Returns the meta object for the reference '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.TreeFillingConfiguration#getLabelProvider <em>Label Provider</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the reference '<em>Label Provider</em>'.
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.TreeFillingConfiguration#getLabelProvider()
- * @see #getTreeFillingConfiguration()
- * @generated
- */
- EReference getTreeFillingConfiguration_LabelProvider();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.TreeFillingConfiguration#getLabelProviderContext <em>Label Provider Context</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Label Provider Context</em>'.
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.TreeFillingConfiguration#getLabelProviderContext()
- * @see #getTreeFillingConfiguration()
- * @generated
- */
- EAttribute getTreeFillingConfiguration_LabelProviderContext();
-
- /**
- * Returns the meta object for enum '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AxisIndexStyle <em>Axis Index Style</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for enum '<em>Axis Index Style</em>'.
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AxisIndexStyle
- * @generated
- */
- EEnum getAxisIndexStyle();
-
- /**
- * Returns the factory that creates the instances of the model.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the factory that creates the instances of the model.
- * @generated
- */
- NattableaxisconfigurationFactory getNattableaxisconfigurationFactory();
-
- /**
- * <!-- begin-user-doc -->
- * Defines literals for the meta objects that represent
- * <ul>
- * <li>each class,</li>
- * <li>each feature of each class,</li>
- * <li>each operation of each class,</li>
- * <li>each enum,</li>
- * <li>and each data type</li>
- * </ul>
- * <!-- end-user-doc -->
- * @generated
- */
- interface Literals {
-
- /**
- * The meta object literal for the '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.AbstractHeaderAxisConfigurationImpl <em>Abstract Header Axis Configuration</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.AbstractHeaderAxisConfigurationImpl
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.NattableaxisconfigurationPackageImpl#getAbstractHeaderAxisConfiguration()
- * @generated
- */
- EClass ABSTRACT_HEADER_AXIS_CONFIGURATION = eINSTANCE.getAbstractHeaderAxisConfiguration();
-
- /**
- * The meta object literal for the '<em><b>Index Style</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute ABSTRACT_HEADER_AXIS_CONFIGURATION__INDEX_STYLE = eINSTANCE.getAbstractHeaderAxisConfiguration_IndexStyle();
-
- /**
- * The meta object literal for the '<em><b>Display Label</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute ABSTRACT_HEADER_AXIS_CONFIGURATION__DISPLAY_LABEL = eINSTANCE.getAbstractHeaderAxisConfiguration_DisplayLabel();
-
- /**
- * The meta object literal for the '<em><b>Display Filter</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute ABSTRACT_HEADER_AXIS_CONFIGURATION__DISPLAY_FILTER = eINSTANCE.getAbstractHeaderAxisConfiguration_DisplayFilter();
-
- /**
- * The meta object literal for the '<em><b>Display Index</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute ABSTRACT_HEADER_AXIS_CONFIGURATION__DISPLAY_INDEX = eINSTANCE.getAbstractHeaderAxisConfiguration_DisplayIndex();
-
- /**
- * The meta object literal for the '<em><b>Owned Label Configurations</b></em>' containment reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference ABSTRACT_HEADER_AXIS_CONFIGURATION__OWNED_LABEL_CONFIGURATIONS = eINSTANCE.getAbstractHeaderAxisConfiguration_OwnedLabelConfigurations();
-
- /**
- * The meta object literal for the '<em><b>Owned Axis Configurations</b></em>' containment reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference ABSTRACT_HEADER_AXIS_CONFIGURATION__OWNED_AXIS_CONFIGURATIONS = eINSTANCE.getAbstractHeaderAxisConfiguration_OwnedAxisConfigurations();
-
- /**
- * The meta object literal for the '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.AxisManagerRepresentationImpl <em>Axis Manager Representation</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.AxisManagerRepresentationImpl
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.NattableaxisconfigurationPackageImpl#getAxisManagerRepresentation()
- * @generated
- */
- EClass AXIS_MANAGER_REPRESENTATION = eINSTANCE.getAxisManagerRepresentation();
-
- /**
- * The meta object literal for the '<em><b>Axis Manager Id</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute AXIS_MANAGER_REPRESENTATION__AXIS_MANAGER_ID = eINSTANCE.getAxisManagerRepresentation_AxisManagerId();
-
- /**
- * The meta object literal for the '<em><b>Label Provider Context</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute AXIS_MANAGER_REPRESENTATION__LABEL_PROVIDER_CONTEXT = eINSTANCE.getAxisManagerRepresentation_LabelProviderContext();
-
- /**
- * The meta object literal for the '<em><b>Header Label Configuration</b></em>' reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference AXIS_MANAGER_REPRESENTATION__HEADER_LABEL_CONFIGURATION = eINSTANCE.getAxisManagerRepresentation_HeaderLabelConfiguration();
-
- /**
- * The meta object literal for the '<em><b>Specific Axis Configurations</b></em>' reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference AXIS_MANAGER_REPRESENTATION__SPECIFIC_AXIS_CONFIGURATIONS = eINSTANCE.getAxisManagerRepresentation_SpecificAxisConfigurations();
-
- /**
- * The meta object literal for the '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.AxisManagerConfigurationImpl <em>Axis Manager Configuration</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.AxisManagerConfigurationImpl
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.NattableaxisconfigurationPackageImpl#getAxisManagerConfiguration()
- * @generated
- */
- EClass AXIS_MANAGER_CONFIGURATION = eINSTANCE.getAxisManagerConfiguration();
-
- /**
- * The meta object literal for the '<em><b>Local Header Label Configuration</b></em>' reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference AXIS_MANAGER_CONFIGURATION__LOCAL_HEADER_LABEL_CONFIGURATION = eINSTANCE.getAxisManagerConfiguration_LocalHeaderLabelConfiguration();
-
- /**
- * The meta object literal for the '<em><b>Axis Manager</b></em>' reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference AXIS_MANAGER_CONFIGURATION__AXIS_MANAGER = eINSTANCE.getAxisManagerConfiguration_AxisManager();
-
- /**
- * The meta object literal for the '<em><b>Local Specific Configurations</b></em>' reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference AXIS_MANAGER_CONFIGURATION__LOCAL_SPECIFIC_CONFIGURATIONS = eINSTANCE.getAxisManagerConfiguration_LocalSpecificConfigurations();
-
- /**
- * The meta object literal for the '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.TableHeaderAxisConfigurationImpl <em>Table Header Axis Configuration</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.TableHeaderAxisConfigurationImpl
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.NattableaxisconfigurationPackageImpl#getTableHeaderAxisConfiguration()
- * @generated
- */
- EClass TABLE_HEADER_AXIS_CONFIGURATION = eINSTANCE.getTableHeaderAxisConfiguration();
-
- /**
- * The meta object literal for the '<em><b>Axis Managers</b></em>' containment reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference TABLE_HEADER_AXIS_CONFIGURATION__AXIS_MANAGERS = eINSTANCE.getTableHeaderAxisConfiguration_AxisManagers();
-
- /**
- * The meta object literal for the '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.LocalTableHeaderAxisConfigurationImpl <em>Local Table Header Axis Configuration</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.LocalTableHeaderAxisConfigurationImpl
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.NattableaxisconfigurationPackageImpl#getLocalTableHeaderAxisConfiguration()
- * @generated
- */
- EClass LOCAL_TABLE_HEADER_AXIS_CONFIGURATION = eINSTANCE.getLocalTableHeaderAxisConfiguration();
-
- /**
- * The meta object literal for the '<em><b>Axis Manager Configurations</b></em>' containment reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference LOCAL_TABLE_HEADER_AXIS_CONFIGURATION__AXIS_MANAGER_CONFIGURATIONS = eINSTANCE.getLocalTableHeaderAxisConfiguration_AxisManagerConfigurations();
-
- /**
- * The meta object literal for the '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.IAxisConfiguration <em>IAxis Configuration</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.IAxisConfiguration
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.NattableaxisconfigurationPackageImpl#getIAxisConfiguration()
- * @generated
- */
- EClass IAXIS_CONFIGURATION = eINSTANCE.getIAxisConfiguration();
-
- /**
- * The meta object literal for the '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.FeatureAxisConfigurationImpl <em>Feature Axis Configuration</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.FeatureAxisConfigurationImpl
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.NattableaxisconfigurationPackageImpl#getFeatureAxisConfiguration()
- * @generated
- */
- EClass FEATURE_AXIS_CONFIGURATION = eINSTANCE.getFeatureAxisConfiguration();
-
- /**
- * The meta object literal for the '<em><b>Show Only Common Feature</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute FEATURE_AXIS_CONFIGURATION__SHOW_ONLY_COMMON_FEATURE = eINSTANCE.getFeatureAxisConfiguration_ShowOnlyCommonFeature();
-
- /**
- * The meta object literal for the '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.IFillingConfiguration <em>IFilling Configuration</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.IFillingConfiguration
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.NattableaxisconfigurationPackageImpl#getIFillingConfiguration()
- * @generated
- */
- EClass IFILLING_CONFIGURATION = eINSTANCE.getIFillingConfiguration();
-
- /**
- * The meta object literal for the '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.EStructuralFeatureValueFillingConfigurationImpl <em>EStructural Feature Value Filling Configuration</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.EStructuralFeatureValueFillingConfigurationImpl
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.NattableaxisconfigurationPackageImpl#getEStructuralFeatureValueFillingConfiguration()
- * @generated
- */
- EClass ESTRUCTURAL_FEATURE_VALUE_FILLING_CONFIGURATION = eINSTANCE.getEStructuralFeatureValueFillingConfiguration();
-
- /**
- * The meta object literal for the '<em><b>Listen Feature</b></em>' reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference ESTRUCTURAL_FEATURE_VALUE_FILLING_CONFIGURATION__LISTEN_FEATURE = eINSTANCE.getEStructuralFeatureValueFillingConfiguration_ListenFeature();
-
- /**
- * The meta object literal for the '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.IPasteConfigurationImpl <em>IPaste Configuration</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.IPasteConfigurationImpl
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.NattableaxisconfigurationPackageImpl#getIPasteConfiguration()
- * @generated
- */
- EClass IPASTE_CONFIGURATION = eINSTANCE.getIPasteConfiguration();
-
- /**
- * The meta object literal for the '<em><b>Post Actions</b></em>' attribute list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute IPASTE_CONFIGURATION__POST_ACTIONS = eINSTANCE.getIPasteConfiguration_PostActions();
-
- /**
- * The meta object literal for the '<em><b>Detached Mode</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute IPASTE_CONFIGURATION__DETACHED_MODE = eINSTANCE.getIPasteConfiguration_DetachedMode();
-
- /**
- * The meta object literal for the '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.PasteEObjectConfigurationImpl <em>Paste EObject Configuration</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.PasteEObjectConfigurationImpl
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.NattableaxisconfigurationPackageImpl#getPasteEObjectConfiguration()
- * @generated
- */
- EClass PASTE_EOBJECT_CONFIGURATION = eINSTANCE.getPasteEObjectConfiguration();
-
- /**
- * The meta object literal for the '<em><b>Pasted Element Id</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute PASTE_EOBJECT_CONFIGURATION__PASTED_ELEMENT_ID = eINSTANCE.getPasteEObjectConfiguration_PastedElementId();
-
- /**
- * The meta object literal for the '<em><b>Paste Element Containement Feature</b></em>' reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference PASTE_EOBJECT_CONFIGURATION__PASTE_ELEMENT_CONTAINEMENT_FEATURE = eINSTANCE.getPasteEObjectConfiguration_PasteElementContainementFeature();
-
- /**
- * The meta object literal for the '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.TreeFillingConfigurationImpl <em>Tree Filling Configuration</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.TreeFillingConfigurationImpl
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.NattableaxisconfigurationPackageImpl#getTreeFillingConfiguration()
- * @generated
- */
- EClass TREE_FILLING_CONFIGURATION = eINSTANCE.getTreeFillingConfiguration();
-
- /**
- * The meta object literal for the '<em><b>Axis Used As Axis Provider</b></em>' containment reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference TREE_FILLING_CONFIGURATION__AXIS_USED_AS_AXIS_PROVIDER = eINSTANCE.getTreeFillingConfiguration_AxisUsedAsAxisProvider();
-
- /**
- * The meta object literal for the '<em><b>Paste Configuration</b></em>' reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference TREE_FILLING_CONFIGURATION__PASTE_CONFIGURATION = eINSTANCE.getTreeFillingConfiguration_PasteConfiguration();
-
- /**
- * The meta object literal for the '<em><b>Depth</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute TREE_FILLING_CONFIGURATION__DEPTH = eINSTANCE.getTreeFillingConfiguration_Depth();
-
- /**
- * The meta object literal for the '<em><b>Label Provider</b></em>' reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference TREE_FILLING_CONFIGURATION__LABEL_PROVIDER = eINSTANCE.getTreeFillingConfiguration_LabelProvider();
-
- /**
- * The meta object literal for the '<em><b>Label Provider Context</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute TREE_FILLING_CONFIGURATION__LABEL_PROVIDER_CONTEXT = eINSTANCE.getTreeFillingConfiguration_LabelProviderContext();
-
- /**
- * The meta object literal for the '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AxisIndexStyle <em>Axis Index Style</em>}' enum.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AxisIndexStyle
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.NattableaxisconfigurationPackageImpl#getAxisIndexStyle()
- * @generated
- */
- EEnum AXIS_INDEX_STYLE = eINSTANCE.getAxisIndexStyle();
- }
-} // NattableaxisconfigurationPackage
+/**
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ */
+package org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EEnum;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattablestyle.NattablestylePackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Package</b> for the model.
+ * It contains accessors for the meta objects to represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each operation of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.NattableaxisconfigurationFactory
+ * @model kind="package"
+ * annotation="http://www.eclipse.org/emf/2002/Ecore invocationDelegates='http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot' settingDelegates='http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot' validationDelegates='http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot'"
+ * @generated
+ */
+public interface NattableaxisconfigurationPackage extends EPackage {
+
+ /**
+ * The package name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNAME = "nattableaxisconfiguration"; //$NON-NLS-1$
+
+ /**
+ * The package namespace URI.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_URI = "http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration"; //$NON-NLS-1$
+
+ /**
+ * The package namespace name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_PREFIX = "nattableaxisconfiguration"; //$NON-NLS-1$
+
+ /**
+ * The singleton instance of the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ NattableaxisconfigurationPackage eINSTANCE = org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.NattableaxisconfigurationPackageImpl.init();
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.AbstractHeaderAxisConfigurationImpl <em>Abstract Header Axis Configuration</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.AbstractHeaderAxisConfigurationImpl
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.NattableaxisconfigurationPackageImpl#getAbstractHeaderAxisConfiguration()
+ * @generated
+ */
+ int ABSTRACT_HEADER_AXIS_CONFIGURATION = 0;
+
+ /**
+ * The feature id for the '<em><b>EAnnotations</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ABSTRACT_HEADER_AXIS_CONFIGURATION__EANNOTATIONS = NattablestylePackage.STYLED_ELEMENT__EANNOTATIONS;
+
+ /**
+ * The feature id for the '<em><b>Styles</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ABSTRACT_HEADER_AXIS_CONFIGURATION__STYLES = NattablestylePackage.STYLED_ELEMENT__STYLES;
+
+ /**
+ * The feature id for the '<em><b>Index Style</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ABSTRACT_HEADER_AXIS_CONFIGURATION__INDEX_STYLE = NattablestylePackage.STYLED_ELEMENT_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Display Label</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ABSTRACT_HEADER_AXIS_CONFIGURATION__DISPLAY_LABEL = NattablestylePackage.STYLED_ELEMENT_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the '<em><b>Display Filter</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ABSTRACT_HEADER_AXIS_CONFIGURATION__DISPLAY_FILTER = NattablestylePackage.STYLED_ELEMENT_FEATURE_COUNT + 2;
+
+ /**
+ * The feature id for the '<em><b>Display Index</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ABSTRACT_HEADER_AXIS_CONFIGURATION__DISPLAY_INDEX = NattablestylePackage.STYLED_ELEMENT_FEATURE_COUNT + 3;
+
+ /**
+ * The feature id for the '<em><b>Owned Label Configurations</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ABSTRACT_HEADER_AXIS_CONFIGURATION__OWNED_LABEL_CONFIGURATIONS = NattablestylePackage.STYLED_ELEMENT_FEATURE_COUNT + 4;
+
+ /**
+ * The feature id for the '<em><b>Owned Axis Configurations</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ABSTRACT_HEADER_AXIS_CONFIGURATION__OWNED_AXIS_CONFIGURATIONS = NattablestylePackage.STYLED_ELEMENT_FEATURE_COUNT + 5;
+
+ /**
+ * The number of structural features of the '<em>Abstract Header Axis Configuration</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ABSTRACT_HEADER_AXIS_CONFIGURATION_FEATURE_COUNT = NattablestylePackage.STYLED_ELEMENT_FEATURE_COUNT + 6;
+
+ /**
+ * The operation id for the '<em>Get EAnnotation</em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ABSTRACT_HEADER_AXIS_CONFIGURATION___GET_EANNOTATION__STRING = NattablestylePackage.STYLED_ELEMENT___GET_EANNOTATION__STRING;
+
+ /**
+ * The operation id for the '<em>Get Named Style</em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ABSTRACT_HEADER_AXIS_CONFIGURATION___GET_NAMED_STYLE__ECLASS_STRING = NattablestylePackage.STYLED_ELEMENT___GET_NAMED_STYLE__ECLASS_STRING;
+
+ /**
+ * The operation id for the '<em>Get Style</em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ABSTRACT_HEADER_AXIS_CONFIGURATION___GET_STYLE__ECLASS = NattablestylePackage.STYLED_ELEMENT___GET_STYLE__ECLASS;
+
+ /**
+ * The operation id for the '<em>Create Style</em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ABSTRACT_HEADER_AXIS_CONFIGURATION___CREATE_STYLE__ECLASS = NattablestylePackage.STYLED_ELEMENT___CREATE_STYLE__ECLASS;
+
+ /**
+ * The number of operations of the '<em>Abstract Header Axis Configuration</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ABSTRACT_HEADER_AXIS_CONFIGURATION_OPERATION_COUNT = NattablestylePackage.STYLED_ELEMENT_OPERATION_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.AxisManagerRepresentationImpl <em>Axis Manager Representation</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.AxisManagerRepresentationImpl
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.NattableaxisconfigurationPackageImpl#getAxisManagerRepresentation()
+ * @generated
+ */
+ int AXIS_MANAGER_REPRESENTATION = 1;
+
+ /**
+ * The feature id for the '<em><b>EAnnotations</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int AXIS_MANAGER_REPRESENTATION__EANNOTATIONS = NattablestylePackage.STYLED_ELEMENT__EANNOTATIONS;
+
+ /**
+ * The feature id for the '<em><b>Styles</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int AXIS_MANAGER_REPRESENTATION__STYLES = NattablestylePackage.STYLED_ELEMENT__STYLES;
+
+ /**
+ * The feature id for the '<em><b>Axis Manager Id</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int AXIS_MANAGER_REPRESENTATION__AXIS_MANAGER_ID = NattablestylePackage.STYLED_ELEMENT_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Label Provider Context</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int AXIS_MANAGER_REPRESENTATION__LABEL_PROVIDER_CONTEXT = NattablestylePackage.STYLED_ELEMENT_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the '<em><b>Header Label Configuration</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int AXIS_MANAGER_REPRESENTATION__HEADER_LABEL_CONFIGURATION = NattablestylePackage.STYLED_ELEMENT_FEATURE_COUNT + 2;
+
+ /**
+ * The feature id for the '<em><b>Specific Axis Configurations</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int AXIS_MANAGER_REPRESENTATION__SPECIFIC_AXIS_CONFIGURATIONS = NattablestylePackage.STYLED_ELEMENT_FEATURE_COUNT + 3;
+
+ /**
+ * The number of structural features of the '<em>Axis Manager Representation</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int AXIS_MANAGER_REPRESENTATION_FEATURE_COUNT = NattablestylePackage.STYLED_ELEMENT_FEATURE_COUNT + 4;
+
+ /**
+ * The operation id for the '<em>Get EAnnotation</em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int AXIS_MANAGER_REPRESENTATION___GET_EANNOTATION__STRING = NattablestylePackage.STYLED_ELEMENT___GET_EANNOTATION__STRING;
+
+ /**
+ * The operation id for the '<em>Get Named Style</em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int AXIS_MANAGER_REPRESENTATION___GET_NAMED_STYLE__ECLASS_STRING = NattablestylePackage.STYLED_ELEMENT___GET_NAMED_STYLE__ECLASS_STRING;
+
+ /**
+ * The operation id for the '<em>Get Style</em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int AXIS_MANAGER_REPRESENTATION___GET_STYLE__ECLASS = NattablestylePackage.STYLED_ELEMENT___GET_STYLE__ECLASS;
+
+ /**
+ * The operation id for the '<em>Create Style</em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int AXIS_MANAGER_REPRESENTATION___CREATE_STYLE__ECLASS = NattablestylePackage.STYLED_ELEMENT___CREATE_STYLE__ECLASS;
+
+ /**
+ * The number of operations of the '<em>Axis Manager Representation</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int AXIS_MANAGER_REPRESENTATION_OPERATION_COUNT = NattablestylePackage.STYLED_ELEMENT_OPERATION_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.AxisManagerConfigurationImpl <em>Axis Manager Configuration</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.AxisManagerConfigurationImpl
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.NattableaxisconfigurationPackageImpl#getAxisManagerConfiguration()
+ * @generated
+ */
+ int AXIS_MANAGER_CONFIGURATION = 2;
+
+ /**
+ * The feature id for the '<em><b>EAnnotations</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int AXIS_MANAGER_CONFIGURATION__EANNOTATIONS = NattablestylePackage.STYLED_ELEMENT__EANNOTATIONS;
+
+ /**
+ * The feature id for the '<em><b>Styles</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int AXIS_MANAGER_CONFIGURATION__STYLES = NattablestylePackage.STYLED_ELEMENT__STYLES;
+
+ /**
+ * The feature id for the '<em><b>Local Header Label Configuration</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int AXIS_MANAGER_CONFIGURATION__LOCAL_HEADER_LABEL_CONFIGURATION = NattablestylePackage.STYLED_ELEMENT_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Axis Manager</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int AXIS_MANAGER_CONFIGURATION__AXIS_MANAGER = NattablestylePackage.STYLED_ELEMENT_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the '<em><b>Local Specific Configurations</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int AXIS_MANAGER_CONFIGURATION__LOCAL_SPECIFIC_CONFIGURATIONS = NattablestylePackage.STYLED_ELEMENT_FEATURE_COUNT + 2;
+
+ /**
+ * The number of structural features of the '<em>Axis Manager Configuration</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int AXIS_MANAGER_CONFIGURATION_FEATURE_COUNT = NattablestylePackage.STYLED_ELEMENT_FEATURE_COUNT + 3;
+
+ /**
+ * The operation id for the '<em>Get EAnnotation</em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int AXIS_MANAGER_CONFIGURATION___GET_EANNOTATION__STRING = NattablestylePackage.STYLED_ELEMENT___GET_EANNOTATION__STRING;
+
+ /**
+ * The operation id for the '<em>Get Named Style</em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int AXIS_MANAGER_CONFIGURATION___GET_NAMED_STYLE__ECLASS_STRING = NattablestylePackage.STYLED_ELEMENT___GET_NAMED_STYLE__ECLASS_STRING;
+
+ /**
+ * The operation id for the '<em>Get Style</em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int AXIS_MANAGER_CONFIGURATION___GET_STYLE__ECLASS = NattablestylePackage.STYLED_ELEMENT___GET_STYLE__ECLASS;
+
+ /**
+ * The operation id for the '<em>Create Style</em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int AXIS_MANAGER_CONFIGURATION___CREATE_STYLE__ECLASS = NattablestylePackage.STYLED_ELEMENT___CREATE_STYLE__ECLASS;
+
+ /**
+ * The number of operations of the '<em>Axis Manager Configuration</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int AXIS_MANAGER_CONFIGURATION_OPERATION_COUNT = NattablestylePackage.STYLED_ELEMENT_OPERATION_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.TableHeaderAxisConfigurationImpl <em>Table Header Axis Configuration</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.TableHeaderAxisConfigurationImpl
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.NattableaxisconfigurationPackageImpl#getTableHeaderAxisConfiguration()
+ * @generated
+ */
+ int TABLE_HEADER_AXIS_CONFIGURATION = 3;
+
+ /**
+ * The feature id for the '<em><b>EAnnotations</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TABLE_HEADER_AXIS_CONFIGURATION__EANNOTATIONS = ABSTRACT_HEADER_AXIS_CONFIGURATION__EANNOTATIONS;
+
+ /**
+ * The feature id for the '<em><b>Styles</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TABLE_HEADER_AXIS_CONFIGURATION__STYLES = ABSTRACT_HEADER_AXIS_CONFIGURATION__STYLES;
+
+ /**
+ * The feature id for the '<em><b>Index Style</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TABLE_HEADER_AXIS_CONFIGURATION__INDEX_STYLE = ABSTRACT_HEADER_AXIS_CONFIGURATION__INDEX_STYLE;
+
+ /**
+ * The feature id for the '<em><b>Display Label</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TABLE_HEADER_AXIS_CONFIGURATION__DISPLAY_LABEL = ABSTRACT_HEADER_AXIS_CONFIGURATION__DISPLAY_LABEL;
+
+ /**
+ * The feature id for the '<em><b>Display Filter</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TABLE_HEADER_AXIS_CONFIGURATION__DISPLAY_FILTER = ABSTRACT_HEADER_AXIS_CONFIGURATION__DISPLAY_FILTER;
+
+ /**
+ * The feature id for the '<em><b>Display Index</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TABLE_HEADER_AXIS_CONFIGURATION__DISPLAY_INDEX = ABSTRACT_HEADER_AXIS_CONFIGURATION__DISPLAY_INDEX;
+
+ /**
+ * The feature id for the '<em><b>Owned Label Configurations</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TABLE_HEADER_AXIS_CONFIGURATION__OWNED_LABEL_CONFIGURATIONS = ABSTRACT_HEADER_AXIS_CONFIGURATION__OWNED_LABEL_CONFIGURATIONS;
+
+ /**
+ * The feature id for the '<em><b>Owned Axis Configurations</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TABLE_HEADER_AXIS_CONFIGURATION__OWNED_AXIS_CONFIGURATIONS = ABSTRACT_HEADER_AXIS_CONFIGURATION__OWNED_AXIS_CONFIGURATIONS;
+
+ /**
+ * The feature id for the '<em><b>Axis Managers</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TABLE_HEADER_AXIS_CONFIGURATION__AXIS_MANAGERS = ABSTRACT_HEADER_AXIS_CONFIGURATION_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>Table Header Axis Configuration</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TABLE_HEADER_AXIS_CONFIGURATION_FEATURE_COUNT = ABSTRACT_HEADER_AXIS_CONFIGURATION_FEATURE_COUNT + 1;
+
+ /**
+ * The operation id for the '<em>Get EAnnotation</em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TABLE_HEADER_AXIS_CONFIGURATION___GET_EANNOTATION__STRING = ABSTRACT_HEADER_AXIS_CONFIGURATION___GET_EANNOTATION__STRING;
+
+ /**
+ * The operation id for the '<em>Get Named Style</em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TABLE_HEADER_AXIS_CONFIGURATION___GET_NAMED_STYLE__ECLASS_STRING = ABSTRACT_HEADER_AXIS_CONFIGURATION___GET_NAMED_STYLE__ECLASS_STRING;
+
+ /**
+ * The operation id for the '<em>Get Style</em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TABLE_HEADER_AXIS_CONFIGURATION___GET_STYLE__ECLASS = ABSTRACT_HEADER_AXIS_CONFIGURATION___GET_STYLE__ECLASS;
+
+ /**
+ * The operation id for the '<em>Create Style</em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TABLE_HEADER_AXIS_CONFIGURATION___CREATE_STYLE__ECLASS = ABSTRACT_HEADER_AXIS_CONFIGURATION___CREATE_STYLE__ECLASS;
+
+ /**
+ * The number of operations of the '<em>Table Header Axis Configuration</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TABLE_HEADER_AXIS_CONFIGURATION_OPERATION_COUNT = ABSTRACT_HEADER_AXIS_CONFIGURATION_OPERATION_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.LocalTableHeaderAxisConfigurationImpl <em>Local Table Header Axis Configuration</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.LocalTableHeaderAxisConfigurationImpl
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.NattableaxisconfigurationPackageImpl#getLocalTableHeaderAxisConfiguration()
+ * @generated
+ */
+ int LOCAL_TABLE_HEADER_AXIS_CONFIGURATION = 4;
+
+ /**
+ * The feature id for the '<em><b>EAnnotations</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int LOCAL_TABLE_HEADER_AXIS_CONFIGURATION__EANNOTATIONS = ABSTRACT_HEADER_AXIS_CONFIGURATION__EANNOTATIONS;
+
+ /**
+ * The feature id for the '<em><b>Styles</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int LOCAL_TABLE_HEADER_AXIS_CONFIGURATION__STYLES = ABSTRACT_HEADER_AXIS_CONFIGURATION__STYLES;
+
+ /**
+ * The feature id for the '<em><b>Index Style</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int LOCAL_TABLE_HEADER_AXIS_CONFIGURATION__INDEX_STYLE = ABSTRACT_HEADER_AXIS_CONFIGURATION__INDEX_STYLE;
+
+ /**
+ * The feature id for the '<em><b>Display Label</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int LOCAL_TABLE_HEADER_AXIS_CONFIGURATION__DISPLAY_LABEL = ABSTRACT_HEADER_AXIS_CONFIGURATION__DISPLAY_LABEL;
+
+ /**
+ * The feature id for the '<em><b>Display Filter</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int LOCAL_TABLE_HEADER_AXIS_CONFIGURATION__DISPLAY_FILTER = ABSTRACT_HEADER_AXIS_CONFIGURATION__DISPLAY_FILTER;
+
+ /**
+ * The feature id for the '<em><b>Display Index</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int LOCAL_TABLE_HEADER_AXIS_CONFIGURATION__DISPLAY_INDEX = ABSTRACT_HEADER_AXIS_CONFIGURATION__DISPLAY_INDEX;
+
+ /**
+ * The feature id for the '<em><b>Owned Label Configurations</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int LOCAL_TABLE_HEADER_AXIS_CONFIGURATION__OWNED_LABEL_CONFIGURATIONS = ABSTRACT_HEADER_AXIS_CONFIGURATION__OWNED_LABEL_CONFIGURATIONS;
+
+ /**
+ * The feature id for the '<em><b>Owned Axis Configurations</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int LOCAL_TABLE_HEADER_AXIS_CONFIGURATION__OWNED_AXIS_CONFIGURATIONS = ABSTRACT_HEADER_AXIS_CONFIGURATION__OWNED_AXIS_CONFIGURATIONS;
+
+ /**
+ * The feature id for the '<em><b>Axis Manager Configurations</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int LOCAL_TABLE_HEADER_AXIS_CONFIGURATION__AXIS_MANAGER_CONFIGURATIONS = ABSTRACT_HEADER_AXIS_CONFIGURATION_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>Local Table Header Axis Configuration</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int LOCAL_TABLE_HEADER_AXIS_CONFIGURATION_FEATURE_COUNT = ABSTRACT_HEADER_AXIS_CONFIGURATION_FEATURE_COUNT + 1;
+
+ /**
+ * The operation id for the '<em>Get EAnnotation</em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int LOCAL_TABLE_HEADER_AXIS_CONFIGURATION___GET_EANNOTATION__STRING = ABSTRACT_HEADER_AXIS_CONFIGURATION___GET_EANNOTATION__STRING;
+
+ /**
+ * The operation id for the '<em>Get Named Style</em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int LOCAL_TABLE_HEADER_AXIS_CONFIGURATION___GET_NAMED_STYLE__ECLASS_STRING = ABSTRACT_HEADER_AXIS_CONFIGURATION___GET_NAMED_STYLE__ECLASS_STRING;
+
+ /**
+ * The operation id for the '<em>Get Style</em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int LOCAL_TABLE_HEADER_AXIS_CONFIGURATION___GET_STYLE__ECLASS = ABSTRACT_HEADER_AXIS_CONFIGURATION___GET_STYLE__ECLASS;
+
+ /**
+ * The operation id for the '<em>Create Style</em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int LOCAL_TABLE_HEADER_AXIS_CONFIGURATION___CREATE_STYLE__ECLASS = ABSTRACT_HEADER_AXIS_CONFIGURATION___CREATE_STYLE__ECLASS;
+
+ /**
+ * The number of operations of the '<em>Local Table Header Axis Configuration</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int LOCAL_TABLE_HEADER_AXIS_CONFIGURATION_OPERATION_COUNT = ABSTRACT_HEADER_AXIS_CONFIGURATION_OPERATION_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.IAxisConfiguration <em>IAxis Configuration</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.IAxisConfiguration
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.NattableaxisconfigurationPackageImpl#getIAxisConfiguration()
+ * @generated
+ */
+ int IAXIS_CONFIGURATION = 5;
+
+ /**
+ * The feature id for the '<em><b>EAnnotations</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int IAXIS_CONFIGURATION__EANNOTATIONS = NattablestylePackage.STYLED_ELEMENT__EANNOTATIONS;
+
+ /**
+ * The feature id for the '<em><b>Styles</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int IAXIS_CONFIGURATION__STYLES = NattablestylePackage.STYLED_ELEMENT__STYLES;
+
+ /**
+ * The number of structural features of the '<em>IAxis Configuration</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int IAXIS_CONFIGURATION_FEATURE_COUNT = NattablestylePackage.STYLED_ELEMENT_FEATURE_COUNT + 0;
+
+ /**
+ * The operation id for the '<em>Get EAnnotation</em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int IAXIS_CONFIGURATION___GET_EANNOTATION__STRING = NattablestylePackage.STYLED_ELEMENT___GET_EANNOTATION__STRING;
+
+ /**
+ * The operation id for the '<em>Get Named Style</em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int IAXIS_CONFIGURATION___GET_NAMED_STYLE__ECLASS_STRING = NattablestylePackage.STYLED_ELEMENT___GET_NAMED_STYLE__ECLASS_STRING;
+
+ /**
+ * The operation id for the '<em>Get Style</em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int IAXIS_CONFIGURATION___GET_STYLE__ECLASS = NattablestylePackage.STYLED_ELEMENT___GET_STYLE__ECLASS;
+
+ /**
+ * The operation id for the '<em>Create Style</em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int IAXIS_CONFIGURATION___CREATE_STYLE__ECLASS = NattablestylePackage.STYLED_ELEMENT___CREATE_STYLE__ECLASS;
+
+ /**
+ * The number of operations of the '<em>IAxis Configuration</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int IAXIS_CONFIGURATION_OPERATION_COUNT = NattablestylePackage.STYLED_ELEMENT_OPERATION_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.FeatureAxisConfigurationImpl <em>Feature Axis Configuration</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.FeatureAxisConfigurationImpl
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.NattableaxisconfigurationPackageImpl#getFeatureAxisConfiguration()
+ * @generated
+ */
+ int FEATURE_AXIS_CONFIGURATION = 6;
+
+ /**
+ * The feature id for the '<em><b>EAnnotations</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int FEATURE_AXIS_CONFIGURATION__EANNOTATIONS = IAXIS_CONFIGURATION__EANNOTATIONS;
+
+ /**
+ * The feature id for the '<em><b>Styles</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int FEATURE_AXIS_CONFIGURATION__STYLES = IAXIS_CONFIGURATION__STYLES;
+
+ /**
+ * The feature id for the '<em><b>Show Only Common Feature</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int FEATURE_AXIS_CONFIGURATION__SHOW_ONLY_COMMON_FEATURE = IAXIS_CONFIGURATION_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>Feature Axis Configuration</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int FEATURE_AXIS_CONFIGURATION_FEATURE_COUNT = IAXIS_CONFIGURATION_FEATURE_COUNT + 1;
+
+ /**
+ * The operation id for the '<em>Get EAnnotation</em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int FEATURE_AXIS_CONFIGURATION___GET_EANNOTATION__STRING = IAXIS_CONFIGURATION___GET_EANNOTATION__STRING;
+
+ /**
+ * The operation id for the '<em>Get Named Style</em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int FEATURE_AXIS_CONFIGURATION___GET_NAMED_STYLE__ECLASS_STRING = IAXIS_CONFIGURATION___GET_NAMED_STYLE__ECLASS_STRING;
+
+ /**
+ * The operation id for the '<em>Get Style</em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int FEATURE_AXIS_CONFIGURATION___GET_STYLE__ECLASS = IAXIS_CONFIGURATION___GET_STYLE__ECLASS;
+
+ /**
+ * The operation id for the '<em>Create Style</em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int FEATURE_AXIS_CONFIGURATION___CREATE_STYLE__ECLASS = IAXIS_CONFIGURATION___CREATE_STYLE__ECLASS;
+
+ /**
+ * The number of operations of the '<em>Feature Axis Configuration</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int FEATURE_AXIS_CONFIGURATION_OPERATION_COUNT = IAXIS_CONFIGURATION_OPERATION_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.IFillingConfiguration <em>IFilling Configuration</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.IFillingConfiguration
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.NattableaxisconfigurationPackageImpl#getIFillingConfiguration()
+ * @generated
+ */
+ int IFILLING_CONFIGURATION = 7;
+
+ /**
+ * The feature id for the '<em><b>EAnnotations</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int IFILLING_CONFIGURATION__EANNOTATIONS = IAXIS_CONFIGURATION__EANNOTATIONS;
+
+ /**
+ * The feature id for the '<em><b>Styles</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int IFILLING_CONFIGURATION__STYLES = IAXIS_CONFIGURATION__STYLES;
+
+ /**
+ * The number of structural features of the '<em>IFilling Configuration</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int IFILLING_CONFIGURATION_FEATURE_COUNT = IAXIS_CONFIGURATION_FEATURE_COUNT + 0;
+
+ /**
+ * The operation id for the '<em>Get EAnnotation</em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int IFILLING_CONFIGURATION___GET_EANNOTATION__STRING = IAXIS_CONFIGURATION___GET_EANNOTATION__STRING;
+
+ /**
+ * The operation id for the '<em>Get Named Style</em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int IFILLING_CONFIGURATION___GET_NAMED_STYLE__ECLASS_STRING = IAXIS_CONFIGURATION___GET_NAMED_STYLE__ECLASS_STRING;
+
+ /**
+ * The operation id for the '<em>Get Style</em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int IFILLING_CONFIGURATION___GET_STYLE__ECLASS = IAXIS_CONFIGURATION___GET_STYLE__ECLASS;
+
+ /**
+ * The operation id for the '<em>Create Style</em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int IFILLING_CONFIGURATION___CREATE_STYLE__ECLASS = IAXIS_CONFIGURATION___CREATE_STYLE__ECLASS;
+
+ /**
+ * The number of operations of the '<em>IFilling Configuration</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int IFILLING_CONFIGURATION_OPERATION_COUNT = IAXIS_CONFIGURATION_OPERATION_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.EStructuralFeatureValueFillingConfigurationImpl <em>EStructural Feature Value Filling Configuration</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.EStructuralFeatureValueFillingConfigurationImpl
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.NattableaxisconfigurationPackageImpl#getEStructuralFeatureValueFillingConfiguration()
+ * @generated
+ */
+ int ESTRUCTURAL_FEATURE_VALUE_FILLING_CONFIGURATION = 8;
+
+ /**
+ * The feature id for the '<em><b>EAnnotations</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ESTRUCTURAL_FEATURE_VALUE_FILLING_CONFIGURATION__EANNOTATIONS = IFILLING_CONFIGURATION__EANNOTATIONS;
+
+ /**
+ * The feature id for the '<em><b>Styles</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ESTRUCTURAL_FEATURE_VALUE_FILLING_CONFIGURATION__STYLES = IFILLING_CONFIGURATION__STYLES;
+
+ /**
+ * The feature id for the '<em><b>Listen Feature</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ESTRUCTURAL_FEATURE_VALUE_FILLING_CONFIGURATION__LISTEN_FEATURE = IFILLING_CONFIGURATION_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>EStructural Feature Value Filling Configuration</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ESTRUCTURAL_FEATURE_VALUE_FILLING_CONFIGURATION_FEATURE_COUNT = IFILLING_CONFIGURATION_FEATURE_COUNT + 1;
+
+ /**
+ * The operation id for the '<em>Get EAnnotation</em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ESTRUCTURAL_FEATURE_VALUE_FILLING_CONFIGURATION___GET_EANNOTATION__STRING = IFILLING_CONFIGURATION___GET_EANNOTATION__STRING;
+
+ /**
+ * The operation id for the '<em>Get Named Style</em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ESTRUCTURAL_FEATURE_VALUE_FILLING_CONFIGURATION___GET_NAMED_STYLE__ECLASS_STRING = IFILLING_CONFIGURATION___GET_NAMED_STYLE__ECLASS_STRING;
+
+ /**
+ * The operation id for the '<em>Get Style</em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ESTRUCTURAL_FEATURE_VALUE_FILLING_CONFIGURATION___GET_STYLE__ECLASS = IFILLING_CONFIGURATION___GET_STYLE__ECLASS;
+
+ /**
+ * The operation id for the '<em>Create Style</em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ESTRUCTURAL_FEATURE_VALUE_FILLING_CONFIGURATION___CREATE_STYLE__ECLASS = IFILLING_CONFIGURATION___CREATE_STYLE__ECLASS;
+
+ /**
+ * The number of operations of the '<em>EStructural Feature Value Filling Configuration</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ESTRUCTURAL_FEATURE_VALUE_FILLING_CONFIGURATION_OPERATION_COUNT = IFILLING_CONFIGURATION_OPERATION_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.IPasteConfigurationImpl <em>IPaste Configuration</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.IPasteConfigurationImpl
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.NattableaxisconfigurationPackageImpl#getIPasteConfiguration()
+ * @generated
+ */
+ int IPASTE_CONFIGURATION = 9;
+
+ /**
+ * The feature id for the '<em><b>EAnnotations</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int IPASTE_CONFIGURATION__EANNOTATIONS = IAXIS_CONFIGURATION__EANNOTATIONS;
+
+ /**
+ * The feature id for the '<em><b>Styles</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int IPASTE_CONFIGURATION__STYLES = IAXIS_CONFIGURATION__STYLES;
+
+ /**
+ * The feature id for the '<em><b>Post Actions</b></em>' attribute list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int IPASTE_CONFIGURATION__POST_ACTIONS = IAXIS_CONFIGURATION_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Detached Mode</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int IPASTE_CONFIGURATION__DETACHED_MODE = IAXIS_CONFIGURATION_FEATURE_COUNT + 1;
+
+ /**
+ * The number of structural features of the '<em>IPaste Configuration</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int IPASTE_CONFIGURATION_FEATURE_COUNT = IAXIS_CONFIGURATION_FEATURE_COUNT + 2;
+
+ /**
+ * The operation id for the '<em>Get EAnnotation</em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int IPASTE_CONFIGURATION___GET_EANNOTATION__STRING = IAXIS_CONFIGURATION___GET_EANNOTATION__STRING;
+
+ /**
+ * The operation id for the '<em>Get Named Style</em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int IPASTE_CONFIGURATION___GET_NAMED_STYLE__ECLASS_STRING = IAXIS_CONFIGURATION___GET_NAMED_STYLE__ECLASS_STRING;
+
+ /**
+ * The operation id for the '<em>Get Style</em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int IPASTE_CONFIGURATION___GET_STYLE__ECLASS = IAXIS_CONFIGURATION___GET_STYLE__ECLASS;
+
+ /**
+ * The operation id for the '<em>Create Style</em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int IPASTE_CONFIGURATION___CREATE_STYLE__ECLASS = IAXIS_CONFIGURATION___CREATE_STYLE__ECLASS;
+
+ /**
+ * The number of operations of the '<em>IPaste Configuration</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int IPASTE_CONFIGURATION_OPERATION_COUNT = IAXIS_CONFIGURATION_OPERATION_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.PasteEObjectConfigurationImpl <em>Paste EObject Configuration</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.PasteEObjectConfigurationImpl
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.NattableaxisconfigurationPackageImpl#getPasteEObjectConfiguration()
+ * @generated
+ */
+ int PASTE_EOBJECT_CONFIGURATION = 10;
+
+ /**
+ * The feature id for the '<em><b>EAnnotations</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PASTE_EOBJECT_CONFIGURATION__EANNOTATIONS = IPASTE_CONFIGURATION__EANNOTATIONS;
+
+ /**
+ * The feature id for the '<em><b>Styles</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PASTE_EOBJECT_CONFIGURATION__STYLES = IPASTE_CONFIGURATION__STYLES;
+
+ /**
+ * The feature id for the '<em><b>Post Actions</b></em>' attribute list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PASTE_EOBJECT_CONFIGURATION__POST_ACTIONS = IPASTE_CONFIGURATION__POST_ACTIONS;
+
+ /**
+ * The feature id for the '<em><b>Detached Mode</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PASTE_EOBJECT_CONFIGURATION__DETACHED_MODE = IPASTE_CONFIGURATION__DETACHED_MODE;
+
+ /**
+ * The feature id for the '<em><b>Pasted Element Id</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PASTE_EOBJECT_CONFIGURATION__PASTED_ELEMENT_ID = IPASTE_CONFIGURATION_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Paste Element Containement Feature</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PASTE_EOBJECT_CONFIGURATION__PASTE_ELEMENT_CONTAINEMENT_FEATURE = IPASTE_CONFIGURATION_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the '<em><b>Axis Identifier</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PASTE_EOBJECT_CONFIGURATION__AXIS_IDENTIFIER = IPASTE_CONFIGURATION_FEATURE_COUNT + 2;
+
+ /**
+ * The number of structural features of the '<em>Paste EObject Configuration</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PASTE_EOBJECT_CONFIGURATION_FEATURE_COUNT = IPASTE_CONFIGURATION_FEATURE_COUNT + 3;
+
+ /**
+ * The operation id for the '<em>Get EAnnotation</em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PASTE_EOBJECT_CONFIGURATION___GET_EANNOTATION__STRING = IPASTE_CONFIGURATION___GET_EANNOTATION__STRING;
+
+ /**
+ * The operation id for the '<em>Get Named Style</em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PASTE_EOBJECT_CONFIGURATION___GET_NAMED_STYLE__ECLASS_STRING = IPASTE_CONFIGURATION___GET_NAMED_STYLE__ECLASS_STRING;
+
+ /**
+ * The operation id for the '<em>Get Style</em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PASTE_EOBJECT_CONFIGURATION___GET_STYLE__ECLASS = IPASTE_CONFIGURATION___GET_STYLE__ECLASS;
+
+ /**
+ * The operation id for the '<em>Create Style</em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PASTE_EOBJECT_CONFIGURATION___CREATE_STYLE__ECLASS = IPASTE_CONFIGURATION___CREATE_STYLE__ECLASS;
+
+ /**
+ * The number of operations of the '<em>Paste EObject Configuration</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PASTE_EOBJECT_CONFIGURATION_OPERATION_COUNT = IPASTE_CONFIGURATION_OPERATION_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.TreeFillingConfigurationImpl <em>Tree Filling Configuration</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.TreeFillingConfigurationImpl
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.NattableaxisconfigurationPackageImpl#getTreeFillingConfiguration()
+ * @generated
+ */
+ int TREE_FILLING_CONFIGURATION = 11;
+
+ /**
+ * The feature id for the '<em><b>EAnnotations</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TREE_FILLING_CONFIGURATION__EANNOTATIONS = IFILLING_CONFIGURATION__EANNOTATIONS;
+
+ /**
+ * The feature id for the '<em><b>Styles</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TREE_FILLING_CONFIGURATION__STYLES = IFILLING_CONFIGURATION__STYLES;
+
+ /**
+ * The feature id for the '<em><b>Axis Used As Axis Provider</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TREE_FILLING_CONFIGURATION__AXIS_USED_AS_AXIS_PROVIDER = IFILLING_CONFIGURATION_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Paste Configuration</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TREE_FILLING_CONFIGURATION__PASTE_CONFIGURATION = IFILLING_CONFIGURATION_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the '<em><b>Depth</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TREE_FILLING_CONFIGURATION__DEPTH = IFILLING_CONFIGURATION_FEATURE_COUNT + 2;
+
+ /**
+ * The feature id for the '<em><b>Label Provider</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TREE_FILLING_CONFIGURATION__LABEL_PROVIDER = IFILLING_CONFIGURATION_FEATURE_COUNT + 3;
+
+ /**
+ * The feature id for the '<em><b>Label Provider Context</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TREE_FILLING_CONFIGURATION__LABEL_PROVIDER_CONTEXT = IFILLING_CONFIGURATION_FEATURE_COUNT + 4;
+
+ /**
+ * The number of structural features of the '<em>Tree Filling Configuration</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TREE_FILLING_CONFIGURATION_FEATURE_COUNT = IFILLING_CONFIGURATION_FEATURE_COUNT + 5;
+
+ /**
+ * The operation id for the '<em>Get EAnnotation</em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TREE_FILLING_CONFIGURATION___GET_EANNOTATION__STRING = IFILLING_CONFIGURATION___GET_EANNOTATION__STRING;
+
+ /**
+ * The operation id for the '<em>Get Named Style</em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TREE_FILLING_CONFIGURATION___GET_NAMED_STYLE__ECLASS_STRING = IFILLING_CONFIGURATION___GET_NAMED_STYLE__ECLASS_STRING;
+
+ /**
+ * The operation id for the '<em>Get Style</em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TREE_FILLING_CONFIGURATION___GET_STYLE__ECLASS = IFILLING_CONFIGURATION___GET_STYLE__ECLASS;
+
+ /**
+ * The operation id for the '<em>Create Style</em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TREE_FILLING_CONFIGURATION___CREATE_STYLE__ECLASS = IFILLING_CONFIGURATION___CREATE_STYLE__ECLASS;
+
+ /**
+ * The number of operations of the '<em>Tree Filling Configuration</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TREE_FILLING_CONFIGURATION_OPERATION_COUNT = IFILLING_CONFIGURATION_OPERATION_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AxisIndexStyle <em>Axis Index Style</em>}' enum.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AxisIndexStyle
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.NattableaxisconfigurationPackageImpl#getAxisIndexStyle()
+ * @generated
+ */
+ int AXIS_INDEX_STYLE = 12;
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AbstractHeaderAxisConfiguration <em>Abstract Header Axis Configuration</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Abstract Header Axis Configuration</em>'.
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AbstractHeaderAxisConfiguration
+ * @generated
+ */
+ EClass getAbstractHeaderAxisConfiguration();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AbstractHeaderAxisConfiguration#getIndexStyle <em>Index Style</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Index Style</em>'.
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AbstractHeaderAxisConfiguration#getIndexStyle()
+ * @see #getAbstractHeaderAxisConfiguration()
+ * @generated
+ */
+ EAttribute getAbstractHeaderAxisConfiguration_IndexStyle();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AbstractHeaderAxisConfiguration#isDisplayLabel <em>Display Label</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Display Label</em>'.
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AbstractHeaderAxisConfiguration#isDisplayLabel()
+ * @see #getAbstractHeaderAxisConfiguration()
+ * @generated
+ */
+ EAttribute getAbstractHeaderAxisConfiguration_DisplayLabel();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AbstractHeaderAxisConfiguration#isDisplayFilter <em>Display Filter</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Display Filter</em>'.
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AbstractHeaderAxisConfiguration#isDisplayFilter()
+ * @see #getAbstractHeaderAxisConfiguration()
+ * @generated
+ */
+ EAttribute getAbstractHeaderAxisConfiguration_DisplayFilter();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AbstractHeaderAxisConfiguration#isDisplayIndex <em>Display Index</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Display Index</em>'.
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AbstractHeaderAxisConfiguration#isDisplayIndex()
+ * @see #getAbstractHeaderAxisConfiguration()
+ * @generated
+ */
+ EAttribute getAbstractHeaderAxisConfiguration_DisplayIndex();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AbstractHeaderAxisConfiguration#getOwnedLabelConfigurations <em>Owned Label Configurations</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Owned Label Configurations</em>'.
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AbstractHeaderAxisConfiguration#getOwnedLabelConfigurations()
+ * @see #getAbstractHeaderAxisConfiguration()
+ * @generated
+ */
+ EReference getAbstractHeaderAxisConfiguration_OwnedLabelConfigurations();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AbstractHeaderAxisConfiguration#getOwnedAxisConfigurations <em>Owned Axis Configurations</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Owned Axis Configurations</em>'.
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AbstractHeaderAxisConfiguration#getOwnedAxisConfigurations()
+ * @see #getAbstractHeaderAxisConfiguration()
+ * @generated
+ */
+ EReference getAbstractHeaderAxisConfiguration_OwnedAxisConfigurations();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AxisManagerRepresentation <em>Axis Manager Representation</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Axis Manager Representation</em>'.
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AxisManagerRepresentation
+ * @generated
+ */
+ EClass getAxisManagerRepresentation();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AxisManagerRepresentation#getAxisManagerId <em>Axis Manager Id</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Axis Manager Id</em>'.
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AxisManagerRepresentation#getAxisManagerId()
+ * @see #getAxisManagerRepresentation()
+ * @generated
+ */
+ EAttribute getAxisManagerRepresentation_AxisManagerId();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AxisManagerRepresentation#getLabelProviderContext <em>Label Provider Context</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Label Provider Context</em>'.
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AxisManagerRepresentation#getLabelProviderContext()
+ * @see #getAxisManagerRepresentation()
+ * @generated
+ */
+ EAttribute getAxisManagerRepresentation_LabelProviderContext();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AxisManagerRepresentation#getHeaderLabelConfiguration <em>Header Label Configuration</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Header Label Configuration</em>'.
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AxisManagerRepresentation#getHeaderLabelConfiguration()
+ * @see #getAxisManagerRepresentation()
+ * @generated
+ */
+ EReference getAxisManagerRepresentation_HeaderLabelConfiguration();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AxisManagerRepresentation#getSpecificAxisConfigurations <em>Specific Axis Configurations</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference list '<em>Specific Axis Configurations</em>'.
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AxisManagerRepresentation#getSpecificAxisConfigurations()
+ * @see #getAxisManagerRepresentation()
+ * @generated
+ */
+ EReference getAxisManagerRepresentation_SpecificAxisConfigurations();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AxisManagerConfiguration <em>Axis Manager Configuration</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Axis Manager Configuration</em>'.
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AxisManagerConfiguration
+ * @generated
+ */
+ EClass getAxisManagerConfiguration();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AxisManagerConfiguration#getLocalHeaderLabelConfiguration <em>Local Header Label Configuration</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Local Header Label Configuration</em>'.
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AxisManagerConfiguration#getLocalHeaderLabelConfiguration()
+ * @see #getAxisManagerConfiguration()
+ * @generated
+ */
+ EReference getAxisManagerConfiguration_LocalHeaderLabelConfiguration();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AxisManagerConfiguration#getAxisManager <em>Axis Manager</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Axis Manager</em>'.
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AxisManagerConfiguration#getAxisManager()
+ * @see #getAxisManagerConfiguration()
+ * @generated
+ */
+ EReference getAxisManagerConfiguration_AxisManager();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AxisManagerConfiguration#getLocalSpecificConfigurations <em>Local Specific Configurations</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference list '<em>Local Specific Configurations</em>'.
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AxisManagerConfiguration#getLocalSpecificConfigurations()
+ * @see #getAxisManagerConfiguration()
+ * @generated
+ */
+ EReference getAxisManagerConfiguration_LocalSpecificConfigurations();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.TableHeaderAxisConfiguration <em>Table Header Axis Configuration</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Table Header Axis Configuration</em>'.
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.TableHeaderAxisConfiguration
+ * @generated
+ */
+ EClass getTableHeaderAxisConfiguration();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.TableHeaderAxisConfiguration#getAxisManagers <em>Axis Managers</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Axis Managers</em>'.
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.TableHeaderAxisConfiguration#getAxisManagers()
+ * @see #getTableHeaderAxisConfiguration()
+ * @generated
+ */
+ EReference getTableHeaderAxisConfiguration_AxisManagers();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.LocalTableHeaderAxisConfiguration <em>Local Table Header Axis Configuration</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Local Table Header Axis Configuration</em>'.
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.LocalTableHeaderAxisConfiguration
+ * @generated
+ */
+ EClass getLocalTableHeaderAxisConfiguration();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.LocalTableHeaderAxisConfiguration#getAxisManagerConfigurations <em>Axis Manager Configurations</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Axis Manager Configurations</em>'.
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.LocalTableHeaderAxisConfiguration#getAxisManagerConfigurations()
+ * @see #getLocalTableHeaderAxisConfiguration()
+ * @generated
+ */
+ EReference getLocalTableHeaderAxisConfiguration_AxisManagerConfigurations();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.IAxisConfiguration <em>IAxis Configuration</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>IAxis Configuration</em>'.
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.IAxisConfiguration
+ * @generated
+ */
+ EClass getIAxisConfiguration();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.FeatureAxisConfiguration <em>Feature Axis Configuration</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Feature Axis Configuration</em>'.
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.FeatureAxisConfiguration
+ * @generated
+ */
+ EClass getFeatureAxisConfiguration();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.FeatureAxisConfiguration#isShowOnlyCommonFeature <em>Show Only Common Feature</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Show Only Common Feature</em>'.
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.FeatureAxisConfiguration#isShowOnlyCommonFeature()
+ * @see #getFeatureAxisConfiguration()
+ * @generated
+ */
+ EAttribute getFeatureAxisConfiguration_ShowOnlyCommonFeature();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.IFillingConfiguration <em>IFilling Configuration</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>IFilling Configuration</em>'.
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.IFillingConfiguration
+ * @generated
+ */
+ EClass getIFillingConfiguration();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.EStructuralFeatureValueFillingConfiguration <em>EStructural Feature Value Filling Configuration</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>EStructural Feature Value Filling Configuration</em>'.
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.EStructuralFeatureValueFillingConfiguration
+ * @generated
+ */
+ EClass getEStructuralFeatureValueFillingConfiguration();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.EStructuralFeatureValueFillingConfiguration#getListenFeature <em>Listen Feature</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Listen Feature</em>'.
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.EStructuralFeatureValueFillingConfiguration#getListenFeature()
+ * @see #getEStructuralFeatureValueFillingConfiguration()
+ * @generated
+ */
+ EReference getEStructuralFeatureValueFillingConfiguration_ListenFeature();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.IPasteConfiguration <em>IPaste Configuration</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>IPaste Configuration</em>'.
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.IPasteConfiguration
+ * @generated
+ */
+ EClass getIPasteConfiguration();
+
+ /**
+ * Returns the meta object for the attribute list '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.IPasteConfiguration#getPostActions <em>Post Actions</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute list '<em>Post Actions</em>'.
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.IPasteConfiguration#getPostActions()
+ * @see #getIPasteConfiguration()
+ * @generated
+ */
+ EAttribute getIPasteConfiguration_PostActions();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.IPasteConfiguration#isDetachedMode <em>Detached Mode</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Detached Mode</em>'.
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.IPasteConfiguration#isDetachedMode()
+ * @see #getIPasteConfiguration()
+ * @generated
+ */
+ EAttribute getIPasteConfiguration_DetachedMode();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.PasteEObjectConfiguration <em>Paste EObject Configuration</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Paste EObject Configuration</em>'.
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.PasteEObjectConfiguration
+ * @generated
+ */
+ EClass getPasteEObjectConfiguration();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.PasteEObjectConfiguration#getPastedElementId <em>Pasted Element Id</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Pasted Element Id</em>'.
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.PasteEObjectConfiguration#getPastedElementId()
+ * @see #getPasteEObjectConfiguration()
+ * @generated
+ */
+ EAttribute getPasteEObjectConfiguration_PastedElementId();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.PasteEObjectConfiguration#getPasteElementContainementFeature <em>Paste Element Containement Feature</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Paste Element Containement Feature</em>'.
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.PasteEObjectConfiguration#getPasteElementContainementFeature()
+ * @see #getPasteEObjectConfiguration()
+ * @generated
+ */
+ EReference getPasteEObjectConfiguration_PasteElementContainementFeature();
+
+ /**
+ * Returns the meta object for the containment reference '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.PasteEObjectConfiguration#getAxisIdentifier <em>Axis Identifier</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference '<em>Axis Identifier</em>'.
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.PasteEObjectConfiguration#getAxisIdentifier()
+ * @see #getPasteEObjectConfiguration()
+ * @generated
+ */
+ EReference getPasteEObjectConfiguration_AxisIdentifier();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.TreeFillingConfiguration <em>Tree Filling Configuration</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Tree Filling Configuration</em>'.
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.TreeFillingConfiguration
+ * @generated
+ */
+ EClass getTreeFillingConfiguration();
+
+ /**
+ * Returns the meta object for the containment reference '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.TreeFillingConfiguration#getAxisUsedAsAxisProvider <em>Axis Used As Axis Provider</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference '<em>Axis Used As Axis Provider</em>'.
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.TreeFillingConfiguration#getAxisUsedAsAxisProvider()
+ * @see #getTreeFillingConfiguration()
+ * @generated
+ */
+ EReference getTreeFillingConfiguration_AxisUsedAsAxisProvider();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.TreeFillingConfiguration#getPasteConfiguration <em>Paste Configuration</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Paste Configuration</em>'.
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.TreeFillingConfiguration#getPasteConfiguration()
+ * @see #getTreeFillingConfiguration()
+ * @generated
+ */
+ EReference getTreeFillingConfiguration_PasteConfiguration();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.TreeFillingConfiguration#getDepth <em>Depth</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Depth</em>'.
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.TreeFillingConfiguration#getDepth()
+ * @see #getTreeFillingConfiguration()
+ * @generated
+ */
+ EAttribute getTreeFillingConfiguration_Depth();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.TreeFillingConfiguration#getLabelProvider <em>Label Provider</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Label Provider</em>'.
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.TreeFillingConfiguration#getLabelProvider()
+ * @see #getTreeFillingConfiguration()
+ * @generated
+ */
+ EReference getTreeFillingConfiguration_LabelProvider();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.TreeFillingConfiguration#getLabelProviderContext <em>Label Provider Context</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Label Provider Context</em>'.
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.TreeFillingConfiguration#getLabelProviderContext()
+ * @see #getTreeFillingConfiguration()
+ * @generated
+ */
+ EAttribute getTreeFillingConfiguration_LabelProviderContext();
+
+ /**
+ * Returns the meta object for enum '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AxisIndexStyle <em>Axis Index Style</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for enum '<em>Axis Index Style</em>'.
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AxisIndexStyle
+ * @generated
+ */
+ EEnum getAxisIndexStyle();
+
+ /**
+ * Returns the factory that creates the instances of the model.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the factory that creates the instances of the model.
+ * @generated
+ */
+ NattableaxisconfigurationFactory getNattableaxisconfigurationFactory();
+
+ /**
+ * <!-- begin-user-doc -->
+ * Defines literals for the meta objects that represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each operation of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ interface Literals {
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.AbstractHeaderAxisConfigurationImpl <em>Abstract Header Axis Configuration</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.AbstractHeaderAxisConfigurationImpl
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.NattableaxisconfigurationPackageImpl#getAbstractHeaderAxisConfiguration()
+ * @generated
+ */
+ EClass ABSTRACT_HEADER_AXIS_CONFIGURATION = eINSTANCE.getAbstractHeaderAxisConfiguration();
+
+ /**
+ * The meta object literal for the '<em><b>Index Style</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute ABSTRACT_HEADER_AXIS_CONFIGURATION__INDEX_STYLE = eINSTANCE.getAbstractHeaderAxisConfiguration_IndexStyle();
+
+ /**
+ * The meta object literal for the '<em><b>Display Label</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute ABSTRACT_HEADER_AXIS_CONFIGURATION__DISPLAY_LABEL = eINSTANCE.getAbstractHeaderAxisConfiguration_DisplayLabel();
+
+ /**
+ * The meta object literal for the '<em><b>Display Filter</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute ABSTRACT_HEADER_AXIS_CONFIGURATION__DISPLAY_FILTER = eINSTANCE.getAbstractHeaderAxisConfiguration_DisplayFilter();
+
+ /**
+ * The meta object literal for the '<em><b>Display Index</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute ABSTRACT_HEADER_AXIS_CONFIGURATION__DISPLAY_INDEX = eINSTANCE.getAbstractHeaderAxisConfiguration_DisplayIndex();
+
+ /**
+ * The meta object literal for the '<em><b>Owned Label Configurations</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference ABSTRACT_HEADER_AXIS_CONFIGURATION__OWNED_LABEL_CONFIGURATIONS = eINSTANCE.getAbstractHeaderAxisConfiguration_OwnedLabelConfigurations();
+
+ /**
+ * The meta object literal for the '<em><b>Owned Axis Configurations</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference ABSTRACT_HEADER_AXIS_CONFIGURATION__OWNED_AXIS_CONFIGURATIONS = eINSTANCE.getAbstractHeaderAxisConfiguration_OwnedAxisConfigurations();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.AxisManagerRepresentationImpl <em>Axis Manager Representation</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.AxisManagerRepresentationImpl
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.NattableaxisconfigurationPackageImpl#getAxisManagerRepresentation()
+ * @generated
+ */
+ EClass AXIS_MANAGER_REPRESENTATION = eINSTANCE.getAxisManagerRepresentation();
+
+ /**
+ * The meta object literal for the '<em><b>Axis Manager Id</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute AXIS_MANAGER_REPRESENTATION__AXIS_MANAGER_ID = eINSTANCE.getAxisManagerRepresentation_AxisManagerId();
+
+ /**
+ * The meta object literal for the '<em><b>Label Provider Context</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute AXIS_MANAGER_REPRESENTATION__LABEL_PROVIDER_CONTEXT = eINSTANCE.getAxisManagerRepresentation_LabelProviderContext();
+
+ /**
+ * The meta object literal for the '<em><b>Header Label Configuration</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference AXIS_MANAGER_REPRESENTATION__HEADER_LABEL_CONFIGURATION = eINSTANCE.getAxisManagerRepresentation_HeaderLabelConfiguration();
+
+ /**
+ * The meta object literal for the '<em><b>Specific Axis Configurations</b></em>' reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference AXIS_MANAGER_REPRESENTATION__SPECIFIC_AXIS_CONFIGURATIONS = eINSTANCE.getAxisManagerRepresentation_SpecificAxisConfigurations();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.AxisManagerConfigurationImpl <em>Axis Manager Configuration</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.AxisManagerConfigurationImpl
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.NattableaxisconfigurationPackageImpl#getAxisManagerConfiguration()
+ * @generated
+ */
+ EClass AXIS_MANAGER_CONFIGURATION = eINSTANCE.getAxisManagerConfiguration();
+
+ /**
+ * The meta object literal for the '<em><b>Local Header Label Configuration</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference AXIS_MANAGER_CONFIGURATION__LOCAL_HEADER_LABEL_CONFIGURATION = eINSTANCE.getAxisManagerConfiguration_LocalHeaderLabelConfiguration();
+
+ /**
+ * The meta object literal for the '<em><b>Axis Manager</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference AXIS_MANAGER_CONFIGURATION__AXIS_MANAGER = eINSTANCE.getAxisManagerConfiguration_AxisManager();
+
+ /**
+ * The meta object literal for the '<em><b>Local Specific Configurations</b></em>' reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference AXIS_MANAGER_CONFIGURATION__LOCAL_SPECIFIC_CONFIGURATIONS = eINSTANCE.getAxisManagerConfiguration_LocalSpecificConfigurations();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.TableHeaderAxisConfigurationImpl <em>Table Header Axis Configuration</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.TableHeaderAxisConfigurationImpl
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.NattableaxisconfigurationPackageImpl#getTableHeaderAxisConfiguration()
+ * @generated
+ */
+ EClass TABLE_HEADER_AXIS_CONFIGURATION = eINSTANCE.getTableHeaderAxisConfiguration();
+
+ /**
+ * The meta object literal for the '<em><b>Axis Managers</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference TABLE_HEADER_AXIS_CONFIGURATION__AXIS_MANAGERS = eINSTANCE.getTableHeaderAxisConfiguration_AxisManagers();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.LocalTableHeaderAxisConfigurationImpl <em>Local Table Header Axis Configuration</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.LocalTableHeaderAxisConfigurationImpl
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.NattableaxisconfigurationPackageImpl#getLocalTableHeaderAxisConfiguration()
+ * @generated
+ */
+ EClass LOCAL_TABLE_HEADER_AXIS_CONFIGURATION = eINSTANCE.getLocalTableHeaderAxisConfiguration();
+
+ /**
+ * The meta object literal for the '<em><b>Axis Manager Configurations</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference LOCAL_TABLE_HEADER_AXIS_CONFIGURATION__AXIS_MANAGER_CONFIGURATIONS = eINSTANCE.getLocalTableHeaderAxisConfiguration_AxisManagerConfigurations();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.IAxisConfiguration <em>IAxis Configuration</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.IAxisConfiguration
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.NattableaxisconfigurationPackageImpl#getIAxisConfiguration()
+ * @generated
+ */
+ EClass IAXIS_CONFIGURATION = eINSTANCE.getIAxisConfiguration();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.FeatureAxisConfigurationImpl <em>Feature Axis Configuration</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.FeatureAxisConfigurationImpl
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.NattableaxisconfigurationPackageImpl#getFeatureAxisConfiguration()
+ * @generated
+ */
+ EClass FEATURE_AXIS_CONFIGURATION = eINSTANCE.getFeatureAxisConfiguration();
+
+ /**
+ * The meta object literal for the '<em><b>Show Only Common Feature</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute FEATURE_AXIS_CONFIGURATION__SHOW_ONLY_COMMON_FEATURE = eINSTANCE.getFeatureAxisConfiguration_ShowOnlyCommonFeature();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.IFillingConfiguration <em>IFilling Configuration</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.IFillingConfiguration
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.NattableaxisconfigurationPackageImpl#getIFillingConfiguration()
+ * @generated
+ */
+ EClass IFILLING_CONFIGURATION = eINSTANCE.getIFillingConfiguration();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.EStructuralFeatureValueFillingConfigurationImpl <em>EStructural Feature Value Filling Configuration</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.EStructuralFeatureValueFillingConfigurationImpl
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.NattableaxisconfigurationPackageImpl#getEStructuralFeatureValueFillingConfiguration()
+ * @generated
+ */
+ EClass ESTRUCTURAL_FEATURE_VALUE_FILLING_CONFIGURATION = eINSTANCE.getEStructuralFeatureValueFillingConfiguration();
+
+ /**
+ * The meta object literal for the '<em><b>Listen Feature</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference ESTRUCTURAL_FEATURE_VALUE_FILLING_CONFIGURATION__LISTEN_FEATURE = eINSTANCE.getEStructuralFeatureValueFillingConfiguration_ListenFeature();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.IPasteConfigurationImpl <em>IPaste Configuration</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.IPasteConfigurationImpl
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.NattableaxisconfigurationPackageImpl#getIPasteConfiguration()
+ * @generated
+ */
+ EClass IPASTE_CONFIGURATION = eINSTANCE.getIPasteConfiguration();
+
+ /**
+ * The meta object literal for the '<em><b>Post Actions</b></em>' attribute list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute IPASTE_CONFIGURATION__POST_ACTIONS = eINSTANCE.getIPasteConfiguration_PostActions();
+
+ /**
+ * The meta object literal for the '<em><b>Detached Mode</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute IPASTE_CONFIGURATION__DETACHED_MODE = eINSTANCE.getIPasteConfiguration_DetachedMode();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.PasteEObjectConfigurationImpl <em>Paste EObject Configuration</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.PasteEObjectConfigurationImpl
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.NattableaxisconfigurationPackageImpl#getPasteEObjectConfiguration()
+ * @generated
+ */
+ EClass PASTE_EOBJECT_CONFIGURATION = eINSTANCE.getPasteEObjectConfiguration();
+
+ /**
+ * The meta object literal for the '<em><b>Pasted Element Id</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute PASTE_EOBJECT_CONFIGURATION__PASTED_ELEMENT_ID = eINSTANCE.getPasteEObjectConfiguration_PastedElementId();
+
+ /**
+ * The meta object literal for the '<em><b>Paste Element Containement Feature</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference PASTE_EOBJECT_CONFIGURATION__PASTE_ELEMENT_CONTAINEMENT_FEATURE = eINSTANCE.getPasteEObjectConfiguration_PasteElementContainementFeature();
+
+ /**
+ * The meta object literal for the '<em><b>Axis Identifier</b></em>' containment reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference PASTE_EOBJECT_CONFIGURATION__AXIS_IDENTIFIER = eINSTANCE.getPasteEObjectConfiguration_AxisIdentifier();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.TreeFillingConfigurationImpl <em>Tree Filling Configuration</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.TreeFillingConfigurationImpl
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.NattableaxisconfigurationPackageImpl#getTreeFillingConfiguration()
+ * @generated
+ */
+ EClass TREE_FILLING_CONFIGURATION = eINSTANCE.getTreeFillingConfiguration();
+
+ /**
+ * The meta object literal for the '<em><b>Axis Used As Axis Provider</b></em>' containment reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference TREE_FILLING_CONFIGURATION__AXIS_USED_AS_AXIS_PROVIDER = eINSTANCE.getTreeFillingConfiguration_AxisUsedAsAxisProvider();
+
+ /**
+ * The meta object literal for the '<em><b>Paste Configuration</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference TREE_FILLING_CONFIGURATION__PASTE_CONFIGURATION = eINSTANCE.getTreeFillingConfiguration_PasteConfiguration();
+
+ /**
+ * The meta object literal for the '<em><b>Depth</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute TREE_FILLING_CONFIGURATION__DEPTH = eINSTANCE.getTreeFillingConfiguration_Depth();
+
+ /**
+ * The meta object literal for the '<em><b>Label Provider</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference TREE_FILLING_CONFIGURATION__LABEL_PROVIDER = eINSTANCE.getTreeFillingConfiguration_LabelProvider();
+
+ /**
+ * The meta object literal for the '<em><b>Label Provider Context</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute TREE_FILLING_CONFIGURATION__LABEL_PROVIDER_CONTEXT = eINSTANCE.getTreeFillingConfiguration_LabelProviderContext();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AxisIndexStyle <em>Axis Index Style</em>}' enum.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AxisIndexStyle
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.NattableaxisconfigurationPackageImpl#getAxisIndexStyle()
+ * @generated
+ */
+ EEnum AXIS_INDEX_STYLE = eINSTANCE.getAxisIndexStyle();
+ }
+} // NattableaxisconfigurationPackage
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/PasteEObjectConfiguration.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/PasteEObjectConfiguration.java
index a1cc369b803..03801563403 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/PasteEObjectConfiguration.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/PasteEObjectConfiguration.java
@@ -1,89 +1,117 @@
-/**
- * Copyright (c) 2013 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- */
-package org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration;
-
-import org.eclipse.emf.ecore.EStructuralFeature;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Paste EObject Configuration</b></em>'.
- * <!-- end-user-doc -->
- *
- * <!-- begin-model-doc -->
- * Configuration to use to paste EObject in the table.
- * <!-- end-model-doc -->
- *
- * <p>
- * The following features are supported:
- * </p>
- * <ul>
- * <li>{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.PasteEObjectConfiguration#getPastedElementId <em>Pasted Element Id</em>}</li>
- * <li>{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.PasteEObjectConfiguration#getPasteElementContainementFeature <em>Paste Element Containement Feature</em>}</li>
- * </ul>
- *
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.NattableaxisconfigurationPackage#getPasteEObjectConfiguration()
- * @model
- * @generated
- */
-public interface PasteEObjectConfiguration extends IPasteConfiguration {
-
- /**
- * Returns the value of the '<em><b>Pasted Element Id</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * <!-- begin-model-doc -->
- * The String representing the EClass of the elements to create (see papyrus services types for further information)
- * <!-- end-model-doc -->
- * @return the value of the '<em>Pasted Element Id</em>' attribute.
- * @see #setPastedElementId(String)
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.NattableaxisconfigurationPackage#getPasteEObjectConfiguration_PastedElementId()
- * @model
- * @generated
- */
- String getPastedElementId();
-
- /**
- * Sets the value of the '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.PasteEObjectConfiguration#getPastedElementId <em>Pasted Element Id</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Pasted Element Id</em>' attribute.
- * @see #getPastedElementId()
- * @generated
- */
- void setPastedElementId(String value);
-
- /**
- * Returns the value of the '<em><b>Paste Element Containement Feature</b></em>' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * <!-- begin-model-doc -->
- * This field references the feature of the context of the table in which the created element will be added.
- * <!-- end-model-doc -->
- * @return the value of the '<em>Paste Element Containement Feature</em>' reference.
- * @see #setPasteElementContainementFeature(EStructuralFeature)
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.NattableaxisconfigurationPackage#getPasteEObjectConfiguration_PasteElementContainementFeature()
- * @model
- * @generated
- */
- EStructuralFeature getPasteElementContainementFeature();
-
- /**
- * Sets the value of the '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.PasteEObjectConfiguration#getPasteElementContainementFeature <em>Paste Element Containement Feature</em>}' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Paste Element Containement Feature</em>' reference.
- * @see #getPasteElementContainementFeature()
- * @generated
- */
- void setPasteElementContainementFeature(EStructuralFeature value);
-} // PasteEObjectConfiguration
+/**
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ */
+package org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.IAxis;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Paste EObject Configuration</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <!-- begin-model-doc -->
+ * Configuration to use to paste EObject in the table.
+ * <!-- end-model-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * </p>
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.PasteEObjectConfiguration#getPastedElementId <em>Pasted Element Id</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.PasteEObjectConfiguration#getPasteElementContainementFeature <em>Paste Element Containement Feature</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.PasteEObjectConfiguration#getAxisIdentifier <em>Axis Identifier</em>}</li>
+ * </ul>
+ *
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.NattableaxisconfigurationPackage#getPasteEObjectConfiguration()
+ * @model
+ * @generated
+ */
+public interface PasteEObjectConfiguration extends IPasteConfiguration {
+
+ /**
+ * Returns the value of the '<em><b>Pasted Element Id</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * The String representing the EClass of the elements to create (see papyrus services types for further information)
+ * <!-- end-model-doc -->
+ * @return the value of the '<em>Pasted Element Id</em>' attribute.
+ * @see #setPastedElementId(String)
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.NattableaxisconfigurationPackage#getPasteEObjectConfiguration_PastedElementId()
+ * @model
+ * @generated
+ */
+ String getPastedElementId();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.PasteEObjectConfiguration#getPastedElementId <em>Pasted Element Id</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Pasted Element Id</em>' attribute.
+ * @see #getPastedElementId()
+ * @generated
+ */
+ void setPastedElementId(String value);
+
+ /**
+ * Returns the value of the '<em><b>Paste Element Containement Feature</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * This field references the feature of the context of the table in which the created element will be added.
+ * <!-- end-model-doc -->
+ * @return the value of the '<em>Paste Element Containement Feature</em>' reference.
+ * @see #setPasteElementContainementFeature(EStructuralFeature)
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.NattableaxisconfigurationPackage#getPasteEObjectConfiguration_PasteElementContainementFeature()
+ * @model
+ * @generated
+ */
+ EStructuralFeature getPasteElementContainementFeature();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.PasteEObjectConfiguration#getPasteElementContainementFeature <em>Paste Element Containement Feature</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Paste Element Containement Feature</em>' reference.
+ * @see #getPasteElementContainementFeature()
+ * @generated
+ */
+ void setPasteElementContainementFeature(EStructuralFeature value);
+
+ /**
+ * Returns the value of the '<em><b>Axis Identifier</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Axis Identifier</em>' containment reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Axis Identifier</em>' containment reference.
+ * @see #setAxisIdentifier(IAxis)
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.NattableaxisconfigurationPackage#getPasteEObjectConfiguration_AxisIdentifier()
+ * @model containment="true"
+ * @generated
+ */
+ IAxis getAxisIdentifier();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.PasteEObjectConfiguration#getAxisIdentifier <em>Axis Identifier</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Axis Identifier</em>' containment reference.
+ * @see #getAxisIdentifier()
+ * @generated
+ */
+ void setAxisIdentifier(IAxis value);
+} // PasteEObjectConfiguration
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/impl/NattableaxisconfigurationPackageImpl.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/impl/NattableaxisconfigurationPackageImpl.java
index 8a81e825c02..0cddd7d3714 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/impl/NattableaxisconfigurationPackageImpl.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/impl/NattableaxisconfigurationPackageImpl.java
@@ -1,891 +1,902 @@
-/**
- * Copyright (c) 2013 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- */
-package org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl;
-
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EEnum;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EReference;
-import org.eclipse.emf.ecore.EValidator;
-import org.eclipse.emf.ecore.EcorePackage;
-import org.eclipse.emf.ecore.impl.EPackageImpl;
-import org.eclipse.papyrus.infra.nattable.model.nattable.NattablePackage;
-import org.eclipse.papyrus.infra.nattable.model.nattable.impl.NattablePackageImpl;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.NattableaxisPackage;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.impl.NattableaxisPackageImpl;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AbstractHeaderAxisConfiguration;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AxisIndexStyle;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AxisManagerConfiguration;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AxisManagerRepresentation;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.EStructuralFeatureValueFillingConfiguration;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.FeatureAxisConfiguration;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.IAxisConfiguration;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.IFillingConfiguration;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.IPasteConfiguration;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.LocalTableHeaderAxisConfiguration;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.NattableaxisconfigurationFactory;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.NattableaxisconfigurationPackage;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.PasteEObjectConfiguration;
-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.model.nattable.nattableaxisconfiguration.util.NattableaxisconfigurationValidator;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisprovider.NattableaxisproviderPackage;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisprovider.impl.NattableaxisproviderPackageImpl;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattablecell.NattablecellPackage;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattablecell.impl.NattablecellPackageImpl;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableconfiguration.NattableconfigurationPackage;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableconfiguration.impl.NattableconfigurationPackageImpl;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattablelabelprovider.NattablelabelproviderPackage;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattablelabelprovider.impl.NattablelabelproviderPackageImpl;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableproblem.NattableproblemPackage;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableproblem.impl.NattableproblemPackageImpl;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattablestyle.NattablestylePackage;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattablestyle.impl.NattablestylePackageImpl;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattabletester.NattabletesterPackage;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattabletester.impl.NattabletesterPackageImpl;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model <b>Package</b>.
- * <!-- end-user-doc -->
- * @generated
- */
-public class NattableaxisconfigurationPackageImpl extends EPackageImpl implements NattableaxisconfigurationPackage {
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass abstractHeaderAxisConfigurationEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass axisManagerRepresentationEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass axisManagerConfigurationEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass tableHeaderAxisConfigurationEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass localTableHeaderAxisConfigurationEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass iAxisConfigurationEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass featureAxisConfigurationEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass iFillingConfigurationEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass eStructuralFeatureValueFillingConfigurationEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass iPasteConfigurationEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass pasteEObjectConfigurationEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass treeFillingConfigurationEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EEnum axisIndexStyleEEnum = null;
-
- /**
- * Creates an instance of the model <b>Package</b>, registered with
- * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
- * package URI value.
- * <p>Note: the correct way to create the package is via the static
- * factory method {@link #init init()}, which also performs
- * initialization of the package, or returns the registered package,
- * if one already exists.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @see org.eclipse.emf.ecore.EPackage.Registry
- * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.NattableaxisconfigurationPackage#eNS_URI
- * @see #init()
- * @generated
- */
- private NattableaxisconfigurationPackageImpl() {
- super(eNS_URI, NattableaxisconfigurationFactory.eINSTANCE);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private static boolean isInited = false;
-
- /**
- * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
- *
- * <p>This method is used to initialize {@link NattableaxisconfigurationPackage#eINSTANCE} when that field is accessed.
- * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @see #eNS_URI
- * @see #createPackageContents()
- * @see #initializePackageContents()
- * @generated
- */
- public static NattableaxisconfigurationPackage init() {
- if (isInited) return (NattableaxisconfigurationPackage)EPackage.Registry.INSTANCE.getEPackage(NattableaxisconfigurationPackage.eNS_URI);
-
- // Obtain or create and register package
- NattableaxisconfigurationPackageImpl theNattableaxisconfigurationPackage = (NattableaxisconfigurationPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof NattableaxisconfigurationPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new NattableaxisconfigurationPackageImpl());
-
- isInited = true;
-
- // Initialize simple dependencies
- EcorePackage.eINSTANCE.eClass();
-
- // Obtain or create and register interdependencies
- NattablePackageImpl theNattablePackage = (NattablePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(NattablePackage.eNS_URI) instanceof NattablePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(NattablePackage.eNS_URI) : NattablePackage.eINSTANCE);
- NattableconfigurationPackageImpl theNattableconfigurationPackage = (NattableconfigurationPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(NattableconfigurationPackage.eNS_URI) instanceof NattableconfigurationPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(NattableconfigurationPackage.eNS_URI) : NattableconfigurationPackage.eINSTANCE);
- NattableaxisproviderPackageImpl theNattableaxisproviderPackage = (NattableaxisproviderPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(NattableaxisproviderPackage.eNS_URI) instanceof NattableaxisproviderPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(NattableaxisproviderPackage.eNS_URI) : NattableaxisproviderPackage.eINSTANCE);
- NattablelabelproviderPackageImpl theNattablelabelproviderPackage = (NattablelabelproviderPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(NattablelabelproviderPackage.eNS_URI) instanceof NattablelabelproviderPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(NattablelabelproviderPackage.eNS_URI) : NattablelabelproviderPackage.eINSTANCE);
- NattabletesterPackageImpl theNattabletesterPackage = (NattabletesterPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(NattabletesterPackage.eNS_URI) instanceof NattabletesterPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(NattabletesterPackage.eNS_URI) : NattabletesterPackage.eINSTANCE);
- NattableaxisPackageImpl theNattableaxisPackage = (NattableaxisPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(NattableaxisPackage.eNS_URI) instanceof NattableaxisPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(NattableaxisPackage.eNS_URI) : NattableaxisPackage.eINSTANCE);
- NattablecellPackageImpl theNattablecellPackage = (NattablecellPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(NattablecellPackage.eNS_URI) instanceof NattablecellPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(NattablecellPackage.eNS_URI) : NattablecellPackage.eINSTANCE);
- NattableproblemPackageImpl theNattableproblemPackage = (NattableproblemPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(NattableproblemPackage.eNS_URI) instanceof NattableproblemPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(NattableproblemPackage.eNS_URI) : NattableproblemPackage.eINSTANCE);
- NattablestylePackageImpl theNattablestylePackage = (NattablestylePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(NattablestylePackage.eNS_URI) instanceof NattablestylePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(NattablestylePackage.eNS_URI) : NattablestylePackage.eINSTANCE);
-
- // Create package meta-data objects
- theNattableaxisconfigurationPackage.createPackageContents();
- theNattablePackage.createPackageContents();
- theNattableconfigurationPackage.createPackageContents();
- theNattableaxisproviderPackage.createPackageContents();
- theNattablelabelproviderPackage.createPackageContents();
- theNattabletesterPackage.createPackageContents();
- theNattableaxisPackage.createPackageContents();
- theNattablecellPackage.createPackageContents();
- theNattableproblemPackage.createPackageContents();
- theNattablestylePackage.createPackageContents();
-
- // Initialize created meta-data
- theNattableaxisconfigurationPackage.initializePackageContents();
- theNattablePackage.initializePackageContents();
- theNattableconfigurationPackage.initializePackageContents();
- theNattableaxisproviderPackage.initializePackageContents();
- theNattablelabelproviderPackage.initializePackageContents();
- theNattabletesterPackage.initializePackageContents();
- theNattableaxisPackage.initializePackageContents();
- theNattablecellPackage.initializePackageContents();
- theNattableproblemPackage.initializePackageContents();
- theNattablestylePackage.initializePackageContents();
-
- // Register package validator
- EValidator.Registry.INSTANCE.put
- (theNattableaxisconfigurationPackage,
- new EValidator.Descriptor() {
- public EValidator getEValidator() {
- return NattableaxisconfigurationValidator.INSTANCE;
- }
- });
-
- // Mark meta-data to indicate it can't be changed
- theNattableaxisconfigurationPackage.freeze();
-
-
- // Update the registry and return the package
- EPackage.Registry.INSTANCE.put(NattableaxisconfigurationPackage.eNS_URI, theNattableaxisconfigurationPackage);
- return theNattableaxisconfigurationPackage;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public EClass getAbstractHeaderAxisConfiguration() {
- return abstractHeaderAxisConfigurationEClass;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public EAttribute getAbstractHeaderAxisConfiguration_IndexStyle() {
- return (EAttribute)abstractHeaderAxisConfigurationEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public EAttribute getAbstractHeaderAxisConfiguration_DisplayLabel() {
- return (EAttribute)abstractHeaderAxisConfigurationEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public EAttribute getAbstractHeaderAxisConfiguration_DisplayFilter() {
- return (EAttribute)abstractHeaderAxisConfigurationEClass.getEStructuralFeatures().get(2);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public EAttribute getAbstractHeaderAxisConfiguration_DisplayIndex() {
- return (EAttribute)abstractHeaderAxisConfigurationEClass.getEStructuralFeatures().get(3);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public EReference getAbstractHeaderAxisConfiguration_OwnedLabelConfigurations() {
- return (EReference)abstractHeaderAxisConfigurationEClass.getEStructuralFeatures().get(4);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public EReference getAbstractHeaderAxisConfiguration_OwnedAxisConfigurations() {
- return (EReference)abstractHeaderAxisConfigurationEClass.getEStructuralFeatures().get(5);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public EClass getAxisManagerRepresentation() {
- return axisManagerRepresentationEClass;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public EAttribute getAxisManagerRepresentation_AxisManagerId() {
- return (EAttribute)axisManagerRepresentationEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public EAttribute getAxisManagerRepresentation_LabelProviderContext() {
- return (EAttribute)axisManagerRepresentationEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public EReference getAxisManagerRepresentation_HeaderLabelConfiguration() {
- return (EReference)axisManagerRepresentationEClass.getEStructuralFeatures().get(2);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public EReference getAxisManagerRepresentation_SpecificAxisConfigurations() {
- return (EReference)axisManagerRepresentationEClass.getEStructuralFeatures().get(3);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public EClass getAxisManagerConfiguration() {
- return axisManagerConfigurationEClass;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public EReference getAxisManagerConfiguration_LocalHeaderLabelConfiguration() {
- return (EReference)axisManagerConfigurationEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public EReference getAxisManagerConfiguration_AxisManager() {
- return (EReference)axisManagerConfigurationEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public EReference getAxisManagerConfiguration_LocalSpecificConfigurations() {
- return (EReference)axisManagerConfigurationEClass.getEStructuralFeatures().get(2);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public EClass getTableHeaderAxisConfiguration() {
- return tableHeaderAxisConfigurationEClass;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public EReference getTableHeaderAxisConfiguration_AxisManagers() {
- return (EReference)tableHeaderAxisConfigurationEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public EClass getLocalTableHeaderAxisConfiguration() {
- return localTableHeaderAxisConfigurationEClass;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public EReference getLocalTableHeaderAxisConfiguration_AxisManagerConfigurations() {
- return (EReference)localTableHeaderAxisConfigurationEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public EClass getIAxisConfiguration() {
- return iAxisConfigurationEClass;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public EClass getFeatureAxisConfiguration() {
- return featureAxisConfigurationEClass;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public EAttribute getFeatureAxisConfiguration_ShowOnlyCommonFeature() {
- return (EAttribute)featureAxisConfigurationEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public EClass getIFillingConfiguration() {
- return iFillingConfigurationEClass;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public EClass getEStructuralFeatureValueFillingConfiguration() {
- return eStructuralFeatureValueFillingConfigurationEClass;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public EReference getEStructuralFeatureValueFillingConfiguration_ListenFeature() {
- return (EReference)eStructuralFeatureValueFillingConfigurationEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public EClass getIPasteConfiguration() {
- return iPasteConfigurationEClass;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public EAttribute getIPasteConfiguration_PostActions() {
- return (EAttribute)iPasteConfigurationEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public EAttribute getIPasteConfiguration_DetachedMode() {
- return (EAttribute)iPasteConfigurationEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public EClass getPasteEObjectConfiguration() {
- return pasteEObjectConfigurationEClass;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public EAttribute getPasteEObjectConfiguration_PastedElementId() {
- return (EAttribute)pasteEObjectConfigurationEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public EReference getPasteEObjectConfiguration_PasteElementContainementFeature() {
- return (EReference)pasteEObjectConfigurationEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public EClass getTreeFillingConfiguration() {
- return treeFillingConfigurationEClass;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public EReference getTreeFillingConfiguration_AxisUsedAsAxisProvider() {
- return (EReference)treeFillingConfigurationEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public EReference getTreeFillingConfiguration_PasteConfiguration() {
- return (EReference)treeFillingConfigurationEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public EAttribute getTreeFillingConfiguration_Depth() {
- return (EAttribute)treeFillingConfigurationEClass.getEStructuralFeatures().get(2);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public EReference getTreeFillingConfiguration_LabelProvider() {
- return (EReference)treeFillingConfigurationEClass.getEStructuralFeatures().get(3);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public EAttribute getTreeFillingConfiguration_LabelProviderContext() {
- return (EAttribute)treeFillingConfigurationEClass.getEStructuralFeatures().get(4);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public EEnum getAxisIndexStyle() {
- return axisIndexStyleEEnum;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public NattableaxisconfigurationFactory getNattableaxisconfigurationFactory() {
- return (NattableaxisconfigurationFactory)getEFactoryInstance();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private boolean isCreated = false;
-
- /**
- * Creates the meta-model objects for the package. This method is
- * guarded to have no affect on any invocation but its first.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void createPackageContents() {
- if (isCreated) return;
- isCreated = true;
-
- // Create classes and their features
- abstractHeaderAxisConfigurationEClass = createEClass(ABSTRACT_HEADER_AXIS_CONFIGURATION);
- createEAttribute(abstractHeaderAxisConfigurationEClass, ABSTRACT_HEADER_AXIS_CONFIGURATION__INDEX_STYLE);
- createEAttribute(abstractHeaderAxisConfigurationEClass, ABSTRACT_HEADER_AXIS_CONFIGURATION__DISPLAY_LABEL);
- createEAttribute(abstractHeaderAxisConfigurationEClass, ABSTRACT_HEADER_AXIS_CONFIGURATION__DISPLAY_FILTER);
- createEAttribute(abstractHeaderAxisConfigurationEClass, ABSTRACT_HEADER_AXIS_CONFIGURATION__DISPLAY_INDEX);
- createEReference(abstractHeaderAxisConfigurationEClass, ABSTRACT_HEADER_AXIS_CONFIGURATION__OWNED_LABEL_CONFIGURATIONS);
- createEReference(abstractHeaderAxisConfigurationEClass, ABSTRACT_HEADER_AXIS_CONFIGURATION__OWNED_AXIS_CONFIGURATIONS);
-
- axisManagerRepresentationEClass = createEClass(AXIS_MANAGER_REPRESENTATION);
- createEAttribute(axisManagerRepresentationEClass, AXIS_MANAGER_REPRESENTATION__AXIS_MANAGER_ID);
- createEAttribute(axisManagerRepresentationEClass, AXIS_MANAGER_REPRESENTATION__LABEL_PROVIDER_CONTEXT);
- createEReference(axisManagerRepresentationEClass, AXIS_MANAGER_REPRESENTATION__HEADER_LABEL_CONFIGURATION);
- createEReference(axisManagerRepresentationEClass, AXIS_MANAGER_REPRESENTATION__SPECIFIC_AXIS_CONFIGURATIONS);
-
- axisManagerConfigurationEClass = createEClass(AXIS_MANAGER_CONFIGURATION);
- createEReference(axisManagerConfigurationEClass, AXIS_MANAGER_CONFIGURATION__LOCAL_HEADER_LABEL_CONFIGURATION);
- createEReference(axisManagerConfigurationEClass, AXIS_MANAGER_CONFIGURATION__AXIS_MANAGER);
- createEReference(axisManagerConfigurationEClass, AXIS_MANAGER_CONFIGURATION__LOCAL_SPECIFIC_CONFIGURATIONS);
-
- tableHeaderAxisConfigurationEClass = createEClass(TABLE_HEADER_AXIS_CONFIGURATION);
- createEReference(tableHeaderAxisConfigurationEClass, TABLE_HEADER_AXIS_CONFIGURATION__AXIS_MANAGERS);
-
- localTableHeaderAxisConfigurationEClass = createEClass(LOCAL_TABLE_HEADER_AXIS_CONFIGURATION);
- createEReference(localTableHeaderAxisConfigurationEClass, LOCAL_TABLE_HEADER_AXIS_CONFIGURATION__AXIS_MANAGER_CONFIGURATIONS);
-
- iAxisConfigurationEClass = createEClass(IAXIS_CONFIGURATION);
-
- featureAxisConfigurationEClass = createEClass(FEATURE_AXIS_CONFIGURATION);
- createEAttribute(featureAxisConfigurationEClass, FEATURE_AXIS_CONFIGURATION__SHOW_ONLY_COMMON_FEATURE);
-
- iFillingConfigurationEClass = createEClass(IFILLING_CONFIGURATION);
-
- eStructuralFeatureValueFillingConfigurationEClass = createEClass(ESTRUCTURAL_FEATURE_VALUE_FILLING_CONFIGURATION);
- createEReference(eStructuralFeatureValueFillingConfigurationEClass, ESTRUCTURAL_FEATURE_VALUE_FILLING_CONFIGURATION__LISTEN_FEATURE);
-
- iPasteConfigurationEClass = createEClass(IPASTE_CONFIGURATION);
- createEAttribute(iPasteConfigurationEClass, IPASTE_CONFIGURATION__POST_ACTIONS);
- createEAttribute(iPasteConfigurationEClass, IPASTE_CONFIGURATION__DETACHED_MODE);
-
- pasteEObjectConfigurationEClass = createEClass(PASTE_EOBJECT_CONFIGURATION);
- createEAttribute(pasteEObjectConfigurationEClass, PASTE_EOBJECT_CONFIGURATION__PASTED_ELEMENT_ID);
- createEReference(pasteEObjectConfigurationEClass, PASTE_EOBJECT_CONFIGURATION__PASTE_ELEMENT_CONTAINEMENT_FEATURE);
-
- treeFillingConfigurationEClass = createEClass(TREE_FILLING_CONFIGURATION);
- createEReference(treeFillingConfigurationEClass, TREE_FILLING_CONFIGURATION__AXIS_USED_AS_AXIS_PROVIDER);
- createEReference(treeFillingConfigurationEClass, TREE_FILLING_CONFIGURATION__PASTE_CONFIGURATION);
- createEAttribute(treeFillingConfigurationEClass, TREE_FILLING_CONFIGURATION__DEPTH);
- createEReference(treeFillingConfigurationEClass, TREE_FILLING_CONFIGURATION__LABEL_PROVIDER);
- createEAttribute(treeFillingConfigurationEClass, TREE_FILLING_CONFIGURATION__LABEL_PROVIDER_CONTEXT);
-
- // Create enums
- axisIndexStyleEEnum = createEEnum(AXIS_INDEX_STYLE);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private boolean isInitialized = false;
-
- /**
- * Complete the initialization of the package and its meta-model. This
- * method is guarded to have no affect on any invocation but its first.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void initializePackageContents() {
- if (isInitialized) return;
- isInitialized = true;
-
- // Initialize package
- setName(eNAME);
- setNsPrefix(eNS_PREFIX);
- setNsURI(eNS_URI);
-
- // Obtain other dependent packages
- NattablestylePackage theNattablestylePackage = (NattablestylePackage)EPackage.Registry.INSTANCE.getEPackage(NattablestylePackage.eNS_URI);
- NattablelabelproviderPackage theNattablelabelproviderPackage = (NattablelabelproviderPackage)EPackage.Registry.INSTANCE.getEPackage(NattablelabelproviderPackage.eNS_URI);
- NattableaxisPackage theNattableaxisPackage = (NattableaxisPackage)EPackage.Registry.INSTANCE.getEPackage(NattableaxisPackage.eNS_URI);
- EcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI);
-
- // Create type parameters
-
- // Set bounds for type parameters
-
- // Add supertypes to classes
- abstractHeaderAxisConfigurationEClass.getESuperTypes().add(theNattablestylePackage.getStyledElement());
- axisManagerRepresentationEClass.getESuperTypes().add(theNattablestylePackage.getStyledElement());
- axisManagerConfigurationEClass.getESuperTypes().add(theNattablestylePackage.getStyledElement());
- tableHeaderAxisConfigurationEClass.getESuperTypes().add(this.getAbstractHeaderAxisConfiguration());
- localTableHeaderAxisConfigurationEClass.getESuperTypes().add(this.getAbstractHeaderAxisConfiguration());
- iAxisConfigurationEClass.getESuperTypes().add(theNattablestylePackage.getStyledElement());
- featureAxisConfigurationEClass.getESuperTypes().add(this.getIAxisConfiguration());
- iFillingConfigurationEClass.getESuperTypes().add(this.getIAxisConfiguration());
- eStructuralFeatureValueFillingConfigurationEClass.getESuperTypes().add(this.getIFillingConfiguration());
- iPasteConfigurationEClass.getESuperTypes().add(this.getIAxisConfiguration());
- pasteEObjectConfigurationEClass.getESuperTypes().add(this.getIPasteConfiguration());
- treeFillingConfigurationEClass.getESuperTypes().add(this.getIFillingConfiguration());
-
- // Initialize classes, features, and operations; add parameters
- initEClass(abstractHeaderAxisConfigurationEClass, AbstractHeaderAxisConfiguration.class, "AbstractHeaderAxisConfiguration", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
- initEAttribute(getAbstractHeaderAxisConfiguration_IndexStyle(), this.getAxisIndexStyle(), "indexStyle", null, 1, 1, AbstractHeaderAxisConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
- initEAttribute(getAbstractHeaderAxisConfiguration_DisplayLabel(), ecorePackage.getEBoolean(), "displayLabel", "true", 1, 1, AbstractHeaderAxisConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ //$NON-NLS-2$
- initEAttribute(getAbstractHeaderAxisConfiguration_DisplayFilter(), ecorePackage.getEBoolean(), "displayFilter", "false", 1, 1, AbstractHeaderAxisConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ //$NON-NLS-2$
- initEAttribute(getAbstractHeaderAxisConfiguration_DisplayIndex(), ecorePackage.getEBoolean(), "displayIndex", "true", 1, 1, AbstractHeaderAxisConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ //$NON-NLS-2$
- initEReference(getAbstractHeaderAxisConfiguration_OwnedLabelConfigurations(), theNattablelabelproviderPackage.getILabelProviderConfiguration(), null, "ownedLabelConfigurations", null, 0, -1, AbstractHeaderAxisConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
- initEReference(getAbstractHeaderAxisConfiguration_OwnedAxisConfigurations(), this.getIAxisConfiguration(), null, "ownedAxisConfigurations", null, 0, -1, AbstractHeaderAxisConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
-
- initEClass(axisManagerRepresentationEClass, AxisManagerRepresentation.class, "AxisManagerRepresentation", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
- initEAttribute(getAxisManagerRepresentation_AxisManagerId(), ecorePackage.getEString(), "axisManagerId", null, 1, 1, AxisManagerRepresentation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
- initEAttribute(getAxisManagerRepresentation_LabelProviderContext(), ecorePackage.getEString(), "labelProviderContext", null, 0, 1, AxisManagerRepresentation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
- initEReference(getAxisManagerRepresentation_HeaderLabelConfiguration(), theNattablelabelproviderPackage.getILabelProviderConfiguration(), null, "headerLabelConfiguration", null, 1, 1, AxisManagerRepresentation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
- initEReference(getAxisManagerRepresentation_SpecificAxisConfigurations(), this.getIAxisConfiguration(), null, "specificAxisConfigurations", null, 0, -1, AxisManagerRepresentation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
-
- initEClass(axisManagerConfigurationEClass, AxisManagerConfiguration.class, "AxisManagerConfiguration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
- initEReference(getAxisManagerConfiguration_LocalHeaderLabelConfiguration(), theNattablelabelproviderPackage.getILabelProviderConfiguration(), null, "localHeaderLabelConfiguration", null, 0, 1, AxisManagerConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
- initEReference(getAxisManagerConfiguration_AxisManager(), this.getAxisManagerRepresentation(), null, "axisManager", null, 1, 1, AxisManagerConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
- initEReference(getAxisManagerConfiguration_LocalSpecificConfigurations(), this.getIAxisConfiguration(), null, "localSpecificConfigurations", null, 0, -1, AxisManagerConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
-
- initEClass(tableHeaderAxisConfigurationEClass, TableHeaderAxisConfiguration.class, "TableHeaderAxisConfiguration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
- initEReference(getTableHeaderAxisConfiguration_AxisManagers(), this.getAxisManagerRepresentation(), null, "axisManagers", null, 1, -1, TableHeaderAxisConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
-
- initEClass(localTableHeaderAxisConfigurationEClass, LocalTableHeaderAxisConfiguration.class, "LocalTableHeaderAxisConfiguration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
- initEReference(getLocalTableHeaderAxisConfiguration_AxisManagerConfigurations(), this.getAxisManagerConfiguration(), null, "axisManagerConfigurations", null, 0, -1, LocalTableHeaderAxisConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
-
- initEClass(iAxisConfigurationEClass, IAxisConfiguration.class, "IAxisConfiguration", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
-
- initEClass(featureAxisConfigurationEClass, FeatureAxisConfiguration.class, "FeatureAxisConfiguration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
- initEAttribute(getFeatureAxisConfiguration_ShowOnlyCommonFeature(), ecorePackage.getEBoolean(), "showOnlyCommonFeature", null, 0, 1, FeatureAxisConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
-
- initEClass(iFillingConfigurationEClass, IFillingConfiguration.class, "IFillingConfiguration", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
-
- initEClass(eStructuralFeatureValueFillingConfigurationEClass, EStructuralFeatureValueFillingConfiguration.class, "EStructuralFeatureValueFillingConfiguration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
- initEReference(getEStructuralFeatureValueFillingConfiguration_ListenFeature(), ecorePackage.getEStructuralFeature(), null, "listenFeature", null, 1, 1, EStructuralFeatureValueFillingConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
-
- initEClass(iPasteConfigurationEClass, IPasteConfiguration.class, "IPasteConfiguration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
- initEAttribute(getIPasteConfiguration_PostActions(), ecorePackage.getEString(), "postActions", null, 0, -1, IPasteConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
- initEAttribute(getIPasteConfiguration_DetachedMode(), ecorePackage.getEBoolean(), "detachedMode", "true", 0, 1, IPasteConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ //$NON-NLS-2$
-
- initEClass(pasteEObjectConfigurationEClass, PasteEObjectConfiguration.class, "PasteEObjectConfiguration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
- initEAttribute(getPasteEObjectConfiguration_PastedElementId(), ecorePackage.getEString(), "pastedElementId", null, 0, 1, PasteEObjectConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
- initEReference(getPasteEObjectConfiguration_PasteElementContainementFeature(), ecorePackage.getEStructuralFeature(), null, "pasteElementContainementFeature", null, 0, 1, PasteEObjectConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
-
- initEClass(treeFillingConfigurationEClass, TreeFillingConfiguration.class, "TreeFillingConfiguration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
- initEReference(getTreeFillingConfiguration_AxisUsedAsAxisProvider(), theNattableaxisPackage.getIAxis(), null, "axisUsedAsAxisProvider", null, 1, 1, TreeFillingConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
- initEReference(getTreeFillingConfiguration_PasteConfiguration(), this.getPasteEObjectConfiguration(), null, "pasteConfiguration", null, 0, 1, TreeFillingConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
- initEAttribute(getTreeFillingConfiguration_Depth(), theEcorePackage.getEInt(), "depth", null, 0, 1, TreeFillingConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
- initEReference(getTreeFillingConfiguration_LabelProvider(), theNattablelabelproviderPackage.getILabelProviderConfiguration(), null, "labelProvider", null, 1, 1, TreeFillingConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
- initEAttribute(getTreeFillingConfiguration_LabelProviderContext(), ecorePackage.getEString(), "labelProviderContext", null, 1, 1, TreeFillingConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
-
- // Initialize enums and add enum literals
- initEEnum(axisIndexStyleEEnum, AxisIndexStyle.class, "AxisIndexStyle"); //$NON-NLS-1$
- addEEnumLiteral(axisIndexStyleEEnum, AxisIndexStyle.ALPHABETIC);
- addEEnumLiteral(axisIndexStyleEEnum, AxisIndexStyle.NUMERIC);
-
- // Create annotations
- // http://www.eclipse.org/emf/2002/Ecore
- createEcoreAnnotations();
- // http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot
- createPivotAnnotations();
- }
-
- /**
- * Initializes the annotations for <b>http://www.eclipse.org/emf/2002/Ecore</b>.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void createEcoreAnnotations() {
- String source = "http://www.eclipse.org/emf/2002/Ecore"; //$NON-NLS-1$
- addAnnotation
- (this,
- source,
- new String[] {
- "invocationDelegates", "http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot", //$NON-NLS-1$ //$NON-NLS-2$
- "settingDelegates", "http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot", //$NON-NLS-1$ //$NON-NLS-2$
- "validationDelegates", "http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot" //$NON-NLS-1$ //$NON-NLS-2$
- });
- addAnnotation
- (axisManagerRepresentationEClass,
- source,
- new String[] {
- "constraints", "nonEmptyAxisManager" //$NON-NLS-1$ //$NON-NLS-2$
- });
- addAnnotation
- (tableHeaderAxisConfigurationEClass,
- source,
- new String[] {
- "constraints", "axisManagersIdUnique" //$NON-NLS-1$ //$NON-NLS-2$
- });
- }
-
- /**
- * Initializes the annotations for <b>http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot</b>.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void createPivotAnnotations() {
- String source = "http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"; //$NON-NLS-1$
- addAnnotation
- (axisManagerRepresentationEClass,
- source,
- new String[] {
- "nonEmptyAxisManager", "not (axisManagerId.oclIsUndefined() or axisManagerId = \'\')" //$NON-NLS-1$ //$NON-NLS-2$
- });
- addAnnotation
- (tableHeaderAxisConfigurationEClass,
- source,
- new String[] {
- "axisManagersIdUnique", "axisManagers->forAll(am1 : AxisManagerRepresentation | ( (axisManagers->excluding (am1))->forAll(am2 : AxisManagerRepresentation | am1.axisManagerId<>am2.axisManagerId) ))" //$NON-NLS-1$ //$NON-NLS-2$
- });
- }
-} // NattableaxisconfigurationPackageImpl
+/**
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ */
+package org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EEnum;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.EValidator;
+import org.eclipse.emf.ecore.EcorePackage;
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+import org.eclipse.papyrus.infra.nattable.model.nattable.NattablePackage;
+import org.eclipse.papyrus.infra.nattable.model.nattable.impl.NattablePackageImpl;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.NattableaxisPackage;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.impl.NattableaxisPackageImpl;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AbstractHeaderAxisConfiguration;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AxisIndexStyle;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AxisManagerConfiguration;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AxisManagerRepresentation;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.EStructuralFeatureValueFillingConfiguration;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.FeatureAxisConfiguration;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.IAxisConfiguration;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.IFillingConfiguration;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.IPasteConfiguration;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.LocalTableHeaderAxisConfiguration;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.NattableaxisconfigurationFactory;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.NattableaxisconfigurationPackage;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.PasteEObjectConfiguration;
+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.model.nattable.nattableaxisconfiguration.util.NattableaxisconfigurationValidator;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisprovider.NattableaxisproviderPackage;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisprovider.impl.NattableaxisproviderPackageImpl;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattablecell.NattablecellPackage;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattablecell.impl.NattablecellPackageImpl;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableconfiguration.NattableconfigurationPackage;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableconfiguration.impl.NattableconfigurationPackageImpl;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattablelabelprovider.NattablelabelproviderPackage;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattablelabelprovider.impl.NattablelabelproviderPackageImpl;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableproblem.NattableproblemPackage;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableproblem.impl.NattableproblemPackageImpl;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattablestyle.NattablestylePackage;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattablestyle.impl.NattablestylePackageImpl;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattabletester.NattabletesterPackage;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattabletester.impl.NattabletesterPackageImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Package</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class NattableaxisconfigurationPackageImpl extends EPackageImpl implements NattableaxisconfigurationPackage {
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass abstractHeaderAxisConfigurationEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass axisManagerRepresentationEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass axisManagerConfigurationEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass tableHeaderAxisConfigurationEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass localTableHeaderAxisConfigurationEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass iAxisConfigurationEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass featureAxisConfigurationEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass iFillingConfigurationEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass eStructuralFeatureValueFillingConfigurationEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass iPasteConfigurationEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass pasteEObjectConfigurationEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass treeFillingConfigurationEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EEnum axisIndexStyleEEnum = null;
+
+ /**
+ * Creates an instance of the model <b>Package</b>, registered with
+ * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
+ * package URI value.
+ * <p>Note: the correct way to create the package is via the static
+ * factory method {@link #init init()}, which also performs
+ * initialization of the package, or returns the registered package,
+ * if one already exists.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @see org.eclipse.emf.ecore.EPackage.Registry
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.NattableaxisconfigurationPackage#eNS_URI
+ * @see #init()
+ * @generated
+ */
+ private NattableaxisconfigurationPackageImpl() {
+ super(eNS_URI, NattableaxisconfigurationFactory.eINSTANCE);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static boolean isInited = false;
+
+ /**
+ * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
+ *
+ * <p>This method is used to initialize {@link NattableaxisconfigurationPackage#eINSTANCE} when that field is accessed.
+ * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @see #eNS_URI
+ * @see #createPackageContents()
+ * @see #initializePackageContents()
+ * @generated
+ */
+ public static NattableaxisconfigurationPackage init() {
+ if (isInited) return (NattableaxisconfigurationPackage)EPackage.Registry.INSTANCE.getEPackage(NattableaxisconfigurationPackage.eNS_URI);
+
+ // Obtain or create and register package
+ NattableaxisconfigurationPackageImpl theNattableaxisconfigurationPackage = (NattableaxisconfigurationPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof NattableaxisconfigurationPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new NattableaxisconfigurationPackageImpl());
+
+ isInited = true;
+
+ // Initialize simple dependencies
+ EcorePackage.eINSTANCE.eClass();
+
+ // Obtain or create and register interdependencies
+ NattablePackageImpl theNattablePackage = (NattablePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(NattablePackage.eNS_URI) instanceof NattablePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(NattablePackage.eNS_URI) : NattablePackage.eINSTANCE);
+ NattableconfigurationPackageImpl theNattableconfigurationPackage = (NattableconfigurationPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(NattableconfigurationPackage.eNS_URI) instanceof NattableconfigurationPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(NattableconfigurationPackage.eNS_URI) : NattableconfigurationPackage.eINSTANCE);
+ NattableaxisproviderPackageImpl theNattableaxisproviderPackage = (NattableaxisproviderPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(NattableaxisproviderPackage.eNS_URI) instanceof NattableaxisproviderPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(NattableaxisproviderPackage.eNS_URI) : NattableaxisproviderPackage.eINSTANCE);
+ NattablelabelproviderPackageImpl theNattablelabelproviderPackage = (NattablelabelproviderPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(NattablelabelproviderPackage.eNS_URI) instanceof NattablelabelproviderPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(NattablelabelproviderPackage.eNS_URI) : NattablelabelproviderPackage.eINSTANCE);
+ NattabletesterPackageImpl theNattabletesterPackage = (NattabletesterPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(NattabletesterPackage.eNS_URI) instanceof NattabletesterPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(NattabletesterPackage.eNS_URI) : NattabletesterPackage.eINSTANCE);
+ NattableaxisPackageImpl theNattableaxisPackage = (NattableaxisPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(NattableaxisPackage.eNS_URI) instanceof NattableaxisPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(NattableaxisPackage.eNS_URI) : NattableaxisPackage.eINSTANCE);
+ NattablecellPackageImpl theNattablecellPackage = (NattablecellPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(NattablecellPackage.eNS_URI) instanceof NattablecellPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(NattablecellPackage.eNS_URI) : NattablecellPackage.eINSTANCE);
+ NattableproblemPackageImpl theNattableproblemPackage = (NattableproblemPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(NattableproblemPackage.eNS_URI) instanceof NattableproblemPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(NattableproblemPackage.eNS_URI) : NattableproblemPackage.eINSTANCE);
+ NattablestylePackageImpl theNattablestylePackage = (NattablestylePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(NattablestylePackage.eNS_URI) instanceof NattablestylePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(NattablestylePackage.eNS_URI) : NattablestylePackage.eINSTANCE);
+
+ // Create package meta-data objects
+ theNattableaxisconfigurationPackage.createPackageContents();
+ theNattablePackage.createPackageContents();
+ theNattableconfigurationPackage.createPackageContents();
+ theNattableaxisproviderPackage.createPackageContents();
+ theNattablelabelproviderPackage.createPackageContents();
+ theNattabletesterPackage.createPackageContents();
+ theNattableaxisPackage.createPackageContents();
+ theNattablecellPackage.createPackageContents();
+ theNattableproblemPackage.createPackageContents();
+ theNattablestylePackage.createPackageContents();
+
+ // Initialize created meta-data
+ theNattableaxisconfigurationPackage.initializePackageContents();
+ theNattablePackage.initializePackageContents();
+ theNattableconfigurationPackage.initializePackageContents();
+ theNattableaxisproviderPackage.initializePackageContents();
+ theNattablelabelproviderPackage.initializePackageContents();
+ theNattabletesterPackage.initializePackageContents();
+ theNattableaxisPackage.initializePackageContents();
+ theNattablecellPackage.initializePackageContents();
+ theNattableproblemPackage.initializePackageContents();
+ theNattablestylePackage.initializePackageContents();
+
+ // Register package validator
+ EValidator.Registry.INSTANCE.put
+ (theNattableaxisconfigurationPackage,
+ new EValidator.Descriptor() {
+ public EValidator getEValidator() {
+ return NattableaxisconfigurationValidator.INSTANCE;
+ }
+ });
+
+ // Mark meta-data to indicate it can't be changed
+ theNattableaxisconfigurationPackage.freeze();
+
+
+ // Update the registry and return the package
+ EPackage.Registry.INSTANCE.put(NattableaxisconfigurationPackage.eNS_URI, theNattableaxisconfigurationPackage);
+ return theNattableaxisconfigurationPackage;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EClass getAbstractHeaderAxisConfiguration() {
+ return abstractHeaderAxisConfigurationEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EAttribute getAbstractHeaderAxisConfiguration_IndexStyle() {
+ return (EAttribute)abstractHeaderAxisConfigurationEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EAttribute getAbstractHeaderAxisConfiguration_DisplayLabel() {
+ return (EAttribute)abstractHeaderAxisConfigurationEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EAttribute getAbstractHeaderAxisConfiguration_DisplayFilter() {
+ return (EAttribute)abstractHeaderAxisConfigurationEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EAttribute getAbstractHeaderAxisConfiguration_DisplayIndex() {
+ return (EAttribute)abstractHeaderAxisConfigurationEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EReference getAbstractHeaderAxisConfiguration_OwnedLabelConfigurations() {
+ return (EReference)abstractHeaderAxisConfigurationEClass.getEStructuralFeatures().get(4);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EReference getAbstractHeaderAxisConfiguration_OwnedAxisConfigurations() {
+ return (EReference)abstractHeaderAxisConfigurationEClass.getEStructuralFeatures().get(5);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EClass getAxisManagerRepresentation() {
+ return axisManagerRepresentationEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EAttribute getAxisManagerRepresentation_AxisManagerId() {
+ return (EAttribute)axisManagerRepresentationEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EAttribute getAxisManagerRepresentation_LabelProviderContext() {
+ return (EAttribute)axisManagerRepresentationEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EReference getAxisManagerRepresentation_HeaderLabelConfiguration() {
+ return (EReference)axisManagerRepresentationEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EReference getAxisManagerRepresentation_SpecificAxisConfigurations() {
+ return (EReference)axisManagerRepresentationEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EClass getAxisManagerConfiguration() {
+ return axisManagerConfigurationEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EReference getAxisManagerConfiguration_LocalHeaderLabelConfiguration() {
+ return (EReference)axisManagerConfigurationEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EReference getAxisManagerConfiguration_AxisManager() {
+ return (EReference)axisManagerConfigurationEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EReference getAxisManagerConfiguration_LocalSpecificConfigurations() {
+ return (EReference)axisManagerConfigurationEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EClass getTableHeaderAxisConfiguration() {
+ return tableHeaderAxisConfigurationEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EReference getTableHeaderAxisConfiguration_AxisManagers() {
+ return (EReference)tableHeaderAxisConfigurationEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EClass getLocalTableHeaderAxisConfiguration() {
+ return localTableHeaderAxisConfigurationEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EReference getLocalTableHeaderAxisConfiguration_AxisManagerConfigurations() {
+ return (EReference)localTableHeaderAxisConfigurationEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EClass getIAxisConfiguration() {
+ return iAxisConfigurationEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EClass getFeatureAxisConfiguration() {
+ return featureAxisConfigurationEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EAttribute getFeatureAxisConfiguration_ShowOnlyCommonFeature() {
+ return (EAttribute)featureAxisConfigurationEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EClass getIFillingConfiguration() {
+ return iFillingConfigurationEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EClass getEStructuralFeatureValueFillingConfiguration() {
+ return eStructuralFeatureValueFillingConfigurationEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EReference getEStructuralFeatureValueFillingConfiguration_ListenFeature() {
+ return (EReference)eStructuralFeatureValueFillingConfigurationEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EClass getIPasteConfiguration() {
+ return iPasteConfigurationEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EAttribute getIPasteConfiguration_PostActions() {
+ return (EAttribute)iPasteConfigurationEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EAttribute getIPasteConfiguration_DetachedMode() {
+ return (EAttribute)iPasteConfigurationEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EClass getPasteEObjectConfiguration() {
+ return pasteEObjectConfigurationEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EAttribute getPasteEObjectConfiguration_PastedElementId() {
+ return (EAttribute)pasteEObjectConfigurationEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EReference getPasteEObjectConfiguration_PasteElementContainementFeature() {
+ return (EReference)pasteEObjectConfigurationEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getPasteEObjectConfiguration_AxisIdentifier() {
+ return (EReference)pasteEObjectConfigurationEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EClass getTreeFillingConfiguration() {
+ return treeFillingConfigurationEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EReference getTreeFillingConfiguration_AxisUsedAsAxisProvider() {
+ return (EReference)treeFillingConfigurationEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EReference getTreeFillingConfiguration_PasteConfiguration() {
+ return (EReference)treeFillingConfigurationEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EAttribute getTreeFillingConfiguration_Depth() {
+ return (EAttribute)treeFillingConfigurationEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EReference getTreeFillingConfiguration_LabelProvider() {
+ return (EReference)treeFillingConfigurationEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EAttribute getTreeFillingConfiguration_LabelProviderContext() {
+ return (EAttribute)treeFillingConfigurationEClass.getEStructuralFeatures().get(4);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EEnum getAxisIndexStyle() {
+ return axisIndexStyleEEnum;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NattableaxisconfigurationFactory getNattableaxisconfigurationFactory() {
+ return (NattableaxisconfigurationFactory)getEFactoryInstance();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isCreated = false;
+
+ /**
+ * Creates the meta-model objects for the package. This method is
+ * guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void createPackageContents() {
+ if (isCreated) return;
+ isCreated = true;
+
+ // Create classes and their features
+ abstractHeaderAxisConfigurationEClass = createEClass(ABSTRACT_HEADER_AXIS_CONFIGURATION);
+ createEAttribute(abstractHeaderAxisConfigurationEClass, ABSTRACT_HEADER_AXIS_CONFIGURATION__INDEX_STYLE);
+ createEAttribute(abstractHeaderAxisConfigurationEClass, ABSTRACT_HEADER_AXIS_CONFIGURATION__DISPLAY_LABEL);
+ createEAttribute(abstractHeaderAxisConfigurationEClass, ABSTRACT_HEADER_AXIS_CONFIGURATION__DISPLAY_FILTER);
+ createEAttribute(abstractHeaderAxisConfigurationEClass, ABSTRACT_HEADER_AXIS_CONFIGURATION__DISPLAY_INDEX);
+ createEReference(abstractHeaderAxisConfigurationEClass, ABSTRACT_HEADER_AXIS_CONFIGURATION__OWNED_LABEL_CONFIGURATIONS);
+ createEReference(abstractHeaderAxisConfigurationEClass, ABSTRACT_HEADER_AXIS_CONFIGURATION__OWNED_AXIS_CONFIGURATIONS);
+
+ axisManagerRepresentationEClass = createEClass(AXIS_MANAGER_REPRESENTATION);
+ createEAttribute(axisManagerRepresentationEClass, AXIS_MANAGER_REPRESENTATION__AXIS_MANAGER_ID);
+ createEAttribute(axisManagerRepresentationEClass, AXIS_MANAGER_REPRESENTATION__LABEL_PROVIDER_CONTEXT);
+ createEReference(axisManagerRepresentationEClass, AXIS_MANAGER_REPRESENTATION__HEADER_LABEL_CONFIGURATION);
+ createEReference(axisManagerRepresentationEClass, AXIS_MANAGER_REPRESENTATION__SPECIFIC_AXIS_CONFIGURATIONS);
+
+ axisManagerConfigurationEClass = createEClass(AXIS_MANAGER_CONFIGURATION);
+ createEReference(axisManagerConfigurationEClass, AXIS_MANAGER_CONFIGURATION__LOCAL_HEADER_LABEL_CONFIGURATION);
+ createEReference(axisManagerConfigurationEClass, AXIS_MANAGER_CONFIGURATION__AXIS_MANAGER);
+ createEReference(axisManagerConfigurationEClass, AXIS_MANAGER_CONFIGURATION__LOCAL_SPECIFIC_CONFIGURATIONS);
+
+ tableHeaderAxisConfigurationEClass = createEClass(TABLE_HEADER_AXIS_CONFIGURATION);
+ createEReference(tableHeaderAxisConfigurationEClass, TABLE_HEADER_AXIS_CONFIGURATION__AXIS_MANAGERS);
+
+ localTableHeaderAxisConfigurationEClass = createEClass(LOCAL_TABLE_HEADER_AXIS_CONFIGURATION);
+ createEReference(localTableHeaderAxisConfigurationEClass, LOCAL_TABLE_HEADER_AXIS_CONFIGURATION__AXIS_MANAGER_CONFIGURATIONS);
+
+ iAxisConfigurationEClass = createEClass(IAXIS_CONFIGURATION);
+
+ featureAxisConfigurationEClass = createEClass(FEATURE_AXIS_CONFIGURATION);
+ createEAttribute(featureAxisConfigurationEClass, FEATURE_AXIS_CONFIGURATION__SHOW_ONLY_COMMON_FEATURE);
+
+ iFillingConfigurationEClass = createEClass(IFILLING_CONFIGURATION);
+
+ eStructuralFeatureValueFillingConfigurationEClass = createEClass(ESTRUCTURAL_FEATURE_VALUE_FILLING_CONFIGURATION);
+ createEReference(eStructuralFeatureValueFillingConfigurationEClass, ESTRUCTURAL_FEATURE_VALUE_FILLING_CONFIGURATION__LISTEN_FEATURE);
+
+ iPasteConfigurationEClass = createEClass(IPASTE_CONFIGURATION);
+ createEAttribute(iPasteConfigurationEClass, IPASTE_CONFIGURATION__POST_ACTIONS);
+ createEAttribute(iPasteConfigurationEClass, IPASTE_CONFIGURATION__DETACHED_MODE);
+
+ pasteEObjectConfigurationEClass = createEClass(PASTE_EOBJECT_CONFIGURATION);
+ createEAttribute(pasteEObjectConfigurationEClass, PASTE_EOBJECT_CONFIGURATION__PASTED_ELEMENT_ID);
+ createEReference(pasteEObjectConfigurationEClass, PASTE_EOBJECT_CONFIGURATION__PASTE_ELEMENT_CONTAINEMENT_FEATURE);
+ createEReference(pasteEObjectConfigurationEClass, PASTE_EOBJECT_CONFIGURATION__AXIS_IDENTIFIER);
+
+ treeFillingConfigurationEClass = createEClass(TREE_FILLING_CONFIGURATION);
+ createEReference(treeFillingConfigurationEClass, TREE_FILLING_CONFIGURATION__AXIS_USED_AS_AXIS_PROVIDER);
+ createEReference(treeFillingConfigurationEClass, TREE_FILLING_CONFIGURATION__PASTE_CONFIGURATION);
+ createEAttribute(treeFillingConfigurationEClass, TREE_FILLING_CONFIGURATION__DEPTH);
+ createEReference(treeFillingConfigurationEClass, TREE_FILLING_CONFIGURATION__LABEL_PROVIDER);
+ createEAttribute(treeFillingConfigurationEClass, TREE_FILLING_CONFIGURATION__LABEL_PROVIDER_CONTEXT);
+
+ // Create enums
+ axisIndexStyleEEnum = createEEnum(AXIS_INDEX_STYLE);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isInitialized = false;
+
+ /**
+ * Complete the initialization of the package and its meta-model. This
+ * method is guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void initializePackageContents() {
+ if (isInitialized) return;
+ isInitialized = true;
+
+ // Initialize package
+ setName(eNAME);
+ setNsPrefix(eNS_PREFIX);
+ setNsURI(eNS_URI);
+
+ // Obtain other dependent packages
+ NattablestylePackage theNattablestylePackage = (NattablestylePackage)EPackage.Registry.INSTANCE.getEPackage(NattablestylePackage.eNS_URI);
+ NattablelabelproviderPackage theNattablelabelproviderPackage = (NattablelabelproviderPackage)EPackage.Registry.INSTANCE.getEPackage(NattablelabelproviderPackage.eNS_URI);
+ NattableaxisPackage theNattableaxisPackage = (NattableaxisPackage)EPackage.Registry.INSTANCE.getEPackage(NattableaxisPackage.eNS_URI);
+ EcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI);
+
+ // Create type parameters
+
+ // Set bounds for type parameters
+
+ // Add supertypes to classes
+ abstractHeaderAxisConfigurationEClass.getESuperTypes().add(theNattablestylePackage.getStyledElement());
+ axisManagerRepresentationEClass.getESuperTypes().add(theNattablestylePackage.getStyledElement());
+ axisManagerConfigurationEClass.getESuperTypes().add(theNattablestylePackage.getStyledElement());
+ tableHeaderAxisConfigurationEClass.getESuperTypes().add(this.getAbstractHeaderAxisConfiguration());
+ localTableHeaderAxisConfigurationEClass.getESuperTypes().add(this.getAbstractHeaderAxisConfiguration());
+ iAxisConfigurationEClass.getESuperTypes().add(theNattablestylePackage.getStyledElement());
+ featureAxisConfigurationEClass.getESuperTypes().add(this.getIAxisConfiguration());
+ iFillingConfigurationEClass.getESuperTypes().add(this.getIAxisConfiguration());
+ eStructuralFeatureValueFillingConfigurationEClass.getESuperTypes().add(this.getIFillingConfiguration());
+ iPasteConfigurationEClass.getESuperTypes().add(this.getIAxisConfiguration());
+ pasteEObjectConfigurationEClass.getESuperTypes().add(this.getIPasteConfiguration());
+ treeFillingConfigurationEClass.getESuperTypes().add(this.getIFillingConfiguration());
+
+ // Initialize classes, features, and operations; add parameters
+ initEClass(abstractHeaderAxisConfigurationEClass, AbstractHeaderAxisConfiguration.class, "AbstractHeaderAxisConfiguration", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEAttribute(getAbstractHeaderAxisConfiguration_IndexStyle(), this.getAxisIndexStyle(), "indexStyle", null, 1, 1, AbstractHeaderAxisConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEAttribute(getAbstractHeaderAxisConfiguration_DisplayLabel(), ecorePackage.getEBoolean(), "displayLabel", "true", 1, 1, AbstractHeaderAxisConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ //$NON-NLS-2$
+ initEAttribute(getAbstractHeaderAxisConfiguration_DisplayFilter(), ecorePackage.getEBoolean(), "displayFilter", "false", 1, 1, AbstractHeaderAxisConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ //$NON-NLS-2$
+ initEAttribute(getAbstractHeaderAxisConfiguration_DisplayIndex(), ecorePackage.getEBoolean(), "displayIndex", "true", 1, 1, AbstractHeaderAxisConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ //$NON-NLS-2$
+ initEReference(getAbstractHeaderAxisConfiguration_OwnedLabelConfigurations(), theNattablelabelproviderPackage.getILabelProviderConfiguration(), null, "ownedLabelConfigurations", null, 0, -1, AbstractHeaderAxisConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEReference(getAbstractHeaderAxisConfiguration_OwnedAxisConfigurations(), this.getIAxisConfiguration(), null, "ownedAxisConfigurations", null, 0, -1, AbstractHeaderAxisConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ initEClass(axisManagerRepresentationEClass, AxisManagerRepresentation.class, "AxisManagerRepresentation", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEAttribute(getAxisManagerRepresentation_AxisManagerId(), ecorePackage.getEString(), "axisManagerId", null, 1, 1, AxisManagerRepresentation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEAttribute(getAxisManagerRepresentation_LabelProviderContext(), ecorePackage.getEString(), "labelProviderContext", null, 0, 1, AxisManagerRepresentation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEReference(getAxisManagerRepresentation_HeaderLabelConfiguration(), theNattablelabelproviderPackage.getILabelProviderConfiguration(), null, "headerLabelConfiguration", null, 1, 1, AxisManagerRepresentation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEReference(getAxisManagerRepresentation_SpecificAxisConfigurations(), this.getIAxisConfiguration(), null, "specificAxisConfigurations", null, 0, -1, AxisManagerRepresentation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ initEClass(axisManagerConfigurationEClass, AxisManagerConfiguration.class, "AxisManagerConfiguration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEReference(getAxisManagerConfiguration_LocalHeaderLabelConfiguration(), theNattablelabelproviderPackage.getILabelProviderConfiguration(), null, "localHeaderLabelConfiguration", null, 0, 1, AxisManagerConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEReference(getAxisManagerConfiguration_AxisManager(), this.getAxisManagerRepresentation(), null, "axisManager", null, 1, 1, AxisManagerConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEReference(getAxisManagerConfiguration_LocalSpecificConfigurations(), this.getIAxisConfiguration(), null, "localSpecificConfigurations", null, 0, -1, AxisManagerConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ initEClass(tableHeaderAxisConfigurationEClass, TableHeaderAxisConfiguration.class, "TableHeaderAxisConfiguration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEReference(getTableHeaderAxisConfiguration_AxisManagers(), this.getAxisManagerRepresentation(), null, "axisManagers", null, 1, -1, TableHeaderAxisConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ initEClass(localTableHeaderAxisConfigurationEClass, LocalTableHeaderAxisConfiguration.class, "LocalTableHeaderAxisConfiguration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEReference(getLocalTableHeaderAxisConfiguration_AxisManagerConfigurations(), this.getAxisManagerConfiguration(), null, "axisManagerConfigurations", null, 0, -1, LocalTableHeaderAxisConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ initEClass(iAxisConfigurationEClass, IAxisConfiguration.class, "IAxisConfiguration", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+
+ initEClass(featureAxisConfigurationEClass, FeatureAxisConfiguration.class, "FeatureAxisConfiguration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEAttribute(getFeatureAxisConfiguration_ShowOnlyCommonFeature(), ecorePackage.getEBoolean(), "showOnlyCommonFeature", null, 0, 1, FeatureAxisConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ initEClass(iFillingConfigurationEClass, IFillingConfiguration.class, "IFillingConfiguration", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+
+ initEClass(eStructuralFeatureValueFillingConfigurationEClass, EStructuralFeatureValueFillingConfiguration.class, "EStructuralFeatureValueFillingConfiguration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEReference(getEStructuralFeatureValueFillingConfiguration_ListenFeature(), ecorePackage.getEStructuralFeature(), null, "listenFeature", null, 1, 1, EStructuralFeatureValueFillingConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ initEClass(iPasteConfigurationEClass, IPasteConfiguration.class, "IPasteConfiguration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEAttribute(getIPasteConfiguration_PostActions(), ecorePackage.getEString(), "postActions", null, 0, -1, IPasteConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEAttribute(getIPasteConfiguration_DetachedMode(), ecorePackage.getEBoolean(), "detachedMode", "true", 0, 1, IPasteConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ //$NON-NLS-2$
+
+ initEClass(pasteEObjectConfigurationEClass, PasteEObjectConfiguration.class, "PasteEObjectConfiguration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEAttribute(getPasteEObjectConfiguration_PastedElementId(), ecorePackage.getEString(), "pastedElementId", null, 0, 1, PasteEObjectConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEReference(getPasteEObjectConfiguration_PasteElementContainementFeature(), ecorePackage.getEStructuralFeature(), null, "pasteElementContainementFeature", null, 0, 1, PasteEObjectConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEReference(getPasteEObjectConfiguration_AxisIdentifier(), theNattableaxisPackage.getIAxis(), null, "axisIdentifier", null, 0, 1, PasteEObjectConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ initEClass(treeFillingConfigurationEClass, TreeFillingConfiguration.class, "TreeFillingConfiguration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEReference(getTreeFillingConfiguration_AxisUsedAsAxisProvider(), theNattableaxisPackage.getIAxis(), null, "axisUsedAsAxisProvider", null, 1, 1, TreeFillingConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEReference(getTreeFillingConfiguration_PasteConfiguration(), this.getPasteEObjectConfiguration(), null, "pasteConfiguration", null, 0, 1, TreeFillingConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEAttribute(getTreeFillingConfiguration_Depth(), theEcorePackage.getEInt(), "depth", null, 0, 1, TreeFillingConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEReference(getTreeFillingConfiguration_LabelProvider(), theNattablelabelproviderPackage.getILabelProviderConfiguration(), null, "labelProvider", null, 1, 1, TreeFillingConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEAttribute(getTreeFillingConfiguration_LabelProviderContext(), ecorePackage.getEString(), "labelProviderContext", null, 1, 1, TreeFillingConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ // Initialize enums and add enum literals
+ initEEnum(axisIndexStyleEEnum, AxisIndexStyle.class, "AxisIndexStyle"); //$NON-NLS-1$
+ addEEnumLiteral(axisIndexStyleEEnum, AxisIndexStyle.ALPHABETIC);
+ addEEnumLiteral(axisIndexStyleEEnum, AxisIndexStyle.NUMERIC);
+
+ // Create annotations
+ // http://www.eclipse.org/emf/2002/Ecore
+ createEcoreAnnotations();
+ // http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot
+ createPivotAnnotations();
+ }
+
+ /**
+ * Initializes the annotations for <b>http://www.eclipse.org/emf/2002/Ecore</b>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void createEcoreAnnotations() {
+ String source = "http://www.eclipse.org/emf/2002/Ecore"; //$NON-NLS-1$
+ addAnnotation
+ (this,
+ source,
+ new String[] {
+ "invocationDelegates", "http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot", //$NON-NLS-1$ //$NON-NLS-2$
+ "settingDelegates", "http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot", //$NON-NLS-1$ //$NON-NLS-2$
+ "validationDelegates", "http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot" //$NON-NLS-1$ //$NON-NLS-2$
+ });
+ addAnnotation
+ (axisManagerRepresentationEClass,
+ source,
+ new String[] {
+ "constraints", "nonEmptyAxisManager" //$NON-NLS-1$ //$NON-NLS-2$
+ });
+ addAnnotation
+ (tableHeaderAxisConfigurationEClass,
+ source,
+ new String[] {
+ "constraints", "axisManagersIdUnique" //$NON-NLS-1$ //$NON-NLS-2$
+ });
+ }
+
+ /**
+ * Initializes the annotations for <b>http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot</b>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void createPivotAnnotations() {
+ String source = "http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"; //$NON-NLS-1$
+ addAnnotation
+ (axisManagerRepresentationEClass,
+ source,
+ new String[] {
+ "nonEmptyAxisManager", "not (axisManagerId.oclIsUndefined() or axisManagerId = \'\')" //$NON-NLS-1$ //$NON-NLS-2$
+ });
+ addAnnotation
+ (tableHeaderAxisConfigurationEClass,
+ source,
+ new String[] {
+ "axisManagersIdUnique", "axisManagers->forAll(am1 : AxisManagerRepresentation | ( (axisManagers->excluding (am1))->forAll(am2 : AxisManagerRepresentation | am1.axisManagerId<>am2.axisManagerId) ))" //$NON-NLS-1$ //$NON-NLS-2$
+ });
+ }
+} // NattableaxisconfigurationPackageImpl
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/impl/PasteEObjectConfigurationImpl.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/impl/PasteEObjectConfigurationImpl.java
index 107f789fbd4..f300f12ef43 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/impl/PasteEObjectConfigurationImpl.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/impl/PasteEObjectConfigurationImpl.java
@@ -1,235 +1,315 @@
-/**
- * Copyright (c) 2013 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- */
-package org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.NattableaxisconfigurationPackage;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.PasteEObjectConfiguration;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>Paste EObject Configuration</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * </p>
- * <ul>
- * <li>{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.PasteEObjectConfigurationImpl#getPastedElementId <em>Pasted Element Id</em>}</li>
- * <li>{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.PasteEObjectConfigurationImpl#getPasteElementContainementFeature <em>Paste Element Containement Feature</em>}</li>
- * </ul>
- *
- * @generated
- */
-public class PasteEObjectConfigurationImpl extends IPasteConfigurationImpl implements PasteEObjectConfiguration {
-
- /**
- * The default value of the '{@link #getPastedElementId() <em>Pasted Element Id</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getPastedElementId()
- * @generated
- * @ordered
- */
- protected static final String PASTED_ELEMENT_ID_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getPastedElementId() <em>Pasted Element Id</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getPastedElementId()
- * @generated
- * @ordered
- */
- protected String pastedElementId = PASTED_ELEMENT_ID_EDEFAULT;
-
- /**
- * The cached value of the '{@link #getPasteElementContainementFeature() <em>Paste Element Containement Feature</em>}' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getPasteElementContainementFeature()
- * @generated
- * @ordered
- */
- protected EStructuralFeature pasteElementContainementFeature;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected PasteEObjectConfigurationImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return NattableaxisconfigurationPackage.Literals.PASTE_EOBJECT_CONFIGURATION;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String getPastedElementId() {
- return pastedElementId;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void setPastedElementId(String newPastedElementId) {
- String oldPastedElementId = pastedElementId;
- pastedElementId = newPastedElementId;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, NattableaxisconfigurationPackage.PASTE_EOBJECT_CONFIGURATION__PASTED_ELEMENT_ID, oldPastedElementId, pastedElementId));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public EStructuralFeature getPasteElementContainementFeature() {
- if (pasteElementContainementFeature != null && pasteElementContainementFeature.eIsProxy()) {
- InternalEObject oldPasteElementContainementFeature = (InternalEObject)pasteElementContainementFeature;
- pasteElementContainementFeature = (EStructuralFeature)eResolveProxy(oldPasteElementContainementFeature);
- if (pasteElementContainementFeature != oldPasteElementContainementFeature) {
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.RESOLVE, NattableaxisconfigurationPackage.PASTE_EOBJECT_CONFIGURATION__PASTE_ELEMENT_CONTAINEMENT_FEATURE, oldPasteElementContainementFeature, pasteElementContainementFeature));
- }
- }
- return pasteElementContainementFeature;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EStructuralFeature basicGetPasteElementContainementFeature() {
- return pasteElementContainementFeature;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void setPasteElementContainementFeature(EStructuralFeature newPasteElementContainementFeature) {
- EStructuralFeature oldPasteElementContainementFeature = pasteElementContainementFeature;
- pasteElementContainementFeature = newPasteElementContainementFeature;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, NattableaxisconfigurationPackage.PASTE_EOBJECT_CONFIGURATION__PASTE_ELEMENT_CONTAINEMENT_FEATURE, oldPasteElementContainementFeature, pasteElementContainementFeature));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case NattableaxisconfigurationPackage.PASTE_EOBJECT_CONFIGURATION__PASTED_ELEMENT_ID:
- return getPastedElementId();
- case NattableaxisconfigurationPackage.PASTE_EOBJECT_CONFIGURATION__PASTE_ELEMENT_CONTAINEMENT_FEATURE:
- if (resolve) return getPasteElementContainementFeature();
- return basicGetPasteElementContainementFeature();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case NattableaxisconfigurationPackage.PASTE_EOBJECT_CONFIGURATION__PASTED_ELEMENT_ID:
- setPastedElementId((String)newValue);
- return;
- case NattableaxisconfigurationPackage.PASTE_EOBJECT_CONFIGURATION__PASTE_ELEMENT_CONTAINEMENT_FEATURE:
- setPasteElementContainementFeature((EStructuralFeature)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case NattableaxisconfigurationPackage.PASTE_EOBJECT_CONFIGURATION__PASTED_ELEMENT_ID:
- setPastedElementId(PASTED_ELEMENT_ID_EDEFAULT);
- return;
- case NattableaxisconfigurationPackage.PASTE_EOBJECT_CONFIGURATION__PASTE_ELEMENT_CONTAINEMENT_FEATURE:
- setPasteElementContainementFeature((EStructuralFeature)null);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case NattableaxisconfigurationPackage.PASTE_EOBJECT_CONFIGURATION__PASTED_ELEMENT_ID:
- return PASTED_ELEMENT_ID_EDEFAULT == null ? pastedElementId != null : !PASTED_ELEMENT_ID_EDEFAULT.equals(pastedElementId);
- case NattableaxisconfigurationPackage.PASTE_EOBJECT_CONFIGURATION__PASTE_ELEMENT_CONTAINEMENT_FEATURE:
- return pasteElementContainementFeature != null;
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString() {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (pastedElementId: "); //$NON-NLS-1$
- result.append(pastedElementId);
- result.append(')');
- return result.toString();
- }
-} // PasteEObjectConfigurationImpl
+/**
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ */
+package org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.IAxis;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.NattableaxisconfigurationPackage;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.PasteEObjectConfiguration;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Paste EObject Configuration</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * </p>
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.PasteEObjectConfigurationImpl#getPastedElementId <em>Pasted Element Id</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.PasteEObjectConfigurationImpl#getPasteElementContainementFeature <em>Paste Element Containement Feature</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.impl.PasteEObjectConfigurationImpl#getAxisIdentifier <em>Axis Identifier</em>}</li>
+ * </ul>
+ *
+ * @generated
+ */
+public class PasteEObjectConfigurationImpl extends IPasteConfigurationImpl implements PasteEObjectConfiguration {
+
+ /**
+ * The default value of the '{@link #getPastedElementId() <em>Pasted Element Id</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getPastedElementId()
+ * @generated
+ * @ordered
+ */
+ protected static final String PASTED_ELEMENT_ID_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getPastedElementId() <em>Pasted Element Id</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getPastedElementId()
+ * @generated
+ * @ordered
+ */
+ protected String pastedElementId = PASTED_ELEMENT_ID_EDEFAULT;
+
+ /**
+ * The cached value of the '{@link #getPasteElementContainementFeature() <em>Paste Element Containement Feature</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getPasteElementContainementFeature()
+ * @generated
+ * @ordered
+ */
+ protected EStructuralFeature pasteElementContainementFeature;
+
+ /**
+ * The cached value of the '{@link #getAxisIdentifier() <em>Axis Identifier</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getAxisIdentifier()
+ * @generated
+ * @ordered
+ */
+ protected IAxis axisIdentifier;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected PasteEObjectConfigurationImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return NattableaxisconfigurationPackage.Literals.PASTE_EOBJECT_CONFIGURATION;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getPastedElementId() {
+ return pastedElementId;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void setPastedElementId(String newPastedElementId) {
+ String oldPastedElementId = pastedElementId;
+ pastedElementId = newPastedElementId;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, NattableaxisconfigurationPackage.PASTE_EOBJECT_CONFIGURATION__PASTED_ELEMENT_ID, oldPastedElementId, pastedElementId));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EStructuralFeature getPasteElementContainementFeature() {
+ if (pasteElementContainementFeature != null && pasteElementContainementFeature.eIsProxy()) {
+ InternalEObject oldPasteElementContainementFeature = (InternalEObject)pasteElementContainementFeature;
+ pasteElementContainementFeature = (EStructuralFeature)eResolveProxy(oldPasteElementContainementFeature);
+ if (pasteElementContainementFeature != oldPasteElementContainementFeature) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, NattableaxisconfigurationPackage.PASTE_EOBJECT_CONFIGURATION__PASTE_ELEMENT_CONTAINEMENT_FEATURE, oldPasteElementContainementFeature, pasteElementContainementFeature));
+ }
+ }
+ return pasteElementContainementFeature;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EStructuralFeature basicGetPasteElementContainementFeature() {
+ return pasteElementContainementFeature;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void setPasteElementContainementFeature(EStructuralFeature newPasteElementContainementFeature) {
+ EStructuralFeature oldPasteElementContainementFeature = pasteElementContainementFeature;
+ pasteElementContainementFeature = newPasteElementContainementFeature;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, NattableaxisconfigurationPackage.PASTE_EOBJECT_CONFIGURATION__PASTE_ELEMENT_CONTAINEMENT_FEATURE, oldPasteElementContainementFeature, pasteElementContainementFeature));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public IAxis getAxisIdentifier() {
+ return axisIdentifier;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetAxisIdentifier(IAxis newAxisIdentifier, NotificationChain msgs) {
+ IAxis oldAxisIdentifier = axisIdentifier;
+ axisIdentifier = newAxisIdentifier;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, NattableaxisconfigurationPackage.PASTE_EOBJECT_CONFIGURATION__AXIS_IDENTIFIER, oldAxisIdentifier, newAxisIdentifier);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setAxisIdentifier(IAxis newAxisIdentifier) {
+ if (newAxisIdentifier != axisIdentifier) {
+ NotificationChain msgs = null;
+ if (axisIdentifier != null)
+ msgs = ((InternalEObject)axisIdentifier).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - NattableaxisconfigurationPackage.PASTE_EOBJECT_CONFIGURATION__AXIS_IDENTIFIER, null, msgs);
+ if (newAxisIdentifier != null)
+ msgs = ((InternalEObject)newAxisIdentifier).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - NattableaxisconfigurationPackage.PASTE_EOBJECT_CONFIGURATION__AXIS_IDENTIFIER, null, msgs);
+ msgs = basicSetAxisIdentifier(newAxisIdentifier, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, NattableaxisconfigurationPackage.PASTE_EOBJECT_CONFIGURATION__AXIS_IDENTIFIER, newAxisIdentifier, newAxisIdentifier));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case NattableaxisconfigurationPackage.PASTE_EOBJECT_CONFIGURATION__AXIS_IDENTIFIER:
+ return basicSetAxisIdentifier(null, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case NattableaxisconfigurationPackage.PASTE_EOBJECT_CONFIGURATION__PASTED_ELEMENT_ID:
+ return getPastedElementId();
+ case NattableaxisconfigurationPackage.PASTE_EOBJECT_CONFIGURATION__PASTE_ELEMENT_CONTAINEMENT_FEATURE:
+ if (resolve) return getPasteElementContainementFeature();
+ return basicGetPasteElementContainementFeature();
+ case NattableaxisconfigurationPackage.PASTE_EOBJECT_CONFIGURATION__AXIS_IDENTIFIER:
+ return getAxisIdentifier();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case NattableaxisconfigurationPackage.PASTE_EOBJECT_CONFIGURATION__PASTED_ELEMENT_ID:
+ setPastedElementId((String)newValue);
+ return;
+ case NattableaxisconfigurationPackage.PASTE_EOBJECT_CONFIGURATION__PASTE_ELEMENT_CONTAINEMENT_FEATURE:
+ setPasteElementContainementFeature((EStructuralFeature)newValue);
+ return;
+ case NattableaxisconfigurationPackage.PASTE_EOBJECT_CONFIGURATION__AXIS_IDENTIFIER:
+ setAxisIdentifier((IAxis)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case NattableaxisconfigurationPackage.PASTE_EOBJECT_CONFIGURATION__PASTED_ELEMENT_ID:
+ setPastedElementId(PASTED_ELEMENT_ID_EDEFAULT);
+ return;
+ case NattableaxisconfigurationPackage.PASTE_EOBJECT_CONFIGURATION__PASTE_ELEMENT_CONTAINEMENT_FEATURE:
+ setPasteElementContainementFeature((EStructuralFeature)null);
+ return;
+ case NattableaxisconfigurationPackage.PASTE_EOBJECT_CONFIGURATION__AXIS_IDENTIFIER:
+ setAxisIdentifier((IAxis)null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case NattableaxisconfigurationPackage.PASTE_EOBJECT_CONFIGURATION__PASTED_ELEMENT_ID:
+ return PASTED_ELEMENT_ID_EDEFAULT == null ? pastedElementId != null : !PASTED_ELEMENT_ID_EDEFAULT.equals(pastedElementId);
+ case NattableaxisconfigurationPackage.PASTE_EOBJECT_CONFIGURATION__PASTE_ELEMENT_CONTAINEMENT_FEATURE:
+ return pasteElementContainementFeature != null;
+ case NattableaxisconfigurationPackage.PASTE_EOBJECT_CONFIGURATION__AXIS_IDENTIFIER:
+ return axisIdentifier != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (pastedElementId: "); //$NON-NLS-1$
+ result.append(pastedElementId);
+ result.append(')');
+ return result.toString();
+ }
+} // PasteEObjectConfigurationImpl
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties/META-INF/MANIFEST.MF b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties/META-INF/MANIFEST.MF
index bc6889a87f6..cede1e66402 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties/META-INF/MANIFEST.MF
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties/META-INF/MANIFEST.MF
@@ -23,7 +23,8 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.emf.databinding,
org.eclipse.core.databinding.property;bundle-version="1.4.200",
org.eclipse.papyrus.infra.viewpoints.policy;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.emf.nattable;bundle-version="1.2.0"
+ org.eclipse.papyrus.infra.emf.nattable;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.services.labelprovider;bundle-version="1.2.0"
Bundle-Vendor: %Bundle-Vendor
Bundle-ActivationPolicy: lazy
Bundle-Version: 1.2.0.qualifier
@@ -33,3 +34,4 @@ Bundle-ManifestVersion: 2
Bundle-Description: %pluginDescription
Bundle-SymbolicName: org.eclipse.papyrus.infra.nattable.properties;singleton:=true
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Import-Package: org.eclipse.papyrus.infra.nattable.manager.table
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties/model/ui/CanPasteEObjectColumnSection.xwt b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties/model/ui/CanPasteEObjectColumnSection.xwt
index 7d1fe724b06..a9a0aa48ee8 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties/model/ui/CanPasteEObjectColumnSection.xwt
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties/model/ui/CanPasteEObjectColumnSection.xwt
@@ -1,27 +1,30 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Composite
- xmlns:ppel="clr-namespace:org.eclipse.papyrus.views.properties.widgets.layout"
- xmlns:ppe="clr-namespace:org.eclipse.papyrus.views.properties.widgets"
- xmlns="http://www.eclipse.org/xwt/presentation" xmlns:x="http://www.eclipse.org/xwt">
- <Composite.layout>
- <ppel:PropertiesLayout></ppel:PropertiesLayout>
- </Composite.layout>
- <Group text="Paste Column Axis">
- <Group.layout>
- <ppel:PropertiesLayout makeColumnsEqualWidth="true"
- numColumns="3"></ppel:PropertiesLayout>
- </Group.layout>
- <ppe:BooleanCheckbox input="{Binding}"
- property="nattable:Table:localColumnHeaderAxisConfiguration.detachedMode"
- customLabel="Detached Mode"></ppe:BooleanCheckbox>
- <ppe:StringCombo input="{Binding}"
- property="nattable:Table:localColumnHeaderAxisConfiguration.pastedEObjectId"
- customLabel="Pasted Element Id"></ppe:StringCombo>
- <ppe:ReferenceDialog input="{Binding}"
- property="nattable:Table:localColumnHeaderAxisConfiguration.pastedEObjectContainmentFeature"
- customLabel="Containment Feature"></ppe:ReferenceDialog>
- <ppe:MultiReference input="{Binding}"
- property="nattable:Table:localColumnHeaderAxisConfiguration.postActions"
- customLabel="Post Actions"></ppe:MultiReference>
- </Group>
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite
+ xmlns:ppel="clr-namespace:org.eclipse.papyrus.views.properties.widgets.layout"
+ xmlns:ppe="clr-namespace:org.eclipse.papyrus.views.properties.widgets"
+ xmlns="http://www.eclipse.org/xwt/presentation" xmlns:x="http://www.eclipse.org/xwt">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Group text="Paste Column Axis">
+ <Group.layout>
+ <ppel:PropertiesLayout makeColumnsEqualWidth="true"
+ numColumns="3"></ppel:PropertiesLayout>
+ </Group.layout>
+ <ppe:BooleanCheckbox input="{Binding}"
+ property="nattable:Table:localColumnHeaderAxisConfiguration.detachedMode"
+ customLabel="Detached Mode"></ppe:BooleanCheckbox>
+ <ppe:StringCombo input="{Binding}"
+ property="nattable:Table:localColumnHeaderAxisConfiguration.pastedEObjectId"
+ customLabel="Pasted Element Id"></ppe:StringCombo>
+ <ppe:ReferenceDialog input="{Binding}"
+ property="nattable:Table:localColumnHeaderAxisConfiguration.pastedEObjectContainmentFeature"
+ customLabel="Containment Feature"></ppe:ReferenceDialog>
+ <ppe:MultiReference input="{Binding}"
+ property="nattable:Table:localColumnHeaderAxisConfiguration.postActions"
+ customLabel="Post Actions"></ppe:MultiReference>
+ <ppe:ReferenceDialog input="{Binding}"
+ property="nattable:Table:localColumnHeaderAxisConfiguration.axisIdentifier"
+ customLabel="Axis used as identifier"></ppe:ReferenceDialog>
+ </Group>
</Composite> \ No newline at end of file
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties/model/ui/CanPasteEObjectRowSection.xwt b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties/model/ui/CanPasteEObjectRowSection.xwt
index bb09bcd4042..cbb0852256a 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties/model/ui/CanPasteEObjectRowSection.xwt
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties/model/ui/CanPasteEObjectRowSection.xwt
@@ -1,26 +1,29 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Composite xmlns:ppe="clr-namespace:org.eclipse.papyrus.views.properties.widgets"
- xmlns="http://www.eclipse.org/xwt/presentation" xmlns:x="http://www.eclipse.org/xwt"
- xmlns:ppel="clr-namespace:org.eclipse.papyrus.views.properties.widgets.layout">
- <Composite.layout>
- <ppel:PropertiesLayout></ppel:PropertiesLayout>
- </Composite.layout>
- <Group text="Paste Row Axis">
- <Group.layout>
- <ppel:PropertiesLayout numColumns="3"
- makeColumnsEqualWidth="true"></ppel:PropertiesLayout>
- </Group.layout>
- <ppe:BooleanCheckbox input="{Binding}"
- property="nattable:Table:localRowHeaderAxisConfiguration.detachedMode"
- customLabel="Detached Mode"></ppe:BooleanCheckbox>
- <ppe:StringCombo input="{Binding}"
- property="nattable:Table:localRowHeaderAxisConfiguration.pastedEObjectId"
- customLabel="Pasted Element Id"></ppe:StringCombo>
- <ppe:ReferenceDialog input="{Binding}"
- property="nattable:Table:localRowHeaderAxisConfiguration.pastedEObjectContainmentFeature"
- customLabel="Containment Feature"></ppe:ReferenceDialog>
- <ppe:MultiReference input="{Binding}"
- property="nattable:Table:localRowHeaderAxisConfiguration.postActions"
- customLabel="Post Actions"></ppe:MultiReference>
- </Group>
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns:ppe="clr-namespace:org.eclipse.papyrus.views.properties.widgets"
+ xmlns="http://www.eclipse.org/xwt/presentation" xmlns:x="http://www.eclipse.org/xwt"
+ xmlns:ppel="clr-namespace:org.eclipse.papyrus.views.properties.widgets.layout">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Group text="Paste Row Axis">
+ <Group.layout>
+ <ppel:PropertiesLayout numColumns="3"
+ makeColumnsEqualWidth="true"></ppel:PropertiesLayout>
+ </Group.layout>
+ <ppe:BooleanCheckbox input="{Binding}"
+ property="nattable:Table:localRowHeaderAxisConfiguration.detachedMode"
+ customLabel="Detached Mode"></ppe:BooleanCheckbox>
+ <ppe:StringCombo input="{Binding}"
+ property="nattable:Table:localRowHeaderAxisConfiguration.pastedEObjectId"
+ customLabel="Pasted Element Id"></ppe:StringCombo>
+ <ppe:ReferenceDialog input="{Binding}"
+ property="nattable:Table:localRowHeaderAxisConfiguration.pastedEObjectContainmentFeature"
+ customLabel="Containment Feature"></ppe:ReferenceDialog>
+ <ppe:MultiReference input="{Binding}"
+ property="nattable:Table:localRowHeaderAxisConfiguration.postActions"
+ customLabel="Post Actions"></ppe:MultiReference>
+ <ppe:ReferenceDialog input="{Binding}"
+ property="nattable:Table:localRowHeaderAxisConfiguration.axisIdentifier"
+ customLabel="Axis used as identifier"></ppe:ReferenceDialog>
+ </Group>
</Composite> \ No newline at end of file
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties/src/org/eclipse/papyrus/infra/nattable/properties/modelelement/NatTableModelElement.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties/src/org/eclipse/papyrus/infra/nattable/properties/modelelement/NatTableModelElement.java
index be6d88a2dd9..2e0a40d3f40 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties/src/org/eclipse/papyrus/infra/nattable/properties/modelelement/NatTableModelElement.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties/src/org/eclipse/papyrus/infra/nattable/properties/modelelement/NatTableModelElement.java
@@ -1,634 +1,661 @@
-/*****************************************************************************
- * Copyright (c) 2013, 2014 CEA LIST and others.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- * Christian W. Damus (CEA) - bug 323802
- *
- *****************************************************************************/
-package org.eclipse.papyrus.infra.nattable.properties.modelelement;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.core.databinding.observable.IObservable;
-import org.eclipse.emf.common.notify.Adapter;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.impl.AdapterImpl;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.ILabelProviderListener;
-import org.eclipse.papyrus.infra.emf.nattable.selection.EObjectSelectionExtractor;
-import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
-import org.eclipse.papyrus.infra.nattable.model.nattable.NattablePackage;
-import org.eclipse.papyrus.infra.nattable.model.nattable.Table;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AbstractHeaderAxisConfiguration;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.NattableaxisconfigurationPackage;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattablelabelprovider.ILabelProviderConfiguration;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattablelabelprovider.NattablelabelproviderPackage;
-import org.eclipse.papyrus.infra.nattable.properties.observable.ColumnDisplayFilterHeaderObservableValue;
-import org.eclipse.papyrus.infra.nattable.properties.observable.ColumnDisplayIndexHeaderObservableValue;
-import org.eclipse.papyrus.infra.nattable.properties.observable.ColumnDisplayLabelHeaderObservableValue;
-import org.eclipse.papyrus.infra.nattable.properties.observable.ColumnFeatureLabelDisplayIconObservableValue;
-import org.eclipse.papyrus.infra.nattable.properties.observable.ColumnFeatureLabelDisplayIsDerivedObservableValue;
-import org.eclipse.papyrus.infra.nattable.properties.observable.ColumnFeatureLabelDisplayLabelObservableValue;
-import org.eclipse.papyrus.infra.nattable.properties.observable.ColumnFeatureLabelDisplayMultiplicityObservableValue;
-import org.eclipse.papyrus.infra.nattable.properties.observable.ColumnFeatureLabelDisplayNameObservableValue;
-import org.eclipse.papyrus.infra.nattable.properties.observable.ColumnFeatureLabelDisplayTypeObservableValue;
-import org.eclipse.papyrus.infra.nattable.properties.observable.ColumnIndexHeaderStyleObservableValue;
-import org.eclipse.papyrus.infra.nattable.properties.observable.ColumnObjectLabelDisplayIconObservableValue;
-import org.eclipse.papyrus.infra.nattable.properties.observable.ColumnObjectLabelDisplayLabelObservableValue;
-import org.eclipse.papyrus.infra.nattable.properties.observable.ColumnPasteEObjectContainmentFeatureObservableValue;
-import org.eclipse.papyrus.infra.nattable.properties.observable.ColumnPasteEObjectElementTypeIdObservableValue;
-import org.eclipse.papyrus.infra.nattable.properties.observable.ColumnPasteObjectDetachedModeObservableValue;
-import org.eclipse.papyrus.infra.nattable.properties.observable.ColumnPasteObjectPostActionsObservableValue;
-import org.eclipse.papyrus.infra.nattable.properties.observable.RowDisplayIndexHeaderObservableValue;
-import org.eclipse.papyrus.infra.nattable.properties.observable.RowDisplayLabelHeaderObservableValue;
-import org.eclipse.papyrus.infra.nattable.properties.observable.RowFeatureLabelDisplayIconObservableValue;
-import org.eclipse.papyrus.infra.nattable.properties.observable.RowFeatureLabelDisplayIsDerivedObservableValue;
-import org.eclipse.papyrus.infra.nattable.properties.observable.RowFeatureLabelDisplayLabelObservableValue;
-import org.eclipse.papyrus.infra.nattable.properties.observable.RowFeatureLabelDisplayMultiplicityObservableValue;
-import org.eclipse.papyrus.infra.nattable.properties.observable.RowFeatureLabelDisplayNameObservableValue;
-import org.eclipse.papyrus.infra.nattable.properties.observable.RowFeatureLabelDisplayTypeObservableValue;
-import org.eclipse.papyrus.infra.nattable.properties.observable.RowIndexHeaderStyleObservableValue;
-import org.eclipse.papyrus.infra.nattable.properties.observable.RowObjectLabelDisplayIconObservableValue;
-import org.eclipse.papyrus.infra.nattable.properties.observable.RowObjectLabelDisplayLabelObservableValue;
-import org.eclipse.papyrus.infra.nattable.properties.observable.RowPasteEObjectContainmentFeatureObservableValue;
-import org.eclipse.papyrus.infra.nattable.properties.observable.RowPasteEObjectElementTypeIdObservableValue;
-import org.eclipse.papyrus.infra.nattable.properties.observable.RowPasteObjectDetachedModeObservableValue;
-import org.eclipse.papyrus.infra.nattable.properties.observable.RowPasteObjectPostActionsObservableValue;
-import org.eclipse.papyrus.infra.nattable.properties.provider.ColumnContainmentFeatureContentProvider;
-import org.eclipse.papyrus.infra.nattable.properties.provider.ColumnElementTypeIdContentProvider;
-import org.eclipse.papyrus.infra.nattable.properties.provider.ColumnPostActionIdsProvider;
-import org.eclipse.papyrus.infra.nattable.properties.provider.ContextFeatureContentProvider;
-import org.eclipse.papyrus.infra.nattable.properties.provider.RowContainmentFeatureContentProvider;
-import org.eclipse.papyrus.infra.nattable.properties.provider.RowElementTypeIdContentProvider;
-import org.eclipse.papyrus.infra.nattable.properties.provider.RowPostActionIdsProvider;
-import org.eclipse.papyrus.infra.nattable.properties.utils.Constants;
-import org.eclipse.papyrus.infra.nattable.utils.HeaderAxisConfigurationManagementUtils;
-import org.eclipse.papyrus.infra.nattable.utils.NattableModelManagerFactory;
-import org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusView;
-import org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype;
-import org.eclipse.papyrus.infra.widgets.providers.IStaticContentProvider;
-import org.eclipse.papyrus.views.properties.modelelement.EMFModelElement;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Listener;
-
-
-public class NatTableModelElement extends EMFModelElement {
-
- /**
- * this listener used to update the value of the property view
- */
- private Adapter tableListener;
-
- /**
- * the map linking the propertypath and the observable values
- */
- private Map<String, IObservable> observableValues;
-
- /**
- * the collection of the interesting features to update the property view
- */
- private Collection<EStructuralFeature> interestingFeatures;
-
- /**
- * the row header axis configuration
- */
- private AbstractHeaderAxisConfiguration rowHeaderAxisConfiguration;
-
- /**
- * the column header axis configuration
- */
- private AbstractHeaderAxisConfiguration columnHeaderAxisConfiguration;
-
- /**
- * the list of the column label provider configuration
- */
- private Collection<ILabelProviderConfiguration> columnLabelProviderConfigurations;
-
-
- /**
- * the list of the row label provider configuration
- */
- private Collection<ILabelProviderConfiguration> rowLabelProviderConfigurations;
-
- /**
- * a table manager created to get possible axis contents
- */
- private INattableModelManager tableModelManager;
-
- /**
- *
- * Constructor.
- *
- * @param source
- * the table
- * @param domain
- * the editing domain
- */
- public NatTableModelElement(final Table source, final EditingDomain domain) {
- super(source, domain);
- init();
- }
-
- /**
- * Add the listener
- */
- private void init() {
- tableModelManager = NattableModelManagerFactory.INSTANCE.createNatTableModelManager(getEditedTable(), new EObjectSelectionExtractor());
- this.observableValues = new HashMap<String, IObservable>();
- this.interestingFeatures = new ArrayList<EStructuralFeature>();
- interestingFeatures.add(NattablePackage.eINSTANCE.getTable_Prototype());
- interestingFeatures.add(NattablePackage.eINSTANCE.getTable_Owner());
- interestingFeatures.add(NattablePackage.eINSTANCE.getTable_Context());
- interestingFeatures.add(NattablePackage.eINSTANCE.getTable_InvertAxis());
- interestingFeatures.add(NattablePackage.eINSTANCE.getTable_LocalColumnHeaderAxisConfiguration());
- interestingFeatures.add(NattablePackage.eINSTANCE.getTable_LocalRowHeaderAxisConfiguration());
- interestingFeatures.add(NattableaxisconfigurationPackage.eINSTANCE.getAbstractHeaderAxisConfiguration_DisplayFilter());
- interestingFeatures.add(NattableaxisconfigurationPackage.eINSTANCE.getAbstractHeaderAxisConfiguration_DisplayIndex());
- interestingFeatures.add(NattableaxisconfigurationPackage.eINSTANCE.getAbstractHeaderAxisConfiguration_DisplayLabel());
- interestingFeatures.add(NattableaxisconfigurationPackage.eINSTANCE.getAbstractHeaderAxisConfiguration_IndexStyle());
- interestingFeatures.add(NattablelabelproviderPackage.eINSTANCE.getFeatureLabelProviderConfiguration_DisplayIsDerived());
- interestingFeatures.add(NattablelabelproviderPackage.eINSTANCE.getFeatureLabelProviderConfiguration_DisplayMultiplicity());
- interestingFeatures.add(NattablelabelproviderPackage.eINSTANCE.getFeatureLabelProviderConfiguration_DisplayName());
- interestingFeatures.add(NattablelabelproviderPackage.eINSTANCE.getFeatureLabelProviderConfiguration_DisplayType());
- interestingFeatures.add(NattablelabelproviderPackage.eINSTANCE.getObjectLabelProviderConfiguration_DisplayIcon());
- interestingFeatures.add(NattablelabelproviderPackage.eINSTANCE.getObjectLabelProviderConfiguration_DisplayLabel());
-
- this.tableListener = new AdapterImpl() {
-
- /**
- *
- * @see org.eclipse.emf.common.notify.impl.AdapterImpl#notifyChanged(org.eclipse.emf.common.notify.Notification)
- *
- * @param msg
- */
- @Override
- public void notifyChanged(Notification msg) {
- if (interestingFeatures.contains(msg.getFeature())) {
- updateValues();
- }
- }
- };
- // we add a listener on the main object managed by the property view
- source.eAdapters().add(tableListener);
- initOtherFieldsAndAddOthersListeners();
-
- }
-
- /**
- * init the fields of the elements to listen (excepted the table itself)+ add listeners on them
- */
- private void initOtherFieldsAndAddOthersListeners() {
-
- columnHeaderAxisConfiguration = HeaderAxisConfigurationManagementUtils.getColumnAbstractHeaderAxisInTable(getEditedTable());
- rowHeaderAxisConfiguration = HeaderAxisConfigurationManagementUtils.getRowAbstractHeaderAxisInTable(getEditedTable());
-
- // COLUMNS MANAGEMENT
- // we add a listener on the columnHeaderAxisConfiguration
- if (columnHeaderAxisConfiguration != null) {
- columnHeaderAxisConfiguration.eAdapters().add(tableListener);
- }
-
- if (columnHeaderAxisConfiguration != null) {
- columnLabelProviderConfigurations = columnHeaderAxisConfiguration.getOwnedLabelConfigurations();
- }
-
- if (this.columnLabelProviderConfigurations != null) {
- // we add listener on all column label configurations
- for (final ILabelProviderConfiguration conf : columnLabelProviderConfigurations) {
- conf.eAdapters().add(tableListener);
- }
- }
-
- // ROW MANAGEMENT
- // we add a listener on the rowHeaderAxisConfiguration
- if (rowHeaderAxisConfiguration != null) {
- rowHeaderAxisConfiguration.eAdapters().add(tableListener);
- }
-
- if (rowHeaderAxisConfiguration != null) {
- rowLabelProviderConfigurations = rowHeaderAxisConfiguration.getOwnedLabelConfigurations();
- }
-
- if (this.rowLabelProviderConfigurations != null) {
- // we add listener on all column label configurations
- for (final ILabelProviderConfiguration conf : rowLabelProviderConfigurations) {
- conf.eAdapters().add(tableListener);
- }
- }
-
-
-
- }
-
- /**
- * remove the listener
- */
- private void removeListeners() {
- // COLUMNS MANAGEMENT
- // we add a listener on the columnHeaderAxisConfiguration
- if (columnHeaderAxisConfiguration != null) {
- columnHeaderAxisConfiguration.eAdapters().remove(tableListener);
- }
-
-
-
- if (this.columnLabelProviderConfigurations != null) {
- // we add listener on all column label configurations
- for (final ILabelProviderConfiguration conf : columnLabelProviderConfigurations) {
- conf.eAdapters().remove(tableListener);
- }
- }
-
- // ROW MANAGEMENT
- // we add a listener on the rowHeaderAxisConfiguration
- if (rowHeaderAxisConfiguration != null) {
- rowHeaderAxisConfiguration.eAdapters().remove(tableListener);
- }
-
- if (this.rowLabelProviderConfigurations != null) {
- // we add listener on all column label configurations
- for (final ILabelProviderConfiguration conf : rowLabelProviderConfigurations) {
- conf.eAdapters().remove(tableListener);
- }
- }
- }
-
- /**
- * update all values in the property view
- */
- private void updateValues() {
- // we do the update with asyncExec to be sure that the new values have been set before to update it
- Display.getDefault().asyncExec(new Runnable() {
-
- /**
- *
- * @see java.lang.Runnable#run()
- *
- */
- @Override
- public void run() {
- removeListeners();
- initOtherFieldsAndAddOthersListeners();
-
- final Event event = new Event();
- for (final IObservable current : observableValues.values()) {
- if (current instanceof Listener) {
- ((Listener) current).handleEvent(event);
- }
- }
- }
- });
- }
-
- /**
- *
- * @see org.eclipse.papyrus.views.properties.modelelement.AbstractModelElement#dispose()
- *
- */
- @Override
- public void dispose() {
- super.dispose();
- source.eAdapters().remove(tableListener);
- removeListeners();
- observableValues.clear();
- columnLabelProviderConfigurations = null;
- rowLabelProviderConfigurations = null;
- tableModelManager.dispose();
- tableModelManager = null;
- }
-
-
- /**
- *
- * @return
- */
- private Table getEditedTable() {
- return (Table) source;
- }
-
- /**
- *
- * @see org.eclipse.papyrus.views.properties.modelelement.EMFModelElement#doGetObservable(java.lang.String)
- *
- * @param propertyPath
- * @return
- */
- @Override
- protected IObservable doGetObservable(final String propertyPath) {
- IObservable value = this.observableValues.get(propertyPath);
- if (value == null) {
- Table table = getEditedTable();
- // column header properties
- if (Constants.LOCAL_COLUMN_HEADER_AXIS_CONFIGURATION_DISPLAY_FILTER.equals(propertyPath)) {
- value = new ColumnDisplayFilterHeaderObservableValue(table);
- } else if (Constants.LOCAL_COLUMN_HEADER_AXIS_CONFIGURATION_DISPLAY_INDEX.equals(propertyPath)) {
- value = new ColumnDisplayIndexHeaderObservableValue(table);
- } else if (Constants.LOCAL_COLUMN_HEADER_AXIS_CONFIGURATION_DISPLAY_LABEL.equals(propertyPath)) {
- value = new ColumnDisplayLabelHeaderObservableValue(table);
- } else if (Constants.LOCAL_COLUMN_HEADER_AXIS_CONFIGURATION_INDEX_STYLE.equals(propertyPath)) {
- value = new ColumnIndexHeaderStyleObservableValue(table);
-
-
- // row header property
- } else if (Constants.LOCAL_ROW_HEADER_AXIS_CONFIGURATION_DISPLAY_INDEX.equals(propertyPath)) {
- value = new RowDisplayIndexHeaderObservableValue(table);
- } else if (Constants.LOCAL_ROW_HEADER_AXIS_CONFIGURATION_DISPLAY_LABEL.equals(propertyPath)) {
- value = new RowDisplayLabelHeaderObservableValue(table);
- } else if (Constants.LOCAL_ROW_HEADER_AXIS_CONFIGURATION_INDEX_STYLE.equals(propertyPath)) {
- value = new RowIndexHeaderStyleObservableValue(table);
-
-
- // feature column label property
- } else if (Constants.COLUMN_FEATURE_LABEL_CONFIGURATION_DISPLAY_ICON.equals(propertyPath)) {
- value = new ColumnFeatureLabelDisplayIconObservableValue(table);
- } else if (Constants.COLUMN_FEATURE_LABEL_CONFIGURATION_DISPLAY_LABEL.equals(propertyPath)) {
- value = new ColumnFeatureLabelDisplayLabelObservableValue(table);
- } else if (Constants.COLUMN_FEATURE_LABEL_CONFIGURATION_DISPLAY_IS_DERIVED.equals(propertyPath)) {
- value = new ColumnFeatureLabelDisplayIsDerivedObservableValue(table);
- } else if (Constants.COLUMN__FEATURE_LABEL_CONFIGURATION_DISPLAY_NAME.equals(propertyPath)) {
- value = new ColumnFeatureLabelDisplayNameObservableValue(table);
- } else if (Constants.COLUMN_FEATURE_LABEL_CONFIGURATION_DISPLAY_TYPE.equals(propertyPath)) {
- value = new ColumnFeatureLabelDisplayTypeObservableValue(table);
- } else if (Constants.COLUMN_FEATURE_LABEL_CONFIGURATION_DISPLAY_MULTIPLICITY.equals(propertyPath)) {
- value = new ColumnFeatureLabelDisplayMultiplicityObservableValue(table);
-
-
- // object column label property
- } else if (Constants.COLUMN_OBJECT_LABEL_CONFIGURATION_DISPLAY_ICON.equals(propertyPath)) {
- value = new ColumnObjectLabelDisplayIconObservableValue(table);
- } else if (Constants.COLUMN_OBJECT_LABEL_CONFIGURATION_DISPLAY_LABEL.equals(propertyPath)) {
- value = new ColumnObjectLabelDisplayLabelObservableValue(table);
- } else
-
- // feature row label property
- if (Constants.ROW_FEATURE_LABEL_CONFIGURATION_DISPLAY_ICON.equals(propertyPath)) {
- value = new RowFeatureLabelDisplayIconObservableValue(table);
- } else if (Constants.ROW_FEATURE_LABEL_CONFIGURATION_DISPLAY_LABEL.equals(propertyPath)) {
- value = new RowFeatureLabelDisplayLabelObservableValue(table);
- } else if (Constants.ROW_FEATURE_LABEL_CONFIGURATION_DISPLAY_IS_DERIVED.equals(propertyPath)) {
- value = new RowFeatureLabelDisplayIsDerivedObservableValue(table);
- } else if (Constants.ROW__FEATURE_LABEL_CONFIGURATION_DISPLAY_NAME.equals(propertyPath)) {
- value = new RowFeatureLabelDisplayNameObservableValue(table);
- } else if (Constants.ROW_FEATURE_LABEL_CONFIGURATION_DISPLAY_TYPE.equals(propertyPath)) {
- value = new RowFeatureLabelDisplayTypeObservableValue(table);
- } else if (Constants.ROW_FEATURE_LABEL_CONFIGURATION_DISPLAY_MULTIPLICITY.equals(propertyPath)) {
- value = new RowFeatureLabelDisplayMultiplicityObservableValue(table);
-
-
- // object row label property
- } else if (Constants.ROW_OBJECT_LABEL_CONFIGURATION_DISPLAY_ICON.equals(propertyPath)) {
- value = new RowObjectLabelDisplayIconObservableValue(table);
- } else if (Constants.ROW_OBJECT_LABEL_CONFIGURATION_DISPLAY_LABEL.equals(propertyPath)) {
- value = new RowObjectLabelDisplayLabelObservableValue(table);
- }
-
- // paste row EObject
- else if (Constants.ROW_PASTED_EOBJECT_CONTAINMENT_FEATURE.equals(propertyPath)) {
- value = new RowPasteEObjectContainmentFeatureObservableValue(table);
- } else if (Constants.ROW_PASTED_EOBJECT_ID.equals(propertyPath)) {
- value = new RowPasteEObjectElementTypeIdObservableValue(table);
- } else if (Constants.ROW_PASTED_OBJECT_DETACHED_MODE_FEATURE.equals(propertyPath)) {
- value = new RowPasteObjectDetachedModeObservableValue(getEditedTable());
- } else if (Constants.ROW_PASTED_OBJECT_POST_ACTIONS_FEATURE.equals(propertyPath)) {
- value = new RowPasteObjectPostActionsObservableValue(getDomain(), getEditedTable());
- }
-
- // paste column EObject
- else if (Constants.COLUMN_PASTED_EOBJECT_CONTAINMENT_FEATURE.equals(propertyPath)) {
- value = new ColumnPasteEObjectContainmentFeatureObservableValue(table);
- } else if (Constants.COLUMN_PASTED_EOBJECT_ID.equals(propertyPath)) {
- value = new ColumnPasteEObjectElementTypeIdObservableValue(table);
- } else if (Constants.COLUMN_PASTED_OBJECT_DETACHED_MODE_FEATURE.equals(propertyPath)) {
- value = new ColumnPasteObjectDetachedModeObservableValue(getEditedTable());
- } else if (Constants.COLUMN_PASTED_OBJECT_POST_ACTIONS_FEATURE.equals(propertyPath)) {
- value = new ColumnPasteObjectPostActionsObservableValue(getDomain(), getEditedTable());
- }
-
- if (value != null) {
- this.observableValues.put(propertyPath, value);
- }
- }
- if (value != null) {
- return value;
- }
- return super.doGetObservable(propertyPath);
- }
-
- /**
- * @param propertyPath
- * @return
- */
- @Override
- protected boolean isFeatureEditable(String propertyPath) {
- boolean res = super.isFeatureEditable(propertyPath);
- if (!res) {
- // feature column label property
- if (Constants.COLUMN_FEATURE_LABEL_CONFIGURATION_DISPLAY_ICON.equals(propertyPath)) {
- res = true;
- } else if (Constants.COLUMN_FEATURE_LABEL_CONFIGURATION_DISPLAY_LABEL.equals(propertyPath)) {
- res = true;
- } else if (Constants.COLUMN_FEATURE_LABEL_CONFIGURATION_DISPLAY_IS_DERIVED.equals(propertyPath)) {
- res = true;
- } else if (Constants.COLUMN__FEATURE_LABEL_CONFIGURATION_DISPLAY_NAME.equals(propertyPath)) {
- res = true;
- } else if (Constants.COLUMN_FEATURE_LABEL_CONFIGURATION_DISPLAY_TYPE.equals(propertyPath)) {
- res = true;
- } else if (Constants.COLUMN_FEATURE_LABEL_CONFIGURATION_DISPLAY_MULTIPLICITY.equals(propertyPath)) {
- res = true;
-
- // object column label property
- } else if (Constants.COLUMN_OBJECT_LABEL_CONFIGURATION_DISPLAY_ICON.equals(propertyPath)) {
- res = true;
- } else if (Constants.COLUMN_OBJECT_LABEL_CONFIGURATION_DISPLAY_LABEL.equals(propertyPath)) {
- res = true;
- }
-
-
-
- // feature row label property
- else if (Constants.ROW_FEATURE_LABEL_CONFIGURATION_DISPLAY_ICON.equals(propertyPath)) {
- res = true;
- } else if (Constants.ROW_FEATURE_LABEL_CONFIGURATION_DISPLAY_LABEL.equals(propertyPath)) {
- res = true;
- } else if (Constants.ROW_FEATURE_LABEL_CONFIGURATION_DISPLAY_IS_DERIVED.equals(propertyPath)) {
- res = true;
- } else if (Constants.ROW__FEATURE_LABEL_CONFIGURATION_DISPLAY_NAME.equals(propertyPath)) {
- res = true;
- } else if (Constants.ROW_FEATURE_LABEL_CONFIGURATION_DISPLAY_TYPE.equals(propertyPath)) {
- res = true;
- } else if (Constants.ROW_FEATURE_LABEL_CONFIGURATION_DISPLAY_MULTIPLICITY.equals(propertyPath)) {
- res = true;
-
- // object row label property
- } else if (Constants.ROW_OBJECT_LABEL_CONFIGURATION_DISPLAY_ICON.equals(propertyPath)) {
- res = true;
- } else if (Constants.ROW_OBJECT_LABEL_CONFIGURATION_DISPLAY_LABEL.equals(propertyPath)) {
- res = true;
- }
-
- // paste row EObject
- else if (Constants.ROW_PASTED_EOBJECT_CONTAINMENT_FEATURE.equals(propertyPath)) {
- res = new RowContainmentFeatureContentProvider(getEditedTable()).getElements().length != 0;
- } else if (Constants.ROW_PASTED_EOBJECT_ID.equals(propertyPath)) {
- res = new RowElementTypeIdContentProvider(this.tableModelManager).getElements().length != 0;
- } else if (Constants.ROW_PASTED_OBJECT_DETACHED_MODE_FEATURE.equals(propertyPath)) {
- res = true;
- } else if (Constants.ROW_PASTED_OBJECT_POST_ACTIONS_FEATURE.equals(propertyPath)) {
- res = new RowPostActionIdsProvider(this.tableModelManager).getElements().length != 0;
-
- // paste column EObject
- } else if (Constants.COLUMN_PASTED_EOBJECT_CONTAINMENT_FEATURE.equals(propertyPath)) {
- res = new ColumnContainmentFeatureContentProvider(getEditedTable()).getElements().length != 0;
- } else if (Constants.COLUMN_PASTED_EOBJECT_ID.equals(propertyPath)) {
- res = new ColumnElementTypeIdContentProvider(this.tableModelManager).getElements().length != 0;
- } else if (Constants.COLUMN_PASTED_OBJECT_DETACHED_MODE_FEATURE.equals(propertyPath)) {
- res = true;
- } else if (Constants.COLUMN_PASTED_OBJECT_POST_ACTIONS_FEATURE.equals(propertyPath)) {
- res = new ColumnPostActionIdsProvider(this.tableModelManager).getElements().length != 0;
- }
- }
-
- return res;
- }
-
- /**
- *
- * @see org.eclipse.papyrus.views.properties.modelelement.EMFModelElement#getContentProvider(java.lang.String)
- *
- * @param propertyPath
- * @return
- */
- @Override
- public IStaticContentProvider getContentProvider(String propertyPath) {
- IStaticContentProvider provider = null;
- if (Constants.TABLE_CONTEXT.equals(propertyPath)) {
- Table table = getEditedTable();
- provider = new ContextFeatureContentProvider(table, getRoot(table.getContext()));
- } else if (Constants.ROW_PASTED_EOBJECT_CONTAINMENT_FEATURE.equals(propertyPath)) {
- provider = new RowContainmentFeatureContentProvider(getEditedTable());
- } else if (Constants.COLUMN_PASTED_EOBJECT_CONTAINMENT_FEATURE.equals(propertyPath)) {
- provider = new ColumnContainmentFeatureContentProvider(getEditedTable());
- } else if (Constants.ROW_PASTED_EOBJECT_ID.equals(propertyPath)) {
- provider = new RowElementTypeIdContentProvider(this.tableModelManager);
- } else if (Constants.COLUMN_PASTED_EOBJECT_ID.equals(propertyPath)) {
- provider = new ColumnElementTypeIdContentProvider(this.tableModelManager);
- } else if (Constants.ROW_PASTED_OBJECT_POST_ACTIONS_FEATURE.equals(propertyPath)) {
- provider = new RowPostActionIdsProvider(this.tableModelManager);
- } else if (Constants.COLUMN_PASTED_OBJECT_POST_ACTIONS_FEATURE.equals(propertyPath)) {
- provider = new RowPostActionIdsProvider(this.tableModelManager);
- }
- if (provider != null) {
- return provider;
- }
- return super.getContentProvider(propertyPath);
- }
-
- /**
- *
- * @see org.eclipse.papyrus.views.properties.modelelement.EMFModelElement#isUnique(java.lang.String)
- *
- * @param propertyPath
- * @return
- */
- @Override
- public boolean isUnique(final String propertyPath) {
- if (Constants.ROW_PASTED_OBJECT_POST_ACTIONS_FEATURE.equals(propertyPath)) {
- return true;
- } else if (Constants.COLUMN_PASTED_OBJECT_POST_ACTIONS_FEATURE.equals(propertyPath)) {
- return true;
- }
- return super.isUnique(propertyPath);
- }
-
- /**
- *
- * @see org.eclipse.papyrus.views.properties.modelelement.EMFModelElement#isOrdered(java.lang.String)
- *
- * @param propertyPath
- * @return
- */
- @Override
- public boolean isOrdered(final String propertyPath) {
- if (Constants.ROW_PASTED_OBJECT_POST_ACTIONS_FEATURE.equals(propertyPath)) {
- return true;
- } else if (Constants.COLUMN_PASTED_OBJECT_POST_ACTIONS_FEATURE.equals(propertyPath)) {
- return true;
- }
- return super.isOrdered(propertyPath);
- }
-
- @Override
- public ILabelProvider getLabelProvider(String propertyPath) {
- if (propertyPath.endsWith("prototype")) {
- return new ILabelProvider() {
- @Override
- public void addListener(ILabelProviderListener listener) {
- }
-
- @Override
- public void removeListener(ILabelProviderListener listener) {
- }
-
- @Override
- public void dispose() {
- }
-
- @Override
- public boolean isLabelProperty(Object element, String property) {
- return false;
- }
-
- @Override
- public Image getImage(Object element) {
- if (element == null) {
- return null;
- }
- ViewPrototype proto = ViewPrototype.get((PapyrusView) element);
- return proto.getIcon();
- }
-
- @Override
- public String getText(Object element) {
- if (element == null) {
- return null;
- }
- ViewPrototype proto = ViewPrototype.get((PapyrusView) element);
- return proto.getQualifiedName();
- }
- };
- }
- return super.getLabelProvider(propertyPath);
- }
-
- /**
- * Gets the root EObject from the given one
- *
- * @param obj
- * An object
- * @return The root object which is an ancestor of the given one
- */
- private EObject getRoot(EObject obj) {
- EObject current = obj;
- EObject parent = obj.eContainer();
- while (parent != null) {
- current = parent;
- parent = parent.eContainer();
- }
- return current;
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2013, 2014 CEA LIST and others.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 323802
+ * Nicolas FAUVERGUE (ALL4tEC) nicolas.fauvergue@all4tec.net - Bug 476618
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.nattable.properties.modelelement;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.databinding.observable.IObservable;
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.impl.AdapterImpl;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.ILabelProviderListener;
+import org.eclipse.papyrus.infra.emf.nattable.selection.EObjectSelectionExtractor;
+import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
+import org.eclipse.papyrus.infra.nattable.model.nattable.NattablePackage;
+import org.eclipse.papyrus.infra.nattable.model.nattable.Table;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AbstractHeaderAxisConfiguration;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.NattableaxisconfigurationPackage;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattablelabelprovider.ILabelProviderConfiguration;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattablelabelprovider.NattablelabelproviderPackage;
+import org.eclipse.papyrus.infra.nattable.properties.observable.ColumnDisplayFilterHeaderObservableValue;
+import org.eclipse.papyrus.infra.nattable.properties.observable.ColumnDisplayIndexHeaderObservableValue;
+import org.eclipse.papyrus.infra.nattable.properties.observable.ColumnDisplayLabelHeaderObservableValue;
+import org.eclipse.papyrus.infra.nattable.properties.observable.ColumnFeatureLabelDisplayIconObservableValue;
+import org.eclipse.papyrus.infra.nattable.properties.observable.ColumnFeatureLabelDisplayIsDerivedObservableValue;
+import org.eclipse.papyrus.infra.nattable.properties.observable.ColumnFeatureLabelDisplayLabelObservableValue;
+import org.eclipse.papyrus.infra.nattable.properties.observable.ColumnFeatureLabelDisplayMultiplicityObservableValue;
+import org.eclipse.papyrus.infra.nattable.properties.observable.ColumnFeatureLabelDisplayNameObservableValue;
+import org.eclipse.papyrus.infra.nattable.properties.observable.ColumnFeatureLabelDisplayTypeObservableValue;
+import org.eclipse.papyrus.infra.nattable.properties.observable.ColumnIndexHeaderStyleObservableValue;
+import org.eclipse.papyrus.infra.nattable.properties.observable.ColumnObjectLabelDisplayIconObservableValue;
+import org.eclipse.papyrus.infra.nattable.properties.observable.ColumnObjectLabelDisplayLabelObservableValue;
+import org.eclipse.papyrus.infra.nattable.properties.observable.ColumnPasteEObjectAxisIdentifierObservableValue;
+import org.eclipse.papyrus.infra.nattable.properties.observable.ColumnPasteEObjectContainmentFeatureObservableValue;
+import org.eclipse.papyrus.infra.nattable.properties.observable.ColumnPasteEObjectElementTypeIdObservableValue;
+import org.eclipse.papyrus.infra.nattable.properties.observable.ColumnPasteObjectDetachedModeObservableValue;
+import org.eclipse.papyrus.infra.nattable.properties.observable.ColumnPasteObjectPostActionsObservableValue;
+import org.eclipse.papyrus.infra.nattable.properties.observable.RowDisplayIndexHeaderObservableValue;
+import org.eclipse.papyrus.infra.nattable.properties.observable.RowDisplayLabelHeaderObservableValue;
+import org.eclipse.papyrus.infra.nattable.properties.observable.RowFeatureLabelDisplayIconObservableValue;
+import org.eclipse.papyrus.infra.nattable.properties.observable.RowFeatureLabelDisplayIsDerivedObservableValue;
+import org.eclipse.papyrus.infra.nattable.properties.observable.RowFeatureLabelDisplayLabelObservableValue;
+import org.eclipse.papyrus.infra.nattable.properties.observable.RowFeatureLabelDisplayMultiplicityObservableValue;
+import org.eclipse.papyrus.infra.nattable.properties.observable.RowFeatureLabelDisplayNameObservableValue;
+import org.eclipse.papyrus.infra.nattable.properties.observable.RowFeatureLabelDisplayTypeObservableValue;
+import org.eclipse.papyrus.infra.nattable.properties.observable.RowIndexHeaderStyleObservableValue;
+import org.eclipse.papyrus.infra.nattable.properties.observable.RowObjectLabelDisplayIconObservableValue;
+import org.eclipse.papyrus.infra.nattable.properties.observable.RowObjectLabelDisplayLabelObservableValue;
+import org.eclipse.papyrus.infra.nattable.properties.observable.RowPasteEObjectAxisIdentifierObservableValue;
+import org.eclipse.papyrus.infra.nattable.properties.observable.RowPasteEObjectContainmentFeatureObservableValue;
+import org.eclipse.papyrus.infra.nattable.properties.observable.RowPasteEObjectElementTypeIdObservableValue;
+import org.eclipse.papyrus.infra.nattable.properties.observable.RowPasteObjectDetachedModeObservableValue;
+import org.eclipse.papyrus.infra.nattable.properties.observable.RowPasteObjectPostActionsObservableValue;
+import org.eclipse.papyrus.infra.nattable.properties.provider.AxisIdentifierLabelProvider;
+import org.eclipse.papyrus.infra.nattable.properties.provider.ColumnAxisIdentifierContentProvider;
+import org.eclipse.papyrus.infra.nattable.properties.provider.ColumnContainmentFeatureContentProvider;
+import org.eclipse.papyrus.infra.nattable.properties.provider.ColumnElementTypeIdContentProvider;
+import org.eclipse.papyrus.infra.nattable.properties.provider.ColumnPostActionIdsProvider;
+import org.eclipse.papyrus.infra.nattable.properties.provider.ContextFeatureContentProvider;
+import org.eclipse.papyrus.infra.nattable.properties.provider.RowAxisIdentifierContentProvider;
+import org.eclipse.papyrus.infra.nattable.properties.provider.RowContainmentFeatureContentProvider;
+import org.eclipse.papyrus.infra.nattable.properties.provider.RowElementTypeIdContentProvider;
+import org.eclipse.papyrus.infra.nattable.properties.provider.RowPostActionIdsProvider;
+import org.eclipse.papyrus.infra.nattable.properties.utils.Constants;
+import org.eclipse.papyrus.infra.nattable.utils.HeaderAxisConfigurationManagementUtils;
+import org.eclipse.papyrus.infra.nattable.utils.NattableModelManagerFactory;
+import org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusView;
+import org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype;
+import org.eclipse.papyrus.infra.widgets.providers.IStaticContentProvider;
+import org.eclipse.papyrus.views.properties.modelelement.EMFModelElement;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Listener;
+
+
+public class NatTableModelElement extends EMFModelElement {
+
+ /**
+ * this listener used to update the value of the property view
+ */
+ private Adapter tableListener;
+
+ /**
+ * the map linking the propertypath and the observable values
+ */
+ private Map<String, IObservable> observableValues;
+
+ /**
+ * the collection of the interesting features to update the property view
+ */
+ private Collection<EStructuralFeature> interestingFeatures;
+
+ /**
+ * the row header axis configuration
+ */
+ private AbstractHeaderAxisConfiguration rowHeaderAxisConfiguration;
+
+ /**
+ * the column header axis configuration
+ */
+ private AbstractHeaderAxisConfiguration columnHeaderAxisConfiguration;
+
+ /**
+ * the list of the column label provider configuration
+ */
+ private Collection<ILabelProviderConfiguration> columnLabelProviderConfigurations;
+
+
+ /**
+ * the list of the row label provider configuration
+ */
+ private Collection<ILabelProviderConfiguration> rowLabelProviderConfigurations;
+
+ /**
+ * a table manager created to get possible axis contents
+ */
+ private INattableModelManager tableModelManager;
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param source
+ * the table
+ * @param domain
+ * the editing domain
+ */
+ public NatTableModelElement(final Table source, final EditingDomain domain) {
+ super(source, domain);
+ init();
+ }
+
+ /**
+ * Add the listener
+ */
+ private void init() {
+ tableModelManager = NattableModelManagerFactory.INSTANCE.createNatTableModelManager(getEditedTable(), new EObjectSelectionExtractor());
+ this.observableValues = new HashMap<String, IObservable>();
+ this.interestingFeatures = new ArrayList<EStructuralFeature>();
+ interestingFeatures.add(NattablePackage.eINSTANCE.getTable_Prototype());
+ interestingFeatures.add(NattablePackage.eINSTANCE.getTable_Owner());
+ interestingFeatures.add(NattablePackage.eINSTANCE.getTable_Context());
+ interestingFeatures.add(NattablePackage.eINSTANCE.getTable_InvertAxis());
+ interestingFeatures.add(NattablePackage.eINSTANCE.getTable_LocalColumnHeaderAxisConfiguration());
+ interestingFeatures.add(NattablePackage.eINSTANCE.getTable_LocalRowHeaderAxisConfiguration());
+ interestingFeatures.add(NattableaxisconfigurationPackage.eINSTANCE.getAbstractHeaderAxisConfiguration_DisplayFilter());
+ interestingFeatures.add(NattableaxisconfigurationPackage.eINSTANCE.getAbstractHeaderAxisConfiguration_DisplayIndex());
+ interestingFeatures.add(NattableaxisconfigurationPackage.eINSTANCE.getAbstractHeaderAxisConfiguration_DisplayLabel());
+ interestingFeatures.add(NattableaxisconfigurationPackage.eINSTANCE.getAbstractHeaderAxisConfiguration_IndexStyle());
+ interestingFeatures.add(NattablelabelproviderPackage.eINSTANCE.getFeatureLabelProviderConfiguration_DisplayIsDerived());
+ interestingFeatures.add(NattablelabelproviderPackage.eINSTANCE.getFeatureLabelProviderConfiguration_DisplayMultiplicity());
+ interestingFeatures.add(NattablelabelproviderPackage.eINSTANCE.getFeatureLabelProviderConfiguration_DisplayName());
+ interestingFeatures.add(NattablelabelproviderPackage.eINSTANCE.getFeatureLabelProviderConfiguration_DisplayType());
+ interestingFeatures.add(NattablelabelproviderPackage.eINSTANCE.getObjectLabelProviderConfiguration_DisplayIcon());
+ interestingFeatures.add(NattablelabelproviderPackage.eINSTANCE.getObjectLabelProviderConfiguration_DisplayLabel());
+
+ this.tableListener = new AdapterImpl() {
+
+ /**
+ *
+ * @see org.eclipse.emf.common.notify.impl.AdapterImpl#notifyChanged(org.eclipse.emf.common.notify.Notification)
+ *
+ * @param msg
+ */
+ @Override
+ public void notifyChanged(Notification msg) {
+ if (interestingFeatures.contains(msg.getFeature())) {
+ updateValues();
+ }
+ }
+ };
+ // we add a listener on the main object managed by the property view
+ source.eAdapters().add(tableListener);
+ initOtherFieldsAndAddOthersListeners();
+
+ }
+
+ /**
+ * init the fields of the elements to listen (excepted the table itself)+ add listeners on them
+ */
+ private void initOtherFieldsAndAddOthersListeners() {
+
+ columnHeaderAxisConfiguration = HeaderAxisConfigurationManagementUtils.getColumnAbstractHeaderAxisInTable(getEditedTable());
+ rowHeaderAxisConfiguration = HeaderAxisConfigurationManagementUtils.getRowAbstractHeaderAxisInTable(getEditedTable());
+
+ // COLUMNS MANAGEMENT
+ // we add a listener on the columnHeaderAxisConfiguration
+ if (columnHeaderAxisConfiguration != null) {
+ columnHeaderAxisConfiguration.eAdapters().add(tableListener);
+ }
+
+ if (columnHeaderAxisConfiguration != null) {
+ columnLabelProviderConfigurations = columnHeaderAxisConfiguration.getOwnedLabelConfigurations();
+ }
+
+ if (this.columnLabelProviderConfigurations != null) {
+ // we add listener on all column label configurations
+ for (final ILabelProviderConfiguration conf : columnLabelProviderConfigurations) {
+ conf.eAdapters().add(tableListener);
+ }
+ }
+
+ // ROW MANAGEMENT
+ // we add a listener on the rowHeaderAxisConfiguration
+ if (rowHeaderAxisConfiguration != null) {
+ rowHeaderAxisConfiguration.eAdapters().add(tableListener);
+ }
+
+ if (rowHeaderAxisConfiguration != null) {
+ rowLabelProviderConfigurations = rowHeaderAxisConfiguration.getOwnedLabelConfigurations();
+ }
+
+ if (this.rowLabelProviderConfigurations != null) {
+ // we add listener on all column label configurations
+ for (final ILabelProviderConfiguration conf : rowLabelProviderConfigurations) {
+ conf.eAdapters().add(tableListener);
+ }
+ }
+
+
+
+ }
+
+ /**
+ * remove the listener
+ */
+ private void removeListeners() {
+ // COLUMNS MANAGEMENT
+ // we add a listener on the columnHeaderAxisConfiguration
+ if (columnHeaderAxisConfiguration != null) {
+ columnHeaderAxisConfiguration.eAdapters().remove(tableListener);
+ }
+
+
+
+ if (this.columnLabelProviderConfigurations != null) {
+ // we add listener on all column label configurations
+ for (final ILabelProviderConfiguration conf : columnLabelProviderConfigurations) {
+ conf.eAdapters().remove(tableListener);
+ }
+ }
+
+ // ROW MANAGEMENT
+ // we add a listener on the rowHeaderAxisConfiguration
+ if (rowHeaderAxisConfiguration != null) {
+ rowHeaderAxisConfiguration.eAdapters().remove(tableListener);
+ }
+
+ if (this.rowLabelProviderConfigurations != null) {
+ // we add listener on all column label configurations
+ for (final ILabelProviderConfiguration conf : rowLabelProviderConfigurations) {
+ conf.eAdapters().remove(tableListener);
+ }
+ }
+ }
+
+ /**
+ * update all values in the property view
+ */
+ private void updateValues() {
+ // we do the update with asyncExec to be sure that the new values have been set before to update it
+ Display.getDefault().asyncExec(new Runnable() {
+
+ /**
+ *
+ * @see java.lang.Runnable#run()
+ *
+ */
+ @Override
+ public void run() {
+ removeListeners();
+ initOtherFieldsAndAddOthersListeners();
+
+ final Event event = new Event();
+ for (final IObservable current : observableValues.values()) {
+ if (current instanceof Listener) {
+ ((Listener) current).handleEvent(event);
+ }
+ }
+ }
+ });
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.views.properties.modelelement.AbstractModelElement#dispose()
+ *
+ */
+ @Override
+ public void dispose() {
+ super.dispose();
+ source.eAdapters().remove(tableListener);
+ removeListeners();
+ observableValues.clear();
+ columnLabelProviderConfigurations = null;
+ rowLabelProviderConfigurations = null;
+ tableModelManager.dispose();
+ tableModelManager = null;
+ }
+
+
+ /**
+ *
+ * @return
+ */
+ private Table getEditedTable() {
+ return (Table) source;
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.views.properties.modelelement.EMFModelElement#doGetObservable(java.lang.String)
+ *
+ * @param propertyPath
+ * @return
+ */
+ @Override
+ protected IObservable doGetObservable(final String propertyPath) {
+ IObservable value = this.observableValues.get(propertyPath);
+ if (value == null) {
+ Table table = getEditedTable();
+ // column header properties
+ if (Constants.LOCAL_COLUMN_HEADER_AXIS_CONFIGURATION_DISPLAY_FILTER.equals(propertyPath)) {
+ value = new ColumnDisplayFilterHeaderObservableValue(table);
+ } else if (Constants.LOCAL_COLUMN_HEADER_AXIS_CONFIGURATION_DISPLAY_INDEX.equals(propertyPath)) {
+ value = new ColumnDisplayIndexHeaderObservableValue(table);
+ } else if (Constants.LOCAL_COLUMN_HEADER_AXIS_CONFIGURATION_DISPLAY_LABEL.equals(propertyPath)) {
+ value = new ColumnDisplayLabelHeaderObservableValue(table);
+ } else if (Constants.LOCAL_COLUMN_HEADER_AXIS_CONFIGURATION_INDEX_STYLE.equals(propertyPath)) {
+ value = new ColumnIndexHeaderStyleObservableValue(table);
+
+
+ // row header property
+ } else if (Constants.LOCAL_ROW_HEADER_AXIS_CONFIGURATION_DISPLAY_INDEX.equals(propertyPath)) {
+ value = new RowDisplayIndexHeaderObservableValue(table);
+ } else if (Constants.LOCAL_ROW_HEADER_AXIS_CONFIGURATION_DISPLAY_LABEL.equals(propertyPath)) {
+ value = new RowDisplayLabelHeaderObservableValue(table);
+ } else if (Constants.LOCAL_ROW_HEADER_AXIS_CONFIGURATION_INDEX_STYLE.equals(propertyPath)) {
+ value = new RowIndexHeaderStyleObservableValue(table);
+
+
+ // feature column label property
+ } else if (Constants.COLUMN_FEATURE_LABEL_CONFIGURATION_DISPLAY_ICON.equals(propertyPath)) {
+ value = new ColumnFeatureLabelDisplayIconObservableValue(table);
+ } else if (Constants.COLUMN_FEATURE_LABEL_CONFIGURATION_DISPLAY_LABEL.equals(propertyPath)) {
+ value = new ColumnFeatureLabelDisplayLabelObservableValue(table);
+ } else if (Constants.COLUMN_FEATURE_LABEL_CONFIGURATION_DISPLAY_IS_DERIVED.equals(propertyPath)) {
+ value = new ColumnFeatureLabelDisplayIsDerivedObservableValue(table);
+ } else if (Constants.COLUMN__FEATURE_LABEL_CONFIGURATION_DISPLAY_NAME.equals(propertyPath)) {
+ value = new ColumnFeatureLabelDisplayNameObservableValue(table);
+ } else if (Constants.COLUMN_FEATURE_LABEL_CONFIGURATION_DISPLAY_TYPE.equals(propertyPath)) {
+ value = new ColumnFeatureLabelDisplayTypeObservableValue(table);
+ } else if (Constants.COLUMN_FEATURE_LABEL_CONFIGURATION_DISPLAY_MULTIPLICITY.equals(propertyPath)) {
+ value = new ColumnFeatureLabelDisplayMultiplicityObservableValue(table);
+
+
+ // object column label property
+ } else if (Constants.COLUMN_OBJECT_LABEL_CONFIGURATION_DISPLAY_ICON.equals(propertyPath)) {
+ value = new ColumnObjectLabelDisplayIconObservableValue(table);
+ } else if (Constants.COLUMN_OBJECT_LABEL_CONFIGURATION_DISPLAY_LABEL.equals(propertyPath)) {
+ value = new ColumnObjectLabelDisplayLabelObservableValue(table);
+ } else
+
+ // feature row label property
+ if (Constants.ROW_FEATURE_LABEL_CONFIGURATION_DISPLAY_ICON.equals(propertyPath)) {
+ value = new RowFeatureLabelDisplayIconObservableValue(table);
+ } else if (Constants.ROW_FEATURE_LABEL_CONFIGURATION_DISPLAY_LABEL.equals(propertyPath)) {
+ value = new RowFeatureLabelDisplayLabelObservableValue(table);
+ } else if (Constants.ROW_FEATURE_LABEL_CONFIGURATION_DISPLAY_IS_DERIVED.equals(propertyPath)) {
+ value = new RowFeatureLabelDisplayIsDerivedObservableValue(table);
+ } else if (Constants.ROW__FEATURE_LABEL_CONFIGURATION_DISPLAY_NAME.equals(propertyPath)) {
+ value = new RowFeatureLabelDisplayNameObservableValue(table);
+ } else if (Constants.ROW_FEATURE_LABEL_CONFIGURATION_DISPLAY_TYPE.equals(propertyPath)) {
+ value = new RowFeatureLabelDisplayTypeObservableValue(table);
+ } else if (Constants.ROW_FEATURE_LABEL_CONFIGURATION_DISPLAY_MULTIPLICITY.equals(propertyPath)) {
+ value = new RowFeatureLabelDisplayMultiplicityObservableValue(table);
+
+
+ // object row label property
+ } else if (Constants.ROW_OBJECT_LABEL_CONFIGURATION_DISPLAY_ICON.equals(propertyPath)) {
+ value = new RowObjectLabelDisplayIconObservableValue(table);
+ } else if (Constants.ROW_OBJECT_LABEL_CONFIGURATION_DISPLAY_LABEL.equals(propertyPath)) {
+ value = new RowObjectLabelDisplayLabelObservableValue(table);
+ }
+
+ // paste row EObject
+ else if (Constants.ROW_PASTED_EOBJECT_CONTAINMENT_FEATURE.equals(propertyPath)) {
+ value = new RowPasteEObjectContainmentFeatureObservableValue(table);
+ } else if (Constants.ROW_PASTED_EOBJECT_ID.equals(propertyPath)) {
+ value = new RowPasteEObjectElementTypeIdObservableValue(table);
+ } else if (Constants.ROW_PASTED_OBJECT_DETACHED_MODE_FEATURE.equals(propertyPath)) {
+ value = new RowPasteObjectDetachedModeObservableValue(getEditedTable());
+ } else if (Constants.ROW_PASTED_OBJECT_POST_ACTIONS_FEATURE.equals(propertyPath)) {
+ value = new RowPasteObjectPostActionsObservableValue(getDomain(), getEditedTable());
+ } else if (Constants.ROW_PASTED_EOBJECT_AXIS_IDENTIFIER_FEATURE.equals(propertyPath)) {
+ value = new RowPasteEObjectAxisIdentifierObservableValue(table);
+ }
+
+ // paste column EObject
+ else if (Constants.COLUMN_PASTED_EOBJECT_CONTAINMENT_FEATURE.equals(propertyPath)) {
+ value = new ColumnPasteEObjectContainmentFeatureObservableValue(table);
+ } else if (Constants.COLUMN_PASTED_EOBJECT_ID.equals(propertyPath)) {
+ value = new ColumnPasteEObjectElementTypeIdObservableValue(table);
+ } else if (Constants.COLUMN_PASTED_OBJECT_DETACHED_MODE_FEATURE.equals(propertyPath)) {
+ value = new ColumnPasteObjectDetachedModeObservableValue(getEditedTable());
+ } else if (Constants.COLUMN_PASTED_OBJECT_POST_ACTIONS_FEATURE.equals(propertyPath)) {
+ value = new ColumnPasteObjectPostActionsObservableValue(getDomain(), getEditedTable());
+ } else if (Constants.COLUMN_PASTED_EOBJECT_AXIS_IDENTIFIER_FEATURE.equals(propertyPath)) {
+ value = new ColumnPasteEObjectAxisIdentifierObservableValue(table);
+ }
+
+ if (value != null) {
+ this.observableValues.put(propertyPath, value);
+ }
+ }
+ if (value != null) {
+ return value;
+ }
+ return super.doGetObservable(propertyPath);
+ }
+
+ /**
+ * @param propertyPath
+ * @return
+ */
+ @Override
+ protected boolean isFeatureEditable(String propertyPath) {
+ boolean res = super.isFeatureEditable(propertyPath);
+ if (!res) {
+ // feature column label property
+ if (Constants.COLUMN_FEATURE_LABEL_CONFIGURATION_DISPLAY_ICON.equals(propertyPath)) {
+ res = true;
+ } else if (Constants.COLUMN_FEATURE_LABEL_CONFIGURATION_DISPLAY_LABEL.equals(propertyPath)) {
+ res = true;
+ } else if (Constants.COLUMN_FEATURE_LABEL_CONFIGURATION_DISPLAY_IS_DERIVED.equals(propertyPath)) {
+ res = true;
+ } else if (Constants.COLUMN__FEATURE_LABEL_CONFIGURATION_DISPLAY_NAME.equals(propertyPath)) {
+ res = true;
+ } else if (Constants.COLUMN_FEATURE_LABEL_CONFIGURATION_DISPLAY_TYPE.equals(propertyPath)) {
+ res = true;
+ } else if (Constants.COLUMN_FEATURE_LABEL_CONFIGURATION_DISPLAY_MULTIPLICITY.equals(propertyPath)) {
+ res = true;
+
+ // object column label property
+ } else if (Constants.COLUMN_OBJECT_LABEL_CONFIGURATION_DISPLAY_ICON.equals(propertyPath)) {
+ res = true;
+ } else if (Constants.COLUMN_OBJECT_LABEL_CONFIGURATION_DISPLAY_LABEL.equals(propertyPath)) {
+ res = true;
+ }
+
+
+
+ // feature row label property
+ else if (Constants.ROW_FEATURE_LABEL_CONFIGURATION_DISPLAY_ICON.equals(propertyPath)) {
+ res = true;
+ } else if (Constants.ROW_FEATURE_LABEL_CONFIGURATION_DISPLAY_LABEL.equals(propertyPath)) {
+ res = true;
+ } else if (Constants.ROW_FEATURE_LABEL_CONFIGURATION_DISPLAY_IS_DERIVED.equals(propertyPath)) {
+ res = true;
+ } else if (Constants.ROW__FEATURE_LABEL_CONFIGURATION_DISPLAY_NAME.equals(propertyPath)) {
+ res = true;
+ } else if (Constants.ROW_FEATURE_LABEL_CONFIGURATION_DISPLAY_TYPE.equals(propertyPath)) {
+ res = true;
+ } else if (Constants.ROW_FEATURE_LABEL_CONFIGURATION_DISPLAY_MULTIPLICITY.equals(propertyPath)) {
+ res = true;
+
+ // object row label property
+ } else if (Constants.ROW_OBJECT_LABEL_CONFIGURATION_DISPLAY_ICON.equals(propertyPath)) {
+ res = true;
+ } else if (Constants.ROW_OBJECT_LABEL_CONFIGURATION_DISPLAY_LABEL.equals(propertyPath)) {
+ res = true;
+ }
+
+ // paste row EObject
+ else if (Constants.ROW_PASTED_EOBJECT_CONTAINMENT_FEATURE.equals(propertyPath)) {
+ res = new RowContainmentFeatureContentProvider(getEditedTable()).getElements().length != 0;
+ } else if (Constants.ROW_PASTED_EOBJECT_ID.equals(propertyPath)) {
+ res = new RowElementTypeIdContentProvider(this.tableModelManager).getElements().length != 0;
+ } else if (Constants.ROW_PASTED_OBJECT_DETACHED_MODE_FEATURE.equals(propertyPath)) {
+ res = true;
+ } else if (Constants.ROW_PASTED_OBJECT_POST_ACTIONS_FEATURE.equals(propertyPath)) {
+ res = new RowPostActionIdsProvider(this.tableModelManager).getElements().length != 0;
+ } else if (Constants.ROW_PASTED_EOBJECT_AXIS_IDENTIFIER_FEATURE.equals(propertyPath)) {
+ res = new RowAxisIdentifierContentProvider(this.tableModelManager).getElements().length != 0;
+
+ // paste column EObject
+ } else if (Constants.COLUMN_PASTED_EOBJECT_CONTAINMENT_FEATURE.equals(propertyPath)) {
+ res = new ColumnContainmentFeatureContentProvider(getEditedTable()).getElements().length != 0;
+ } else if (Constants.COLUMN_PASTED_EOBJECT_ID.equals(propertyPath)) {
+ res = new ColumnElementTypeIdContentProvider(this.tableModelManager).getElements().length != 0;
+ } else if (Constants.COLUMN_PASTED_OBJECT_DETACHED_MODE_FEATURE.equals(propertyPath)) {
+ res = true;
+ } else if (Constants.COLUMN_PASTED_OBJECT_POST_ACTIONS_FEATURE.equals(propertyPath)) {
+ res = new ColumnPostActionIdsProvider(this.tableModelManager).getElements().length != 0;
+ } else if (Constants.COLUMN_PASTED_EOBJECT_AXIS_IDENTIFIER_FEATURE.equals(propertyPath)) {
+ res = new ColumnAxisIdentifierContentProvider(this.tableModelManager).getElements().length != 0;
+ }
+ }
+
+ return res;
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.views.properties.modelelement.EMFModelElement#getContentProvider(java.lang.String)
+ *
+ * @param propertyPath
+ * @return
+ */
+ @Override
+ public IStaticContentProvider getContentProvider(final String propertyPath) {
+ IStaticContentProvider provider = null;
+ if (Constants.TABLE_CONTEXT.equals(propertyPath)) {
+ Table table = getEditedTable();
+ provider = new ContextFeatureContentProvider(table, getRoot(table.getContext()));
+ } else if (Constants.ROW_PASTED_EOBJECT_CONTAINMENT_FEATURE.equals(propertyPath)) {
+ provider = new RowContainmentFeatureContentProvider(getEditedTable());
+ } else if (Constants.COLUMN_PASTED_EOBJECT_CONTAINMENT_FEATURE.equals(propertyPath)) {
+ provider = new ColumnContainmentFeatureContentProvider(getEditedTable());
+ } else if (Constants.ROW_PASTED_EOBJECT_ID.equals(propertyPath)) {
+ provider = new RowElementTypeIdContentProvider(this.tableModelManager);
+ } else if (Constants.COLUMN_PASTED_EOBJECT_ID.equals(propertyPath)) {
+ provider = new ColumnElementTypeIdContentProvider(this.tableModelManager);
+ } else if (Constants.ROW_PASTED_OBJECT_POST_ACTIONS_FEATURE.equals(propertyPath)) {
+ provider = new RowPostActionIdsProvider(this.tableModelManager);
+ } else if (Constants.COLUMN_PASTED_OBJECT_POST_ACTIONS_FEATURE.equals(propertyPath)) {
+ provider = new RowPostActionIdsProvider(this.tableModelManager);
+ } else if (Constants.ROW_PASTED_EOBJECT_AXIS_IDENTIFIER_FEATURE.equals(propertyPath)) {
+ provider = new RowAxisIdentifierContentProvider(tableModelManager);
+ } else if (Constants.COLUMN_PASTED_EOBJECT_AXIS_IDENTIFIER_FEATURE.equals(propertyPath)) {
+ provider = new ColumnAxisIdentifierContentProvider(tableModelManager);
+ }
+ if (provider != null) {
+ return provider;
+ }
+ return super.getContentProvider(propertyPath);
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.views.properties.modelelement.EMFModelElement#isUnique(java.lang.String)
+ *
+ * @param propertyPath
+ * @return
+ */
+ @Override
+ public boolean isUnique(final String propertyPath) {
+ if (Constants.ROW_PASTED_OBJECT_POST_ACTIONS_FEATURE.equals(propertyPath)) {
+ return true;
+ } else if (Constants.COLUMN_PASTED_OBJECT_POST_ACTIONS_FEATURE.equals(propertyPath)) {
+ return true;
+ }
+ return super.isUnique(propertyPath);
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.views.properties.modelelement.EMFModelElement#isOrdered(java.lang.String)
+ *
+ * @param propertyPath
+ * @return
+ */
+ @Override
+ public boolean isOrdered(final String propertyPath) {
+ if (Constants.ROW_PASTED_OBJECT_POST_ACTIONS_FEATURE.equals(propertyPath)) {
+ return true;
+ } else if (Constants.COLUMN_PASTED_OBJECT_POST_ACTIONS_FEATURE.equals(propertyPath)) {
+ return true;
+ }
+ return super.isOrdered(propertyPath);
+ }
+
+ @Override
+ public ILabelProvider getLabelProvider(String propertyPath) {
+ ILabelProvider provider = null;
+ if (propertyPath.endsWith("prototype")) { //$NON-NLS-1$
+ provider = new ILabelProvider() {
+ @Override
+ public void addListener(ILabelProviderListener listener) {
+ }
+
+ @Override
+ public void removeListener(ILabelProviderListener listener) {
+ }
+
+ @Override
+ public void dispose() {
+ }
+
+ @Override
+ public boolean isLabelProperty(Object element, String property) {
+ return false;
+ }
+
+ @Override
+ public Image getImage(Object element) {
+ if (element == null) {
+ return null;
+ }
+ ViewPrototype proto = ViewPrototype.get((PapyrusView) element);
+ return proto.getIcon();
+ }
+
+ @Override
+ public String getText(Object element) {
+ if (element == null) {
+ return null;
+ }
+ ViewPrototype proto = ViewPrototype.get((PapyrusView) element);
+ return proto.getQualifiedName();
+ }
+ };
+ }
+
+ if (Constants.COLUMN_PASTED_EOBJECT_AXIS_IDENTIFIER_FEATURE.equals(propertyPath) || Constants.ROW_PASTED_EOBJECT_AXIS_IDENTIFIER_FEATURE.equals(propertyPath)) {
+ provider = new AxisIdentifierLabelProvider(tableModelManager);
+ }
+
+ if(null == provider){
+ provider = super.getLabelProvider(propertyPath);
+ }
+ return provider;
+ }
+
+ /**
+ * Gets the root EObject from the given one
+ *
+ * @param obj
+ * An object
+ * @return The root object which is an ancestor of the given one
+ */
+ private EObject getRoot(EObject obj) {
+ EObject current = obj;
+ EObject parent = obj.eContainer();
+ while (parent != null) {
+ current = parent;
+ parent = parent.eContainer();
+ }
+ return current;
+ }
+}
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties/src/org/eclipse/papyrus/infra/nattable/properties/observable/ColumnPasteEObjectAxisIdentifierObservableValue.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties/src/org/eclipse/papyrus/infra/nattable/properties/observable/ColumnPasteEObjectAxisIdentifierObservableValue.java
new file mode 100644
index 00000000000..adfbca62660
--- /dev/null
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties/src/org/eclipse/papyrus/infra/nattable/properties/observable/ColumnPasteEObjectAxisIdentifierObservableValue.java
@@ -0,0 +1,58 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.nattable.properties.observable;
+
+import org.eclipse.emf.ecore.EcorePackage;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.papyrus.infra.nattable.model.nattable.Table;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.IAxis;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.NattableaxisconfigurationPackage;
+
+/**
+ * Observable value for Paste EObject axis identifier configuration
+ */
+public class ColumnPasteEObjectAxisIdentifierObservableValue extends AbstractColumnPasteEObjectConfigurationObservableValue {
+
+ /**
+ * Constructor.
+ *
+ * @param table The table.
+ */
+ public ColumnPasteEObjectAxisIdentifierObservableValue(final Table table) {
+ super(table, NattableaxisconfigurationPackage.eINSTANCE.getPasteEObjectConfiguration_AxisIdentifier());
+ }
+
+ /**
+ *
+ * @see org.eclipse.core.databinding.observable.value.IObservableValue#getValueType()
+ *
+ * @return
+ */
+ @Override
+ public Object getValueType() {
+ return EcorePackage.eINSTANCE.getEReference();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.infra.nattable.properties.observable.AbstractColumnPasteEObjectConfigurationObservableValue#doSetValue(java.lang.Object)
+ */
+ @Override
+ protected void doSetValue(final Object value) {
+ if(value instanceof IAxis){
+ super.doSetValue(EcoreUtil.copy((IAxis)value));
+ }
+ }
+
+}
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties/src/org/eclipse/papyrus/infra/nattable/properties/observable/RowPasteEObjectAxisIdentifierObservableValue.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties/src/org/eclipse/papyrus/infra/nattable/properties/observable/RowPasteEObjectAxisIdentifierObservableValue.java
new file mode 100644
index 00000000000..ec986820c9d
--- /dev/null
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties/src/org/eclipse/papyrus/infra/nattable/properties/observable/RowPasteEObjectAxisIdentifierObservableValue.java
@@ -0,0 +1,58 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.nattable.properties.observable;
+
+import org.eclipse.emf.ecore.EcorePackage;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.papyrus.infra.nattable.model.nattable.Table;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.IAxis;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.NattableaxisconfigurationPackage;
+
+/**
+ * Observable value for the axis identifier for the EObject Paste on Row.
+ */
+public class RowPasteEObjectAxisIdentifierObservableValue extends AbstractRowPasteEObjectConfigurationObservableValue {
+
+ /**
+ * Constructor.
+ *
+ * @param table The table.
+ */
+ public RowPasteEObjectAxisIdentifierObservableValue(final Table table) {
+ super(table, NattableaxisconfigurationPackage.eINSTANCE.getPasteEObjectConfiguration_AxisIdentifier());
+ }
+
+ /**
+ *
+ * @see org.eclipse.core.databinding.observable.value.IObservableValue#getValueType()
+ *
+ * @return
+ */
+ @Override
+ public Object getValueType() {
+ return EcorePackage.eINSTANCE.getEReference();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.infra.nattable.properties.observable.AbstractRowPasteEObjectConfigurationObservableValue#doSetValue(java.lang.Object)
+ */
+ @Override
+ protected void doSetValue(final Object value) {
+ if(value instanceof IAxis){
+ super.doSetValue(EcoreUtil.copy((IAxis)value));
+ }
+ }
+
+}
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties/src/org/eclipse/papyrus/infra/nattable/properties/provider/AbstractAxisIdentifierContentProvider.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties/src/org/eclipse/papyrus/infra/nattable/properties/provider/AbstractAxisIdentifierContentProvider.java
new file mode 100644
index 00000000000..1b1b5093b66
--- /dev/null
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties/src/org/eclipse/papyrus/infra/nattable/properties/provider/AbstractAxisIdentifierContentProvider.java
@@ -0,0 +1,90 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.nattable.properties.provider;
+
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
+import org.eclipse.papyrus.infra.widgets.providers.IStaticContentProvider;
+
+/**
+ * Abstract content provider for axis identifier for the paste
+ */
+public abstract class AbstractAxisIdentifierContentProvider implements IStaticContentProvider {
+
+ /**
+ * The table manager
+ */
+ private INattableModelManager tableManager;
+
+ /**
+ * Determinate if this is on column.
+ */
+ private final boolean onColumn;
+
+ /**
+ * Constructor.
+ *
+ * @param tableManager
+ * the table manager to get the column axis.
+ */
+ public AbstractAxisIdentifierContentProvider(final INattableModelManager tableManager, final boolean onColumn) {
+ this.tableManager = tableManager;
+ this.onColumn = onColumn;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
+ */
+ @Override
+ public Object[] getElements(final Object inputElement) {
+ if(onColumn){
+ // If this is a column paste configuration, the axis identifier must be a row axis
+ return tableManager.getRowAxisManager().getRepresentedContentProvider().getAxis().toArray();
+ }else{
+ // If this is a row paste configuration, the axis identifier must be a column axis
+ return tableManager.getColumnAxisManager().getRepresentedContentProvider().getAxis().toArray();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.jface.viewers.IContentProvider#dispose()
+ */
+ @Override
+ public final void dispose() {
+ this.tableManager = null;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
+ */
+ @Override
+ public final void inputChanged(final Viewer viewer, final Object oldInput, final Object newInput) {
+ // Do nothing
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.infra.widgets.providers.IStaticContentProvider#getElements()
+ */
+ @Override
+ public final Object[] getElements() {
+ return getElements(null);
+ }
+}
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties/src/org/eclipse/papyrus/infra/nattable/properties/provider/AxisIdentifierLabelProvider.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties/src/org/eclipse/papyrus/infra/nattable/properties/provider/AxisIdentifierLabelProvider.java
new file mode 100644
index 00000000000..49af460d1cc
--- /dev/null
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties/src/org/eclipse/papyrus/infra/nattable/properties/provider/AxisIdentifierLabelProvider.java
@@ -0,0 +1,143 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.nattable.properties.provider;
+
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.nebula.widgets.nattable.config.ConfigRegistry;
+import org.eclipse.nebula.widgets.nattable.grid.GridRegion;
+import org.eclipse.nebula.widgets.nattable.layer.LabelStack;
+import org.eclipse.nebula.widgets.nattable.style.DisplayMode;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
+import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForEObject;
+import org.eclipse.papyrus.infra.nattable.Activator;
+import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
+import org.eclipse.papyrus.infra.nattable.utils.Constants;
+import org.eclipse.papyrus.infra.nattable.utils.LabelProviderFullCellContextElementWrapper;
+import org.eclipse.papyrus.infra.nattable.utils.NattableConfigAttributes;
+import org.eclipse.papyrus.infra.services.labelprovider.service.LabelProviderService;
+import org.eclipse.swt.graphics.Image;
+
+/**
+ *
+ */
+public class AxisIdentifierLabelProvider extends LabelProvider {
+
+ /**
+ * Manage a wrapper for the test and image.
+ */
+ private static LabelProviderFullCellContextElementWrapper wrapper = null;
+
+ /**
+ * The table manager
+ */
+ protected final INattableModelManager tableManager;
+
+ /**
+ * Constructor.
+ *
+ * @param tableManager
+ * The table manager.
+ */
+ public AxisIdentifierLabelProvider(final INattableModelManager tableManager) {
+ this.tableManager = tableManager;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.jface.viewers.LabelProvider#getText(java.lang.Object)
+ */
+ @Override
+ public String getText(final Object element) {
+ String returnedValue = null;
+
+ ServicesRegistry serviceRegistry = null;
+ LabelProviderService serv = null;
+ try {
+ serviceRegistry = ServiceUtilsForEObject.getInstance().getServiceRegistry(this.tableManager.getTable().getContext());
+ serv = serviceRegistry.getService(LabelProviderService.class);
+ } catch (ServiceException e) {
+ Activator.log.error("Cannot get service registry", e); //$NON-NLS-1$
+ }
+
+ if (null != serv) {
+ final ConfigRegistry configRegistry = new ConfigRegistry();
+ configRegistry.registerConfigAttribute(NattableConfigAttributes.LABEL_PROVIDER_SERVICE_CONFIG_ATTRIBUTE, serv, DisplayMode.NORMAL, NattableConfigAttributes.LABEL_PROVIDER_SERVICE_ID);
+ configRegistry.registerConfigAttribute(NattableConfigAttributes.NATTABLE_MODEL_MANAGER_CONFIG_ATTRIBUTE, tableManager, DisplayMode.NORMAL, NattableConfigAttributes.NATTABLE_MODEL_MANAGER_ID);
+
+ wrapper = new LabelProviderFullCellContextElementWrapper();
+ wrapper.setDataValue(element);
+ wrapper.setConfigRegistry(configRegistry);
+ wrapper.setConfigLabels(new LabelStack(GridRegion.COLUMN_HEADER));
+
+ ILabelProvider labelProvider = serv.getLabelProvider(Constants.TABLE_LABEL_PROVIDER_CONTEXT, wrapper);
+ if (labelProvider != null) {
+ returnedValue = labelProvider.getText(wrapper);
+ } else {
+ labelProvider = serv.getLabelProvider(wrapper);
+ if (labelProvider != null) {
+ returnedValue = labelProvider.getText(wrapper);
+ }
+ }
+ wrapper = null;
+ }
+
+ return returnedValue;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.jface.viewers.LabelProvider#getImage(java.lang.Object)
+ */
+ @Override
+ public Image getImage(Object element) {
+ Image returnImage = null;
+
+ ServicesRegistry serviceRegistry = null;
+ LabelProviderService serv = null;
+ try {
+ serviceRegistry = ServiceUtilsForEObject.getInstance().getServiceRegistry(this.tableManager.getTable().getContext());
+ serv = serviceRegistry.getService(LabelProviderService.class);
+ } catch (ServiceException e) {
+ Activator.log.error("Cannot get service registry", e); //$NON-NLS-1$
+ }
+
+ if (null != serv) {
+ final ConfigRegistry configRegistry = new ConfigRegistry();
+ configRegistry.registerConfigAttribute(NattableConfigAttributes.LABEL_PROVIDER_SERVICE_CONFIG_ATTRIBUTE, serv, DisplayMode.NORMAL, NattableConfigAttributes.LABEL_PROVIDER_SERVICE_ID);
+ configRegistry.registerConfigAttribute(NattableConfigAttributes.NATTABLE_MODEL_MANAGER_CONFIG_ATTRIBUTE, tableManager, DisplayMode.NORMAL, NattableConfigAttributes.NATTABLE_MODEL_MANAGER_ID);
+
+ wrapper = new LabelProviderFullCellContextElementWrapper();
+ wrapper.setDataValue(element);
+ wrapper.setConfigRegistry(configRegistry);
+ wrapper.setConfigLabels(new LabelStack(GridRegion.COLUMN_HEADER));
+
+ ILabelProvider labelProvider = serv.getLabelProvider(Constants.TABLE_LABEL_PROVIDER_CONTEXT, wrapper);
+ if (labelProvider != null) {
+ returnImage = labelProvider.getImage(wrapper);
+ } else {
+ labelProvider = serv.getLabelProvider(wrapper);
+ if (labelProvider != null) {
+ returnImage = labelProvider.getImage(wrapper);
+ }
+ }
+ wrapper = null;
+ }
+ return returnImage;
+ }
+
+}
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties/src/org/eclipse/papyrus/infra/nattable/properties/provider/ColumnAxisIdentifierContentProvider.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties/src/org/eclipse/papyrus/infra/nattable/properties/provider/ColumnAxisIdentifierContentProvider.java
new file mode 100644
index 00000000000..535752e8be9
--- /dev/null
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties/src/org/eclipse/papyrus/infra/nattable/properties/provider/ColumnAxisIdentifierContentProvider.java
@@ -0,0 +1,32 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.nattable.properties.provider;
+
+import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
+
+/**
+ * The content provider for the column axis identifier.
+ */
+public class ColumnAxisIdentifierContentProvider extends AbstractAxisIdentifierContentProvider {
+
+ /**
+ * Constructor.
+ *
+ * @param tableManager
+ * the table manager to get the column axis.
+ */
+ public ColumnAxisIdentifierContentProvider(final INattableModelManager tableManager) {
+ super(tableManager, true);
+ }
+
+}
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties/src/org/eclipse/papyrus/infra/nattable/properties/provider/RowAxisIdentifierContentProvider.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties/src/org/eclipse/papyrus/infra/nattable/properties/provider/RowAxisIdentifierContentProvider.java
new file mode 100644
index 00000000000..036f8ad26d5
--- /dev/null
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties/src/org/eclipse/papyrus/infra/nattable/properties/provider/RowAxisIdentifierContentProvider.java
@@ -0,0 +1,32 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUe (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.nattable.properties.provider;
+
+import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
+
+/**
+ * The content provider for the row axis identifier.
+ */
+public class RowAxisIdentifierContentProvider extends AbstractAxisIdentifierContentProvider {
+
+ /**
+ * Constructor.
+ *
+ * @param tableManager
+ * the table manager to get the column axis.
+ */
+ public RowAxisIdentifierContentProvider(final INattableModelManager tableManager) {
+ super(tableManager, false);
+ }
+
+}
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties/src/org/eclipse/papyrus/infra/nattable/properties/utils/Constants.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties/src/org/eclipse/papyrus/infra/nattable/properties/utils/Constants.java
index a4552a66c31..b9d0e88bc01 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties/src/org/eclipse/papyrus/infra/nattable/properties/utils/Constants.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties/src/org/eclipse/papyrus/infra/nattable/properties/utils/Constants.java
@@ -1,105 +1,109 @@
-/*****************************************************************************
- * Copyright (c) 2013 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.infra.nattable.properties.utils;
-
-/**
- * This class defines the contants use for the table property view
- *
- * @author vl222926
- *
- */
-public class Constants {
-
- private Constants() {
- // to prevent instanciation
- }
-
-
- public static final String TABLE_CONTEXT = "context"; //$NON-NLS-1$
-
- public static final String LOCAL_COLUMN_HEADER_AXIS_CONFIGURATION_DISPLAY_LABEL = "localColumnHeaderAxisConfiguration.displayLabel"; //$NON-NLS-1$
-
- public static final String LOCAL_COLUMN_HEADER_AXIS_CONFIGURATION_DISPLAY_FILTER = "localColumnHeaderAxisConfiguration.displayFilter"; //$NON-NLS-1$
-
- public static final String LOCAL_COLUMN_HEADER_AXIS_CONFIGURATION_DISPLAY_INDEX = "localColumnHeaderAxisConfiguration.displayIndex"; //$NON-NLS-1$
-
- public static final String LOCAL_COLUMN_HEADER_AXIS_CONFIGURATION_INDEX_STYLE = "localColumnHeaderAxisConfiguration.indexStyle"; //$NON-NLS-1$
-
- public static final String LOCAL_ROW_HEADER_AXIS_CONFIGURATION_DISPLAY_LABEL = "localRowHeaderAxisConfiguration.displayLabel"; //$NON-NLS-1$
-
- public static final String LOCAL_ROW_HEADER_AXIS_CONFIGURATION_DISPLAY_INDEX = "localRowHeaderAxisConfiguration.displayIndex"; //$NON-NLS-1$
-
- public static final String LOCAL_ROW_HEADER_AXIS_CONFIGURATION_INDEX_STYLE = "localRowHeaderAxisConfiguration.indexStyle"; //$NON-NLS-1$
-
- public static final String COLUMN_FEATURE_LABEL_PROPERTY_PREFIX = "nattable:table:localColumnHeaderAxisConfiguration:ownedLabelConfigurations:featureLabelProviderConfiguration";
-
-
-
- public static final String COLUMN_FEATURE_LABEL_CONFIGURATION_DISPLAY_ICON = "columnFeatureLabelProviderConfigurationDisplayIcon"; //$NON-NLS-1$
-
- public static final String COLUMN_FEATURE_LABEL_CONFIGURATION_DISPLAY_LABEL = "columnFeatureLabelProviderConfigurationDisplayLabel"; //$NON-NLS-1$
-
- public static final String COLUMN_FEATURE_LABEL_CONFIGURATION_DISPLAY_IS_DERIVED = "columnFeatureLabelProviderConfigurationDisplayIsDerived"; //$NON-NLS-1$
-
- public static final String COLUMN_FEATURE_LABEL_CONFIGURATION_DISPLAY_TYPE = "columnFeatureLabelProviderConfigurationDisplayType"; //$NON-NLS-1$
-
- public static final String COLUMN_FEATURE_LABEL_CONFIGURATION_DISPLAY_MULTIPLICITY = "columnFeatureLabelProviderConfigurationDisplayMultiplicity"; //$NON-NLS-1$
-
- public static final String COLUMN__FEATURE_LABEL_CONFIGURATION_DISPLAY_NAME = "columnFeatureLabelProviderConfigurationDisplayName"; //$NON-NLS-1$
-
-
-
- public static final String COLUMN_OBJECT_LABEL_CONFIGURATION_DISPLAY_ICON = "columnObjectLabelProviderConfigurationDisplayIcon"; //$NON-NLS-1$
-
- public static final String COLUMN_OBJECT_LABEL_CONFIGURATION_DISPLAY_LABEL = "columnObjectLabelProviderConfigurationDisplayLabel"; //$NON-NLS-1$
-
-
-
- public static final String ROW_FEATURE_LABEL_CONFIGURATION_DISPLAY_ICON = "rowFeatureLabelProviderConfigurationDisplayIcon"; //$NON-NLS-1$
-
- public static final String ROW_FEATURE_LABEL_CONFIGURATION_DISPLAY_LABEL = "rowFeatureLabelProviderConfigurationDisplayLabel"; //$NON-NLS-1$
-
- public static final String ROW_FEATURE_LABEL_CONFIGURATION_DISPLAY_IS_DERIVED = "rowFeatureLabelProviderConfigurationDisplayIsDerived"; //$NON-NLS-1$
-
- public static final String ROW_FEATURE_LABEL_CONFIGURATION_DISPLAY_TYPE = "rowFeatureLabelProviderConfigurationDisplayType"; //$NON-NLS-1$
-
- public static final String ROW_FEATURE_LABEL_CONFIGURATION_DISPLAY_MULTIPLICITY = "rowFeatureLabelProviderConfigurationDisplayMultiplicity"; //$NON-NLS-1$
-
- public static final String ROW__FEATURE_LABEL_CONFIGURATION_DISPLAY_NAME = "rowFeatureLabelProviderConfigurationDisplayName"; //$NON-NLS-1$
-
-
-
- public static final String ROW_OBJECT_LABEL_CONFIGURATION_DISPLAY_ICON = "rowObjectLabelProviderConfigurationDisplayIcon"; //$NON-NLS-1$
-
- public static final String ROW_OBJECT_LABEL_CONFIGURATION_DISPLAY_LABEL = "rowObjectLabelProviderConfigurationDisplayLabel"; //$NON-NLS-1$
-
-
-
- public static final String ROW_PASTED_EOBJECT_ID = "localRowHeaderAxisConfiguration.pastedEObjectId";//$NON-NLS-1$
-
- public static final String ROW_PASTED_EOBJECT_CONTAINMENT_FEATURE = "localRowHeaderAxisConfiguration.pastedEObjectContainmentFeature";//$NON-NLS-1$
-
- public static final String ROW_PASTED_OBJECT_DETACHED_MODE_FEATURE = "localRowHeaderAxisConfiguration.detachedMode";//$NON-NLS-1$
-
- public static final String ROW_PASTED_OBJECT_POST_ACTIONS_FEATURE = "localRowHeaderAxisConfiguration.postActions";//$NON-NLS-1$
-
- public static final String COLUMN_PASTED_EOBJECT_ID = "localColumnHeaderAxisConfiguration.pastedEObjectId";//$NON-NLS-1$
-
- public static final String COLUMN_PASTED_EOBJECT_CONTAINMENT_FEATURE = "localColumnHeaderAxisConfiguration.pastedEObjectContainmentFeature";//$NON-NLS-1$
-
- public static final String COLUMN_PASTED_OBJECT_DETACHED_MODE_FEATURE = "localColumnHeaderAxisConfiguration.detachedMode";//$NON-NLS-1$
-
- public static final String COLUMN_PASTED_OBJECT_POST_ACTIONS_FEATURE = "localColumnHeaderAxisConfiguration.postActions";//$NON-NLS-1$
-
-}
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.nattable.properties.utils;
+
+/**
+ * This class defines the contants use for the table property view
+ *
+ * @author vl222926
+ *
+ */
+public class Constants {
+
+ private Constants() {
+ // to prevent instanciation
+ }
+
+
+ public static final String TABLE_CONTEXT = "context"; //$NON-NLS-1$
+
+ public static final String LOCAL_COLUMN_HEADER_AXIS_CONFIGURATION_DISPLAY_LABEL = "localColumnHeaderAxisConfiguration.displayLabel"; //$NON-NLS-1$
+
+ public static final String LOCAL_COLUMN_HEADER_AXIS_CONFIGURATION_DISPLAY_FILTER = "localColumnHeaderAxisConfiguration.displayFilter"; //$NON-NLS-1$
+
+ public static final String LOCAL_COLUMN_HEADER_AXIS_CONFIGURATION_DISPLAY_INDEX = "localColumnHeaderAxisConfiguration.displayIndex"; //$NON-NLS-1$
+
+ public static final String LOCAL_COLUMN_HEADER_AXIS_CONFIGURATION_INDEX_STYLE = "localColumnHeaderAxisConfiguration.indexStyle"; //$NON-NLS-1$
+
+ public static final String LOCAL_ROW_HEADER_AXIS_CONFIGURATION_DISPLAY_LABEL = "localRowHeaderAxisConfiguration.displayLabel"; //$NON-NLS-1$
+
+ public static final String LOCAL_ROW_HEADER_AXIS_CONFIGURATION_DISPLAY_INDEX = "localRowHeaderAxisConfiguration.displayIndex"; //$NON-NLS-1$
+
+ public static final String LOCAL_ROW_HEADER_AXIS_CONFIGURATION_INDEX_STYLE = "localRowHeaderAxisConfiguration.indexStyle"; //$NON-NLS-1$
+
+ public static final String COLUMN_FEATURE_LABEL_PROPERTY_PREFIX = "nattable:table:localColumnHeaderAxisConfiguration:ownedLabelConfigurations:featureLabelProviderConfiguration";
+
+
+
+ public static final String COLUMN_FEATURE_LABEL_CONFIGURATION_DISPLAY_ICON = "columnFeatureLabelProviderConfigurationDisplayIcon"; //$NON-NLS-1$
+
+ public static final String COLUMN_FEATURE_LABEL_CONFIGURATION_DISPLAY_LABEL = "columnFeatureLabelProviderConfigurationDisplayLabel"; //$NON-NLS-1$
+
+ public static final String COLUMN_FEATURE_LABEL_CONFIGURATION_DISPLAY_IS_DERIVED = "columnFeatureLabelProviderConfigurationDisplayIsDerived"; //$NON-NLS-1$
+
+ public static final String COLUMN_FEATURE_LABEL_CONFIGURATION_DISPLAY_TYPE = "columnFeatureLabelProviderConfigurationDisplayType"; //$NON-NLS-1$
+
+ public static final String COLUMN_FEATURE_LABEL_CONFIGURATION_DISPLAY_MULTIPLICITY = "columnFeatureLabelProviderConfigurationDisplayMultiplicity"; //$NON-NLS-1$
+
+ public static final String COLUMN__FEATURE_LABEL_CONFIGURATION_DISPLAY_NAME = "columnFeatureLabelProviderConfigurationDisplayName"; //$NON-NLS-1$
+
+
+
+ public static final String COLUMN_OBJECT_LABEL_CONFIGURATION_DISPLAY_ICON = "columnObjectLabelProviderConfigurationDisplayIcon"; //$NON-NLS-1$
+
+ public static final String COLUMN_OBJECT_LABEL_CONFIGURATION_DISPLAY_LABEL = "columnObjectLabelProviderConfigurationDisplayLabel"; //$NON-NLS-1$
+
+
+
+ public static final String ROW_FEATURE_LABEL_CONFIGURATION_DISPLAY_ICON = "rowFeatureLabelProviderConfigurationDisplayIcon"; //$NON-NLS-1$
+
+ public static final String ROW_FEATURE_LABEL_CONFIGURATION_DISPLAY_LABEL = "rowFeatureLabelProviderConfigurationDisplayLabel"; //$NON-NLS-1$
+
+ public static final String ROW_FEATURE_LABEL_CONFIGURATION_DISPLAY_IS_DERIVED = "rowFeatureLabelProviderConfigurationDisplayIsDerived"; //$NON-NLS-1$
+
+ public static final String ROW_FEATURE_LABEL_CONFIGURATION_DISPLAY_TYPE = "rowFeatureLabelProviderConfigurationDisplayType"; //$NON-NLS-1$
+
+ public static final String ROW_FEATURE_LABEL_CONFIGURATION_DISPLAY_MULTIPLICITY = "rowFeatureLabelProviderConfigurationDisplayMultiplicity"; //$NON-NLS-1$
+
+ public static final String ROW__FEATURE_LABEL_CONFIGURATION_DISPLAY_NAME = "rowFeatureLabelProviderConfigurationDisplayName"; //$NON-NLS-1$
+
+
+
+ public static final String ROW_OBJECT_LABEL_CONFIGURATION_DISPLAY_ICON = "rowObjectLabelProviderConfigurationDisplayIcon"; //$NON-NLS-1$
+
+ public static final String ROW_OBJECT_LABEL_CONFIGURATION_DISPLAY_LABEL = "rowObjectLabelProviderConfigurationDisplayLabel"; //$NON-NLS-1$
+
+
+
+ public static final String ROW_PASTED_EOBJECT_ID = "localRowHeaderAxisConfiguration.pastedEObjectId";//$NON-NLS-1$
+
+ public static final String ROW_PASTED_EOBJECT_CONTAINMENT_FEATURE = "localRowHeaderAxisConfiguration.pastedEObjectContainmentFeature";//$NON-NLS-1$
+
+ public static final String ROW_PASTED_OBJECT_DETACHED_MODE_FEATURE = "localRowHeaderAxisConfiguration.detachedMode";//$NON-NLS-1$
+
+ public static final String ROW_PASTED_OBJECT_POST_ACTIONS_FEATURE = "localRowHeaderAxisConfiguration.postActions";//$NON-NLS-1$
+
+ public static final String COLUMN_PASTED_EOBJECT_ID = "localColumnHeaderAxisConfiguration.pastedEObjectId";//$NON-NLS-1$
+
+ public static final String ROW_PASTED_EOBJECT_AXIS_IDENTIFIER_FEATURE = "localRowHeaderAxisConfiguration.axisIdentifier";//$NON-NLS-1$
+
+ public static final String COLUMN_PASTED_EOBJECT_CONTAINMENT_FEATURE = "localColumnHeaderAxisConfiguration.pastedEObjectContainmentFeature";//$NON-NLS-1$
+
+ public static final String COLUMN_PASTED_OBJECT_DETACHED_MODE_FEATURE = "localColumnHeaderAxisConfiguration.detachedMode";//$NON-NLS-1$
+
+ public static final String COLUMN_PASTED_OBJECT_POST_ACTIONS_FEATURE = "localColumnHeaderAxisConfiguration.postActions";//$NON-NLS-1$
+
+ public static final String COLUMN_PASTED_EOBJECT_AXIS_IDENTIFIER_FEATURE = "localColumnHeaderAxisConfiguration.axisIdentifier";//$NON-NLS-1$
+
+}
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/icons/insert.gif b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/icons/insert.gif
new file mode 100644
index 00000000000..08a98acab67
--- /dev/null
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/icons/insert.gif
Binary files differ
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/icons/insert_row.gif b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/icons/insert_row.gif
new file mode 100644
index 00000000000..9874bc55869
--- /dev/null
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/icons/insert_row.gif
Binary files differ
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/icons/paste_edit.png b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/icons/paste_edit.png
new file mode 100644
index 00000000000..dd078d45684
--- /dev/null
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/icons/paste_edit.png
Binary files differ
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/plugin.xml b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/plugin.xml
index 577ccbf5217..62c29fa9f0c 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/plugin.xml
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/plugin.xml
@@ -26,14 +26,6 @@
value="true">
</test>
</with>
- <with
- variable="selection">
- <test
- forcePluginActivation="true"
- property="org.eclipse.papyrus.infra.nattable.tester.canInvertAxis"
- value="true">
- </test>
- </with>
</and>
</visibleWhen>
</command>
@@ -577,6 +569,49 @@
</with>
</visibleWhen>
</command>
+ <separator
+ name="org.eclipse.papyrus.infra.nattable.separator1">
+ </separator>
+ <command
+ commandId="org.eclipse.ui.edit.paste"
+ style="push">
+ <visibleWhen>
+ <with
+ variable="selection">
+ <test
+ forcePluginActivation="true"
+ property="org.eclipse.papyrus.infra.nattable.tester.isNattableWidget"
+ value="true">
+ </test>
+ <test
+ args="cell"
+ forcePluginActivation="true"
+ property="org.eclipse.papyrus.infra.nattable.canPaste"
+ value="true">
+ </test>
+ </with>
+ </visibleWhen>
+ </command>
+ <command
+ commandId="org.eclipse.papyrus.infra.nattable.insert"
+ style="push">
+ <visibleWhen>
+ <with
+ variable="selection">
+ <test
+ forcePluginActivation="true"
+ property="org.eclipse.papyrus.infra.nattable.tester.isNattableWidget"
+ value="true">
+ </test>
+ <test
+ args="none"
+ forcePluginActivation="true"
+ property="org.eclipse.papyrus.infra.nattable.canInsert"
+ value="true">
+ </test>
+ </with>
+ </visibleWhen>
+ </command>
</menuContribution>
</extension>
<extension
@@ -773,6 +808,72 @@
</and>
</activeWhen>
</handler>
+ <handler
+ class="org.eclipse.papyrus.infra.nattable.handler.PasteInTableHandler"
+ commandId="org.eclipse.papyrus.infra.nattable.row.paste">
+ <activeWhen>
+ <and>
+ <with
+ variable="selection">
+ <test
+ forcePluginActivation="true"
+ property="org.eclipse.papyrus.infra.nattable.tester.isNattableWidget"
+ value="true">
+ </test>
+ <test
+ args="row"
+ forcePluginActivation="true"
+ property="org.eclipse.papyrus.infra.nattable.canPaste"
+ value="true">
+ </test>
+ </with>
+ </and>
+ </activeWhen>
+ </handler>
+ <handler
+ class="org.eclipse.papyrus.infra.nattable.handler.PasteInTableHandler"
+ commandId="org.eclipse.papyrus.infra.nattable.column.paste">
+ <activeWhen>
+ <and>
+ <with
+ variable="selection">
+ <test
+ forcePluginActivation="true"
+ property="org.eclipse.papyrus.infra.nattable.tester.isNattableWidget"
+ value="true">
+ </test>
+ <test
+ args="column"
+ forcePluginActivation="true"
+ property="org.eclipse.papyrus.infra.nattable.canPaste"
+ value="true">
+ </test>
+ </with>
+ </and>
+ </activeWhen>
+ </handler>
+ <handler
+ class="org.eclipse.papyrus.infra.nattable.handler.InsertInTableHandler"
+ commandId="org.eclipse.papyrus.infra.nattable.row.insert">
+ <activeWhen>
+ <and>
+ <with
+ variable="selection">
+ <test
+ forcePluginActivation="true"
+ property="org.eclipse.papyrus.infra.nattable.tester.isNattableWidget"
+ value="true">
+ </test>
+ <test
+ args="row"
+ forcePluginActivation="true"
+ property="org.eclipse.papyrus.infra.nattable.canInsert"
+ value="true">
+ </test>
+ </with>
+ </and>
+ </activeWhen>
+ </handler>
</extension>
<extension
point="org.eclipse.core.expressions.propertyTesters">
@@ -1367,6 +1468,13 @@
id="org.eclipse.papyrus.infra.nattable.import.command"
name="Import from file">
</command>
+ <command
+ categoryId="org.eclipse.papyrus.infra.nattable.rows.command.category"
+ defaultHandler="org.eclipse.papyrus.infra.nattable.handler.ImportTableHandler"
+ description="Import a file into a table"
+ id="org.eclipse.papyrus.infra.nattable.row.import.command"
+ name="Import from file">
+ </command>
</extension>
<extension
point="org.eclipse.ui.commandImages">
@@ -1374,6 +1482,10 @@
commandId="org.eclipse.papyrus.infra.nattable.import.command"
icon="icons/import_wiz_16x16-papyrusColor.gif">
</image>
+ <image
+ commandId="org.eclipse.papyrus.infra.nattable.row.import.command"
+ icon="icons/import_wiz_16x16-papyrusColor.gif">
+ </image>
</extension>
<extension
point="org.eclipse.ui.importWizards">
@@ -1531,4 +1643,67 @@
order="100000">
</configuration>
</extension>
+ <extension
+ point="org.eclipse.ui.commands">
+ <command
+ categoryId="org.eclipse.papyrus.infra.nattable.rows.command.category"
+ defaultHandler="org.eclipse.papyrus.infra.nattable.handler.PasteInTableHandler"
+ id="org.eclipse.papyrus.infra.nattable.row.paste"
+ name="Paste">
+ </command>
+ <command
+ categoryId="org.eclipse.papyrus.infra.nattable.columns.command.category"
+ defaultHandler="org.eclipse.papyrus.infra.nattable.handler.PasteInTableHandler"
+ id="org.eclipse.papyrus.infra.nattable.column.paste"
+ name="Paste">
+ </command>
+ <command
+ categoryId="org.eclipse.papyrus.infra.nattable.rows.command.category"
+ defaultHandler="org.eclipse.papyrus.infra.nattable.handler.InsertInTableHandler"
+ id="org.eclipse.papyrus.infra.nattable.row.insert"
+ name="Insert">
+ </command>
+ <command
+ categoryId="org.eclipse.papyrus.infra.nattable.category"
+ defaultHandler="org.eclipse.papyrus.infra.nattable.handler.InsertInTableHandler"
+ id="org.eclipse.papyrus.infra.nattable.insert"
+ name="Insert">
+ </command>
+ </extension>
+ <extension
+ point="org.eclipse.ui.commandImages">
+ <image
+ commandId="org.eclipse.papyrus.infra.nattable.column.paste"
+ icon="icons/paste_edit.png">
+ </image>
+ <image
+ commandId="org.eclipse.papyrus.infra.nattable.row.paste"
+ icon="icons/paste_edit.png">
+ </image>
+ <image
+ commandId="org.eclipse.papyrus.infra.nattable.row.insert"
+ icon="icons/insert_row.gif">
+ </image>
+ <image
+ commandId="org.eclipse.papyrus.infra.nattable.insert"
+ icon="icons/insert.gif">
+ </image>
+ </extension>
+ <extension
+ point="org.eclipse.core.expressions.propertyTesters">
+ <propertyTester
+ class="org.eclipse.papyrus.infra.nattable.utils.PastePropertyTester"
+ id="org.eclipse.papyrus.infra.nattable.pastePropertyTester"
+ namespace="org.eclipse.papyrus.infra.nattable"
+ properties="canPaste"
+ type="java.lang.Object">
+ </propertyTester>
+ <propertyTester
+ class="org.eclipse.papyrus.infra.nattable.utils.PastePropertyTester"
+ id="org.eclipse.papyrus.infra.nattable.pastePropertyTester"
+ namespace="org.eclipse.papyrus.infra.nattable"
+ properties="canInsert"
+ type="java.lang.Object">
+ </propertyTester>
+ </extension>
</plugin>
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/command/ErrorTransactionalCommand.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/command/ErrorTransactionalCommand.java
new file mode 100644
index 00000000000..c2054030cc2
--- /dev/null
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/command/ErrorTransactionalCommand.java
@@ -0,0 +1,98 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.nattable.command;
+
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
+
+/**
+ * This allows to manage the error transactional command.
+ */
+public class ErrorTransactionalCommand extends AbstractTransactionalCommand {
+
+ /**
+ * The error status.
+ */
+ protected IStatus errorStatus = null;
+
+ /**
+ * Constructor.
+ *
+ * @param domain
+ * my editing domain
+ * @param label
+ * my user-readable label, should never be <code>null</code>.
+ * @param affectedFiles
+ * the list of affected {@link IFile}s; may be <code>null</code>
+ * @param errorStatus
+ * The error status
+ */
+ public ErrorTransactionalCommand(final TransactionalEditingDomain domain,
+ final String label, final List affectedFiles, final IStatus errorStatus) {
+ this(domain, label, null, affectedFiles, errorStatus);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param domain
+ * my editing domain
+ * @param label
+ * my user-readable label, should never be <code>null</code>.
+ * @param options
+ * for the transaction in which I execute myself, or
+ * <code>null</code> for the default options
+ * @param affectedFiles
+ * the list of affected {@link IFile}s; may be <code>null</code>
+ * @param errorStatus
+ * The error status
+ */
+ public ErrorTransactionalCommand(final TransactionalEditingDomain domain,
+ final String label, final Map options, final List affectedFiles, final IStatus errorStatus) {
+ super(domain, label, options, affectedFiles);
+ this.errorStatus = errorStatus;
+ }
+
+ /**
+ * @see org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand#doExecuteWithResult(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
+ *
+ * @param monitor
+ * @param info
+ * @return
+ * @throws ExecutionException
+ */
+ @Override
+ protected CommandResult doExecuteWithResult(final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
+ return new CommandResult(errorStatus);
+ }
+
+ /**
+ * Get the error status.
+ *
+ * @return The error status;
+ */
+ public IStatus getStatus() {
+ return errorStatus;
+ }
+
+}
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/configuration/ClearSelectionUIBindingConfiguration.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/configuration/ClearSelectionUIBindingConfiguration.java
new file mode 100644
index 00000000000..c6cd455d8b9
--- /dev/null
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/configuration/ClearSelectionUIBindingConfiguration.java
@@ -0,0 +1,47 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.nattable.configuration;
+
+import org.eclipse.nebula.widgets.nattable.NatTable;
+import org.eclipse.nebula.widgets.nattable.config.AbstractUiBindingConfiguration;
+import org.eclipse.nebula.widgets.nattable.selection.command.ClearAllSelectionsCommand;
+import org.eclipse.nebula.widgets.nattable.ui.action.IKeyAction;
+import org.eclipse.nebula.widgets.nattable.ui.binding.UiBindingRegistry;
+import org.eclipse.nebula.widgets.nattable.ui.matcher.KeyEventMatcher;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.KeyEvent;
+
+/**
+ * @author VL222926
+ *
+ */
+public class ClearSelectionUIBindingConfiguration extends AbstractUiBindingConfiguration {
+
+ /**
+ * @see org.eclipse.nebula.widgets.nattable.config.IConfiguration#configureUiBindings(org.eclipse.nebula.widgets.nattable.ui.binding.UiBindingRegistry)
+ *
+ * @param uiBindingRegistry
+ */
+ @Override
+ public void configureUiBindings(UiBindingRegistry uiBindingRegistry) {
+ uiBindingRegistry.registerKeyBinding(new KeyEventMatcher(SWT.NONE, SWT.ESC), new IKeyAction() {
+
+ @Override
+ public void run(NatTable natTable, KeyEvent event) {
+ natTable.doCommand(new ClearAllSelectionsCommand());
+ }
+ });
+ }
+
+}
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/dialog/PasteImportStatusDialog.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/dialog/PasteImportStatusDialog.java
index 9c9186aee3c..54abdab0841 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/dialog/PasteImportStatusDialog.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/dialog/PasteImportStatusDialog.java
@@ -1,121 +1,143 @@
-/*****************************************************************************
- * Copyright (c) 2014 CEA LIST.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.infra.nattable.dialog;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.papyrus.infra.nattable.messages.Messages;
-import org.eclipse.papyrus.infra.widgets.util.ImageConstants;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.CLabel;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- *
- * @author VL222926
- * This dialog is used to display paste error status
- */
-public class PasteImportStatusDialog extends MessageDialog {
-
- /**
- * Message displayed in the paste dialog
- */
- public static final String HOW_TO_PASTE_MESSAGE = Messages.PasteImportStatusDialog_PasteConfigurationMessage;
-
- /**
- * Title for all dialog used by this class
- */
- public static final String DIALOG_TITLE = Messages.PasteImportStatusDialog_ImportPasteDialogTitle;
-
- public PasteImportStatusDialog(final Shell parentShell, final IStatus status) {
- super(parentShell, DIALOG_TITLE, getPapyrusIcon(), status.getMessage(), getDialogImageType(status), new String[] { IDialogConstants.OK_LABEL }, 0);
- }
-
- protected static int getDialogImageType(final IStatus status) {
- switch (status.getSeverity()) {
- case IStatus.ERROR:
- return MessageDialog.ERROR;
- case IStatus.INFO:
- return MessageDialog.INFORMATION;
- case IStatus.WARNING:
- return MessageDialog.WARNING;
- case IStatus.CANCEL:
- break;
- case IStatus.OK:
- break;
- default:
- break;
- }
- return 0;
- }
-
- /**
- *
- * Constructor.
- *
- * @param parentShell
- * the shell parent to use
- * @param dialogMessage
- * the message to display
- */
- public PasteImportStatusDialog(final Shell parentShell, final String dialogMessage) {
- super(parentShell, DIALOG_TITLE, getPapyrusIcon(), dialogMessage, MessageDialog.ERROR, new String[] { IDialogConstants.OK_LABEL }, 0);
- }
-
- /**
- *
- * Constructor.
- *
- * @param parentShell
- * the shell parent to use
- * @param dialogMessage
- * the message to display
- * @param dialogImageType
- */
- public PasteImportStatusDialog(final Shell parentShell, final String dialogMessage, final int dialogImageType) {
- super(parentShell, DIALOG_TITLE, getPapyrusIcon(), dialogMessage, dialogImageType, new String[] { IDialogConstants.OK_LABEL }, 0);
- }
-
- /**
- *
- * @see org.eclipse.jface.dialogs.MessageDialog#createDialogArea(org.eclipse.swt.widgets.Composite)
- *
- * @param parent
- * @return
- */
- @Override
- protected Control createDialogArea(Composite parent) {
- final Composite comp = (Composite) super.createDialogArea(parent);
- final CLabel label = new CLabel(comp, SWT.NONE);
- label.setText(HOW_TO_PASTE_MESSAGE);
- label.setImage(getInfoImage());
- return comp;
- }
-
-
- /**
- *
- * @return
- * the papyrus icon
- */
- private static final Image getPapyrusIcon() {
- return org.eclipse.papyrus.infra.widgets.Activator.getDefault().getImage(ImageConstants.PAPYRUS_ICON_PATH);
- }
-
-}
+/*****************************************************************************
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 476618
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.nattable.dialog;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.papyrus.infra.nattable.messages.Messages;
+import org.eclipse.papyrus.infra.nattable.utils.IPapyrusNattableStatus;
+import org.eclipse.papyrus.infra.widgets.util.ImageConstants;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.CLabel;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Shell;
+
+
+/**
+ * This dialog is used to display paste error status when the error is a paste configuration.
+ */
+public class PasteImportStatusDialog extends MessageDialog {
+
+ /**
+ * Message displayed in the paste dialog
+ */
+ public static final String HOW_TO_PASTE_MESSAGE = Messages.PasteImportStatusDialog_PasteConfigurationMessage;
+
+ /**
+ * Title for all dialog used by this class
+ */
+ public static final String DIALOG_TITLE = Messages.PasteImportStatusDialog_ImportPasteDialogTitle;
+
+
+ /**
+ * Constructor.
+ *
+ * @param parentShell
+ * the shell parent to use
+ * @param status
+ * the status of the process
+ */
+ public PasteImportStatusDialog(final Shell parentShell, final IStatus status) {
+ super(parentShell, DIALOG_TITLE, getPapyrusIcon(), status.getMessage(), getDialogImageType(status), new String[] { IDialogConstants.OK_LABEL }, 0);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param parentShell
+ * the shell parent to use
+ * @param dialogMessage
+ * the message to display
+ */
+ public PasteImportStatusDialog(final Shell parentShell, final String dialogMessage) {
+ super(parentShell, DIALOG_TITLE, getPapyrusIcon(), dialogMessage, MessageDialog.ERROR, new String[] { IDialogConstants.OK_LABEL }, 0);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param parentShell
+ * the shell parent to use
+ * @param dialogMessage
+ * the message to display
+ * @param dialogImageType
+ * the dialog image type
+ */
+ public PasteImportStatusDialog(final Shell parentShell, final String dialogMessage, final int dialogImageType) {
+ super(parentShell, DIALOG_TITLE, getPapyrusIcon(), dialogMessage, dialogImageType, new String[] { IDialogConstants.OK_LABEL }, 0);
+ }
+
+
+ /**
+ * Get the dialog image.
+ *
+ * @param status
+ * the status.
+ * @return the dialog image.
+ */
+ protected static int getDialogImageType(final IStatus status) {
+ int dialogImage = 0;
+ switch (status.getSeverity()) {
+ case IPapyrusNattableStatus.PASTE_CONFIGURATiON_ERROR:
+ case IStatus.ERROR:
+ dialogImage = MessageDialog.ERROR;
+ break;
+ case IPapyrusNattableStatus.PASTE_CONFIGURATiON_INFO:
+ case IStatus.INFO:
+ dialogImage = MessageDialog.INFORMATION;
+ break;
+ case IPapyrusNattableStatus.PASTE_CONFIGURATiON_WARNING:
+ case IStatus.WARNING:
+ dialogImage = MessageDialog.WARNING;
+ break;
+ case IStatus.CANCEL:
+ break;
+ case IStatus.OK:
+ break;
+ default:
+ break;
+ }
+ return dialogImage;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.jface.dialogs.MessageDialog#createDialogArea(org.eclipse.swt.widgets.Composite)
+ */
+ @Override
+ protected Control createDialogArea(final Composite parent) {
+ final Composite comp = (Composite) super.createDialogArea(parent);
+ final CLabel label = new CLabel(comp, SWT.NONE);
+ label.setText(HOW_TO_PASTE_MESSAGE);
+ label.setImage(getInfoImage());
+ return comp;
+ }
+
+ /**
+ * Get the papyrus icon.
+ *
+ * @return
+ * the papyrus icon
+ */
+ private static final Image getPapyrusIcon() {
+ return org.eclipse.papyrus.infra.widgets.Activator.getDefault().getImage(ImageConstants.PAPYRUS_ICON_PATH);
+ }
+
+}
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/ImportTableHandler.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/ImportTableHandler.java
index 1a5f24dde1c..434bea41019 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/ImportTableHandler.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/ImportTableHandler.java
@@ -1,47 +1,81 @@
-/*****************************************************************************
- * Copyright (c) 2014 CEA LIST.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.infra.nattable.handler;
-
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.papyrus.infra.nattable.wizard.ImportTableWizard;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.PlatformUI;
-
-/**
- *
- * This handler allows to import a table using the ImportWizard
- *
- */
-public class ImportTableHandler extends AbstractTableHandler {
-
- /**
- *
- * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
- *
- * @param event
- * @return
- * @throws ExecutionException
- */
- @Override
- public Object execute(final ExecutionEvent event) throws ExecutionException {
- final ImportTableWizard wizard = new ImportTableWizard();
- wizard.init(PlatformUI.getWorkbench(), new StructuredSelection(getCurrentNattableModelManager()));
- final WizardDialog dialog = new WizardDialog(Display.getDefault().getActiveShell(), wizard);
- dialog.open();
- return null;
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - bug 476618
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.nattable.handler;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.papyrus.infra.nattable.utils.UserActionConstants;
+import org.eclipse.papyrus.infra.nattable.wizard.ImportTableWizard;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * This handler allows to import a table using the ImportWizard
+ */
+public class ImportTableHandler extends AbstractTableHandler {
+
+ /**
+ * The variable name to determinate if the final dialog must be opened for the import.
+ */
+ public static final String OPEN_DIALOG_BOOLEAN_PARAMETER = "openDialog"; //$NON-NLS-1$
+
+ /**
+ * The variable name to determinate the selected file path.
+ */
+ public static final String SELECTED_FILE_PATH_STRING_PARAMETER = "selectedFilePath"; //$NON-NLS-1$
+
+ /**
+ * The variable name to determinate the preferred user action to use for the row insert action when he is not determinate.
+ */
+ public static final String USER_ACTION__PREFERRED_USER_ACTION = "preferredUserAction"; //$NON-NLS-1$
+
+ /**
+ * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+ *
+ * @param event
+ * @return
+ * @throws ExecutionException
+ */
+ @Override
+ public Object execute(final ExecutionEvent event) throws ExecutionException {
+ // Calculate if the dialog must be opened during the process
+ Object res = event.getParameters().get(OPEN_DIALOG_BOOLEAN_PARAMETER);
+ final boolean openDialog = ((res == null) || Boolean.TRUE.equals(res));
+
+ ImportTableWizard wizard = null;
+ if(openDialog){
+ wizard = new ImportTableWizard();
+ }else{
+ // Calculate if the dialog must be opened during the process
+ res = event.getParameters().get(SELECTED_FILE_PATH_STRING_PARAMETER);
+ final String importedText = null == res ? "" : res.toString();
+
+ final Object userAction = event.getParameters().get(USER_ACTION__PREFERRED_USER_ACTION);
+ final int preferredUserAction = null == userAction ? UserActionConstants.UNDEFINED_USER_ACTION : Integer.parseInt(userAction.toString());
+
+ wizard = new ImportTableWizard(importedText, false, openDialog, preferredUserAction);
+ }
+ wizard.init(PlatformUI.getWorkbench(), new StructuredSelection(getCurrentNattableModelManager()));
+ if(openDialog){
+ final WizardDialog dialog = new WizardDialog(Display.getDefault().getActiveShell(), wizard);
+ dialog.open();
+ }else{
+ wizard.addPages();
+ wizard.performFinish();
+ }
+ return null;
+ }
+}
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/InsertInTableHandler.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/InsertInTableHandler.java
new file mode 100644
index 00000000000..9b0bbba510d
--- /dev/null
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/InsertInTableHandler.java
@@ -0,0 +1,113 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.nattable.handler;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.papyrus.infra.nattable.manager.InsertInNattableManager;
+import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
+import org.eclipse.papyrus.infra.nattable.manager.table.NattableModelManager;
+import org.eclipse.papyrus.infra.nattable.provider.TableStructuredSelection;
+import org.eclipse.papyrus.infra.nattable.utils.AbstractPasteInsertInTableHandler;
+import org.eclipse.papyrus.infra.nattable.utils.CSVPasteHelper;
+import org.eclipse.papyrus.infra.nattable.utils.TableClipboardUtils;
+import org.eclipse.papyrus.infra.nattable.utils.TableSelectionWrapper;
+import org.eclipse.papyrus.infra.nattable.utils.UserActionConstants;
+import org.eclipse.ui.handlers.HandlerUtil;
+
+/**
+ * Insert Handler.
+ */
+public class InsertInTableHandler extends AbstractPasteInsertInTableHandler {
+
+ /**
+ * This field is used to determine if we want open a dialog to prevent the user that the command creation and the command execution can take a
+ * long time
+ */
+ protected final boolean useProgressMonitorDialog = true;
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+ */
+ @Override
+ public Object execute(final ExecutionEvent event) throws ExecutionException {
+ final CSVPasteHelper pasteHelper = new CSVPasteHelper();
+
+ boolean openProgressMonitor = useProgressMonitorDialog;
+ final Object value = event.getParameters().get(OPEN__PROGRESS_MONITOR_DIALOG);
+ if (value instanceof Boolean) {
+ openProgressMonitor = ((Boolean) value).booleanValue();
+ }
+ final INattableModelManager currentNattableModelManager = getCurrentNattableModelManager();
+ // Try to get the selection in the nattable editor
+ final ISelection currentSelection = HandlerUtil.getCurrentSelection(event);
+ TableSelectionWrapper tableSelectionWrapper = null;
+ if (currentSelection instanceof TableStructuredSelection) {
+ tableSelectionWrapper = (TableSelectionWrapper) ((TableStructuredSelection) currentSelection).getAdapter(TableSelectionWrapper.class);
+ if (tableSelectionWrapper.getSelectedCells().isEmpty()) {
+ tableSelectionWrapper = null;
+ }
+ }
+
+ // Calculate if the dialog must be opened during the process
+ final Object res = event.getParameters().get(OPEN_DIALOG_ON_FAIL_BOOLEAN_PARAMETER);
+ final boolean openDialog = ((null == res) || Boolean.TRUE.equals(res));
+
+ final Object userAction = event.getParameters().get(USER_ACTION__PREFERRED_USER_ACTION);
+ final int preferredUserAction = null == userAction ? UserActionConstants.UNDEFINED_USER_ACTION : Integer.parseInt(userAction.toString());
+
+ final InsertInNattableManager pasteManager = new InsertInNattableManager(currentNattableModelManager, pasteHelper, openProgressMonitor, openDialog, preferredUserAction, tableSelectionWrapper, TableClipboardUtils.getClipboardContentsAsString());
+ final IStatus result = pasteManager.doAction();
+
+ // Manage different types of dialog error depending of type error
+ if (openDialog) {
+ displayDialog(result);
+ }
+ return result;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.nattable.handler.AbstractTableHandler#setEnabled(java.lang.Object)
+ *
+ * @param evaluationContext
+ */
+ @Override
+ public void setEnabled(final Object evaluationContext) {
+ super.setEnabled(evaluationContext);
+ if(isEnabled()){
+ // Recalculate if the enable is allowed because the user can select cells and try to insert by click on rows for example.
+ boolean canEnable = false;
+ final INattableModelManager currentNattableModelManager = getCurrentNattableModelManager();
+ if(null != currentNattableModelManager){
+ final ISelection currentSelection = ((NattableModelManager)currentNattableModelManager).getSelectionInTable();
+ if(null == currentSelection){
+ canEnable = true;
+ }else if (currentSelection instanceof TableStructuredSelection) {
+ TableSelectionWrapper tableSelectionWrapper = (TableSelectionWrapper) ((TableStructuredSelection) currentSelection).getAdapter(TableSelectionWrapper.class);
+ if(null != tableSelectionWrapper){
+ if(tableSelectionWrapper.getSelectedCells().isEmpty()
+ || !tableSelectionWrapper.getFullySelectedRows().isEmpty() && tableSelectionWrapper.getFullySelectedColumns().isEmpty()){
+ canEnable = true;
+ }
+ }
+ }
+ }
+ setBaseEnabled(canEnable);
+ }
+ }
+}
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/PasteInTableHandler.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/PasteInTableHandler.java
index fc2e9a6eb80..15882e88b29 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/PasteInTableHandler.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/PasteInTableHandler.java
@@ -1,88 +1,95 @@
-/*****************************************************************************
- * Copyright (c) 2013 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.infra.nattable.handler;
-
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.papyrus.infra.nattable.dialog.PasteImportStatusDialog;
-import org.eclipse.papyrus.infra.nattable.manager.PasteAxisInNattableManager;
-import org.eclipse.papyrus.infra.nattable.utils.CSVPasteHelper;
-import org.eclipse.papyrus.infra.nattable.utils.TableClipboardUtils;
-import org.eclipse.swt.widgets.Display;
-
-/**
- * Paste Handler
- *
- * @author VL222926
- *
- */
-public class PasteInTableHandler extends AbstractTableHandler {
-
- public static final String OPEN_DIALOG_ON_FAIL_BOOLEAN_PARAMETER = "openDialogOnFail"; //$NON-NLS-1$
-
- public static final String OPEN__PROGRESS_MONITOR_DIALOG = "openProgressMonitorDialog"; //$NON-NLS-1$
- /**
- * this field is used to determine if we want open a dialog to prevent the user that the command creation and the command execution can take a
- * long time
- */
- private boolean useProgressMonitorDialog = true;
-
-
- /**
- *
- * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
- *
- * @param event
- * @return
- * @throws ExecutionException
- */
- @Override
- public Object execute(ExecutionEvent event) throws ExecutionException {
- CSVPasteHelper pasteHelper = new CSVPasteHelper();
-
- boolean openProgressMonitor = useProgressMonitorDialog;
- Object value = event.getParameters().get(OPEN__PROGRESS_MONITOR_DIALOG);
- if (value instanceof Boolean) {
- openProgressMonitor = ((Boolean) value).booleanValue();
- }
- PasteAxisInNattableManager pasteManager = new PasteAxisInNattableManager(getCurrentNattableModelManager(), pasteHelper, openProgressMonitor, TableClipboardUtils.getClipboardContentsAsString());
- IStatus result = pasteManager.doPaste();
- displayDialog(event, result);
- // used in JUnit test for paste
- return result;
- }
-
- private void displayDialog(ExecutionEvent event, IStatus result) {
- if (!result.isOK()) {
- Object res = event.getParameters().get(OPEN_DIALOG_ON_FAIL_BOOLEAN_PARAMETER);
- if (res == null || Boolean.TRUE.equals(res)) {
- new PasteImportStatusDialog(Display.getDefault().getActiveShell(), result).open();
- }
- }
- }
-
- /**
- * @Override
- * @see org.eclipse.papyrus.infra.nattable.handler.AbstractTableHandler#setEnabled(java.lang.Object)
- *
- * @param evaluationContext
- */
- @Override
- public void setEnabled(Object evaluationContext) {
- setBaseEnabled(getCurrentNattableModelManager() != null);
- }
-
-
-}
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 476618
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.nattable.handler;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.papyrus.infra.nattable.manager.PasteAxisInNattableManager;
+import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
+import org.eclipse.papyrus.infra.nattable.provider.TableStructuredSelection;
+import org.eclipse.papyrus.infra.nattable.utils.AbstractPasteInsertInTableHandler;
+import org.eclipse.papyrus.infra.nattable.utils.CSVPasteHelper;
+import org.eclipse.papyrus.infra.nattable.utils.TableClipboardUtils;
+import org.eclipse.papyrus.infra.nattable.utils.TableSelectionWrapper;
+import org.eclipse.papyrus.infra.nattable.utils.UserActionConstants;
+import org.eclipse.ui.handlers.HandlerUtil;
+
+/**
+ * Paste Handler.
+ */
+public class PasteInTableHandler extends AbstractPasteInsertInTableHandler {
+
+ /**
+ * This field is used to determine if we want open a dialog to prevent the user that the command creation and the command execution can take a
+ * long time
+ */
+ protected final boolean useProgressMonitorDialog = true;
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+ */
+ @Override
+ public Object execute(final ExecutionEvent event) throws ExecutionException {
+ final CSVPasteHelper pasteHelper = new CSVPasteHelper();
+
+ boolean openProgressMonitor = useProgressMonitorDialog;
+ final Object value = event.getParameters().get(OPEN__PROGRESS_MONITOR_DIALOG);
+ if (value instanceof Boolean) {
+ openProgressMonitor = ((Boolean) value).booleanValue();
+ }
+ final INattableModelManager currentNattableModelManager = getCurrentNattableModelManager();
+ // Try to get the selection in the nattable editor
+ final ISelection currentSelection = HandlerUtil.getCurrentSelection(event);
+ TableSelectionWrapper tableSelectionWrapper = null;
+ if (currentSelection instanceof TableStructuredSelection) {
+ tableSelectionWrapper = (TableSelectionWrapper) ((TableStructuredSelection) currentSelection).getAdapter(TableSelectionWrapper.class);
+ if (tableSelectionWrapper.getSelectedCells().isEmpty()) {
+ tableSelectionWrapper = null;
+ }
+ }
+
+ // Calculate if the dialog must be opened during the process
+ final Object res = event.getParameters().get(OPEN_DIALOG_ON_FAIL_BOOLEAN_PARAMETER);
+ final boolean openDialog = ((res == null) || Boolean.TRUE.equals(res));
+
+ final Object userAction = event.getParameters().get(USER_ACTION__PREFERRED_USER_ACTION);
+ final int preferredUserAction = null == userAction ? UserActionConstants.UNDEFINED_USER_ACTION : Integer.parseInt(userAction.toString());
+
+ final PasteAxisInNattableManager pasteManager = new PasteAxisInNattableManager(currentNattableModelManager, pasteHelper, openProgressMonitor, openDialog, preferredUserAction, tableSelectionWrapper, TableClipboardUtils.getClipboardContentsAsString());
+ final IStatus result = pasteManager.doAction();
+
+ // Manage different types of dialog error depending of type error
+ if (openDialog) {
+ displayDialog(result);
+ }
+ return result;
+ }
+
+ /**
+ * @Override
+ *
+ * @see org.eclipse.papyrus.infra.nattable.handler.AbstractTableHandler#setEnabled(java.lang.Object)
+ */
+ @Override
+ public void setEnabled(final Object evaluationContext) {
+ setBaseEnabled(getCurrentNattableModelManager() != null);
+ }
+
+}
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/layer/PapyrusSelectionLayer.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/layer/PapyrusSelectionLayer.java
index 517a37d3758..795970e50e8 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/layer/PapyrusSelectionLayer.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/layer/PapyrusSelectionLayer.java
@@ -1,91 +1,152 @@
-/*****************************************************************************
- * Copyright (c) 2013 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.infra.nattable.layer;
-
-import org.eclipse.nebula.widgets.nattable.copy.command.CopyDataCommandHandler;
-import org.eclipse.nebula.widgets.nattable.copy.command.CopyDataToClipboardCommand;
-import org.eclipse.nebula.widgets.nattable.layer.IUniqueIndexLayer;
-import org.eclipse.nebula.widgets.nattable.selection.ISelectionModel;
-import org.eclipse.nebula.widgets.nattable.selection.SelectionLayer;
-
-/**
- * Papyrus selection layer
- *
- * @author vl222926
- *
- */
-public class PapyrusSelectionLayer extends SelectionLayer {
-
- /**
- *
- * Constructor.
- *
- * @param underlyingLayer
- * @param useDefaultConfiguration
- */
- public PapyrusSelectionLayer(IUniqueIndexLayer underlyingLayer, boolean useDefaultConfiguration) {
- super(underlyingLayer, useDefaultConfiguration);
- }
-
- /**
- *
- * Constructor.
- *
- * @param underlyingLayer
- * @param selectionModel
- * @param useDefaultConfiguration
- * @param registerDefaultEventHandler
- */
- public PapyrusSelectionLayer(IUniqueIndexLayer underlyingLayer, ISelectionModel selectionModel, boolean useDefaultConfiguration, boolean registerDefaultEventHandler) {
- super(underlyingLayer, selectionModel, useDefaultConfiguration, registerDefaultEventHandler);
- }
-
- /**
- *
- * Constructor.
- *
- * @param underlyingLayer
- * @param selectionModel
- * @param useDefaultConfiguration
- */
- public PapyrusSelectionLayer(IUniqueIndexLayer underlyingLayer, ISelectionModel selectionModel, boolean useDefaultConfiguration) {
- super(underlyingLayer, selectionModel, useDefaultConfiguration);
- }
-
- /**
- *
- * Constructor.
- *
- * @param underlyingLayer
- */
- public PapyrusSelectionLayer(IUniqueIndexLayer underlyingLayer) {
- super(underlyingLayer);
- }
-
- /**
- *
- * @see org.eclipse.nebula.widgets.nattable.selection.SelectionLayer#registerCommandHandlers()
- *
- */
- @Override
- protected void registerCommandHandlers() {
- super.registerCommandHandlers();
- unregisterCommandHandler(CopyDataToClipboardCommand.class);
- final CopyDataCommandHandler handler = new CopyDataCommandHandler(this);
- handler.setCopyFormattedText(true);
- registerCommandHandler(handler);
- }
-
-
-}
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 476618
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.nattable.layer;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.nebula.widgets.nattable.coordinate.Range;
+import org.eclipse.nebula.widgets.nattable.copy.command.CopyDataCommandHandler;
+import org.eclipse.nebula.widgets.nattable.copy.command.CopyDataToClipboardCommand;
+import org.eclipse.nebula.widgets.nattable.layer.IUniqueIndexLayer;
+import org.eclipse.nebula.widgets.nattable.selection.ISelectionModel;
+import org.eclipse.nebula.widgets.nattable.selection.SelectionLayer;
+import org.eclipse.papyrus.infra.nattable.selection.PapyrusSelectColumnCommandHandler;
+import org.eclipse.papyrus.infra.nattable.selection.PapyrusSelectRowCommandHandler;
+import org.eclipse.swt.graphics.Rectangle;
+
+/**
+ * Papyrus selection layer.
+ */
+public class PapyrusSelectionLayer extends SelectionLayer {
+
+ /**
+ * Constructor.
+ *
+ * @param underlyingLayer
+ * The underlying layer.
+ * @param useDefaultConfiguration
+ * Boolean to determinate if the default configuration must be used.
+ */
+ public PapyrusSelectionLayer(final IUniqueIndexLayer underlyingLayer, final boolean useDefaultConfiguration) {
+ super(underlyingLayer, useDefaultConfiguration);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param underlyingLayer
+ * The underlying layer.
+ * @param selectionModel
+ * The selection model.
+ * @param useDefaultConfiguration
+ * Boolean to determinate if the default configuration must be used.
+ * @param registerDefaultEventHandler
+ * Boolean to determinate if the default event handler must be registered.
+ */
+ public PapyrusSelectionLayer(final IUniqueIndexLayer underlyingLayer, final ISelectionModel selectionModel, final boolean useDefaultConfiguration, final boolean registerDefaultEventHandler) {
+ super(underlyingLayer, selectionModel, useDefaultConfiguration, registerDefaultEventHandler);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param underlyingLayer
+ * The underlying layer.
+ * @param selectionModel
+ * The selection model.
+ * @param useDefaultConfiguration
+ * Boolean to determinate if the default configuration must be used.
+ */
+ public PapyrusSelectionLayer(final IUniqueIndexLayer underlyingLayer, final ISelectionModel selectionModel, final boolean useDefaultConfiguration) {
+ super(underlyingLayer, selectionModel, useDefaultConfiguration);
+ }
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param underlyingLayer
+ * The underlying layer.
+ */
+ public PapyrusSelectionLayer(final IUniqueIndexLayer underlyingLayer) {
+ super(underlyingLayer);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.nebula.widgets.nattable.selection.SelectionLayer#registerCommandHandlers()
+ */
+ @Override
+ protected void registerCommandHandlers() {
+
+ // Redefine the select row and column command handlers to use the papyrus command handlers
+ this.selectRowCommandHandler = new PapyrusSelectRowCommandHandler(this);
+ this.selectColumnCommandHandler = new PapyrusSelectColumnCommandHandler(this);
+
+ super.registerCommandHandlers();
+ unregisterCommandHandler(CopyDataToClipboardCommand.class);
+ final CopyDataCommandHandler handler = new CopyDataCommandHandler(this);
+ handler.setCopyFormattedText(true);
+ registerCommandHandler(handler);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.nebula.widgets.nattable.selection.SelectionLayer#setLastSelectedRegion(org.eclipse.swt.graphics.Rectangle)
+ */
+ @Override
+ public void setLastSelectedRegion(Rectangle region) {
+ super.setLastSelectedRegion(region);
+ }
+
+ /**
+ * This allows to get the selected axis positions managed as range.
+ *
+ * @param positions
+ * The positions of axis selected.
+ * @return The selected axis positions managed as range.
+ */
+ public List<Range> getRangeSelectedAxis(final Collection<Integer> positions) {
+ List<Range> selectedRange = new ArrayList<Range>();
+
+ for (int position : positions) {
+ final Iterator<Range> existingRangesIterator = selectedRange.iterator();
+ boolean found = false;
+
+ while (!found && existingRangesIterator.hasNext()) {
+ final Range existingRange = existingRangesIterator.next();
+
+ if ((existingRange.start - 1) == position) {
+ existingRange.start = position;
+ found = true;
+ } else if ((existingRange.end == position)) {
+ existingRange.end = position + 1;
+ found = true;
+ }
+ }
+
+ if (!found) {
+ selectedRange.add(new Range(position, position + 1));
+ }
+ }
+
+ return selectedRange;
+ }
+}
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/AbstractInsertImportInNattableManager.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/AbstractInsertImportInNattableManager.java
new file mode 100644
index 00000000000..af5d5796fc1
--- /dev/null
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/AbstractInsertImportInNattableManager.java
@@ -0,0 +1,351 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.nattable.manager;
+
+import java.io.IOException;
+import java.io.Reader;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.MultiStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.papyrus.infra.nattable.Activator;
+import org.eclipse.papyrus.infra.nattable.dialog.PasteImportStatusDialog;
+import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
+import org.eclipse.papyrus.infra.nattable.messages.Messages;
+import org.eclipse.papyrus.infra.nattable.provider.PasteInSelectionNattableCommandProvider;
+import org.eclipse.papyrus.infra.nattable.provider.PasteInSelectionTreeNattableCommandProvider;
+import org.eclipse.papyrus.infra.nattable.provider.PasteNattableCommandProvider;
+import org.eclipse.papyrus.infra.nattable.utils.CSVPasteHelper;
+import org.eclipse.papyrus.infra.nattable.utils.IPapyrusNattableStatus;
+import org.eclipse.papyrus.infra.nattable.utils.PapyrusNattableStatus;
+import org.eclipse.papyrus.infra.nattable.utils.PasteEnablementStatus;
+import org.eclipse.papyrus.infra.nattable.utils.PasteModeEnumeration;
+import org.eclipse.papyrus.infra.nattable.utils.TableHelper;
+import org.eclipse.papyrus.infra.nattable.utils.TableSelectionWrapper;
+import org.eclipse.swt.widgets.Display;
+
+/**
+ * This class allows to insert axis from string.
+ */
+public abstract class AbstractInsertImportInNattableManager extends AbstractPasteImportInsertInNattableManager {
+
+ /**
+ * Constructor.
+ *
+ * @param tableManager
+ * The nattable model manager.
+ * @param pasteHelper
+ * The paste helper.
+ * @param useProgressMonitorDialog
+ * Boolean to determinate if a progress monitor dialog must be used.
+ * @param openDialog
+ * Boolean to determinate if the dialog must be opened during the process.
+ * @param preferredUserAction
+ * The preferred user action for the insert row action.
+ */
+ public AbstractInsertImportInNattableManager(final INattableModelManager tableManager, final CSVPasteHelper pasteHelper, final boolean useProgressMonitorDialog, final boolean openDialog, final int preferredUserAction) {
+ this(tableManager, pasteHelper, useProgressMonitorDialog, openDialog, preferredUserAction, null);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param tableManager
+ * The nattable model manager.
+ * @param pasteHelper
+ * The paste helper.
+ * @param useProgressMonitorDialog
+ * Boolean to determinate if a progress monitor dialog must be used.
+ * @param openDialog
+ * Boolean to determinate if the dialog must be opened during the process.
+ * @param preferredUserAction
+ * The preferred user action for the insert row action.
+ * @param tableSelectionWrapper
+ * The current selection in the table.
+ */
+ public AbstractInsertImportInNattableManager(final INattableModelManager tableManager, final CSVPasteHelper pasteHelper, final boolean useProgressMonitorDialog, final boolean openDialog, final int preferredUserAction,
+ final TableSelectionWrapper tableSelectionWrapper) {
+ super(tableManager, pasteHelper, useProgressMonitorDialog, openDialog, preferredUserAction, tableSelectionWrapper);
+ }
+
+ /**
+ * This method manages the paste and the possible error dialog before doing the paste.
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.AbstractPasteImportInsertInNattableManager#doAction()
+ */
+ @Override
+ public IStatus doAction() {
+ IStatus resultStatus = new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.InsertInNattableManager_InsertNotYetManaged);
+
+ PasteEnablementStatus pasteStatus = null;
+ // Check if the paste configuration is needed for the paste action
+ pasteStatus = findPasteModeFromTableConfiguration(this.tableManager);
+ if (PasteModeEnumeration.PASTE_NO_CONFIGURATION != pasteStatus.getPasteMode() && PasteModeEnumeration.CANT_PASTE != pasteStatus.getPasteMode()) {
+ pasteStatus = findPasteConfigurationAxisIdentifier(this.tableManager);
+ }
+ if (pasteStatus.getPasteMode() == PasteModeEnumeration.PASTE_EOBJECT_ROW_OR_COLUMN) {
+ final boolean value = MessageDialog.openQuestion(Display.getDefault().getActiveShell(), PasteImportStatusDialog.DIALOG_TITLE, Messages.AbstractPasteImportInsertInNattableManager_WhatAreYouPasting);
+ if (value) {
+ pasteStatus.getColumnStatus().add(new Status(IStatus.CANCEL, Activator.PLUGIN_ID, Messages.AbstractPasteImportInsertInNattableManager_TheUserChosesToPasteRows));
+ } else {
+ pasteStatus.getRowStatus().add(new Status(IStatus.CANCEL, Activator.PLUGIN_ID, Messages.AbstractPasteImportInsertInNattableManager_TheUserChosesToPasteColumns));
+ }
+ }
+
+ final PasteModeEnumeration pasteMode = pasteStatus.getPasteMode();
+ switch (pasteMode) {
+ case PASTE_NO_CONFIGURATION:
+ resultStatus = new PapyrusNattableStatus(IPapyrusNattableStatus.PASTE_CONFIGURATiON_INFO, Activator.PLUGIN_ID, Messages.AbstractPasteImportInsertInNattableManager_NoPasteConfiguration2);
+ break;
+ case CANT_PASTE:
+ resultStatus = createCantInsertStatus(pasteStatus);
+ break;
+ case PASTE_EOBJECT_ROW:
+ resultStatus = insertRow(this.tableManager, pasteStatus, pasteHelper);
+ break;
+ case PASTE_EOBJECT_COLUMN:
+ case PASTE_EOBJECT_ROW_OR_COLUMN:
+ // nothing to do
+ break;
+ default:
+ break;
+ }
+
+ return resultStatus;
+ }
+
+ /**
+ * Manage the status when can't paste.
+ *
+ * @param pasteStatus
+ * The paste status.
+ * @return The status when this can't be pasted
+ */
+ protected IStatus createCantInsertStatus(final PasteEnablementStatus pasteStatus) {
+ IStatus resultStatus = new PapyrusNattableStatus(IPapyrusNattableStatus.PASTE_CONFIGURATiON_INFO, Activator.PLUGIN_ID, Messages.AbstractPasteImportInsertInNattableManager_NoPasteConfiguration2);
+
+ final MultiStatus rowStatus = pasteStatus.getRowStatus();
+ final MultiStatus columnStatus = pasteStatus.getColumnStatus();
+ if (rowStatus == null && columnStatus != null) {
+ resultStatus = new PapyrusNattableStatus(IPapyrusNattableStatus.PASTE_CONFIGURATiON_ERROR, Activator.PLUGIN_ID, getFirstNonOKStatus(columnStatus).getMessage());
+ } else if (columnStatus == null && rowStatus != null) {
+ resultStatus = new PapyrusNattableStatus(IPapyrusNattableStatus.PASTE_CONFIGURATiON_ERROR, Activator.PLUGIN_ID, getFirstNonOKStatus(rowStatus).getMessage());
+ } else if (columnStatus != null && rowStatus != null) {
+ final StringBuffer buffer = new StringBuffer(Messages.AbstractPasteImportInsertInNattableManager_NoPasteConfiguration);
+ buffer.append(Messages.InsertInNattableManager_InsertRowsError);
+ buffer.append(getFirstNonOKStatus(rowStatus).getMessage());
+ buffer.append(Messages.InsertInNattableManager_InsertColumnsError);
+ buffer.append(getFirstNonOKStatus(columnStatus).getMessage());
+ resultStatus = new PapyrusNattableStatus(IPapyrusNattableStatus.PASTE_CONFIGURATiON_ERROR, Activator.PLUGIN_ID, buffer.toString());
+ }
+
+ return resultStatus;
+ }
+
+ /**
+ * Insert the row.
+ *
+ * @param manager
+ * the table manager
+ * @param pasteStatus
+ * the paste status
+ * @param pasteHelper
+ * the paste helper
+ * @return
+ * <code>true</code> if the paste can be done
+ */
+ private IStatus insertRow(final INattableModelManager manager, final PasteEnablementStatus pasteStatus, final CSVPasteHelper pasteHelper) {
+ IStatus resultStatus = Status.OK_STATUS;
+
+ if (TableHelper.isTreeTable(manager)) {
+ if (null != tableSelectionWrapper) {
+ resultStatus = insertTreeRows(manager, pasteStatus, pasteHelper, tableSelectionWrapper);
+ } else {
+ resultStatus = insertTreeRows(manager, pasteStatus, pasteHelper);
+ }
+ } else {
+ if (null != tableSelectionWrapper) {
+ resultStatus = insertNormalRows(manager, pasteStatus, pasteHelper, tableSelectionWrapper);
+ } else {
+ resultStatus = insertNormalRows(manager, pasteStatus, pasteHelper);
+ }
+ }
+
+ return resultStatus;
+ }
+
+ /**
+ * Insert the rows for a tree table with a current selection.
+ *
+ * @param manager
+ * The nattable manager.
+ * @param pasteStatus
+ * The paste status.
+ * @param pasteHelper
+ * The paste helper.
+ * @param tableSelectionWrapper
+ * The current selection.
+ * @return The status of the paste.
+ */
+ private IStatus insertTreeRows(final INattableModelManager manager, final PasteEnablementStatus pasteStatus, final CSVPasteHelper pasteHelper, final TableSelectionWrapper tableSelectionWrapper) {
+ IStatus status = Status.OK_STATUS;
+ if (status.isOK()) {
+ status = insertTree(manager, pasteStatus, useProgressMonitorDialog, createReader(), tableSelectionWrapper, getDataSize());
+ }
+ return status;
+ }
+
+ /**
+ * Insert the rows for a tree table without selection.
+ *
+ * @param manager
+ * The nattable manager.
+ * @param pasteStatus
+ * The paste status.
+ * @param pasteHelper
+ * The paste helper.
+ * @param tableSelectionWrapper
+ * The current selection.
+ * @return The status of the paste.
+ */
+ private IStatus insertTreeRows(final INattableModelManager manager, final PasteEnablementStatus pasteStatus, final CSVPasteHelper pasteHelper) {
+ IStatus status = checkTreeTableConfiguration(manager);
+ if (status.isOK()) {
+ status = insertTree(manager, pasteStatus, useProgressMonitorDialog, createReader(), null, getDataSize());
+ }
+ return status;
+ }
+
+ /**
+ * This allow to insert rows in a flat nattable.
+ *
+ * @param manager
+ * The nattable model manager.
+ * @param pasteStatus
+ * The paste status.
+ * @param pasteHelper
+ * The paste helper.
+ * @return The status corresponding to the paste.
+ */
+ private IStatus insertNormalRows(final INattableModelManager manager, final PasteEnablementStatus pasteStatus, final CSVPasteHelper pasteHelper) {
+ final Reader reader = createReader();
+ IStatus status = verifyColumnCountOnFirstLine(manager, reader);
+ try {
+ reader.close();
+ } catch (final IOException e) {
+ Activator.log.error(e);
+ }
+ if (status.isOK()) {
+ status = insert(manager, pasteStatus, useProgressMonitorDialog, createReader(), null, getDataSize());
+ }
+ return status;
+ }
+
+ /**
+ * This allow to insert rows in a flat nattable with selection
+ *
+ * @param manager
+ * The nattable model manager.
+ * @param pasteStatus
+ * The paste status.
+ * @param pasteHelper
+ * The paste helper.
+ * @param tableSelectionWrapper
+ * The current selection in table.
+ * @return The status corresponding to the paste.
+ */
+ private IStatus insertNormalRows(final INattableModelManager manager, final PasteEnablementStatus pasteStatus, final CSVPasteHelper pasteHelper, final TableSelectionWrapper tableSelectionWrapper) {
+ final Reader reader = createReader();
+ IStatus status = verifyColumnCountOnFirstLine(manager, reader);
+ try {
+ reader.close();
+ } catch (final IOException e) {
+ Activator.log.error(e);
+ }
+ if (status.isOK()) {
+ status = insert(manager, pasteStatus, useProgressMonitorDialog, createReader(), tableSelectionWrapper, getDataSize());
+ }
+ return status;
+ }
+
+ /**
+ * Create the command provider for the insert in the tree table and execute the this command.
+ *
+ * @param manager
+ * the table manager
+ * @param status
+ * the status
+ * @param useProgressMonitorDialog
+ * if <code>true</code> a progress monitor will be used
+ * @param reader
+ * the reader used to import data in the table.
+ * @param tableSelectionWrapper
+ * The table selection wrapper for the current table.
+ * @param totalSize
+ * the full size of the elements to import
+ * @return The result status
+ */
+ private IStatus insertTree(final INattableModelManager manager, final PasteEnablementStatus status, final boolean useProgressMonitorDialog, final Reader reader, final TableSelectionWrapper tableSelectionWrapper, final long totalSize) {
+ IStatus resultStatus = Status.OK_STATUS;
+
+ PasteNattableCommandProvider commandProvider = null;
+ switch (status.getPasteMode()) {
+ case PASTE_EOBJECT_ROW:
+ commandProvider = new PasteInSelectionTreeNattableCommandProvider(manager, false, true, reader, this.pasteHelper, this.tableSelectionWrapper, preferredUserAction, totalSize);
+ break;
+ default:
+ break;
+ }
+ if (null != commandProvider) {
+ resultStatus = commandProvider.executePasteFromStringCommand(useProgressMonitorDialog, openDialog);
+ }
+ return resultStatus;
+ }
+
+ /**
+ * Create the command provider for the insert in the flat table and execute the this command.
+ *
+ * @param manager
+ * the table manager
+ * @param status
+ * the status
+ * @param useProgressMonitorDialog
+ * if <code>true</code> a progress monitor will be used
+ * @param reader
+ * the reader used to import data in the table.
+ * @param tableSelectionWrapper
+ * The table selection wrapper for the current table.
+ * @param totalSize
+ * the full size of the elements to import
+ * @return The result status
+ */
+ private IStatus insert(final INattableModelManager manager, final PasteEnablementStatus status, final boolean useProgressMonitorDialog, final Reader reader, final TableSelectionWrapper tableSelectionWrapper, final long totalSize) {
+ IStatus resultStatus = Status.OK_STATUS;
+
+ PasteNattableCommandProvider commandProvider = null;
+ switch (status.getPasteMode()) {
+ case PASTE_EOBJECT_ROW:
+ commandProvider = new PasteInSelectionNattableCommandProvider(manager, false, true, reader, pasteHelper, tableSelectionWrapper, preferredUserAction, totalSize);
+ break;
+ default:
+ break;
+ }
+ if (commandProvider != null) {
+ resultStatus = commandProvider.executePasteFromStringCommand(useProgressMonitorDialog, openDialog);
+ }
+ return resultStatus;
+ }
+}
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/AbstractPasteImportInNattableManager.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/AbstractPasteImportInNattableManager.java
index 7b648b81a32..9eeb387fa59 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/AbstractPasteImportInNattableManager.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/AbstractPasteImportInNattableManager.java
@@ -1,591 +1,519 @@
-/*****************************************************************************
- * Copyright (c) 2014 CEA LIST.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.infra.nattable.manager;
-
-import java.io.IOException;
-import java.io.Reader;
-import java.util.List;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.MultiStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.nebula.widgets.nattable.NatTable;
-import org.eclipse.nebula.widgets.nattable.config.IConfigRegistry;
-import org.eclipse.nebula.widgets.nattable.style.DisplayMode;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.papyrus.infra.nattable.Activator;
-import org.eclipse.papyrus.infra.nattable.dialog.PasteImportStatusDialog;
-import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
-import org.eclipse.papyrus.infra.nattable.messages.Messages;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.IAxis;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.IPasteConfiguration;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.NattableaxisconfigurationPackage;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.PasteEObjectConfiguration;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.TreeFillingConfiguration;
-import org.eclipse.papyrus.infra.nattable.parsers.CSVParser;
-import org.eclipse.papyrus.infra.nattable.parsers.CellIterator;
-import org.eclipse.papyrus.infra.nattable.parsers.RowIterator;
-import org.eclipse.papyrus.infra.nattable.provider.PasteEObjectAxisInNattableCommandProvider;
-import org.eclipse.papyrus.infra.nattable.provider.PasteEObjectTreeAxisInNattableCommandProvider;
-import org.eclipse.papyrus.infra.nattable.utils.AxisConfigurationUtils;
-import org.eclipse.papyrus.infra.nattable.utils.CSVPasteHelper;
-import org.eclipse.papyrus.infra.nattable.utils.Constants;
-import org.eclipse.papyrus.infra.nattable.utils.CreatableEObjectAxisUtils;
-import org.eclipse.papyrus.infra.nattable.utils.FillingConfigurationUtils;
-import org.eclipse.papyrus.infra.nattable.utils.LabelProviderContextElementWrapper;
-import org.eclipse.papyrus.infra.nattable.utils.NattableConfigAttributes;
-import org.eclipse.papyrus.infra.nattable.utils.PasteConfigurationUtils;
-import org.eclipse.papyrus.infra.nattable.utils.PasteEnablementStatus;
-import org.eclipse.papyrus.infra.nattable.utils.PasteModeEnumeration;
-import org.eclipse.papyrus.infra.nattable.utils.PasteSeverityCode;
-import org.eclipse.papyrus.infra.nattable.utils.StyleUtils;
-import org.eclipse.papyrus.infra.nattable.utils.TableHelper;
-import org.eclipse.papyrus.infra.services.edit.utils.ElementTypeUtils;
-import org.eclipse.papyrus.infra.services.labelprovider.service.LabelProviderService;
-import org.eclipse.swt.widgets.Display;
-
-/**
- *
- * Abstract class for the copy/paste and import file in the table
- *
- */
-public abstract class AbstractPasteImportInNattableManager {
-
- /**
- * the helper used to do the paste (help for the split of the string)
- */
- protected final CSVPasteHelper pasteHelper;
-
- /**
- * the table manager
- */
- protected final INattableModelManager tableManager;
-
- /**
- * true if we must use progress monitor
- */
- private boolean useProgressMonitorDialog;
-
- /**
- * message in case of inverted table
- */
- private static final String INVERTED_MESSAGE = Messages.AbstractPasteImportInNattableManager_INVERTED_MESSAGE;
-
- /**
- *
- * Constructor.
- *
- * @param pasteHelper
- * the helper used to do the paste (help for the split of the string)
- */
- public AbstractPasteImportInNattableManager(final INattableModelManager tableManager, final CSVPasteHelper pasteHelper, final boolean useProgressMonitorDialog) {
- this.pasteHelper = pasteHelper;
- this.tableManager = tableManager;
- this.useProgressMonitorDialog = useProgressMonitorDialog;
- }
-
-
-
- /**
- * This method manages the paste and the possible error dialog before doing the paste
- *
- * @return
- * <code>true</code> if the paste can be done (as it is done in a job, it will be after the return of this method)
- */
- public IStatus doPaste() {
- if (this.tableManager.getTable().isInvertAxis()) {
-
- return new Status(IStatus.ERROR, Activator.PLUGIN_ID, INVERTED_MESSAGE);
- // new PasteImportStatusDialog(Display.getDefault().getActiveShell(), INVERTED_MESSAGE).open();
- // return false;
- }
- final PasteEnablementStatus pasteStatus = findPasteModeFromTableConfiguration(this.tableManager);
- if (pasteStatus.getPasteMode() == PasteModeEnumeration.PASTE_EOBJECT_ROW_OR_COLUMN) {
- boolean value = MessageDialog.openQuestion(Display.getDefault().getActiveShell(), PasteImportStatusDialog.DIALOG_TITLE, Messages.AbstractPasteImportInNattableManager_WhatAreYouPasting);
- if (value) {
- pasteStatus.getColumnStatus().add(new Status(IStatus.CANCEL, Activator.PLUGIN_ID, Messages.AbstractPasteImportInNattableManager_TheUserChosesToPasteRows));
- } else {
- pasteStatus.getRowStatus().add(new Status(IStatus.CANCEL, Activator.PLUGIN_ID, Messages.AbstractPasteImportInNattableManager_TheUserChosesToPasteColumns));
- }
- }
- PasteModeEnumeration pasteMode = pasteStatus.getPasteMode();
- switch (pasteMode) {
- case PASTE_NO_CONFIGURATION:
- return new Status(IStatus.INFO, Activator.PLUGIN_ID, Messages.AbstractPasteImportInNattableManager_NoPasteConfiguration2);
- // return openPasteWithNoConfigurationDialog();
- case CANT_PASTE:
- return createCantPasteStatus(pasteStatus);
- case PASTE_EOBJECT_ROW:
- return pasteRow(this.tableManager, pasteStatus, pasteHelper);
- case PASTE_EOBJECT_COLUMN:
- return pasteColumn(this.tableManager, pasteStatus, pasteHelper);
- case PASTE_EOBJECT_ROW_OR_COLUMN:
- // nothing to do
- break;
- default:
- break;
- }
-
- return new Status(IStatus.INFO, Activator.PLUGIN_ID, " paste not yet managed");
- }
-
- private IStatus createCantPasteStatus(final PasteEnablementStatus pasteStatus) {
- final MultiStatus rowStatus = pasteStatus.getRowStatus();
- final MultiStatus columnStatus = pasteStatus.getColumnStatus();
- if (rowStatus == null && columnStatus != null) {
- return new Status(IStatus.ERROR, Activator.PLUGIN_ID, getFirstNonOKStatus(columnStatus).getMessage());
- } else if (columnStatus == null && rowStatus != null) {
- return new Status(IStatus.ERROR, Activator.PLUGIN_ID, getFirstNonOKStatus(rowStatus).getMessage());
- } else if (columnStatus != null && rowStatus != null) {
- StringBuffer buffer = new StringBuffer(Messages.AbstractPasteImportInNattableManager_NoPasteConfiguration);
- buffer.append(Messages.AbstractPasteImportInNattableManager_PasteRowsError);
- buffer.append(getFirstNonOKStatus(rowStatus).getMessage());
- buffer.append(Messages.AbstractPasteImportInNattableManager_PasteColumnsError);
- buffer.append(getFirstNonOKStatus(columnStatus).getMessage());
- return new Status(IStatus.ERROR, Activator.PLUGIN_ID, buffer.toString());
- } else {
- return new Status(IStatus.INFO, Activator.PLUGIN_ID, Messages.AbstractPasteImportInNattableManager_NoPasteConfiguration2);
- }
- }
-
- //
- // /**
- // *
- // * @param pasteStatus
- // * the paste status
- // * @return
- // */
- // private boolean openCantPasteDialog(final PasteEnablementStatus pasteStatus) {
- // final MultiStatus rowStatus = pasteStatus.getRowStatus();
- // final MultiStatus columnStatus = pasteStatus.getColumnStatus();
- // if (rowStatus == null && columnStatus != null) {
- // new PasteImportStatusDialog(Display.getCurrent().getActiveShell(), getFirstNonOKStatus(columnStatus).getMessage()).open();
- // } else if (columnStatus == null && rowStatus != null) {
- // new PasteImportStatusDialog(Display.getCurrent().getActiveShell(), getFirstNonOKStatus(rowStatus).getMessage()).open();
- // } else if (columnStatus != null && rowStatus != null) {
- // StringBuffer buffer = new StringBuffer(Messages.AbstractPasteImportInNattableManager_NoPasteConfiguration);
- // buffer.append(Messages.AbstractPasteImportInNattableManager_PasteRowsError);
- // buffer.append(getFirstNonOKStatus(rowStatus).getMessage());
- // buffer.append(Messages.AbstractPasteImportInNattableManager_PasteColumnsError);
- // buffer.append(getFirstNonOKStatus(columnStatus).getMessage());
- // new PasteImportStatusDialog(Display.getDefault().getActiveShell(), buffer.toString()).open();
- // } else {
- // // never possible
- // openPasteWithNoConfigurationDialog();
- // }
- // return true;
- // }
- //
- /**
- *
- * @param status
- * a status
- * @return
- * the first non ok status
- */
- private IStatus getFirstNonOKStatus(final IStatus status) {
- if (status != null && !status.isOK()) {
- for (final IStatus current : status.getChildren()) {
- if (!current.isOK()) {
- if (current.isMultiStatus()) {
- return getFirstNonOKStatus(current);
- } else {
- return current;
- }
- }
- }
- }
- return null;
- }
-
- /**
- * open the dialog used when the table has no paste configuration
- *
- * @return
- */
- private boolean openPasteWithNoConfigurationDialog() {
- new PasteImportStatusDialog(Display.getDefault().getActiveShell(), Messages.AbstractPasteImportInNattableManager_NoPasteConfiguration2, MessageDialog.INFORMATION).open();
- return true;
- }
-
- /**
- *
- * @param manager
- * the table manager
- * @param pasteStatus
- * the paste status
- * @param pasteHelper
- * the paste helper
- * @return
- * <code>true</code> if the paste can be done
- */
- private IStatus pasteColumn(final INattableModelManager manager, final PasteEnablementStatus pasteStatus, final CSVPasteHelper pasteHelper) {
- // TODO
- return new Status(IStatus.ERROR, Activator.PLUGIN_ID, "Paste column, not yet implemented");
- }
-
- /**
- *
- * @param manager
- * the table manager
- * @param pasteStatus
- * the paste status
- * @param pasteHelper
- * the paste helper
- * @return
- * <code>true</code> if the paste can be done
- */
- private IStatus pasteRow(final INattableModelManager manager, final PasteEnablementStatus pasteStatus, final CSVPasteHelper pasteHelper) {
- if (TableHelper.isTreeTable(manager)) {
- return pasteTreeRows(manager, pasteStatus, pasteHelper);
- }
- return pasteNormalRows(manager, pasteStatus, pasteHelper);
- }
-
- /**
- *
- * @param registry
- * @return
- * the label provider service
- */
- protected LabelProviderService getLabelProviderService(final IConfigRegistry registry) {
- return registry.getConfigAttribute(NattableConfigAttributes.LABEL_PROVIDER_SERVICE_CONFIG_ATTRIBUTE, DisplayMode.NORMAL, NattableConfigAttributes.LABEL_PROVIDER_SERVICE_ID);
- }
-
- private IStatus pasteTreeRows(final INattableModelManager manager, final PasteEnablementStatus pasteStatus, final CSVPasteHelper pasteHelper) {
-
- // we check than there is only one categories by hidden depth
- List<Integer> hiddenCategories = StyleUtils.getHiddenDepths(manager);
- for (Integer current : hiddenCategories) {
- int size = FillingConfigurationUtils.getAllTreeFillingConfigurationForDepth(manager.getTable(), current.intValue()).size();
- if (size > 1) {
- return new Status(IStatus.ERROR, Activator.PLUGIN_ID, PasteSeverityCode.PASTE_ERROR__MORE_THAN_ONE_CATEGORY_FOR_A_HIDDEN_DEPTH, NLS.bind(
- "You have more than 1 category for the depth {0}, so this depth must be visible to do the paste and our pasted file must be conform to the new table appearance", current.intValue()), null);
- }
- }
-
- for (TreeFillingConfiguration current : FillingConfigurationUtils.getAllTreeFillingConfiguration(manager.getTable())) {
- PasteEObjectConfiguration conf = current.getPasteConfiguration();
- if (conf == null) {
- // TODO : add detail of the error in message
- IStatus status = new Status(IStatus.ERROR, Activator.PLUGIN_ID, PasteSeverityCode.PASTE_ERROR__NO_PASTE_CONFIGURATION, "There is no paste configuration for a TreeFillingConfiguration", null);
- return status;
- }
-
- String elementTypeId = conf.getPastedElementId();
- if (elementTypeId == null || elementTypeId.isEmpty()) {
- IStatus status = new Status(IStatus.ERROR, Activator.PLUGIN_ID, PasteSeverityCode.PASTE_ERROR__NO_ELEMENT_TYPE_IN_PASTE_CONFIGURATION, "There is no element id defined in the paste configuration", null);
- return status;
- } else if (!ElementTypeUtils.getAllExistingElementTypesIds().contains(elementTypeId)) {
- IStatus status = new Status(IStatus.ERROR, Activator.PLUGIN_ID, PasteSeverityCode.PASTE_ERROR__UNKNOWN_ELEMENT_TYPE, NLS.bind("The element type {0} is unknown", elementTypeId), null);
- return status;
- }
-
-
- EStructuralFeature feature = conf.getPasteElementContainementFeature();
- if (feature == null) {
- IAxis axis = current.getAxisUsedAsAxisProvider();
- NatTable natTable = (NatTable) manager.getAdapter(NatTable.class);
- LabelProviderContextElementWrapper wrapper = new LabelProviderContextElementWrapper();
- wrapper.setObject(axis);
- wrapper.setConfigRegistry(natTable.getConfigRegistry());
- final LabelProviderService serv = natTable.getConfigRegistry().getConfigAttribute(NattableConfigAttributes.LABEL_PROVIDER_SERVICE_CONFIG_ATTRIBUTE, DisplayMode.NORMAL, NattableConfigAttributes.LABEL_PROVIDER_SERVICE_ID);
- ILabelProvider p = serv.getLabelProvider(wrapper);
- p = serv.getLabelProvider(Constants.HEADER_LABEL_PROVIDER_CONTEXT);
- String categoryName = p.getText(axis);
- IStatus status = new Status(IStatus.ERROR, Activator.PLUGIN_ID, PasteSeverityCode.PASTE_ERROR__NO_CONTAINMENT_FEATURE, NLS.bind("Paste feature has not been set for category {0} on depth {1}", categoryName, current.getDepth()), null);
- return status;
- }
- }
-
- // final Reader reader = createReader();
- // final IStatus status = verifyColumnCountOnFirstLine(manager, reader);
- final IStatus status = Status.OK_STATUS;
- // try {
- // reader.close();
- // } catch (IOException e) {
- // Activator.log.error(e);
- // }
- if (status.isOK()) {
- pasteTree(manager, pasteStatus, useProgressMonitorDialog, createReader(), getDataSize());
- }
- // else {
- // return statis
- // new PasteImportStatusDialog(Display.getDefault().getActiveShell(), status.getMessage()).open();
- // return false;
- // }
- // return true;
- return status;
- }
-
-
-
- private IStatus pasteNormalRows(final INattableModelManager manager, final PasteEnablementStatus pasteStatus, final CSVPasteHelper pasteHelper) {
- final Reader reader = createReader();
- final IStatus status = verifyColumnCountOnFirstLine(manager, reader);
- try {
- reader.close();
- } catch (IOException e) {
- Activator.log.error(e);
- }
- if (status.isOK()) {
- paste(manager, pasteStatus, useProgressMonitorDialog, createReader(), getDataSize());
- }
- // else {
- // new PasteImportStatusDialog(Display.getDefault().getActiveShell(), status.getMessage()).open();
- // return false;
- // }
- // return true;
- return status;
- }
-
-
- /**
- *
- * @param tableManager
- * the table manager
- * @param reader
- * the reader to use to do parsing
- * @return
- * a status indicating if the first line of the file allows to do the paste
- */
- private IStatus verifyColumnCountOnFirstLine(final INattableModelManager tableManager, final Reader reader) {
- final int axisCount = tableManager.getColumnCount();
- CSVParser parser = this.pasteHelper.createParser(reader);
- // we verify the nb of columns
- final RowIterator rowIter = parser.parse();
- int nbCell = 0;
- if (rowIter.hasNext()) {
- final CellIterator cellIter = rowIter.next();
- while (cellIter.hasNext()) {
- cellIter.next();
- nbCell++;
- }
- }
- // 430115: [Table2] Paste/Import must be possible when the number of columns is not the same in the table and in the clipboard/file
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=430115
- if (axisCount == 0) {
- return new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.AbstractPasteImportInNattableManager_TheTableDoesntHaveColumns);
- }
- // commented because the next line could have data
- // if(nbCell == 0) {
- // return new Status(IStatus.ERROR, Activator.PLUGIN_ID, "Your data doesn't have cell on the first row");
- // }
- if (axisCount == nbCell) {
- return new Status(IStatus.OK, Activator.PLUGIN_ID, Messages.AbstractPasteImportInNattableManager_NumberOfColumnsAreEquals);
- } else {
- return new Status(IStatus.OK, Activator.PLUGIN_ID, NLS.bind(Messages.AbstractPasteImportInNattableManager_NumberOfColumnsAreNotEquals, nbCell, axisCount));
- }
- }
-
-
- /**
- *
- * @param manager
- * the table manager
- * @param status
- * the status
- * @param useProgressMonitorDialog
- * if <code>true</code> a progress monitor will be used
- * @param reader
- * the reader used to import data in the table.
- * @param totalSize
- * the full size of the elements to import
- */
- private void pasteTree(final INattableModelManager manager, final PasteEnablementStatus status, final boolean useProgressMonitorDialog, final Reader reader, final long totalSize) {
- PasteEObjectTreeAxisInNattableCommandProvider commandProvider = null;
- switch (status.getPasteMode()) {
- case PASTE_EOBJECT_ROW:
- commandProvider = new PasteEObjectTreeAxisInNattableCommandProvider(manager, false, reader, this.pasteHelper, totalSize);
- break;
- // case PASTE_EOBJECT_COLUMN:
- // commandProvider = new PasteEObjectAxisInNattableCommandProvider(manager, true, reader, this.pasteHelper, totalSize);
- // break;
- default:
- break;
- }
- // TODO : ask for the element to paste (column or row)!
- if (commandProvider != null) {
- commandProvider.executePasteFromStringCommand(useProgressMonitorDialog);
- }
- }
-
- /**
- *
- * @param manager
- * the table manager
- * @param status
- * the status
- * @param useProgressMonitorDialog
- * if <code>true</code> a progress monitor will be used
- * @param reader
- * the reader used to import data in the table.
- * @param totalSize
- * the full size of the elements to import
- */
- private void paste(final INattableModelManager manager, final PasteEnablementStatus status, final boolean useProgressMonitorDialog, final Reader reader, final long totalSize) {
- PasteEObjectAxisInNattableCommandProvider commandProvider = null;
- switch (status.getPasteMode()) {
- case PASTE_EOBJECT_ROW:
- commandProvider = new PasteEObjectAxisInNattableCommandProvider(manager, false, reader, this.pasteHelper, totalSize);
- break;
- case PASTE_EOBJECT_COLUMN:
- commandProvider = new PasteEObjectAxisInNattableCommandProvider(manager, true, reader, this.pasteHelper, totalSize);
- break;
- default:
- break;
- }
- // TODO : ask for the element to paste (column or row)!
- if (commandProvider != null) {
- commandProvider.executePasteFromStringCommand(useProgressMonitorDialog);
- }
- }
-
- /**
- *
- * @param tableManager
- * the table manager used to calculate the enablement of the paste
- * @return
- * the status for the paste
- */
- private PasteEnablementStatus findPasteModeFromTableConfiguration(final INattableModelManager tableManager) {
- if (TableHelper.isTreeTable(tableManager)) {
- return findPasteModeFromTableConfigurationForTreeTable(tableManager);
- }
- return findPasteModeFromTableConfigurationForNormalTable(tableManager);
- }
-
- private PasteEnablementStatus findPasteModeFromTableConfigurationForTreeTable(final INattableModelManager tableManager) {
- MultiStatus pasteRowsStatus = canPasteAxis_verifyPasteConfigurationForTreeTable(tableManager);
- boolean fullSynchro = FillingConfigurationUtils.hasTreeFillingConfigurationForDepth(tableManager.getTable(), 0);
- if (fullSynchro) {
- pasteRowsStatus.add(canPasteAxis_verifyPasteConfiguration(tableManager, false));
- }
- final PasteEnablementStatus pasteStatus = new PasteEnablementStatus(null, pasteRowsStatus);
- return pasteStatus;
- }
-
-
- private PasteEnablementStatus findPasteModeFromTableConfigurationForNormalTable(final INattableModelManager tableManager) {
- final MultiStatus pasteRowsStatus = canPasteAxis_verifyPasteConfiguration(tableManager, false);
- final MultiStatus pasteColumnsStatus = canPasteAxis_verifyPasteConfiguration(tableManager, true);
- final PasteEnablementStatus pasteStatus = new PasteEnablementStatus(pasteColumnsStatus, pasteRowsStatus);
- return pasteStatus;
- }
-
- private static MultiStatus canPasteAxis_verifyPasteConfigurationForTreeTable(final INattableModelManager tableManager) {
- // TODO : do more check + use more ERROR status?
-
- final String pluginId = Activator.PLUGIN_ID;
- final String axisName = Messages.AbstractPasteImportInNattableManager_row;
- MultiStatus status = null;
- for (TreeFillingConfiguration current : FillingConfigurationUtils.getAllTreeFillingConfiguration(tableManager.getTable())) {
- IPasteConfiguration conf = current.getPasteConfiguration();
- if (conf instanceof PasteEObjectConfiguration) {
- status = new MultiStatus(pluginId, IStatus.OK, NLS.bind(Messages.AbstractPasteImportInNattableManager_EnablementStatusForPasteInTheTable, axisName), null);
- status.add(new Status(IStatus.OK, pluginId, NLS.bind(Messages.AbstractPasteImportInNattableManager_TheTableHasAConfigurationToPaste, axisName)));
-
- if (status.isOK() && current.getDepth() == 0) {
- final PasteEObjectConfiguration pasteConfiguration = (PasteEObjectConfiguration) conf;
- status.add(PasteConfigurationUtils.hasConsistentPasteEObjectConfiguration(pasteConfiguration));
-
- // verify that the table context have the required feature
- if (status.isOK()) {
- final EStructuralFeature containmentFeature = pasteConfiguration.getPasteElementContainementFeature();
- if (tableManager.getTable().getContext().eClass().getEAllStructuralFeatures().contains(containmentFeature)) {
- status.add(new Status(IStatus.OK, pluginId, Messages.AbstractPasteImportInNattableManager_TheContextOfTheTableHasTheContainmentFeatureDefinedForThePaste));
- } else {
- status.add(new Status(IStatus.ERROR, pluginId, Messages.AbstractPasteImportInNattableManager_TheContextOfTheTableHasNotTheContainmentFeatureDefinedForThePaste));
- }
-
- // verify that the elements to create are supported by the axis manager
- if (status.isOK()) {
- final String elementId = pasteConfiguration.getPastedElementId();
- if (CreatableEObjectAxisUtils.getCreatableElementIds(tableManager, false).contains(elementId)) {
- status.add(new Status(IStatus.OK, pluginId, NLS.bind(Messages.AbstractPasteImportInNattableManager_TheTableCanCreateElement, elementId, axisName)));
- } else {
- status.add(new Status(IStatus.OK, pluginId, NLS.bind(Messages.AbstractPasteImportInNattableManager_TheTableCantCreateElement, elementId, axisName)));
- }
- }
- }
- }
- }
- }
- return status;
- }
-
-
- /**
- *
- * @param tableManager
- * teh table manager
- * @param columnAxis
- * if <code>true</code> this method tests the paste configuration for the columns, if not, it tests the paste configuration for the rows
- * @return
- * a multi status with information on all verified point in the table configuration or <code>null</code> when there is no table
- * configuration
- */
- private static MultiStatus canPasteAxis_verifyPasteConfiguration(final INattableModelManager tableManager, final boolean columnAxis) {
- final IPasteConfiguration conf = (IPasteConfiguration) AxisConfigurationUtils.getIAxisConfigurationUsedInTable(tableManager.getTable(), NattableaxisconfigurationPackage.eINSTANCE.getPasteEObjectConfiguration(), columnAxis);
- final String pluginId = Activator.PLUGIN_ID;
- final String axisName = columnAxis ? Messages.AbstractPasteImportInNattableManager_column : Messages.AbstractPasteImportInNattableManager_row;
- MultiStatus status = null;
- if (conf instanceof PasteEObjectConfiguration) {
- status = new MultiStatus(pluginId, IStatus.OK, NLS.bind(Messages.AbstractPasteImportInNattableManager_EnablementStatusForPasteInTheTable, axisName), null);
- status.add(new Status(IStatus.OK, pluginId, NLS.bind(Messages.AbstractPasteImportInNattableManager_TheTableHasAConfigurationToPaste, axisName)));
- if (status.isOK()) {
- final PasteEObjectConfiguration pasteConfiguration = (PasteEObjectConfiguration) conf;
- status.add(PasteConfigurationUtils.hasConsistentPasteEObjectConfiguration(pasteConfiguration));
-
- // verify that the table context have the required feature
- if (status.isOK()) {
- final EStructuralFeature containmentFeature = pasteConfiguration.getPasteElementContainementFeature();
- if (tableManager.getTable().getContext().eClass().getEAllStructuralFeatures().contains(containmentFeature)) {
- status.add(new Status(IStatus.OK, pluginId, Messages.AbstractPasteImportInNattableManager_TheContextOfTheTableHasTheContainmentFeatureDefinedForThePaste));
- } else {
- status.add(new Status(IStatus.ERROR, pluginId, Messages.AbstractPasteImportInNattableManager_TheContextOfTheTableHasNotTheContainmentFeatureDefinedForThePaste));
- }
-
- // verify that the elements to create are supported by the axis manager
- if (status.isOK()) {
- final String elementId = pasteConfiguration.getPastedElementId();
- if (CreatableEObjectAxisUtils.getCreatableElementIds(tableManager, columnAxis).contains(elementId)) {
- status.add(new Status(IStatus.OK, pluginId, NLS.bind(Messages.AbstractPasteImportInNattableManager_TheTableCanCreateElement, elementId, axisName)));
- } else {
- status.add(new Status(IStatus.OK, pluginId, NLS.bind(Messages.AbstractPasteImportInNattableManager_TheTableCantCreateElement, elementId, axisName)));
- }
- }
- }
- }
- }
- return status;
- }
-
- /**
- *
- * @return
- * a new reader
- */
- protected abstract Reader createReader();
-
- /**
- *
- * @return
- * the size of the copied data
- */
- protected abstract long getDataSize();
-}
+/*****************************************************************************
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 476618
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.nattable.manager;
+
+import java.io.IOException;
+import java.io.Reader;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.MultiStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.papyrus.infra.nattable.Activator;
+import org.eclipse.papyrus.infra.nattable.dialog.PasteImportStatusDialog;
+import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
+import org.eclipse.papyrus.infra.nattable.messages.Messages;
+import org.eclipse.papyrus.infra.nattable.provider.PasteEObjectAxisInNattableCommandProvider;
+import org.eclipse.papyrus.infra.nattable.provider.PasteEObjectTreeAxisInNattableCommandProvider;
+import org.eclipse.papyrus.infra.nattable.provider.PasteInSelectionNattableCommandProvider;
+import org.eclipse.papyrus.infra.nattable.provider.PasteInSelectionTreeNattableCommandProvider;
+import org.eclipse.papyrus.infra.nattable.provider.PasteNattableCommandProvider;
+import org.eclipse.papyrus.infra.nattable.utils.CSVPasteHelper;
+import org.eclipse.papyrus.infra.nattable.utils.IPapyrusNattableStatus;
+import org.eclipse.papyrus.infra.nattable.utils.PapyrusNattableStatus;
+import org.eclipse.papyrus.infra.nattable.utils.PasteEnablementStatus;
+import org.eclipse.papyrus.infra.nattable.utils.PasteHelperUtils;
+import org.eclipse.papyrus.infra.nattable.utils.PasteModeEnumeration;
+import org.eclipse.papyrus.infra.nattable.utils.TableHelper;
+import org.eclipse.papyrus.infra.nattable.utils.TableSelectionWrapper;
+import org.eclipse.swt.widgets.Display;
+
+/**
+ * Abstract class for the copy/paste and import file in the table.
+ */
+public abstract class AbstractPasteImportInNattableManager extends AbstractPasteImportInsertInNattableManager {
+
+ /**
+ * This allows to define if the paste is an overwrite or a basic paste EOBject.
+ */
+ protected boolean isPasteWithOverwrite;
+
+ /**
+ * This boolean allows to determinate if the paste with overwrite was already calculated or not and prevent another calculation is this was already done.
+ */
+ private boolean isPasteWithOverwriteAlreadyCalculated = false;
+
+ /**
+ * Constructor.
+ *
+ * @param tableManager
+ * The nattable model manager.
+ * @param pasteHelper
+ * The paste helper.
+ * @param useProgressMonitorDialog
+ * Boolean to determinate if a progress monitor dialog must be used.
+ * @param openDialog
+ * Boolean to determinate if the dialog must be opened during the process.
+ * @param preferredUserAction
+ * The preferred user action for the insert row action.
+ */
+ public AbstractPasteImportInNattableManager(final INattableModelManager tableManager, final CSVPasteHelper pasteHelper, final boolean useProgressMonitorDialog, final boolean openDialog, final int preferredUserAction) {
+ super(tableManager, pasteHelper, useProgressMonitorDialog, openDialog, preferredUserAction);
+ this.isPasteWithOverwrite = false;
+ this.isPasteWithOverwriteAlreadyCalculated = false;
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param tableManager
+ * The nattable model manager.
+ * @param pasteHelper
+ * The paste helper.
+ * @param useProgressMonitorDialog
+ * Boolean to determinate if a progress monitor dialog must be used.
+ * @param openDialog
+ * Boolean to determinate if the dialog must be opened during the process.
+ * @param preferredUserAction
+ * The preferred user action for the insert row action.
+ * @param tableSelectionWrapper
+ * The current selection in the table.
+ */
+ public AbstractPasteImportInNattableManager(final INattableModelManager tableManager, final CSVPasteHelper pasteHelper, final boolean useProgressMonitorDialog, final boolean openDialog, final int preferredUserAction,
+ final TableSelectionWrapper tableSelectionWrapper) {
+ super(tableManager, pasteHelper, useProgressMonitorDialog, openDialog, preferredUserAction, tableSelectionWrapper);
+ this.isPasteWithOverwrite = false;
+ this.isPasteWithOverwriteAlreadyCalculated = false;
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param tableManager
+ * The nattable model manager.
+ * @param pasteHelper
+ * The paste helper.
+ * @param useProgressMonitorDialog
+ * Boolean to determinate if a progress monitor dialog must be used.
+ * @param openDialog
+ * Boolean to determinate if the dialog must be opened during the process.
+ * @param preferredUserAction
+ * The preferred user action for the insert row action.
+ * @param tableSelectionWrapper
+ * The current selection in the table.
+ * @param isPasteWithOverwrite
+ * Boolean to determinate if this is a paste with overwrite.
+ */
+ public AbstractPasteImportInNattableManager(final INattableModelManager tableManager, final CSVPasteHelper pasteHelper, final boolean useProgressMonitorDialog, final boolean openDialog, final int preferredUserAction,
+ final TableSelectionWrapper tableSelectionWrapper, final boolean isPasteWithOverwrite) {
+ super(tableManager, pasteHelper, useProgressMonitorDialog, openDialog, preferredUserAction, tableSelectionWrapper);
+ this.isPasteWithOverwrite = isPasteWithOverwrite;
+ this.isPasteWithOverwriteAlreadyCalculated = true;
+ }
+
+ /**
+ * This method manages the paste and the possible error dialog before doing the paste.
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.AbstractPasteImportInsertInNattableManager#doAction()
+ */
+ @Override
+ public IStatus doAction() {
+ IStatus resultStatus = new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.AbstractPasteImportInNattableManager_PasteNotYetManaged);
+
+ PasteEnablementStatus pasteStatus = null;
+ // Check if the paste configuration is needed for the paste action
+ boolean useElse = true;
+ if (!isNeededPasteConfiguration()) {
+ if (!isPasteWithOverwriteAlreadyCalculated) {
+ isPasteWithOverwrite = PasteHelperUtils.isPasteWithOverwrite(tableManager, pasteHelper, createReader());
+ }
+ if (isPasteWithOverwrite) {
+ final MultiStatus status = new MultiStatus(Activator.PLUGIN_ID, IStatus.OK, Messages.AbstractPasteImportInsertInNattableManager_NoPasteConfigurationNeeded, null);
+ if (null == tableSelectionWrapper) {
+ // Check the configuration if no selection is available
+ pasteStatus = findPasteModeFromTableConfiguration(this.tableManager);
+ if (PasteModeEnumeration.PASTE_NO_CONFIGURATION != pasteStatus.getPasteMode() && PasteModeEnumeration.CANT_PASTE != pasteStatus.getPasteMode()) {
+ pasteStatus = findPasteConfigurationAxisIdentifier(this.tableManager);
+ }
+ } else {
+ // If the paste is a paste overwrite on columns, no need to check the paste configuration
+ if (!tableSelectionWrapper.getFullySelectedColumns().isEmpty()) {
+ status.add(new Status(IStatus.OK, Activator.PLUGIN_ID, Messages.AbstractPasteImportInsertInNattableManager_NoPasteConfigurationNeeded));
+ pasteStatus = new PasteEnablementStatus(status, null);
+ // If the paste is a paste overwrite on rows, check the paste configuration only for axis identifier
+ } else if (!tableSelectionWrapper.getFullySelectedRows().isEmpty()) {
+ pasteStatus = findPasteConfigurationAxisIdentifier(this.tableManager);
+ // If the paste is a paste overwrite on cells, no need to check the paste configuration
+ } else {
+ status.add(new Status(IStatus.OK, Activator.PLUGIN_ID, Messages.AbstractPasteImportInsertInNattableManager_NoPasteConfigurationNeeded));
+ pasteStatus = new PasteEnablementStatus(null, status);
+ }
+ }
+ useElse = false;
+ }
+ }
+
+ if (useElse) {
+ pasteStatus = findPasteModeFromTableConfiguration(this.tableManager);
+ if (pasteStatus.getPasteMode() == PasteModeEnumeration.PASTE_EOBJECT_ROW_OR_COLUMN) {
+ final boolean value = MessageDialog.openQuestion(Display.getDefault().getActiveShell(), PasteImportStatusDialog.DIALOG_TITLE, Messages.AbstractPasteImportInsertInNattableManager_WhatAreYouPasting);
+ if (value) {
+ pasteStatus.getColumnStatus().add(new Status(IStatus.CANCEL, Activator.PLUGIN_ID, Messages.AbstractPasteImportInsertInNattableManager_TheUserChosesToPasteRows));
+ } else {
+ pasteStatus.getRowStatus().add(new Status(IStatus.CANCEL, Activator.PLUGIN_ID, Messages.AbstractPasteImportInsertInNattableManager_TheUserChosesToPasteColumns));
+ }
+ }
+ }
+
+ final PasteModeEnumeration pasteMode = pasteStatus.getPasteMode();
+ switch (pasteMode) {
+ case PASTE_NO_CONFIGURATION:
+ resultStatus = new PapyrusNattableStatus(IPapyrusNattableStatus.PASTE_CONFIGURATiON_INFO, Activator.PLUGIN_ID, Messages.AbstractPasteImportInsertInNattableManager_NoPasteConfiguration2);
+ break;
+ case CANT_PASTE:
+ resultStatus = createCantPasteStatus(pasteStatus);
+ break;
+ case PASTE_EOBJECT_ROW:
+ resultStatus = pasteRow(this.tableManager, pasteStatus, pasteHelper);
+ break;
+ case PASTE_EOBJECT_COLUMN:
+ resultStatus = pasteColumn(this.tableManager, pasteStatus, pasteHelper);
+ break;
+ case PASTE_EOBJECT_ROW_OR_COLUMN:
+ // nothing to do
+ break;
+ default:
+ break;
+ }
+
+ return resultStatus;
+ }
+
+ /**
+ * Some paste actions don't need paste configuration. This methos allows to determinate if a paste configuration is needed for the paste action.
+ *
+ * @return <code>true</code> if a paste configuration is needed, <code>false</code> otherwise.
+ */
+ protected boolean isNeededPasteConfiguration() {
+ boolean result = true;
+
+ if (null == tableSelectionWrapper
+ || ((tableSelectionWrapper.getFullySelectedColumns().isEmpty() && tableSelectionWrapper.getFullySelectedRows().isEmpty() && !tableSelectionWrapper.getSelectedCells().isEmpty())
+ || (!tableSelectionWrapper.getFullySelectedColumns().isEmpty() && tableSelectionWrapper.getFullySelectedRows().isEmpty())
+ || (tableSelectionWrapper.getFullySelectedColumns().isEmpty() && !tableSelectionWrapper.getFullySelectedRows().isEmpty()))) {
+ result = false;
+ }
+
+ return result;
+ }
+
+ /**
+ * Manage the status when can't paste.
+ *
+ * @param pasteStatus
+ * The paste status.
+ * @return The status when this can't be pasted
+ */
+ protected IStatus createCantPasteStatus(final PasteEnablementStatus pasteStatus) {
+ IStatus resultStatus = new PapyrusNattableStatus(IPapyrusNattableStatus.PASTE_CONFIGURATiON_INFO, Activator.PLUGIN_ID, Messages.AbstractPasteImportInsertInNattableManager_NoPasteConfiguration2);
+
+ final MultiStatus rowStatus = pasteStatus.getRowStatus();
+ final MultiStatus columnStatus = pasteStatus.getColumnStatus();
+ if (rowStatus == null && columnStatus != null) {
+ resultStatus = new PapyrusNattableStatus(IPapyrusNattableStatus.PASTE_CONFIGURATiON_ERROR, Activator.PLUGIN_ID, getFirstNonOKStatus(columnStatus).getMessage());
+ } else if (columnStatus == null && rowStatus != null) {
+ resultStatus = new PapyrusNattableStatus(IPapyrusNattableStatus.PASTE_CONFIGURATiON_ERROR, Activator.PLUGIN_ID, getFirstNonOKStatus(rowStatus).getMessage());
+ } else if (columnStatus != null && rowStatus != null) {
+ final StringBuffer buffer = new StringBuffer(Messages.AbstractPasteImportInsertInNattableManager_NoPasteConfiguration);
+ buffer.append(Messages.AbstractPasteImportInNattableManager_PasteRowsError);
+ buffer.append(getFirstNonOKStatus(rowStatus).getMessage());
+ buffer.append(Messages.AbstractPasteImportInNattableManager_PasteColumnsError);
+ buffer.append(getFirstNonOKStatus(columnStatus).getMessage());
+ resultStatus = new PapyrusNattableStatus(IPapyrusNattableStatus.PASTE_CONFIGURATiON_ERROR, Activator.PLUGIN_ID, buffer.toString());
+ }
+
+ return resultStatus;
+ }
+
+ /**
+ * Paste the column.
+ *
+ * @param manager
+ * the table manager
+ * @param pasteStatus
+ * the paste status
+ * @param pasteHelper
+ * the paste helper
+ * @return
+ * <code>true</code> if the paste can be done
+ */
+ private IStatus pasteColumn(final INattableModelManager manager, final PasteEnablementStatus pasteStatus, final CSVPasteHelper pasteHelper) {
+ IStatus resultStatus = new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.AbstractPasteImportInNattableManager_PasteNotYetManaged);
+ if (null != tableSelectionWrapper) {
+ resultStatus = pasteColumns(manager, pasteStatus, pasteHelper, tableSelectionWrapper);
+ }
+ return resultStatus;
+ }
+
+ /**
+ * Paste the row.
+ *
+ * @param manager
+ * the table manager
+ * @param pasteStatus
+ * the paste status
+ * @param pasteHelper
+ * the paste helper
+ * @return
+ * <code>true</code> if the paste can be done
+ */
+ private IStatus pasteRow(final INattableModelManager manager, final PasteEnablementStatus pasteStatus, final CSVPasteHelper pasteHelper) {
+ IStatus resultStatus = Status.OK_STATUS;
+
+ if (TableHelper.isTreeTable(manager)) {
+ if (null != tableSelectionWrapper) {
+ resultStatus = pasteTreeRows(manager, pasteStatus, pasteHelper, tableSelectionWrapper);
+ } else {
+ resultStatus = pasteTreeRows(manager, pasteStatus, pasteHelper);
+ }
+ } else {
+ if (null != tableSelectionWrapper) {
+ resultStatus = pasteNormalRows(manager, pasteStatus, pasteHelper, tableSelectionWrapper);
+ } else {
+ resultStatus = pasteNormalRows(manager, pasteStatus, pasteHelper);
+ }
+ }
+
+ return resultStatus;
+ }
+
+ /**
+ * Paste the rows for a tree table with a current selection.
+ *
+ * @param manager
+ * The nattable manager.
+ * @param pasteStatus
+ * The paste status.
+ * @param pasteHelper
+ * The paste helper.
+ * @param tableSelectionWrapper
+ * The current selection.
+ * @return The status of the paste.
+ */
+ private IStatus pasteTreeRows(final INattableModelManager manager, final PasteEnablementStatus pasteStatus, final CSVPasteHelper pasteHelper, final TableSelectionWrapper tableSelectionWrapper) {
+ IStatus status = Status.OK_STATUS;
+ if (status.isOK()) {
+ status = pasteTree(manager, pasteStatus, useProgressMonitorDialog, createReader(), tableSelectionWrapper, getDataSize());
+ }
+ return status;
+ }
+
+ /**
+ * Paste the rows for a tree table without selection.
+ *
+ * @param manager
+ * The nattable manager.
+ * @param pasteStatus
+ * The paste status.
+ * @param pasteHelper
+ * The paste helper.
+ * @param tableSelectionWrapper
+ * The current selection.
+ * @return The status of the paste.
+ */
+ private IStatus pasteTreeRows(final INattableModelManager manager, final PasteEnablementStatus pasteStatus, final CSVPasteHelper pasteHelper) {
+ IStatus status = checkTreeTableConfiguration(manager);
+ if (status.isOK()) {
+ status = pasteTree(manager, pasteStatus, useProgressMonitorDialog, createReader(), null, getDataSize());
+ }
+ return status;
+ }
+
+ /**
+ * This allow to paste rows in a flat nattable.
+ *
+ * @param manager
+ * The nattable model manager.
+ * @param pasteStatus
+ * The paste status.
+ * @param pasteHelper
+ * The paste helper.
+ * @return The status corresponding to the paste.
+ */
+ private IStatus pasteNormalRows(final INattableModelManager manager, final PasteEnablementStatus pasteStatus, final CSVPasteHelper pasteHelper) {
+ final Reader reader = createReader();
+ IStatus status = verifyColumnCountOnFirstLine(manager, reader);
+ try {
+ reader.close();
+ } catch (final IOException e) {
+ Activator.log.error(e);
+ }
+ if (status.isOK()) {
+ status = paste(manager, pasteStatus, useProgressMonitorDialog, createReader(), null, getDataSize());
+ }
+ return status;
+ }
+
+ /**
+ * This allow to paste rows in a flat nattable with selection
+ *
+ * @param manager
+ * The nattable model manager.
+ * @param pasteStatus
+ * The paste status.
+ * @param pasteHelper
+ * The paste helper.
+ * @param tableSelectionWrapper
+ * The current selection in table.
+ * @return The status corresponding to the paste.
+ */
+ private IStatus pasteNormalRows(final INattableModelManager manager, final PasteEnablementStatus pasteStatus, final CSVPasteHelper pasteHelper, final TableSelectionWrapper tableSelectionWrapper) {
+ final Reader reader = createReader();
+ IStatus status = verifyColumnCountOnFirstLine(manager, reader);
+ try {
+ reader.close();
+ } catch (final IOException e) {
+ Activator.log.error(e);
+ }
+ if (status.isOK()) {
+ status = paste(manager, pasteStatus, useProgressMonitorDialog, createReader(), tableSelectionWrapper, getDataSize());
+ }
+ return status;
+ }
+
+ /**
+ * Paste the columns for a table with a current selection.
+ *
+ * @param manager
+ * The nattable manager.
+ * @param pasteStatus
+ * The paste status.
+ * @param pasteHelper
+ * The paste helper.
+ * @param tableSelectionWrapper
+ * The current selection.
+ * @return The status of the paste.
+ */
+ private IStatus pasteColumns(final INattableModelManager manager, final PasteEnablementStatus pasteStatus, final CSVPasteHelper pasteHelper, final TableSelectionWrapper tableSelectionWrapper) {
+ IStatus status = Status.OK_STATUS;
+
+ if (TableHelper.isTreeTable(manager)) {
+ status = pasteTree(manager, pasteStatus, useProgressMonitorDialog, createReader(), tableSelectionWrapper, getDataSize());
+ } else {
+ status = paste(manager, pasteStatus, useProgressMonitorDialog, createReader(), tableSelectionWrapper, getDataSize());
+ }
+
+ return status;
+ }
+
+ /**
+ * Create the command provider for the paste in the tree table and execute the this command.
+ *
+ * @param manager
+ * the table manager
+ * @param status
+ * the status
+ * @param useProgressMonitorDialog
+ * if <code>true</code> a progress monitor will be used
+ * @param reader
+ * the reader used to import data in the table.
+ * @param tableSelectionWrapper
+ * The table selection wrapper for the current table.
+ * @param totalSize
+ * the full size of the elements to import
+ * @return The result status
+ */
+ private IStatus pasteTree(final INattableModelManager manager, final PasteEnablementStatus status, final boolean useProgressMonitorDialog, final Reader reader, final TableSelectionWrapper tableSelectionWrapper, final long totalSize) {
+ IStatus resultStatus = Status.OK_STATUS;
+
+ PasteNattableCommandProvider commandProvider = null;
+ if (null != tableSelectionWrapper) {
+ switch (status.getPasteMode()) {
+ case PASTE_EOBJECT_ROW:
+ commandProvider = new PasteInSelectionTreeNattableCommandProvider(manager, false, false, reader, this.pasteHelper, this.tableSelectionWrapper, this.preferredUserAction, totalSize);
+ break;
+ case PASTE_EOBJECT_COLUMN:
+ commandProvider = new PasteInSelectionTreeNattableCommandProvider(manager, true, false, reader, this.pasteHelper, this.tableSelectionWrapper, this.preferredUserAction, totalSize);
+ break;
+ default:
+ break;
+ }
+ } else if (isPasteWithOverwrite) {
+ commandProvider = new PasteInSelectionTreeNattableCommandProvider(manager, PasteModeEnumeration.PASTE_EOBJECT_COLUMN.equals(status.getPasteMode()), true, reader, this.pasteHelper, this.tableSelectionWrapper, this.preferredUserAction, totalSize);
+ } else {
+ switch (status.getPasteMode()) {
+ case PASTE_EOBJECT_ROW:
+ commandProvider = new PasteEObjectTreeAxisInNattableCommandProvider(manager, false, reader, this.pasteHelper, totalSize);
+ break;
+ default:
+ break;
+ }
+ }
+ if (null != commandProvider) {
+ resultStatus = commandProvider.executePasteFromStringCommand(useProgressMonitorDialog, openDialog);
+ }
+ return resultStatus;
+ }
+
+ /**
+ * Create the command provider for the paste in the flat table and execute the this command.
+ *
+ * @param manager
+ * the table manager
+ * @param status
+ * the status
+ * @param useProgressMonitorDialog
+ * if <code>true</code> a progress monitor will be used
+ * @param reader
+ * the reader used to import data in the table.
+ * @param tableSelectionWrapper
+ * The table selection wrapper for the current table.
+ * @param totalSize
+ * the full size of the elements to import
+ * @return The result status
+ */
+ private IStatus paste(final INattableModelManager manager, final PasteEnablementStatus status, final boolean useProgressMonitorDialog, final Reader reader, final TableSelectionWrapper tableSelectionWrapper, final long totalSize) {
+ IStatus resultStatus = Status.OK_STATUS;
+
+ PasteNattableCommandProvider commandProvider = null;
+ if (null != tableSelectionWrapper) {
+ switch (status.getPasteMode()) {
+ case PASTE_EOBJECT_ROW:
+ commandProvider = new PasteInSelectionNattableCommandProvider(manager, false, false, reader, pasteHelper, tableSelectionWrapper, this.preferredUserAction, totalSize);
+ break;
+ case PASTE_EOBJECT_COLUMN:
+ commandProvider = new PasteInSelectionNattableCommandProvider(manager, true, false, reader, pasteHelper, tableSelectionWrapper, this.preferredUserAction, totalSize);
+ break;
+ default:
+ break;
+ }
+ }else if (isPasteWithOverwrite) {
+ commandProvider = new PasteInSelectionNattableCommandProvider(manager, PasteModeEnumeration.PASTE_EOBJECT_COLUMN.equals(status.getPasteMode()), true, reader, pasteHelper, tableSelectionWrapper, this.preferredUserAction, totalSize);
+ } else {
+ switch (status.getPasteMode()) {
+ case PASTE_EOBJECT_ROW:
+ commandProvider = new PasteEObjectAxisInNattableCommandProvider(manager, false, reader, this.pasteHelper, totalSize);
+ break;
+ default:
+ break;
+ }
+ }
+
+ if (commandProvider != null) {
+ resultStatus = commandProvider.executePasteFromStringCommand(useProgressMonitorDialog, openDialog);
+ }
+ return resultStatus;
+ }
+}
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/AbstractPasteImportInsertInNattableManager.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/AbstractPasteImportInsertInNattableManager.java
new file mode 100644
index 00000000000..33605280376
--- /dev/null
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/AbstractPasteImportInsertInNattableManager.java
@@ -0,0 +1,540 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.nattable.manager;
+
+import java.io.Reader;
+import java.util.List;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.MultiStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.nebula.widgets.nattable.NatTable;
+import org.eclipse.nebula.widgets.nattable.config.IConfigRegistry;
+import org.eclipse.nebula.widgets.nattable.style.DisplayMode;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.papyrus.infra.nattable.Activator;
+import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
+import org.eclipse.papyrus.infra.nattable.messages.Messages;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.IAxis;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.IPasteConfiguration;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.NattableaxisconfigurationPackage;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.PasteEObjectConfiguration;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.TreeFillingConfiguration;
+import org.eclipse.papyrus.infra.nattable.parsers.CSVParser;
+import org.eclipse.papyrus.infra.nattable.parsers.CellIterator;
+import org.eclipse.papyrus.infra.nattable.parsers.RowIterator;
+import org.eclipse.papyrus.infra.nattable.utils.AxisConfigurationUtils;
+import org.eclipse.papyrus.infra.nattable.utils.CSVPasteHelper;
+import org.eclipse.papyrus.infra.nattable.utils.Constants;
+import org.eclipse.papyrus.infra.nattable.utils.CreatableEObjectAxisUtils;
+import org.eclipse.papyrus.infra.nattable.utils.FillingConfigurationUtils;
+import org.eclipse.papyrus.infra.nattable.utils.IPapyrusNattableStatus;
+import org.eclipse.papyrus.infra.nattable.utils.LabelProviderContextElementWrapper;
+import org.eclipse.papyrus.infra.nattable.utils.NattableConfigAttributes;
+import org.eclipse.papyrus.infra.nattable.utils.PapyrusNattableMultiStatus;
+import org.eclipse.papyrus.infra.nattable.utils.PapyrusNattableStatus;
+import org.eclipse.papyrus.infra.nattable.utils.PasteConfigurationUtils;
+import org.eclipse.papyrus.infra.nattable.utils.PasteEnablementStatus;
+import org.eclipse.papyrus.infra.nattable.utils.PasteSeverityCode;
+import org.eclipse.papyrus.infra.nattable.utils.StyleUtils;
+import org.eclipse.papyrus.infra.nattable.utils.TableHelper;
+import org.eclipse.papyrus.infra.nattable.utils.TableSelectionWrapper;
+import org.eclipse.papyrus.infra.services.edit.utils.ElementTypeUtils;
+import org.eclipse.papyrus.infra.services.labelprovider.service.LabelProviderService;
+
+/**
+ * Abstract class for the copy/paste, insert and import file in the table.
+ */
+public abstract class AbstractPasteImportInsertInNattableManager {
+
+ /**
+ * The preferred user action for the insert row action.
+ */
+ protected final int preferredUserAction;
+
+ /**
+ * The helper used to do the paste (help for the split of the string).
+ */
+ protected final CSVPasteHelper pasteHelper;
+
+ /**
+ * The table manager.
+ */
+ protected final INattableModelManager tableManager;
+
+ /**
+ * <code>true</code> if we must use progress monitor.
+ */
+ protected final boolean useProgressMonitorDialog;
+
+ /**
+ * The current selection.
+ */
+ protected final TableSelectionWrapper tableSelectionWrapper;
+
+ /**
+ * Determinate if dialog have to be opened during the execution (need to be <code>false</code> for the JUnit tests).
+ */
+ protected final boolean openDialog;
+
+ /**
+ * Constructor.
+ *
+ * @param tableManager
+ * The nattable model manager.
+ * @param pasteHelper
+ * The paste helper.
+ * @param useProgressMonitorDialog
+ * Boolean to determinate if a progress monitor dialog must be used.
+ * @param openDialog
+ * Boolean to determinate if the dialog must be opened during the process.
+ * @param preferredUserAction
+ * The preferred user action for the insert row action.
+ */
+ public AbstractPasteImportInsertInNattableManager(final INattableModelManager tableManager, final CSVPasteHelper pasteHelper, final boolean useProgressMonitorDialog, final boolean openDialog, final int preferredUserAction) {
+ this(tableManager, pasteHelper, useProgressMonitorDialog, openDialog, preferredUserAction, null);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param tableManager
+ * The nattable model manager.
+ * @param pasteHelper
+ * The paste helper.
+ * @param useProgressMonitorDialog
+ * Boolean to determinate if a progress monitor dialog must be used.
+ * @param openDialog
+ * Boolean to determinate if the dialog must be opened during the process.
+ * @param preferredUserAction
+ * The preferred user action for the insert row action.
+ * @param tableSelectionWrapper
+ * The current selection in the table.
+ */
+ public AbstractPasteImportInsertInNattableManager(final INattableModelManager tableManager, final CSVPasteHelper pasteHelper, final boolean useProgressMonitorDialog, final boolean openDialog, final int preferredUserAction,
+ final TableSelectionWrapper tableSelectionWrapper) {
+ this.pasteHelper = pasteHelper;
+ this.tableManager = tableManager;
+ this.useProgressMonitorDialog = useProgressMonitorDialog;
+ this.openDialog = openDialog;
+ this.preferredUserAction = preferredUserAction;
+ this.tableSelectionWrapper = tableSelectionWrapper;
+ }
+
+ /**
+ * This method manages the action and the possible error dialog before doing the action.
+ *
+ * @return
+ * <code>true</code> if the action can be done (as it is done in a job, it will be after the return of this method)
+ */
+ public abstract IStatus doAction();
+
+ /**
+ * Get the first non OK status.
+ *
+ * @param status
+ * a status
+ * @return
+ * the first non ok status
+ */
+ protected IStatus getFirstNonOKStatus(final IStatus status) {
+ if (status != null && !status.isOK()) {
+ for (final IStatus current : status.getChildren()) {
+ if (!current.isOK()) {
+ if (current.isMultiStatus()) {
+ return getFirstNonOKStatus(current);
+ } else {
+ return current;
+ }
+ }
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Get the label provider service.
+ *
+ * @param registry
+ * the config registry
+ * @return
+ * the label provider service
+ */
+ protected LabelProviderService getLabelProviderService(final IConfigRegistry registry) {
+ return registry.getConfigAttribute(NattableConfigAttributes.LABEL_PROVIDER_SERVICE_CONFIG_ATTRIBUTE, DisplayMode.NORMAL, NattableConfigAttributes.LABEL_PROVIDER_SERVICE_ID);
+ }
+
+ /**
+ * This allows to verify the column count for the first line and return the correct status.
+ *
+ * @param tableManager
+ * the table manager
+ * @param reader
+ * the reader to use to do parsing
+ * @return
+ * a status indicating if the first line of the file allows to do the paste
+ */
+ protected IStatus verifyColumnCountOnFirstLine(final INattableModelManager tableManager, final Reader reader) {
+ final int axisCount = tableManager.getColumnCount();
+ final CSVParser parser = this.pasteHelper.createParser(reader);
+ // we verify the nb of columns
+ final RowIterator rowIter = parser.parse();
+ int nbCell = 0;
+ if (rowIter.hasNext()) {
+ final CellIterator cellIter = rowIter.next();
+ while (cellIter.hasNext()) {
+ cellIter.next();
+ nbCell++;
+ }
+ }
+ // 430115: [Table2] Paste/Import must be possible when the number of columns is not the same in the table and in the clipboard/file
+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=430115
+ if (axisCount == 0) {
+ return new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.AbstractPasteImportInsertInNattableManager_TheTableDoesntHaveColumns);
+ }
+
+ if (axisCount == nbCell) {
+ return new Status(IStatus.OK, Activator.PLUGIN_ID, Messages.AbstractPasteImportInsertInNattableManager_NumberOfColumnsAreEquals);
+ } else {
+ return new Status(IStatus.OK, Activator.PLUGIN_ID, NLS.bind(Messages.AbstractPasteImportInsertInNattableManager_NumberOfColumnsAreNotEquals, nbCell, axisCount));
+ }
+ }
+
+ /**
+ * This allows to find the paste mode for the table configuration.
+ *
+ * @param tableManager
+ * the table manager used to calculate the enablement of the paste
+ * @return
+ * the status for the paste
+ */
+ protected PasteEnablementStatus findPasteModeFromTableConfiguration(final INattableModelManager tableManager) {
+ if (TableHelper.isTreeTable(tableManager)) {
+ return findPasteModeFromTableConfigurationForTreeTable(tableManager);
+ }
+ return findPasteModeFromTableConfigurationForNormalTable(tableManager);
+ }
+
+ /**
+ * This allows to find the paste mode for the tree table configuration.
+ *
+ * @param tableManager
+ * the table manager used to calculate the enablement of the paste
+ * @return
+ * the status for the paste
+ */
+ protected PasteEnablementStatus findPasteModeFromTableConfigurationForTreeTable(final INattableModelManager tableManager) {
+ PapyrusNattableMultiStatus pasteRowsStatus = canPasteAxis_verifyPasteConfigurationForTreeTable(tableManager);
+ final boolean fullSynchro = FillingConfigurationUtils.hasTreeFillingConfigurationForDepth(tableManager.getTable(), 0);
+ if (fullSynchro) {
+ pasteRowsStatus = canPasteAxis_verifyPasteConfiguration(tableManager, false);
+ }
+ final PasteEnablementStatus pasteStatus = new PasteEnablementStatus(null, pasteRowsStatus);
+ return pasteStatus;
+ }
+
+ /**
+ * This allows to find the paste mode for the simple table configuration.
+ *
+ * @param tableManager
+ * the table manager used to calculate the enablement of the paste
+ * @return
+ * the status for the paste
+ */
+ protected PasteEnablementStatus findPasteModeFromTableConfigurationForNormalTable(final INattableModelManager tableManager) {
+ final MultiStatus pasteRowsStatus = canPasteAxis_verifyPasteConfiguration(tableManager, false);
+ final MultiStatus pasteColumnsStatus = canPasteAxis_verifyPasteConfiguration(tableManager, true);
+ final PasteEnablementStatus pasteStatus = new PasteEnablementStatus(pasteColumnsStatus, pasteRowsStatus);
+ return pasteStatus;
+ }
+
+ /**
+ * Verify the paste configuration for the tree table.
+ *
+ * @param tableManager
+ * the table manager
+ * @return
+ * a multi status with information on all verified point in the table configuration or <code>null</code> when there is no table
+ * configuration
+ */
+ protected static PapyrusNattableMultiStatus canPasteAxis_verifyPasteConfigurationForTreeTable(final INattableModelManager tableManager) {
+ // TODO : do more check + use more ERROR status?
+
+ final String pluginId = Activator.PLUGIN_ID;
+ final String axisName = Messages.AbstractPasteImportInsertInNattableManager_row;
+ PapyrusNattableMultiStatus status = null;
+ for (final TreeFillingConfiguration current : FillingConfigurationUtils.getAllTreeFillingConfiguration(tableManager.getTable())) {
+ final IPasteConfiguration conf = current.getPasteConfiguration();
+ if (conf instanceof PasteEObjectConfiguration) {
+ status = new PapyrusNattableMultiStatus(pluginId, IStatus.OK, NLS.bind(Messages.AbstractPasteImportInsertInNattableManager_EnablementStatusForPasteInTheTable, axisName), null);
+ status.add(new Status(IStatus.OK, pluginId, NLS.bind(Messages.AbstractPasteImportInsertInNattableManager_TheTableHasAConfigurationToPaste, axisName)));
+
+ if (status.isOK() && current.getDepth() == 0) {
+ final PasteEObjectConfiguration pasteConfiguration = (PasteEObjectConfiguration) conf;
+ final IStatus consistentPasteEObjectConfigurationStatus = PasteConfigurationUtils.hasConsistentPasteEObjectConfiguration(pasteConfiguration);
+ if (!consistentPasteEObjectConfigurationStatus.isOK()) {
+ status.add(new PapyrusNattableStatus(IPapyrusNattableStatus.PASTE_CONFIGURATiON_ERROR, pluginId, consistentPasteEObjectConfigurationStatus.getMessage()));
+ } else {
+ status.add(consistentPasteEObjectConfigurationStatus);
+ }
+
+ // verify that the table context have the required feature
+ if (status.isOK()) {
+ final EStructuralFeature containmentFeature = pasteConfiguration.getPasteElementContainementFeature();
+ if (tableManager.getTable().getContext().eClass().getEAllStructuralFeatures().contains(containmentFeature)) {
+ status.add(new Status(IStatus.OK, pluginId, Messages.AbstractPasteImportInsertInNattableManager_TheContextOfTheTableHasTheContainmentFeatureDefinedForThePaste));
+ } else {
+ status.add(new PapyrusNattableStatus(IPapyrusNattableStatus.PASTE_CONFIGURATiON_ERROR, pluginId, Messages.AbstractPasteImportInsertInNattableManager_TheContextOfTheTableHasNotTheContainmentFeatureDefinedForThePaste));
+ }
+
+ // verify that the elements to create are supported by the axis manager
+ if (status.isOK()) {
+ final String elementId = pasteConfiguration.getPastedElementId();
+ if (CreatableEObjectAxisUtils.getCreatableElementIds(tableManager, false).contains(elementId)) {
+ status.add(new Status(IStatus.OK, pluginId, NLS.bind(Messages.AbstractPasteImportInsertInNattableManager_TheTableCanCreateElement, elementId, axisName)));
+ } else {
+ status.add(new Status(IStatus.OK, pluginId, NLS.bind(Messages.AbstractPasteImportInsertInNattableManager_TheTableCantCreateElement, elementId, axisName)));
+ }
+ }
+ }
+ }
+ }
+ }
+ return status;
+ }
+
+ /**
+ * Verify the paste configuration for the paste axis.
+ *
+ * @param tableManager
+ * the table manager
+ * @param columnAxis
+ * if <code>true</code> this method tests the paste configuration for the columns, if not, it tests the paste configuration for the rows
+ * @return
+ * a multi status with information on all verified point in the table configuration or <code>null</code> when there is no table
+ * configuration
+ */
+ protected static PapyrusNattableMultiStatus canPasteAxis_verifyPasteConfiguration(final INattableModelManager tableManager, final boolean columnAxis) {
+ final IPasteConfiguration conf = (IPasteConfiguration) AxisConfigurationUtils.getIAxisConfigurationUsedInTable(tableManager.getTable(), NattableaxisconfigurationPackage.eINSTANCE.getPasteEObjectConfiguration(), columnAxis);
+ final String pluginId = Activator.PLUGIN_ID;
+ final String axisName = columnAxis ? Messages.AbstractPasteImportInsertInNattableManager_column : Messages.AbstractPasteImportInsertInNattableManager_row;
+ PapyrusNattableMultiStatus status = null;
+ if (conf instanceof PasteEObjectConfiguration) {
+ status = new PapyrusNattableMultiStatus(pluginId, IStatus.OK, NLS.bind(Messages.AbstractPasteImportInsertInNattableManager_EnablementStatusForPasteInTheTable, axisName), null);
+ status.add(new Status(IStatus.OK, pluginId, NLS.bind(Messages.AbstractPasteImportInsertInNattableManager_TheTableHasAConfigurationToPaste, axisName)));
+ if (status.isOK()) {
+ final PasteEObjectConfiguration pasteConfiguration = (PasteEObjectConfiguration) conf;
+ final IStatus consistentPasteEObjectConfigurationStatus = PasteConfigurationUtils.hasConsistentPasteEObjectConfiguration(pasteConfiguration);
+ if (!consistentPasteEObjectConfigurationStatus.isOK()) {
+ status.add(new PapyrusNattableStatus(IPapyrusNattableStatus.PASTE_CONFIGURATiON_ERROR, pluginId, consistentPasteEObjectConfigurationStatus.getMessage()));
+ } else {
+ status.add(consistentPasteEObjectConfigurationStatus);
+ }
+
+ // verify that the table context have the required feature
+ if (status.isOK()) {
+ final EStructuralFeature containmentFeature = pasteConfiguration.getPasteElementContainementFeature();
+ if (tableManager.getTable().getContext().eClass().getEAllStructuralFeatures().contains(containmentFeature)) {
+ status.add(new Status(IStatus.OK, pluginId, Messages.AbstractPasteImportInsertInNattableManager_TheContextOfTheTableHasTheContainmentFeatureDefinedForThePaste));
+ } else {
+ status.add(new PapyrusNattableStatus(IPapyrusNattableStatus.PASTE_CONFIGURATiON_ERROR, pluginId, Messages.AbstractPasteImportInsertInNattableManager_TheContextOfTheTableHasNotTheContainmentFeatureDefinedForThePaste));
+ }
+
+ // verify that the elements to create are supported by the axis manager
+ if (status.isOK()) {
+ final String elementId = pasteConfiguration.getPastedElementId();
+ if (CreatableEObjectAxisUtils.getCreatableElementIds(tableManager, columnAxis).contains(elementId)) {
+ status.add(new Status(IStatus.OK, pluginId, NLS.bind(Messages.AbstractPasteImportInsertInNattableManager_TheTableCanCreateElement, elementId, axisName)));
+ } else {
+ status.add(new Status(IStatus.OK, pluginId, NLS.bind(Messages.AbstractPasteImportInsertInNattableManager_TheTableCantCreateElement, elementId, axisName)));
+ }
+ }
+ }
+ }
+ }
+ return status;
+ }
+
+ /**
+ * This allow to find the paste configuration for the axis identifier and check it.
+ *
+ * @param manager
+ * The nattable model manager.
+ * @return multi status corresponding to the paste configuration axis identifier.
+ */
+ protected static PasteEnablementStatus findPasteConfigurationAxisIdentifier(final INattableModelManager manager) {
+ PapyrusNattableMultiStatus status = null;
+ if (TableHelper.isTreeTable(manager)) {
+ final boolean fullSynchro = FillingConfigurationUtils.hasTreeFillingConfigurationForDepth(manager.getTable(), 0);
+ if (fullSynchro) {
+ status = canPasteAxis_verifyPasteConfigurationAxisIdentifierForNormalTable(manager);
+ } else {
+ status = canPasteAxis_verifyPasteConfigurationAxisIdentifierForTreeTable(manager);
+ }
+ } else {
+ status = canPasteAxis_verifyPasteConfigurationAxisIdentifierForNormalTable(manager);
+ }
+ final PasteEnablementStatus pasteStatus = new PasteEnablementStatus(null, status);
+ return pasteStatus;
+ }
+
+ /**
+ * Verify the paste configuration axis identifier for the paste axis.
+ *
+ * @param tableManager
+ * the table manager
+ * @return
+ * a multi status with information on all verified point in the table configuration or <code>null</code> when there is no table
+ * configuration
+ */
+ protected static PapyrusNattableMultiStatus canPasteAxis_verifyPasteConfigurationAxisIdentifierForTreeTable(final INattableModelManager manager) {
+ PapyrusNattableMultiStatus status = null;
+
+ final String pluginId = Activator.PLUGIN_ID;
+ final String axisName = Messages.AbstractPasteImportInsertInNattableManager_row;
+ for (final TreeFillingConfiguration current : FillingConfigurationUtils.getAllTreeFillingConfiguration(manager.getTable())) {
+ final IPasteConfiguration conf = current.getPasteConfiguration();
+ if (current.getDepth() == 0 && conf instanceof PasteEObjectConfiguration) {
+ status = new PapyrusNattableMultiStatus(pluginId, IStatus.OK, NLS.bind(Messages.AbstractPasteImportInsertInNattableManager_EnablementStatusForPasteInTheTable, axisName), null);
+ status.add(new Status(IStatus.OK, pluginId, NLS.bind(Messages.AbstractPasteImportInsertInNattableManager_TheTableHasAConfigurationToPaste, axisName)));
+
+ if (status.isOK()) {
+ final PasteEObjectConfiguration pasteConfiguration = (PasteEObjectConfiguration) conf;
+
+ final IAxis axisIdentifier = pasteConfiguration.getAxisIdentifier();
+
+ if (null != axisIdentifier) {
+ status.add(new Status(IStatus.OK, pluginId, Messages.AbstractPasteImportInsertInNattableManager_PasteConfigurationAxisIdentifierHasBeenSet)); // $NON-NLS-1$
+ } else {
+ status.add(new PapyrusNattableStatus(IPapyrusNattableStatus.PASTE_CONFIGURATiON_ERROR, pluginId, Messages.AbstractPasteImportInsertInNattableManager_PasteConfigurationAxisIdentifierHasNotBeenSet)); // $NON-NLS-1
+ }
+ }
+ }
+ }
+
+ return status;
+ }
+
+ /**
+ * Verify the paste configuration axis identifier for the paste axis.
+ *
+ * @param tableManager
+ * the table manager
+ * @return
+ * a multi status with information on all verified point in the table configuration or <code>null</code> when there is no table
+ * configuration
+ */
+ protected static PapyrusNattableMultiStatus canPasteAxis_verifyPasteConfigurationAxisIdentifierForNormalTable(final INattableModelManager manager) {
+ final IPasteConfiguration conf = (IPasteConfiguration) AxisConfigurationUtils.getIAxisConfigurationUsedInTable(manager.getTable(), NattableaxisconfigurationPackage.eINSTANCE.getPasteEObjectConfiguration(), false);
+ final String pluginId = Activator.PLUGIN_ID;
+ final String axisName = Messages.AbstractPasteImportInsertInNattableManager_row;
+ PapyrusNattableMultiStatus status = null;
+ if (conf instanceof PasteEObjectConfiguration) {
+ status = new PapyrusNattableMultiStatus(pluginId, IStatus.OK, NLS.bind(Messages.AbstractPasteImportInsertInNattableManager_EnablementStatusForPasteInTheTable, axisName), null);
+ status.add(new Status(IStatus.OK, pluginId, NLS.bind(Messages.AbstractPasteImportInsertInNattableManager_TheTableHasAConfigurationToPaste, axisName)));
+ if (status.isOK()) {
+ final PasteEObjectConfiguration pasteConfiguration = (PasteEObjectConfiguration) conf;
+ final IAxis axisIdentifier = pasteConfiguration.getAxisIdentifier();
+
+ if (null != axisIdentifier) {
+ status.add(new Status(IStatus.OK, pluginId, Messages.AbstractPasteImportInsertInNattableManager_PasteConfigurationAxisIdentifierHasBeenSet)); // $NON-NLS-1$
+ } else {
+ status.add(new PapyrusNattableStatus(IPapyrusNattableStatus.PASTE_CONFIGURATiON_ERROR, pluginId, Messages.AbstractPasteImportInsertInNattableManager_PasteConfigurationAxisIdentifierHasNotBeenSet)); // $NON-NLS-1
+ }
+ }
+ }
+ return status;
+ }
+
+ /**
+ * This allows to check the table configuration for tree table.
+ *
+ * @param manager
+ * The nattable model manager.
+ * @return The status of the check.
+ */
+ protected IStatus checkTreeTableConfiguration(final INattableModelManager manager) {
+ IStatus status = Status.OK_STATUS;
+
+ // we check than there is only one categories by hidden depth
+ final List<Integer> hiddenCategories = StyleUtils.getHiddenDepths(manager);
+ for (final Integer current : hiddenCategories) {
+ final int size = FillingConfigurationUtils.getAllTreeFillingConfigurationForDepth(manager.getTable(), current.intValue()).size();
+ if (size > 1) {
+ status = new PapyrusNattableStatus(IPapyrusNattableStatus.PASTE_CONFIGURATiON_ERROR, Activator.PLUGIN_ID, PasteSeverityCode.PASTE_ERROR__MORE_THAN_ONE_CATEGORY_FOR_A_HIDDEN_DEPTH,
+ NLS.bind(Messages.AbstractPasteImportInsertInNattableManager_YouHaveMoreThan1Category, current.intValue()), null);
+ }
+ }
+
+ if (status.isOK()) {
+ for (final TreeFillingConfiguration current : FillingConfigurationUtils.getAllTreeFillingConfiguration(manager.getTable())) {
+ final PasteEObjectConfiguration conf = current.getPasteConfiguration();
+ if (conf == null) {
+ // TODO : add detail of the error in message
+ status = new PapyrusNattableStatus(IPapyrusNattableStatus.PASTE_CONFIGURATiON_ERROR, Activator.PLUGIN_ID, PasteSeverityCode.PASTE_ERROR__NO_PASTE_CONFIGURATION,
+ Messages.AbstractPasteImportInsertInNattableManager_ThereIsNoPasteConfgurationForATreeFillingConfiguration,
+ null);
+ } else {
+
+ final String elementTypeId = conf.getPastedElementId();
+ if (elementTypeId == null || elementTypeId.isEmpty()) {
+ status = new PapyrusNattableStatus(IPapyrusNattableStatus.PASTE_CONFIGURATiON_ERROR, Activator.PLUGIN_ID, PasteSeverityCode.PASTE_ERROR__NO_ELEMENT_TYPE_IN_PASTE_CONFIGURATION,
+ Messages.AbstractPasteImportInsertInNattableManager_ThereIsNoElementIdDefinedInThePasteConfiguration, null);
+ } else if (!ElementTypeUtils.getAllExistingElementTypesIds().contains(elementTypeId)) {
+ status = new PapyrusNattableStatus(IPapyrusNattableStatus.PASTE_CONFIGURATiON_ERROR, Activator.PLUGIN_ID, PasteSeverityCode.PASTE_ERROR__UNKNOWN_ELEMENT_TYPE,
+ String.format(Messages.AbstractPasteImportInsertInNattableManager_TheElementTypeIsUnknown, elementTypeId), null);
+ }
+
+
+ if (status.isOK()) {
+ final EStructuralFeature feature = conf.getPasteElementContainementFeature();
+ if (feature == null) {
+ final IAxis axis = current.getAxisUsedAsAxisProvider();
+ final NatTable natTable = manager.getAdapter(NatTable.class);
+ final LabelProviderContextElementWrapper wrapper = new LabelProviderContextElementWrapper();
+ wrapper.setObject(axis);
+ wrapper.setConfigRegistry(natTable.getConfigRegistry());
+ final LabelProviderService serv = natTable.getConfigRegistry().getConfigAttribute(NattableConfigAttributes.LABEL_PROVIDER_SERVICE_CONFIG_ATTRIBUTE, DisplayMode.NORMAL, NattableConfigAttributes.LABEL_PROVIDER_SERVICE_ID);
+ ILabelProvider p = serv.getLabelProvider(wrapper);
+ p = serv.getLabelProvider(Constants.HEADER_LABEL_PROVIDER_CONTEXT);
+ final String categoryName = p.getText(axis);
+ status = new PapyrusNattableStatus(IPapyrusNattableStatus.PASTE_CONFIGURATiON_ERROR, Activator.PLUGIN_ID, PasteSeverityCode.PASTE_ERROR__NO_CONTAINMENT_FEATURE,
+ String.format(Messages.AbstractPasteImportInsertInNattableManager_PasteConfigurationFeatureHasNotBeenSet, categoryName, current.getDepth()), null);
+ }
+ }
+ }
+ }
+ }
+
+ return status;
+ }
+
+ /**
+ * This allows to create the reader and returns it.
+ *
+ * @return
+ * a new reader
+ */
+ protected abstract Reader createReader();
+
+ /**
+ * This allows to create the data size.
+ *
+ * @return
+ * the size of the copied data
+ */
+ protected abstract long getDataSize();
+}
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/ImportAxisInNattableManager.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/ImportAxisAsInsertInNattableManager.java
index f142bfadd34..5bd71c3ec23 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/ImportAxisInNattableManager.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/ImportAxisAsInsertInNattableManager.java
@@ -1,74 +1,87 @@
-/*****************************************************************************
- * Copyright (c) 2014 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Patrick Tessier (CEA LIST) - Initial API and implementation
- /*****************************************************************************/
-package org.eclipse.papyrus.infra.nattable.manager;
-
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileReader;
-import java.io.Reader;
-
-import org.eclipse.papyrus.infra.nattable.Activator;
-import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
-import org.eclipse.papyrus.infra.nattable.utils.CSVPasteHelper;
-
-
-public class ImportAxisInNattableManager extends AbstractPasteImportInNattableManager {
-
- /**
- * the file to import
- */
- private File file;
-
- /**
- *
- * Constructor.
- *
- * @param tableManager
- * @param pasteHelper
- * @param fileToImport
- * @param useProgressMonitorDialog
- */
- public ImportAxisInNattableManager(INattableModelManager tableManager, CSVPasteHelper pasteHelper, final File fileToImport, boolean useProgressMonitorDialog) {
- super(tableManager, pasteHelper, useProgressMonitorDialog);
- this.file = fileToImport;
- }
-
- /**
- *
- * @see org.eclipse.papyrus.infra.nattable.manager.AbstractPasteImportInNattableManager#createReader()
- *
- * @return
- */
- @Override
- protected Reader createReader() {
- FileReader reader = null;
- try {
- reader = new FileReader(file);
- } catch (FileNotFoundException e) {
- Activator.log.error(e);
- }
- return reader;
- }
-
- /**
- *
- * @see org.eclipse.papyrus.infra.nattable.manager.AbstractPasteImportInNattableManager#getDataSize()
- *
- * @return
- */
- @Override
- protected long getDataSize() {
- return this.file.length();
- }
-
-}
+/*****************************************************************************
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 476618
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.nattable.manager;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.Reader;
+
+import org.eclipse.papyrus.infra.nattable.Activator;
+import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
+import org.eclipse.papyrus.infra.nattable.utils.CSVPasteHelper;
+import org.eclipse.papyrus.infra.nattable.utils.TableSelectionWrapper;
+
+/**
+ * This class allows to import axis from string (managed as a paste).
+ */
+public class ImportAxisAsInsertInNattableManager extends AbstractInsertImportInNattableManager {
+
+ /**
+ * the file to import
+ */
+ private File file;
+
+ /**
+ * Constructor.
+ *
+ * @param tableManager
+ * The table manager.
+ * @param pasteHelper
+ * The paste helper.
+ * @param fileToImport
+ * The file to import.
+ * @param useProgressMonitorDialog
+ * Boolean to determinate if a progress monitor must be used for the command.
+ * @param openDialog
+ * Boolean to determinate if the dialog must be opened during the process.
+ * @param preferredUserAction
+ * The preferred user action for the insert row action.
+ * @param tableSelectionWrapper
+ * The current selection in the table.
+ */
+ public ImportAxisAsInsertInNattableManager(final INattableModelManager tableManager, final CSVPasteHelper pasteHelper, final File fileToImport, final boolean useProgressMonitorDialog, final boolean openDialog, final int preferredUserAction,
+ final TableSelectionWrapper tableSelectionWrapper) {
+ super(tableManager, pasteHelper, useProgressMonitorDialog, openDialog, preferredUserAction, tableSelectionWrapper);
+ this.file = fileToImport;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.AbstractPasteImportInNattableManager#createReader()
+ */
+ @Override
+ protected Reader createReader() {
+ FileReader reader = null;
+ try {
+ reader = new FileReader(file);
+ } catch (FileNotFoundException e) {
+ Activator.log.error(e);
+ }
+ return reader;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.AbstractPasteImportInNattableManager#getDataSize()
+ */
+ @Override
+ protected long getDataSize() {
+ return this.file.length();
+ }
+
+}
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/ImportAxisAsPasteInNattableManager.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/ImportAxisAsPasteInNattableManager.java
new file mode 100644
index 00000000000..f9218a61164
--- /dev/null
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/ImportAxisAsPasteInNattableManager.java
@@ -0,0 +1,89 @@
+/*****************************************************************************
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 476618
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.nattable.manager;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.Reader;
+
+import org.eclipse.papyrus.infra.nattable.Activator;
+import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
+import org.eclipse.papyrus.infra.nattable.utils.CSVPasteHelper;
+import org.eclipse.papyrus.infra.nattable.utils.TableSelectionWrapper;
+
+/**
+ * This class allows to import axis from string (managed as a paste).
+ */
+public class ImportAxisAsPasteInNattableManager extends AbstractPasteImportInNattableManager {
+
+ /**
+ * the file to import
+ */
+ private File file;
+
+ /**
+ * Constructor.
+ *
+ * @param tableManager
+ * The table manager.
+ * @param pasteHelper
+ * The paste helper.
+ * @param fileToImport
+ * The file to import.
+ * @param useProgressMonitorDialog
+ * Boolean to determinate if a progress monitor must be used for the command.
+ * @param openDialog
+ * Boolean to determinate if the dialog must be opened during the process.
+ * @param preferredUserAction
+ * The preferred user action for the insert row action.
+ * @param tableSelectionWrapper
+ * The current selection in the table.
+ * @param isPasteWithOverwrite
+ * Boolean to determinate if this is a paste with overwrite.
+ */
+ public ImportAxisAsPasteInNattableManager(final INattableModelManager tableManager, final CSVPasteHelper pasteHelper, final File fileToImport, final boolean useProgressMonitorDialog, final boolean openDialog, final int preferredUserAction,
+ final TableSelectionWrapper tableSelectionWrapper, final boolean isPasteWithOverwrite) {
+ super(tableManager, pasteHelper, useProgressMonitorDialog, openDialog, preferredUserAction, tableSelectionWrapper, isPasteWithOverwrite);
+ this.file = fileToImport;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.AbstractPasteImportInNattableManager#createReader()
+ */
+ @Override
+ protected Reader createReader() {
+ FileReader reader = null;
+ try {
+ reader = new FileReader(file);
+ } catch (FileNotFoundException e) {
+ Activator.log.error(e);
+ }
+ return reader;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.AbstractPasteImportInNattableManager#getDataSize()
+ */
+ @Override
+ protected long getDataSize() {
+ return this.file.length();
+ }
+
+}
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/InsertInNattableManager.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/InsertInNattableManager.java
new file mode 100644
index 00000000000..1b6b2028fec
--- /dev/null
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/InsertInNattableManager.java
@@ -0,0 +1,98 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.nattable.manager;
+
+import java.io.Reader;
+import java.io.StringReader;
+
+import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
+import org.eclipse.papyrus.infra.nattable.utils.CSVPasteHelper;
+import org.eclipse.papyrus.infra.nattable.utils.TableSelectionWrapper;
+
+/**
+ * This class allows to insert axis from string.
+ */
+public class InsertInNattableManager extends AbstractInsertImportInNattableManager {
+
+ /**
+ * the text to paste
+ */
+ private final String pastedText;
+
+ /**
+ * Constructor.
+ *
+ * @param tableManager
+ * The nattable model manager.
+ * @param pasteHelper
+ * The paste helper.
+ * @param useProgressMonitorDialog
+ * Boolean to determinate if a progress monitor dialog must be used.
+ * @param openDialog
+ * Boolean to determinate if the dialog must be opened during the process.
+ * @param preferredUserAction
+ * The preferred user action for the insert row action.
+ * @param pastedText
+ * The text pasted.
+ */
+ public InsertInNattableManager(final INattableModelManager tableManager, final CSVPasteHelper pasteHelper, final boolean useProgressMonitorDialog, final boolean openDialog, final int preferredUserAction, final String pastedText) {
+ this(tableManager, pasteHelper, useProgressMonitorDialog, openDialog, preferredUserAction, null, pastedText);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param tableManager
+ * The nattable model manager.
+ * @param pasteHelper
+ * The paste helper.
+ * @param useProgressMonitorDialog
+ * Boolean to determinate if a progress monitor dialog must be used.
+ * @param openDialog
+ * Boolean to determinate if the dialog must be opened during the process.
+ * @param preferredUserAction
+ * The preferred user action for the insert row action.
+ * @param tableSelectionWrapper
+ * The current selection in the table.
+ * @param pastedText
+ * The text pasted.
+ */
+ public InsertInNattableManager(final INattableModelManager tableManager, final CSVPasteHelper pasteHelper, final boolean useProgressMonitorDialog, final boolean openDialog, final int preferredUserAction, final TableSelectionWrapper tableSelectionWrapper,
+ final String pastedText) {
+ super(tableManager, pasteHelper, useProgressMonitorDialog, openDialog, preferredUserAction, tableSelectionWrapper);
+ this.pastedText = pastedText;
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.AbstractPasteImportInNattableManager#createReader()
+ *
+ * @return
+ */
+ @Override
+ protected Reader createReader() {
+ return new StringReader(this.pastedText);
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.AbstractPasteImportInNattableManager#getDataSize()
+ *
+ * @return
+ */
+ @Override
+ protected long getDataSize() {
+ return this.pastedText.length();
+ }
+}
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/PasteAxisInNattableManager.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/PasteAxisInNattableManager.java
index 054bd535e88..cf531e33e0a 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/PasteAxisInNattableManager.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/PasteAxisInNattableManager.java
@@ -1,70 +1,126 @@
-/*****************************************************************************
- * Copyright (c) 2014 CEA LIST.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.infra.nattable.manager;
-
-import java.io.Reader;
-import java.io.StringReader;
-
-import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
-import org.eclipse.papyrus.infra.nattable.utils.CSVPasteHelper;
-
-/**
- *
- * This class allows to paste axis from string
- *
- */
-public class PasteAxisInNattableManager extends AbstractPasteImportInNattableManager {
-
- /**
- * the text to paste
- */
- private final String pastedText;
-
- /**
- *
- * Constructor.
- *
- * @param tableManager
- * @param pasteHelper
- * @param useProgressMonitorDialog
- * @param pastedText
- */
- public PasteAxisInNattableManager(final INattableModelManager tableManager, final CSVPasteHelper pasteHelper, final boolean useProgressMonitorDialog, final String pastedText) {
- super(tableManager, pasteHelper, useProgressMonitorDialog);
- this.pastedText = pastedText;
- }
-
- /**
- *
- * @see org.eclipse.papyrus.infra.nattable.manager.AbstractPasteImportInNattableManager#createReader()
- *
- * @return
- */
- @Override
- protected Reader createReader() {
- return new StringReader(this.pastedText);
- }
-
- /**
- *
- * @see org.eclipse.papyrus.infra.nattable.manager.AbstractPasteImportInNattableManager#getDataSize()
- *
- * @return
- */
- @Override
- protected long getDataSize() {
- return this.pastedText.length();
- }
-
-}
+/*****************************************************************************
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 476618
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.nattable.manager;
+
+import java.io.Reader;
+import java.io.StringReader;
+
+import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
+import org.eclipse.papyrus.infra.nattable.utils.CSVPasteHelper;
+import org.eclipse.papyrus.infra.nattable.utils.TableSelectionWrapper;
+
+/**
+ * This class allows to paste axis from string
+ */
+public class PasteAxisInNattableManager extends AbstractPasteImportInNattableManager {
+
+ /**
+ * the text to paste
+ */
+ private final String pastedText;
+
+ /**
+ * Constructor.
+ *
+ * @param tableManager
+ * The table manager.
+ * @param pasteHelper
+ * The paste helper.
+ * @param useProgressMonitorDialog
+ * Boolean to determinate if a progress monitor must be used for the command.
+ * @param openDialog
+ * Boolean to determinate if the dialog must be opened during the process.
+ * @param preferredUserAction
+ * The preferred user action for the insert row action.
+ * @param pastedText
+ * The text pasted.
+ */
+ public PasteAxisInNattableManager(final INattableModelManager tableManager, final CSVPasteHelper pasteHelper, final boolean useProgressMonitorDialog, final boolean openDialog, final int preferredUserAction, final String pastedText) {
+ this(tableManager, pasteHelper, useProgressMonitorDialog, openDialog, preferredUserAction, null, pastedText);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param tableManager
+ * The table manager.
+ * @param pasteHelper
+ * The paste helper.
+ * @param useProgressMonitorDialog
+ * Boolean to determinate if a progress monitor must be used for the command.
+ * @param openDialog
+ * Boolean to determinate if the dialog must be opened during the process.
+ * @param tableSelectionWrapper
+ * The selection as table selection wrapper.
+ * @param preferredUserAction
+ * The preferred user action for the insert row action.
+ * @param pastedText
+ * The text pasted.
+ */
+ public PasteAxisInNattableManager(final INattableModelManager tableManager, final CSVPasteHelper pasteHelper, final boolean useProgressMonitorDialog, final boolean openDialog, final int preferredUserAction,
+ final TableSelectionWrapper tableSelectionWrapper, final String pastedText) {
+ super(tableManager, pasteHelper, useProgressMonitorDialog, openDialog, preferredUserAction, tableSelectionWrapper);
+ this.pastedText = pastedText;
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param tableManager
+ * The table manager.
+ * @param pasteHelper
+ * The paste helper.
+ * @param useProgressMonitorDialog
+ * Boolean to determinate if a progress monitor must be used for the command.
+ * @param openDialog
+ * Boolean to determinate if the dialog must be opened during the process.
+ * @param tableSelectionWrapper
+ * The selection as table selection wrapper.
+ * @param preferredUserAction
+ * The preferred user action for the insert row action.
+ * @param pastedText
+ * The text pasted.
+ * @param isPasteWithOverwrite
+ * Boolean to determinate if this is a paste with overwrite.
+ */
+ public PasteAxisInNattableManager(final INattableModelManager tableManager, final CSVPasteHelper pasteHelper, final boolean useProgressMonitorDialog, final boolean openDialog, final int preferredUserAction,
+ final TableSelectionWrapper tableSelectionWrapper, final String pastedText, final boolean isPasteWithOverwrite) {
+ super(tableManager, pasteHelper, useProgressMonitorDialog, openDialog, preferredUserAction, tableSelectionWrapper, isPasteWithOverwrite);
+ this.pastedText = pastedText;
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.AbstractPasteImportInNattableManager#createReader()
+ *
+ * @return
+ */
+ @Override
+ protected Reader createReader() {
+ return new StringReader(this.pastedText);
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.AbstractPasteImportInNattableManager#getDataSize()
+ *
+ * @return
+ */
+ @Override
+ protected long getDataSize() {
+ return this.pastedText.length();
+ }
+
+}
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/axis/AbstractAxisManager.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/axis/AbstractAxisManager.java
index d8a673e9f62..b283bd3e7fe 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/axis/AbstractAxisManager.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/axis/AbstractAxisManager.java
@@ -285,6 +285,20 @@ public abstract class AbstractAxisManager implements IAxisManager {
public Command getAddAxisCommand(final TransactionalEditingDomain domain, final Collection<Object> objectToAdd) {
return null;
}
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.axis.IAxisManager#getAddAxisCommand(org.eclipse.emf.transaction.TransactionalEditingDomain, java.util.Collection, int)
+ *
+ * @param domain
+ * @param objectToAdd
+ * @param index
+ * @return
+ */
+ @Override
+ public Command getAddAxisCommand(final TransactionalEditingDomain domain, final Collection<Object> objectToAdd, final int index) {
+ return null;
+ }
/**
*
@@ -311,6 +325,20 @@ public abstract class AbstractAxisManager implements IAxisManager {
public Command getComplementaryAddAxisCommand(final TransactionalEditingDomain domain, final Collection<Object> objectToAdd) {
return null;
}
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.axis.IAxisManager#getComplementaryAddAxisCommand(org.eclipse.emf.transaction.TransactionalEditingDomain, java.util.Collection, int)
+ *
+ * @param domain
+ * @param objectToAdd
+ * @param index
+ * @return
+ */
+ @Override
+ public Command getComplementaryAddAxisCommand(final TransactionalEditingDomain domain, final Collection<Object> objectToAdd, final int index) {
+ return null;
+ }
/**
*
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/axis/CompositeAxisManager.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/axis/CompositeAxisManager.java
index 5c9641c1031..5b22c2adc45 100755
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/axis/CompositeAxisManager.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/axis/CompositeAxisManager.java
@@ -1,814 +1,863 @@
-/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.infra.nattable.manager.axis;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.Iterator;
-import java.util.List;
-import java.util.TreeMap;
-
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.common.command.CompoundCommand;
-import org.eclipse.emf.common.command.UnexecutableCommand;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.edit.command.MoveCommand;
-import org.eclipse.emf.edit.command.SetCommand;
-import org.eclipse.emf.transaction.RecordingCommand;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.emf.transaction.util.TransactionUtil;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.AbstractEditCommandRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest;
-import org.eclipse.nebula.widgets.nattable.config.IConfigRegistry;
-import org.eclipse.nebula.widgets.nattable.ui.NatEventData;
-import org.eclipse.papyrus.commands.wrappers.GMFtoEMFCommandWrapper;
-import org.eclipse.papyrus.infra.nattable.messages.Messages;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.IAxis;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.IdAxis;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AxisManagerRepresentation;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisprovider.AbstractAxisProvider;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisprovider.NattableaxisproviderPackage;
-import org.eclipse.papyrus.infra.nattable.utils.AxisComparator;
-import org.eclipse.papyrus.infra.nattable.utils.AxisUtils;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.infra.widgets.providers.CompoundFilteredRestrictedContentProvider;
-import org.eclipse.papyrus.infra.widgets.providers.IRestrictedContentProvider;
-
-/**
- * This axis manager allows to encapsulated others axis manager. It allows to manage the contents of the table.
- * When this contents is stored in the table metamodel, It is able to manage the Add/Remove and Move elements in the list of the displayed elements
- *
- * @author VL222926
- *
- */
-public class CompositeAxisManager extends AbstractAxisManager implements ICompositeAxisManager {
-
- /**
- * the id of this manager
- */
- @SuppressWarnings("unused")
- private static final String MANAGER_ID = "org.eclipse.papyrus.infra.nattable.composite.axis.manager"; //$NON-NLS-1$
-
- /**
- * the sub managers
- */
- protected List<IAxisManager> subManagers;
-
- /**
- * the comparator used to sort the axis
- */
- protected Comparator<Object> axisComparator;
-
- /**
- *
- * @param notification
- * the notification
- */
- @Override
- protected void axisManagerHasChanged(final Notification notification) {
- if (notification.isTouch()) {
- return;
- }
- final List<Object> newListValue = new ArrayList<Object>(this.managedObject);
- boolean needRefresh = false;
- int eventType = notification.getEventType();
- switch (eventType) {
- case Notification.ADD:
- final Object addedValue = notification.getNewValue();
- final int index = notification.getPosition();
-
- newListValue.add(index, addedValue);
- needRefresh = true;
- break;
- case Notification.ADD_MANY:
- final Collection<?> addedValues = (Collection<?>) notification.getNewValue();
- // final int lisIndex = notification.getPosition();
- newListValue.addAll(addedValues);
- needRefresh = true;
- break;
- case Notification.EVENT_TYPE_COUNT:
- break;
- case Notification.MOVE:
- final Object movedObject = notification.getNewValue();
- final int newPos = notification.getPosition();
- newListValue.remove(movedObject);
- newListValue.add(newPos, movedObject);
- needRefresh = true;
- break;
- case Notification.REMOVE:
- final Object removedObject = notification.getOldValue();
- newListValue.remove(removedObject);
- needRefresh = true;
- break;
- case Notification.REMOVE_MANY:
- final Collection<?> removedValues = (Collection<?>) notification.getOldValue();
- newListValue.removeAll(removedValues);
- needRefresh = true;
- break;
- case Notification.REMOVING_ADAPTER:
- break;
- case Notification.RESOLVE:
- break;
- case Notification.SET:
- break;
- case Notification.UNSET:
- break;
- // case Notification.NO_FEATURE_ID:
- // break;
- // case Notification.NO_INDEX:
- // break;
- default:
- break;
- }
- if (needRefresh) {
- this.managedObject.clear();
- this.managedObject.addAll(newListValue);
- newListValue.clear();
- getTableManager().updateAxisContents(getRepresentedContentProvider());
- }
-
- }
-
-
- /**
- * Initialize the list of the managed elements which are owned by the model
- */
- @Override
- protected void initializeManagedObjectList() {
- for (final IAxis current : getRepresentedContentProvider().getAxis()) {
- this.managedObject.add(current);
- }
- }
-
- /**
- *
- * @see org.eclipse.papyrus.infra.nattable.manager.axis.ICompositeAxisManager#setSubAxisManager(java.util.List)
- *
- * @param managers
- */
- @Override
- public void setSubAxisManager(final List<IAxisManager> managers) {
- this.subManagers = managers;
- updateAxisContents();
- }
-
- /**
- *
- * @see org.eclipse.papyrus.infra.nattable.manager.axis.AbstractAxisManager#dispose()
- *
- */
- @Override
- public void dispose() {
- for (final IAxisManager current : this.subManagers) {
- current.dispose();
- }
- this.subManagers.clear();
- super.dispose();
- }
-
-
- /**
- *
- * @see org.eclipse.papyrus.infra.nattable.manager.axis.AbstractAxisManager#canBeUsedAsRowManager()
- *
- * @return
- */
- @Override
- public boolean canBeUsedAsRowManager() {
- boolean answer = true;
- final Iterator<IAxisManager> iter = this.subManagers.iterator();
- while (iter.hasNext() && answer) {
- answer = iter.next().canBeUsedAsRowManager();
- }
- return answer;
- }
-
- /**
- *
- * @see org.eclipse.papyrus.infra.nattable.manager.axis.AbstractAxisManager#canBeUsedAsColumnManager()
- *
- * @return
- */
- @Override
- public boolean canBeUsedAsColumnManager() {
- boolean answer = true;
- final Iterator<IAxisManager> iter = this.subManagers.iterator();
- while (iter.hasNext() && answer) {
- answer = iter.next().canBeUsedAsColumnManager();
- }
- return answer;
- }
-
- @Override
- public boolean canCreateAxisElement(String elementId) {
- boolean canCreateAxisElement = false;
- for (IAxisManager manager : subManagers) {
- canCreateAxisElement |= manager.canCreateAxisElement(elementId);
- }
- return canCreateAxisElement;
- }
-
- /**
- *
- * @see org.eclipse.papyrus.infra.nattable.manager.axis.AbstractAxisManager#getAddAxisCommand(TransactionalEditingDomain, java.util.Collection)
- *
- * @param domain
- * @param objectToAdd
- * @return
- */
- @Override
- public Command getAddAxisCommand(final TransactionalEditingDomain domain, final Collection<Object> objectToAdd) {
- final CompoundCommand cmd = new CompoundCommand(Messages.CompositeAxisManager_AddAxisCommand);
- for (final IAxisManager current : this.subManagers) {
- final Command tmp = current.getAddAxisCommand(domain, objectToAdd);
- if (tmp != null) {
- cmd.append(tmp);
- }
- }
- if (cmd.isEmpty()) {
- return null;
- }
- return cmd;
- }
-
- /**
- *
- * @see org.eclipse.papyrus.infra.nattable.manager.axis.AbstractAxisManager#getComplementaryAddAxisCommand(TransactionalEditingDomain, java.util.Collection)
- *
- * @param domain
- * @param objectToAdd
- * @return
- */
- @Override
- public Command getComplementaryAddAxisCommand(final TransactionalEditingDomain domain, final Collection<Object> objectToAdd) {
- final CompoundCommand cmd = new CompoundCommand(Messages.CompositeAxisManager_AddAxisCommand);
- for (final IAxisManager current : this.subManagers) {
- final Command tmp = current.getComplementaryAddAxisCommand(domain, objectToAdd);
- if (tmp != null) {
- cmd.append(tmp);
- }
- }
- if (cmd.isEmpty()) {
- return null;
- }
- return cmd;
- }
-
- /**
- *
- * @see org.eclipse.papyrus.infra.nattable.manager.axis.ICompositeAxisManager#updateAxisContents()
- *
- */
- @Override
- public synchronized void updateAxisContents() {
- final List<Object> displayedElement = getElements();
- synchronized (displayedElement) {
- displayedElement.clear();
- displayedElement.addAll(this.managedObject);
- if (this.subManagers != null) {
- for (final IAxisManager current : this.subManagers) {
- if (current.isDynamic()) {
- displayedElement.addAll(current.getAllManagedAxis());
- }
- }
- }
- if (this.axisComparator != null) {
- Collections.sort(displayedElement, this.axisComparator);
- } else {
-
- }
- }
- }
-
-
- /**
- *
- * @see org.eclipse.papyrus.infra.nattable.manager.axis.AbstractAxisManager#isAllowedContents(java.lang.Object)
- *
- * @param object
- * @return
- */
- @Override
- public boolean isAllowedContents(Object object) {
- for (final IAxisManager current : this.subManagers) {
- if (current.isAllowedContents(object)) {
- return true;
- }
- }
- return false;
- }
-
- /**
- *
- * @see org.eclipse.papyrus.infra.nattable.manager.axis.AbstractAxisManager#canMoveAxis()
- *
- * @return
- */
- @Override
- public boolean canMoveAxis() {
- for (final IAxisManager current : this.subManagers) {
- if (!current.canMoveAxis() || current.isDynamic()) {
- return false;
- }
- }
- return true;
- }
-
- /**
- *
- * @see org.eclipse.papyrus.infra.nattable.manager.axis.AbstractAxisManager#sortAxisByName(boolean, org.eclipse.nebula.widgets.nattable.config.IConfigRegistry)
- *
- * @param inverted
- * @param configRegistry
- */
- @Override
- public void sortAxisByName(boolean alphabeticOrder, final IConfigRegistry configRegistry) {
- if (canMoveAxis()) {
- final List<IAxis> axis = new ArrayList<IAxis>(getRepresentedContentProvider().getAxis());
- Collections.sort(axis, new AxisComparator(alphabeticOrder, configRegistry));
- final TransactionalEditingDomain domain = TransactionUtil.getEditingDomain(getRepresentedContentProvider());
- final AbstractEditCommandRequest request = new SetRequest(domain, getRepresentedContentProvider(), NattableaxisproviderPackage.eINSTANCE.getAxisProvider_Axis(), axis);
- final IElementEditService provider = ElementEditServiceUtils.getCommandProvider(getRepresentedContentProvider());
- final ICommand cmd = provider.getEditCommand(request);
- domain.getCommandStack().execute(new GMFtoEMFCommandWrapper(cmd));
- }
- }
-
-
- /**
- *
- * @see org.eclipse.papyrus.infra.nattable.manager.axis.AbstractAxisManager#createPossibleAxisContentProvider(boolean)
- *
- * @param isRestricted
- * @return a contents provider for this axis or <code>null</code> if it is not allowed
- */
- @Override
- public IRestrictedContentProvider createPossibleAxisContentProvider(boolean isRestricted) {
-
- CompoundFilteredRestrictedContentProvider compoundContentProvider = null;
- for (final IAxisManager current : this.subManagers) {
- IRestrictedContentProvider contentProvider = current.createPossibleAxisContentProvider(isRestricted);
- if (contentProvider != null) {
- if (compoundContentProvider == null) {
- compoundContentProvider = new CompoundFilteredRestrictedContentProvider();
- }
- compoundContentProvider.add(contentProvider);
- }
- }
- return compoundContentProvider;
- }
-
- /**
- *
- * @see org.eclipse.papyrus.infra.nattable.manager.axis.AbstractAxisManager#getDestroyAxisCommand(TransactionalEditingDomain, java.util.Collection)
- *
- * @param domain
- * @param objectToDestroy
- * @return
- */
- @Override
- public Command getDestroyAxisCommand(TransactionalEditingDomain domain, Collection<Object> objectToDestroy) {
- final CompoundCommand cmd = new CompoundCommand(Messages.CompositeAxisManager_DestroyAxisCommand);
- for (final IAxisManager current : this.subManagers) {
- final Command tmp = current.getDestroyAxisCommand(domain, objectToDestroy);
- if (tmp != null) {
- cmd.append(tmp);
- }
- }
- if (cmd.isEmpty()) {
- return null;
- }
- return cmd;
- }
-
- /**
- *
- * @see org.eclipse.papyrus.infra.nattable.manager.axis.AbstractAxisManager#getAllManagedAxis()
- *
- * @return
- */
- @Override
- public List<Object> getAllManagedAxis() {
- initializeManagedObjectList();
- final List<Object> allExistingAxis = new ArrayList<Object>();
- for (IAxisManager manager : this.subManagers) {
- Collection<Object> managerPossibleElements = manager.getAllManagedAxis();
- if (managerPossibleElements != null) {
- allExistingAxis.addAll(managerPossibleElements);
- }
- }
- return allExistingAxis;
- }
-
- /**
- *
- * @param resolve
- * if <code>true</code> the path will be resolved
- * @return
- * a list with the managed objects
- */
- public List<Object> getAllManagedAxis(final boolean resolve) {
- final List<Object> allExistingAxis = new ArrayList<Object>();
- for (final IAxis current : getRepresentedContentProvider().getAxis()) {
- Object representedElement = AxisUtils.getRepresentedElement(current);
- if (resolve && current instanceof IdAxis) {
- representedElement = getResolvedPath((IdAxis) current);
- }
- allExistingAxis.add(representedElement);
- }
- for (IAxisManager manager : this.subManagers) {
- if (manager.isDynamic()) {
- final List<Object> managerPossibleElements = manager.getAllManagedAxis();
- if (managerPossibleElements != null) {
- allExistingAxis.addAll(managerPossibleElements);
- }
- }
- }
- return allExistingAxis;
- }
-
- /**
- *
- * @see org.eclipse.papyrus.infra.nattable.manager.axis.IAxisManager#isSlave()
- *
- * @return
- * <code>true</code> if one of the encapsulated manager is a slave
- */
- @Override
- public boolean isSlave() {
- for (final IAxisManager manager : this.subManagers) {
- if (manager.isSlave()) {
- return true;
- }
- }
- return false;
- }
-
-
- /**
- *
- * @see org.eclipse.papyrus.infra.nattable.manager.axis.IAxisManager#isDynamic()
- *
- * @return
- * <code>true</code> if one of the embedded axis manager is dynamic
- */
- @Override
- public boolean isDynamic() {
- for (final IAxisManager manager : this.subManagers) {
- if (manager.isDynamic()) {
- return true;
- }
- }
- return false;
- }
-
- /**
- *
- * @see org.eclipse.papyrus.infra.nattable.manager.axis.AbstractAxisManager#canDropAxisElement(java.util.Collection)
- *
- * @param objectsToAdd
- * @return
- */
- @Override
- public boolean canDropAxisElement(Collection<Object> objectsToAdd) {
- for (final IAxisManager current : this.subManagers) {
- if (current.canDropAxisElement(objectsToAdd)) {
- return true;
- }
- }
- return false;
- }
-
-
- /**
- *
- * @param elementToMove
- * @param newIndex
- * @see org.eclipse.papyrus.infra.nattable.manager.axis.IAxisManager#moveAxis(java.lang.Object, int)
- */
- @Override
- public void moveAxis(Object elementToMove, int newIndex) {
- if (!isDynamic() && elementToMove instanceof IAxis) {
- TransactionalEditingDomain domain = getTableEditingDomain();
- if (domain == null) {
- return;
- }
- final Command command = MoveCommand.create(domain, getRepresentedContentProvider(), NattableaxisproviderPackage.eINSTANCE.getAxisProvider_Axis(), elementToMove, newIndex);
- domain.getCommandStack().execute(command);
- }
- }
-
- @Override
- public boolean canEditAxisHeader(final NatEventData axisIndex) {
- axisIndex.getColumnPosition();// TODO
- if (canEditAxisHeader()) {// TODO
- return true;
- } else {
- return false;// TODO : we need to iterate on the contents to know if it is possible or not
- }
- }
-
- /**
- *
- * @see org.eclipse.papyrus.infra.nattable.manager.axis.AbstractAxisManager#canEditAxisHeader()
- *
- * @return
- */
- @Override
- public boolean canEditAxisHeader() {
- for (final IAxisManager current : this.subManagers) {
- if (!current.canEditAxisHeader()) {
- return false;
- }
- }
- return true;
- }
-
- /**
- *
- * @see org.eclipse.papyrus.infra.nattable.manager.axis.AbstractAxisManager#getElementAxisName(org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.IAxis)
- *
- * @param axis
- * @return
- */
- @Override
- public String getElementAxisName(final IAxis axis) {
- final AxisManagerRepresentation manager = axis.getManager();
- for (final IAxisManager man : this.subManagers) {
- if (man.getAxisManagerRepresentation() == manager) {
- return man.getElementAxisName(axis);
- }
- }
- if (canEditAxisHeader()) {
- return null;
- } else {
- throw new UnsupportedOperationException();
- }
- }
-
- /**
- *
- * @param axis
- * an axis
- * @return
- * the axis manager managing this axis
- *
- * @deprecated, use getSubAxisManagerFor
- */
- @Deprecated
- protected IAxisManager getAxisManager(final IAxis axis) {
- final AxisManagerRepresentation rep = axis.getManager();
- for (final IAxisManager man : this.subManagers) {
- if (man.getAxisManagerRepresentation() == rep) {
- return man;
- }
- }
- return null;// must be impossible
- }
-
- /**
- *
- * @param axis
- * an axis
- * @return
- * the axis manager managing this axis
- */
- @Override
- public IAxisManager getSubAxisManagerFor(final IAxis axis) {
- final AxisManagerRepresentation rep = axis.getManager();
- for (final IAxisManager man : this.subManagers) {
- if (man.getAxisManagerRepresentation() == rep) {
- return man;
- }
- }
- return null;// must be impossible
- }
-
- /**
- *
- * @see org.eclipse.papyrus.infra.nattable.manager.axis.AbstractAxisManager#canDestroyAxis(java.lang.Integer)
- *
- * @param axisPosition
- * @return
- */
- @Override
- public boolean canDestroyAxis(final Integer axisPosition) {
- final List<Object> elements = getElements();
- final Object element = elements.get(axisPosition);
- if (element instanceof IAxis) {
- return getSubAxisManagerFor((IAxis) element).canDestroyAxis(axisPosition);
- }
- // not yet managed
- return false;
- }
-
- /**
- *
- * @see org.eclipse.papyrus.infra.nattable.manager.axis.IAxisManager#canDestroyAxisElement(java.lang.Integer)
- *
- * @param axisPosition
- * @return
- */
- @Override
- public boolean canDestroyAxisElement(Integer axisPosition) {
- final List<Object> elements = getElements();
- final Object element = elements.get(axisPosition);
- if (element instanceof IAxis) {
- return getSubAxisManagerFor((IAxis) element).canDestroyAxisElement(axisPosition);
- } else if (subManagers.size() == 1) {
- return subManagers.get(0).canDestroyAxisElement(axisPosition);
- }
- // not yet managed
- return false;
- }
-
-
- /**
- *
- * @see org.eclipse.papyrus.infra.nattable.manager.axis.IAxisManager#getDestroyAxisElementCommand(TransactionalEditingDomain, java.lang.Integer)
- *
- * @param domain
- * @param axisPosition
- * @return
- */
- @Override
- public Command getDestroyAxisElementCommand(TransactionalEditingDomain domain, Integer axisPosition) {
- final List<Object> elements = getElements();
- final Object element = elements.get(axisPosition);
- if (element instanceof IAxis) {
- return getSubAxisManagerFor((IAxis) element).getDestroyAxisElementCommand(domain, axisPosition);
- } else if (subManagers.size() == 1) {
- return subManagers.get(0).getDestroyAxisElementCommand(domain, axisPosition);
- }
- // not yet managed
- return UnexecutableCommand.INSTANCE;
- }
-
- @Override
- public boolean canBeSavedAsConfig() {
- boolean canBeSavedAsConfig = true;
- for (IAxisManager manager : subManagers) {
- canBeSavedAsConfig &= manager.canBeSavedAsConfig();
- }
- return canBeSavedAsConfig;
- }
-
- /**
- *
- * @see org.eclipse.papyrus.infra.nattable.manager.axis.AbstractAxisManager#getAdapter(java.lang.Class)
- *
- * @param adapter
- * @return
- */
- @Override
- public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter) {
- for (final IAxisManager current : this.subManagers) {
- if (current.getClass() == adapter) {
- return current;
- }
- }
- return super.getAdapter(adapter);
- }
-
- /**
- *
- * @see org.eclipse.papyrus.infra.nattable.manager.axis.ICompositeAxisManager#isInSortedState()
- *
- * @return
- */
- @Override
- public boolean isInSortedState() {
- return this.axisComparator != null;
- }
-
- /**
- *
- * @see org.eclipse.papyrus.infra.nattable.manager.axis.ICompositeAxisManager#setAxisComparator(java.util.Comparator)
- *
- * @param comp
- */
- @Override
- public void setAxisComparator(final Comparator<Object> comp) {
- this.axisComparator = comp;
- if (this.axisComparator != null) {
- List<Object> displayedElement = getElements();
- synchronized (displayedElement) {
- Collections.sort(displayedElement, comp);
- getTableManager().refreshNatTable();// useful?
- }
- } else {
- getTableManager().updateAxisContents(getRepresentedContentProvider());
- }
- }
-
- /**
- *
- * @see org.eclipse.papyrus.infra.nattable.manager.axis.AbstractAxisManager#isAlreadyManaged(java.lang.Object)
- *
- * @param object
- * @return
- */
- @Override
- public boolean isAlreadyManaged(final Object object) {
- for (final IAxisManager current : this.subManagers) {
- if (current.isAlreadyManaged(object)) {
- return true;
- }
- }
- return false;
- }
-
- /**
- *
- * @see org.eclipse.papyrus.infra.nattable.manager.axis.ICompositeAxisManager#getSetNewAxisOrderCommand(java.util.List)
- *
- * @param newOrder
- * @return
- */
- @Override
- public Command getSetNewAxisOrderCommand(final List<Object> newOrder) {
- if (canMoveAxis() && !isDynamic()) {
- return new RecordingCommand(getTableEditingDomain()) {
-
- @Override
- protected void doExecute() {
- final TreeMap<Integer, IAxis> order = new TreeMap<Integer, IAxis>();
- final AbstractAxisProvider provider = getRepresentedContentProvider();
- for (int i = 0; i < provider.getAxis().size(); i++) {
- final IAxis currentAxis = provider.getAxis().get(i);
- int index = newOrder.indexOf(currentAxis);
- if (index != -1) {
- order.put(Integer.valueOf(index), currentAxis);
- } else {
- Object resolvedObject = AxisUtils.getRepresentedElement(currentAxis);
- if (currentAxis instanceof IdAxis) {
- resolvedObject = getResolvedPath((IdAxis) currentAxis);
- }
- index = newOrder.indexOf(resolvedObject);
- if (index == -1) {
- throw new IndexOutOfBoundsException("A reordered element can't be resolved"); //$NON-NLS-1$
- }
- order.put(Integer.valueOf(index), currentAxis);
- }
- }
-
- final List<IAxis> newValues = new ArrayList<IAxis>();
- newValues.addAll(order.values());
- SetCommand.create(getTableEditingDomain(), provider, NattableaxisproviderPackage.eINSTANCE.getAxisProvider_Axis(), newValues).execute();
- }
- };
- }
- return null;
- }
-
- /**
- *
- * @param axisManagerId
- * an axis
- * @return
- * the axis manager managing it
- */
- protected IAxisManager findAxisManager(final IAxis axis) {
- final String axisManagerId = axis.getManager().getAxisManagerId();
- for (final IAxisManager currentManager : this.subManagers) {
- if (currentManager.getAxisManagerRepresentation().getAxisManagerId().equals(axisManagerId)) {
- return currentManager;
- }
- }
- return null;
- }
-
- /**
- *
- * @param idAxis
- * an idAxis
- * @return
- * the resolved path or the {@link String} represented by the idAxis if the path can't be resolved
- */
- protected Object getResolvedPath(final IdAxis idAxis) {
- final String path = idAxis.getElement();
- final IAxisManager manager = findAxisManager(idAxis);
- if (manager instanceof IIdAxisManager) {
- final Object resolvedElement = ((IIdAxisManager) manager).resolvedPath(path);
- if (resolvedElement != null) {
- return resolvedElement;
- }
- }
- return path;
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.nattable.manager.axis;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.Iterator;
+import java.util.List;
+import java.util.TreeMap;
+
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.command.CompoundCommand;
+import org.eclipse.emf.common.command.UnexecutableCommand;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.edit.command.MoveCommand;
+import org.eclipse.emf.edit.command.SetCommand;
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.emf.transaction.util.TransactionUtil;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.AbstractEditCommandRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest;
+import org.eclipse.nebula.widgets.nattable.config.IConfigRegistry;
+import org.eclipse.nebula.widgets.nattable.ui.NatEventData;
+import org.eclipse.papyrus.commands.wrappers.GMFtoEMFCommandWrapper;
+import org.eclipse.papyrus.infra.nattable.messages.Messages;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.IAxis;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.IdAxis;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AxisManagerRepresentation;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisprovider.AbstractAxisProvider;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisprovider.NattableaxisproviderPackage;
+import org.eclipse.papyrus.infra.nattable.utils.AxisComparator;
+import org.eclipse.papyrus.infra.nattable.utils.AxisUtils;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.infra.widgets.providers.CompoundFilteredRestrictedContentProvider;
+import org.eclipse.papyrus.infra.widgets.providers.IRestrictedContentProvider;
+
+/**
+ * This axis manager allows to encapsulated others axis manager. It allows to manage the contents of the table.
+ * When this contents is stored in the table metamodel, It is able to manage the Add/Remove and Move elements in the list of the displayed elements
+ *
+ * @author VL222926
+ *
+ */
+public class CompositeAxisManager extends AbstractAxisManager implements ICompositeAxisManager {
+
+ /**
+ * the id of this manager
+ */
+ @SuppressWarnings("unused")
+ private static final String MANAGER_ID = "org.eclipse.papyrus.infra.nattable.composite.axis.manager"; //$NON-NLS-1$
+
+ /**
+ * the sub managers
+ */
+ protected List<IAxisManager> subManagers;
+
+ /**
+ * the comparator used to sort the axis
+ */
+ protected Comparator<Object> axisComparator;
+
+ /**
+ *
+ * @param notification
+ * the notification
+ */
+ @Override
+ protected void axisManagerHasChanged(final Notification notification) {
+ if (notification.isTouch()) {
+ return;
+ }
+ final List<Object> newListValue = new ArrayList<Object>(this.managedObject);
+ boolean needRefresh = false;
+ int eventType = notification.getEventType();
+ switch (eventType) {
+ case Notification.ADD:
+ final Object addedValue = notification.getNewValue();
+ final int index = notification.getPosition();
+
+ newListValue.add(index, addedValue);
+ needRefresh = true;
+ break;
+ case Notification.ADD_MANY:
+ final Collection<?> addedValues = (Collection<?>) notification.getNewValue();
+ final int listIndex = notification.getPosition();
+
+ newListValue.addAll(listIndex, addedValues);
+ needRefresh = true;
+ break;
+ case Notification.EVENT_TYPE_COUNT:
+ break;
+ case Notification.MOVE:
+ final Object movedObject = notification.getNewValue();
+ final int newPos = notification.getPosition();
+ newListValue.remove(movedObject);
+ newListValue.add(newPos, movedObject);
+ needRefresh = true;
+ break;
+ case Notification.REMOVE:
+ final Object removedObject = notification.getOldValue();
+ newListValue.remove(removedObject);
+ needRefresh = true;
+ break;
+ case Notification.REMOVE_MANY:
+ final Collection<?> removedValues = (Collection<?>) notification.getOldValue();
+ newListValue.removeAll(removedValues);
+ needRefresh = true;
+ break;
+ case Notification.REMOVING_ADAPTER:
+ break;
+ case Notification.RESOLVE:
+ break;
+ case Notification.SET:
+ break;
+ case Notification.UNSET:
+ break;
+ // case Notification.NO_FEATURE_ID:
+ // break;
+ // case Notification.NO_INDEX:
+ // break;
+ default:
+ break;
+ }
+ if (needRefresh) {
+ this.managedObject.clear();
+ this.managedObject.addAll(newListValue);
+ newListValue.clear();
+ getTableManager().updateAxisContents(getRepresentedContentProvider());
+ }
+
+ }
+
+
+ /**
+ * Initialize the list of the managed elements which are owned by the model
+ */
+ @Override
+ protected void initializeManagedObjectList() {
+ for (final IAxis current : getRepresentedContentProvider().getAxis()) {
+ this.managedObject.add(current);
+ }
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.axis.ICompositeAxisManager#setSubAxisManager(java.util.List)
+ *
+ * @param managers
+ */
+ @Override
+ public void setSubAxisManager(final List<IAxisManager> managers) {
+ this.subManagers = managers;
+ updateAxisContents();
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.axis.AbstractAxisManager#dispose()
+ *
+ */
+ @Override
+ public void dispose() {
+ for (final IAxisManager current : this.subManagers) {
+ current.dispose();
+ }
+ this.subManagers.clear();
+ super.dispose();
+ }
+
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.axis.AbstractAxisManager#canBeUsedAsRowManager()
+ *
+ * @return
+ */
+ @Override
+ public boolean canBeUsedAsRowManager() {
+ boolean answer = true;
+ final Iterator<IAxisManager> iter = this.subManagers.iterator();
+ while (iter.hasNext() && answer) {
+ answer = iter.next().canBeUsedAsRowManager();
+ }
+ return answer;
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.axis.AbstractAxisManager#canBeUsedAsColumnManager()
+ *
+ * @return
+ */
+ @Override
+ public boolean canBeUsedAsColumnManager() {
+ boolean answer = true;
+ final Iterator<IAxisManager> iter = this.subManagers.iterator();
+ while (iter.hasNext() && answer) {
+ answer = iter.next().canBeUsedAsColumnManager();
+ }
+ return answer;
+ }
+
+ @Override
+ public boolean canCreateAxisElement(String elementId) {
+ boolean canCreateAxisElement = false;
+ for (IAxisManager manager : subManagers) {
+ canCreateAxisElement |= manager.canCreateAxisElement(elementId);
+ }
+ return canCreateAxisElement;
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.axis.AbstractAxisManager#getAddAxisCommand(TransactionalEditingDomain, java.util.Collection)
+ *
+ * @param domain
+ * @param objectToAdd
+ * @return
+ */
+ @Override
+ public Command getAddAxisCommand(final TransactionalEditingDomain domain, final Collection<Object> objectToAdd) {
+ final CompoundCommand cmd = new CompoundCommand(Messages.CompositeAxisManager_AddAxisCommand);
+ for (final IAxisManager current : this.subManagers) {
+ final Command tmp = current.getAddAxisCommand(domain, objectToAdd);
+ if (tmp != null) {
+ cmd.append(tmp);
+ }
+ }
+ if (cmd.isEmpty()) {
+ return null;
+ }
+ return cmd;
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.axis.AbstractAxisManager#getAddAxisCommand(org.eclipse.emf.transaction.TransactionalEditingDomain, java.util.Collection, int)
+ *
+ * @param domain
+ * @param objectToAdd
+ * @param index
+ * @return
+ */
+ @Override
+ public Command getAddAxisCommand(final TransactionalEditingDomain domain, final Collection<Object> objectToAdd, final int index) {
+ final CompoundCommand cmd = new CompoundCommand(Messages.CompositeAxisManager_AddAxisCommand);
+ for (final IAxisManager current : this.subManagers) {
+ final Command tmp = current.getAddAxisCommand(domain, objectToAdd, index);
+ if (tmp != null) {
+ cmd.append(tmp);
+ }
+ }
+ if (cmd.isEmpty()) {
+ return null;
+ }
+ return cmd;
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.axis.AbstractAxisManager#getComplementaryAddAxisCommand(TransactionalEditingDomain, java.util.Collection)
+ *
+ * @param domain
+ * @param objectToAdd
+ * @return
+ */
+ @Override
+ public Command getComplementaryAddAxisCommand(final TransactionalEditingDomain domain, final Collection<Object> objectToAdd) {
+ final CompoundCommand cmd = new CompoundCommand(Messages.CompositeAxisManager_AddAxisCommand);
+ for (final IAxisManager current : this.subManagers) {
+ final Command tmp = current.getComplementaryAddAxisCommand(domain, objectToAdd);
+ if (tmp != null) {
+ cmd.append(tmp);
+ }
+ }
+ if (cmd.isEmpty()) {
+ return null;
+ }
+ return cmd;
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.axis.AbstractAxisManager#getComplementaryAddAxisCommand(org.eclipse.emf.transaction.TransactionalEditingDomain, java.util.Collection, int)
+ *
+ * @param domain
+ * @param objectToAdd
+ * @param index
+ * @return
+ */
+ @Override
+ public Command getComplementaryAddAxisCommand(final TransactionalEditingDomain domain, final Collection<Object> objectToAdd, final int index) {
+ final CompoundCommand cmd = new CompoundCommand(Messages.CompositeAxisManager_AddAxisCommand);
+ for (final IAxisManager current : this.subManagers) {
+ final Command tmp = current.getComplementaryAddAxisCommand(domain, objectToAdd, index);
+ if (tmp != null) {
+ cmd.append(tmp);
+ }
+ }
+ if (cmd.isEmpty()) {
+ return null;
+ }
+ return cmd;
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.axis.ICompositeAxisManager#updateAxisContents()
+ *
+ */
+ @Override
+ public synchronized void updateAxisContents() {
+ final List<Object> displayedElement = getElements();
+ synchronized (displayedElement) {
+ displayedElement.clear();
+ displayedElement.addAll(this.managedObject);
+ if (this.subManagers != null) {
+ for (final IAxisManager current : this.subManagers) {
+ if (current.isDynamic()) {
+ displayedElement.addAll(current.getAllManagedAxis());
+ }
+ }
+ }
+ if (this.axisComparator != null) {
+ Collections.sort(displayedElement, this.axisComparator);
+ } else {
+
+ }
+ }
+ }
+
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.axis.AbstractAxisManager#isAllowedContents(java.lang.Object)
+ *
+ * @param object
+ * @return
+ */
+ @Override
+ public boolean isAllowedContents(Object object) {
+ for (final IAxisManager current : this.subManagers) {
+ if (current.isAllowedContents(object)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.axis.AbstractAxisManager#canMoveAxis()
+ *
+ * @return
+ */
+ @Override
+ public boolean canMoveAxis() {
+ for (final IAxisManager current : this.subManagers) {
+ if (!current.canMoveAxis() || current.isDynamic()) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.axis.AbstractAxisManager#sortAxisByName(boolean, org.eclipse.nebula.widgets.nattable.config.IConfigRegistry)
+ *
+ * @param inverted
+ * @param configRegistry
+ */
+ @Override
+ public void sortAxisByName(boolean alphabeticOrder, final IConfigRegistry configRegistry) {
+ if (canMoveAxis()) {
+ final List<IAxis> axis = new ArrayList<IAxis>(getRepresentedContentProvider().getAxis());
+ Collections.sort(axis, new AxisComparator(alphabeticOrder, configRegistry));
+ final TransactionalEditingDomain domain = TransactionUtil.getEditingDomain(getRepresentedContentProvider());
+ final AbstractEditCommandRequest request = new SetRequest(domain, getRepresentedContentProvider(), NattableaxisproviderPackage.eINSTANCE.getAxisProvider_Axis(), axis);
+ final IElementEditService provider = ElementEditServiceUtils.getCommandProvider(getRepresentedContentProvider());
+ final ICommand cmd = provider.getEditCommand(request);
+ domain.getCommandStack().execute(new GMFtoEMFCommandWrapper(cmd));
+ }
+ }
+
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.axis.AbstractAxisManager#createPossibleAxisContentProvider(boolean)
+ *
+ * @param isRestricted
+ * @return a contents provider for this axis or <code>null</code> if it is not allowed
+ */
+ @Override
+ public IRestrictedContentProvider createPossibleAxisContentProvider(boolean isRestricted) {
+
+ CompoundFilteredRestrictedContentProvider compoundContentProvider = null;
+ for (final IAxisManager current : this.subManagers) {
+ IRestrictedContentProvider contentProvider = current.createPossibleAxisContentProvider(isRestricted);
+ if (contentProvider != null) {
+ if (compoundContentProvider == null) {
+ compoundContentProvider = new CompoundFilteredRestrictedContentProvider();
+ }
+ compoundContentProvider.add(contentProvider);
+ }
+ }
+ return compoundContentProvider;
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.axis.AbstractAxisManager#getDestroyAxisCommand(TransactionalEditingDomain, java.util.Collection)
+ *
+ * @param domain
+ * @param objectToDestroy
+ * @return
+ */
+ @Override
+ public Command getDestroyAxisCommand(TransactionalEditingDomain domain, Collection<Object> objectToDestroy) {
+ final CompoundCommand cmd = new CompoundCommand(Messages.CompositeAxisManager_DestroyAxisCommand);
+ for (final IAxisManager current : this.subManagers) {
+ final Command tmp = current.getDestroyAxisCommand(domain, objectToDestroy);
+ if (tmp != null) {
+ cmd.append(tmp);
+ }
+ }
+ if (cmd.isEmpty()) {
+ return null;
+ }
+ return cmd;
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.axis.AbstractAxisManager#getAllManagedAxis()
+ *
+ * @return
+ */
+ @Override
+ public List<Object> getAllManagedAxis() {
+ initializeManagedObjectList();
+ final List<Object> allExistingAxis = new ArrayList<Object>();
+ for (IAxisManager manager : this.subManagers) {
+ Collection<Object> managerPossibleElements = manager.getAllManagedAxis();
+ if (managerPossibleElements != null) {
+ allExistingAxis.addAll(managerPossibleElements);
+ }
+ }
+ return allExistingAxis;
+ }
+
+ /**
+ *
+ * @param resolve
+ * if <code>true</code> the path will be resolved
+ * @return
+ * a list with the managed objects
+ */
+ public List<Object> getAllManagedAxis(final boolean resolve) {
+ final List<Object> allExistingAxis = new ArrayList<Object>();
+ for (final IAxis current : getRepresentedContentProvider().getAxis()) {
+ Object representedElement = AxisUtils.getRepresentedElement(current);
+ if (resolve && current instanceof IdAxis) {
+ representedElement = getResolvedPath((IdAxis) current);
+ }
+ allExistingAxis.add(representedElement);
+ }
+ for (IAxisManager manager : this.subManagers) {
+ if (manager.isDynamic()) {
+ final List<Object> managerPossibleElements = manager.getAllManagedAxis();
+ if (managerPossibleElements != null) {
+ allExistingAxis.addAll(managerPossibleElements);
+ }
+ }
+ }
+ return allExistingAxis;
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.axis.IAxisManager#isSlave()
+ *
+ * @return
+ * <code>true</code> if one of the encapsulated manager is a slave
+ */
+ @Override
+ public boolean isSlave() {
+ for (final IAxisManager manager : this.subManagers) {
+ if (manager.isSlave()) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.axis.IAxisManager#isDynamic()
+ *
+ * @return
+ * <code>true</code> if one of the embedded axis manager is dynamic
+ */
+ @Override
+ public boolean isDynamic() {
+ for (final IAxisManager manager : this.subManagers) {
+ if (manager.isDynamic()) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.axis.AbstractAxisManager#canDropAxisElement(java.util.Collection)
+ *
+ * @param objectsToAdd
+ * @return
+ */
+ @Override
+ public boolean canDropAxisElement(Collection<Object> objectsToAdd) {
+ for (final IAxisManager current : this.subManagers) {
+ if (current.canDropAxisElement(objectsToAdd)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+
+ /**
+ *
+ * @param elementToMove
+ * @param newIndex
+ * @see org.eclipse.papyrus.infra.nattable.manager.axis.IAxisManager#moveAxis(java.lang.Object, int)
+ */
+ @Override
+ public void moveAxis(Object elementToMove, int newIndex) {
+ if (!isDynamic() && elementToMove instanceof IAxis) {
+ TransactionalEditingDomain domain = getTableEditingDomain();
+ if (domain == null) {
+ return;
+ }
+ final Command command = MoveCommand.create(domain, getRepresentedContentProvider(), NattableaxisproviderPackage.eINSTANCE.getAxisProvider_Axis(), elementToMove, newIndex);
+ domain.getCommandStack().execute(command);
+ }
+ }
+
+ @Override
+ public boolean canEditAxisHeader(final NatEventData axisIndex) {
+ axisIndex.getColumnPosition();// TODO
+ if (canEditAxisHeader()) {// TODO
+ return true;
+ } else {
+ return false;// TODO : we need to iterate on the contents to know if it is possible or not
+ }
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.axis.AbstractAxisManager#canEditAxisHeader()
+ *
+ * @return
+ */
+ @Override
+ public boolean canEditAxisHeader() {
+ for (final IAxisManager current : this.subManagers) {
+ if (!current.canEditAxisHeader()) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.axis.AbstractAxisManager#getElementAxisName(org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.IAxis)
+ *
+ * @param axis
+ * @return
+ */
+ @Override
+ public String getElementAxisName(final IAxis axis) {
+ final AxisManagerRepresentation manager = axis.getManager();
+ for (final IAxisManager man : this.subManagers) {
+ if (man.getAxisManagerRepresentation() == manager) {
+ return man.getElementAxisName(axis);
+ }
+ }
+ if (canEditAxisHeader()) {
+ return null;
+ } else {
+ throw new UnsupportedOperationException();
+ }
+ }
+
+ /**
+ *
+ * @param axis
+ * an axis
+ * @return
+ * the axis manager managing this axis
+ *
+ * @deprecated, use getSubAxisManagerFor
+ */
+ @Deprecated
+ protected IAxisManager getAxisManager(final IAxis axis) {
+ final AxisManagerRepresentation rep = axis.getManager();
+ for (final IAxisManager man : this.subManagers) {
+ if (man.getAxisManagerRepresentation() == rep) {
+ return man;
+ }
+ }
+ return null;// must be impossible
+ }
+
+ /**
+ *
+ * @param axis
+ * an axis
+ * @return
+ * the axis manager managing this axis
+ */
+ @Override
+ public IAxisManager getSubAxisManagerFor(final IAxis axis) {
+ final AxisManagerRepresentation rep = axis.getManager();
+ for (final IAxisManager man : this.subManagers) {
+ if (man.getAxisManagerRepresentation() == rep) {
+ return man;
+ }
+ }
+ return null;// must be impossible
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.axis.AbstractAxisManager#canDestroyAxis(java.lang.Integer)
+ *
+ * @param axisPosition
+ * @return
+ */
+ @Override
+ public boolean canDestroyAxis(final Integer axisPosition) {
+ final List<Object> elements = getElements();
+ final Object element = elements.get(axisPosition);
+ if (element instanceof IAxis) {
+ return getSubAxisManagerFor((IAxis) element).canDestroyAxis(axisPosition);
+ }
+ // not yet managed
+ return false;
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.axis.IAxisManager#canDestroyAxisElement(java.lang.Integer)
+ *
+ * @param axisPosition
+ * @return
+ */
+ @Override
+ public boolean canDestroyAxisElement(Integer axisPosition) {
+ final List<Object> elements = getElements();
+ final Object element = elements.get(axisPosition);
+ if (element instanceof IAxis) {
+ return getSubAxisManagerFor((IAxis) element).canDestroyAxisElement(axisPosition);
+ } else if (subManagers.size() == 1) {
+ return subManagers.get(0).canDestroyAxisElement(axisPosition);
+ }
+ // not yet managed
+ return false;
+ }
+
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.axis.IAxisManager#getDestroyAxisElementCommand(TransactionalEditingDomain, java.lang.Integer)
+ *
+ * @param domain
+ * @param axisPosition
+ * @return
+ */
+ @Override
+ public Command getDestroyAxisElementCommand(TransactionalEditingDomain domain, Integer axisPosition) {
+ final List<Object> elements = getElements();
+ final Object element = elements.get(axisPosition);
+ if (element instanceof IAxis) {
+ return getSubAxisManagerFor((IAxis) element).getDestroyAxisElementCommand(domain, axisPosition);
+ } else if (subManagers.size() == 1) {
+ return subManagers.get(0).getDestroyAxisElementCommand(domain, axisPosition);
+ }
+ // not yet managed
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ @Override
+ public boolean canBeSavedAsConfig() {
+ boolean canBeSavedAsConfig = true;
+ for (IAxisManager manager : subManagers) {
+ canBeSavedAsConfig &= manager.canBeSavedAsConfig();
+ }
+ return canBeSavedAsConfig;
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.axis.AbstractAxisManager#getAdapter(java.lang.Class)
+ *
+ * @param adapter
+ * @return
+ */
+ @Override
+ public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter) {
+ for (final IAxisManager current : this.subManagers) {
+ if (current.getClass() == adapter) {
+ return current;
+ }
+ }
+ return super.getAdapter(adapter);
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.axis.ICompositeAxisManager#isInSortedState()
+ *
+ * @return
+ */
+ @Override
+ public boolean isInSortedState() {
+ return this.axisComparator != null;
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.axis.ICompositeAxisManager#setAxisComparator(java.util.Comparator)
+ *
+ * @param comp
+ */
+ @Override
+ public void setAxisComparator(final Comparator<Object> comp) {
+ this.axisComparator = comp;
+ if (this.axisComparator != null) {
+ List<Object> displayedElement = getElements();
+ synchronized (displayedElement) {
+ Collections.sort(displayedElement, comp);
+ getTableManager().refreshNatTable();// useful?
+ }
+ } else {
+ getTableManager().updateAxisContents(getRepresentedContentProvider());
+ }
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.axis.AbstractAxisManager#isAlreadyManaged(java.lang.Object)
+ *
+ * @param object
+ * @return
+ */
+ @Override
+ public boolean isAlreadyManaged(final Object object) {
+ for (final IAxisManager current : this.subManagers) {
+ if (current.isAlreadyManaged(object)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.axis.ICompositeAxisManager#getSetNewAxisOrderCommand(java.util.List)
+ *
+ * @param newOrder
+ * @return
+ */
+ @Override
+ public Command getSetNewAxisOrderCommand(final List<Object> newOrder) {
+ if (canMoveAxis() && !isDynamic()) {
+ return new RecordingCommand(getTableEditingDomain()) {
+
+ @Override
+ protected void doExecute() {
+ final TreeMap<Integer, IAxis> order = new TreeMap<Integer, IAxis>();
+ final AbstractAxisProvider provider = getRepresentedContentProvider();
+ for (int i = 0; i < provider.getAxis().size(); i++) {
+ final IAxis currentAxis = provider.getAxis().get(i);
+ int index = newOrder.indexOf(currentAxis);
+ if (index != -1) {
+ order.put(Integer.valueOf(index), currentAxis);
+ } else {
+ Object resolvedObject = AxisUtils.getRepresentedElement(currentAxis);
+ if (currentAxis instanceof IdAxis) {
+ resolvedObject = getResolvedPath((IdAxis) currentAxis);
+ }
+ index = newOrder.indexOf(resolvedObject);
+ if (index == -1) {
+ throw new IndexOutOfBoundsException("A reordered element can't be resolved"); //$NON-NLS-1$
+ }
+ order.put(Integer.valueOf(index), currentAxis);
+ }
+ }
+
+ final List<IAxis> newValues = new ArrayList<IAxis>();
+ newValues.addAll(order.values());
+ SetCommand.create(getTableEditingDomain(), provider, NattableaxisproviderPackage.eINSTANCE.getAxisProvider_Axis(), newValues).execute();
+ }
+ };
+ }
+ return null;
+ }
+
+ /**
+ *
+ * @param axisManagerId
+ * an axis
+ * @return
+ * the axis manager managing it
+ */
+ protected IAxisManager findAxisManager(final IAxis axis) {
+ final String axisManagerId = axis.getManager().getAxisManagerId();
+ for (final IAxisManager currentManager : this.subManagers) {
+ if (currentManager.getAxisManagerRepresentation().getAxisManagerId().equals(axisManagerId)) {
+ return currentManager;
+ }
+ }
+ return null;
+ }
+
+ /**
+ *
+ * @param idAxis
+ * an idAxis
+ * @return
+ * the resolved path or the {@link String} represented by the idAxis if the path can't be resolved
+ */
+ protected Object getResolvedPath(final IdAxis idAxis) {
+ final String path = idAxis.getElement();
+ final IAxisManager manager = findAxisManager(idAxis);
+ if (manager instanceof IIdAxisManager) {
+ final Object resolvedElement = ((IIdAxisManager) manager).resolvedPath(path);
+ if (resolvedElement != null) {
+ return resolvedElement;
+ }
+ }
+ return path;
+ }
+}
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/axis/CompositeAxisManagerForEventList.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/axis/CompositeAxisManagerForEventList.java
index 22d1a5c573d..4f6f41c9a75 100755
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/axis/CompositeAxisManagerForEventList.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/axis/CompositeAxisManagerForEventList.java
@@ -247,6 +247,33 @@ public class CompositeAxisManagerForEventList extends AbstractAxisManagerForEven
}
return cmd;
}
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.axis.AbstractAxisManager#getAddAxisCommand(org.eclipse.emf.transaction.TransactionalEditingDomain, java.util.Collection, int)
+ *
+ * @param domain
+ * @param objectToAdd
+ * @param index
+ * @return
+ */
+ @Override
+ public Command getAddAxisCommand(final TransactionalEditingDomain domain, final Collection<Object> objectToAdd, final int index) {
+ if (FillingConfigurationUtils.hasTreeFillingConfigurationForDepth(this.tableManager.getTable(), 0)) {
+ return null;
+ }
+ final CompoundCommand cmd = new CompoundCommand(Messages.CompositeAxisManager_AddAxisCommand);
+ for (final IAxisManager current : this.subManagers) {
+ final Command tmp = current.getAddAxisCommand(domain, objectToAdd, index);
+ if (tmp != null) {
+ cmd.append(tmp);
+ }
+ }
+ if (cmd.isEmpty()) {
+ return null;
+ }
+ return cmd;
+ }
/**
* @see org.eclipse.papyrus.infra.nattable.manager.axis.AbstractAxisManagerForEventList#initializeManagedObjectList()
@@ -279,6 +306,30 @@ public class CompositeAxisManagerForEventList extends AbstractAxisManagerForEven
}
return cmd;
}
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.axis.AbstractAxisManager#getComplementaryAddAxisCommand(org.eclipse.emf.transaction.TransactionalEditingDomain, java.util.Collection, int)
+ *
+ * @param domain
+ * @param objectToAdd
+ * @param index
+ * @return
+ */
+ @Override
+ public Command getComplementaryAddAxisCommand(final TransactionalEditingDomain domain, final Collection<Object> objectToAdd, final int index) {
+ final CompoundCommand cmd = new CompoundCommand(Messages.CompositeAxisManager_AddAxisCommand);
+ for (final IAxisManager current : this.subManagers) {
+ final Command tmp = current.getComplementaryAddAxisCommand(domain, objectToAdd, index);
+ if (tmp != null) {
+ cmd.append(tmp);
+ }
+ }
+ if (cmd.isEmpty()) {
+ return null;
+ }
+ return cmd;
+ }
/**
*
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/axis/IAxisManager.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/axis/IAxisManager.java
index f31bed25e03..8f08cc4a58d 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/axis/IAxisManager.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/axis/IAxisManager.java
@@ -1,295 +1,320 @@
-/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.infra.nattable.manager.axis;
-
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.nebula.widgets.nattable.ui.NatEventData;
-import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
-import org.eclipse.papyrus.infra.nattable.manager.table.NattableModelManager;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.IAxis;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AxisManagerRepresentation;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisprovider.AbstractAxisProvider;
-import org.eclipse.papyrus.infra.widgets.providers.IRestrictedContentProvider;
-import org.eclipse.ui.services.IDisposable;
-
-/**
- * The common interface used by the axis manager
- *
- * @author Vincent Lorenzo
- *
- */
-public interface IAxisManager extends IDisposable, IAdaptable {
-
- /**
- *
- * @return <code>true</code> if the manager can be used horizontally
- */
- public boolean canBeUsedAsRowManager();
-
- /**
- *
- * @return <code>true</code> if the manager can be used vertically
- */
- public boolean canBeUsedAsColumnManager();
-
- /**
- *
- * @param domain
- * the editing domain
- * @param objectToAdd
- * the object to add
- * @return the command to add an axis to the emf model
- */
- public Command getAddAxisCommand(final TransactionalEditingDomain domain, final Collection<Object> objectToAdd);
-
- /**
- *
- * @param domain
- * the editing domain
- * @param objectToAdd
- * the object to add
- * @return the complementary command, which is called by the master on the
- * slave to add required axis
- */
- public Command getComplementaryAddAxisCommand(final TransactionalEditingDomain domain, final Collection<Object> objectToAdd);
-
- /**
- *
- * @param manager
- * the table model manager
- * @param managerRep
- * its axis manager representation
- * @param provider
- * the managed axis provider
- */
- public void init(final INattableModelManager manager, AxisManagerRepresentation managerRep, final AbstractAxisProvider provider);
-
- public void setHeaderDataValue(int columnIndex, int rowIndex, Object newValue);
-
- /**
- *
- * @return
- * the managed axis provider
- */
- public AbstractAxisProvider getRepresentedContentProvider();
-
- /**
- *
- *
- * @return
- * the table manager using this axis manager
- */
- public NattableModelManager getTableManager();
-
-
-
- /**
- *
- * @return
- * <code>true</code> if the contents provided by the axis manager is derived of the contents provided by the others axis manager
- */
- public boolean isSlave();
-
- public boolean canInsertAxis(Collection<Object> objectsToAdd, int index);
-
- public boolean canDropAxisElement(Collection<Object> objectsToAdd);
-
- public Command getInsertAxisCommand(Collection<Object> objectsToAdd, int index);
-
- /**
- *
- * @param object
- * an object
- * @return
- * <code>true</code> if the object can be managed by the AxisManager
- */
- public boolean isAllowedContents(final Object object);
-
- /**
- *
- * @return <code>true</code> if we can move elements on the axis
- */
- public boolean canMoveAxis();
-
- /**
- *
- * @param isRestricted
- * @return
- * a content provider or <code>null</code> if the dialog to add/destroy axis is not supported
- */
- public IRestrictedContentProvider createPossibleAxisContentProvider(boolean isRestricted);
-
-
- /**
- *
- * @param domain
- * @param objectToDestroy
- * @return
- */
- public Command getDestroyAxisCommand(TransactionalEditingDomain domain, Collection<Object> objectToDestroy);
-
- /**
- *
- * @return
- * the list of the existing axis managed by the axis manager
- */
- public List<Object> getAllManagedAxis();
-
- /**
- *
- * @return
- * <code>true</code> if the contents provided by this axis manager is derived of the (UML) model
- */
- public boolean isDynamic();
-
- /**
- *
- * @param newIndex
- * @param axisToMove
- */
- public void moveAxis(final Object elementToMove, final int newIndex);
-
- /**
- *
- * @param elementId
- * the id of the element to create
- * @return
- * <code>true</code> if the element can be created
- */
- public boolean canCreateAxisElement(final String elementId);
-
- /**
- *
- * @return
- * <code>true</code> if we allows to edit the string of all axis headers.
- */
- public boolean canEditAxisHeader();
-
- /**
- * Open a dialog to edit the alias of an axis and set the value
- *
- * @param event
- * the event
- * @param axisIndex
- * the position of the axis
- */
- public void openEditAxisAliasDialog(final NatEventData event, int axisIndex);
-
- /**
- *
- * @return
- * the axis manager representation
- */
- public AxisManagerRepresentation getAxisManagerRepresentation();
-
- /**
- *
- * @param axis
- * an axis
- * @return
- * the name used for this axis
- */
- public String getElementAxisName(final IAxis axis);// TODO pb if the axisManager returns Object and not IAxis... -> use the index!
-
- /**
- *
- * @param axisIndex
- * axis index
- * @return
- * <code>true</code> if ALL axis identified by the axisIndex can be destroyed
- */
- public boolean canDestroyAxis(final List<Integer> axisIndex);
-
- /**
- *
- * @param axisIndex
- * @return
- * <code>true</code> if the axis identified by the axisIndex can be destroyed
- */
- public boolean canDestroyAxis(final Integer axisIndex);
-
- /**
- * Destroy all axis represented by their index
- *
- * @param axisIndex
- * a list of axis index
- */
- public void destroyAxis(final List<Integer> axisIndex);
-
- /**
- *
- * @param axisIndex
- * a list of axis index
- * @return
- * <code>true</code> if ALL elements represented by the axis located to these index can be destroyed
- */
- public boolean canDestroyAxisElement(final List<Integer> axisIndex);
-
- /**
- *
- * @param axisIndex
- * the index of an element
- * @return
- * <code>true</code> if we can destroy the element represented by the axis located to this index
- */
- public boolean canDestroyAxisElement(final Integer axisIndex);
-
- /**
- *
- * @param axisIndex
- * the list of the index of the elements to destroy
- */
- public void destroyAxisElement(final List<Integer> axisIndex);
-
- /**
- *
- * @param domain
- * @param axisPosition
- * @return
- */
- public Command getDestroyAxisElementCommand(final TransactionalEditingDomain domain, final Integer axisPosition);
-
- /**
- * An axis provider determines if it can be saved as a configuration for later retrieval or not. It makes sense to save configurations of
- * EStructuralFeatures (read-only) and Stereotype properties (read-only), but not those of EObjects which are not read-only.
- *
- *
- *
- * @return
- */
- public boolean canBeSavedAsConfig();
-
- /**
- *
- * @return
- * <code>true</code> if the axis manager is currently used as Column Manager (managing the invert axis)
- */
- public boolean isUsedAsColumnManager();
-
- /**
- *
- * @param object
- * an object
- * @return
- * <code>true</code> if the object is already managed by the axis manager
- */
- public boolean isAlreadyManaged(Object object);
-
-
-}
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.nattable.manager.axis;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.nebula.widgets.nattable.ui.NatEventData;
+import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
+import org.eclipse.papyrus.infra.nattable.manager.table.NattableModelManager;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.IAxis;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AxisManagerRepresentation;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisprovider.AbstractAxisProvider;
+import org.eclipse.papyrus.infra.widgets.providers.IRestrictedContentProvider;
+import org.eclipse.ui.services.IDisposable;
+
+/**
+ * The common interface used by the axis manager
+ *
+ * @author Vincent Lorenzo
+ *
+ */
+public interface IAxisManager extends IDisposable, IAdaptable {
+
+ /**
+ *
+ * @return <code>true</code> if the manager can be used horizontally
+ */
+ public boolean canBeUsedAsRowManager();
+
+ /**
+ *
+ * @return <code>true</code> if the manager can be used vertically
+ */
+ public boolean canBeUsedAsColumnManager();
+
+ /**
+ *
+ * @param domain
+ * the editing domain
+ * @param objectToAdd
+ * the object to add
+ * @return the command to add an axis to the emf model
+ */
+ public Command getAddAxisCommand(final TransactionalEditingDomain domain, final Collection<Object> objectToAdd);
+
+ /**
+ *
+ * @param domain
+ * the editing domain
+ * @param objectToAdd
+ * the object to add
+ * @return the complementary command, which is called by the master on the
+ * slave to add required axis
+ */
+ public Command getComplementaryAddAxisCommand(final TransactionalEditingDomain domain, final Collection<Object> objectToAdd);
+
+ /**
+ *
+ * @param domain
+ * the editing domain
+ * @param objectToAdd
+ * the object to add
+ * @param index
+ * the index where add the objects
+ * @return the command to add an axis to the emf model
+ */
+ public Command getAddAxisCommand(final TransactionalEditingDomain domain, final Collection<Object> objectToAdd, final int index);
+
+ /**
+ *
+ * @param domain
+ * the editing domain
+ * @param objectToAdd
+ * the object to add
+ * @param index
+ * the index where add the objects
+ * @return the complementary command, which is called by the master on the
+ * slave to add required axis
+ */
+ public Command getComplementaryAddAxisCommand(final TransactionalEditingDomain domain, final Collection<Object> objectToAdd, final int index);
+
+ /**
+ *
+ * @param manager
+ * the table model manager
+ * @param managerRep
+ * its axis manager representation
+ * @param provider
+ * the managed axis provider
+ */
+ public void init(final INattableModelManager manager, AxisManagerRepresentation managerRep, final AbstractAxisProvider provider);
+
+ public void setHeaderDataValue(int columnIndex, int rowIndex, Object newValue);
+
+ /**
+ *
+ * @return
+ * the managed axis provider
+ */
+ public AbstractAxisProvider getRepresentedContentProvider();
+
+ /**
+ *
+ *
+ * @return
+ * the table manager using this axis manager
+ */
+ public NattableModelManager getTableManager();
+
+
+
+ /**
+ *
+ * @return
+ * <code>true</code> if the contents provided by the axis manager is derived of the contents provided by the others axis manager
+ */
+ public boolean isSlave();
+
+ public boolean canInsertAxis(Collection<Object> objectsToAdd, int index);
+
+ public boolean canDropAxisElement(Collection<Object> objectsToAdd);
+
+ public Command getInsertAxisCommand(Collection<Object> objectsToAdd, int index);
+
+ /**
+ *
+ * @param object
+ * an object
+ * @return
+ * <code>true</code> if the object can be managed by the AxisManager
+ */
+ public boolean isAllowedContents(final Object object);
+
+ /**
+ *
+ * @return <code>true</code> if we can move elements on the axis
+ */
+ public boolean canMoveAxis();
+
+ /**
+ *
+ * @param isRestricted
+ * @return
+ * a content provider or <code>null</code> if the dialog to add/destroy axis is not supported
+ */
+ public IRestrictedContentProvider createPossibleAxisContentProvider(boolean isRestricted);
+
+
+ /**
+ *
+ * @param domain
+ * @param objectToDestroy
+ * @return
+ */
+ public Command getDestroyAxisCommand(TransactionalEditingDomain domain, Collection<Object> objectToDestroy);
+
+ /**
+ *
+ * @return
+ * the list of the existing axis managed by the axis manager
+ */
+ public List<Object> getAllManagedAxis();
+
+ /**
+ *
+ * @return
+ * <code>true</code> if the contents provided by this axis manager is derived of the (UML) model
+ */
+ public boolean isDynamic();
+
+ /**
+ *
+ * @param newIndex
+ * @param axisToMove
+ */
+ public void moveAxis(final Object elementToMove, final int newIndex);
+
+ /**
+ *
+ * @param elementId
+ * the id of the element to create
+ * @return
+ * <code>true</code> if the element can be created
+ */
+ public boolean canCreateAxisElement(final String elementId);
+
+ /**
+ *
+ * @return
+ * <code>true</code> if we allows to edit the string of all axis headers.
+ */
+ public boolean canEditAxisHeader();
+
+ /**
+ * Open a dialog to edit the alias of an axis and set the value
+ *
+ * @param event
+ * the event
+ * @param axisIndex
+ * the position of the axis
+ */
+ public void openEditAxisAliasDialog(final NatEventData event, int axisIndex);
+
+ /**
+ *
+ * @return
+ * the axis manager representation
+ */
+ public AxisManagerRepresentation getAxisManagerRepresentation();
+
+ /**
+ *
+ * @param axis
+ * an axis
+ * @return
+ * the name used for this axis
+ */
+ public String getElementAxisName(final IAxis axis);// TODO pb if the axisManager returns Object and not IAxis... -> use the index!
+
+ /**
+ *
+ * @param axisIndex
+ * axis index
+ * @return
+ * <code>true</code> if ALL axis identified by the axisIndex can be destroyed
+ */
+ public boolean canDestroyAxis(final List<Integer> axisIndex);
+
+ /**
+ *
+ * @param axisIndex
+ * @return
+ * <code>true</code> if the axis identified by the axisIndex can be destroyed
+ */
+ public boolean canDestroyAxis(final Integer axisIndex);
+
+ /**
+ * Destroy all axis represented by their index
+ *
+ * @param axisIndex
+ * a list of axis index
+ */
+ public void destroyAxis(final List<Integer> axisIndex);
+
+ /**
+ *
+ * @param axisIndex
+ * a list of axis index
+ * @return
+ * <code>true</code> if ALL elements represented by the axis located to these index can be destroyed
+ */
+ public boolean canDestroyAxisElement(final List<Integer> axisIndex);
+
+ /**
+ *
+ * @param axisIndex
+ * the index of an element
+ * @return
+ * <code>true</code> if we can destroy the element represented by the axis located to this index
+ */
+ public boolean canDestroyAxisElement(final Integer axisIndex);
+
+ /**
+ *
+ * @param axisIndex
+ * the list of the index of the elements to destroy
+ */
+ public void destroyAxisElement(final List<Integer> axisIndex);
+
+ /**
+ *
+ * @param domain
+ * @param axisPosition
+ * @return
+ */
+ public Command getDestroyAxisElementCommand(final TransactionalEditingDomain domain, final Integer axisPosition);
+
+ /**
+ * An axis provider determines if it can be saved as a configuration for later retrieval or not. It makes sense to save configurations of
+ * EStructuralFeatures (read-only) and Stereotype properties (read-only), but not those of EObjects which are not read-only.
+ *
+ *
+ *
+ * @return
+ */
+ public boolean canBeSavedAsConfig();
+
+ /**
+ *
+ * @return
+ * <code>true</code> if the axis manager is currently used as Column Manager (managing the invert axis)
+ */
+ public boolean isUsedAsColumnManager();
+
+ /**
+ *
+ * @param object
+ * an object
+ * @return
+ * <code>true</code> if the object is already managed by the axis manager
+ */
+ public boolean isAlreadyManaged(Object object);
+
+
+}
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/cell/StringResolutionProblemWrapperCellManager.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/cell/StringResolutionProblemWrapperCellManager.java
index 3c9ed8388ba..4b1de16ee7c 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/cell/StringResolutionProblemWrapperCellManager.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/cell/StringResolutionProblemWrapperCellManager.java
@@ -182,17 +182,11 @@ public class StringResolutionProblemWrapperCellManager implements IUnsetValueCel
}
if (setValueCommand == null) {
+ // The problem is created or updated with the following command, we don't need to destroy the previous problem
Command createCellProblemCommand = CellHelper.getCreateStringResolutionProblemCommand(domain, tableManager, columnElement, rowElement, newValue, valueConverter.getConvertedValue());
if (createCellProblemCommand != null && createCellProblemCommand.canExecute()) {
cc.append(createCellProblemCommand);
}
- if (createCellProblemCommand != null) {
- // we need to destroy existing associated cell problem. It could be the case when we edit the cell with an Xtext editor
- Command destroyExistingCellStringResolutionProblemCommand = CellHelper.getDestroyStringResolutionProblemCommand(domain, columnElement, rowElement, newValue, tableManager);
- if (destroyExistingCellStringResolutionProblemCommand != null && destroyExistingCellStringResolutionProblemCommand.canExecute()) {
- cc.append(destroyExistingCellStringResolutionProblemCommand);
- }
- }
}
if (cc.isEmpty() || !cc.canExecute()) {
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/table/AbstractNattableWidgetManager.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/table/AbstractNattableWidgetManager.java
index 01a7a9b135e..4b9c33ee8ee 100755
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/table/AbstractNattableWidgetManager.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/table/AbstractNattableWidgetManager.java
@@ -83,6 +83,7 @@ import org.eclipse.papyrus.infra.nattable.command.CommandIds;
import org.eclipse.papyrus.infra.nattable.command.UpdateFilterMapCommand;
import org.eclipse.papyrus.infra.nattable.comparator.ObjectNameAndPathComparator;
import org.eclipse.papyrus.infra.nattable.configuration.CellEditorAxisConfiguration;
+import org.eclipse.papyrus.infra.nattable.configuration.ClearSelectionUIBindingConfiguration;
import org.eclipse.papyrus.infra.nattable.configuration.CornerConfiguration;
import org.eclipse.papyrus.infra.nattable.configuration.FilterRowAxisConfiguration;
import org.eclipse.papyrus.infra.nattable.configuration.FilterRowCustomConfiguration;
@@ -198,7 +199,7 @@ public abstract class AbstractNattableWidgetManager implements INattableModelMan
* the columnHeaderLayerStack
*/
private ColumnHeaderLayerStack columnHeaderLayerStack;
-
+
/**
* @return the rowHeaderLayerStack
*/
@@ -360,7 +361,7 @@ public abstract class AbstractNattableWidgetManager implements INattableModelMan
addClickSortConfiguration(this.natTable);
this.natTable.addConfiguration(new FilterRowCustomConfiguration());
this.natTable.addConfiguration(new RowSortModelConfiguration(getRowSortModel()));
-
+ this.natTable.addConfiguration(new ClearSelectionUIBindingConfiguration());
// we register some information in the config registry of the nattable widget
IConfigRegistry configRegistry = this.natTable.getConfigRegistry();
@@ -426,7 +427,7 @@ public abstract class AbstractNattableWidgetManager implements INattableModelMan
protected void addClickSortConfiguration(NatTable natTable) {
natTable.addConfiguration(new TableClickSortConfiguration());
}
-
+
/**
* @return
* the filter strategy to use
@@ -1243,7 +1244,7 @@ public abstract class AbstractNattableWidgetManager implements INattableModelMan
toFind.add(realObject);
}
}
-
+
Object currentAxisObject = rowObjects.get(rowIndex);
Object currentRealObject = AxisUtils.getRepresentedElement(currentAxisObject);
if (toFind.contains(currentRealObject)) {
@@ -1266,7 +1267,7 @@ public abstract class AbstractNattableWidgetManager implements INattableModelMan
toFind.add(realObject);
}
}
-
+
Object currentAxisObject = columnObjects.get(columnIndex);
Object currentRealObject = AxisUtils.getRepresentedElement(currentAxisObject);
if (toFind.contains(currentRealObject)) {
@@ -1690,7 +1691,7 @@ public abstract class AbstractNattableWidgetManager implements INattableModelMan
* @return
* a {@link TableStructuredSelection} representing the current selection of the table or <code>null</code> when there is no selection
*/
- protected final TableStructuredSelection getSelectionInTable() {
+ public final TableStructuredSelection getSelectionInTable() {
ISelection selection = this.selectionProvider.getSelection();
if (selection instanceof TableStructuredSelection) {
return (TableStructuredSelection) selection;
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/table/INattableModelManager.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/table/INattableModelManager.java
index 95b2ce74a01..65ae39577b0 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/table/INattableModelManager.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/table/INattableModelManager.java
@@ -1,199 +1,217 @@
-/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.infra.nattable.manager.table;
-
-import java.util.Collection;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.jface.preference.PreferenceStore;
-import org.eclipse.nebula.widgets.nattable.NatTable;
-import org.eclipse.nebula.widgets.nattable.data.IDataProvider;
-import org.eclipse.nebula.widgets.nattable.ui.NatEventData;
-import org.eclipse.papyrus.infra.nattable.layerstack.BodyLayerStack;
-import org.eclipse.papyrus.infra.nattable.manager.axis.IAxisManager;
-import org.eclipse.papyrus.infra.nattable.model.nattable.Table;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisprovider.AbstractAxisProvider;
-import org.eclipse.papyrus.infra.nattable.utils.LocationValue;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.IWorkbenchPartSite;
-import org.eclipse.ui.services.IDisposable;
-
-
-public interface INattableModelManager extends ITableAxisElementProvider, IDisposable, IDataProvider, IAdaptable {
-
-
- @Override
- public int getColumnCount();
-
- @Override
- public int getRowCount();
-
- public void addRows(final Collection<Object> objectsToAdd);
-
- public void addColumns(final Collection<Object> objectsToAdd);
-
- public void removeColumns(final Collection<Object> objectsToRemove);
-
- public void removeRows(final Collection<Object> objectsToRemove);
-
- public boolean canInsertRow(final Collection<Object> objectsToAdd, int index);
-
- public boolean canInsertColumns(final Collection<Object> objectsToAdd, int index);
-
- public boolean canDropColumnsElement(final Collection<Object> objectsToAdd);
-
- public boolean canDropRowElement(final Collection<Object> objectsToAdd);
-
- public void insertRows(final Collection<Object> objectsToAdd, int index);
-
- public void insertColumns(final Collection<Object> objectsToAdd, int index);
-
- public IDataProvider getBodyDataProvider();
-
- public boolean canMoveColumns();
-
- public boolean canMoveRows();
-
- public void moveColumnElement(final Object axisToMove, final int newIndex);
-
- public void moveRowElement(final Object axisToMove, final int newIndex);
-
- public void invertAxis();
-
- public boolean canInvertAxis();
-
- public Table getTable();
-
- public ITableAxisElementProvider getTableAxisElementProvider();
-
- public NatTable createNattable(final Composite parent, int style, IWorkbenchPartSite site);
-
- public LocationValue getLocationInTheTable(final Point location);
-
- public boolean canCreateRowElement(String elementType);
-
- public boolean canCreateColumnElement(String elementType);
-
- public Command getAddRowElementCommand(Collection<Object> objectsToAdd);
-
- public Command getAddColumnElementCommand(Collection<Object> objectsToAdd);
-
- public void setTableName(String name);
-
- public String getTableName();
-
-
- public void print();
-
- public void selectAll();
-
- public void exportToXLS();
-
- /**
- * Opens a dialog to choose the columns to display or to destroy. This action doesn't create or destroy model element. It can only create/destroy
- * axis
- */
- public void openCreateDestroyColumnsManagerDialog();
-
- /**
- * Opens a dialog to choose the columns to display or to destroy. This action doesn't create or destroy model element. It can only create/destroy
- * axis
- */
- public void openCreateDestroyRowsManagerDialog();
-
- /**
- * Returns <code>true</code> if columns axis can be destroyed (only are will be destroyed, the model element won't be destroyed)
- *
- * @return
- */
- public boolean canCreateDestroyColumnsAxis();
-
- /**
- * Returns <code>true</code> if columns axis can be destroyed (only are will be destroyed, the model element won't be destroyed)
- *
- * @return
- */
- public boolean canCreateDestroyRowsAxis();
-
- public void sortColumnsByName(final boolean alphabeticOrder);
-
- public void sortRowsByName(final boolean alphabeticOrder);
-
-
- /**
- *
- * @return
- * the "real"{@link AbstractAxisProvider}, that's to say that this method use the property {@link Table#isInvertAxis()} to return the real
- * vertical axis
- */
- public AbstractAxisProvider getVerticalAxisProvider();
-
- /**
- *
- * @return
- * the "real"{@link AbstractAxisProvider}, that's to say that this method use the property {@link Table#isInvertAxis()} to return the real
- * horizontal axis
- */
- public AbstractAxisProvider getHorizontalAxisProvider();
-
- public BodyLayerStack getBodyLayerStack();
-
- /**
- * Opens a dialog to edit the alias of the row
- *
- * @param event
- */
- public void openEditRowAliasDialog(final NatEventData event);
-
- /**
- * Opens a dialog to edit the alias of the column
- *
- * @param event
- */
- public void openEditColumnAliasDialog(final NatEventData event);
-
- public boolean canEditColumnHeader(final NatEventData eventData);
-
- public boolean canEditRowHeader(final NatEventData eventData);
-
- /**
- *
- * @return
- * the column axis manager, managing the axis inversion
- */
- public IAxisManager getColumnAxisManager();
-
- /**
- *
- * @return
- * the row axis manager, managing the axis inversion
- */
- public IAxisManager getRowAxisManager();
-
- /**
- *
- * @return
- * the local preference store for the table instance or <code>null</code>
- */
- public PreferenceStore getTablePreferenceStore();
-
- /**
- *
- * @param store
- * the table preference store
- */
- public void setWorkspacePreferenceStore(final PreferenceStore store);
-}
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.nattable.manager.table;
+
+import java.util.Collection;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.jface.preference.PreferenceStore;
+import org.eclipse.nebula.widgets.nattable.NatTable;
+import org.eclipse.nebula.widgets.nattable.data.IDataProvider;
+import org.eclipse.nebula.widgets.nattable.ui.NatEventData;
+import org.eclipse.papyrus.infra.nattable.layerstack.BodyLayerStack;
+import org.eclipse.papyrus.infra.nattable.manager.axis.IAxisManager;
+import org.eclipse.papyrus.infra.nattable.model.nattable.Table;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisprovider.AbstractAxisProvider;
+import org.eclipse.papyrus.infra.nattable.utils.LocationValue;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.IWorkbenchPartSite;
+import org.eclipse.ui.services.IDisposable;
+
+
+public interface INattableModelManager extends ITableAxisElementProvider, IDisposable, IDataProvider, IAdaptable {
+
+
+ @Override
+ public int getColumnCount();
+
+ @Override
+ public int getRowCount();
+
+ public void addRows(final Collection<Object> objectsToAdd);
+
+ public void addColumns(final Collection<Object> objectsToAdd);
+
+ public void removeColumns(final Collection<Object> objectsToRemove);
+
+ public void removeRows(final Collection<Object> objectsToRemove);
+
+ public boolean canInsertRow(final Collection<Object> objectsToAdd, int index);
+
+ public boolean canInsertColumns(final Collection<Object> objectsToAdd, int index);
+
+ public boolean canDropColumnsElement(final Collection<Object> objectsToAdd);
+
+ public boolean canDropRowElement(final Collection<Object> objectsToAdd);
+
+ public void insertRows(final Collection<Object> objectsToAdd, int index);
+
+ public void insertColumns(final Collection<Object> objectsToAdd, int index);
+
+ public IDataProvider getBodyDataProvider();
+
+ public boolean canMoveColumns();
+
+ public boolean canMoveRows();
+
+ public void moveColumnElement(final Object axisToMove, final int newIndex);
+
+ public void moveRowElement(final Object axisToMove, final int newIndex);
+
+ public void invertAxis();
+
+ public boolean canInvertAxis();
+
+ public Table getTable();
+
+ public ITableAxisElementProvider getTableAxisElementProvider();
+
+ public NatTable createNattable(final Composite parent, int style, IWorkbenchPartSite site);
+
+ public LocationValue getLocationInTheTable(final Point location);
+
+ public boolean canCreateRowElement(String elementType);
+
+ public boolean canCreateColumnElement(String elementType);
+
+ public Command getAddRowElementCommand(Collection<Object> objectsToAdd);
+
+ public Command getAddColumnElementCommand(Collection<Object> objectsToAdd);
+
+ /**
+ * Get the command to add row elements at the index in parameter.
+ *
+ * @param objectsToAdd The row elements to add.
+ * @param index The index where add the elements.
+ * @return The command.
+ */
+ public Command getAddRowElementCommand(final Collection<Object> objectsToAdd, final int index);
+
+ /**
+ * Get the command to add column elements at the index in parameter.
+ *
+ * @param objectsToAdd The column elements to add.
+ * @param index The index where add the elements.
+ * @return The command.
+ */
+ public Command getAddColumnElementCommand(final Collection<Object> objectsToAdd, final int index);
+
+ public void setTableName(String name);
+
+ public String getTableName();
+
+
+ public void print();
+
+ public void selectAll();
+
+ public void exportToXLS();
+
+ /**
+ * Opens a dialog to choose the columns to display or to destroy. This action doesn't create or destroy model element. It can only create/destroy
+ * axis
+ */
+ public void openCreateDestroyColumnsManagerDialog();
+
+ /**
+ * Opens a dialog to choose the columns to display or to destroy. This action doesn't create or destroy model element. It can only create/destroy
+ * axis
+ */
+ public void openCreateDestroyRowsManagerDialog();
+
+ /**
+ * Returns <code>true</code> if columns axis can be destroyed (only are will be destroyed, the model element won't be destroyed)
+ *
+ * @return
+ */
+ public boolean canCreateDestroyColumnsAxis();
+
+ /**
+ * Returns <code>true</code> if columns axis can be destroyed (only are will be destroyed, the model element won't be destroyed)
+ *
+ * @return
+ */
+ public boolean canCreateDestroyRowsAxis();
+
+ public void sortColumnsByName(final boolean alphabeticOrder);
+
+ public void sortRowsByName(final boolean alphabeticOrder);
+
+
+ /**
+ *
+ * @return
+ * the "real"{@link AbstractAxisProvider}, that's to say that this method use the property {@link Table#isInvertAxis()} to return the real
+ * vertical axis
+ */
+ public AbstractAxisProvider getVerticalAxisProvider();
+
+ /**
+ *
+ * @return
+ * the "real"{@link AbstractAxisProvider}, that's to say that this method use the property {@link Table#isInvertAxis()} to return the real
+ * horizontal axis
+ */
+ public AbstractAxisProvider getHorizontalAxisProvider();
+
+ public BodyLayerStack getBodyLayerStack();
+
+ /**
+ * Opens a dialog to edit the alias of the row
+ *
+ * @param event
+ */
+ public void openEditRowAliasDialog(final NatEventData event);
+
+ /**
+ * Opens a dialog to edit the alias of the column
+ *
+ * @param event
+ */
+ public void openEditColumnAliasDialog(final NatEventData event);
+
+ public boolean canEditColumnHeader(final NatEventData eventData);
+
+ public boolean canEditRowHeader(final NatEventData eventData);
+
+ /**
+ *
+ * @return
+ * the column axis manager, managing the axis inversion
+ */
+ public IAxisManager getColumnAxisManager();
+
+ /**
+ *
+ * @return
+ * the row axis manager, managing the axis inversion
+ */
+ public IAxisManager getRowAxisManager();
+
+ /**
+ *
+ * @return
+ * the local preference store for the table instance or <code>null</code>
+ */
+ public PreferenceStore getTablePreferenceStore();
+
+ /**
+ *
+ * @param store
+ * the table preference store
+ */
+ public void setWorkspacePreferenceStore(final PreferenceStore store);
+}
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/table/NattableModelManager.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/table/NattableModelManager.java
index dcd08ab9aae..3b17deb708a 100755
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/table/NattableModelManager.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/table/NattableModelManager.java
@@ -9,6 +9,7 @@
*
* Contributors:
* Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 476618
*
*****************************************************************************/
package org.eclipse.papyrus.infra.nattable.manager.table;
@@ -52,11 +53,18 @@ import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.viewers.ViewerComparator;
import org.eclipse.jface.window.Window;
import org.eclipse.nebula.widgets.nattable.NatTable;
+import org.eclipse.nebula.widgets.nattable.coordinate.PositionCoordinate;
+import org.eclipse.nebula.widgets.nattable.coordinate.Range;
import org.eclipse.nebula.widgets.nattable.data.IColumnAccessor;
import org.eclipse.nebula.widgets.nattable.data.IDataProvider;
import org.eclipse.nebula.widgets.nattable.filterrow.IFilterStrategy;
import org.eclipse.nebula.widgets.nattable.layer.ILayerListener;
import org.eclipse.nebula.widgets.nattable.layer.event.ILayerEvent;
+import org.eclipse.nebula.widgets.nattable.selection.SelectionLayer;
+import org.eclipse.nebula.widgets.nattable.selection.command.ClearAllSelectionsCommand;
+import org.eclipse.nebula.widgets.nattable.selection.command.SelectCellCommand;
+import org.eclipse.nebula.widgets.nattable.selection.command.SelectColumnCommand;
+import org.eclipse.nebula.widgets.nattable.selection.command.SelectRowsCommand;
import org.eclipse.nebula.widgets.nattable.style.DisplayMode;
import org.eclipse.nebula.widgets.nattable.ui.NatEventData;
import org.eclipse.papyrus.commands.wrappers.GMFtoEMFCommandWrapper;
@@ -64,6 +72,7 @@ import org.eclipse.papyrus.infra.nattable.Activator;
import org.eclipse.papyrus.infra.nattable.command.CommandIds;
import org.eclipse.papyrus.infra.nattable.dialog.DisplayedAxisSelectorDialog;
import org.eclipse.papyrus.infra.nattable.filter.PapyrusFilterStrategy;
+import org.eclipse.papyrus.infra.nattable.layer.PapyrusSelectionLayer;
import org.eclipse.papyrus.infra.nattable.manager.axis.AxisManagerFactory;
import org.eclipse.papyrus.infra.nattable.manager.axis.CompositeAxisManager;
import org.eclipse.papyrus.infra.nattable.manager.axis.IAxisManager;
@@ -91,6 +100,7 @@ import org.eclipse.papyrus.infra.nattable.model.nattable.nattablelabelprovider.I
import org.eclipse.papyrus.infra.nattable.model.nattable.nattablelabelprovider.ObjectLabelProviderConfiguration;
import org.eclipse.papyrus.infra.nattable.model.nattable.nattablestyle.BooleanValueStyle;
import org.eclipse.papyrus.infra.nattable.model.nattable.nattablestyle.IntValueStyle;
+import org.eclipse.papyrus.infra.nattable.provider.TableStructuredSelection;
import org.eclipse.papyrus.infra.nattable.selection.ISelectionExtractor;
import org.eclipse.papyrus.infra.nattable.selection.ObjectsSelectionExtractor;
import org.eclipse.papyrus.infra.nattable.sort.IPapyrusSortModel;
@@ -101,6 +111,7 @@ import org.eclipse.papyrus.infra.nattable.utils.HeaderAxisConfigurationManagemen
import org.eclipse.papyrus.infra.nattable.utils.NattableConfigAttributes;
import org.eclipse.papyrus.infra.nattable.utils.StringComparator;
import org.eclipse.papyrus.infra.nattable.utils.TableHelper;
+import org.eclipse.papyrus.infra.nattable.utils.TableSelectionWrapper;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.infra.services.labelprovider.service.LabelProviderService;
@@ -338,6 +349,7 @@ public class NattableModelManager extends AbstractNattableWidgetManager implemen
}
};
}
+
private ListEventListener<Object> listEventListener;
@@ -382,11 +394,11 @@ public class NattableModelManager extends AbstractNattableWidgetManager implemen
if (needConfiguration) {
configureCellAxisEditor();
configureFilters();
-
- //comment to fix the bug 469739: [Table] Infinite refresh in Tables
- //https://bugs.eclipse.org/bugs/show_bug.cgi?id=469739
- //moreover this refresh seems
- //refreshNatTable();
+
+ // comment to fix the bug 469739: [Table] Infinite refresh in Tables
+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=469739
+ // moreover this refresh seems
+ // refreshNatTable();
}
}
}
@@ -409,7 +421,7 @@ public class NattableModelManager extends AbstractNattableWidgetManager implemen
/**
*
* @return
- * the new list to use for vertical element
+ * the new list to use for vertical element
*/
protected List<Object> createVerticalElementList() {
// return Collections.synchronizedList(new ArrayList<Object>());
@@ -423,7 +435,7 @@ public class NattableModelManager extends AbstractNattableWidgetManager implemen
/**
*
* @return
- * the new list to use for horizontal element
+ * the new list to use for horizontal element
*/
protected List<Object> createHorizontalElementList() {
// return Collections.synchronizedList(new ArrayList<Object>());
@@ -519,7 +531,7 @@ public class NattableModelManager extends AbstractNattableWidgetManager implemen
updateToggleActionState();
}
-
+
/**
* this command update the status of the toggle actions
*/
@@ -703,7 +715,7 @@ public class NattableModelManager extends AbstractNattableWidgetManager implemen
this.basicVerticalList = newVerticalBasicList;
this.basicHorizontalList = newHorizontalBasicList;
-
+
this.horizontalFilterList = newHorizontalFilterList;
this.verticalFilterList = newVerticalFilterLilst;
@@ -1050,10 +1062,64 @@ public class NattableModelManager extends AbstractNattableWidgetManager implemen
return;
}
+ // Get the previous selection before the refresh
+ TableStructuredSelection selectionInTable = getSelectionInTable();
+ Collection<PositionCoordinate> selectedCells = null;
+ Collection<Integer> columnPositions = null;
+ Collection<Integer> rowsPositions = null;
+
+ if (null != selectionInTable) {
+ TableSelectionWrapper tableSelectionWrapper = (TableSelectionWrapper) selectionInTable.getAdapter(TableSelectionWrapper.class);
+ selectedCells = tableSelectionWrapper.getSelectedCells();
+ columnPositions = tableSelectionWrapper.getFullySelectedColumns().keySet();
+ rowsPositions = tableSelectionWrapper.getFullySelectedRows().keySet();
+ }
+
// avoid reentrant call
// Refresh only of we are not already refreshing.
if (isRefreshing.compareAndSet(false, true)) {
+ final SelectionLayer selectionLayer = getBodyLayerStack().getSelectionLayer();
+ selectionLayer.doCommand(new ClearAllSelectionsCommand());
this.natTable.refresh();
+
+ // Keep the selection after the refresh of the table
+ if (null != selectedCells && !selectedCells.isEmpty()) {
+ Collection<Integer> selectedColumns = new ArrayList<Integer>();
+ Collection<Integer> selectedRows = new ArrayList<Integer>();
+
+ // Keep the columns selected before the refresh
+ if (null != columnPositions && !columnPositions.isEmpty()) {
+ List<Range> selectedColumnsRanges = ((PapyrusSelectionLayer) selectionLayer).getRangeSelectedAxis(columnPositions);
+
+ for (final Range selectedColumnRange : selectedColumnsRanges) {
+ for (int position = selectedColumnRange.start; position < selectedColumnRange.end; position++) {
+ // int realIndex = getBodyLayerStack().getColumnHideShowLayer().getColumnPositionByIndex(position);
+ selectionLayer.doCommand(new SelectColumnCommand(selectionLayer, position, 0, false, true));
+ selectedColumns.add(position);
+ }
+ }
+ }
+
+ // Keep the rows selected before the refresh
+ if (null != rowsPositions && !rowsPositions.isEmpty()) {
+ List<Range> selectedRowsRanges = ((PapyrusSelectionLayer) selectionLayer).getRangeSelectedAxis(rowsPositions);
+
+ for (final Range selectedRowRange : selectedRowsRanges) {
+ for (int position = selectedRowRange.start; position < selectedRowRange.end; position++) {
+ // int realIndex = getBodyLayerStack().getRowHideShowLayer().getRowPositionByIndex(position);
+ selectionLayer.doCommand(new SelectRowsCommand(selectionLayer, 0, position, false, true));
+ selectedRows.add(position);
+ }
+ }
+ }
+
+ // Manage the cells not contained in the rows and columns already selected
+ for (PositionCoordinate selectedCell : selectedCells) {
+ if (!selectedColumns.contains(selectedCell.getColumnPosition()) && !selectedRows.contains(selectedCell.getRowPosition())) {
+ selectionLayer.doCommand(new SelectCellCommand(selectionLayer, selectedCell.getColumnPosition(), selectedCell.getRowPosition(), false, true));
+ }
+ }
+ }
isRefreshing.set(false);
}
}
@@ -1068,11 +1134,11 @@ public class NattableModelManager extends AbstractNattableWidgetManager implemen
try {
if (null != getContextEditingDomain()) {
getContextEditingDomain().runExclusive(new Runnable() {
-
+
@Override
public void run() {
Display.getDefault().syncExec(new Runnable() {
-
+
@Override
public void run() {
if (NattableModelManager.this.natTable != null && !NattableModelManager.this.natTable.isDisposed()) {
@@ -1087,9 +1153,9 @@ public class NattableModelManager extends AbstractNattableWidgetManager implemen
}
}
});
-
+
}
-
+
});
}
} catch (final InterruptedException e) {
@@ -1313,6 +1379,56 @@ public class NattableModelManager extends AbstractNattableWidgetManager implemen
return cmd;
}
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager#getAddRowElementCommand(java.util.Collection, int)
+ */
+ @Override
+ public Command getAddRowElementCommand(final Collection<Object> objectsToAdd, final int index) {
+ final TransactionalEditingDomain domain = getContextEditingDomain();
+ final CompoundCommand cmd = new CompoundCommand(Messages.NattableModelManager_AddRowCommand);
+ Command tmp = this.rowManager.getAddAxisCommand(domain, objectsToAdd, index);
+ if (tmp != null) {
+ cmd.append(tmp);
+ }
+ final AbstractAxisProvider rowsProvider = AxisUtils.getAxisProviderUsedForRows(this);
+ final AbstractAxisProvider columnsProvider = AxisUtils.getAxisProviderUsedForColumns(this);
+ boolean addComplementaryAxis = rowsProvider instanceof IMasterAxisProvider && columnsProvider instanceof ISlaveAxisProvider && !((IMasterAxisProvider) rowsProvider).isDisconnectSlave();
+ if (addComplementaryAxis) {
+ tmp = this.columnManager.getComplementaryAddAxisCommand(domain, objectsToAdd);
+ if (tmp != null) {
+ cmd.append(tmp);
+ }
+ }
+ return cmd;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager#getAddColumnElementCommand(java.util.Collection, int)
+ */
+ @Override
+ public Command getAddColumnElementCommand(final Collection<Object> objectsToAdd, final int index) {
+ final TransactionalEditingDomain domain = getContextEditingDomain();
+ final CompoundCommand cmd = new CompoundCommand(Messages.NattableModelManager_AddColumnCommand);
+ Command tmp = this.columnManager.getAddAxisCommand(domain, objectsToAdd, index);
+ if (tmp != null) {
+ cmd.append(tmp);
+ }
+ final AbstractAxisProvider rowsProvider = AxisUtils.getAxisProviderUsedForRows(this);
+ final AbstractAxisProvider columnsProvider = AxisUtils.getAxisProviderUsedForColumns(this);
+ boolean addComplementaryAxis = columnsProvider instanceof IMasterAxisProvider && rowsProvider instanceof ISlaveAxisProvider && !((IMasterAxisProvider) columnsProvider).isDisconnectSlave();
+ if (addComplementaryAxis) {
+ tmp = this.rowManager.getComplementaryAddAxisCommand(domain, objectsToAdd);
+ if (tmp != null) {
+ cmd.append(tmp);
+ }
+ }
+ return cmd;
+ }
+
public Command getDestroyColumnElementCommand(final Collection<Object> objectsToDestroy) {
final TransactionalEditingDomain domain = getContextEditingDomain();
final Command cmd = this.columnManager.getDestroyAxisCommand(domain, objectsToDestroy);
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/messages/Messages.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/messages/Messages.java
index b51197119fd..73a8dc2205f 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/messages/Messages.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/messages/Messages.java
@@ -35,43 +35,89 @@ public class Messages extends NLS {
public static String AbstractCreateNattableEditorHandler_PapyrusTableCreation;
- public static String AbstractPasteImportInNattableManager_column;
-
- public static String AbstractPasteImportInNattableManager_EnablementStatusForPasteInTheTable;
+ public static String AbstractPasteInSelectionNattableCommandProvider_AnExceptionOccuredDuringThePaste;
+
+ public static String AbstractPasteInSelectionNattableCommandProvider_ElementCantBeAdded;
+
+ public static String AbstractPasteInSelectionNattableCommandProvider_identifierNotFoundInSelection;
+
+ public static String AbstractPasteInSelectionNattableCommandProvider_identifierNotFoundInSelectionSoTheObjectWasCreated;
+
+ public static String AbstractPasteInSelectionNattableCommandProvider_MultipleSelectedRowsCorrespondingForIdentifier;
+
+ public static String AbstractPasteInSelectionNattableCommandProvider_NonEditableCellTriedToBeOverwrited;
+
+ public static String AbstractPasteInSelectionNattableCommandProvider_notyetimplemented;
+
+ public static String AbstractPasteInSelectionNattableCommandProvider_readrowsexceedsexistingrows;
+
+ public static String AbstractPasteInSelectionNattableCommandProvider_readcolumnsexceedsexistingcolumns;
+
+ public static String AbstractPasteInSelectionNattableCommandProvider_TheAxisUsedAsIdentifierNotAvailable;
+
+ public static String AbstractPasteInSelectionNattableCommandProvider_TheCommandCantBeExecuted;
+
+ public static String AbstractPasteInSelectionNattableCommandProvider_ThePasteHasBeenDoneWithSomeProblems;
+
+ public static String AbstractPasteInSelectionNattableCommandProvider_ThePasteHasNotBeenDoneBecauseOfSomeProblems;
+
+ public static String AbstractPasteImportInNattableManager_PasteColumnsError;
+
+ public static String AbstractPasteImportInNattableManager_PasteNotYetManaged;
- public static String AbstractPasteImportInNattableManager_INVERTED_MESSAGE;
+ public static String AbstractPasteImportInNattableManager_PasteRowsError;
+
+ public static String AbstractPasteImportInsertInNattableManager_column;
- public static String AbstractPasteImportInNattableManager_NoPasteConfiguration;
+ public static String AbstractPasteImportInsertInNattableManager_EnablementStatusForPasteInTheTable;
- public static String AbstractPasteImportInNattableManager_NoPasteConfiguration2;
+ public static String AbstractPasteImportInsertInNattableManager_INVERTED_MESSAGE;
- public static String AbstractPasteImportInNattableManager_NumberOfColumnsAreEquals;
+ public static String AbstractPasteImportInsertInNattableManager_NoPasteConfiguration;
- public static String AbstractPasteImportInNattableManager_NumberOfColumnsAreNotEquals;
+ public static String AbstractPasteImportInsertInNattableManager_NoPasteConfiguration2;
+
+ public static String AbstractPasteImportInsertInNattableManager_NoPasteConfigurationNeeded;
- public static String AbstractPasteImportInNattableManager_PasteColumnsError;
+ public static String AbstractPasteImportInsertInNattableManager_NumberOfColumnsAreEquals;
- public static String AbstractPasteImportInNattableManager_PasteRowsError;
+ public static String AbstractPasteImportInsertInNattableManager_NumberOfColumnsAreNotEquals;
- public static String AbstractPasteImportInNattableManager_row;
+ public static String AbstractPasteImportInsertInNattableManager_row;
+
+ public static String AbstractPasteImportInsertInNattableManager_PasteConfigurationAxisIdentifierHasBeenSet;
+
+ public static String AbstractPasteImportInsertInNattableManager_PasteConfigurationAxisIdentifierHasNotBeenSet;
- public static String AbstractPasteImportInNattableManager_TheContextOfTheTableHasNotTheContainmentFeatureDefinedForThePaste;
+ public static String AbstractPasteImportInsertInNattableManager_PasteConfigurationFeatureHasNotBeenSet;
+
+ public static String AbstractPasteImportInsertInNattableManager_TheContextOfTheTableHasNotTheContainmentFeatureDefinedForThePaste;
- public static String AbstractPasteImportInNattableManager_TheContextOfTheTableHasTheContainmentFeatureDefinedForThePaste;
+ public static String AbstractPasteImportInsertInNattableManager_TheContextOfTheTableHasTheContainmentFeatureDefinedForThePaste;
+
+ public static String AbstractPasteImportInsertInNattableManager_TheElementTypeIsUnknown;
+
+ public static String AbstractPasteImportInsertInNattableManager_ThereIsNoElementIdDefinedInThePasteConfiguration;
+
+ public static String AbstractPasteImportInsertInNattableManager_ThereIsNoPasteConfgurationForATreeFillingConfiguration;
- public static String AbstractPasteImportInNattableManager_TheTableCanCreateElement;
+ public static String AbstractPasteImportInsertInNattableManager_TheTableCanCreateElement;
- public static String AbstractPasteImportInNattableManager_TheTableCantCreateElement;
+ public static String AbstractPasteImportInsertInNattableManager_TheTableCantCreateElement;
- public static String AbstractPasteImportInNattableManager_TheTableDoesntHaveColumns;
+ public static String AbstractPasteImportInsertInNattableManager_TheTableDoesntHaveColumns;
- public static String AbstractPasteImportInNattableManager_TheTableHasAConfigurationToPaste;
+ public static String AbstractPasteImportInsertInNattableManager_TheTableHasAConfigurationToPaste;
- public static String AbstractPasteImportInNattableManager_TheUserChosesToPasteColumns;
+ public static String AbstractPasteImportInsertInNattableManager_TheUserChosesToPasteColumns;
- public static String AbstractPasteImportInNattableManager_TheUserChosesToPasteRows;
+ public static String AbstractPasteImportInsertInNattableManager_TheUserChosesToPasteRows;
+
+ public static String AbstractPasteImportInsertInNattableManager_YouHaveMoreThan1Category;
- public static String AbstractPasteImportInNattableManager_WhatAreYouPasting;
+ public static String AbstractPasteImportInsertInNattableManager_WhatAreYouPasting;
+
+ public static String AbstractInsertImportInNattableManager_MoreThanOnePasteConfigurationByDepth;
public static String AbstractSaveCurrentAxisProvidersHandler_0;
@@ -103,6 +149,12 @@ public class Messages extends NLS {
public static String EObjectManager_AddAxisElement;
+ public static String InsertInNattableManager_InsertColumnsError;
+
+ public static String InsertInNattableManager_InsertNotYetManaged;
+
+ public static String InsertInNattableManager_InsertRowsError;
+
public static String NattableConfigurationRegistry_ConfigurationNotFound;
public static String NattableConfigurationRegistry_NoTesterForThisConfiguration;
@@ -314,10 +366,17 @@ public class Messages extends NLS {
public static String PasteInPapyrusTableCommandProvider_TheTextCantBeMappedOnAnExistingElement;
public static String PasteInTableHandler_PasteCancelled;
-
+
public static String PasteInTableHandler_PasteCreation;
-
+
+ public static String PasteInTableHandler_PasteError;
+
+ public static String PasteInTableHandler_PasteInformation;
+
+ public static String PasteInTableHandler_PasteWarning;
+
public static String PasteInTableHandler_ThePasteCommandCantBeExecuted;
+
public static String PasteSeparator_Comma;
public static String PasteSeparator_Other;
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/messages/messages.properties b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/messages/messages.properties
index d10f7e06c45..43dd8047746 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/messages/messages.properties
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/messages/messages.properties
@@ -2,25 +2,48 @@ AbstractAxisManager_InputDialogMessage=The real name for the header is: \n\t %s
AbstractAxisManager_InputDialogTitle=Edit Header Alias Dialog
AbstractCreateNattableEditorHandler_EnterTheNameForTheNewTable=Enter the name for the new table
AbstractCreateNattableEditorHandler_PapyrusTableCreation=Papyrus Table Creation
-AbstractPasteImportInNattableManager_column=column
-AbstractPasteImportInNattableManager_EnablementStatusForPasteInTheTable=Enablement status for paste {0} in the table
-AbstractPasteImportInNattableManager_INVERTED_MESSAGE=The axis of your table are inverted. This case is not yet managed. You must have elements as rows and features as columns.
-AbstractPasteImportInNattableManager_NoPasteConfiguration=Neither of the row paste configuration and column paste configuration allows to create elements in the table\n.
-AbstractPasteImportInNattableManager_NoPasteConfiguration2=Your table has no paste configuration
-AbstractPasteImportInNattableManager_NumberOfColumnsAreEquals=The number of columns by rows is the same as the number of columns in the table
-AbstractPasteImportInNattableManager_NumberOfColumnsAreNotEquals=The number of columns by rows is not the same as the number of columns in the table.\n You are trying to paste {0} columns in a table which has {1} columns
+AbstractPasteInSelectionNattableCommandProvider_AnExceptionOccuredDuringThePaste=An exception occured during the paste
+AbstractPasteInSelectionNattableCommandProvider_ElementCantBeAdded=The element can't be added to the table (probably due to non-editable containment feature)
+AbstractPasteInSelectionNattableCommandProvider_identifierNotFoundInSelection=The identifier '%s' was not found in the selection
+AbstractPasteInSelectionNattableCommandProvider_identifierNotFoundInSelectionSoTheObjectWasCreated=The identifier '%s' was not found in the selection, so the object was created
+AbstractPasteInSelectionNattableCommandProvider_MultipleSelectedRowsCorrespondingForIdentifier=The identifier '%s' is corresponding to multiple selected rows
+AbstractPasteInSelectionNattableCommandProvider_NonEditableCellTriedToBeOverwrited=Non-editable cell tried to be overwrited
+AbstractPasteInSelectionNattableCommandProvider_notyetimplemented=Not yet implemented
+AbstractPasteInSelectionNattableCommandProvider_readrowsexceedsexistingrows=The number of rows to paste is not equals to the number of rows in selection
+AbstractPasteInSelectionNattableCommandProvider_readcolumnsexceedsexistingcolumns=The number of columns to paste is not equals to the number of columns in selection
+AbstractPasteInSelectionNattableCommandProvider_TheAxisUsedAsIdentifierNotAvailable=The axis used as identifier is not available in the table
+AbstractPasteInSelectionNattableCommandProvider_TheCommandCantBeExecuted=The Paste command can't be executed
+AbstractPasteInSelectionNattableCommandProvider_ThePasteHasBeenDoneWithSomeProblems=The paste has been done, but we found some problems
+AbstractPasteInSelectionNattableCommandProvider_ThePasteHasNotBeenDoneBecauseOfSomeProblems=The paste has not been done because of some problems
AbstractPasteImportInNattableManager_PasteColumnsError=\n Paste column error:\n\t
+AbstractPasteImportInNattableManager_PasteNotYetManaged=Paste not yet managed
AbstractPasteImportInNattableManager_PasteRowsError=\n Paste row error:\n\t
-AbstractPasteImportInNattableManager_row=row
-AbstractPasteImportInNattableManager_TheContextOfTheTableHasNotTheContainmentFeatureDefinedForThePaste=The context of the table doesn't have the containment feature defined for the paste
-AbstractPasteImportInNattableManager_TheContextOfTheTableHasTheContainmentFeatureDefinedForThePaste=The context of the table has the containment feature defined for the paste
-AbstractPasteImportInNattableManager_TheTableCanCreateElement=The table can create {0} as {1}
-AbstractPasteImportInNattableManager_TheTableCantCreateElement=The table can't create {0} as {1}
-AbstractPasteImportInNattableManager_TheTableDoesntHaveColumns=The table doesn't have columns
-AbstractPasteImportInNattableManager_TheTableHasAConfigurationToPaste=The table has a configuration to paste {0}.
-AbstractPasteImportInNattableManager_TheUserChosesToPasteColumns=The user has chosen to paste columns.
-AbstractPasteImportInNattableManager_TheUserChosesToPasteRows=The user has chosen to paste rows.
-AbstractPasteImportInNattableManager_WhatAreYouPasting=I can't find if you are pasting rows elements or columns elements.\n Press "Yes" to paste rows and "No" to paste columns.
+AbstractPasteImportInsertInNattableManager_column=column
+AbstractPasteImportInsertInNattableManager_EnablementStatusForPasteInTheTable=Enablement status for paste {0} in the table
+AbstractPasteImportInsertInNattableManager_INVERTED_MESSAGE=The axis of your table are inverted. This case is not yet managed. You must have elements as rows and features as columns.
+AbstractPasteImportInsertInNattableManager_NoPasteConfiguration=Neither of the row paste configuration and column paste configuration allows to create elements in the table\n.
+AbstractPasteImportInsertInNattableManager_NoPasteConfiguration2=Your table has no paste configuration
+AbstractPasteImportInsertInNattableManager_NoPasteConfigurationNeeded=No paste configuration is needed for this type of paste
+AbstractPasteImportInsertInNattableManager_NumberOfColumnsAreEquals=The number of columns by rows is the same as the number of columns in the table
+AbstractPasteImportInsertInNattableManager_NumberOfColumnsAreNotEquals=The number of columns by rows is not the same as the number of columns in the table.\n You are trying to paste {0} columns in a table which has {1} columns
+AbstractPasteImportInsertInNattableManager_row=row
+AbstractPasteImportInsertInNattableManager_PasteConfigurationAxisIdentifierHasBeenSet=Paste configuration axis identifier has been set correctly
+AbstractPasteImportInsertInNattableManager_PasteConfigurationAxisIdentifierHasNotBeenSet=Paste configuration axis identifier has not been set
+AbstractPasteImportInsertInNattableManager_PasteConfigurationFeatureHasNotBeenSet=Paste configuration feature has not been set for category {0} on depth {1}
+AbstractPasteImportInsertInNattableManager_TheContextOfTheTableHasNotTheContainmentFeatureDefinedForThePaste=The context of the table doesn't have the containment feature defined for the paste
+AbstractPasteImportInsertInNattableManager_TheContextOfTheTableHasTheContainmentFeatureDefinedForThePaste=The context of the table has the containment feature defined for the paste
+AbstractPasteImportInsertInNattableManager_TheElementTypeIsUnknown=The element type {0} is unknown
+AbstractPasteImportInsertInNattableManager_ThereIsNoElementIdDefinedInThePasteConfiguration=There is no element id defined in the paste configuration
+AbstractPasteImportInsertInNattableManager_ThereIsNoPasteConfgurationForATreeFillingConfiguration=There is no paste configuration for a TreeFillingConfiguration
+AbstractPasteImportInsertInNattableManager_TheTableCanCreateElement=The table can create {0} as {1}
+AbstractPasteImportInsertInNattableManager_TheTableCantCreateElement=The table can't create {0} as {1}
+AbstractPasteImportInsertInNattableManager_TheTableDoesntHaveColumns=The table doesn't have columns
+AbstractPasteImportInsertInNattableManager_TheTableHasAConfigurationToPaste=The table has a configuration to paste {0}.
+AbstractPasteImportInsertInNattableManager_TheUserChosesToPasteColumns=The user has chosen to paste columns.
+AbstractPasteImportInsertInNattableManager_TheUserChosesToPasteRows=The user has chosen to paste rows.
+AbstractPasteImportInsertInNattableManager_YouHaveMoreThan1Category=You have more than 1 category for the depth {0}, so this depth must be visible to do the paste and our pasted file must be conform to the new table appearance
+AbstractPasteImportInsertInNattableManager_WhatAreYouPasting=I can't find if you are pasting rows elements or columns elements.\n Press "Yes" to paste rows and "No" to paste columns.
+AbstractInsertImportInNattableManager_MoreThanOnePasteConfigurationByDepth=More than one paste configuration is defined for depth {0}
AbstractSaveCurrentAxisProvidersHandler_0=Enter name and description
AbstractSaveCurrentAxisProvidersHandler_1=Name:
AbstractSaveCurrentAxisProvidersHandler_2=Description:
@@ -39,6 +62,9 @@ EditConfiguration_ConfigurationNotFound=I can't find configuration for {0}
EditConfiguration_DeclarationNotYetSupported=The declaration of celleditor on cell is not yet supported
EditConfiguration_FactoryHandlesElementButDoesntProvideEditor=The factory {0} handles the element {1} but doesn't provide CellEditor
EObjectManager_AddAxisElement=Add Axis Element
+InsertInNattableManager_InsertColumnsError=\n Insert column error:\n\t
+InsertInNattableManager_InsertNotYetManaged=Insert not yet managed
+InsertInNattableManager_InsertRowsError=\n Insert row error:\n\t
NattableConfigurationRegistry_ConfigurationNotFound=Configuration can't be found
NattableConfigurationRegistry_NoTesterForThisConfiguration=no tester for this configuration
NattableConfigurationRegistry_NoTypeForAConfiguration=TableConfiguration in {0} has no type.
@@ -147,6 +173,9 @@ PasteInPapyrusTableCommandProvider_TheStereotypeCantBeApplied=The stereotype {0}
PasteInPapyrusTableCommandProvider_TheTextCantBeMappedOnAnExistingElement=The text {0} can't be mapped to an existing element
PasteInTableHandler_PasteCancelled=Paste Action Canceled
PasteInTableHandler_PasteCreation=Paste creation...
+PasteInTableHandler_PasteError=Error during paste
+PasteInTableHandler_PasteInformation=Paste Information
+PasteInTableHandler_PasteWarning=Warning during paste
PasteInTableHandler_ThePasteCommandCantBeExecuted=The paste command can't be executed
PasteSeparator_Comma=Comma
PasteSeparator_Other=Other
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/AbstractNattableCellLabelProvider.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/AbstractNattableCellLabelProvider.java
index b0aa4c976f4..1ee2c02b07e 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/AbstractNattableCellLabelProvider.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/AbstractNattableCellLabelProvider.java
@@ -1,188 +1,188 @@
-/*****************************************************************************
- * Copyright (c) 2013 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.infra.nattable.provider;
-
-import org.eclipse.jface.viewers.ILabelProviderListener;
-import org.eclipse.nebula.widgets.nattable.config.IConfigRegistry;
-import org.eclipse.nebula.widgets.nattable.grid.GridRegion;
-import org.eclipse.nebula.widgets.nattable.layer.LabelStack;
-import org.eclipse.nebula.widgets.nattable.layer.cell.ILayerCell;
-import org.eclipse.nebula.widgets.nattable.style.DisplayMode;
-import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattablelabelprovider.ILabelProviderConfiguration;
-import org.eclipse.papyrus.infra.nattable.utils.ILabelProviderContextElementWrapper;
-import org.eclipse.papyrus.infra.nattable.utils.LabelConfigurationManagementUtils;
-import org.eclipse.papyrus.infra.nattable.utils.LabelProviderCellContextElementWrapper;
-import org.eclipse.papyrus.infra.nattable.utils.LabelProviderFullCellContextElementWrapper;
-import org.eclipse.papyrus.infra.nattable.utils.NattableConfigAttributes;
-import org.eclipse.papyrus.infra.services.labelprovider.service.IFilteredLabelProvider;
-import org.eclipse.papyrus.infra.services.labelprovider.service.LabelProviderService;
-import org.eclipse.swt.graphics.Image;
-
-
-public abstract class AbstractNattableCellLabelProvider implements IFilteredLabelProvider {
-
- /**
- *
- * @see org.eclipse.papyrus.infra.services.labelprovider.service.IFilteredLabelProvider#accept(java.lang.Object)
- *
- * @param element
- * @return
- *
- */
- @Override
- public boolean accept(Object element) {
- return false;
- }
-
- /**
- *
- * @see org.eclipse.jface.viewers.ILabelProvider#getImage(java.lang.Object)
- *
- * @param element
- * @return
- *
- */
- @Override
- public Image getImage(Object element) {
- return null;
- }
-
- /**
- *
- * @see org.eclipse.jface.viewers.ILabelProvider#getText(java.lang.Object)
- *
- * @param element
- * @return
- *
- */
- @Override
- public String getText(Object element) {
- return ""; //$NON-NLS-1$
- }
-
- /**
- *
- * @see org.eclipse.jface.viewers.IBaseLabelProvider#addListener(org.eclipse.jface.viewers.ILabelProviderListener)
- *
- * @param listener
- * always throws {@link UnsupportedOperationException}
- */
- @Override
- public void addListener(ILabelProviderListener listener) {
- // throw new UnsupportedOperationException();
- }
-
- @Override
- public void dispose() {
- }
-
- /**
- *
- * @see org.eclipse.jface.viewers.IBaseLabelProvider#isLabelProperty(java.lang.Object, java.lang.String)
- *
- * @param element
- * @param property
- * @return
- * false
- */
- @Override
- public boolean isLabelProperty(Object element, String property) {
- return false;
- }
-
- /**
- *
- * @see org.eclipse.jface.viewers.IBaseLabelProvider#removeListener(org.eclipse.jface.viewers.ILabelProviderListener)
- *
- * @param listener
- * always throws {@link UnsupportedOperationException}
- */
- @Override
- public void removeListener(ILabelProviderListener listener) {
- // throw new UnsupportedOperationException();
- }
-
- /**
- *
- * @param cell
- * @param registry
- * @return
- * the row object for this cell
- */
- protected Object getRowObject(final ILayerCell cell, final IConfigRegistry registry) {
- if(cell instanceof LabelProviderFullCellContextElementWrapper){
- return ((LabelProviderFullCellContextElementWrapper) cell).getRowObject();
- }
- int rowIndex = cell.getRowIndex();
- INattableModelManager provider = getAxisContentProvider(registry);
- return provider.getRowElement(rowIndex);
- }
-
- /**
- *
- * @param cell
- * @param registry
- * @return
- * the column object for this cell
- */
- protected Object getColumnObject(final ILayerCell cell, final IConfigRegistry registry) {
- if(cell instanceof LabelProviderFullCellContextElementWrapper){
- return ((LabelProviderFullCellContextElementWrapper) cell).getColumnObject();
- }
- int columnIndex = cell.getColumnIndex();
- INattableModelManager provider = getAxisContentProvider(registry);
- return provider.getColumnElement(columnIndex);
- }
-
- /**
- *
- * @param registry
- * @return
- * the table axis element provider
- */
- protected INattableModelManager getAxisContentProvider(final IConfigRegistry registry) {
- return registry.getConfigAttribute(NattableConfigAttributes.NATTABLE_MODEL_MANAGER_CONFIG_ATTRIBUTE, DisplayMode.NORMAL, NattableConfigAttributes.NATTABLE_MODEL_MANAGER_ID);
- }
-
- /**
- *
- * @param registry
- * @return
- * the label provider service
- */
- protected LabelProviderService getLabelProviderService(final IConfigRegistry registry) {
- return registry.getConfigAttribute(NattableConfigAttributes.LABEL_PROVIDER_SERVICE_CONFIG_ATTRIBUTE, DisplayMode.NORMAL, NattableConfigAttributes.LABEL_PROVIDER_SERVICE_ID);
- }
-
- /**
- *
- * @param element
- * a label provider context element
- * @return
- * the configuration to use for this element
- */
- protected ILabelProviderConfiguration getLabelConfiguration(final LabelProviderCellContextElementWrapper element) {
- ILabelProviderConfiguration conf = null;
- final IConfigRegistry configRegistry = ((ILabelProviderContextElementWrapper) element).getConfigRegistry();
- INattableModelManager manager = configRegistry.getConfigAttribute(NattableConfigAttributes.NATTABLE_MODEL_MANAGER_CONFIG_ATTRIBUTE, DisplayMode.NORMAL, NattableConfigAttributes.NATTABLE_MODEL_MANAGER_ID);
- LabelStack labels = element.getConfigLabels();
- if (labels.hasLabel(GridRegion.COLUMN_HEADER)) {
- conf = LabelConfigurationManagementUtils.getUsedColumnObjectLabelConfiguration(manager.getTable());
- } else if (labels.hasLabel(GridRegion.ROW_HEADER)) {
- conf = LabelConfigurationManagementUtils.getUsedRowObjectLabelConfiguration(manager.getTable());
- }
- return conf;
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.nattable.provider;
+
+import org.eclipse.jface.viewers.ILabelProviderListener;
+import org.eclipse.nebula.widgets.nattable.config.IConfigRegistry;
+import org.eclipse.nebula.widgets.nattable.grid.GridRegion;
+import org.eclipse.nebula.widgets.nattable.layer.LabelStack;
+import org.eclipse.nebula.widgets.nattable.layer.cell.ILayerCell;
+import org.eclipse.nebula.widgets.nattable.style.DisplayMode;
+import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattablelabelprovider.ILabelProviderConfiguration;
+import org.eclipse.papyrus.infra.nattable.utils.ILabelProviderCellContextElementWrapper;
+import org.eclipse.papyrus.infra.nattable.utils.ILabelProviderContextElementWrapper;
+import org.eclipse.papyrus.infra.nattable.utils.LabelConfigurationManagementUtils;
+import org.eclipse.papyrus.infra.nattable.utils.LabelProviderFullCellContextElementWrapper;
+import org.eclipse.papyrus.infra.nattable.utils.NattableConfigAttributes;
+import org.eclipse.papyrus.infra.services.labelprovider.service.IFilteredLabelProvider;
+import org.eclipse.papyrus.infra.services.labelprovider.service.LabelProviderService;
+import org.eclipse.swt.graphics.Image;
+
+
+public abstract class AbstractNattableCellLabelProvider implements IFilteredLabelProvider {
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.services.labelprovider.service.IFilteredLabelProvider#accept(java.lang.Object)
+ *
+ * @param element
+ * @return
+ *
+ */
+ @Override
+ public boolean accept(Object element) {
+ return false;
+ }
+
+ /**
+ *
+ * @see org.eclipse.jface.viewers.ILabelProvider#getImage(java.lang.Object)
+ *
+ * @param element
+ * @return
+ *
+ */
+ @Override
+ public Image getImage(Object element) {
+ return null;
+ }
+
+ /**
+ *
+ * @see org.eclipse.jface.viewers.ILabelProvider#getText(java.lang.Object)
+ *
+ * @param element
+ * @return
+ *
+ */
+ @Override
+ public String getText(Object element) {
+ return ""; //$NON-NLS-1$
+ }
+
+ /**
+ *
+ * @see org.eclipse.jface.viewers.IBaseLabelProvider#addListener(org.eclipse.jface.viewers.ILabelProviderListener)
+ *
+ * @param listener
+ * always throws {@link UnsupportedOperationException}
+ */
+ @Override
+ public void addListener(ILabelProviderListener listener) {
+ // throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public void dispose() {
+ }
+
+ /**
+ *
+ * @see org.eclipse.jface.viewers.IBaseLabelProvider#isLabelProperty(java.lang.Object, java.lang.String)
+ *
+ * @param element
+ * @param property
+ * @return
+ * false
+ */
+ @Override
+ public boolean isLabelProperty(Object element, String property) {
+ return false;
+ }
+
+ /**
+ *
+ * @see org.eclipse.jface.viewers.IBaseLabelProvider#removeListener(org.eclipse.jface.viewers.ILabelProviderListener)
+ *
+ * @param listener
+ * always throws {@link UnsupportedOperationException}
+ */
+ @Override
+ public void removeListener(ILabelProviderListener listener) {
+ // throw new UnsupportedOperationException();
+ }
+
+ /**
+ *
+ * @param cell
+ * @param registry
+ * @return
+ * the row object for this cell
+ */
+ protected Object getRowObject(final ILayerCell cell, final IConfigRegistry registry) {
+ if (cell instanceof LabelProviderFullCellContextElementWrapper) {
+ return ((LabelProviderFullCellContextElementWrapper) cell).getRowObject();
+ }
+ int rowIndex = cell.getRowIndex();
+ INattableModelManager provider = getAxisContentProvider(registry);
+ return provider.getRowElement(rowIndex);
+ }
+
+ /**
+ *
+ * @param cell
+ * @param registry
+ * @return
+ * the column object for this cell
+ */
+ protected Object getColumnObject(final ILayerCell cell, final IConfigRegistry registry) {
+ if (cell instanceof LabelProviderFullCellContextElementWrapper) {
+ return ((LabelProviderFullCellContextElementWrapper) cell).getColumnObject();
+ }
+ int columnIndex = cell.getColumnIndex();
+ INattableModelManager provider = getAxisContentProvider(registry);
+ return provider.getColumnElement(columnIndex);
+ }
+
+ /**
+ *
+ * @param registry
+ * @return
+ * the table axis element provider
+ */
+ protected INattableModelManager getAxisContentProvider(final IConfigRegistry registry) {
+ return registry.getConfigAttribute(NattableConfigAttributes.NATTABLE_MODEL_MANAGER_CONFIG_ATTRIBUTE, DisplayMode.NORMAL, NattableConfigAttributes.NATTABLE_MODEL_MANAGER_ID);
+ }
+
+ /**
+ *
+ * @param registry
+ * @return
+ * the label provider service
+ */
+ protected LabelProviderService getLabelProviderService(final IConfigRegistry registry) {
+ return registry.getConfigAttribute(NattableConfigAttributes.LABEL_PROVIDER_SERVICE_CONFIG_ATTRIBUTE, DisplayMode.NORMAL, NattableConfigAttributes.LABEL_PROVIDER_SERVICE_ID);
+ }
+
+ /**
+ *
+ * @param element
+ * a label provider context element
+ * @return
+ * the configuration to use for this element
+ */
+ protected ILabelProviderConfiguration getLabelConfiguration(final ILabelProviderCellContextElementWrapper element) {
+ ILabelProviderConfiguration conf = null;
+ final IConfigRegistry configRegistry = ((ILabelProviderContextElementWrapper) element).getConfigRegistry();
+ INattableModelManager manager = configRegistry.getConfigAttribute(NattableConfigAttributes.NATTABLE_MODEL_MANAGER_CONFIG_ATTRIBUTE, DisplayMode.NORMAL, NattableConfigAttributes.NATTABLE_MODEL_MANAGER_ID);
+ LabelStack labels = element.getConfigLabels();
+ if (labels.hasLabel(GridRegion.COLUMN_HEADER)) {
+ conf = LabelConfigurationManagementUtils.getUsedColumnObjectLabelConfiguration(manager.getTable());
+ } else if (labels.hasLabel(GridRegion.ROW_HEADER)) {
+ conf = LabelConfigurationManagementUtils.getUsedRowObjectLabelConfiguration(manager.getTable());
+ }
+ return conf;
+ }
+}
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/AbstractPasteInSelectionNattableCommandProvider.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/AbstractPasteInSelectionNattableCommandProvider.java
new file mode 100644
index 00000000000..95bd8af6471
--- /dev/null
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/AbstractPasteInSelectionNattableCommandProvider.java
@@ -0,0 +1,2036 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.nattable.provider;
+
+import java.io.IOException;
+import java.io.Reader;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.MultiStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.command.CompoundCommand;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.edit.command.AddCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.emf.workspace.EMFCommandOperation;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
+import org.eclipse.gmf.runtime.emf.type.core.ElementTypeRegistry;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.jface.dialogs.ErrorDialog;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.dialogs.MessageDialogWithToggle;
+import org.eclipse.nebula.widgets.nattable.coordinate.PositionCoordinate;
+import org.eclipse.nebula.widgets.nattable.hideshow.ColumnHideShowLayer;
+import org.eclipse.nebula.widgets.nattable.hideshow.RowHideShowLayer;
+import org.eclipse.nebula.widgets.nattable.selection.SelectionLayer;
+import org.eclipse.nebula.widgets.nattable.selection.command.SelectCellCommand;
+import org.eclipse.nebula.widgets.nattable.selection.command.SelectColumnCommand;
+import org.eclipse.nebula.widgets.nattable.selection.command.SelectRowsCommand;
+import org.eclipse.papyrus.commands.CheckedOperationHistory;
+import org.eclipse.papyrus.commands.wrappers.GMFtoEMFCommandWrapper;
+import org.eclipse.papyrus.infra.nattable.Activator;
+import org.eclipse.papyrus.infra.nattable.command.ErrorTransactionalCommand;
+import org.eclipse.papyrus.infra.nattable.manager.cell.CellManagerFactory;
+import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
+import org.eclipse.papyrus.infra.nattable.messages.Messages;
+import org.eclipse.papyrus.infra.nattable.model.nattable.NattablePackage;
+import org.eclipse.papyrus.infra.nattable.model.nattable.Table;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.IAxis;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AbstractHeaderAxisConfiguration;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.IAxisConfiguration;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.IPasteConfiguration;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.NattableaxisconfigurationPackage;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.PasteEObjectConfiguration;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.TreeFillingConfiguration;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattablecell.Cell;
+import org.eclipse.papyrus.infra.nattable.parsers.CSVParser;
+import org.eclipse.papyrus.infra.nattable.parsers.CellIterator;
+import org.eclipse.papyrus.infra.nattable.parsers.RowIterator;
+import org.eclipse.papyrus.infra.nattable.paste.IValueSetter;
+import org.eclipse.papyrus.infra.nattable.paste.PastePostActionRegistry;
+import org.eclipse.papyrus.infra.nattable.utils.AxisConfigurationUtils;
+import org.eclipse.papyrus.infra.nattable.utils.AxisUtils;
+import org.eclipse.papyrus.infra.nattable.utils.CSVPasteHelper;
+import org.eclipse.papyrus.infra.nattable.utils.Constants;
+import org.eclipse.papyrus.infra.nattable.utils.ExtendedCompoundCommand;
+import org.eclipse.papyrus.infra.nattable.utils.FillingConfigurationUtils;
+import org.eclipse.papyrus.infra.nattable.utils.InsertedElementInNattable;
+import org.eclipse.papyrus.infra.nattable.utils.TableEditingDomainUtils;
+import org.eclipse.papyrus.infra.nattable.utils.TableSelectionWrapper;
+import org.eclipse.papyrus.infra.nattable.utils.UserActionConstants;
+import org.eclipse.papyrus.infra.tools.converter.AbstractStringValueConverter;
+import org.eclipse.papyrus.infra.widgets.util.ImageConstants;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.progress.UIJob;
+
+/**
+ * This class manage the paste in tree table when a selection is available.
+ */
+public abstract class AbstractPasteInSelectionNattableCommandProvider implements PasteNattableCommandProvider {
+
+ /**
+ * The paste rows job name.
+ */
+ private static final String PASTE_ROWS_JOB_NAME = Messages.PasteEObjectAxisInTableCommandProvider_PasteRows;
+
+ /**
+ * The paste action job name.
+ */
+ private static final String PASTE_ACTION_TASK_NAME = Messages.PasteEObjectAxisInTableCommandProvider_PasteAction;
+
+ /**
+ * The command has been cancelled label.
+ */
+ private static final String PASTE_COMMAND_HAS_BEEN_CANCELLED = Messages.PasteEObjectAxisInTableCommandProvider_CommandCreationHasBeenCancelled;
+
+ /**
+ * The command can't be executed label.
+ */
+ private static final String PASTE_COMMAND_CANT_BE_EXECUTED = Messages.AbstractPasteInSelectionNattableCommandProvider_TheCommandCantBeExecuted;
+
+ /**
+ * The paste command name.
+ */
+ private static final String PASTE_COMMAND_NAME = Messages.PasteEObjectAxisInTableCommandProvider_PasteFromStringCommand;
+
+
+ /**
+ * the table manager
+ */
+ protected INattableModelManager tableManager;
+
+ /**
+ * the list of the post actions do do
+ */
+ protected List<String> postActions;
+
+ /**
+ * the paste helper
+ */
+ protected final CSVPasteHelper pasteHelper;
+
+ /**
+ * the converter map
+ */
+ protected final Map<Class<? extends AbstractStringValueConverter>, AbstractStringValueConverter> existingConverters;
+
+ /**
+ * We refresh the dialog each X read char
+ */
+ private final int refreshEachReadChar = 1000;
+
+ /**
+ * the reader to parse
+ */
+ protected final Reader reader;
+
+ /**
+ * the parser to use
+ */
+ protected final CSVParser parser;
+
+ /**
+ * If true, we are pasting in detached mode
+ */
+ protected boolean detachedMode;
+
+ /**
+ * If <code>true</code> the command can't be created and executed
+ */
+ private boolean isDisposed = false;
+
+ /**
+ * The current table.
+ */
+ protected final Table table;
+
+ /**
+ * The table editing domain.
+ */
+ protected final TransactionalEditingDomain tableEditingDomain;
+
+ /**
+ * The context editing domain.
+ */
+ protected final TransactionalEditingDomain contextEditingDomain;
+
+ /**
+ * The table context.
+ */
+ protected final EObject tableContext;
+
+ /**
+ * The number of operation to do.
+ */
+ private final int nbOperationsToDo;
+
+ /**
+ * The current selection in the table.
+ */
+ protected TableSelectionWrapper tableSelectionWrapper;
+
+ /**
+ * This allows to determinate if a single axis is pasted and must be repeat.
+ */
+ protected boolean isSingleAxisPasted = false;
+
+ /**
+ * This allows to determinate how much axis must be repeat when a single axis is pasted.
+ */
+ protected long numberSelectedAxis = 0;
+
+ /**
+ * This allows to store the values of the pasted text.
+ */
+ protected Map<Object, List<String>> pastedValues = null;
+
+ /**
+ * The first row position need to select the cells after paste.
+ */
+ private int firstRowPosition = 0;
+
+ /**
+ * The first column position need to select the cells after paste.
+ */
+ private int firstColumnPosition = 0;
+
+ /**
+ * The last row position need to select the cells after paste.
+ */
+ private int lastRowPosition = 0;
+
+ /**
+ * The last column position need to select the cells after paste.
+ */
+ private int lastColumnPosition = 0;
+
+ /**
+ * This allows to manage the status result in job (and avoid the dialog opened by eclipse worker)
+ */
+ protected IStatus statusResult = null;
+
+ /**
+ * Determinate if the paste is a column paste.
+ */
+ protected boolean pasteColumn;
+
+ /**
+ * Determinate if the pasted objects must be inserted if not exist.
+ */
+ protected boolean isInsert;
+
+ /**
+ * This allows to determinate the current action used by a user in the case of insert.
+ */
+ protected int currentUserAction = UserActionConstants.UNDEFINED_USER_ACTION;
+
+ /**
+ * This allows to keep the action used by user in the case of insert and with the 'apply to all' choice.
+ */
+ protected int userAction = UserActionConstants.UNDEFINED_USER_ACTION;
+
+ /**
+ * Constructor.
+ *
+ * @param tableManager
+ * The nattable model manager.
+ * @param pasteColumn
+ * Boolean to determinate if this is a paste in column.
+ * @param isInsert
+ * Boolean to determinate if this is an insert action.
+ * @param axisAsIdentifier
+ * The axis used ad identifier.
+ * @param reader
+ * The reader of the pasted text.
+ * @param pasteHelper
+ * The paste helper.
+ * @param tableSelectionWrapper
+ * The selection as table selection wrapper.
+ * @param preferredUserAction
+ * The preferred user action for the insert row action.
+ * @param totalSize
+ * The total size of pasted elements.
+ */
+ public AbstractPasteInSelectionNattableCommandProvider(final INattableModelManager tableManager, final boolean pasteColumn, final boolean isInsert, final Reader reader, final CSVPasteHelper pasteHelper,
+ final TableSelectionWrapper tableSelectionWrapper, final int preferredUserAction, final long totalSize) {
+ this.tableManager = tableManager;
+ this.existingConverters = new HashMap<Class<? extends AbstractStringValueConverter>, AbstractStringValueConverter>();
+ this.pasteHelper = pasteHelper;
+ this.reader = reader;
+ this.table = tableManager.getTable();
+ this.tableContext = table.getContext();
+ this.tableEditingDomain = TableEditingDomainUtils.getTableEditingDomain(table);
+ this.contextEditingDomain = TableEditingDomainUtils.getTableContextEditingDomain(table);
+ this.tableSelectionWrapper = tableSelectionWrapper;
+ this.numberSelectedAxis = 0;
+ this.isSingleAxisPasted = false;
+ this.pastedValues = new LinkedHashMap<Object, List<String>>();
+ this.pasteColumn = pasteColumn;
+ this.isInsert = isInsert;
+ this.userAction = preferredUserAction;
+ long div = -1;
+ if (totalSize > Integer.MAX_VALUE) {
+ div = totalSize / Integer.MAX_VALUE;
+ if (div > Integer.MAX_VALUE) {
+ div = 2 * div;
+ }
+ this.nbOperationsToDo = (int) (totalSize / div);
+ } else {
+ this.nbOperationsToDo = (int) totalSize;
+ }
+ this.parser = this.pasteHelper.createParser(reader);
+ init();
+ }
+
+ /**
+ * Initialize the field of this class.
+ */
+ protected abstract void init();
+
+ /**
+ * Get the paste configuration for the depth.
+ *
+ * @param depth
+ * The depth searched.
+ * @return The paste configuration for the depth.
+ */
+ protected List<IPasteConfiguration> getPasteConfigurationFor(final int depth) {
+ final List<IPasteConfiguration> pasteConfs = new ArrayList<IPasteConfiguration>();
+ if (depth == 0 && FillingConfigurationUtils.hasTreeFillingConfigurationForDepth(table, depth)) {
+ final IPasteConfiguration conf = (IPasteConfiguration) AxisConfigurationUtils.getIAxisConfigurationUsedInTable(tableManager.getTable(), NattableaxisconfigurationPackage.eINSTANCE.getPasteEObjectConfiguration(), false);
+ pasteConfs.add(conf);
+ }
+ if (pasteConfs.isEmpty()) {
+ for (final TreeFillingConfiguration current : FillingConfigurationUtils.getAllTreeFillingConfiguration(table)) {
+ if (current.getDepth() == depth) {
+ final IPasteConfiguration pasteConf = current.getPasteConfiguration();
+ Assert.isNotNull(pasteConf);// must not be null here! (so must be verified before
+ pasteConfs.add(pasteConf);
+ }
+ }
+ }
+ return pasteConfs;
+ }
+
+ /**
+ * Get the paste configuration for the depth and the category name.
+ *
+ * @param depth
+ * The depth searched.
+ * @param categoryName
+ * The category name searched.
+ * @returnThe paste configuration for the depth and the category name.
+ */
+ protected IPasteConfiguration getPasteConfigurationsFor(final int depth, final String categoryName) {
+ if (depth == 0 && !FillingConfigurationUtils.hasTreeFillingConfigurationForDepth(table, 0)) {
+ AbstractHeaderAxisConfiguration conf = table.getLocalRowHeaderAxisConfiguration();
+ if (null != conf) {
+ conf = table.getTableConfiguration().getRowHeaderAxisConfiguration();
+ }
+ final List<TreeFillingConfiguration> filling = FillingConfigurationUtils.getAllTreeFillingConfigurationForDepth(table, depth);
+ final List<IAxisConfiguration> referencedPasteConf = new ArrayList<IAxisConfiguration>();
+ for (final TreeFillingConfiguration tmp : filling) {
+ if (null != tmp.getPasteConfiguration()) {
+ referencedPasteConf.add(tmp.getPasteConfiguration());
+ }
+ }
+ for (final IAxisConfiguration axisConf : conf.getOwnedAxisConfigurations()) {
+ if (axisConf instanceof IPasteConfiguration && !referencedPasteConf.contains(axisConf)) {
+ return (IPasteConfiguration) axisConf;
+ }
+ }
+ }
+ for (final TreeFillingConfiguration curr : FillingConfigurationUtils.getAllTreeFillingConfiguration(table)) {
+ if (curr.getDepth() == depth) {
+ if (null == categoryName || categoryName.isEmpty()) {
+ return curr.getPasteConfiguration();
+ } else {
+ String featureName = curr.getAxisUsedAsAxisProvider().getAlias();
+ if (null == featureName || "".equals(featureName)) {
+ final Object element = curr.getAxisUsedAsAxisProvider().getElement();
+ // TODO : doesn't work for stereotype propertyes
+ // TODO : use label provider
+ if (element instanceof EStructuralFeature) {
+ featureName = ((EStructuralFeature) element).getName();
+ }
+ }
+ if (categoryName.equals(featureName)) {
+ return curr.getPasteConfiguration();
+ }
+
+ }
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Returns <code>true</code> if the configuration is in the detached mode, <code>false</code> otherwise.
+ *
+ * @param table
+ * The table.
+ * @return <code>true</code> if the configuration is in the detached mode, <code>false</code> otherwise.
+ */
+ protected boolean isPasteInDetachedMode(final Table table) {
+ final List<IPasteConfiguration> confs = getPasteConfigurationFor(0);
+ for (final IPasteConfiguration current : confs) {
+ if (null != current && current.isDetachedMode()) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.infra.nattable.provider.PasteNattableCommandProvider#executePasteFromStringCommand(boolean)
+ */
+ @Override
+ public IStatus executePasteFromStringCommand(final boolean useProgressMonitor, final boolean openDialog) {
+ IStatus resultStatus = Status.OK_STATUS;
+ if (this.isDisposed) {
+ throw new RuntimeException("The command provider is disposed"); //$NON-NLS-1$
+ }
+ final String pasteJobName = PASTE_ROWS_JOB_NAME;
+ if (this.detachedMode) {
+ resultStatus = executePasteFromStringCommand(useProgressMonitor, openDialog, pasteJobName, false);
+ } else {
+ resultStatus = executePasteFromStringCommand(useProgressMonitor, openDialog, pasteJobName, true);
+ }
+
+ return resultStatus;
+ }
+
+ /**
+ * This allows to execute the paste after create the paste command.
+ *
+ * @param useProgressMonitor
+ * Boolean to determinate if the progress monitor must be used.
+ * @param openDialog
+ * Determinate if the dialog must be opened during the process.
+ * @param pasteJobName
+ * The paste job name.
+ * @param attachedMode
+ * Boolean to determinate if the command must be executed in attached mode or in detached mode.
+ * @return The status corresponding to the action.
+ */
+ protected IStatus executePasteFromStringCommand(final boolean useProgressMonitor, final boolean openDialog, final String pasteJobName, final boolean attachedMode) {
+ IStatus resultStatus = Status.OK_STATUS;
+
+ // the map used to share objects between the paste action and the cell value managers
+ Map<Object, Object> currentSharedMap = null;
+ if (!attachedMode) {
+ currentSharedMap = new HashMap<Object, Object>();
+ // the map used to store useful information for the paste
+ currentSharedMap.put(Constants.PASTED_ELEMENT_CONTAINER_KEY, tableContext);
+ currentSharedMap.put(Constants.REFERENCES_TO_SET_KEY, new ArrayList<IValueSetter>());
+ currentSharedMap.put(Constants.CELLS_TO_ADD_KEY, new ArrayList<Cell>());
+ currentSharedMap.put(Constants.ADDITIONAL_POST_ACTIONS_TO_CONCLUDE_PASTE_KEY, new ArrayList<String>());
+ }
+ final Map<Object, Object> sharedMap = currentSharedMap;
+
+ if (!useProgressMonitor) {
+ final ICommand pasteCommand = getPasteFromStringCommand(contextEditingDomain, tableEditingDomain, openDialog, new NullProgressMonitor(), sharedMap, attachedMode);
+ try {
+ CheckedOperationHistory.getInstance().execute(pasteCommand, new NullProgressMonitor(), null);
+ resultStatus = pasteCommand.getCommandResult().getStatus();
+
+ } catch (final ExecutionException e) {
+ resultStatus = new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.AbstractPasteInSelectionNattableCommandProvider_AnExceptionOccuredDuringThePaste, e);
+ }
+ if (null != sharedMap) {
+ sharedMap.clear();
+ }
+ } else {
+ // we create a job in order to don't freeze the UI
+ final UIJob job = new UIJob(pasteJobName) {
+
+ @Override
+ public IStatus runInUIThread(final IProgressMonitor monitor) {
+ statusResult = Status.OK_STATUS;
+
+ final ICommand pasteCommand = getPasteFromStringCommand(contextEditingDomain, tableEditingDomain, openDialog, monitor, sharedMap, attachedMode);
+ if (null == pasteCommand) {
+ statusResult = new Status(IStatus.CANCEL, Activator.PLUGIN_ID, PASTE_COMMAND_HAS_BEEN_CANCELLED);
+ } else {
+ // we execute the paste command
+ if (pasteCommand.canExecute()) {
+ try {
+ if (attachedMode) {
+ final EMFCommandOperation op = new EMFCommandOperation(contextEditingDomain, new GMFtoEMFCommandWrapper(pasteCommand));
+ CheckedOperationHistory.getInstance().execute(op, monitor, null);
+ } else {
+ CheckedOperationHistory.getInstance().execute(pasteCommand, monitor, null);
+ }
+ statusResult = pasteCommand.getCommandResult().getStatus();
+
+ } catch (final ExecutionException e) {
+ statusResult = new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.AbstractPasteInSelectionNattableCommandProvider_AnExceptionOccuredDuringThePaste, e);
+ } finally {
+ if (null != sharedMap) {
+ sharedMap.clear();
+ }
+ }
+ monitor.done();
+ } else {
+ if (null != sharedMap) {
+ sharedMap.clear();
+ }
+ statusResult = new Status(IStatus.ERROR, Activator.PLUGIN_ID, PASTE_COMMAND_CANT_BE_EXECUTED);
+ }
+ }
+
+ // Select the modified cells if the status is not ERROR or CANCEL
+ if (canContinue(statusResult)) {
+ // The lastColumnPosition and the lastRowPosition was calculated from the number of columns and rows read, so we need to decrement them
+ lastColumnPosition--;
+ lastRowPosition--;
+
+ final SelectionLayer selectionLayer = tableManager.getBodyLayerStack().getSelectionLayer();
+ // If no selection is available, don't select any cells because the modified cells can be discontinuous
+ if (null != tableSelectionWrapper) {
+ if (!tableSelectionWrapper.getFullySelectedRows().isEmpty()) {
+ // Select the first row
+ selectionLayer.doCommand(new SelectRowsCommand(selectionLayer, 0, firstRowPosition, false, false));
+
+ // Select the last column position if more than one column modified with Shift mask
+ if (firstRowPosition != lastRowPosition) {
+ selectionLayer.doCommand(new SelectRowsCommand(selectionLayer, 0, lastRowPosition, true, false));
+ }
+ } else if (!tableSelectionWrapper.getFullySelectedColumns().isEmpty() && pasteColumn) {
+
+ // Select the first column
+ selectionLayer.doCommand(new SelectColumnCommand(selectionLayer, firstColumnPosition, 0, false, false));
+
+ // Select the last column position if more than one column modified with Shift mask
+ if (firstColumnPosition != lastColumnPosition) {
+ selectionLayer.doCommand(new SelectColumnCommand(selectionLayer, lastColumnPosition, 0, true, false));
+ }
+ } else {
+
+ // Select the modified cells
+ selectionLayer.doCommand(new SelectCellCommand(selectionLayer, firstColumnPosition, firstRowPosition, false, false));
+
+ // Select the last cell position if more than one cell modified with Shift mask
+ if (firstColumnPosition != lastColumnPosition || firstRowPosition != lastRowPosition) {
+ selectionLayer.doCommand(new SelectCellCommand(selectionLayer, lastColumnPosition, lastRowPosition, true, false));
+ }
+ }
+ }
+ }
+
+ tableManager = null;
+ tableSelectionWrapper = null;
+
+ if (openDialog) {
+ displayDialog(statusResult);
+ }
+
+ return Status.OK_STATUS;
+ }
+ };
+ job.setUser(true);
+ job.schedule();
+
+ resultStatus = statusResult;
+ }
+
+ return resultStatus;
+ }
+
+ /**
+ * This allows to display the error message when this is a paste configuration error type.
+ *
+ * @param result
+ * the result status of the paste process
+ */
+ protected void displayDialog(final IStatus result) {
+ if (null != result) {
+ // If the error is caracterized by the paste configuration error status, use the dialog concerning the paste configuration error
+ if (IStatus.OK != result.getSeverity()) {
+ String messageDialog = null;
+ switch (result.getSeverity()) {
+ case IStatus.INFO:
+ messageDialog = Messages.PasteInTableHandler_PasteInformation;
+ break;
+ case IStatus.WARNING:
+ messageDialog = Messages.PasteInTableHandler_PasteWarning;
+ break;
+ case IStatus.ERROR:
+ messageDialog = Messages.PasteInTableHandler_PasteError;
+ break;
+ case IStatus.CANCEL:
+ messageDialog = Messages.PasteInTableHandler_PasteCancelled;
+ break;
+ }
+
+ final ErrorDialog errorDialog = new ErrorDialog(Display.getDefault().getActiveShell(), Messages.PasteImportStatusDialog_ImportPasteDialogTitle, messageDialog, result, IStatus.OK
+ | IStatus.INFO | IStatus.WARNING | IStatus.ERROR) {
+
+ /**
+ * Redefine this method to manage the papyrus icon in shell.
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.jface.dialogs.ErrorDialog#configureShell(org.eclipse.swt.widgets.Shell)
+ */
+ @Override
+ protected void configureShell(Shell shell) {
+ super.configureShell(shell);
+ shell.setImage(org.eclipse.papyrus.infra.widgets.Activator.getDefault().getImage(ImageConstants.PAPYRUS_ICON_PATH));
+ }
+ };
+ errorDialog.open();
+ }
+ }
+ }
+
+ /**
+ * Get the paste command.
+ *
+ * @param contextEditingDomain
+ * The context editing domain.
+ * @param tableEditingDomain
+ * The table editing domain.
+ * @param openDialog
+ * Determinate if the dialog must be opened during the process.
+ * @param progressMonitor
+ * The progress monitor.
+ * @param sharedMap
+ * The map used to share objects between the paste action and the cell value managers
+ * @param attachedMode
+ * Boolean to determinate if the command must be executed in attached mode or in detached mode.
+ * @return The status corresponding to the command.
+ */
+ protected ICommand getPasteFromStringCommand(final TransactionalEditingDomain contextEditingDomain, final TransactionalEditingDomain tableEditingDomain, final boolean openDialog, final IProgressMonitor progressMonitor, final Map<Object, Object> sharedMap,
+ final boolean attachedMode) {
+ ICommand resultCommand = null;
+ if (null == tableSelectionWrapper) {
+ final IStatus canPasteStatus = canPasteWithoutSelection();
+ if (IStatus.ERROR != canPasteStatus.getSeverity()) {
+ resultCommand = getPasteRowsFromStringCommand(contextEditingDomain, tableEditingDomain, null, openDialog, progressMonitor, sharedMap, attachedMode);
+ } else {
+ resultCommand = new ErrorTransactionalCommand(contextEditingDomain, PASTE_COMMAND_NAME, null, canPasteStatus);
+ }
+ } else {
+ final Map<Integer, Object> fullySelectedRows = tableSelectionWrapper.getFullySelectedRows();
+ if (!fullySelectedRows.isEmpty()) {
+ // Check if this is possible to paste the rows
+ final IStatus canPasteStatus = canPasteRows(fullySelectedRows);
+ if (IStatus.ERROR != canPasteStatus.getSeverity()) {
+ resultCommand = getPasteRowsFromStringCommand(contextEditingDomain, tableEditingDomain, fullySelectedRows, openDialog, progressMonitor, sharedMap, attachedMode);
+ } else {
+ resultCommand = new ErrorTransactionalCommand(contextEditingDomain, PASTE_COMMAND_NAME, null, canPasteStatus);
+ }
+ } else {
+ final Map<Integer, Object> fullySelectedColumns = tableSelectionWrapper.getFullySelectedColumns();
+ if (!fullySelectedColumns.isEmpty() && pasteColumn) {
+ // Check if this is possible to paste the columns
+ final IStatus canPasteStatus = canPasteColumns(fullySelectedColumns);
+ if (IStatus.ERROR != canPasteStatus.getSeverity()) {
+ resultCommand = getPasteColumnsFromStringCommand(contextEditingDomain, tableEditingDomain, fullySelectedColumns, openDialog, progressMonitor, sharedMap, attachedMode);
+ } else {
+ resultCommand = new ErrorTransactionalCommand(contextEditingDomain, PASTE_COMMAND_NAME, null, canPasteStatus);
+ }
+ } else {
+ final Collection<PositionCoordinate> selectedCells = tableSelectionWrapper.getSelectedCells();
+ if (!selectedCells.isEmpty()) {
+ // Check if this is possible to paste the cells
+ final IStatus canPasteStatus = canPasteCells(selectedCells);
+ if (Status.ERROR != canPasteStatus.getSeverity()) {
+ resultCommand = getPasteCellsRowFromStringCommand(contextEditingDomain, tableEditingDomain, selectedCells, openDialog, progressMonitor, sharedMap, attachedMode);
+ } else {
+ resultCommand = new ErrorTransactionalCommand(contextEditingDomain, PASTE_COMMAND_NAME, null, canPasteStatus);
+ }
+ }
+ }
+ }
+ }
+ return resultCommand;
+ }
+
+ /**
+ * This allows to manage if the cells can be pasted.
+ *
+ * @param selectedCells
+ * The selected cells in table.
+ * @return OK status if the paste can be done, ERROR otherwise.
+ */
+ protected IStatus canPasteWithoutSelection() {
+ IStatus result = Status.OK_STATUS;
+
+ // Get the pasted text
+ final RowIterator rowIter = parser.parse();
+
+ // Calculate the number of read rows and columns from the pasted elements
+ // To calculate this :
+ // - Loop on rows and increment
+ // - Calculate the number of columns by rows and get the maximum columns
+ int nbRowRead = -1;
+ int nbColumnRead = 0;
+ while (rowIter.hasNext()) {
+ final List<String> valuesByRow = new ArrayList<String>();
+ final CellIterator cellIter = rowIter.next();
+ int nbColumnReadByRow = 0;
+ if (cellIter.hasNext()) {
+ while (cellIter.hasNext()) {
+ valuesByRow.add(cellIter.next());
+ nbColumnReadByRow++;
+ }
+ }
+ nbColumnRead = nbColumnRead >= nbColumnReadByRow ? nbColumnRead : nbColumnReadByRow;
+ nbRowRead++;
+
+ // Don't add the last row because the last rowIter is a blank line
+ if (rowIter.hasNext()) {
+ pastedValues.put(nbRowRead, valuesByRow);
+ }
+ }
+
+ if (tableManager.getColumnCount() != nbColumnRead) {
+ result = new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.AbstractPasteInSelectionNattableCommandProvider_readcolumnsexceedsexistingcolumns);
+ }
+
+ return result;
+ }
+
+ /**
+ * This allows to manage if the cells can be pasted.
+ *
+ * @param selectedCells
+ * The selected cells in table.
+ * @return OK status if the paste can be done, ERROR otherwise.
+ */
+ protected IStatus canPasteCells(final Collection<PositionCoordinate> selectedCells) {
+ IStatus result = Status.OK_STATUS;
+
+ // Get the pasted text
+ final RowIterator rowIter = parser.parse();
+
+ // Calculate the number of read rows and columns from the pasted elements
+ // To calculate this :
+ // - Loop on rows and increment
+ // - Calculate the number of columns by rows and get the maximum columns
+ int nbRowRead = -1;
+ int nbColumnRead = 0;
+ while (rowIter.hasNext()) {
+ final List<String> valuesByRow = new ArrayList<String>();
+ final CellIterator cellIter = rowIter.next();
+ int nbColumnReadByRow = 0;
+ if (cellIter.hasNext()) {
+ while (cellIter.hasNext()) {
+ valuesByRow.add(cellIter.next());
+ nbColumnReadByRow++;
+ }
+ }
+ nbColumnRead = nbColumnRead >= nbColumnReadByRow ? nbColumnRead : nbColumnReadByRow;
+ nbRowRead++;
+
+ // Don't add the last row because the last rowIter is a blank line
+ if (rowIter.hasNext()) {
+ pastedValues.put(nbRowRead, valuesByRow);
+ }
+ }
+
+ // If a unique cell is selected, replace all rows and columns from the selection
+ if (selectedCells.size() > 1) {
+ // Calculate the number of cells selected by rows and columns
+ // To calculate this :
+ // - Get the minimum coordinate
+ // - Get the maximum coordinate
+ // - Calculate the rows and columns by substract of (max - min)
+ final Iterator<PositionCoordinate> selectedCellsIterator = selectedCells.iterator();
+ PositionCoordinate minCoordinate = null;
+ PositionCoordinate maxCoordinate = null;
+ while (selectedCellsIterator.hasNext()) {
+ final PositionCoordinate currentSelectedCell = selectedCellsIterator.next();
+ if (null == minCoordinate || (minCoordinate.getRowPosition() > currentSelectedCell.getRowPosition() || minCoordinate.getColumnPosition() > currentSelectedCell.getColumnPosition())) {
+ minCoordinate = currentSelectedCell;
+ }
+
+ if (null == maxCoordinate || (maxCoordinate.getRowPosition() < currentSelectedCell.getRowPosition() || maxCoordinate.getColumnPosition() < currentSelectedCell.getColumnPosition())) {
+ maxCoordinate = currentSelectedCell;
+ }
+ }
+ final int nbRowSelected = maxCoordinate.getRowPosition() - minCoordinate.getRowPosition() + 1;
+ final int nbColumnSelected = maxCoordinate.getColumnPosition() - minCoordinate.getColumnPosition() + 1;
+
+ // Check the number of rows and columns selected and to paste
+ // 3 Cases to manage :
+ // - The rows and columns numbers are equals -> Continue
+ // - The rows and/or columns numbers are not equals -> Stop and display error
+ // - The columns numbers are equals and rows number read is equals to 1 -> Continue and repeat the row pasted
+ if (nbRowRead > 1 && nbRowRead != nbRowSelected) {
+ result = new Status(Status.ERROR, Activator.PLUGIN_ID, Messages.AbstractPasteInSelectionNattableCommandProvider_readrowsexceedsexistingrows);
+ } else if (nbColumnRead != nbColumnSelected) {
+ result = new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.AbstractPasteInSelectionNattableCommandProvider_readcolumnsexceedsexistingcolumns);
+ } else if (1 == nbRowRead) {
+ this.isSingleAxisPasted = true;
+ this.numberSelectedAxis = nbRowSelected;
+ }
+ }
+
+ return result;
+ }
+
+ /**
+ * This allows to manage if the rows can be pasted.
+ *
+ * @param rows
+ * The selected rows in table (position and object).
+ * @return OK status if the paste can be done, ERROR otherwise.
+ */
+ protected IStatus canPasteRows(final Map<Integer, Object> rows) {
+ IStatus result = Status.OK_STATUS;
+
+ // Get the pasted text
+ final RowIterator rowIter = parser.parse();
+
+ // Calculate the number of read rows and columns from the pasted elements
+ // To calculate this :
+ // - Loop on rows and increment
+ // - Calculate the number of columns by rows and get the maximum columns
+ int nbRowRead = -1;
+ int nbColumnRead = 0;
+ while (rowIter.hasNext()) {
+ final List<String> valuesByRow = new ArrayList<String>();
+ final CellIterator cellIter = rowIter.next();
+ int nbColumnReadByRow = 0;
+ if (cellIter.hasNext()) {
+ while (cellIter.hasNext()) {
+ valuesByRow.add(cellIter.next());
+ nbColumnReadByRow++;
+ }
+ }
+ nbColumnRead = nbColumnRead >= nbColumnReadByRow ? nbColumnRead : nbColumnReadByRow;
+ nbRowRead++;
+
+ // Don't add the last row because the last rowIter is a blank line
+ if (rowIter.hasNext()) {
+ pastedValues.put(nbRowRead, valuesByRow);
+ }
+ }
+
+ final int nbRowsSelected = rows.size();
+ final int nbColumnsSelected = tableManager.getBodyLayerStack().getRowHideShowLayer().getColumnCount();
+
+ // Check the number of rows and columns selected and to paste
+ // 3 Cases to manage :
+ // - The rows numbers are not equals -> Error
+ // - The columns numbers are not equals -> Error
+ // - In other cases -> Continue
+ if (nbColumnsSelected != nbColumnRead) {
+ result = new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.AbstractPasteInSelectionNattableCommandProvider_readcolumnsexceedsexistingcolumns);
+ } else if (nbRowRead != nbRowsSelected) {
+ result = new Status(Status.ERROR, Activator.PLUGIN_ID, Messages.AbstractPasteInSelectionNattableCommandProvider_readrowsexceedsexistingrows);
+ }
+
+ return result;
+ }
+
+ /**
+ * This allows to manage if the columns can be pasted.
+ *
+ * @param columns
+ * The selected columns in table (position and object).
+ * @return OK status if the paste can be done, ERROR otherwise.
+ */
+ protected IStatus canPasteColumns(final Map<Integer, Object> columns) {
+ IStatus result = Status.OK_STATUS;
+
+ // Get the pasted text
+ final RowIterator rowIter = parser.parse();
+
+ // Calculate the number of read rows and columns from the pasted elements
+ // To calculate this :
+ // - Loop on rows and increment
+ // - Calculate the number of columns by rows and get the maximum columns
+ // Store the values by column (instead of rows for others)
+ int nbRowRead = -1;
+ int nbColumnRead = 0;
+ while (rowIter.hasNext()) {
+ final CellIterator cellIter = rowIter.next();
+ int nbColumnReadByRow = 0;
+ if (cellIter.hasNext()) {
+ while (cellIter.hasNext()) {
+ if (null == pastedValues.get(nbColumnReadByRow)) {
+ pastedValues.put(nbColumnReadByRow, new ArrayList<String>());
+ }
+ pastedValues.get(nbColumnReadByRow).add(cellIter.next());
+ nbColumnReadByRow++;
+ }
+ } else {
+ if (null == pastedValues.get(nbColumnReadByRow)) {
+ pastedValues.put(nbColumnReadByRow, new ArrayList<String>());
+ }
+ pastedValues.get(nbColumnReadByRow).add(null);
+ }
+ nbColumnRead = nbColumnRead >= nbColumnReadByRow ? nbColumnRead : nbColumnReadByRow;
+ nbRowRead++;
+ }
+
+ final int nbRowsSelected = tableManager.getBodyLayerStack().getRowHideShowLayer().getRowCount();
+ final int nbColumnsSelected = columns.size();
+
+ // Check the number of rows and columns selected and to paste
+ // 3 Cases to manage :
+ // - The rows numbers are not equals -> Error
+ // - The column read is alone -> Continue and repeat the column pasted
+ // - The columns numbers are not equals -> Error
+ if (nbRowRead != nbRowsSelected) {
+ result = new Status(Status.ERROR, Activator.PLUGIN_ID, Messages.AbstractPasteInSelectionNattableCommandProvider_readrowsexceedsexistingrows);
+ } else if (1 == nbColumnRead && 1 < nbColumnsSelected) {
+ this.isSingleAxisPasted = true;
+ this.numberSelectedAxis = nbColumnsSelected;
+ } else if (nbColumnRead != nbColumnsSelected) {
+ result = new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.AbstractPasteInSelectionNattableCommandProvider_readcolumnsexceedsexistingcolumns);
+ }
+
+ return result;
+ }
+
+ /**
+ * Get the paste action for the cells paste for rows paste.
+ *
+ * @param contextEditingDomain
+ * The context editing domain.
+ * @param tableEditingDomain
+ * The table editing domain.
+ * @param selectedCells
+ * The selected cells.
+ * @param openDialog
+ * Determinate if the dialog must be opened during the process.
+ * @param progressMonitor
+ * The progress monitor.
+ * @param sharedMap
+ * The shared map.
+ * @param attachedMode
+ * Boolean to determinate if the command must be executed with the attached mode or with the detached mode.
+ * @return The command for the paste action.
+ */
+ protected ICommand getPasteCellsRowFromStringCommand(final TransactionalEditingDomain contextEditingDomain, final TransactionalEditingDomain tableEditingDomain, final Collection<PositionCoordinate> selectedCells,
+ final boolean openDialog, final IProgressMonitor progressMonitor, final Map<Object, Object> sharedMap, final boolean attachedMode) {
+ // initialize the progress monitor
+ if (null != progressMonitor) {
+ progressMonitor.beginTask(PASTE_ACTION_TASK_NAME, this.nbOperationsToDo);
+ }
+
+ // 2.2 create the creation request and find the command provider
+ final ICommand pasteAllCommand = new AbstractTransactionalCommand(contextEditingDomain, PASTE_COMMAND_NAME, null) {
+
+ /**
+ * @see org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand#doExecuteWithResult(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
+ *
+ * @param monitor
+ * @param info
+ * @return
+ * @throws ExecutionException
+ */
+ @Override
+ protected CommandResult doExecuteWithResult(final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
+ MultiStatus resultStatus = new MultiStatus(Activator.PLUGIN_ID, IStatus.OK, Messages.AbstractPasteInSelectionNattableCommandProvider_ThePasteHasBeenDoneWithSomeProblems, null);
+
+ long readChar = 0;
+ long previousreadChar = 0;
+
+ // Iterate on selected cells iterator at the same time that on cells
+ final PositionCoordinate firstpositionCoordinate = selectedCells.iterator().next();
+ firstRowPosition = firstpositionCoordinate.getRowPosition();
+ firstColumnPosition = firstpositionCoordinate.getColumnPosition();
+ lastRowPosition = firstRowPosition;
+ lastColumnPosition = firstColumnPosition;
+
+ // Get the hide show layer to calculate the index from the position
+ final RowHideShowLayer rowHideShowLayer = tableManager.getBodyLayerStack().getRowHideShowLayer();
+ final ColumnHideShowLayer columnHideShowLayer = tableManager.getBodyLayerStack().getColumnHideShowLayer();
+
+ // Create the compound command for the paste action
+ final CompoundCommand compoundCommand = new CompoundCommand("Paste action"); //$NON-NLS-1$
+
+ final Iterator<Object> rowIter = pastedValues.keySet().iterator();
+
+ Collection<String> rowValuesAsString = new ArrayList<String>();
+
+ // Loop on each row
+ while (((!isSingleAxisPasted && rowIter.hasNext()) || (isSingleAxisPasted && numberSelectedAxis > 0)) && canContinue(resultStatus)) {
+ if (isSingleAxisPasted) {
+ numberSelectedAxis--;
+ }
+
+ if (!(isSingleAxisPasted && firstRowPosition < lastRowPosition)) {
+ rowValuesAsString = pastedValues.get(rowIter.next());
+ }
+
+ // To avoid blank lines
+ if (!rowValuesAsString.isEmpty()) {
+ int nbColmnRead = firstColumnPosition;
+ final Iterator<String> cellIter = rowValuesAsString.iterator();
+
+ // Check if the progress monitor catch a cancel click
+ if (null != progressMonitor && progressMonitor.isCanceled()) {
+ progressMonitor.done();
+ localDispose();
+ return CommandResult.newCancelledCommandResult();
+ }
+
+ readChar = readChar + (parser.getReadCharacters() - previousreadChar);
+ previousreadChar = parser.getReadCharacters();
+
+ if (null != progressMonitor && readChar > refreshEachReadChar) {
+ readChar = 0;
+ progressMonitor.worked(refreshEachReadChar);
+ }
+
+ // Get the row index from its position
+ int realRowIndex = rowHideShowLayer.getRowIndexByPosition(lastRowPosition);
+ // Get the row element from its index
+ final Object rowElement = AxisUtils.getRepresentedElement(tableManager.getRowElement(realRowIndex));
+
+ // check that the row element is not a tree filling configuration and continue the process for others
+ if(!(rowElement instanceof TreeFillingConfiguration)){
+
+ // Manage the columns of the row
+ while (cellIter.hasNext() && canContinue(resultStatus)) {
+ final String valueAsString = cellIter.next();
+
+ // Get the column index from its position
+ int realColumnIndex = columnHideShowLayer.getColumnIndexByPosition(nbColmnRead);
+ // Get the column attribute from its index
+ final Object columnElement = AxisUtils.getRepresentedElement(tableManager.getColumnElement(realColumnIndex));
+
+ // Edit the value if this is editable
+ final boolean isEditable = CellManagerFactory.INSTANCE.isCellEditable(columnElement, rowElement, sharedMap);
+ if (isEditable) {
+ final AbstractStringValueConverter converter = CellManagerFactory.INSTANCE.getOrCreateStringValueConverterClass(columnElement, rowElement, tableManager, existingConverters, pasteHelper.getMultiValueSeparator());
+
+ // Get the converted value (to compare with the new one
+ final Command command = CellManagerFactory.INSTANCE.getSetStringValueCommand(tableEditingDomain, columnElement, rowElement, valueAsString, converter, tableManager);
+ final IStatus commandStatus = getStatusCommand(command);
+ if (!commandStatus.isOK()) {
+ resultStatus.add(commandStatus);
+ } else {
+ compoundCommand.append(command);
+ }
+ } else {
+ // Manage the warnings when the user tried to add a value (except exmpty, N/A or null) in a non-editable cell
+ if (isValidValue(valueAsString)) {
+ resultStatus.add(new Status(IStatus.WARNING, Activator.PLUGIN_ID, Messages.AbstractPasteInSelectionNattableCommandProvider_NonEditableCellTriedToBeOverwrited));
+ }
+ }
+ nbColmnRead++;
+ }
+
+ if (lastColumnPosition < nbColmnRead) {
+ lastColumnPosition = nbColmnRead;
+ }
+ }
+ }
+ lastRowPosition++;
+ }
+
+ progressMonitor.done();
+ localDispose();
+
+ // Check if the status is not CANCEL or ERROR
+ if (canContinue(resultStatus) && null != compoundCommand && !compoundCommand.isEmpty() && compoundCommand.canExecute()) {
+ // Execute the compound command
+ tableEditingDomain.getCommandStack().execute(compoundCommand);
+
+ return new CommandResult(resultStatus);
+ }
+ if (!resultStatus.isOK()) {
+ // Create an error status
+ final MultiStatus errorStatus = new MultiStatus(Activator.PLUGIN_ID, IStatus.ERROR, Messages.AbstractPasteInSelectionNattableCommandProvider_ThePasteHasNotBeenDoneBecauseOfSomeProblems, null);
+ if (resultStatus.isMultiStatus()) {
+ for (final IStatus subStatus : resultStatus.getChildren()) {
+ errorStatus.add(subStatus);
+ }
+ } else {
+ errorStatus.add(resultStatus);
+ }
+ errorStatus.add(new Status(IStatus.ERROR, Activator.PLUGIN_ID, null));
+ resultStatus = errorStatus;
+ }
+ return new CommandResult(resultStatus);
+ }
+ };
+ return pasteAllCommand;
+ }
+
+ /**
+ * Get the paste action for the cells paste for rows paste.
+ *
+ * @param contextEditingDomain
+ * The context editing domain.
+ * @param tableEditingDomain
+ * The table editing domain.
+ * @param selectedCells
+ * The selected cells.
+ * @param openDialog
+ * Determinate if the dialog must be opened during the process.
+ * @param progressMonitor
+ * The progress monitor.
+ * @param sharedMap
+ * The shared map.
+ * @param attachedMode
+ * Boolean to determinate if the command must be executed with the attached mode or with the detached mode.
+ * @return The command for the paste action.
+ */
+ protected ICommand getPasteRowsFromStringCommand(final TransactionalEditingDomain contextEditingDomain, final TransactionalEditingDomain tableEditingDomain, final Map<Integer, Object> rows,
+ final boolean openDialog, final IProgressMonitor progressMonitor, final Map<Object, Object> sharedMap, final boolean attachedMode) {
+ // initialize the progress monitor
+ if (null != progressMonitor) {
+ progressMonitor.beginTask(PASTE_ACTION_TASK_NAME, this.nbOperationsToDo);
+ }
+
+ // 2.2 create the creation request and find the command provider
+ final ICommand pasteAllCommand = new AbstractTransactionalCommand(contextEditingDomain, PASTE_COMMAND_NAME, null) {
+
+ /**
+ * @see org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand#doExecuteWithResult(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
+ *
+ * @param monitor
+ * @param info
+ * @return
+ * @throws ExecutionException
+ */
+ @Override
+ protected CommandResult doExecuteWithResult(final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
+ IStatus resultStatus = Status.OK_STATUS;
+
+ // Check that the axis identifier axis is available in the table
+ int axisIdentifierIndex = getColumnIndexOfAxisIdentifier();
+ if (-1 == axisIdentifierIndex) {
+ resultStatus = new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.AbstractPasteInSelectionNattableCommandProvider_TheAxisUsedAsIdentifierNotAvailable);
+ }
+
+ // Create the compound command for the paste action
+ ExtendedCompoundCommand compoundCommand = new ExtendedCompoundCommand("Paste action"); //$NON-NLS-1$
+
+ // Manage a list of created elements to create a unique add command for all created elements
+ final List<InsertedElementInNattable> objectsToAdd = new ArrayList<InsertedElementInNattable>();
+
+ if (canContinue(resultStatus)) {
+ final MultiStatus multiStatus = new MultiStatus(Activator.PLUGIN_ID, IStatus.OK, Messages.AbstractPasteInSelectionNattableCommandProvider_ThePasteHasBeenDoneWithSomeProblems, null);
+
+ long readChar = 0;
+ long previousreadChar = 0;
+
+ // Calculate the first row position of the selection and the index of the first selected element i the root parent (to determinate where the inserted element have to be)
+ int initialFirstRowPosition = -1;
+ if (null != rows) {
+ for (int rowIndex : rows.keySet()) {
+ if (-1 == initialFirstRowPosition || rowIndex < initialFirstRowPosition) {
+ initialFirstRowPosition = rowIndex;
+ }
+ }
+ }
+ firstRowPosition = tableManager.getBodyLayerStack().getRowHideShowLayer().getRowPositionByIndex(initialFirstRowPosition);
+ firstColumnPosition = 0;
+ lastRowPosition = firstRowPosition;
+ lastColumnPosition = firstColumnPosition;
+
+ // Calculate the parent context, depth and category from the row position
+ int noIndex = 0;
+ if (-1 != firstRowPosition) {
+ noIndex = firstRowPosition;
+ }
+ final EObject parentContext = getContentOfSelection(rows, noIndex);
+ final Object firstRowElementSelected = tableManager.getRowElement(noIndex);
+ final int parentDepth = getDepthFromObject(firstRowElementSelected);
+ final String parentCategory = getCategoryFromObject(firstRowElementSelected);
+
+ // Calculate the index of the first selected item in the parent context
+ int initialFirstIndexInParent = -1;
+ if (-1 != firstRowPosition) {
+ initialFirstIndexInParent = getFirstSelectedElementIndexOfTableContext(rows, firstRowPosition, parentContext);
+ }
+
+ // Get the hide show layer to calculate the index from the position
+ final ColumnHideShowLayer columnHideShowLayer = tableManager.getBodyLayerStack().getColumnHideShowLayer();
+
+ final Iterator<Object> rowIter = pastedValues.keySet().iterator();
+
+ // Loop on each row
+ while (rowIter.hasNext() && canContinue(multiStatus)) {
+
+ final List<String> rowValuesAsString = pastedValues.get(rowIter.next());
+
+ // To avoid blank lines
+ if (!rowValuesAsString.isEmpty()) {
+
+ final String identifierValue = rowValuesAsString.get(axisIdentifierIndex);
+
+ if (!identifierValue.isEmpty()) {
+
+ // Calculate the row to modify
+ int rowIndexToModify = -1;
+ boolean sameMultipleIdentifier = false;
+ if (null != rows) {
+ final Iterator<Integer> selectedRowsIndex = rows.keySet().iterator();
+ while (selectedRowsIndex.hasNext() && canContinue(multiStatus)) {
+ int selectedRowIndex = selectedRowsIndex.next();
+ // Check the column identifier into the rows selected
+ if (identifierValue.equals(tableManager.getDataValue(axisIdentifierIndex, selectedRowIndex))) {
+ // If the value is equals and the name is already existing, add an error to specify that the name is corresponding for multiple rows
+ if (-1 < rowIndexToModify) {
+ sameMultipleIdentifier = true;
+ } else {
+ rowIndexToModify = selectedRowIndex;
+ }
+ }
+ }
+ } else {
+ int counter = 0;
+ while (counter < tableManager.getRowCount() && canContinue(multiStatus)) {
+ // Check the column identifier into the rows selected
+ if (identifierValue.equals(tableManager.getDataValue(axisIdentifierIndex, counter))) {
+ // If the value is equals and the name is already existing, add an error to specify that the name is corresponding for multiple rows
+ if (-1 < rowIndexToModify) {
+ sameMultipleIdentifier = true;
+ } else {
+ rowIndexToModify = counter;
+ }
+ }
+ counter++;
+ }
+ }
+
+ manageUserAction(rowIndexToModify, isInsert, openDialog, identifierValue, multiStatus);
+
+ // If several row found for the same identifier and must be replaced, return an error message
+ // because we don't know which one modified
+ if (sameMultipleIdentifier && UserActionConstants.REPLACE_USER_ACTION == currentUserAction) {
+ multiStatus.add(new Status(IStatus.ERROR, Activator.PLUGIN_ID, String.format(Messages.AbstractPasteInSelectionNattableCommandProvider_MultipleSelectedRowsCorrespondingForIdentifier, identifierValue)));
+ }
+
+ Object rowElement = null;
+ boolean createdElement = false;
+
+ // Manage the cancel action
+ if (UserActionConstants.CANCEL_USER_ACTION == currentUserAction) {
+ throw new OperationCanceledException();
+ }
+
+ // If the row index to modify is not get, create it if this is an insert and alert with a warning message
+ if (UserActionConstants.ADD_USER_ACTION == currentUserAction) {
+ if (isInsert) {
+
+ // This allows to manage the add of the object in the correct owner
+
+ int currentDepth = parentDepth;
+ String currentCategory = parentCategory;
+ EObject currentContext = parentContext;
+
+ // If a row is found, the created item must be created as the same depth
+ if (-1 != rowIndexToModify) {
+
+ // Get the depth and the category from the object found in the table (because the added once will be at the same level)
+ Object object = tableManager.getRowElement(rowIndexToModify);
+ currentDepth = getDepthFromObject(object);
+ currentCategory = getCategoryFromObject(object);
+
+ Object element = AxisUtils.getRepresentedElement(object);
+ currentContext = ((EObject) element).eContainer();
+ }
+
+ // Get the paste configuration and its attributes
+ final PasteEObjectConfiguration currentPasteConfiguration = getPasteConfiguration(table, currentDepth, currentCategory);
+ final EStructuralFeature containementFeature = currentPasteConfiguration.getPasteElementContainementFeature();
+ final IElementType elementType = ElementTypeRegistry.getInstance().getType(currentPasteConfiguration.getPastedElementId());
+
+ // If this is an insert action, add the row to create at the correct index
+ if (detachedMode) {
+ rowElement = getRowElementCreatedInDetachedMode(containementFeature, elementType, progressMonitor, info, compoundCommand);
+ } else {
+ rowElement = getRowElementCreatedInAttachedMode(currentContext, containementFeature, elementType, progressMonitor, info, compoundCommand);
+ }
+
+ if (null != rowElement) {
+ int indexInParent = -1;
+ int indexInTable = -1;
+ // Manage the index for the added element :
+ // if the parent context is the same than the current context, use the index calculated,
+ // else this must be an add to the end of feature
+ if (currentContext.equals(parentContext)) {
+ indexInParent = initialFirstIndexInParent;
+ indexInTable = initialFirstRowPosition;
+ }
+
+ // Check if the table context is an owner of other created element.
+ InsertedElementInNattable foundInsertedElement = null;
+ Iterator<InsertedElementInNattable> objectsToAddIterator = objectsToAdd.iterator();
+ while (objectsToAddIterator.hasNext() && null == foundInsertedElement) {
+ final InsertedElementInNattable insertedElement = objectsToAddIterator.next();
+ if (insertedElement.equals(currentContext) && insertedElement.getContainementFeature().equals(containementFeature)) {
+ foundInsertedElement = insertedElement;
+ }
+ }
+
+ // Create an inserted element item if the parent context doesn't already exist
+ if (null == foundInsertedElement) {
+ foundInsertedElement = new InsertedElementInNattable(currentContext, containementFeature, indexInParent, indexInTable);
+ objectsToAdd.add(foundInsertedElement);
+ }
+ // Add the created element
+ foundInsertedElement.addCreatedElement(rowElement);
+
+ createdElement = true;
+ } else {
+ multiStatus.add(new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.AbstractPasteInSelectionNattableCommandProvider_ElementCantBeAdded));
+ }
+
+ lastRowPosition++;
+ }
+ }
+
+ // If the row element is not (this is not a created element), calculate it
+ if (null == rowElement) {
+ rowElement = AxisUtils.getRepresentedElement(tableManager.getRowElement(rowIndexToModify));
+ }
+
+ // Continue if the action choose by user is replace or add (by default, it is replace action)
+ if (UserActionConstants.REPLACE_USER_ACTION == currentUserAction || UserActionConstants.ADD_USER_ACTION == currentUserAction) {
+ int nbColmnRead = firstColumnPosition;
+ final Iterator<String> cellIter = rowValuesAsString.iterator();
+
+ // Check if the progress monitor catch a cancel click
+ if (null != progressMonitor && progressMonitor.isCanceled()) {
+ progressMonitor.done();
+ localDispose();
+ return CommandResult.newCancelledCommandResult();
+ }
+
+ readChar = readChar + (parser.getReadCharacters() - previousreadChar);
+ previousreadChar = parser.getReadCharacters();
+
+ if (null != progressMonitor && readChar > refreshEachReadChar) {
+ readChar = 0;
+ progressMonitor.worked(refreshEachReadChar);
+ }
+
+ // Manage the columns of the row
+ while (cellIter.hasNext() && canContinue(multiStatus)) {
+ final String valueAsString = cellIter.next();
+
+ // Get the row and the column indexes from their positions
+ final int realColumnIndex = columnHideShowLayer.getColumnIndexByPosition(nbColmnRead);
+
+ // Get the row object and column attribute from their indexes
+ final Object columnElement = getColumnElement(realColumnIndex);
+
+ // Edit the value if this is editable
+ final boolean isEditable = CellManagerFactory.INSTANCE.isCellEditable(columnElement, rowElement, sharedMap);
+ if (isEditable) {
+ final AbstractStringValueConverter converter = CellManagerFactory.INSTANCE.getOrCreateStringValueConverterClass(columnElement, rowElement, tableManager, existingConverters, pasteHelper.getMultiValueSeparator());
+
+ // Get the converted value (to compare with the new one)
+ if (!createdElement || attachedMode) {
+ final Command command = CellManagerFactory.INSTANCE.getSetStringValueCommand(tableEditingDomain, columnElement, rowElement, valueAsString, converter, tableManager);
+ final IStatus commandStatus = getStatusCommand(command);
+ if (!commandStatus.isOK()) {
+ multiStatus.add(commandStatus);
+ } else {
+ if (null != command) {
+ compoundCommand.append(command);
+ }
+ }
+ } else {
+ try {
+ CellManagerFactory.INSTANCE.setStringValue(columnElement, rowElement, valueAsString, converter, tableManager, sharedMap);
+ } catch (final Exception e) {
+ Activator.log.error("Cannot set value '" + valueAsString + "' for element '" + rowElement + "' and feature '" + columnElement + "'", e);
+ multiStatus.add(new Status(IStatus.ERROR, Activator.PLUGIN_ID, "Cannot set value '" + valueAsString + "' for element '" + rowElement + "' and feature '" + columnElement + "'"));
+ }
+ }
+ } else {
+ // Manage the warnings when the user tried to add a value (except exmpty, N/A or null) in a non-editable cell
+ if (isValidValue(valueAsString)) {
+ multiStatus.add(new Status(IStatus.WARNING, Activator.PLUGIN_ID, Messages.AbstractPasteInSelectionNattableCommandProvider_NonEditableCellTriedToBeOverwrited));
+ }
+ }
+
+ nbColmnRead++;
+ }
+
+ if (lastColumnPosition < nbColmnRead) {
+ lastColumnPosition = nbColmnRead;
+ }
+ }
+ }
+ }
+ lastRowPosition++;
+ }
+
+ if (canContinue(multiStatus)) {
+ // Need to create the add command to add the created elements to their container and to the table if necessary
+ if (!objectsToAdd.isEmpty()) {
+ if (detachedMode) {
+ createTableRowInDetachedModeCommand(compoundCommand, objectsToAdd);
+ } else {
+ createTableRowInAttachedModeCommand(compoundCommand, objectsToAdd);
+ }
+ }
+
+ // Execute some actions available in the share map when this is the detached mode
+ if(!attachedMode){
+ // Manage the reference to set
+ @SuppressWarnings("unchecked")
+ final List<IValueSetter> valueToSet = (List<IValueSetter>) sharedMap.get(Constants.REFERENCES_TO_SET_KEY);
+
+ if (valueToSet.size() > 0) {
+ for (final IValueSetter current : valueToSet) {
+ current.doSetValue(contextEditingDomain);
+ }
+ }
+
+ // Manage the cells problems to add
+ @SuppressWarnings("unchecked")
+ final List<Cell> cells = (List<Cell>) sharedMap.get(Constants.CELLS_TO_ADD_KEY);
+
+ // add the created cells to the table
+ if (null != cells && !cells.isEmpty()) {
+ compoundCommand.append(AddCommand.create(tableEditingDomain, table, NattablePackage.eINSTANCE.getTable_Cells(), cells));
+ }
+ }
+ }
+
+ if (progressMonitor != null && progressMonitor.isCanceled()) {
+ progressMonitor.done();
+ localDispose();
+ return CommandResult.newCancelledCommandResult();
+ }
+
+ progressMonitor.done();
+ localDispose();
+
+ if (resultStatus.isOK()) {
+ resultStatus = multiStatus;
+ }
+ }
+
+ // Check if the status is not CANCEL or ERROR
+ if (canContinue(resultStatus) && null != compoundCommand && !compoundCommand.isEmpty() && compoundCommand.canExecute()) {
+ // Execute the compound command
+ tableEditingDomain.getCommandStack().execute(compoundCommand);
+
+ // Manage the post actions for the detached mode
+ if (!objectsToAdd.isEmpty() && !attachedMode) {
+ managePostActions(sharedMap);
+ }
+
+ return new CommandResult(resultStatus);
+ }
+ if (!resultStatus.isOK()) {
+ // Create an error status
+ final MultiStatus errorStatus = new MultiStatus(Activator.PLUGIN_ID, IStatus.ERROR, Messages.AbstractPasteInSelectionNattableCommandProvider_ThePasteHasNotBeenDoneBecauseOfSomeProblems, null);
+ if (resultStatus.isMultiStatus()) {
+ for (final IStatus subStatus : resultStatus.getChildren()) {
+ errorStatus.add(subStatus);
+ }
+ } else {
+ errorStatus.add(resultStatus);
+ }
+ if (IStatus.ERROR != errorStatus.getSeverity()) {
+ errorStatus.add(new Status(IStatus.ERROR, Activator.PLUGIN_ID, null));
+ }
+ resultStatus = errorStatus;
+ }
+ return new CommandResult(resultStatus);
+ }
+ };
+ return pasteAllCommand;
+ }
+
+ /**
+ * Get the paste action for the cells paste for columns paste.
+ *
+ * @param contextEditingDomain
+ * The context editing domain.
+ * @param tableEditingDomain
+ * The table editing domain.
+ * @param selectedCells
+ * The selected cells.
+ * @param openDialog
+ * Determinate if the dialog must be opened during the process.
+ * @param progressMonitor
+ * The progress monitor.
+ * @param sharedMap
+ * The shared map.
+ * @param attachedMode
+ * Boolean to determinate if the command must be executed with the attached mode or with the detached mode.
+ * @return The command for the paste action.
+ */
+ protected ICommand getPasteColumnsFromStringCommand(final TransactionalEditingDomain contextEditingDomain, final TransactionalEditingDomain tableEditingDomain, final Map<Integer, Object> columns,
+ final boolean openDialog, final IProgressMonitor progressMonitor, final Map<Object, Object> sharedMap, final boolean attachedMode) {
+ // initialize the progress monitor
+ if (null != progressMonitor) {
+ progressMonitor.beginTask(PASTE_ACTION_TASK_NAME, this.nbOperationsToDo);
+ }
+
+ // 2.2 create the creation request and find the command provider
+ final ICommand pasteAllCommand = new AbstractTransactionalCommand(contextEditingDomain, PASTE_COMMAND_NAME, null) {
+
+ /**
+ * @see org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand#doExecuteWithResult(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
+ *
+ * @param monitor
+ * @param info
+ * @return
+ * @throws ExecutionException
+ */
+ @Override
+ protected CommandResult doExecuteWithResult(final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
+ MultiStatus resultStatus = new MultiStatus(Activator.PLUGIN_ID, IStatus.OK, Messages.AbstractPasteInSelectionNattableCommandProvider_ThePasteHasBeenDoneWithSomeProblems, null);
+
+ long readChar = 0;
+ long previousreadChar = 0;
+
+ // Iterate on selected cells iterator at the same time that on cells
+ firstRowPosition = 0;
+ firstColumnPosition = -1;
+ for (int columnIndex : columns.keySet()) {
+ if (-1 == firstColumnPosition) {
+ firstColumnPosition = columnIndex;
+ } else if (columnIndex < firstColumnPosition) {
+ firstColumnPosition = columnIndex;
+ }
+ }
+ lastRowPosition = firstRowPosition;
+ lastColumnPosition = firstColumnPosition;
+
+ // Get the hide show layer to calculate the index from the position
+ final RowHideShowLayer rowHideShowLayer = tableManager.getBodyLayerStack().getRowHideShowLayer();
+ final ColumnHideShowLayer columnHideShowLayer = tableManager.getBodyLayerStack().getColumnHideShowLayer();
+
+ // Create the compound command for the paste action
+ final CompoundCommand compoundCommand = new CompoundCommand("Paste action"); //$NON-NLS-1$
+
+ final Iterator<Object> columnIter = pastedValues.keySet().iterator();
+
+ Collection<String> columnValuesAsString = new ArrayList<String>();
+
+ // Loop on each row
+ while (((!isSingleAxisPasted && columnIter.hasNext()) || (isSingleAxisPasted && numberSelectedAxis > 0)) && canContinue(resultStatus)) {
+ if (isSingleAxisPasted) {
+ numberSelectedAxis--;
+ }
+
+ if (!(isSingleAxisPasted && firstColumnPosition < lastColumnPosition)) {
+ columnValuesAsString = pastedValues.get(columnIter.next());
+ }
+
+ // To avoid blank lines
+ if (!columnValuesAsString.isEmpty()) {
+ int nbRowRead = firstRowPosition;
+ final Iterator<String> cellIter = columnValuesAsString.iterator();
+
+ // Check if the progress monitor catch a cancel click
+ if (null != progressMonitor && progressMonitor.isCanceled()) {
+ progressMonitor.done();
+ localDispose();
+ return CommandResult.newCancelledCommandResult();
+ }
+
+ readChar = readChar + (parser.getReadCharacters() - previousreadChar);
+ previousreadChar = parser.getReadCharacters();
+
+ if (null != progressMonitor && readChar > refreshEachReadChar) {
+ readChar = 0;
+ progressMonitor.worked(refreshEachReadChar);
+ }
+
+ // Get the column indexes from its position
+ int realColumnIndex = columnHideShowLayer.getColumnIndexByPosition(lastColumnPosition);
+ // Get the column attribute from its index
+ final Object columnElement = AxisUtils.getRepresentedElement(tableManager.getColumnElement(realColumnIndex));
+
+ // Manage the columns of the row
+ while (cellIter.hasNext() && canContinue(resultStatus)) {
+ final String valueAsString = cellIter.next();
+
+ // Get the row index from its position
+ int realRowIndex = rowHideShowLayer.getRowIndexByPosition(nbRowRead);
+ // Get the row object from its index
+ final Object rowElement = AxisUtils.getRepresentedElement(tableManager.getRowElement(realRowIndex));
+
+ if(!(rowElement instanceof TreeFillingConfiguration)){
+ // Edit the value if this is editable
+ final boolean isEditable = CellManagerFactory.INSTANCE.isCellEditable(columnElement, rowElement, sharedMap);
+ if (isEditable) {
+ final AbstractStringValueConverter converter = CellManagerFactory.INSTANCE.getOrCreateStringValueConverterClass(columnElement, rowElement, tableManager, existingConverters, pasteHelper.getMultiValueSeparator());
+
+ // Get the converted value (to compare with the new one
+ final Command command = CellManagerFactory.INSTANCE.getSetStringValueCommand(tableEditingDomain, columnElement, rowElement, valueAsString, converter, tableManager);
+ final IStatus commandStatus = getStatusCommand(command);
+ if (!commandStatus.isOK()) {
+ resultStatus.add(commandStatus);
+ } else {
+ compoundCommand.append(command);
+ }
+ } else {
+ // Manage the warnings when the user tried to add a value (except exmpty, N/A or null) in a non-editable cell
+ if (isValidValue(valueAsString)) {
+ resultStatus.add(new Status(IStatus.WARNING, Activator.PLUGIN_ID, Messages.AbstractPasteInSelectionNattableCommandProvider_NonEditableCellTriedToBeOverwrited));
+ }
+ }
+ }
+ nbRowRead++;
+ }
+
+ if (lastRowPosition < nbRowRead) {
+ lastRowPosition = nbRowRead;
+ }
+ }
+ lastColumnPosition++;
+ }
+
+ progressMonitor.done();
+ localDispose();
+
+ // Check if the status is not CANCEL or ERROR
+ if (canContinue(resultStatus) && null != compoundCommand && !compoundCommand.isEmpty() && compoundCommand.canExecute()) {
+ // Execute the compound command
+ tableEditingDomain.getCommandStack().execute(compoundCommand);
+
+ return new CommandResult(resultStatus);
+ }
+ if (!resultStatus.isOK()) {
+ // Create an error status
+ final MultiStatus errorStatus = new MultiStatus(Activator.PLUGIN_ID, IStatus.ERROR, Messages.AbstractPasteInSelectionNattableCommandProvider_ThePasteHasNotBeenDoneBecauseOfSomeProblems, null);
+ if (resultStatus.isMultiStatus()) {
+ for (final IStatus subStatus : resultStatus.getChildren()) {
+ errorStatus.add(subStatus);
+ }
+ } else {
+ errorStatus.add(resultStatus);
+ }
+ errorStatus.add(new Status(IStatus.ERROR, Activator.PLUGIN_ID, null));
+ resultStatus = errorStatus;
+ }
+ return new CommandResult(resultStatus);
+ }
+ };
+ return pasteAllCommand;
+ }
+
+ /**
+ * This allows to determinate if the process can be continued (calculated from status).
+ *
+ * @param status
+ * the status.
+ * @return <code>false</code> if the status is canceled or in error, <code>true</code> otherwise.
+ */
+ private boolean canContinue(final IStatus status) {
+ return !((IStatus.CANCEL == status.getSeverity()) || IStatus.ERROR == status.getSeverity());
+ }
+
+ /**
+ * This allows to check if the value is a valid value (not null, empty or non available).
+ *
+ * @param value
+ * the value to check.
+ * @return <code>true</code> if the value is a valid value, <code>false</code> otherwise.
+ */
+ protected boolean isValidValue(final String value) {
+ boolean result = true;
+
+ if (null != value) {
+ if ("null".equals(value) || "".equals(value) || "N/A".equals(value)) { //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ result = false;
+ }
+ } else {
+ result = false;
+ }
+
+ return result;
+ }
+
+ /**
+ * This allows to manage the user action when it is necessary.
+ *
+ * @param rowIndexToModify
+ * The row index to modify (-1 if the row is not found).
+ * @param isInsert
+ * Determinate if this an insert or just a paste.
+ * @param openDialog
+ * Determinate if a dialog have to be opened.
+ * @param identifierValue
+ * The identifier value.
+ * @param multiStatus
+ * The multi status.
+ */
+ protected void manageUserAction(final int rowIndexToModify, final boolean isInsert, final boolean openDialog, final String identifierValue, final MultiStatus multiStatus) {
+ currentUserAction = UserActionConstants.UNDEFINED_USER_ACTION;
+
+ if (-1 != rowIndexToModify) {
+ if (isInsert) {
+ // If the user action is undefined, open the dialog to ask what it is decided to do
+ if (UserActionConstants.UNDEFINED_USER_ACTION == userAction) {
+ if (openDialog) {
+ // Create the message dialog wih a toggle state and open it
+
+ Display.getDefault().syncExec(new Runnable() {
+
+ @Override
+ public void run() {
+ final MessageDialogWithToggle messageDialog = new MessageDialogWithToggle(Display.getDefault().getActiveShell(), "Confirmation",
+ org.eclipse.papyrus.infra.widgets.Activator.getDefault().getImage(ImageConstants.PAPYRUS_ICON_PATH), "The identifier \'" + identifierValue + "\' was found. What do you want to do ?",
+ MessageDialog.QUESTION_WITH_CANCEL, new String[] { "Replace", "Add", "Skip", "Cancel" }, 0, "Apply to all", false) {
+
+ /**
+ * @see org.eclipse.jface.dialogs.MessageDialogWithToggle#createButtonsForButtonBar(org.eclipse.swt.widgets.Composite)
+ */
+ @Override
+ protected void createButtonsForButtonBar(final Composite parent) {
+ final String[] buttonLabels = getButtonLabels();
+ final Button[] buttons = new Button[buttonLabels.length];
+ final int defaultButtonIndex = getDefaultButtonIndex();
+
+ // This allow to define the values to the buttons
+ for (int i = 0; i < buttonLabels.length; i++) {
+ String label = buttonLabels[i];
+ Button button = createButton(parent, i, label, defaultButtonIndex == i);
+ buttons[i] = button;
+ }
+ setButtons(buttons);
+ }
+ };
+
+ // Open the dialog and get its return
+ messageDialog.open();
+ currentUserAction = messageDialog.getReturnCode();
+ if (messageDialog.getToggleState()) {
+ userAction = currentUserAction;
+ }
+ }
+ });
+ } else {
+ // By default, the replacement is used, But this instruction musn't be called
+ currentUserAction = UserActionConstants.REPLACE_USER_ACTION;
+ }
+ } else {
+ // The action was already ask to user and it will be repeat for all rows
+ currentUserAction = userAction;
+ }
+ } else {
+ // If this is not an insert action, always replace if this is found
+ currentUserAction = UserActionConstants.REPLACE_USER_ACTION;
+ }
+ } else {
+ if (isInsert) {
+ currentUserAction = UserActionConstants.ADD_USER_ACTION;
+ multiStatus.add(new Status(IStatus.WARNING, Activator.PLUGIN_ID, String.format(Messages.AbstractPasteInSelectionNattableCommandProvider_identifierNotFoundInSelectionSoTheObjectWasCreated, identifierValue)));
+ }else{
+ multiStatus.add(new Status(IStatus.WARNING, Activator.PLUGIN_ID, String.format(Messages.AbstractPasteInSelectionNattableCommandProvider_identifierNotFoundInSelection, identifierValue)));
+ }
+ }
+ }
+
+ /**
+ * This allows to manage the post actions when it is necessary (in the detached mode).
+ *
+ * @param sharedMap
+ * the shared map.
+ */
+ protected void managePostActions(final Map<Object, Object> sharedMap) {
+ // initialize lists
+ final Collection<String> postActions = getPostActions();
+
+ // we add the post actions added by cell manager
+ // see bug 431691: [Table 2] Paste from Spreadsheet must be able to apply required stereotypes for column properties in all usecases
+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=431691
+ @SuppressWarnings("unchecked")
+ final Collection<String> postActionsAddedByCellManagers = (Collection<String>) sharedMap.get(Constants.ADDITIONAL_POST_ACTIONS_TO_CONCLUDE_PASTE_KEY);
+ postActions.addAll(postActionsAddedByCellManagers);
+
+ for (final String currentPostActions : postActions) {
+ PastePostActionRegistry.INSTANCE.concludePostAction(tableManager, currentPostActions, sharedMap);
+ }
+ }
+
+ /**
+ * Get the status of the EMF command (containing compound command or gmf command).
+ *
+ * @param command
+ * The command.
+ * @return The status of the corresponding command.
+ */
+ protected IStatus getStatusCommand(final Command command) {
+ IStatus resultStatus = Status.OK_STATUS;
+
+ if (command instanceof CompoundCommand) {
+ final Iterator<Command> subCommandIterator = ((CompoundCommand) command).getCommandList().iterator();
+ while (subCommandIterator.hasNext() && resultStatus.isOK()) {
+ final Command subCommand = subCommandIterator.next();
+ if (command instanceof CompoundCommand) {
+ IStatus subStatus = getStatusCommand(subCommand);
+ if (!subStatus.isOK()) {
+ resultStatus = subStatus;
+ }
+ }
+ }
+ } else if (command instanceof GMFtoEMFCommandWrapper) {
+ ICommand gmfCommand = ((GMFtoEMFCommandWrapper) command).getGMFCommand();
+ if (gmfCommand instanceof ErrorTransactionalCommand) {
+ resultStatus = ((ErrorTransactionalCommand) gmfCommand).getStatus();
+ }
+ }
+
+ return resultStatus;
+ }
+
+ /**
+ * Get the index of the axis used as axis identifier.
+ *
+ * @return <code>-1</code> if the axis doesn't exist, the axis index otherwise.
+ */
+ protected int getColumnIndexOfAxisIdentifier() {
+ final PasteEObjectConfiguration pasteconfiguration = getPasteconfigurationTopLevel(table);
+
+ int index = -1;
+ EList<IAxis> axis = null;
+ if (!table.isInvertAxis()) {
+ axis = tableManager.getColumnAxisManager().getRepresentedContentProvider().getAxis();
+ } else {
+ axis = tableManager.getRowAxisManager().getRepresentedContentProvider().getAxis();
+ }
+
+ int axisIndex = 0;
+ while (axisIndex < axis.size() && -1 == index) {
+ if (axis.get(axisIndex).getElement().equals(pasteconfiguration.getAxisIdentifier().getElement())) {
+ index = axisIndex;
+ }
+ axisIndex++;
+ }
+
+ return index;
+ }
+
+ /**
+ * Get the index of first element selected from the table context.
+ *
+ * @param rows
+ * The selected rows.
+ * @param currentRowIndex
+ * The current row index to check.
+ * @param context
+ * The context of the selection.
+ * @return The index of first element selected from the table context.
+ */
+ @SuppressWarnings("unchecked")
+ protected int getFirstSelectedElementIndexOfTableContext(final Map<Integer, Object> rows, final int currentRowIndex, final EObject cotext) {
+ int initialFirstIndexInParent = -1;
+
+ if (isInsert) {
+ Object rowElement = tableManager.getRowElement(currentRowIndex);
+ int depth = getDepthFromObject(rowElement);
+ String categoryName = getCategoryFromObject(rowElement);
+ final PasteEObjectConfiguration pasteConfiguration = getPasteConfiguration(table, depth, categoryName);
+
+ Object axis = rows.get(currentRowIndex);
+ Object object = AxisUtils.getRepresentedElement(axis);
+ if (object instanceof EObject) {
+ while (object instanceof EObject && null != ((EObject) object).eContainer()) {
+ if (((EObject) object).eContainer().equals(cotext)) {
+ final EStructuralFeature containmentFeature = pasteConfiguration.getPasteElementContainementFeature();
+ if (containmentFeature.isMany()) {
+ initialFirstIndexInParent = ((EObjectContainmentEList<EObject>) cotext.eGet(containmentFeature)).indexOf(object);
+ }
+ }
+ object = ((EObject) object).eContainer();
+ }
+ }
+ }
+
+ return initialFirstIndexInParent;
+ }
+
+ /**
+ * Get the index of first element selected from the table context.
+ *
+ * @param rows
+ * The selected rows.
+ * @param currentRowIndex
+ * The current row index to check.
+ * @return The index of first element selected from the table context.
+ */
+ protected EObject getContentOfSelection(final Map<Integer, Object> rows, final int currentRowIndex) {
+ EObject context = null;
+
+ if (0 == currentRowIndex) {
+ context = table.getContext();
+ } else {
+ Object axis = rows.get(currentRowIndex);
+ Object object = AxisUtils.getRepresentedElement(axis);
+ if (object instanceof EObject) {
+ context = ((EObject) object).eContainer();
+ }
+ }
+
+ return context;
+ }
+
+ /**
+ * Get the paste configuration of the table.
+ *
+ * @param table
+ * The table to manage.
+ * @return The paste configuration of the table.
+ */
+ protected abstract PasteEObjectConfiguration getPasteconfigurationTopLevel(final Table table);
+
+ /**
+ * This allows to get the paste configuration corresponding to the depth.
+ *
+ * @param table
+ * The table to manage.
+ * @param currentDepth
+ * The depth to get the paste configuration.
+ * @param categoryName
+ * The category name searched (can be null or empty for only depth search).
+ * @return The paste configuration corresponding to the depth.
+ */
+ protected abstract PasteEObjectConfiguration getPasteConfiguration(final Table table, final int currentDepth, final String categoryName);
+
+ /**
+ * Get the depth from the object in parameter.
+ *
+ * @param object
+ * The object corresponding to element or IAxis.
+ * @return The depth from the object in parameter.
+ */
+ protected abstract int getDepthFromObject(final Object object);
+
+ /**
+ * Get the category from the object in parameter.
+ *
+ * @param object
+ * The object corresponding to element or IAxis.
+ * @return The category from the object in parameter.
+ */
+ protected abstract String getCategoryFromObject(final Object object);
+
+ /**
+ * This allows to get the column object to modify.
+ *
+ * @param realColumnIndex
+ * The index of the column.
+ * @return The column object to modify.
+ */
+ protected abstract Object getColumnElement(int realColumnIndex);
+
+ /**
+ * This allows to get the object to create in the row element in attached mode.
+ *
+ * @param monitor
+ * The progress monitor.
+ * @param info
+ * The info.
+ * @param compoundCommand
+ * The current compound command used (The action to create the element must be added).
+ * @return The object corresponding to the row element to create.
+ */
+ protected abstract Object getRowElementCreatedInAttachedMode(final EObject context, final EStructuralFeature containmentFeature, final IElementType typeToCreate, final IProgressMonitor monitor, final IAdaptable info, final CompoundCommand compoundCommand);
+
+ /**
+ * This allows to get the object to create in the row element in detached mode.
+ *
+ * @param monitor
+ * The progress monitor.
+ * @param info
+ * The infso.
+ * @param compoundCommand
+ * The current compound command used (The action to create the element must be added).
+ * @return The object corresponding to the row element to create.
+ */
+ protected abstract Object getRowElementCreatedInDetachedMode(final EStructuralFeature containmentFeature, final IElementType typeToCreate, final IProgressMonitor monitor, final IAdaptable info, final CompoundCommand compoundCommand);
+
+ /**
+ * This allows to create a row in the table in detached mode.
+ *
+ * @param compoundCommand
+ * The compound command to manage.
+ * @param createdElements
+ * The created elements to manage.
+ * @return The adaptable.
+ * @throws ExecutionException
+ * The execution exception caught.
+ */
+ protected abstract void createTableRowInDetachedModeCommand(final CompoundCommand compoundCommand, final List<InsertedElementInNattable> createdElements) throws ExecutionException;
+
+ /**
+ * This allows to create a row in the table in attached mode.
+ *
+ * @param compoundCommand
+ * The compound command to manage.
+ * @param createdElements
+ * The created element to manage.
+ * @return The adaptable.
+ * @throws ExecutionException
+ * The execution exception caught.
+ */
+ protected abstract void createTableRowInAttachedModeCommand(final CompoundCommand compoundCommand, final List<InsertedElementInNattable> createdElements) throws ExecutionException;
+
+ /**
+ * Get the list of the post actions to do.
+ *
+ * @return
+ * the list of the post actions to do.
+ */
+ private Collection<String> getPostActions() {
+ return this.postActions;
+ }
+
+ /**
+ * Dispose fields of the class.
+ */
+ protected void localDispose() {
+ this.isDisposed = true;
+ for (final AbstractStringValueConverter current : existingConverters.values()) {
+ current.dispose();
+ }
+ this.existingConverters.clear();
+ this.pastedValues.clear();
+ this.numberSelectedAxis = 0;
+ this.isSingleAxisPasted = false;
+ try {
+ this.reader.close();
+ } catch (final IOException e) {
+ Activator.log.error(e);
+ }
+ }
+}
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/PasteEObjectAxisInNattableCommandProvider.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/PasteEObjectAxisInNattableCommandProvider.java
index 6d2150d6445..c5e457b0968 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/PasteEObjectAxisInNattableCommandProvider.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/PasteEObjectAxisInNattableCommandProvider.java
@@ -1,864 +1,863 @@
-/*****************************************************************************
- * Copyright (c) 2014 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Patrick Tessier (CEA LIST) - Initial API and implementation
- /*****************************************************************************/
-package org.eclipse.papyrus.infra.nattable.provider;
-
-/*****************************************************************************
- * Copyright (c) 2013 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-import java.io.IOException;
-import java.io.Reader;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EFactory;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EReference;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.edit.command.AddCommand;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.type.core.ElementTypeRegistry;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.papyrus.commands.CheckedOperationHistory;
-import org.eclipse.papyrus.infra.nattable.Activator;
-import org.eclipse.papyrus.infra.nattable.manager.cell.CellManagerFactory;
-import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
-import org.eclipse.papyrus.infra.nattable.messages.Messages;
-import org.eclipse.papyrus.infra.nattable.model.nattable.NattablePackage;
-import org.eclipse.papyrus.infra.nattable.model.nattable.Table;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.NattableaxisconfigurationPackage;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.PasteEObjectConfiguration;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattablecell.Cell;
-import org.eclipse.papyrus.infra.nattable.parsers.CSVParser;
-import org.eclipse.papyrus.infra.nattable.parsers.CellIterator;
-import org.eclipse.papyrus.infra.nattable.parsers.RowIterator;
-import org.eclipse.papyrus.infra.nattable.paste.IValueSetter;
-import org.eclipse.papyrus.infra.nattable.paste.PastePostActionRegistry;
-import org.eclipse.papyrus.infra.nattable.utils.AxisConfigurationUtils;
-import org.eclipse.papyrus.infra.nattable.utils.CSVPasteHelper;
-import org.eclipse.papyrus.infra.nattable.utils.Constants;
-import org.eclipse.papyrus.infra.nattable.utils.TableEditingDomainUtils;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.infra.tools.converter.AbstractStringValueConverter;
-import org.eclipse.ui.progress.UIJob;
-
-/**
- * Paste command manager for the paste in the table
- *
- * @author VL222926
- *
- */
-
-public class PasteEObjectAxisInNattableCommandProvider {
-
- private static final int MIN_AXIS_FOR_PROGRESS_MONITOR = 5;
-
- /**
- * the containment feature to use
- */
- private EStructuralFeature containmentFeature;
-
- /**
- * the type to create
- */
- private IElementType typeToCreate;
-
- /**
- * the table manager
- */
- private INattableModelManager tableManager;
-
- /**
- * the paste mode
- */
- // private PasteEnablementStatus pasteMode;
-
- /**
- * if true, we are pasting in detached mode
- */
- private boolean detachedMode;
-
- /**
- * the list of the post actions do do
- */
- private List<String> postActions;
-
- /**
- * the list of the axis to paste
- */
- // private final String[] axisToPaste;
-
- /**
- * the paste helper
- */
- private final CSVPasteHelper pasteHelper;
-
- /**
- * the converter map
- */
- private Map<Class<? extends AbstractStringValueConverter>, AbstractStringValueConverter> existingConverters;
-
- private static final String PASTE_ACTION_TASK_NAME = Messages.PasteEObjectAxisInTableCommandProvider_PasteAction;
-
- private static final String PASTE_ROWS_JOB_NAME = Messages.PasteEObjectAxisInTableCommandProvider_PasteRows;
-
- private static final String PASTE_COLUMNS_JOB_NAME = Messages.PasteEObjectAxisInTableCommandProvider_PasteColumns;
-
- private static final String PASTE_COMMAND_HAS_BEEN_CANCELLED = Messages.PasteEObjectAxisInTableCommandProvider_CommandCreationHasBeenCancelled;
-
- private static final String PASTE_COMMAND_CANT_BE_EXECUTED = "The Paste command can't be executed"; //$NON-NLS-1$
-
- private static final String PASTE_COMMAND_NAME = Messages.PasteEObjectAxisInTableCommandProvider_PasteFromStringCommand;
-
- private static final String CREATING_ELEMENT_A_NUMBER_X_Y = Messages.PasteEObjectAxisInTableCommandProvider_CreatingAnumberXonY;
-
- protected final boolean pasteColumn;
-
- private final int nbOperationsToDo;
-
-
- // we refresh the dialog each X read char
- private int refreshEachReadChar = 1000;
-
- /**
- * if <code>true</code> the command can't be created and executed
- */
- private boolean isDisposed = false;
-
- /**
- * the reader to parse
- */
- private final Reader reader;
-
- /**
- * the parser to use
- */
- private CSVParser parser;
-
- int factor;
-
- private Table table;
-
- final TransactionalEditingDomain tableEditingDomain;
-
- final TransactionalEditingDomain contextEditingDomain;
-
- final EObject tableContext;
-
- List<Object> secondAxis;
-
- public PasteEObjectAxisInNattableCommandProvider(INattableModelManager tableManager, boolean pasteColumn, Reader reader, CSVPasteHelper pasteHelper2, long totalSize) {
- this.tableManager = tableManager;
- // this.pasteMode = status;
- this.existingConverters = new HashMap<Class<? extends AbstractStringValueConverter>, AbstractStringValueConverter>();
- this.pasteHelper = pasteHelper2;
- this.reader = reader;
- this.pasteColumn = pasteColumn;
- this.table = tableManager.getTable();
- this.tableContext = table.getContext();
- tableEditingDomain = TableEditingDomainUtils.getTableEditingDomain(table);
- contextEditingDomain = TableEditingDomainUtils.getTableContextEditingDomain(table);
- // TODO improve refresh and progress monitor...
- long div = -1;
- if (totalSize > Integer.MAX_VALUE) {
- div = totalSize / Integer.MAX_VALUE;
- if (div > Integer.MAX_VALUE) {
- div = 2 * div;
- }
- this.factor = (int) div;
- this.nbOperationsToDo = (int) (totalSize / div);
- } else {
- this.factor = 1;
- this.nbOperationsToDo = (int) totalSize;
- }
- parser = this.pasteHelper.createParser(reader);
- init();
- }
-
- /**
- * inits the field of this class
- */
- private void init() {
- PasteEObjectConfiguration configuration = null;
- if (this.pasteColumn) {
- configuration = (PasteEObjectConfiguration) AxisConfigurationUtils.getIAxisConfigurationUsedInTable(this.table, NattableaxisconfigurationPackage.eINSTANCE.getPasteEObjectConfiguration(), true);
- this.secondAxis = tableManager.getRowElementsList();
- } else {
-
- configuration = (PasteEObjectConfiguration) AxisConfigurationUtils.getIAxisConfigurationUsedInTable(this.table, NattableaxisconfigurationPackage.eINSTANCE.getPasteEObjectConfiguration(), false);
- this.secondAxis = tableManager.getColumnElementsList();
- }
- if (configuration != null) {
- this.containmentFeature = configuration.getPasteElementContainementFeature();
- this.typeToCreate = ElementTypeRegistry.getInstance().getType(configuration.getPastedElementId());
- this.postActions = new ArrayList<String>(configuration.getPostActions());
- this.detachedMode = configuration.isDetachedMode();
- }
- }
-
- /**
- *
- * @param useProgressMonitor
- * boolean indicating that we must do the paste with a progress monitor
- * TODO : post actions are not yet supported in the in the detached mode
- */
- public void executePasteFromStringCommand(final boolean useProgressMonitor) {
- if (this.pasteColumn) {// not yet supported
- return;
- }
- if (this.isDisposed) {
- throw new RuntimeException("The command provider is disposed");
- }
- final String pasteJobName;
- if (this.pasteColumn) {
- pasteJobName = PASTE_COLUMNS_JOB_NAME;
- } else {
- pasteJobName = PASTE_ROWS_JOB_NAME;
- }
- if (this.detachedMode) {
- executePasteFromStringCommandInDetachedMode(useProgressMonitor, pasteJobName);
- } else {
- executePasteFromStringCommandInAttachedMode(useProgressMonitor, pasteJobName);
- }
- }
-
-
- /**
- *
- * @param useProgressMonitor
- * boolean indicating that we must do the paste with a progress monitor
- */
- private void executePasteFromStringCommandInDetachedMode(final boolean useProgressMonitor, final String pasteJobName) {
- // the map used to share objects between the paste action and the cell value managers
- final Map<Object, Object> sharedMap = new HashMap<Object, Object>();
- // the map used to store useful information for the paste
- sharedMap.put(Constants.PASTED_ELEMENT_CONTAINER_KEY, tableContext);
- sharedMap.put(Constants.REFERENCES_TO_SET_KEY, new ArrayList<IValueSetter>());
- sharedMap.put(Constants.CELLS_TO_ADD_KEY, new ArrayList<Cell>());
-
- // used to be able to apply stereotypes required by columns properties, in detached mode even if there is no post actions defined in the table configuration
- // see bug 431691: [Table 2] Paste from Spreadsheet must be able to apply required stereotypes for column properties in all usecases
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=431691
- sharedMap.put(Constants.ADDITIONAL_POST_ACTIONS_TO_CONCLUDE_PASTE_KEY, new ArrayList<String>());
-
- if (!useProgressMonitor) {
- final ICommand pasteCommand = getPasteFromStringCommandInDetachedMode(contextEditingDomain, tableEditingDomain, new NullProgressMonitor(), sharedMap);
- try {
- CheckedOperationHistory.getInstance().execute(pasteCommand, new NullProgressMonitor(), null);
- } catch (ExecutionException e) {
- Activator.log.error(e);
- }
- sharedMap.clear();
- } else {
- // we create a job in order to don't freeze the UI
- final UIJob job = new UIJob(pasteJobName) {
-
- @Override
- public IStatus runInUIThread(IProgressMonitor monitor) {
-
- final ICommand pasteCommand = getPasteFromStringCommandInDetachedMode(contextEditingDomain, tableEditingDomain, monitor, sharedMap);
- if (pasteCommand == null) {
- return new Status(IStatus.CANCEL, Activator.PLUGIN_ID, PASTE_COMMAND_HAS_BEEN_CANCELLED);
- }
- // we execute the paste command
- if (pasteCommand.canExecute()) {
- try {
- CheckedOperationHistory.getInstance().execute(pasteCommand, monitor, null);
- } catch (ExecutionException e) {
- return new Status(IStatus.ERROR, Activator.PLUGIN_ID, "An exception occured during the paste", e); //$NON-NLS-1$
- } finally {
- sharedMap.clear();
- }
- monitor.done();
- return Status.OK_STATUS;
- } else {
- sharedMap.clear();
- return new Status(IStatus.ERROR, Activator.PLUGIN_ID, PASTE_COMMAND_CANT_BE_EXECUTED);
- }
- }
- };
- job.setUser(true);
- job.schedule();
- }
- }
-
- /**
- *
- * @param useProgressMonitor
- * boolean indicating that we must do the paste with a progress monitor
- */
- private void executePasteFromStringCommandInAttachedMode(final boolean useProgressMonitor, final String pasteJobName) {
- if (!useProgressMonitor) {
- final ICommand pasteCommand = getPasteFromStringCommandInAttachedMode(contextEditingDomain, tableEditingDomain, new NullProgressMonitor());
- try {
- CheckedOperationHistory.getInstance().execute(pasteCommand, new NullProgressMonitor(), null);
- } catch (ExecutionException e) {
- Activator.log.error(e);
- }
- } else {
- // we create a job in order to don't freeze the UI
- final UIJob job = new UIJob(pasteJobName) {
-
- @Override
- public IStatus runInUIThread(IProgressMonitor monitor) {
-
- final ICommand pasteCommand = getPasteFromStringCommandInAttachedMode(contextEditingDomain, tableEditingDomain, monitor);
- if (pasteCommand == null) {
- return new Status(IStatus.CANCEL, Activator.PLUGIN_ID, PASTE_COMMAND_HAS_BEEN_CANCELLED);
- }
- // we execute the paste command
- if (pasteCommand.canExecute()) {
- try {
- CheckedOperationHistory.getInstance().execute(pasteCommand, monitor, null);
- } catch (ExecutionException e) {
- return new Status(IStatus.ERROR, Activator.PLUGIN_ID, "An exception occured during the paste", e); //$NON-NLS-1$
- }
- monitor.done();
- return Status.OK_STATUS;
- } else {
- return new Status(IStatus.ERROR, Activator.PLUGIN_ID, PASTE_COMMAND_CANT_BE_EXECUTED);
- }
- }
- };
- job.setUser(true);
- job.schedule();
- }
- }
-
- private ICommand getPasteRowFromStringCommandInDetachedMode(final TransactionalEditingDomain contextEditingDomain, final TransactionalEditingDomain tableEditingDomain, final IProgressMonitor progressMonitor, final Map<Object, Object> sharedMap) {
- if (progressMonitor != null) {
- progressMonitor.beginTask(PASTE_ACTION_TASK_NAME, this.nbOperationsToDo);// +1 to add the created elements to the table
- }
- // the list of the created elements
- final List<Object> createdElements = new ArrayList<Object>();
-
- // 2.2 create the creation request and find the command provider
- final EClass eClassToCreate = this.typeToCreate.getEClass();
- final EFactory eFactory = eClassToCreate.getEPackage().getEFactoryInstance();
-
- // 2.3 create the axis
- int nbCreatedElements = 0;
-
- // we refresh the dialog each X read char
- long readChar = 0;
- long previousreadChar = 0;
- final RowIterator rowIter = this.parser.parse();
- while (rowIter.hasNext()) {
- final CellIterator cellIter = rowIter.next();
- if (!cellIter.hasNext()) {
- continue;// to avoid blank line
- }
- if ((progressMonitor != null) && progressMonitor.isCanceled()) {
- // the user click on the cancel button
- return null;
- }
-
- readChar = readChar + (parser.getReadCharacters() - previousreadChar);
- previousreadChar = parser.getReadCharacters();
-
-
- if (progressMonitor != null && readChar > refreshEachReadChar) {
- readChar = 0;
- progressMonitor.subTask(NLS.bind("{0} {1} have been created.", new Object[] { nbCreatedElements, typeToCreate.getEClass().getName() }));
- progressMonitor.worked(refreshEachReadChar);
- }
- nbCreatedElements++;
-
- // 2.3.3 we create the element itself
- final EObject createdElement = eFactory.create(eClassToCreate);
-
- createdElements.add(createdElement);
- nbCreatedElements++;
- for (final String currentPostActions : this.postActions) {
- PastePostActionRegistry.INSTANCE.doPostAction(this.tableManager, currentPostActions, tableContext, createdElement, sharedMap, null);// TODO : remove this parameter
- }
-
- // 2.3.4 we set these properties values
- final Iterator<Object> secondAxisIterator = secondAxis.iterator();
- while (secondAxisIterator.hasNext() && cellIter.hasNext()) {
- final Object currentAxis = secondAxisIterator.next();
- final String valueAsString = cellIter.next();
- final Object columnObject;
- final Object rowObject;
- if (this.pasteColumn) {
- columnObject = createdElement;
- rowObject = currentAxis;
- } else {
- columnObject = currentAxis;
- rowObject = createdElement;
- }
-
-
- boolean isEditable = CellManagerFactory.INSTANCE.isCellEditable(columnObject, rowObject, sharedMap);
- if (isEditable) {
- final AbstractStringValueConverter converter = CellManagerFactory.INSTANCE.getOrCreateStringValueConverterClass(columnObject, rowObject, tableManager, existingConverters, this.pasteHelper.getMultiValueSeparator());
- CellManagerFactory.INSTANCE.setStringValue(columnObject, rowObject, valueAsString, converter, tableManager, sharedMap);
- }
- }
-
- // TODO : do something to say that the number of cell is not correct!
- while (cellIter.hasNext()) {
- cellIter.next();// required!
- }
- }
-
- // 2.4 we add the created elements to the table
- final AbstractTransactionalCommand pasteCommand = new AbstractTransactionalCommand(tableEditingDomain, PASTE_COMMAND_NAME, null) {
-
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- // initialize lists
- final Collection<String> postActions = getPostActions();
-
- // we add the post actions added by cell manager
- // see bug 431691: [Table 2] Paste from Spreadsheet must be able to apply required stereotypes for column properties in all usecases
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=431691
- @SuppressWarnings("unchecked")
- final Collection<String> postActionsAddedByCellManagers = (Collection<String>) sharedMap.get(Constants.ADDITIONAL_POST_ACTIONS_TO_CONCLUDE_PASTE_KEY);
- postActions.addAll(postActionsAddedByCellManagers);
-
- @SuppressWarnings("unchecked")
- final List<Cell> cells = (List<Cell>) sharedMap.get(Constants.CELLS_TO_ADD_KEY);
- @SuppressWarnings("unchecked")
- final List<IValueSetter> valueToSet = (List<IValueSetter>) sharedMap.get(Constants.REFERENCES_TO_SET_KEY);
-
- int nbTasks = 1; // to add created elements to the model
- nbTasks = nbTasks + 1; // to add createds elements to the table
- nbTasks = nbTasks + postActions.size();// to do post actions after the attachment to the model
- nbTasks = nbTasks + 1; // to attach the cells to the model
- nbTasks = nbTasks + valueToSet.size(); // to set the references values
-
- if (progressMonitor != null) {
- if (progressMonitor.isCanceled()) {
- localDispose();
- return CommandResult.newCancelledCommandResult();
- }
- progressMonitor.beginTask(Messages.PasteEObjectAxisInTableCommandProvider_FinishingThePaste, nbTasks);
- }
-
- // 1. Add the elements to the context
- AddCommand.create(contextEditingDomain, tableContext, containmentFeature, createdElements).execute();
-
- if (progressMonitor != null) {
- if (progressMonitor.isCanceled()) {
- return CommandResult.newCancelledCommandResult();
- }
- progressMonitor.worked(1);
- progressMonitor.subTask(Messages.PasteEObjectAxisInTableCommandProvider_AddingElementToTheTable);
- }
-
- Command cmd = null;
- if (pasteColumn) {
- cmd = tableManager.getAddColumnElementCommand(createdElements); // TODO remove one of these 2 lines
- } else {
- cmd = tableManager.getAddRowElementCommand(createdElements);
- }
- if (cmd != null) {// could be null
- cmd.execute();
- }
-
- if (progressMonitor != null) {
- if (progressMonitor.isCanceled()) {
- return CommandResult.newCancelledCommandResult();
- }
- progressMonitor.worked(1);
- progressMonitor.subTask(Messages.PasteEObjectAxisInTableCommandProvider_DoingAdditionalActions);
- }
-
-
- for (final String currentPostActions : postActions) {
- PastePostActionRegistry.INSTANCE.concludePostAction(tableManager, currentPostActions, sharedMap);
- progressMonitor.worked(1);
- }
-
-
- if (progressMonitor != null) {
- if (progressMonitor.isCanceled()) {
- return CommandResult.newCancelledCommandResult();
- }
- progressMonitor.worked(1);
- progressMonitor.subTask(Messages.PasteEObjectAxisInTableCommandProvider_LinkingReferencesToTheModel);
- }
-
- // we set the references
-
- if (valueToSet.size() > 0) {
- for (final IValueSetter current : valueToSet) {
- current.doSetValue(contextEditingDomain);
- if (progressMonitor != null) {
- if (progressMonitor.isCanceled()) {
- return CommandResult.newCancelledCommandResult();
- }
- progressMonitor.worked(1);
- }
- }
- }
-
- // the cells must be attached at the end (in order to update properly the cell map in the table manager
- if (progressMonitor != null) {
- if (progressMonitor.isCanceled()) {
- return CommandResult.newCancelledCommandResult();
- }
- progressMonitor.worked(1);
- }
-
- // add the created cells to the table
- AddCommand.create(tableEditingDomain, table, NattablePackage.eINSTANCE.getTable_Cells(), cells).execute();
-
- if (progressMonitor != null) {
- progressMonitor.done();
- }
- localDispose();
- return CommandResult.newOKCommandResult();
- }
- };
-
- return pasteCommand;
- }
-
-
- /**
- *
- *
- * @param sharedMap
- * a map used to share objects and informations during the paste between this class and the cell value manager
- * @param commandCreationCancelProvider
- * the creation command progress monitor
- * @param commandExecutionProgressMonitor
- * the command execution progress monitor
- * @return
- * the command to use to finish the paste (the main part of the paste is directly done here)
- */
- private ICommand getPasteFromStringCommandInDetachedMode(final TransactionalEditingDomain contextEditingDomain, final TransactionalEditingDomain tableEditingDomain, final IProgressMonitor progressMonitor, final Map<Object, Object> sharedMap) {
- if (!this.pasteColumn) {
- return getPasteRowFromStringCommandInDetachedMode(contextEditingDomain, tableEditingDomain, progressMonitor, sharedMap);
- } else {
- // return getPasteColumnFromStringCommandInDetachedMode(contextEditingDomain, tableEditingDomain, progressMonitor, sharedMap);
- }
- return null;
- }
-
-
-
- /**
- *
- * @param commandCreationCancelProvider
- * the creation command progress monitor
- * @param commandExecutionProgressMonitor
- * the command execution progress monitor
- * @return
- */
- private ICommand getPasteColumnFromStringInAttachedModeCommand(final TransactionalEditingDomain contextEditingDomain, final TransactionalEditingDomain tableEditingDomain, final IProgressMonitor progressMonitor) {
- // initialize the progress monitor
- if (progressMonitor != null) {
- progressMonitor.beginTask(PASTE_ACTION_TASK_NAME, this.nbOperationsToDo);
- }
-
- // 2.2 create the creation request and find the command provider
- final CreateElementRequest createRequest = new CreateElementRequest(contextEditingDomain, this.tableContext, this.typeToCreate, (EReference) this.containmentFeature);
- final IElementEditService tableContextCommandProvider = ElementEditServiceUtils.getCommandProvider(tableContext);
-
- final ICommand pasteAllCommand = new AbstractTransactionalCommand(contextEditingDomain, PASTE_COMMAND_NAME, null) {
-
-
- /**
- *
- * @see org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand#doExecuteWithResult(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
- *
- * @param monitor
- * @param info
- * @return
- * @throws ExecutionException
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- long readChar = 0;
- long previousreadChar = 0;
-
- final RowIterator rowIter = parser.parse();
- int nbCreatedElements = 0;
- while (rowIter.hasNext()) {
- final CellIterator cellIter = rowIter.next();
- if (!cellIter.hasNext()) {
- continue;// to avoid blank line
- }
- if (progressMonitor != null && progressMonitor.isCanceled()) {
- progressMonitor.done();
- localDispose();
- return CommandResult.newCancelledCommandResult();
- }
- readChar = readChar + (parser.getReadCharacters() - previousreadChar);
- previousreadChar = parser.getReadCharacters();
- if (progressMonitor != null && readChar > refreshEachReadChar) {
- readChar = 0;
- progressMonitor.subTask(NLS.bind("{0} {1} have been created.", new Object[] { typeToCreate.getEClass().getName(), nbCreatedElements }));
- progressMonitor.worked(refreshEachReadChar);
- }
- nbCreatedElements++;
- final ICommand commandCreation = tableContextCommandProvider.getEditCommand(createRequest);
- if (commandCreation.canExecute()) {
- // 1. we create the element
- commandCreation.execute(monitor, info);
- // we execute the creation command
-
- // 2. we add it to the table
- final CommandResult res = commandCreation.getCommandResult();
- commandCreation.dispose();
-
- final Object createdElement = res.getReturnValue();
- final Command addCommand;
- if (pasteColumn) {
- addCommand = tableManager.getAddColumnElementCommand(Collections.singleton(createdElement));
- } else {
- addCommand = tableManager.getAddRowElementCommand(Collections.singleton(createdElement));
- }
- if (addCommand != null) {// can be null
- addCommand.execute();
- addCommand.dispose();
- }
-
- // 3. we set the values
- final Iterator<?> secondAxisIterator = secondAxis.iterator();
- while (secondAxisIterator.hasNext() && cellIter.hasNext()) {
- final Object currentAxis = secondAxisIterator.next();
- final String valueAsString = cellIter.next();
- final Object columnObject;
- final Object rowObject;
- if (pasteColumn) {
- columnObject = createdElement;
- rowObject = currentAxis;
- } else {
- columnObject = currentAxis;
- rowObject = createdElement;
- }
-
-
- boolean isEditable = CellManagerFactory.INSTANCE.isCellEditable(columnObject, rowObject);
-
- if (isEditable) {
- final AbstractStringValueConverter converter = CellManagerFactory.INSTANCE.getOrCreateStringValueConverterClass(columnObject, rowObject, tableManager, existingConverters, pasteHelper.getMultiValueSeparator());
- final Command setValueCommand = CellManagerFactory.INSTANCE.getSetStringValueCommand(contextEditingDomain, columnObject, rowObject, valueAsString, converter, tableManager);
- if (setValueCommand != null && setValueCommand.canExecute()) {
- setValueCommand.execute();
- setValueCommand.dispose();
- }
- }
- }
- // TODO inform the user
- while (cellIter.hasNext()) {
- cellIter.next();// required
- }
- }
- }
- progressMonitor.done();
- localDispose();
- return CommandResult.newOKCommandResult();
- }
- };
- return pasteAllCommand;
- }
-
-
- /**
- *
- * @param commandCreationCancelProvider
- * the creation command progress monitor
- * @param commandExecutionProgressMonitor
- * the command execution progress monitor
- * @return
- */
- private ICommand getPasteRowFromStringInAttachedModeCommand(final TransactionalEditingDomain contextEditingDomain, final TransactionalEditingDomain tableEditingDomain, final IProgressMonitor progressMonitor) {
- // initialize the progress monitor
- if (progressMonitor != null) {
- progressMonitor.beginTask(PASTE_ACTION_TASK_NAME, this.nbOperationsToDo);
- }
-
- // 2.2 create the creation request and find the command provider
- final CreateElementRequest createRequest = new CreateElementRequest(contextEditingDomain, this.tableContext, this.typeToCreate, (EReference) this.containmentFeature);
- final IElementEditService tableContextCommandProvider = ElementEditServiceUtils.getCommandProvider(tableContext);
-
- final ICommand pasteAllCommand = new AbstractTransactionalCommand(contextEditingDomain, PASTE_COMMAND_NAME, null) {
-
-
- /**
- *
- * @see org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand#doExecuteWithResult(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
- *
- * @param monitor
- * @param info
- * @return
- * @throws ExecutionException
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- long readChar = 0;
- long previousreadChar = 0;
-
- final RowIterator rowIter = parser.parse();
- int nbCreatedElements = 0;
- while (rowIter.hasNext()) {
- final CellIterator cellIter = rowIter.next();
- if (!cellIter.hasNext()) {
- continue;// to avoid blank line
- }
- if (progressMonitor != null && progressMonitor.isCanceled()) {
- progressMonitor.done();
- localDispose();
- return CommandResult.newCancelledCommandResult();
- }
- readChar = readChar + (parser.getReadCharacters() - previousreadChar);
- previousreadChar = parser.getReadCharacters();
- if (progressMonitor != null && readChar > refreshEachReadChar) {
- readChar = 0;
- progressMonitor.subTask(NLS.bind("{0} {1} have been created.", new Object[] { typeToCreate.getEClass().getName(), nbCreatedElements }));
- progressMonitor.worked(refreshEachReadChar);
- }
- nbCreatedElements++;
- final ICommand commandCreation = tableContextCommandProvider.getEditCommand(createRequest);
- if (commandCreation.canExecute()) {
- // 1. we create the element
- commandCreation.execute(monitor, info);
- // we execute the creation command
-
- // 2. we add it to the table
- final CommandResult res = commandCreation.getCommandResult();
- commandCreation.dispose();
-
- final Object createdElement = res.getReturnValue();
- final Command addCommand;
- if (pasteColumn) {
- addCommand = tableManager.getAddColumnElementCommand(Collections.singleton(createdElement));
- } else {
- addCommand = tableManager.getAddRowElementCommand(Collections.singleton(createdElement));
- }
- if (addCommand != null) {// can be null
- addCommand.execute();
- addCommand.dispose();
- }
-
- // 3. we set the values
- final Iterator<?> secondAxisIterator = secondAxis.iterator();
- while (secondAxisIterator.hasNext() && cellIter.hasNext()) {
- final Object currentAxis = secondAxisIterator.next();
- final String valueAsString = cellIter.next();
- final Object columnObject;
- final Object rowObject;
- if (pasteColumn) {
- columnObject = createdElement;
- rowObject = currentAxis;
- } else {
- columnObject = currentAxis;
- rowObject = createdElement;
- }
-
-
- boolean isEditable = CellManagerFactory.INSTANCE.isCellEditable(columnObject, rowObject);
-
- if (isEditable) {
- final AbstractStringValueConverter converter = CellManagerFactory.INSTANCE.getOrCreateStringValueConverterClass(columnObject, rowObject, tableManager, existingConverters, pasteHelper.getMultiValueSeparator());
- final Command setValueCommand = CellManagerFactory.INSTANCE.getSetStringValueCommand(contextEditingDomain, columnObject, rowObject, valueAsString, converter, tableManager);
- if (setValueCommand != null && setValueCommand.canExecute()) {
- setValueCommand.execute();
- setValueCommand.dispose();
- }
- }
- }
- // TODO inform the user
- while (cellIter.hasNext()) {
- cellIter.next();// required
- }
- }
- }
- progressMonitor.done();
- localDispose();
- return CommandResult.newOKCommandResult();
- }
- };
- return pasteAllCommand;
- }
-
- /**
- *
- * @param commandCreationCancelProvider
- * the creation command progress monitor
- * @param commandExecutionProgressMonitor
- * the command execution progress monitor
- * @return
- */
- private ICommand getPasteFromStringCommandInAttachedMode(final TransactionalEditingDomain contextEditingDomain, final TransactionalEditingDomain tableEditingDomain, final IProgressMonitor progressMonitor) {
- if (this.pasteColumn) {
- // return getPasteCFromStringInAttachedModeCommand(contextEditingDomain, tableEditingDomain, progressMonitor);
- } else {
- return getPasteRowFromStringInAttachedModeCommand(contextEditingDomain, tableEditingDomain, progressMonitor);
- }
- return null;
- }
-
- /**
- *
- * @return
- * the list of the post actions to do
- */
- private Collection<String> getPostActions() {
- return this.postActions;
- }
-
- /**
- * dispose fields of the class
- */
- private void localDispose() {
- this.isDisposed = true;
- this.tableManager = null;
- this.typeToCreate = null;
- this.containmentFeature = null;
- for (final AbstractStringValueConverter current : existingConverters.values()) {
- current.dispose();
- }
- this.existingConverters.clear();
- try {
- this.reader.close();
- } catch (IOException e) {
- Activator.log.error(e);
- }
- }
-
-}
+/*****************************************************************************
+ * Copyright (c) 2014 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Patrick Tessier (CEA LIST) - Initial API and implementation
+ /*****************************************************************************/
+package org.eclipse.papyrus.infra.nattable.provider;
+
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+import java.io.IOException;
+import java.io.Reader;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EFactory;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.edit.command.AddCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
+import org.eclipse.gmf.runtime.emf.type.core.ElementTypeRegistry;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.papyrus.commands.CheckedOperationHistory;
+import org.eclipse.papyrus.infra.nattable.Activator;
+import org.eclipse.papyrus.infra.nattable.manager.cell.CellManagerFactory;
+import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
+import org.eclipse.papyrus.infra.nattable.messages.Messages;
+import org.eclipse.papyrus.infra.nattable.model.nattable.NattablePackage;
+import org.eclipse.papyrus.infra.nattable.model.nattable.Table;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.NattableaxisconfigurationPackage;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.PasteEObjectConfiguration;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattablecell.Cell;
+import org.eclipse.papyrus.infra.nattable.parsers.CSVParser;
+import org.eclipse.papyrus.infra.nattable.parsers.CellIterator;
+import org.eclipse.papyrus.infra.nattable.parsers.RowIterator;
+import org.eclipse.papyrus.infra.nattable.paste.IValueSetter;
+import org.eclipse.papyrus.infra.nattable.paste.PastePostActionRegistry;
+import org.eclipse.papyrus.infra.nattable.utils.AxisConfigurationUtils;
+import org.eclipse.papyrus.infra.nattable.utils.CSVPasteHelper;
+import org.eclipse.papyrus.infra.nattable.utils.Constants;
+import org.eclipse.papyrus.infra.nattable.utils.TableEditingDomainUtils;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.infra.tools.converter.AbstractStringValueConverter;
+import org.eclipse.ui.progress.UIJob;
+
+/**
+ * Paste command manager for the paste in the table
+ *
+ * @author VL222926
+ *
+ */
+
+public class PasteEObjectAxisInNattableCommandProvider implements PasteNattableCommandProvider {
+
+ private static final int MIN_AXIS_FOR_PROGRESS_MONITOR = 5;
+
+ /**
+ * the containment feature to use
+ */
+ private EStructuralFeature containmentFeature;
+
+ /**
+ * the type to create
+ */
+ private IElementType typeToCreate;
+
+ /**
+ * the table manager
+ */
+ private INattableModelManager tableManager;
+
+ /**
+ * the paste mode
+ */
+ // private PasteEnablementStatus pasteMode;
+
+ /**
+ * if true, we are pasting in detached mode
+ */
+ private boolean detachedMode;
+
+ /**
+ * the list of the post actions do do
+ */
+ private List<String> postActions;
+
+ /**
+ * the list of the axis to paste
+ */
+ // private final String[] axisToPaste;
+
+ /**
+ * the paste helper
+ */
+ private final CSVPasteHelper pasteHelper;
+
+ /**
+ * the converter map
+ */
+ private final Map<Class<? extends AbstractStringValueConverter>, AbstractStringValueConverter> existingConverters;
+
+ private static final String PASTE_ACTION_TASK_NAME = Messages.PasteEObjectAxisInTableCommandProvider_PasteAction;
+
+ private static final String PASTE_ROWS_JOB_NAME = Messages.PasteEObjectAxisInTableCommandProvider_PasteRows;
+
+ private static final String PASTE_COLUMNS_JOB_NAME = Messages.PasteEObjectAxisInTableCommandProvider_PasteColumns;
+
+ private static final String PASTE_COMMAND_HAS_BEEN_CANCELLED = Messages.PasteEObjectAxisInTableCommandProvider_CommandCreationHasBeenCancelled;
+
+ private static final String PASTE_COMMAND_CANT_BE_EXECUTED = "The Paste command can't be executed"; //$NON-NLS-1$
+
+ private static final String PASTE_COMMAND_NAME = Messages.PasteEObjectAxisInTableCommandProvider_PasteFromStringCommand;
+
+ private static final String CREATING_ELEMENT_A_NUMBER_X_Y = Messages.PasteEObjectAxisInTableCommandProvider_CreatingAnumberXonY;
+
+ protected final boolean pasteColumn;
+
+ private final int nbOperationsToDo;
+
+
+ // we refresh the dialog each X read char
+ private final int refreshEachReadChar = 1000;
+
+ /**
+ * if <code>true</code> the command can't be created and executed
+ */
+ private boolean isDisposed = false;
+
+ /**
+ * the reader to parse
+ */
+ private final Reader reader;
+
+ /**
+ * the parser to use
+ */
+ private final CSVParser parser;
+
+ int factor;
+
+ private final Table table;
+
+ final TransactionalEditingDomain tableEditingDomain;
+
+ final TransactionalEditingDomain contextEditingDomain;
+
+ final EObject tableContext;
+
+ List<Object> secondAxis;
+
+ public PasteEObjectAxisInNattableCommandProvider(final INattableModelManager tableManager, final boolean pasteColumn, final Reader reader, final CSVPasteHelper pasteHelper2, final long totalSize) {
+ this.tableManager = tableManager;
+ // this.pasteMode = status;
+ this.existingConverters = new HashMap<Class<? extends AbstractStringValueConverter>, AbstractStringValueConverter>();
+ this.pasteHelper = pasteHelper2;
+ this.reader = reader;
+ this.pasteColumn = pasteColumn;
+ this.table = tableManager.getTable();
+ this.tableContext = table.getContext();
+ tableEditingDomain = TableEditingDomainUtils.getTableEditingDomain(table);
+ contextEditingDomain = TableEditingDomainUtils.getTableContextEditingDomain(table);
+ // TODO improve refresh and progress monitor...
+ long div = -1;
+ if (totalSize > Integer.MAX_VALUE) {
+ div = totalSize / Integer.MAX_VALUE;
+ if (div > Integer.MAX_VALUE) {
+ div = 2 * div;
+ }
+ this.factor = (int) div;
+ this.nbOperationsToDo = (int) (totalSize / div);
+ } else {
+ this.factor = 1;
+ this.nbOperationsToDo = (int) totalSize;
+ }
+ parser = this.pasteHelper.createParser(reader);
+ init();
+ }
+
+ /**
+ * inits the field of this class
+ */
+ private void init() {
+ PasteEObjectConfiguration configuration = null;
+ if (this.pasteColumn) {
+ configuration = (PasteEObjectConfiguration) AxisConfigurationUtils.getIAxisConfigurationUsedInTable(this.table, NattableaxisconfigurationPackage.eINSTANCE.getPasteEObjectConfiguration(), true);
+ this.secondAxis = tableManager.getRowElementsList();
+ } else {
+
+ configuration = (PasteEObjectConfiguration) AxisConfigurationUtils.getIAxisConfigurationUsedInTable(this.table, NattableaxisconfigurationPackage.eINSTANCE.getPasteEObjectConfiguration(), false);
+ this.secondAxis = tableManager.getColumnElementsList();
+ }
+ if (configuration != null) {
+ this.containmentFeature = configuration.getPasteElementContainementFeature();
+ this.typeToCreate = ElementTypeRegistry.getInstance().getType(configuration.getPastedElementId());
+ this.postActions = new ArrayList<String>(configuration.getPostActions());
+ this.detachedMode = configuration.isDetachedMode();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.infra.nattable.provider.PasteNattableCommandProvider#executePasteFromStringCommand(boolean, boolean)
+ */
+ @Override
+ public IStatus executePasteFromStringCommand(final boolean useProgressMonitor, final boolean openDialog) {
+ IStatus resultStatus = Status.OK_STATUS;
+ if (!this.pasteColumn) {// not yet supported
+ if (this.isDisposed) {
+ throw new RuntimeException("The command provider is disposed");
+ }
+ final String pasteJobName;
+ if (this.pasteColumn) {
+ pasteJobName = PASTE_COLUMNS_JOB_NAME;
+ } else {
+ pasteJobName = PASTE_ROWS_JOB_NAME;
+ }
+ if (this.detachedMode) {
+ executePasteFromStringCommandInDetachedMode(useProgressMonitor, pasteJobName);
+ } else {
+ executePasteFromStringCommandInAttachedMode(useProgressMonitor, pasteJobName);
+ }
+ }
+ return resultStatus;
+ }
+
+
+ /**
+ *
+ * @param useProgressMonitor
+ * boolean indicating that we must do the paste with a progress monitor
+ */
+ private void executePasteFromStringCommandInDetachedMode(final boolean useProgressMonitor, final String pasteJobName) {
+ // the map used to share objects between the paste action and the cell value managers
+ final Map<Object, Object> sharedMap = new HashMap<Object, Object>();
+ // the map used to store useful information for the paste
+ sharedMap.put(Constants.PASTED_ELEMENT_CONTAINER_KEY, tableContext);
+ sharedMap.put(Constants.REFERENCES_TO_SET_KEY, new ArrayList<IValueSetter>());
+ sharedMap.put(Constants.CELLS_TO_ADD_KEY, new ArrayList<Cell>());
+
+ // used to be able to apply stereotypes required by columns properties, in detached mode even if there is no post actions defined in the table configuration
+ // see bug 431691: [Table 2] Paste from Spreadsheet must be able to apply required stereotypes for column properties in all usecases
+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=431691
+ sharedMap.put(Constants.ADDITIONAL_POST_ACTIONS_TO_CONCLUDE_PASTE_KEY, new ArrayList<String>());
+
+ if (!useProgressMonitor) {
+ final ICommand pasteCommand = getPasteFromStringCommandInDetachedMode(contextEditingDomain, tableEditingDomain, new NullProgressMonitor(), sharedMap);
+ try {
+ CheckedOperationHistory.getInstance().execute(pasteCommand, new NullProgressMonitor(), null);
+ } catch (final ExecutionException e) {
+ Activator.log.error(e);
+ }
+ sharedMap.clear();
+ } else {
+ // we create a job in order to don't freeze the UI
+ final UIJob job = new UIJob(pasteJobName) {
+
+ @Override
+ public IStatus runInUIThread(final IProgressMonitor monitor) {
+
+ final ICommand pasteCommand = getPasteFromStringCommandInDetachedMode(contextEditingDomain, tableEditingDomain, monitor, sharedMap);
+ if (pasteCommand == null) {
+ return new Status(IStatus.CANCEL, Activator.PLUGIN_ID, PASTE_COMMAND_HAS_BEEN_CANCELLED);
+ }
+ // we execute the paste command
+ if (pasteCommand.canExecute()) {
+ try {
+ CheckedOperationHistory.getInstance().execute(pasteCommand, monitor, null);
+ } catch (final ExecutionException e) {
+ return new Status(IStatus.ERROR, Activator.PLUGIN_ID, "An exception occured during the paste", e); //$NON-NLS-1$
+ } finally {
+ sharedMap.clear();
+ }
+ monitor.done();
+ return Status.OK_STATUS;
+ } else {
+ sharedMap.clear();
+ return new Status(IStatus.ERROR, Activator.PLUGIN_ID, PASTE_COMMAND_CANT_BE_EXECUTED);
+ }
+ }
+ };
+ job.setUser(true);
+ job.schedule();
+ }
+ }
+
+ /**
+ *
+ * @param useProgressMonitor
+ * boolean indicating that we must do the paste with a progress monitor
+ */
+ private void executePasteFromStringCommandInAttachedMode(final boolean useProgressMonitor, final String pasteJobName) {
+ if (!useProgressMonitor) {
+ final ICommand pasteCommand = getPasteFromStringCommandInAttachedMode(contextEditingDomain, tableEditingDomain, new NullProgressMonitor());
+ try {
+ CheckedOperationHistory.getInstance().execute(pasteCommand, new NullProgressMonitor(), null);
+ } catch (final ExecutionException e) {
+ Activator.log.error(e);
+ }
+ } else {
+ // we create a job in order to don't freeze the UI
+ final UIJob job = new UIJob(pasteJobName) {
+
+ @Override
+ public IStatus runInUIThread(final IProgressMonitor monitor) {
+
+ final ICommand pasteCommand = getPasteFromStringCommandInAttachedMode(contextEditingDomain, tableEditingDomain, monitor);
+ if (pasteCommand == null) {
+ return new Status(IStatus.CANCEL, Activator.PLUGIN_ID, PASTE_COMMAND_HAS_BEEN_CANCELLED);
+ }
+ // we execute the paste command
+ if (pasteCommand.canExecute()) {
+ try {
+ CheckedOperationHistory.getInstance().execute(pasteCommand, monitor, null);
+ } catch (final ExecutionException e) {
+ return new Status(IStatus.ERROR, Activator.PLUGIN_ID, "An exception occured during the paste", e); //$NON-NLS-1$
+ }
+ monitor.done();
+ return Status.OK_STATUS;
+ } else {
+ return new Status(IStatus.ERROR, Activator.PLUGIN_ID, PASTE_COMMAND_CANT_BE_EXECUTED);
+ }
+ }
+ };
+ job.setUser(true);
+ job.schedule();
+ }
+ }
+
+ private ICommand getPasteRowFromStringCommandInDetachedMode(final TransactionalEditingDomain contextEditingDomain, final TransactionalEditingDomain tableEditingDomain, final IProgressMonitor progressMonitor, final Map<Object, Object> sharedMap) {
+ if (progressMonitor != null) {
+ progressMonitor.beginTask(PASTE_ACTION_TASK_NAME, this.nbOperationsToDo);// +1 to add the created elements to the table
+ }
+ // the list of the created elements
+ final List<Object> createdElements = new ArrayList<Object>();
+
+ // 2.2 create the creation request and find the command provider
+ final EClass eClassToCreate = this.typeToCreate.getEClass();
+ final EFactory eFactory = eClassToCreate.getEPackage().getEFactoryInstance();
+
+ // 2.3 create the axis
+ int nbCreatedElements = 0;
+
+ // we refresh the dialog each X read char
+ long readChar = 0;
+ long previousreadChar = 0;
+ final RowIterator rowIter = this.parser.parse();
+ while (rowIter.hasNext()) {
+ final CellIterator cellIter = rowIter.next();
+ if (!cellIter.hasNext()) {
+ continue;// to avoid blank line
+ }
+ if ((progressMonitor != null) && progressMonitor.isCanceled()) {
+ // the user click on the cancel button
+ return null;
+ }
+
+ readChar = readChar + (parser.getReadCharacters() - previousreadChar);
+ previousreadChar = parser.getReadCharacters();
+
+
+ if (progressMonitor != null && readChar > refreshEachReadChar) {
+ readChar = 0;
+ progressMonitor.subTask(NLS.bind("{0} {1} have been created.", new Object[] { nbCreatedElements, typeToCreate.getEClass().getName() }));
+ progressMonitor.worked(refreshEachReadChar);
+ }
+ nbCreatedElements++;
+
+ // 2.3.3 we create the element itself
+ final EObject createdElement = eFactory.create(eClassToCreate);
+
+ createdElements.add(createdElement);
+ nbCreatedElements++;
+ for (final String currentPostActions : this.postActions) {
+ PastePostActionRegistry.INSTANCE.doPostAction(this.tableManager, currentPostActions, tableContext, createdElement, sharedMap, null);// TODO : remove this parameter
+ }
+
+ // 2.3.4 we set these properties values
+ final Iterator<Object> secondAxisIterator = secondAxis.iterator();
+ while (secondAxisIterator.hasNext() && cellIter.hasNext()) {
+ final Object currentAxis = secondAxisIterator.next();
+ final String valueAsString = cellIter.next();
+ final Object columnObject;
+ final Object rowObject;
+ if (this.pasteColumn) {
+ columnObject = createdElement;
+ rowObject = currentAxis;
+ } else {
+ columnObject = currentAxis;
+ rowObject = createdElement;
+ }
+
+
+ final boolean isEditable = CellManagerFactory.INSTANCE.isCellEditable(columnObject, rowObject, sharedMap);
+ if (isEditable) {
+ final AbstractStringValueConverter converter = CellManagerFactory.INSTANCE.getOrCreateStringValueConverterClass(columnObject, rowObject, tableManager, existingConverters, this.pasteHelper.getMultiValueSeparator());
+ CellManagerFactory.INSTANCE.setStringValue(columnObject, rowObject, valueAsString, converter, tableManager, sharedMap);
+ }
+ }
+
+ // TODO : do something to say that the number of cell is not correct!
+ while (cellIter.hasNext()) {
+ cellIter.next();// required!
+ }
+ }
+
+ // 2.4 we add the created elements to the table
+ final AbstractTransactionalCommand pasteCommand = new AbstractTransactionalCommand(tableEditingDomain, PASTE_COMMAND_NAME, null) {
+
+ @Override
+ protected CommandResult doExecuteWithResult(final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
+ // initialize lists
+ final Collection<String> postActions = getPostActions();
+
+ // we add the post actions added by cell manager
+ // see bug 431691: [Table 2] Paste from Spreadsheet must be able to apply required stereotypes for column properties in all usecases
+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=431691
+ @SuppressWarnings("unchecked")
+ final Collection<String> postActionsAddedByCellManagers = (Collection<String>) sharedMap.get(Constants.ADDITIONAL_POST_ACTIONS_TO_CONCLUDE_PASTE_KEY);
+ postActions.addAll(postActionsAddedByCellManagers);
+
+ @SuppressWarnings("unchecked")
+ final List<Cell> cells = (List<Cell>) sharedMap.get(Constants.CELLS_TO_ADD_KEY);
+ @SuppressWarnings("unchecked")
+ final List<IValueSetter> valueToSet = (List<IValueSetter>) sharedMap.get(Constants.REFERENCES_TO_SET_KEY);
+
+ int nbTasks = 1; // to add created elements to the model
+ nbTasks = nbTasks + 1; // to add createds elements to the table
+ nbTasks = nbTasks + postActions.size();// to do post actions after the attachment to the model
+ nbTasks = nbTasks + 1; // to attach the cells to the model
+ nbTasks = nbTasks + valueToSet.size(); // to set the references values
+
+ if (progressMonitor != null) {
+ if (progressMonitor.isCanceled()) {
+ localDispose();
+ return CommandResult.newCancelledCommandResult();
+ }
+ progressMonitor.beginTask(Messages.PasteEObjectAxisInTableCommandProvider_FinishingThePaste, nbTasks);
+ }
+
+ // 1. Add the elements to the context
+ AddCommand.create(contextEditingDomain, tableContext, containmentFeature, createdElements).execute();
+
+ if (progressMonitor != null) {
+ if (progressMonitor.isCanceled()) {
+ return CommandResult.newCancelledCommandResult();
+ }
+ progressMonitor.worked(1);
+ progressMonitor.subTask(Messages.PasteEObjectAxisInTableCommandProvider_AddingElementToTheTable);
+ }
+
+ Command cmd = null;
+ if (pasteColumn) {
+ cmd = tableManager.getAddColumnElementCommand(createdElements); // TODO remove one of these 2 lines
+ } else {
+ cmd = tableManager.getAddRowElementCommand(createdElements);
+ }
+ if (cmd != null) {// could be null
+ cmd.execute();
+ }
+
+ if (progressMonitor != null) {
+ if (progressMonitor.isCanceled()) {
+ return CommandResult.newCancelledCommandResult();
+ }
+ progressMonitor.worked(1);
+ progressMonitor.subTask(Messages.PasteEObjectAxisInTableCommandProvider_DoingAdditionalActions);
+ }
+
+
+ for (final String currentPostActions : postActions) {
+ PastePostActionRegistry.INSTANCE.concludePostAction(tableManager, currentPostActions, sharedMap);
+ progressMonitor.worked(1);
+ }
+
+
+ if (progressMonitor != null) {
+ if (progressMonitor.isCanceled()) {
+ return CommandResult.newCancelledCommandResult();
+ }
+ progressMonitor.worked(1);
+ progressMonitor.subTask(Messages.PasteEObjectAxisInTableCommandProvider_LinkingReferencesToTheModel);
+ }
+
+ // we set the references
+
+ if (valueToSet.size() > 0) {
+ for (final IValueSetter current : valueToSet) {
+ current.doSetValue(contextEditingDomain);
+ if (progressMonitor != null) {
+ if (progressMonitor.isCanceled()) {
+ return CommandResult.newCancelledCommandResult();
+ }
+ progressMonitor.worked(1);
+ }
+ }
+ }
+
+ // the cells must be attached at the end (in order to update properly the cell map in the table manager
+ if (progressMonitor != null) {
+ if (progressMonitor.isCanceled()) {
+ return CommandResult.newCancelledCommandResult();
+ }
+ progressMonitor.worked(1);
+ }
+
+ // add the created cells to the table
+ AddCommand.create(tableEditingDomain, table, NattablePackage.eINSTANCE.getTable_Cells(), cells).execute();
+
+ if (progressMonitor != null) {
+ progressMonitor.done();
+ }
+ localDispose();
+ return CommandResult.newOKCommandResult();
+ }
+ };
+
+ return pasteCommand;
+ }
+
+
+ /**
+ *
+ *
+ * @param sharedMap
+ * a map used to share objects and informations during the paste between this class and the cell value manager
+ * @param commandCreationCancelProvider
+ * the creation command progress monitor
+ * @param commandExecutionProgressMonitor
+ * the command execution progress monitor
+ * @return
+ * the command to use to finish the paste (the main part of the paste is directly done here)
+ */
+ private ICommand getPasteFromStringCommandInDetachedMode(final TransactionalEditingDomain contextEditingDomain, final TransactionalEditingDomain tableEditingDomain, final IProgressMonitor progressMonitor, final Map<Object, Object> sharedMap) {
+ if (!this.pasteColumn) {
+ return getPasteRowFromStringCommandInDetachedMode(contextEditingDomain, tableEditingDomain, progressMonitor, sharedMap);
+ } else {
+ // return getPasteColumnFromStringCommandInDetachedMode(contextEditingDomain, tableEditingDomain, progressMonitor, sharedMap);
+ }
+ return null;
+ }
+
+
+
+ /**
+ *
+ * @param commandCreationCancelProvider
+ * the creation command progress monitor
+ * @param commandExecutionProgressMonitor
+ * the command execution progress monitor
+ * @return
+ */
+ private ICommand getPasteColumnFromStringInAttachedModeCommand(final TransactionalEditingDomain contextEditingDomain, final TransactionalEditingDomain tableEditingDomain, final IProgressMonitor progressMonitor) {
+ // initialize the progress monitor
+ if (progressMonitor != null) {
+ progressMonitor.beginTask(PASTE_ACTION_TASK_NAME, this.nbOperationsToDo);
+ }
+
+ // 2.2 create the creation request and find the command provider
+ final CreateElementRequest createRequest = new CreateElementRequest(contextEditingDomain, this.tableContext, this.typeToCreate, (EReference) this.containmentFeature);
+ final IElementEditService tableContextCommandProvider = ElementEditServiceUtils.getCommandProvider(tableContext);
+
+ final ICommand pasteAllCommand = new AbstractTransactionalCommand(contextEditingDomain, PASTE_COMMAND_NAME, null) {
+
+
+ /**
+ *
+ * @see org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand#doExecuteWithResult(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
+ *
+ * @param monitor
+ * @param info
+ * @return
+ * @throws ExecutionException
+ */
+ @Override
+ protected CommandResult doExecuteWithResult(final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
+ long readChar = 0;
+ long previousreadChar = 0;
+
+ final RowIterator rowIter = parser.parse();
+ int nbCreatedElements = 0;
+ while (rowIter.hasNext()) {
+ final CellIterator cellIter = rowIter.next();
+ if (!cellIter.hasNext()) {
+ continue;// to avoid blank line
+ }
+ if (progressMonitor != null && progressMonitor.isCanceled()) {
+ progressMonitor.done();
+ localDispose();
+ return CommandResult.newCancelledCommandResult();
+ }
+ readChar = readChar + (parser.getReadCharacters() - previousreadChar);
+ previousreadChar = parser.getReadCharacters();
+ if (progressMonitor != null && readChar > refreshEachReadChar) {
+ readChar = 0;
+ progressMonitor.subTask(NLS.bind("{0} {1} have been created.", new Object[] { typeToCreate.getEClass().getName(), nbCreatedElements }));
+ progressMonitor.worked(refreshEachReadChar);
+ }
+ nbCreatedElements++;
+ final ICommand commandCreation = tableContextCommandProvider.getEditCommand(createRequest);
+ if (commandCreation.canExecute()) {
+ // 1. we create the element
+ commandCreation.execute(monitor, info);
+ // we execute the creation command
+
+ // 2. we add it to the table
+ final CommandResult res = commandCreation.getCommandResult();
+ commandCreation.dispose();
+
+ final Object createdElement = res.getReturnValue();
+ final Command addCommand;
+ if (pasteColumn) {
+ addCommand = tableManager.getAddColumnElementCommand(Collections.singleton(createdElement));
+ } else {
+ addCommand = tableManager.getAddRowElementCommand(Collections.singleton(createdElement));
+ }
+ if (addCommand != null) {// can be null
+ addCommand.execute();
+ addCommand.dispose();
+ }
+
+ // 3. we set the values
+ final Iterator<?> secondAxisIterator = secondAxis.iterator();
+ while (secondAxisIterator.hasNext() && cellIter.hasNext()) {
+ final Object currentAxis = secondAxisIterator.next();
+ final String valueAsString = cellIter.next();
+ final Object columnObject;
+ final Object rowObject;
+ if (pasteColumn) {
+ columnObject = createdElement;
+ rowObject = currentAxis;
+ } else {
+ columnObject = currentAxis;
+ rowObject = createdElement;
+ }
+
+
+ final boolean isEditable = CellManagerFactory.INSTANCE.isCellEditable(columnObject, rowObject);
+
+ if (isEditable) {
+ final AbstractStringValueConverter converter = CellManagerFactory.INSTANCE.getOrCreateStringValueConverterClass(columnObject, rowObject, tableManager, existingConverters, pasteHelper.getMultiValueSeparator());
+ final Command setValueCommand = CellManagerFactory.INSTANCE.getSetStringValueCommand(contextEditingDomain, columnObject, rowObject, valueAsString, converter, tableManager);
+ if (setValueCommand != null && setValueCommand.canExecute()) {
+ setValueCommand.execute();
+ setValueCommand.dispose();
+ }
+ }
+ }
+ // TODO inform the user
+ while (cellIter.hasNext()) {
+ cellIter.next();// required
+ }
+ }
+ }
+ progressMonitor.done();
+ localDispose();
+ return CommandResult.newOKCommandResult();
+ }
+ };
+ return pasteAllCommand;
+ }
+
+
+ /**
+ *
+ * @param commandCreationCancelProvider
+ * the creation command progress monitor
+ * @param commandExecutionProgressMonitor
+ * the command execution progress monitor
+ * @return
+ */
+ private ICommand getPasteRowFromStringInAttachedModeCommand(final TransactionalEditingDomain contextEditingDomain, final TransactionalEditingDomain tableEditingDomain, final IProgressMonitor progressMonitor) {
+ // initialize the progress monitor
+ if (progressMonitor != null) {
+ progressMonitor.beginTask(PASTE_ACTION_TASK_NAME, this.nbOperationsToDo);
+ }
+
+ // 2.2 create the creation request and find the command provider
+ final CreateElementRequest createRequest = new CreateElementRequest(contextEditingDomain, this.tableContext, this.typeToCreate, (EReference) this.containmentFeature);
+ final IElementEditService tableContextCommandProvider = ElementEditServiceUtils.getCommandProvider(tableContext);
+
+ final ICommand pasteAllCommand = new AbstractTransactionalCommand(contextEditingDomain, PASTE_COMMAND_NAME, null) {
+
+
+ /**
+ *
+ * @see org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand#doExecuteWithResult(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
+ *
+ * @param monitor
+ * @param info
+ * @return
+ * @throws ExecutionException
+ */
+ @Override
+ protected CommandResult doExecuteWithResult(final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
+ long readChar = 0;
+ long previousreadChar = 0;
+
+ final RowIterator rowIter = parser.parse();
+ int nbCreatedElements = 0;
+ while (rowIter.hasNext()) {
+ final CellIterator cellIter = rowIter.next();
+ if (!cellIter.hasNext()) {
+ continue;// to avoid blank line
+ }
+ if (progressMonitor != null && progressMonitor.isCanceled()) {
+ progressMonitor.done();
+ localDispose();
+ return CommandResult.newCancelledCommandResult();
+ }
+ readChar = readChar + (parser.getReadCharacters() - previousreadChar);
+ previousreadChar = parser.getReadCharacters();
+ if (progressMonitor != null && readChar > refreshEachReadChar) {
+ readChar = 0;
+ progressMonitor.subTask(NLS.bind("{0} {1} have been created.", new Object[] { typeToCreate.getEClass().getName(), nbCreatedElements }));
+ progressMonitor.worked(refreshEachReadChar);
+ }
+ nbCreatedElements++;
+ final ICommand commandCreation = tableContextCommandProvider.getEditCommand(createRequest);
+ if (commandCreation.canExecute()) {
+ // 1. we create the element
+ commandCreation.execute(monitor, info);
+ // we execute the creation command
+
+ // 2. we add it to the table
+ final CommandResult res = commandCreation.getCommandResult();
+ commandCreation.dispose();
+
+ final Object createdElement = res.getReturnValue();
+ final Command addCommand;
+ if (pasteColumn) {
+ addCommand = tableManager.getAddColumnElementCommand(Collections.singleton(createdElement));
+ } else {
+ addCommand = tableManager.getAddRowElementCommand(Collections.singleton(createdElement));
+ }
+ if (addCommand != null) {// can be null
+ addCommand.execute();
+ addCommand.dispose();
+ }
+
+ // 3. we set the values
+ final Iterator<?> secondAxisIterator = secondAxis.iterator();
+ while (secondAxisIterator.hasNext() && cellIter.hasNext()) {
+ final Object currentAxis = secondAxisIterator.next();
+ final String valueAsString = cellIter.next();
+ final Object columnObject;
+ final Object rowObject;
+ if (pasteColumn) {
+ columnObject = createdElement;
+ rowObject = currentAxis;
+ } else {
+ columnObject = currentAxis;
+ rowObject = createdElement;
+ }
+
+ final boolean isEditable = CellManagerFactory.INSTANCE.isCellEditable(columnObject, rowObject);
+
+ if (isEditable) {
+ final AbstractStringValueConverter converter = CellManagerFactory.INSTANCE.getOrCreateStringValueConverterClass(columnObject, rowObject, tableManager, existingConverters, pasteHelper.getMultiValueSeparator());
+ final Command setValueCommand = CellManagerFactory.INSTANCE.getSetStringValueCommand(contextEditingDomain, columnObject, rowObject, valueAsString, converter, tableManager);
+ if (setValueCommand != null && setValueCommand.canExecute()) {
+ setValueCommand.execute();
+ setValueCommand.dispose();
+ }
+ }
+ }
+ // TODO inform the user
+ while (cellIter.hasNext()) {
+ cellIter.next();// required
+ }
+ }
+ }
+ progressMonitor.done();
+ localDispose();
+ return CommandResult.newOKCommandResult();
+ }
+ };
+ return pasteAllCommand;
+ }
+
+ /**
+ *
+ * @param commandCreationCancelProvider
+ * the creation command progress monitor
+ * @param commandExecutionProgressMonitor
+ * the command execution progress monitor
+ * @return
+ */
+ private ICommand getPasteFromStringCommandInAttachedMode(final TransactionalEditingDomain contextEditingDomain, final TransactionalEditingDomain tableEditingDomain, final IProgressMonitor progressMonitor) {
+ if (this.pasteColumn) {
+ // return getPasteCFromStringInAttachedModeCommand(contextEditingDomain, tableEditingDomain, progressMonitor);
+ } else {
+ return getPasteRowFromStringInAttachedModeCommand(contextEditingDomain, tableEditingDomain, progressMonitor);
+ }
+ return null;
+ }
+
+ /**
+ *
+ * @return
+ * the list of the post actions to do
+ */
+ private Collection<String> getPostActions() {
+ return this.postActions;
+ }
+
+ /**
+ * dispose fields of the class
+ */
+ private void localDispose() {
+ this.isDisposed = true;
+ this.tableManager = null;
+ this.typeToCreate = null;
+ this.containmentFeature = null;
+ for (final AbstractStringValueConverter current : existingConverters.values()) {
+ current.dispose();
+ }
+ this.existingConverters.clear();
+ try {
+ this.reader.close();
+ } catch (final IOException e) {
+ Activator.log.error(e);
+ }
+ }
+
+}
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/PasteEObjectAxisInTableCommandProvider.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/PasteEObjectAxisInTableCommandProvider.java
index fbf9e4e54d3..39deaffd0d8 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/PasteEObjectAxisInTableCommandProvider.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/PasteEObjectAxisInTableCommandProvider.java
@@ -1,694 +1,697 @@
-/*****************************************************************************
- * Copyright (c) 2013 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.infra.nattable.provider;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EFactory;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EReference;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.edit.command.AddCommand;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.type.core.ElementTypeRegistry;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.papyrus.commands.CheckedOperationHistory;
-import org.eclipse.papyrus.infra.nattable.Activator;
-import org.eclipse.papyrus.infra.nattable.manager.cell.CellManagerFactory;
-import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
-import org.eclipse.papyrus.infra.nattable.messages.Messages;
-import org.eclipse.papyrus.infra.nattable.model.nattable.NattablePackage;
-import org.eclipse.papyrus.infra.nattable.model.nattable.Table;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.NattableaxisconfigurationPackage;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.PasteEObjectConfiguration;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattablecell.Cell;
-import org.eclipse.papyrus.infra.nattable.paste.IValueSetter;
-import org.eclipse.papyrus.infra.nattable.paste.PastePostActionRegistry;
-import org.eclipse.papyrus.infra.nattable.utils.AxisConfigurationUtils;
-import org.eclipse.papyrus.infra.nattable.utils.AxisUtils;
-import org.eclipse.papyrus.infra.nattable.utils.Constants;
-import org.eclipse.papyrus.infra.nattable.utils.PasteModeEnumeration;
-import org.eclipse.papyrus.infra.nattable.utils.TableClipboardUtils;
-import org.eclipse.papyrus.infra.nattable.utils.TableEditingDomainUtils;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.infra.tools.converter.AbstractStringValueConverter;
-import org.eclipse.ui.progress.UIJob;
-
-/**
- * Paste command manager for the paste in the table
- *
- * @author VL222926
- *
- */
-@Deprecated
-// use PasteEObjectAxisInNattableCommandProvider, will be removed when the new paste api will allows to paste columns
-public class PasteEObjectAxisInTableCommandProvider {
-
- private static final int MIN_AXIS_FOR_PROGRESS_MONITOR = 5;
-
- /**
- * the containment feature to use
- */
- private EStructuralFeature containmentFeature;
-
- /**
- * the type to create
- */
- private IElementType typeToCreate;
-
- /**
- * the table manager
- */
- private INattableModelManager tableManager;
-
- /**
- * the paste mode
- */
- private PasteModeEnumeration pasteMode;
-
- /**
- * if true, we are pasting in detached mode
- */
- private boolean detachedMode;
-
- /**
- * the list of the post actions do do
- */
- private List<String> postActions;
-
- /**
- * the copnverter map
- */
- private Map<Class<? extends AbstractStringValueConverter>, AbstractStringValueConverter> existingConverters;
-
- private static final String PASTE_ACTION_TASK_NAME = Messages.PasteEObjectAxisInTableCommandProvider_PasteAction;
-
- private static final String PASTE_ROWS_JOB_NAME = Messages.PasteEObjectAxisInTableCommandProvider_PasteRows;
-
- private static final String PASTE_COLUMNS_JOB_NAME = Messages.PasteEObjectAxisInTableCommandProvider_PasteColumns;
-
- private static final String PASTE_COMMAND_HAS_BEEN_CANCELLED = Messages.PasteEObjectAxisInTableCommandProvider_CommandCreationHasBeenCancelled;
-
- private static final String PASTE_COMMAND_CANT_BE_EXECUTED = "The Paste command can't be executed"; //$NON-NLS-1$
-
- private static final String PASTE_COMMAND_NAME = Messages.PasteEObjectAxisInTableCommandProvider_PasteFromStringCommand;
-
- private static final String CREATING_ELEMENT_A_NUMBER_X_Y = Messages.PasteEObjectAxisInTableCommandProvider_CreatingAnumberXonY;
-
- /**
- *
- * Constructor.
- *
- * @param tableManager
- * the table manager
- * @param typeToCreate
- * the type to create
- * @param containmentFeature
- * the containment feature
- * @param pasteMode
- * the paste mode
- */
- public PasteEObjectAxisInTableCommandProvider(final INattableModelManager tableManager, final PasteModeEnumeration pasteMode) {
- this.tableManager = tableManager;
- this.pasteMode = pasteMode;
- this.existingConverters = new HashMap<Class<? extends AbstractStringValueConverter>, AbstractStringValueConverter>();
- init();
- }
-
- /**
- * inits the field of this class
- */
- private void init() {
- if (pasteMode == PasteModeEnumeration.PASTE_EOBJECT_ROW_OR_COLUMN) {
- pasteMode = askWhichPasteModeDo();
- }
- Assert.isTrue(pasteMode != PasteModeEnumeration.CANT_PASTE, "The paste can't be done"); //$NON-NLS-1$
- PasteEObjectConfiguration configuration = null;
- switch (pasteMode) {
- case PASTE_EOBJECT_COLUMN:
- configuration = (PasteEObjectConfiguration) AxisConfigurationUtils.getIAxisConfigurationUsedInTable(this.tableManager.getTable(), NattableaxisconfigurationPackage.eINSTANCE.getPasteEObjectConfiguration(), true);
- break;
- case PASTE_EOBJECT_ROW:
- configuration = (PasteEObjectConfiguration) AxisConfigurationUtils.getIAxisConfigurationUsedInTable(this.tableManager.getTable(), NattableaxisconfigurationPackage.eINSTANCE.getPasteEObjectConfiguration(), false);
- break;
- default:
- break;
- }
- if (configuration != null) {
- this.containmentFeature = configuration.getPasteElementContainementFeature();
- this.typeToCreate = ElementTypeRegistry.getInstance().getType(configuration.getPastedElementId());
- this.postActions = configuration.getPostActions();
- this.detachedMode = configuration.isDetachedMode();
- }
- }
-
- /**
- *
- * @param useProgressMonitor
- * boolean indicating that we must do the paste with a progress monitor
- * TODO : post actions are not yet supported in the in the detached mode
- */
- public void executePasteFromStringCommand(final boolean useProgressMonitor) {
- final String pasteJobName;
- if (pasteMode == PasteModeEnumeration.PASTE_EOBJECT_COLUMN) {
- pasteJobName = PASTE_COLUMNS_JOB_NAME;
- } else {
- pasteJobName = PASTE_ROWS_JOB_NAME;
- }
- if (this.detachedMode) {
- executePasteFromStringCommandInDetachedMode(useProgressMonitor, pasteJobName);
- } else {
- executePasteFromStringCommandInAttachedMode(useProgressMonitor, pasteJobName);
- }
- }
-
- /**
- *
- * @param useProgressMonitor
- * boolean indicating that we must do the paste with a progress monitor
- */
- protected void executePasteFromStringCommandInDetachedMode(final boolean useProgressMonitor, final String pasteJobName) {
- Table table = tableManager.getTable();
- final TransactionalEditingDomain tableEditingDomain = TableEditingDomainUtils.getTableEditingDomain(table);
- final TransactionalEditingDomain contextEditingDomain = TableEditingDomainUtils.getTableContextEditingDomain(table);
-
- // the map used to share objects between the paste action and the cell value managers
- final Map<Object, Object> sharedMap = new HashMap<Object, Object>();
- if (!useProgressMonitor) {
- final ICommand pasteCommand = getPasteFromFromStringCommandInDetachedMode(contextEditingDomain, tableEditingDomain, new NullProgressMonitor(), sharedMap);
- try {
- CheckedOperationHistory.getInstance().execute(pasteCommand, new NullProgressMonitor(), null);
- } catch (ExecutionException e) {
- Activator.log.error(e);
- }
- sharedMap.clear();
- } else {
- // we create a job in order to don't freeze the UI
- final UIJob job = new UIJob(pasteJobName) {
-
- @Override
- public IStatus runInUIThread(IProgressMonitor monitor) {
-
- final ICommand pasteCommand = getPasteFromFromStringCommandInDetachedMode(contextEditingDomain, tableEditingDomain, monitor, sharedMap);
- if (pasteCommand == null) {
- return new Status(IStatus.CANCEL, Activator.PLUGIN_ID, PASTE_COMMAND_HAS_BEEN_CANCELLED);
- }
- // we execute the paste command
- if (pasteCommand.canExecute()) {
- try {
- CheckedOperationHistory.getInstance().execute(pasteCommand, monitor, null);
- } catch (ExecutionException e) {
- return new Status(IStatus.ERROR, Activator.PLUGIN_ID, "An exception occured during the paste", e); //$NON-NLS-1$
- } finally {
- sharedMap.clear();
- }
- monitor.done();
- return Status.OK_STATUS;
- } else {
- sharedMap.clear();
- return new Status(IStatus.ERROR, Activator.PLUGIN_ID, PASTE_COMMAND_CANT_BE_EXECUTED);
- }
- }
- };
- job.setUser(true);
- job.schedule();
- }
- }
-
- /**
- *
- * @param useProgressMonitor
- * boolean indicating that we must do the paste with a progress monitor
- */
- protected void executePasteFromStringCommandInAttachedMode(final boolean useProgressMonitor, final String pasteJobName) {
- Table table = tableManager.getTable();
- final TransactionalEditingDomain tableEditingDomain = TableEditingDomainUtils.getTableEditingDomain(table);
- final TransactionalEditingDomain contextEditingDomain = TableEditingDomainUtils.getTableContextEditingDomain(table);
-
-
- if (!useProgressMonitor) {
- final ICommand pasteCommand = getPasteFromFromStringCommand(contextEditingDomain, tableEditingDomain, new NullProgressMonitor());
- try {
- CheckedOperationHistory.getInstance().execute(pasteCommand, new NullProgressMonitor(), null);
- } catch (ExecutionException e) {
- Activator.log.error(e);
- }
- } else {
- // we create a job in order to don't freeze the UI
- final UIJob job = new UIJob(pasteJobName) {
-
- @Override
- public IStatus runInUIThread(IProgressMonitor monitor) {
-
- final ICommand pasteCommand = getPasteFromFromStringCommand(contextEditingDomain, tableEditingDomain, monitor);
- if (pasteCommand == null) {
- return new Status(IStatus.CANCEL, Activator.PLUGIN_ID, PASTE_COMMAND_HAS_BEEN_CANCELLED);
- }
- // we execute the paste command
- if (pasteCommand.canExecute()) {
- try {
- CheckedOperationHistory.getInstance().execute(pasteCommand, monitor, null);
- } catch (ExecutionException e) {
- return new Status(IStatus.ERROR, Activator.PLUGIN_ID, "An exception occured during the paste", e); //$NON-NLS-1$
- }
- monitor.done();
- return Status.OK_STATUS;
- } else {
- return new Status(IStatus.ERROR, Activator.PLUGIN_ID, PASTE_COMMAND_CANT_BE_EXECUTED);
- }
- }
- };
- job.setUser(true);
- job.schedule();
- }
- }
-
- /**
- *
- *
- * @param commandCreationCancelProvider
- * the creation command progress monitor
- * @param commandExecutionProgressMonitor
- * the command execution progress monitor
- * @param sharedMap
- * a map used to share objects and informations during the paste between this class and the cell value manager
- *
- * @return
- * the command to use to finish the paste (the main part of the paste is directly done here)
- */
- protected ICommand getPasteFromFromStringCommandInDetachedMode(final TransactionalEditingDomain contextEditingDomain, final TransactionalEditingDomain tableEditingDomain, final IProgressMonitor progressMonitor, final Map<Object, Object> sharedMap) {
- final Table table = this.tableManager.getTable();
- final EObject tableContext = table.getContext();
-
- final String[] axisToPaste;
- final List<Object> secondAxis;
- switch (pasteMode) {
- case PASTE_EOBJECT_COLUMN:
- axisToPaste = TableClipboardUtils.getColumnsFromClipboard();
- secondAxis = tableManager.getRowElementsList();
- break;
- case PASTE_EOBJECT_ROW:
- axisToPaste = TableClipboardUtils.getRowsFromClipboard();
- secondAxis = tableManager.getColumnElementsList();
- break;
- default:
- throw new UnsupportedOperationException();
- }
-
- // initialize the progress monitor
- final int nbActions = axisToPaste.length;
- if (progressMonitor != null) {
- progressMonitor.beginTask(PASTE_ACTION_TASK_NAME, nbActions + 1);// +1 to add the created elements to the table
- }
- // the list of the created elements
- final List<Object> createdElements = new ArrayList<Object>();
-
- // 2.2 create the creation request and find the command provider
- final EClass eClassToCreate = this.typeToCreate.getEClass();
- final EFactory eFactory = eClassToCreate.getEPackage().getEFactoryInstance();
- // the map used to store useful information for the paste
- sharedMap.put(Constants.PASTED_ELEMENT_CONTAINER_KEY, tableContext);
- sharedMap.put(Constants.REFERENCES_TO_SET_KEY, new ArrayList<IValueSetter>());
- sharedMap.put(Constants.CELLS_TO_ADD_KEY, new ArrayList<Cell>());
- // 2.3 create the axis
- int index = 1;
- int moduloForRefresh = 1;
- if (axisToPaste.length > 1000) {
- moduloForRefresh = 100;
- } else if (axisToPaste.length > 100) {
- moduloForRefresh = 10;
- }
-
-
- for (final String currentAxisAsString : axisToPaste) {
- if ((progressMonitor != null) && progressMonitor.isCanceled()) {
- // the user click on the cancel button
- return null;
- }
- if (progressMonitor != null && index % moduloForRefresh == 0) {
- progressMonitor.subTask(NLS.bind(CREATING_ELEMENT_A_NUMBER_X_Y, new Object[] { typeToCreate.getEClass().getName(), index, axisToPaste.length + 1 }));
- }
- index++;
- // 2.3.1 we get the string values of the cells
- final String[] cells = TableClipboardUtils.getCells(currentAxisAsString);
-
- // 2.3.3 we create the element itself
- final EObject createdElement = eFactory.create(eClassToCreate);
-
- createdElements.add(createdElement);
-
- for (final String currentPostActions : this.postActions) {
- PastePostActionRegistry.INSTANCE.doPostAction(this.tableManager, currentPostActions, tableContext, createdElement, sharedMap, currentAxisAsString);
- }
-
- // 2.3.4 we set these properties values
- for (int i = 0; i < secondAxis.size(); i++) {
- final Object currentAxis = secondAxis.get(i);
- final String valueAsString = cells[i];
- final Object columnObject;
- final Object rowObject;
- if (pasteMode == PasteModeEnumeration.PASTE_EOBJECT_COLUMN) {
- columnObject = createdElement;
- rowObject = currentAxis;
- } else {
- columnObject = currentAxis;
- rowObject = createdElement;
- }
-
-
- boolean isEditable = CellManagerFactory.INSTANCE.isCellEditable(columnObject, rowObject, sharedMap);
- if (isEditable) {
- final AbstractStringValueConverter converter = CellManagerFactory.INSTANCE.getOrCreateStringValueConverterClass(columnObject, rowObject, tableManager, existingConverters, TableClipboardUtils.MULTI_VALUE_SEPARATOR);
- CellManagerFactory.INSTANCE.setStringValue(columnObject, rowObject, valueAsString, converter, tableManager, sharedMap);
- }
- }
-
- // we update the progress monitor
- if (progressMonitor != null && index % moduloForRefresh == 0) {
- progressMonitor.worked(moduloForRefresh);
- }
- }
-
-
-
-
- // 2.4 we add the created elements to the table
- final AbstractTransactionalCommand pasteCommand = new AbstractTransactionalCommand(tableEditingDomain, PASTE_COMMAND_NAME, null) {
-
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- // initialize lists
- final Collection<String> postActions = getPostActions();
- final List<Cell> cells = (List<Cell>) sharedMap.get(Constants.CELLS_TO_ADD_KEY);
- final List<IValueSetter> valueToSet = (List<IValueSetter>) sharedMap.get(Constants.REFERENCES_TO_SET_KEY);
-
- int nbTasks = 1; // to add created elements to the model
- nbTasks = nbTasks + 1; // to add createds elements to the table
- nbTasks = nbTasks + postActions.size();// to do post actions after the attachment to the model
- nbTasks = nbTasks + 1; // to attach the cells to the model
- nbTasks = nbTasks + valueToSet.size(); // to set the references values
-
- if (progressMonitor != null) {
- if (progressMonitor.isCanceled()) {
- return CommandResult.newCancelledCommandResult();
- }
- progressMonitor.beginTask(Messages.PasteEObjectAxisInTableCommandProvider_FinishingThePaste, nbTasks);
- }
-
- // 1. Add the elements to the context
- AddCommand.create(contextEditingDomain, tableContext, containmentFeature, createdElements).execute();
-
- if (progressMonitor != null) {
- if (progressMonitor.isCanceled()) {
- return CommandResult.newCancelledCommandResult();
- }
- progressMonitor.worked(1);
- progressMonitor.subTask(Messages.PasteEObjectAxisInTableCommandProvider_AddingElementToTheTable);
- }
-
- Command cmd = null;
- if (pasteMode == PasteModeEnumeration.PASTE_EOBJECT_COLUMN) {
- cmd = tableManager.getAddColumnElementCommand(createdElements);
- } else {
- cmd = tableManager.getAddRowElementCommand(createdElements);
- }
- if (cmd != null) {// could be null
- cmd.execute();
- }
-
- if (progressMonitor != null) {
- if (progressMonitor.isCanceled()) {
- return CommandResult.newCancelledCommandResult();
- }
- progressMonitor.worked(1);
- progressMonitor.subTask(Messages.PasteEObjectAxisInTableCommandProvider_DoingAdditionalActions);
- }
-
-
- for (final String currentPostActions : postActions) {
- PastePostActionRegistry.INSTANCE.concludePostAction(tableManager, currentPostActions, sharedMap);
- progressMonitor.worked(1);
- }
-
-
- if (progressMonitor != null) {
- if (progressMonitor.isCanceled()) {
- return CommandResult.newCancelledCommandResult();
- }
- progressMonitor.worked(1);
- progressMonitor.subTask(Messages.PasteEObjectAxisInTableCommandProvider_LinkingReferencesToTheModel);
- }
-
- // we set the references
-
- if (valueToSet.size() > 0) {
- for (final IValueSetter current : valueToSet) {
- current.doSetValue(contextEditingDomain);
- if (progressMonitor != null) {
- if (progressMonitor.isCanceled()) {
- return CommandResult.newCancelledCommandResult();
- }
- progressMonitor.worked(1);
- }
- }
- }
-
- // the cells must be attached at the end (in order to update properly the cell map in the table manager
- if (progressMonitor != null) {
- if (progressMonitor.isCanceled()) {
- return CommandResult.newCancelledCommandResult();
- }
- progressMonitor.worked(1);
- }
-
- // add the created cells to the table
- AddCommand.create(tableEditingDomain, table, NattablePackage.eINSTANCE.getTable_Cells(), cells).execute();
-
- if (progressMonitor != null) {
- progressMonitor.done();
- }
- localDispose();
- return CommandResult.newOKCommandResult();
- }
- };
-
- return pasteCommand;
- }
-
- /**
- *
- * @param commandCreationCancelProvider
- * the creation command progress monitor
- * @param commandExecutionProgressMonitor
- * the command execution progress monitor
- * @return
- */
- protected ICommand getPasteFromFromStringCommand(final TransactionalEditingDomain contextEditingDomain, final TransactionalEditingDomain tableEditingDomain, final IProgressMonitor progressMonitor) {
- final Table table = this.tableManager.getTable();
- final EObject tableContext = table.getContext();
-
- final String[] axisToPaste;
- final List<Object> secondAxis;
- switch (pasteMode) {
- case PASTE_EOBJECT_COLUMN:
- axisToPaste = TableClipboardUtils.getColumnsFromClipboard();
- secondAxis = tableManager.getRowElementsList();
- break;
- case PASTE_EOBJECT_ROW:
- axisToPaste = TableClipboardUtils.getRowsFromClipboard();
- secondAxis = tableManager.getColumnElementsList();
- break;
- default:
- throw new UnsupportedOperationException();
- }
-
- // initialize the progress monitor
- final int nbActions = axisToPaste.length;
- if (progressMonitor != null) {
- progressMonitor.beginTask(PASTE_ACTION_TASK_NAME, nbActions);
- }
-
- // 2.2 create the creation request and find the command provider
- final CreateElementRequest createRequest = new CreateElementRequest(contextEditingDomain, table.getContext(), this.typeToCreate, (EReference) this.containmentFeature);
- final IElementEditService tableContextCommandProvider = ElementEditServiceUtils.getCommandProvider(tableContext);
-
- final ICommand pasteAllCommand = new AbstractTransactionalCommand(contextEditingDomain, PASTE_COMMAND_NAME, null) {
-
-
- /**
- *
- * @see org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand#doExecuteWithResult(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
- *
- * @param monitor
- * @param info
- * @return
- * @throws ExecutionException
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- int moduloForRefresh = 1;
- if (axisToPaste.length > 1000) {
- moduloForRefresh = 100;
- } else if (axisToPaste.length > 100) {
- moduloForRefresh = 10;
- }
- for (int i = 0; i < axisToPaste.length; i++) {
- final String currentAxisAsString = axisToPaste[i];
- if (progressMonitor != null && progressMonitor.isCanceled()) {
- progressMonitor.done();
- localDispose();
- return CommandResult.newCancelledCommandResult();
- }
- if (progressMonitor != null && i % moduloForRefresh == 0) {
- progressMonitor.subTask(NLS.bind(CREATING_ELEMENT_A_NUMBER_X_Y, new Object[] { typeToCreate.getDisplayName(), i, axisToPaste.length }));
- }
- final ICommand commandCreation = tableContextCommandProvider.getEditCommand(createRequest);
- if (commandCreation.canExecute()) {
- // 1. we create the element
- commandCreation.execute(monitor, info);
- // we execute the creation command
-
- // 2. we add it to the table
- final CommandResult res = commandCreation.getCommandResult();
- commandCreation.dispose();
-
- final Object createdElement = res.getReturnValue();
- final Command addCommand;
- if (pasteMode == PasteModeEnumeration.PASTE_EOBJECT_COLUMN) {
- addCommand = tableManager.getAddColumnElementCommand(Collections.singleton(createdElement));
- } else {
- addCommand = tableManager.getAddRowElementCommand(Collections.singleton(createdElement));
- }
- if (addCommand != null) {// can be null
- addCommand.execute();
- addCommand.dispose();
- }
-
- // 3. we set the values
- final String[] cells = TableClipboardUtils.getCells(currentAxisAsString);
- for (int j = 0; j < secondAxis.size(); j++) {
- final Object currentAxis = secondAxis.get(j);
- final String valueAsString = cells[j];
- final Object columnObject;
- final Object rowObject;
- if (pasteMode == PasteModeEnumeration.PASTE_EOBJECT_COLUMN) {
- columnObject = createdElement;
- rowObject = currentAxis;
- } else {
- columnObject = currentAxis;
- rowObject = createdElement;
- }
-
-
- boolean isEditable = CellManagerFactory.INSTANCE.isCellEditable(columnObject, rowObject);
-
- if (isEditable) {
- final AbstractStringValueConverter converter = CellManagerFactory.INSTANCE.getOrCreateStringValueConverterClass(columnObject, rowObject, tableManager, existingConverters, TableClipboardUtils.MULTI_VALUE_SEPARATOR);
- final Command setValueCommand = CellManagerFactory.INSTANCE.getSetStringValueCommand(contextEditingDomain, columnObject, rowObject, valueAsString, converter, tableManager);
- if (setValueCommand != null && setValueCommand.canExecute()) {
- setValueCommand.execute();
- setValueCommand.dispose();
- }
- }
- }
- // we update the progress monitor
- if (progressMonitor != null && i % moduloForRefresh == 0) {
- progressMonitor.worked(moduloForRefresh);
- }
- }
-
- }
- progressMonitor.done();
- localDispose();
- return CommandResult.newOKCommandResult();
- }
- };
- return pasteAllCommand;
- }
-
-
- /**
- *
- * @return
- * <code>true</code> if the name must be initialized
- */
- // TODO : not very nice must efficient
- private Boolean mustInitializeName() {
- final List<?> existingColumns;
- if (this.pasteMode == PasteModeEnumeration.PASTE_EOBJECT_COLUMN) {
- existingColumns = this.tableManager.getRowElementsList();
- } else {
- existingColumns = this.tableManager.getColumnElementsList();
- }
- for (Object object : existingColumns) {
- Object current = AxisUtils.getRepresentedElement(object);
- if (current instanceof EAttribute && ((EAttribute) current).getName().equals("name")) { //$NON-NLS-1$
- return Boolean.FALSE;
- }
- }
- return Boolean.TRUE;
- }
-
- /**
- *
- * @return
- * the paste mode selected by the user
- */
- protected PasteModeEnumeration askWhichPasteModeDo() {
- // FIXME develop a dialog for that
- throw new UnsupportedOperationException();
- }
-
- /**
- *
- * @return
- * the list of the post actions to do
- */
- private Collection<String> getPostActions() {
- return this.postActions;
- }
-
- private void localDispose() {
- this.tableManager = null;
- this.typeToCreate = null;
- this.containmentFeature = null;
- for (final AbstractStringValueConverter current : existingConverters.values()) {
- current.dispose();
- }
- this.existingConverters.clear();
- }
-
-}
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.nattable.provider;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EFactory;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.edit.command.AddCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
+import org.eclipse.gmf.runtime.emf.type.core.ElementTypeRegistry;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.papyrus.commands.CheckedOperationHistory;
+import org.eclipse.papyrus.infra.nattable.Activator;
+import org.eclipse.papyrus.infra.nattable.manager.cell.CellManagerFactory;
+import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
+import org.eclipse.papyrus.infra.nattable.messages.Messages;
+import org.eclipse.papyrus.infra.nattable.model.nattable.NattablePackage;
+import org.eclipse.papyrus.infra.nattable.model.nattable.Table;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.NattableaxisconfigurationPackage;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.PasteEObjectConfiguration;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattablecell.Cell;
+import org.eclipse.papyrus.infra.nattable.paste.IValueSetter;
+import org.eclipse.papyrus.infra.nattable.paste.PastePostActionRegistry;
+import org.eclipse.papyrus.infra.nattable.utils.AxisConfigurationUtils;
+import org.eclipse.papyrus.infra.nattable.utils.AxisUtils;
+import org.eclipse.papyrus.infra.nattable.utils.Constants;
+import org.eclipse.papyrus.infra.nattable.utils.PasteModeEnumeration;
+import org.eclipse.papyrus.infra.nattable.utils.TableClipboardUtils;
+import org.eclipse.papyrus.infra.nattable.utils.TableEditingDomainUtils;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.infra.tools.converter.AbstractStringValueConverter;
+import org.eclipse.ui.progress.UIJob;
+
+/**
+ * Paste command manager for the paste in the table
+ *
+ * @author VL222926
+ *
+ */
+@Deprecated
+// use PasteEObjectAxisInNattableCommandProvider, will be removed when the new paste api will allows to paste columns
+public class PasteEObjectAxisInTableCommandProvider implements PasteNattableCommandProvider {
+
+ private static final int MIN_AXIS_FOR_PROGRESS_MONITOR = 5;
+
+ /**
+ * the containment feature to use
+ */
+ private EStructuralFeature containmentFeature;
+
+ /**
+ * the type to create
+ */
+ private IElementType typeToCreate;
+
+ /**
+ * the table manager
+ */
+ private INattableModelManager tableManager;
+
+ /**
+ * the paste mode
+ */
+ private PasteModeEnumeration pasteMode;
+
+ /**
+ * if true, we are pasting in detached mode
+ */
+ private boolean detachedMode;
+
+ /**
+ * the list of the post actions do do
+ */
+ private List<String> postActions;
+
+ /**
+ * the copnverter map
+ */
+ private final Map<Class<? extends AbstractStringValueConverter>, AbstractStringValueConverter> existingConverters;
+
+ private static final String PASTE_ACTION_TASK_NAME = Messages.PasteEObjectAxisInTableCommandProvider_PasteAction;
+
+ private static final String PASTE_ROWS_JOB_NAME = Messages.PasteEObjectAxisInTableCommandProvider_PasteRows;
+
+ private static final String PASTE_COLUMNS_JOB_NAME = Messages.PasteEObjectAxisInTableCommandProvider_PasteColumns;
+
+ private static final String PASTE_COMMAND_HAS_BEEN_CANCELLED = Messages.PasteEObjectAxisInTableCommandProvider_CommandCreationHasBeenCancelled;
+
+ private static final String PASTE_COMMAND_CANT_BE_EXECUTED = "The Paste command can't be executed"; //$NON-NLS-1$
+
+ private static final String PASTE_COMMAND_NAME = Messages.PasteEObjectAxisInTableCommandProvider_PasteFromStringCommand;
+
+ private static final String CREATING_ELEMENT_A_NUMBER_X_Y = Messages.PasteEObjectAxisInTableCommandProvider_CreatingAnumberXonY;
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param tableManager
+ * the table manager
+ * @param typeToCreate
+ * the type to create
+ * @param containmentFeature
+ * the containment feature
+ * @param pasteMode
+ * the paste mode
+ */
+ public PasteEObjectAxisInTableCommandProvider(final INattableModelManager tableManager, final PasteModeEnumeration pasteMode) {
+ this.tableManager = tableManager;
+ this.pasteMode = pasteMode;
+ this.existingConverters = new HashMap<Class<? extends AbstractStringValueConverter>, AbstractStringValueConverter>();
+ init();
+ }
+
+ /**
+ * inits the field of this class
+ */
+ private void init() {
+ if (pasteMode == PasteModeEnumeration.PASTE_EOBJECT_ROW_OR_COLUMN) {
+ pasteMode = askWhichPasteModeDo();
+ }
+ Assert.isTrue(pasteMode != PasteModeEnumeration.CANT_PASTE, "The paste can't be done"); //$NON-NLS-1$
+ PasteEObjectConfiguration configuration = null;
+ switch (pasteMode) {
+ case PASTE_EOBJECT_COLUMN:
+ configuration = (PasteEObjectConfiguration) AxisConfigurationUtils.getIAxisConfigurationUsedInTable(this.tableManager.getTable(), NattableaxisconfigurationPackage.eINSTANCE.getPasteEObjectConfiguration(), true);
+ break;
+ case PASTE_EOBJECT_ROW:
+ configuration = (PasteEObjectConfiguration) AxisConfigurationUtils.getIAxisConfigurationUsedInTable(this.tableManager.getTable(), NattableaxisconfigurationPackage.eINSTANCE.getPasteEObjectConfiguration(), false);
+ break;
+ default:
+ break;
+ }
+ if (configuration != null) {
+ this.containmentFeature = configuration.getPasteElementContainementFeature();
+ this.typeToCreate = ElementTypeRegistry.getInstance().getType(configuration.getPastedElementId());
+ this.postActions = configuration.getPostActions();
+ this.detachedMode = configuration.isDetachedMode();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.infra.nattable.provider.PasteNattableCommandProvider#executePasteFromStringCommand(boolean, boolean)
+ */
+ @Override
+ public IStatus executePasteFromStringCommand(final boolean useProgressMonitor, final boolean openDialog) {
+ IStatus resultStatus = Status.OK_STATUS;
+
+ final String pasteJobName;
+ if (pasteMode == PasteModeEnumeration.PASTE_EOBJECT_COLUMN) {
+ pasteJobName = PASTE_COLUMNS_JOB_NAME;
+ } else {
+ pasteJobName = PASTE_ROWS_JOB_NAME;
+ }
+ if (this.detachedMode) {
+ executePasteFromStringCommandInDetachedMode(useProgressMonitor, pasteJobName);
+ } else {
+ executePasteFromStringCommandInAttachedMode(useProgressMonitor, pasteJobName);
+ }
+
+ return resultStatus;
+ }
+
+ /**
+ *
+ * @param useProgressMonitor
+ * boolean indicating that we must do the paste with a progress monitor
+ */
+ protected void executePasteFromStringCommandInDetachedMode(final boolean useProgressMonitor, final String pasteJobName) {
+ final Table table = tableManager.getTable();
+ final TransactionalEditingDomain tableEditingDomain = TableEditingDomainUtils.getTableEditingDomain(table);
+ final TransactionalEditingDomain contextEditingDomain = TableEditingDomainUtils.getTableContextEditingDomain(table);
+
+ // the map used to share objects between the paste action and the cell value managers
+ final Map<Object, Object> sharedMap = new HashMap<Object, Object>();
+ if (!useProgressMonitor) {
+ final ICommand pasteCommand = getPasteFromFromStringCommandInDetachedMode(contextEditingDomain, tableEditingDomain, new NullProgressMonitor(), sharedMap);
+ try {
+ CheckedOperationHistory.getInstance().execute(pasteCommand, new NullProgressMonitor(), null);
+ } catch (final ExecutionException e) {
+ Activator.log.error(e);
+ }
+ sharedMap.clear();
+ } else {
+ // we create a job in order to don't freeze the UI
+ final UIJob job = new UIJob(pasteJobName) {
+
+ @Override
+ public IStatus runInUIThread(final IProgressMonitor monitor) {
+
+ final ICommand pasteCommand = getPasteFromFromStringCommandInDetachedMode(contextEditingDomain, tableEditingDomain, monitor, sharedMap);
+ if (pasteCommand == null) {
+ return new Status(IStatus.CANCEL, Activator.PLUGIN_ID, PASTE_COMMAND_HAS_BEEN_CANCELLED);
+ }
+ // we execute the paste command
+ if (pasteCommand.canExecute()) {
+ try {
+ CheckedOperationHistory.getInstance().execute(pasteCommand, monitor, null);
+ } catch (final ExecutionException e) {
+ return new Status(IStatus.ERROR, Activator.PLUGIN_ID, "An exception occured during the paste", e); //$NON-NLS-1$
+ } finally {
+ sharedMap.clear();
+ }
+ monitor.done();
+ return Status.OK_STATUS;
+ } else {
+ sharedMap.clear();
+ return new Status(IStatus.ERROR, Activator.PLUGIN_ID, PASTE_COMMAND_CANT_BE_EXECUTED);
+ }
+ }
+ };
+ job.setUser(true);
+ job.schedule();
+ }
+ }
+
+ /**
+ *
+ * @param useProgressMonitor
+ * boolean indicating that we must do the paste with a progress monitor
+ */
+ protected void executePasteFromStringCommandInAttachedMode(final boolean useProgressMonitor, final String pasteJobName) {
+ final Table table = tableManager.getTable();
+ final TransactionalEditingDomain tableEditingDomain = TableEditingDomainUtils.getTableEditingDomain(table);
+ final TransactionalEditingDomain contextEditingDomain = TableEditingDomainUtils.getTableContextEditingDomain(table);
+
+
+ if (!useProgressMonitor) {
+ final ICommand pasteCommand = getPasteFromFromStringCommand(contextEditingDomain, tableEditingDomain, new NullProgressMonitor());
+ try {
+ CheckedOperationHistory.getInstance().execute(pasteCommand, new NullProgressMonitor(), null);
+ } catch (final ExecutionException e) {
+ Activator.log.error(e);
+ }
+ } else {
+ // we create a job in order to don't freeze the UI
+ final UIJob job = new UIJob(pasteJobName) {
+
+ @Override
+ public IStatus runInUIThread(final IProgressMonitor monitor) {
+
+ final ICommand pasteCommand = getPasteFromFromStringCommand(contextEditingDomain, tableEditingDomain, monitor);
+ if (pasteCommand == null) {
+ return new Status(IStatus.CANCEL, Activator.PLUGIN_ID, PASTE_COMMAND_HAS_BEEN_CANCELLED);
+ }
+ // we execute the paste command
+ if (pasteCommand.canExecute()) {
+ try {
+ CheckedOperationHistory.getInstance().execute(pasteCommand, monitor, null);
+ } catch (final ExecutionException e) {
+ return new Status(IStatus.ERROR, Activator.PLUGIN_ID, "An exception occured during the paste", e); //$NON-NLS-1$
+ }
+ monitor.done();
+ return Status.OK_STATUS;
+ } else {
+ return new Status(IStatus.ERROR, Activator.PLUGIN_ID, PASTE_COMMAND_CANT_BE_EXECUTED);
+ }
+ }
+ };
+ job.setUser(true);
+ job.schedule();
+ }
+ }
+
+ /**
+ *
+ *
+ * @param commandCreationCancelProvider
+ * the creation command progress monitor
+ * @param commandExecutionProgressMonitor
+ * the command execution progress monitor
+ * @param sharedMap
+ * a map used to share objects and informations during the paste between this class and the cell value manager
+ *
+ * @return
+ * the command to use to finish the paste (the main part of the paste is directly done here)
+ */
+ protected ICommand getPasteFromFromStringCommandInDetachedMode(final TransactionalEditingDomain contextEditingDomain, final TransactionalEditingDomain tableEditingDomain, final IProgressMonitor progressMonitor, final Map<Object, Object> sharedMap) {
+ final Table table = this.tableManager.getTable();
+ final EObject tableContext = table.getContext();
+
+ final String[] axisToPaste;
+ final List<Object> secondAxis;
+ switch (pasteMode) {
+ case PASTE_EOBJECT_COLUMN:
+ axisToPaste = TableClipboardUtils.getColumnsFromClipboard();
+ secondAxis = tableManager.getRowElementsList();
+ break;
+ case PASTE_EOBJECT_ROW:
+ axisToPaste = TableClipboardUtils.getRowsFromClipboard();
+ secondAxis = tableManager.getColumnElementsList();
+ break;
+ default:
+ throw new UnsupportedOperationException();
+ }
+
+ // initialize the progress monitor
+ final int nbActions = axisToPaste.length;
+ if (progressMonitor != null) {
+ progressMonitor.beginTask(PASTE_ACTION_TASK_NAME, nbActions + 1);// +1 to add the created elements to the table
+ }
+ // the list of the created elements
+ final List<Object> createdElements = new ArrayList<Object>();
+
+ // 2.2 create the creation request and find the command provider
+ final EClass eClassToCreate = this.typeToCreate.getEClass();
+ final EFactory eFactory = eClassToCreate.getEPackage().getEFactoryInstance();
+ // the map used to store useful information for the paste
+ sharedMap.put(Constants.PASTED_ELEMENT_CONTAINER_KEY, tableContext);
+ sharedMap.put(Constants.REFERENCES_TO_SET_KEY, new ArrayList<IValueSetter>());
+ sharedMap.put(Constants.CELLS_TO_ADD_KEY, new ArrayList<Cell>());
+ // 2.3 create the axis
+ int index = 1;
+ int moduloForRefresh = 1;
+ if (axisToPaste.length > 1000) {
+ moduloForRefresh = 100;
+ } else if (axisToPaste.length > 100) {
+ moduloForRefresh = 10;
+ }
+
+
+ for (final String currentAxisAsString : axisToPaste) {
+ if ((progressMonitor != null) && progressMonitor.isCanceled()) {
+ // the user click on the cancel button
+ return null;
+ }
+ if (progressMonitor != null && index % moduloForRefresh == 0) {
+ progressMonitor.subTask(NLS.bind(CREATING_ELEMENT_A_NUMBER_X_Y, new Object[] { typeToCreate.getEClass().getName(), index, axisToPaste.length + 1 }));
+ }
+ index++;
+ // 2.3.1 we get the string values of the cells
+ final String[] cells = TableClipboardUtils.getCells(currentAxisAsString);
+
+ // 2.3.3 we create the element itself
+ final EObject createdElement = eFactory.create(eClassToCreate);
+
+ createdElements.add(createdElement);
+
+ for (final String currentPostActions : this.postActions) {
+ PastePostActionRegistry.INSTANCE.doPostAction(this.tableManager, currentPostActions, tableContext, createdElement, sharedMap, currentAxisAsString);
+ }
+
+ // 2.3.4 we set these properties values
+ for (int i = 0; i < secondAxis.size(); i++) {
+ final Object currentAxis = secondAxis.get(i);
+ final String valueAsString = cells[i];
+ final Object columnObject;
+ final Object rowObject;
+ if (pasteMode == PasteModeEnumeration.PASTE_EOBJECT_COLUMN) {
+ columnObject = createdElement;
+ rowObject = currentAxis;
+ } else {
+ columnObject = currentAxis;
+ rowObject = createdElement;
+ }
+
+
+ final boolean isEditable = CellManagerFactory.INSTANCE.isCellEditable(columnObject, rowObject, sharedMap);
+ if (isEditable) {
+ final AbstractStringValueConverter converter = CellManagerFactory.INSTANCE.getOrCreateStringValueConverterClass(columnObject, rowObject, tableManager, existingConverters, TableClipboardUtils.MULTI_VALUE_SEPARATOR);
+ CellManagerFactory.INSTANCE.setStringValue(columnObject, rowObject, valueAsString, converter, tableManager, sharedMap);
+ }
+ }
+
+ // we update the progress monitor
+ if (progressMonitor != null && index % moduloForRefresh == 0) {
+ progressMonitor.worked(moduloForRefresh);
+ }
+ }
+
+
+
+
+ // 2.4 we add the created elements to the table
+ final AbstractTransactionalCommand pasteCommand = new AbstractTransactionalCommand(tableEditingDomain, PASTE_COMMAND_NAME, null) {
+
+ @Override
+ protected CommandResult doExecuteWithResult(final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
+ // initialize lists
+ final Collection<String> postActions = getPostActions();
+ final List<Cell> cells = (List<Cell>) sharedMap.get(Constants.CELLS_TO_ADD_KEY);
+ final List<IValueSetter> valueToSet = (List<IValueSetter>) sharedMap.get(Constants.REFERENCES_TO_SET_KEY);
+
+ int nbTasks = 1; // to add created elements to the model
+ nbTasks = nbTasks + 1; // to add createds elements to the table
+ nbTasks = nbTasks + postActions.size();// to do post actions after the attachment to the model
+ nbTasks = nbTasks + 1; // to attach the cells to the model
+ nbTasks = nbTasks + valueToSet.size(); // to set the references values
+
+ if (progressMonitor != null) {
+ if (progressMonitor.isCanceled()) {
+ return CommandResult.newCancelledCommandResult();
+ }
+ progressMonitor.beginTask(Messages.PasteEObjectAxisInTableCommandProvider_FinishingThePaste, nbTasks);
+ }
+
+ // 1. Add the elements to the context
+ AddCommand.create(contextEditingDomain, tableContext, containmentFeature, createdElements).execute();
+
+ if (progressMonitor != null) {
+ if (progressMonitor.isCanceled()) {
+ return CommandResult.newCancelledCommandResult();
+ }
+ progressMonitor.worked(1);
+ progressMonitor.subTask(Messages.PasteEObjectAxisInTableCommandProvider_AddingElementToTheTable);
+ }
+
+ Command cmd = null;
+ if (pasteMode == PasteModeEnumeration.PASTE_EOBJECT_COLUMN) {
+ cmd = tableManager.getAddColumnElementCommand(createdElements);
+ } else {
+ cmd = tableManager.getAddRowElementCommand(createdElements);
+ }
+ if (cmd != null) {// could be null
+ cmd.execute();
+ }
+
+ if (progressMonitor != null) {
+ if (progressMonitor.isCanceled()) {
+ return CommandResult.newCancelledCommandResult();
+ }
+ progressMonitor.worked(1);
+ progressMonitor.subTask(Messages.PasteEObjectAxisInTableCommandProvider_DoingAdditionalActions);
+ }
+
+
+ for (final String currentPostActions : postActions) {
+ PastePostActionRegistry.INSTANCE.concludePostAction(tableManager, currentPostActions, sharedMap);
+ progressMonitor.worked(1);
+ }
+
+
+ if (progressMonitor != null) {
+ if (progressMonitor.isCanceled()) {
+ return CommandResult.newCancelledCommandResult();
+ }
+ progressMonitor.worked(1);
+ progressMonitor.subTask(Messages.PasteEObjectAxisInTableCommandProvider_LinkingReferencesToTheModel);
+ }
+
+ // we set the references
+
+ if (valueToSet.size() > 0) {
+ for (final IValueSetter current : valueToSet) {
+ current.doSetValue(contextEditingDomain);
+ if (progressMonitor != null) {
+ if (progressMonitor.isCanceled()) {
+ return CommandResult.newCancelledCommandResult();
+ }
+ progressMonitor.worked(1);
+ }
+ }
+ }
+
+ // the cells must be attached at the end (in order to update properly the cell map in the table manager
+ if (progressMonitor != null) {
+ if (progressMonitor.isCanceled()) {
+ return CommandResult.newCancelledCommandResult();
+ }
+ progressMonitor.worked(1);
+ }
+
+ // add the created cells to the table
+ AddCommand.create(tableEditingDomain, table, NattablePackage.eINSTANCE.getTable_Cells(), cells).execute();
+
+ if (progressMonitor != null) {
+ progressMonitor.done();
+ }
+ localDispose();
+ return CommandResult.newOKCommandResult();
+ }
+ };
+
+ return pasteCommand;
+ }
+
+ /**
+ *
+ * @param commandCreationCancelProvider
+ * the creation command progress monitor
+ * @param commandExecutionProgressMonitor
+ * the command execution progress monitor
+ * @return
+ */
+ protected ICommand getPasteFromFromStringCommand(final TransactionalEditingDomain contextEditingDomain, final TransactionalEditingDomain tableEditingDomain, final IProgressMonitor progressMonitor) {
+ final Table table = this.tableManager.getTable();
+ final EObject tableContext = table.getContext();
+
+ final String[] axisToPaste;
+ final List<Object> secondAxis;
+ switch (pasteMode) {
+ case PASTE_EOBJECT_COLUMN:
+ axisToPaste = TableClipboardUtils.getColumnsFromClipboard();
+ secondAxis = tableManager.getRowElementsList();
+ break;
+ case PASTE_EOBJECT_ROW:
+ axisToPaste = TableClipboardUtils.getRowsFromClipboard();
+ secondAxis = tableManager.getColumnElementsList();
+ break;
+ default:
+ throw new UnsupportedOperationException();
+ }
+
+ // initialize the progress monitor
+ final int nbActions = axisToPaste.length;
+ if (progressMonitor != null) {
+ progressMonitor.beginTask(PASTE_ACTION_TASK_NAME, nbActions);
+ }
+
+ // 2.2 create the creation request and find the command provider
+ final CreateElementRequest createRequest = new CreateElementRequest(contextEditingDomain, table.getContext(), this.typeToCreate, (EReference) this.containmentFeature);
+ final IElementEditService tableContextCommandProvider = ElementEditServiceUtils.getCommandProvider(tableContext);
+
+ final ICommand pasteAllCommand = new AbstractTransactionalCommand(contextEditingDomain, PASTE_COMMAND_NAME, null) {
+
+
+ /**
+ *
+ * @see org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand#doExecuteWithResult(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
+ *
+ * @param monitor
+ * @param info
+ * @return
+ * @throws ExecutionException
+ */
+ @Override
+ protected CommandResult doExecuteWithResult(final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
+ int moduloForRefresh = 1;
+ if (axisToPaste.length > 1000) {
+ moduloForRefresh = 100;
+ } else if (axisToPaste.length > 100) {
+ moduloForRefresh = 10;
+ }
+ for (int i = 0; i < axisToPaste.length; i++) {
+ final String currentAxisAsString = axisToPaste[i];
+ if (progressMonitor != null && progressMonitor.isCanceled()) {
+ progressMonitor.done();
+ localDispose();
+ return CommandResult.newCancelledCommandResult();
+ }
+ if (progressMonitor != null && i % moduloForRefresh == 0) {
+ progressMonitor.subTask(NLS.bind(CREATING_ELEMENT_A_NUMBER_X_Y, new Object[] { typeToCreate.getDisplayName(), i, axisToPaste.length }));
+ }
+ final ICommand commandCreation = tableContextCommandProvider.getEditCommand(createRequest);
+ if (commandCreation.canExecute()) {
+ // 1. we create the element
+ commandCreation.execute(monitor, info);
+ // we execute the creation command
+
+ // 2. we add it to the table
+ final CommandResult res = commandCreation.getCommandResult();
+ commandCreation.dispose();
+
+ final Object createdElement = res.getReturnValue();
+ final Command addCommand;
+ if (pasteMode == PasteModeEnumeration.PASTE_EOBJECT_COLUMN) {
+ addCommand = tableManager.getAddColumnElementCommand(Collections.singleton(createdElement));
+ } else {
+ addCommand = tableManager.getAddRowElementCommand(Collections.singleton(createdElement));
+ }
+ if (addCommand != null) {// can be null
+ addCommand.execute();
+ addCommand.dispose();
+ }
+
+ // 3. we set the values
+ final String[] cells = TableClipboardUtils.getCells(currentAxisAsString);
+ for (int j = 0; j < secondAxis.size(); j++) {
+ final Object currentAxis = secondAxis.get(j);
+ final String valueAsString = cells[j];
+ final Object columnObject;
+ final Object rowObject;
+ if (pasteMode == PasteModeEnumeration.PASTE_EOBJECT_COLUMN) {
+ columnObject = createdElement;
+ rowObject = currentAxis;
+ } else {
+ columnObject = currentAxis;
+ rowObject = createdElement;
+ }
+
+
+ final boolean isEditable = CellManagerFactory.INSTANCE.isCellEditable(columnObject, rowObject);
+
+ if (isEditable) {
+ final AbstractStringValueConverter converter = CellManagerFactory.INSTANCE.getOrCreateStringValueConverterClass(columnObject, rowObject, tableManager, existingConverters, TableClipboardUtils.MULTI_VALUE_SEPARATOR);
+ final Command setValueCommand = CellManagerFactory.INSTANCE.getSetStringValueCommand(contextEditingDomain, columnObject, rowObject, valueAsString, converter, tableManager);
+ if (setValueCommand != null && setValueCommand.canExecute()) {
+ setValueCommand.execute();
+ setValueCommand.dispose();
+ }
+ }
+ }
+ // we update the progress monitor
+ if (progressMonitor != null && i % moduloForRefresh == 0) {
+ progressMonitor.worked(moduloForRefresh);
+ }
+ }
+
+ }
+ progressMonitor.done();
+ localDispose();
+ return CommandResult.newOKCommandResult();
+ }
+ };
+ return pasteAllCommand;
+ }
+
+
+ /**
+ *
+ * @return
+ * <code>true</code> if the name must be initialized
+ */
+ // TODO : not very nice must efficient
+ private Boolean mustInitializeName() {
+ final List<?> existingColumns;
+ if (this.pasteMode == PasteModeEnumeration.PASTE_EOBJECT_COLUMN) {
+ existingColumns = this.tableManager.getRowElementsList();
+ } else {
+ existingColumns = this.tableManager.getColumnElementsList();
+ }
+ for (final Object object : existingColumns) {
+ final Object current = AxisUtils.getRepresentedElement(object);
+ if (current instanceof EAttribute && ((EAttribute) current).getName().equals("name")) { //$NON-NLS-1$
+ return Boolean.FALSE;
+ }
+ }
+ return Boolean.TRUE;
+ }
+
+ /**
+ *
+ * @return
+ * the paste mode selected by the user
+ */
+ protected PasteModeEnumeration askWhichPasteModeDo() {
+ // FIXME develop a dialog for that
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ *
+ * @return
+ * the list of the post actions to do
+ */
+ private Collection<String> getPostActions() {
+ return this.postActions;
+ }
+
+ private void localDispose() {
+ this.tableManager = null;
+ this.typeToCreate = null;
+ this.containmentFeature = null;
+ for (final AbstractStringValueConverter current : existingConverters.values()) {
+ current.dispose();
+ }
+ this.existingConverters.clear();
+ }
+
+}
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/PasteEObjectTreeAxisInNattableCommandProvider.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/PasteEObjectTreeAxisInNattableCommandProvider.java
index ae1afe0fd07..1da8b6c3147 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/PasteEObjectTreeAxisInNattableCommandProvider.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/PasteEObjectTreeAxisInNattableCommandProvider.java
@@ -90,7 +90,7 @@ import org.eclipse.ui.progress.UIJob;
// TODO : refactor me to create common ancestor with normal paste
// TODO : refactor me : This class should be in oep.infra.emf.nattable
// TODO Nicolas FAUVERGUE : This class must be refactor because the detached mode and the attached mode have some duplicated code.
-public class PasteEObjectTreeAxisInNattableCommandProvider {
+public class PasteEObjectTreeAxisInNattableCommandProvider implements PasteNattableCommandProvider {
private static final int MIN_AXIS_FOR_PROGRESS_MONITOR = 5;
@@ -342,8 +342,11 @@ public class PasteEObjectTreeAxisInNattableCommandProvider {
*
* @param useProgressMonitor
* boolean indicating that we must do the paste with a progress monitor
+ * @return the result status
*/
- public void executePasteFromStringCommand(final boolean useProgressMonitor) {
+ public IStatus executePasteFromStringCommand(boolean useProgressMonitor, boolean openDialog) {
+ IStatus resultStatus = Status.OK_STATUS;
+
// if (this.pasteColumn) {// not yet supported
// return;
// }
@@ -361,6 +364,8 @@ public class PasteEObjectTreeAxisInNattableCommandProvider {
} else {
executePasteFromStringCommandInAttachedMode(useProgressMonitor, pasteJobName);
}
+
+ return resultStatus;
}
@@ -989,12 +994,12 @@ public class PasteEObjectTreeAxisInNattableCommandProvider {
try {
depth = getDepth(nbReadCell);
isCategory = isCategory(nbReadCell);
- } catch (UnsupportedOperationException ex) {
- String message = NLS.bind("No defined depth for line {0}", nbReadCell); //$NON-NLS-1$
+ } catch (final UnsupportedOperationException ex) {
+ final String message = NLS.bind("No defined depth for line {0}", nbReadCell); //$NON-NLS-1$
// The following lines allows to cancel all the paste if a problem of depth appears
// If a partial paste is authorized, remove this lines
Activator.log.error(message, ex);
- IStatus status = new Status(IStatus.ERROR, Activator.PLUGIN_ID, PasteSeverityCode.PASTE_ERROR__MORE_LINES_THAN_DEPTH, message, null);
+ final IStatus status = new Status(IStatus.ERROR, Activator.PLUGIN_ID, PasteSeverityCode.PASTE_ERROR__MORE_LINES_THAN_DEPTH, message, null);
return new CommandResult(status);
}
@@ -1188,5 +1193,4 @@ public class PasteEObjectTreeAxisInNattableCommandProvider {
Activator.log.error(e);
}
}
-
}
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/PasteInSelectionNattableCommandProvider.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/PasteInSelectionNattableCommandProvider.java
new file mode 100644
index 00000000000..7d4b54e0848
--- /dev/null
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/PasteInSelectionNattableCommandProvider.java
@@ -0,0 +1,328 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.nattable.provider;
+
+import java.io.Reader;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.command.CompoundCommand;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EFactory;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.edit.command.AddCommand;
+import org.eclipse.emf.edit.command.MoveCommand;
+import org.eclipse.emf.edit.command.SetCommand;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.papyrus.commands.wrappers.GMFtoEMFCommandWrapper;
+import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
+import org.eclipse.papyrus.infra.nattable.model.nattable.Table;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.NattableaxisconfigurationPackage;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.PasteEObjectConfiguration;
+import org.eclipse.papyrus.infra.nattable.utils.AxisConfigurationUtils;
+import org.eclipse.papyrus.infra.nattable.utils.CSVPasteHelper;
+import org.eclipse.papyrus.infra.nattable.utils.InsertedElementInNattable;
+import org.eclipse.papyrus.infra.nattable.utils.TableSelectionWrapper;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+
+/**
+ * This class manage the paste in tree table when a selection is available.
+ */
+public class PasteInSelectionNattableCommandProvider extends AbstractPasteInSelectionNattableCommandProvider {
+
+ /**
+ * The paste configuration of the top level.
+ */
+ protected PasteEObjectConfiguration pasteConfigurationTopLevel = null;
+
+ /**
+ * Constructor.
+ *
+ * @param tableManager
+ * The nattable model manager.
+ * @param pasteColumn
+ * Boolean to determinate if this is a paste in column.
+ * @param isInsert
+ * Boolean to determinate if this is an insert action.
+ * @param axisAsIdentifier
+ * The axis used ad identifier.
+ * @param reader
+ * The reader of the pasted text.
+ * @param pasteHelper
+ * The paste helper.
+ * @param tableSelectionWrapper
+ * The selection as table selection wrapper.
+ * @param preferredUserAction
+ * The preferred user action for the insert row action.
+ * @param totalSize
+ * The total size of pasted elements.
+ */
+ public PasteInSelectionNattableCommandProvider(final INattableModelManager tableManager, final boolean pasteColumn, final boolean isInsert, final Reader reader, final CSVPasteHelper pasteHelper,
+ final TableSelectionWrapper tableSelectionWrapper, final int preferredUserAction, final long totalSize) {
+ super(tableManager, pasteColumn, isInsert, reader, pasteHelper, tableSelectionWrapper, preferredUserAction, totalSize);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.infra.nattable.provider.AbstractPasteInSelectionNattableCommandProvider#init()
+ */
+ @Override
+ protected void init() {
+ this.detachedMode = isPasteInDetachedMode(table);
+ PasteEObjectConfiguration configuration = getPasteconfigurationTopLevel(this.table);
+ if (configuration != null) {
+ this.postActions = new ArrayList<String>(configuration.getPostActions());
+ this.detachedMode = configuration.isDetachedMode();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.infra.nattable.provider.AbstractPasteInSelectionNattableCommandProvider#getPasteconfiguration(org.eclipse.papyrus.infra.nattable.model.nattable.Table)
+ */
+ @Override
+ protected PasteEObjectConfiguration getPasteconfigurationTopLevel(final Table table) {
+ if (null == pasteConfigurationTopLevel) {
+ if (this.pasteColumn) {
+ pasteConfigurationTopLevel = (PasteEObjectConfiguration) AxisConfigurationUtils.getIAxisConfigurationUsedInTable(this.table, NattableaxisconfigurationPackage.eINSTANCE.getPasteEObjectConfiguration(), true);
+ } else {
+ pasteConfigurationTopLevel = (PasteEObjectConfiguration) AxisConfigurationUtils.getIAxisConfigurationUsedInTable(this.table, NattableaxisconfigurationPackage.eINSTANCE.getPasteEObjectConfiguration(), false);
+ }
+ }
+ return pasteConfigurationTopLevel;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.infra.nattable.provider.AbstractPasteInSelectionNattableCommandProvider#getPasteConfiguration(org.eclipse.papyrus.infra.nattable.model.nattable.Table, int, java.lang.String)
+ */
+ @Override
+ protected PasteEObjectConfiguration getPasteConfiguration(final Table table, final int currentDepth, final String categoryName) {
+ return getPasteconfigurationTopLevel(table);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.infra.nattable.provider.AbstractPasteInSelectionNattableCommandProvider#getDepthFromObject(java.lang.Object)
+ */
+ @Override
+ protected int getDepthFromObject(final Object object) {
+ return 0;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.infra.nattable.provider.AbstractPasteInSelectionNattableCommandProvider#getCategoryFromObject(java.lang.Object)
+ */
+ @Override
+ protected String getCategoryFromObject(final Object object) {
+ return "";
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.infra.nattable.provider.AbstractPasteInSelectionNattableCommandProvider#getRowElementCreatedInAttachedMode()
+ */
+ @Override
+ protected Object getRowElementCreatedInAttachedMode(final EObject context, final EStructuralFeature containmentFeature, final IElementType typeToCreate, final IProgressMonitor monitor, final IAdaptable info, final CompoundCommand compoundCommand) {
+ Object createdElement = null;
+
+ if (!containmentFeature.isDerived() && containmentFeature.isChangeable()) {
+ final CreateElementRequest createRequest = new CreateElementRequest(contextEditingDomain, context, typeToCreate, (EReference) containmentFeature);
+ final IElementEditService tableContextCommandProvider = ElementEditServiceUtils.getCommandProvider(context);
+
+ final ICommand commandCreation = tableContextCommandProvider.getEditCommand(createRequest);
+ if (commandCreation.canExecute()) {
+ // we create the element
+ final Command emfCommandCreation = GMFtoEMFCommandWrapper.wrap(commandCreation);
+ emfCommandCreation.execute();
+ compoundCommand.append(emfCommandCreation);
+
+ // we add it to the table
+ final CommandResult res = commandCreation.getCommandResult();
+ commandCreation.dispose();
+
+ createdElement = res.getReturnValue();
+ }
+ }
+
+ return createdElement;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.infra.nattable.provider.AbstractPasteInSelectionNattableCommandProvider#createTableRow(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
+ */
+ @Override
+ protected void createTableRowInAttachedModeCommand(final CompoundCommand compoundCommand, final List<InsertedElementInNattable> createdElements) throws ExecutionException {
+ CompoundCommand addCommand = new CompoundCommand("Create table row");
+
+ // Move the element created at the correct position
+ for (int insertedElementIndex = createdElements.size() - 1; insertedElementIndex >= 0; insertedElementIndex--) {
+ final InsertedElementInNattable currentInsertedElement = createdElements.get(insertedElementIndex);
+ if (-1 != currentInsertedElement.getIndexInParent()) {
+ addCommand.append(MoveCommand.create(contextEditingDomain, currentInsertedElement.getContext(), currentInsertedElement.getContainementFeature(), currentInsertedElement.getCreatedElements(), currentInsertedElement.getIndexInParent()));
+ }
+ }
+
+ // Add the row in the table only if the command can be executed
+ // (and create an other if can be executed because it was already prepared)
+ for (final InsertedElementInNattable currentInsertedElement : createdElements) {
+ if (-1 != currentInsertedElement.getIndexInTable()) {
+ if (pasteColumn) {
+ final Command addColumnElementCommand = tableManager.getAddColumnElementCommand(currentInsertedElement.getCreatedElements(), currentInsertedElement.getIndexInTable());
+ if (addColumnElementCommand.canExecute()) {
+ addCommand.append(addColumnElementCommand);
+ }
+ } else {
+ final Command addRowElementCommand = tableManager.getAddRowElementCommand(currentInsertedElement.getCreatedElements(), currentInsertedElement.getIndexInTable());
+ if (addRowElementCommand.canExecute()) {
+ addCommand.append(addRowElementCommand);
+ }
+ }
+ } else {
+ if (pasteColumn) {
+ final Command addColumnElementCommand = tableManager.getAddColumnElementCommand(currentInsertedElement.getCreatedElements());
+ if (addColumnElementCommand.canExecute()) {
+ addCommand.append(addColumnElementCommand);
+ }
+ } else {
+ final Command addRowElementCommand = tableManager.getAddRowElementCommand(currentInsertedElement.getCreatedElements());
+ if (addRowElementCommand.canExecute()) {
+ addCommand.append(addRowElementCommand);
+ }
+ }
+ }
+ }
+
+ if (!addCommand.isEmpty()) {
+ compoundCommand.append(addCommand);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.infra.nattable.provider.AbstractPasteInSelectionNattableCommandProvider#getRowElementCreatedInDetachedMode()
+ */
+ @Override
+ protected Object getRowElementCreatedInDetachedMode(final EStructuralFeature containmentFeature, final IElementType typeToCreate, final IProgressMonitor monitor, final IAdaptable info, final CompoundCommand compoundCommand) {
+ Object result = null;
+ if (!containmentFeature.isDerived() && containmentFeature.isChangeable()) {
+ // Get the class type to create and get its factory
+ final EClass eClassToCreate = typeToCreate.getEClass();
+ final EFactory eFactory = eClassToCreate.getEPackage().getEFactoryInstance();
+
+ // get the element type to use to create the element
+ result = eFactory.create(eClassToCreate);
+ }
+ return result;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.infra.nattable.provider.AbstractPasteInSelectionNattableCommandProvider#createTableRow(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
+ */
+ @Override
+ protected void createTableRowInDetachedModeCommand(final CompoundCommand compoundCommand, final List<InsertedElementInNattable> createdElements) throws ExecutionException {
+ final CompoundCommand addCommand = new CompoundCommand("Create table row");
+
+ for (int insertedElementIndex = createdElements.size() - 1; insertedElementIndex >= 0; insertedElementIndex--) {
+ final InsertedElementInNattable currentInsertedElement = createdElements.get(insertedElementIndex);
+ if (currentInsertedElement.getContainementFeature().isMany()) {
+ if (-1 != currentInsertedElement.getIndexInParent()) {
+ addCommand.append(AddCommand.create(contextEditingDomain, currentInsertedElement.getContext(), currentInsertedElement.getContainementFeature(), currentInsertedElement.getCreatedElements(), currentInsertedElement.getIndexInParent()));
+ } else {
+ addCommand.append(AddCommand.create(contextEditingDomain, currentInsertedElement.getContext(), currentInsertedElement.getContainementFeature(), currentInsertedElement.getCreatedElements()));
+ }
+ } else {
+ addCommand.append(SetCommand.create(contextEditingDomain, currentInsertedElement.getContext(), currentInsertedElement.getContainementFeature(), currentInsertedElement.getCreatedElements().get(0)));
+ }
+ }
+
+ // Add the row in the table only if the command can be executed
+ // (and create an other if can be executed because it was already prepared)
+ for (final InsertedElementInNattable currentInsertedElement : createdElements) {
+ if (-1 != currentInsertedElement.getIndexInTable()) {
+ if (pasteColumn) {
+ final Command addColumnElementCommand = tableManager.getAddColumnElementCommand(currentInsertedElement.getCreatedElements(), currentInsertedElement.getIndexInTable());
+ if (addColumnElementCommand.canExecute()) {
+ addCommand.append(addColumnElementCommand);
+ }
+ } else {
+ final Command addRowElementCommand = tableManager.getAddRowElementCommand(currentInsertedElement.getCreatedElements(), currentInsertedElement.getIndexInTable());
+ if (addRowElementCommand.canExecute()) {
+ addCommand.append(addRowElementCommand);
+ }
+ }
+ } else {
+ if (pasteColumn) {
+ final Command addColumnElementCommand = tableManager.getAddColumnElementCommand(currentInsertedElement.getCreatedElements());
+ if (addColumnElementCommand.canExecute()) {
+ addCommand.append(addColumnElementCommand);
+ }
+ } else {
+ final Command addRowElementCommand = tableManager.getAddRowElementCommand(currentInsertedElement.getCreatedElements());
+ if (addRowElementCommand.canExecute()) {
+ addCommand.append(addRowElementCommand);
+ }
+ }
+ }
+ }
+
+ if (!addCommand.isEmpty()) {
+ compoundCommand.append(addCommand);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.infra.nattable.provider.AbstractPasteInSelectionNattableCommandProvider#localDispose()
+ */
+ @Override
+ protected void localDispose() {
+ super.localDispose();
+ this.pasteConfigurationTopLevel = null;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.nattable.provider.AbstractPasteInSelectionNattableCommandProvider#getColumnElement(int)
+ *
+ * @param realColumnIndex
+ * @return
+ */
+ @Override
+ protected Object getColumnElement(int realColumnIndex) {
+ return tableManager.getColumnElementsList().get(realColumnIndex);
+ }
+}
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/PasteInSelectionTreeNattableCommandProvider.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/PasteInSelectionTreeNattableCommandProvider.java
new file mode 100644
index 00000000000..d3e00595c7a
--- /dev/null
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/PasteInSelectionTreeNattableCommandProvider.java
@@ -0,0 +1,465 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.nattable.provider;
+
+import java.io.Reader;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.command.CompoundCommand;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EFactory;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.edit.command.AddCommand;
+import org.eclipse.emf.edit.command.MoveCommand;
+import org.eclipse.emf.edit.command.SetCommand;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.papyrus.commands.wrappers.GMFtoEMFCommandWrapper;
+import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
+import org.eclipse.papyrus.infra.nattable.manager.table.TreeNattableModelManager;
+import org.eclipse.papyrus.infra.nattable.model.nattable.Table;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.ITreeItemAxis;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AbstractHeaderAxisConfiguration;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.IAxisConfiguration;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.IPasteConfiguration;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.NattableaxisconfigurationPackage;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.PasteEObjectConfiguration;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.TreeFillingConfiguration;
+import org.eclipse.papyrus.infra.nattable.utils.AxisConfigurationUtils;
+import org.eclipse.papyrus.infra.nattable.utils.AxisUtils;
+import org.eclipse.papyrus.infra.nattable.utils.CSVPasteHelper;
+import org.eclipse.papyrus.infra.nattable.utils.FillingConfigurationUtils;
+import org.eclipse.papyrus.infra.nattable.utils.InsertedElementInNattable;
+import org.eclipse.papyrus.infra.nattable.utils.TableSelectionWrapper;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+
+/**
+ * This class manage the paste in tree table when a selection is available.
+ */
+public class PasteInSelectionTreeNattableCommandProvider extends PasteInSelectionNattableCommandProvider {
+
+ /**
+ * Constructor.
+ *
+ * @param tableManager
+ * The nattable model manager.
+ * @param pasteColumn
+ * Boolean to determinate if this is a paste in column.
+ * @param isInsert
+ * Boolean to determinate if this is an insert action.
+ * @param axisAsIdentifier
+ * The axis used ad identifier.
+ * @param reader
+ * The reader of the pasted text.
+ * @param pasteHelper
+ * The paste helper.
+ * @param tableSelectionWrapper
+ * The selection as table selection wrapper.
+ * @param preferredUserAction
+ * The preferred user action for the insert row action.
+ * @param totalSize
+ * The total size of pasted elements.
+ */
+ public PasteInSelectionTreeNattableCommandProvider(final INattableModelManager tableManager, final boolean pasteColumn, final boolean isInsert, final Reader reader, final CSVPasteHelper pasteHelper,
+ final TableSelectionWrapper tableSelectionWrapper, final int preferredUserAction, final long totalSize) {
+ super(tableManager, pasteColumn, isInsert, reader, pasteHelper, tableSelectionWrapper, preferredUserAction, totalSize);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.infra.nattable.provider.PasteInSelectionNattableCommandProvider#init()
+ */
+ @Override
+ protected void init() {
+ super.init();
+ this.detachedMode = isPasteInDetachedMode(table);
+ }
+
+ /**
+ * Get the paste configuration for the depth and the category name.
+ *
+ * @param table
+ * The table to manage.
+ * @param depth
+ * The depth to search.
+ * @param categoryName
+ * The category name.
+ * @return The paste configuration corresponding to the depth and to the category name.
+ */
+ protected PasteEObjectConfiguration getPasteConfigurationsFor(final Table table, final int depth, final String categoryName) {
+ if (depth == 0 && !FillingConfigurationUtils.hasTreeFillingConfigurationForDepth(table, 0)) {
+ AbstractHeaderAxisConfiguration conf = table.getLocalRowHeaderAxisConfiguration();
+ if (conf != null) {
+ conf = table.getTableConfiguration().getRowHeaderAxisConfiguration();
+ }
+ final List<TreeFillingConfiguration> filling = FillingConfigurationUtils.getAllTreeFillingConfigurationForDepth(table, depth);
+ final List<IAxisConfiguration> referencedPasteConf = new ArrayList<IAxisConfiguration>();
+ for (final TreeFillingConfiguration tmp : filling) {
+ if (tmp.getPasteConfiguration() != null) {
+ referencedPasteConf.add(tmp.getPasteConfiguration());
+ }
+ }
+ for (final IAxisConfiguration axisConf : conf.getOwnedAxisConfigurations()) {
+ if (axisConf instanceof PasteEObjectConfiguration && !referencedPasteConf.contains(axisConf)) {
+ return (PasteEObjectConfiguration) axisConf;
+ }
+ }
+ }
+ for (final TreeFillingConfiguration curr : FillingConfigurationUtils.getAllTreeFillingConfiguration(table)) {
+ if (curr.getDepth() == depth) {
+ if (null == categoryName || categoryName.isEmpty()) {
+ return curr.getPasteConfiguration();
+ } else {
+ String featureName = curr.getAxisUsedAsAxisProvider().getAlias();
+ if (featureName == null || "".equals(featureName)) {
+ final Object element = curr.getAxisUsedAsAxisProvider().getElement();
+ if (element instanceof EStructuralFeature) {
+ featureName = ((EStructuralFeature) element).getName();
+ }
+ }
+ if (categoryName.equals(featureName)) {
+ return curr.getPasteConfiguration();
+ }
+ }
+ }
+ }
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.infra.nattable.provider.PasteInSelectionNattableCommandProvider#getPasteConfiguration(org.eclipse.papyrus.infra.nattable.model.nattable.Table, int, java.lang.String)
+ */
+ @Override
+ protected PasteEObjectConfiguration getPasteConfiguration(final Table table, final int currentDepth, final String categoryName) {
+ return (PasteEObjectConfiguration) getPasteConfigurationsFor(table, currentDepth, categoryName);
+ }
+
+ /**
+ * Get the paste configuration for the full synchro table.
+ *
+ * @param table
+ * The table.
+ * @return The paste configuration of the full synchro table.
+ */
+ protected PasteEObjectConfiguration getPasteConfigurationForFullSynchroTable(final Table table) {
+ PasteEObjectConfiguration pasteEObjectConfiguration = null;
+ final IPasteConfiguration pasteConfiguration = (IPasteConfiguration) AxisConfigurationUtils.getIAxisConfigurationUsedInTable(table, NattableaxisconfigurationPackage.eINSTANCE.getPasteEObjectConfiguration(), false);
+
+ if (pasteConfiguration instanceof PasteEObjectConfiguration) {
+ pasteEObjectConfiguration = (PasteEObjectConfiguration) pasteConfiguration;
+ }
+
+ return pasteEObjectConfiguration;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.infra.nattable.provider.AbstractPasteInSelectionNattableCommandProvider#getPasteconfiguration(org.eclipse.papyrus.infra.nattable.model.nattable.Table)
+ */
+ @Override
+ protected PasteEObjectConfiguration getPasteconfigurationTopLevel(final Table table) {
+ if (null == pasteConfigurationTopLevel) {
+ final boolean fullSynchro = FillingConfigurationUtils.hasTreeFillingConfigurationForDepth(tableManager.getTable(), 0);
+ if (fullSynchro) {
+ pasteConfigurationTopLevel = getPasteConfigurationForFullSynchroTable(tableManager.getTable());
+ } else {
+ pasteConfigurationTopLevel = getPasteConfigurationsFor(table, 0, null);
+ }
+ }
+ return pasteConfigurationTopLevel;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.infra.nattable.provider.AbstractPasteInSelectionNattableCommandProvider#getDepthFromObject(java.lang.Object)
+ */
+ @Override
+ protected int getDepthFromObject(final Object object) {
+ int depth = -1;
+ if (object instanceof ITreeItemAxis) {
+ depth = ((TreeNattableModelManager) tableManager).getSemanticDepth((ITreeItemAxis) object);
+ }
+ return -1 == depth ? super.getDepthFromObject(object) : depth;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.infra.nattable.provider.PasteInSelectionNattableCommandProvider#getCategoryFromObject(java.lang.Object)
+ */
+ @Override
+ protected String getCategoryFromObject(final Object object) {
+ String category = "";
+ if (object instanceof ITreeItemAxis) {
+ if (((ITreeItemAxis) object).getElement() instanceof TreeFillingConfiguration) {
+ final TreeFillingConfiguration configuration = (TreeFillingConfiguration) ((ITreeItemAxis) object).getElement();
+ category = configuration.getAxisUsedAsAxisProvider().getAlias();
+ if (category == null || "".equals(category)) {
+ final Object element = configuration.getAxisUsedAsAxisProvider().getElement();
+ if (element instanceof EStructuralFeature) {
+ category = ((EStructuralFeature) element).getName();
+ }
+ }
+ } else if (null != ((ITreeItemAxis) object).getParent()) {
+ final ITreeItemAxis parentAxis = ((ITreeItemAxis) object).getParent();
+ category = getCategoryFromObject(parentAxis);
+ }
+ }
+ return category;
+ }
+
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.infra.nattable.provider.PasteInSelectionNattableCommandProvider#getRowElementCreatedInAttachedMode()
+ */
+ @Override
+ protected Object getRowElementCreatedInAttachedMode(final EObject context, final EStructuralFeature containmentFeature, final IElementType typeToCreate, final IProgressMonitor monitor, final IAdaptable info, final CompoundCommand compoundCommand) {
+ Object createdElement = null;
+
+ if (!containmentFeature.isDerived() && containmentFeature.isChangeable()) {
+ final CreateElementRequest createRequest1 = new CreateElementRequest(contextEditingDomain, context, typeToCreate, (EReference) containmentFeature);
+ final IElementEditService creationContextCommandProvider = ElementEditServiceUtils.getCommandProvider(context);
+
+ final ICommand commandCreation = creationContextCommandProvider.getEditCommand(createRequest1);
+ if (null != commandCreation && commandCreation.canExecute()) {
+
+ // we create the element
+ final Command emfCommandCreation = GMFtoEMFCommandWrapper.wrap(commandCreation);
+ emfCommandCreation.execute();
+ compoundCommand.append(emfCommandCreation);
+
+ // we get the result of the command
+ final CommandResult res = commandCreation.getCommandResult();
+ commandCreation.dispose();
+
+ // we update the map
+ createdElement = res.getReturnValue();
+ }
+ }
+
+ return createdElement;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.infra.nattable.provider.PasteInSelectionNattableCommandProvider#createTableRow(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
+ */
+ @Override
+ protected void createTableRowInAttachedModeCommand(final CompoundCommand compoundCommand, final List<InsertedElementInNattable> createdElements) throws ExecutionException {
+ final CompoundCommand addCommand = new CompoundCommand("Create table row");
+
+ // Move the element created at the correct position
+ for (int insertedElementIndex = createdElements.size() - 1; insertedElementIndex >= 0; insertedElementIndex--) {
+ final InsertedElementInNattable currentInsertedElement = createdElements.get(insertedElementIndex);
+ if (-1 != currentInsertedElement.getIndexInParent()) {
+ addCommand.append(MoveCommand.create(contextEditingDomain, currentInsertedElement.getContext(), currentInsertedElement.getContainementFeature(), currentInsertedElement.getCreatedElements(), currentInsertedElement.getIndexInParent()));
+ }
+ }
+
+ // Add the row in the table only if the command can be executed
+ // (and create an other if can be executed because it was already prepared)
+ if (!FillingConfigurationUtils.hasTreeFillingConfigurationForDepth(table, 0)) {
+ for (final InsertedElementInNattable currentInsertedElement : createdElements) {
+ if (-1 != currentInsertedElement.getIndexInTable()) {
+ if (pasteColumn) {
+ final Command addColumnElementCommand = tableManager.getAddColumnElementCommand(currentInsertedElement.getCreatedElements(), currentInsertedElement.getIndexInTable());
+ if (addColumnElementCommand.canExecute()) {
+ addCommand.append(addColumnElementCommand);
+ }
+ } else {
+ final Command addRowElementCommand = tableManager.getAddRowElementCommand(currentInsertedElement.getCreatedElements(), currentInsertedElement.getIndexInTable());
+ if (addRowElementCommand.canExecute()) {
+ addCommand.append(addRowElementCommand);
+ }
+ }
+ } else {
+ if (pasteColumn) {
+ final Command addColumnElementCommand = tableManager.getAddColumnElementCommand(currentInsertedElement.getCreatedElements());
+ if (addColumnElementCommand.canExecute()) {
+ addCommand.append(addColumnElementCommand);
+ }
+ } else {
+ final Command addRowElementCommand = tableManager.getAddRowElementCommand(currentInsertedElement.getCreatedElements());
+ if (addRowElementCommand.canExecute()) {
+ addCommand.append(addRowElementCommand);
+ }
+ }
+ }
+ }
+ }
+
+ if (!addCommand.isEmpty()) {
+ compoundCommand.append(addCommand);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.infra.nattable.provider.PasteInSelectionNattableCommandProvider#getRowElementCreatedInDetachedMode(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable, org.eclipse.emf.common.command.CompoundCommand)
+ */
+ @Override
+ protected Object getRowElementCreatedInDetachedMode(final EStructuralFeature containmentFeature, final IElementType typeToCreate, final IProgressMonitor monitor, final IAdaptable info, final CompoundCommand compoundCommand) {
+ Object result = null;
+ if (!containmentFeature.isDerived() && containmentFeature.isChangeable()) {
+ // Get the class type to create and get its factory
+ final EClass eClassToCreate = typeToCreate.getEClass();
+ final EFactory eFactory = eClassToCreate.getEPackage().getEFactoryInstance();
+
+ // get the element type to use to create the element
+ result = eFactory.create(eClassToCreate);
+ }
+ return result;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.infra.nattable.provider.PasteInSelectionNattableCommandProvider#createTableRow(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
+ */
+ @Override
+ protected void createTableRowInDetachedModeCommand(final CompoundCommand compoundCommand, final List<InsertedElementInNattable> createdElements) throws ExecutionException {
+ final CompoundCommand addCommand = new CompoundCommand("Create table row");
+
+ // we use the label to do a set name command on the created element
+ for (int insertedElementIndex = createdElements.size() - 1; insertedElementIndex >= 0; insertedElementIndex--) {
+ final InsertedElementInNattable currentInsertedElement = createdElements.get(insertedElementIndex);
+ if (currentInsertedElement.getContainementFeature().isMany()) {
+ if (-1 != currentInsertedElement.getIndexInParent()) {
+ addCommand.append(AddCommand.create(contextEditingDomain, currentInsertedElement.getContext(), currentInsertedElement.getContainementFeature(), currentInsertedElement.getCreatedElements(), currentInsertedElement.getIndexInParent()));
+ } else {
+ addCommand.append(AddCommand.create(contextEditingDomain, currentInsertedElement.getContext(), currentInsertedElement.getContainementFeature(), currentInsertedElement.getCreatedElements()));
+ }
+ } else {
+ addCommand.append(SetCommand.create(contextEditingDomain, currentInsertedElement.getContext(), currentInsertedElement.getContainementFeature(), currentInsertedElement.getCreatedElements().get(0)));
+ }
+ }
+
+ // Add the row in the table only if the command can be executed
+ // (and create an other if can be executed because it was already prepared)
+ if (!FillingConfigurationUtils.hasTreeFillingConfigurationForDepth(table, 0)) {
+ for (final InsertedElementInNattable currentInsertedElement : createdElements) {
+ if (-1 != currentInsertedElement.getIndexInTable()) {
+ if (pasteColumn) {
+ final Command addColumnElementCommand = tableManager.getAddColumnElementCommand(currentInsertedElement.getCreatedElements(), currentInsertedElement.getIndexInTable());
+ if (addColumnElementCommand.canExecute()) {
+ addCommand.append(addColumnElementCommand);
+ }
+ } else {
+ final Command addRowElementCommand = tableManager.getAddRowElementCommand(currentInsertedElement.getCreatedElements(), currentInsertedElement.getIndexInTable());
+ if (addRowElementCommand.canExecute()) {
+ addCommand.append(addRowElementCommand);
+ }
+ }
+ } else {
+ if (pasteColumn) {
+ final Command addColumnElementCommand = tableManager.getAddColumnElementCommand(currentInsertedElement.getCreatedElements());
+ if (addColumnElementCommand.canExecute()) {
+ addCommand.append(addColumnElementCommand);
+ }
+ } else {
+ final Command addRowElementCommand = tableManager.getAddRowElementCommand(currentInsertedElement.getCreatedElements());
+ if (addRowElementCommand.canExecute()) {
+ addCommand.append(addRowElementCommand);
+ }
+ }
+ }
+ }
+ }
+
+ if (!addCommand.isEmpty()) {
+ compoundCommand.append(addCommand);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.infra.nattable.provider.AbstractPasteInSelectionNattableCommandProvider#getFirstSelectedElementIndexOfTableContext(java.util.Map, int)
+ */
+ @Override
+ protected int getFirstSelectedElementIndexOfTableContext(final Map<Integer, Object> rows, final int currentRowIndex, final EObject context) {
+ int initialFirstIndexInParent = -1;
+
+ if (isInsert) {
+ Object axis = rows.get(currentRowIndex);
+ Object object = AxisUtils.getRepresentedElement(axis);
+ if (object instanceof EObject) {
+ if (object instanceof TreeFillingConfiguration) {
+ initialFirstIndexInParent = 0;
+ } else {
+ initialFirstIndexInParent = super.getFirstSelectedElementIndexOfTableContext(rows, currentRowIndex, context);
+ }
+ }
+ }
+
+ return initialFirstIndexInParent;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.nattable.provider.AbstractPasteInSelectionNattableCommandProvider#getColumnElement(int)
+ *
+ * @param realColumnIndex
+ * @return
+ */
+ @Override
+ protected Object getColumnElement(final int realColumnIndex) {
+ return AxisUtils.getRepresentedElement(tableManager.getColumnElement(realColumnIndex));
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.infra.nattable.provider.AbstractPasteInSelectionNattableCommandProvider#getContentOfSelection(java.util.Map, int)
+ */
+ protected EObject getContentOfSelection(final Map<Integer, Object> rows, final int currentRowIndex) {
+ EObject context = null;
+
+ if (0 == currentRowIndex) {
+ context = table.getContext();
+ } else {
+ Object axis = rows.get(currentRowIndex);
+ Object object = AxisUtils.getRepresentedElement(axis);
+ if (object instanceof TreeFillingConfiguration && axis instanceof ITreeItemAxis) {
+ axis = ((ITreeItemAxis) axis).getParent();
+ if (null != axis) {
+ context = (EObject) AxisUtils.getRepresentedElement(axis);
+ }
+ } else if (object instanceof EObject) {
+ context = ((EObject) object).eContainer();
+ }
+ }
+
+ return context;
+ }
+}
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/PasteNattableCommandProvider.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/PasteNattableCommandProvider.java
new file mode 100644
index 00000000000..16be6bb3c19
--- /dev/null
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/PasteNattableCommandProvider.java
@@ -0,0 +1,34 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.nattable.provider;
+
+import org.eclipse.core.runtime.IStatus;
+
+/**
+ * The interface defining for the paste in nattable command provider.
+ */
+public interface PasteNattableCommandProvider {
+
+ /**
+ * This allows to execute the paste from string with a command.
+ *
+ * @param useProgressMonitor
+ * Determinate if a progress monitor will be used.
+ * @param openDialog
+ * Determinate if the dialog must be opened during the process.
+ * @return the status.
+ */
+ public IStatus executePasteFromStringCommand(final boolean useProgressMonitor, final boolean openDialog);
+
+}
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/TableSelectionProvider.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/TableSelectionProvider.java
index 04dde72b84f..f7ab077c8d6 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/TableSelectionProvider.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/TableSelectionProvider.java
@@ -1,258 +1,566 @@
-/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.infra.nattable.provider;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.nebula.widgets.nattable.coordinate.PositionCoordinate;
-import org.eclipse.nebula.widgets.nattable.layer.ILayerListener;
-import org.eclipse.nebula.widgets.nattable.layer.cell.ILayerCell;
-import org.eclipse.nebula.widgets.nattable.layer.event.ILayerEvent;
-import org.eclipse.nebula.widgets.nattable.selection.SelectionLayer;
-import org.eclipse.nebula.widgets.nattable.selection.event.ISelectionEvent;
-import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
-import org.eclipse.papyrus.infra.nattable.utils.AxisUtils;
-import org.eclipse.papyrus.infra.nattable.utils.TableSelectionWrapper;
-import org.eclipse.papyrus.infra.tools.util.ListHelper;
-import org.eclipse.ui.services.IDisposable;
-
-/**
- *
- * The selection provider used by the table. The returned selection is used to display property views or to do the synchronization in the
- * ModelExplorer
- *
- */
-public class TableSelectionProvider implements ISelectionProvider, IDisposable, ILayerListener {
-
- /**
- * the selection layer used in the table
- */
- private SelectionLayer selectionLayer;
-
- /**
- * the selection listener
- */
- private final ILayerListener selectionListener;
-
- /**
- * the current selection in the table
- */
- private ISelection currentSelection;
-
- /**
- * the list of listener on the selections
- */
- private final List<ISelectionChangedListener> listeners;
-
- /**
- * the table model manager to use to find selected elements
- */
- private INattableModelManager manager;
-
- /**
- * boolean indicating than the class is disposed
- */
- private boolean isDisposed = false;
-
- /**
- *
- * Constructor.
- *
- * @param manager
- * the table model manager to use to find selected elements
- * @param selectionLayer
- */
- public TableSelectionProvider(final INattableModelManager manager, final SelectionLayer selectionLayer) {
- this.selectionLayer = selectionLayer;
- this.selectionListener = this;
- this.selectionLayer.addLayerListener(this.selectionListener);
- this.currentSelection = new StructuredSelection();
- this.listeners = new ArrayList<ISelectionChangedListener>();
- this.manager = manager;
- }
-
- /**
- *
- * @see org.eclipse.jface.viewers.ISelectionProvider#addSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener)
- *
- * @param listener
- */
- @Override
- public void addSelectionChangedListener(final ISelectionChangedListener listener) {
- this.listeners.add(listener);
- }
-
- /**
- *
- * @see org.eclipse.jface.viewers.ISelectionProvider#getSelection()
- *
- * @return
- */
- @Override
- public synchronized ISelection getSelection() {
- return this.currentSelection;
- }
-
- /**
- *
- * @see org.eclipse.jface.viewers.ISelectionProvider#removeSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener)
- *
- * @param listener
- */
- @Override
- public void removeSelectionChangedListener(final ISelectionChangedListener listener) {
- this.listeners.remove(listener);
- }
-
- /**
- *
- * @see org.eclipse.jface.viewers.ISelectionProvider#setSelection(org.eclipse.jface.viewers.ISelection)
- *
- * @param selection
- */
- @Override
- public synchronized void setSelection(final ISelection selection) {
- if (this.currentSelection.equals(selection)) {
- return;
- }
- this.currentSelection = selection;
- final SelectionChangedEvent event = new SelectionChangedEvent(this, this.currentSelection);
- for (final ISelectionChangedListener current : this.listeners) {
- current.selectionChanged(event);
- }
- }
-
- /**
- *
- * @param event
- * an event
- */
- protected/* synchronized */void calculateAndStoreNewSelection(final ILayerEvent event) {
- // the list of the selected elements
- final Collection<Object> selection = new HashSet<Object>();
- final ISelection newSelection;
- if (event instanceof ISelectionEvent) {
- // we are not able to distinguish the 2 ways to select a full axis :
- // - first way : clicking on axis header
- // - second way : clicking on first cell of the axis, Pressing SHIFT, clicking on the last cell of the axis (or selecting each cell of the axis pressing CTRL)
- // so we are not able to know if the user want to select the element represented by the axis OR all values displayed on the axis, without the element represented by the axis
- // we decided to implements this behavior for all kind of selection event :
- // 1- we add in the selection elements represented by fully selected rows
- // 2- we add in the selection elements represented by fully selected columns
- // 3- we add in the selection the contents of selected cell which are not included in the fully selected axis
-
- final Collection<PositionCoordinate> selectedCells =ListHelper.asList(this.selectionLayer.getSelectedCellPositions());
- final Map<Integer, Object> fullySelectedRows = new HashMap<Integer, Object>();
- final Map<Integer, Object> fullySelectedColumns = new HashMap<Integer, Object>();
-
-
-
- final List<Integer> selectedRowsIndexes = new ArrayList<Integer>();
- for (int i : this.selectionLayer.getFullySelectedRowPositions()) {
- int rowIndex = this.selectionLayer.getRowIndexByPosition(i);
- selectedRowsIndexes.add(new Integer(rowIndex));
- Object el = this.manager.getRowElement(rowIndex);
- if (el != null) {
- fullySelectedRows.put(Integer.valueOf(rowIndex), el);
- el = AxisUtils.getRepresentedElement(el);
- selection.add(el);
- }
- }
- final List<Integer> selectedColumnsIndexes = new ArrayList<Integer>();
- for (int i : this.selectionLayer.getFullySelectedColumnPositions()) {
- int columnIndex = this.selectionLayer.getColumnIndexByPosition(i);
- selectedColumnsIndexes.add(new Integer(columnIndex));
- Object el = this.manager.getColumnElement(columnIndex);
- if (el != null) {
- fullySelectedColumns.put(Integer.valueOf(columnIndex), el);
- el = AxisUtils.getRepresentedElement(el);
- selection.add(el);
- }
- }
-
- for (final PositionCoordinate cellLocation : selectedCells) {
- final int colPos = cellLocation.getColumnPosition();
- final int rowPos = cellLocation.getRowPosition();
- if (!selectedColumnsIndexes.contains(new Integer(this.selectionLayer.getColumnIndexByPosition(colPos))) && !selectedRowsIndexes.contains(new Integer(this.selectionLayer.getRowIndexByPosition(rowPos)))) {
- final ILayerCell cell = this.selectionLayer.getCellByPosition(colPos, rowPos);
- if (cell != null) {
- final Object value = cell.getDataValue();
- if (value != null) {
- if (value instanceof Collection<?>) {
- final Iterator<?> iter = ((Collection<?>) value).iterator();
- while (iter.hasNext()) {
- final Object current = iter.next();
- selection.add(current);
- }
- } else {
- selection.add(value);
- }
- }
- }
- }
- }
- final TableSelectionWrapper wrapper = new TableSelectionWrapper(selectedCells, fullySelectedRows, fullySelectedColumns);
- newSelection = new TableStructuredSelection(selection.toArray(), wrapper);
- } else {
- newSelection = new StructuredSelection();
- }
- setSelection(newSelection);
- }
-
-
-
- /**
- *
- * @see org.eclipse.ui.services.IDisposable#dispose()
- *
- */
- @Override
- public void dispose() {
- this.isDisposed = true;
- this.manager = null;
- //to be sure, to fix the bug 469376: [Table] Memory Leak : (Tree)NattableWidgetManager, EObjectTreeItemAxis and others objects are not disposed when the table is closed
-// https://bugs.eclipse.org/bugs/show_bug.cgi?id=469376
- setSelection(StructuredSelection.EMPTY);
-
- if (this.selectionLayer != null) {
- this.selectionLayer.removeLayerListener(this.selectionListener);
- this.selectionLayer = null;
- }
- this.listeners.clear();
- }
-
- /**
- * @see org.eclipse.nebula.widgets.nattable.layer.ILayerListener#handleLayerEvent(org.eclipse.nebula.widgets.nattable.layer.event.ILayerEvent)
- *
- * @param event
- */
- @Override
- public void handleLayerEvent(ILayerEvent event) {
- if (!isDisposed && event instanceof ISelectionEvent) {
- calculateAndStoreNewSelection(event);
- }
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 476618
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.nattable.provider;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map.Entry;
+
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.ISelectionProvider;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.nebula.widgets.nattable.coordinate.PositionCoordinate;
+import org.eclipse.nebula.widgets.nattable.coordinate.Range;
+import org.eclipse.nebula.widgets.nattable.layer.ILayerListener;
+import org.eclipse.nebula.widgets.nattable.layer.cell.ILayerCell;
+import org.eclipse.nebula.widgets.nattable.layer.event.ILayerEvent;
+import org.eclipse.nebula.widgets.nattable.selection.SelectionLayer;
+import org.eclipse.nebula.widgets.nattable.selection.event.CellSelectionEvent;
+import org.eclipse.nebula.widgets.nattable.selection.event.ISelectionEvent;
+import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
+import org.eclipse.papyrus.infra.nattable.selection.event.PapyrusColumnSelectionEvent;
+import org.eclipse.papyrus.infra.nattable.selection.event.PapyrusRowSelectionEvent;
+import org.eclipse.papyrus.infra.nattable.utils.AxisUtils;
+import org.eclipse.papyrus.infra.nattable.utils.TableSelectionWrapper;
+import org.eclipse.papyrus.infra.nattable.utils.TypeSelectionEnum;
+import org.eclipse.papyrus.infra.tools.util.ListHelper;
+import org.eclipse.ui.services.IDisposable;
+
+/**
+ * The selection provider used by the table. The returned selection is used to display property views or to do the synchronization in the
+ * ModelExplorer
+ */
+public class TableSelectionProvider implements ISelectionProvider, IDisposable, ILayerListener {
+
+ /**
+ * the selection layer used in the table
+ */
+ private SelectionLayer selectionLayer;
+
+ /**
+ * the selection listener
+ */
+ private final ILayerListener selectionListener;
+
+ /**
+ * the current selection in the table
+ */
+ private ISelection currentSelection;
+
+ /**
+ * the list of listener on the selections
+ */
+ private final List<ISelectionChangedListener> listeners;
+
+ /**
+ * the table model manager to use to find selected elements
+ */
+ private INattableModelManager manager;
+
+ /**
+ * boolean indicating than the class is disposed
+ */
+ private boolean isDisposed = false;
+
+ /**
+ * Constructor.
+ *
+ * @param manager
+ * the table model manager to use to find selected elements
+ * @param selectionLayer
+ * the selection layer
+ */
+ public TableSelectionProvider(final INattableModelManager manager, final SelectionLayer selectionLayer) {
+ this.selectionLayer = selectionLayer;
+ this.selectionListener = this;
+ this.selectionLayer.addLayerListener(this.selectionListener);
+ this.currentSelection = new StructuredSelection();
+ this.listeners = new ArrayList<ISelectionChangedListener>();
+ this.manager = manager;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.jface.viewers.ISelectionProvider#addSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener)
+ */
+ @Override
+ public void addSelectionChangedListener(final ISelectionChangedListener listener) {
+ this.listeners.add(listener);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.jface.viewers.ISelectionProvider#getSelection()
+ */
+ @Override
+ public synchronized ISelection getSelection() {
+ return this.currentSelection;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.jface.viewers.ISelectionProvider#removeSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener)
+ */
+ @Override
+ public void removeSelectionChangedListener(final ISelectionChangedListener listener) {
+ this.listeners.remove(listener);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.jface.viewers.ISelectionProvider#setSelection(org.eclipse.jface.viewers.ISelection)
+ */
+ @Override
+ public synchronized void setSelection(final ISelection selection) {
+ if (this.currentSelection.equals(selection)) {
+ return;
+ }
+ this.currentSelection = selection;
+ final SelectionChangedEvent event = new SelectionChangedEvent(this, this.currentSelection);
+ for (final ISelectionChangedListener current : this.listeners) {
+ current.selectionChanged(event);
+ }
+ }
+
+ /**
+ * This allows to calculate the new selection from the event and the layer.
+ *
+ * @param event
+ * The event caught.
+ */
+ protected void calculateAndStoreNewSelection(final ILayerEvent event) {
+ // the list of the selected elements
+ Collection<Object> selection = new HashSet<Object>();
+ final ISelection newSelection;
+ if (event instanceof ISelectionEvent) {
+ TableSelectionWrapper wrapper = new TableSelectionWrapper(ListHelper.asList(this.selectionLayer.getSelectedCellPositions()), new HashMap<Integer, Object>(0), new HashMap<Integer, Object>(0));
+
+ // Get the type selection event if it is a specific selection event
+ TypeSelectionEnum typeSelectionEvent = TypeSelectionEnum.NONE;
+ boolean isWithShiftMask = false;
+ boolean isWithControlMask = false;
+
+ // Check if it is a simple cell selection event
+ if (event instanceof CellSelectionEvent) {
+ typeSelectionEvent = TypeSelectionEnum.CELL;
+ isWithShiftMask = ((CellSelectionEvent) event).isWithShiftMask();
+ isWithControlMask = ((CellSelectionEvent) event).isWithControlMask();
+ // Check if it is a column selection event
+ } else if (event instanceof PapyrusColumnSelectionEvent) {
+ typeSelectionEvent = TypeSelectionEnum.COLUMN;
+ isWithShiftMask = ((PapyrusColumnSelectionEvent) event).isWithShiftMask();
+ isWithControlMask = ((PapyrusColumnSelectionEvent) event).isWithControlMask();
+ // Check if it is a row selection event
+ } else if (event instanceof PapyrusRowSelectionEvent) {
+ typeSelectionEvent = TypeSelectionEnum.ROW;
+ isWithShiftMask = ((PapyrusRowSelectionEvent) event).isWithShiftMask();
+ isWithControlMask = ((PapyrusRowSelectionEvent) event).isWithControlMask();
+ }
+
+ // If this is a specific selection event, manage the selection with event
+ if (!TypeSelectionEnum.NONE.equals(typeSelectionEvent)) {
+ // The shift mask will be managed by adding all the selection between the previous selection and the current
+ if (isWithShiftMask) {
+ // Calculate the selection with the shift mask
+ selection = calculateSelectionWithShiftMask(wrapper, typeSelectionEvent);
+ // The control mask will be managed by adding the current selection to the previous one
+ } else if (isWithControlMask) {
+ // Calculate the selection with the control mask
+ selection = calculateSelectionWithControlMask(wrapper, typeSelectionEvent, event);
+ } else {
+ // Manage the rows and the columns selection event
+ selection = calculateSelectionRowsAndColumnsWithTypeSelectionEvent(wrapper, typeSelectionEvent, event);
+ }
+
+ } else {
+ selection = calculateSelectionRowsAndColumnsWithoutTypeSelectionEvent(wrapper, event);
+ }
+ newSelection = new TableStructuredSelection(selection.toArray(), wrapper);
+ } else {
+ newSelection = new StructuredSelection();
+ }
+ setSelection(newSelection);
+ }
+
+ /**
+ * This allows to calculate the selection when the shift key is pressed with the selection.
+ *
+ * @param wrapper
+ * The table selection wrapper to fill.è
+ * @param typeSelectionEvent
+ * The type of selection from the event (cell, row or column selection).
+ * @return The collection of object selected.
+ */
+ protected Collection<Object> calculateSelectionWithShiftMask(final TableSelectionWrapper wrapper, final TypeSelectionEnum typeSelectionEvent) {
+ // If a cell is selected with shift mask, only keep the line and column selected (the cells added with be added automatically
+ if (TypeSelectionEnum.CELL.equals(typeSelectionEvent)) {
+ if (this.currentSelection instanceof TableStructuredSelection) {
+ // Add the previous selected rows and columns to the current wrapper
+ final TableSelectionWrapper existingWrapper = (TableSelectionWrapper) ((TableStructuredSelection) currentSelection).getAdapter(TableSelectionWrapper.class);
+ wrapper.getFullySelectedRows().putAll(existingWrapper.getFullySelectedRows());
+ wrapper.getFullySelectedColumns().putAll(existingWrapper.getFullySelectedColumns());
+ }
+ // If a row is selected with shift mask, the selected rows by the layer must be the wrapper selected rows
+ } else if (TypeSelectionEnum.ROW.equals(typeSelectionEvent)) {
+ for (final int i : this.selectionLayer.getFullySelectedRowPositions()) {
+ final int rowIndex = this.selectionLayer.getRowIndexByPosition(i);
+ Object el = this.manager.getRowElement(rowIndex);
+ if (el != null) {
+ if (!wrapper.getFullySelectedRows().containsKey(rowIndex)) {
+ // Check if the column to select is corresponding to at least one cell
+ if (isSelectedCellsContainsRow(wrapper.getSelectedCells(), this.manager.getBodyLayerStack().getRowHideShowLayer().getRowPositionByIndex(rowIndex))) {
+ wrapper.getFullySelectedRows().put(Integer.valueOf(rowIndex), el);
+ }
+ }
+ }
+ }
+ // If a row is selected with shift mask, the selected rows by the layer must be the wrapper selected rows
+ } else if (TypeSelectionEnum.COLUMN.equals(typeSelectionEvent)) {
+ // TODO : Some bugs exists in nattable column selection
+ // When the bugs are resolved, we needed to be like rows shift selection
+
+ if (this.currentSelection instanceof TableStructuredSelection) {
+ // Add the previous selected rows and columns to the current wrapper
+ final TableSelectionWrapper existingWrapper = (TableSelectionWrapper) ((TableStructuredSelection) currentSelection).getAdapter(TableSelectionWrapper.class);
+ wrapper.getFullySelectedRows().putAll(existingWrapper.getFullySelectedRows());
+ wrapper.getFullySelectedColumns().putAll(existingWrapper.getFullySelectedColumns());
+ }
+
+ for (final int i : this.selectionLayer.getFullySelectedColumnPositions()) {
+ final int columnIndex = this.selectionLayer.getColumnIndexByPosition(i);
+ Object el = this.manager.getColumnElement(columnIndex);
+ if (el != null) {
+ if (!wrapper.getFullySelectedColumns().containsKey(columnIndex)) {
+ // Check if the column to select is corresponding to at least one cell
+ if (isSelectedCellsContainsColumn(wrapper.getSelectedCells(), this.manager.getBodyLayerStack().getColumnHideShowLayer().getColumnPositionByIndex(columnIndex))) {
+ wrapper.getFullySelectedColumns().put(Integer.valueOf(columnIndex), el);
+ }
+ }
+ }
+ }
+ }
+
+ return calculateSelectionFromWrapper(wrapper);
+ }
+
+ /**
+ * This allows to calculate the selection when the control key is pressed with the selection.
+ *
+ * @param wrapper
+ * The table selection wrapper to fill.
+ * @param typeSelectionEvent
+ * The type of selection from the event (cell, row or column selection).
+ * @param event
+ * The event caught.
+ * @return The collection of object selected.
+ */
+ protected Collection<Object> calculateSelectionWithControlMask(final TableSelectionWrapper wrapper, final TypeSelectionEnum typeSelectionEvent, final ILayerEvent event) {
+ if (this.currentSelection instanceof TableStructuredSelection) {
+ // Add the previous selected rows and columns to the current wrapper
+ final TableSelectionWrapper existingWrapper = (TableSelectionWrapper) ((TableStructuredSelection) currentSelection).getAdapter(TableSelectionWrapper.class);
+ wrapper.getFullySelectedRows().putAll(existingWrapper.getFullySelectedRows());
+ wrapper.getFullySelectedColumns().putAll(existingWrapper.getFullySelectedColumns());
+ }
+
+ // If a cell is selected by the control and was already selected, remove it and remove the selected row and column
+ if (TypeSelectionEnum.CELL.equals(typeSelectionEvent)) {
+ final int columnPosition = ((CellSelectionEvent) event).getColumnPosition();
+ final int rowPosition = ((CellSelectionEvent) event).getRowPosition();
+ final PositionCoordinate tmpCoordinate = new PositionCoordinate(selectionLayer, columnPosition, rowPosition);
+
+ // Check if the cell was unselected
+ if (!wrapper.getSelectedCells().contains(tmpCoordinate)) {
+ if (wrapper.getFullySelectedRows().containsKey(rowPosition)) {
+ wrapper.getFullySelectedRows().remove(rowPosition);
+ }
+ if (wrapper.getFullySelectedColumns().containsKey(columnPosition)) {
+ wrapper.getFullySelectedColumns().remove(columnPosition);
+ }
+ }
+ } else {
+ calculateSelectionRowsAndColumnsWithTypeSelectionEvent(wrapper, typeSelectionEvent, event);
+ }
+
+ return calculateSelectionFromWrapper(wrapper);
+ }
+
+ /**
+ * This allows to calculate the selection for rows and columns (cells already added to the wrapper).
+ *
+ * @param wrapper
+ * The table selection wrapper to fill.
+ * @param typeSelectionEvent
+ * The type of selection from the event (cell, row or column selection).
+ * @param event
+ * The event caught.
+ * @return The collection of object selected.
+ */
+ protected Collection<Object> calculateSelectionRowsAndColumnsWithTypeSelectionEvent(final TableSelectionWrapper wrapper, final TypeSelectionEnum typeSelectionEvent, final ILayerEvent event) {
+ // Manage the column selection event
+ if (TypeSelectionEnum.COLUMN.equals(typeSelectionEvent)) {
+ for (Range range : ((PapyrusColumnSelectionEvent) event).getColumnPositionRanges()) {
+ for (int index = range.start; index < range.end; index++) {
+ final int columnIndex = this.selectionLayer.getColumnIndexByPosition(index);
+ Object el = this.manager.getColumnElement(columnIndex);
+ if (wrapper.getFullySelectedColumns().containsKey(index)) {
+ // The selected column was only selected, so it need to be removed
+ wrapper.getFullySelectedColumns().remove(columnIndex);
+ } else if (el != null) {
+ // Check if the column to select is corresponding to at least one cell
+ if (isSelectedCellsContainsColumn(wrapper.getSelectedCells(), this.manager.getBodyLayerStack().getColumnHideShowLayer().getColumnPositionByIndex(columnIndex))) {
+ // The selected column was not already in selection, add it
+ wrapper.getFullySelectedColumns().put(Integer.valueOf(columnIndex), el);
+ }
+ }
+ }
+ }
+ // Manage the row selection event
+ } else if (TypeSelectionEnum.ROW.equals(typeSelectionEvent)) {
+ for (Range range : ((PapyrusRowSelectionEvent) event).getRowPositionRanges()) {
+ for (int index = range.start; index < range.end; index++) {
+ final int rowIndex = this.selectionLayer.getRowIndexByPosition(index);
+ Object el = this.manager.getRowElement(rowIndex);
+ if (wrapper.getFullySelectedRows().containsKey(index)) {
+ // The selected row was only selected, so it need to be removed
+ wrapper.getFullySelectedRows().remove(rowIndex);
+ } else if (el != null) {
+ // Check if the row to select is corresponding to at least one cell
+ if (isSelectedCellsContainsRow(wrapper.getSelectedCells(), this.manager.getBodyLayerStack().getRowHideShowLayer().getRowPositionByIndex(rowIndex))) {
+ // The selected row was not already in selection, add it
+ wrapper.getFullySelectedRows().put(Integer.valueOf(rowIndex), el);
+ }
+ }
+ }
+ }
+ }
+
+ return calculateSelectionFromWrapper(wrapper);
+ }
+
+ /**
+ * This allows to determinate if the row index to add to the rows selected have at least one of its cells in the selected cells.
+ *
+ * @param selectedCells
+ * The selected cells.
+ * @param rowIndex
+ * The row index to search.
+ * @return <code>true</code> if the row corresponding to at least one cell, <code>false</code> otherwise.
+ */
+ private boolean isSelectedCellsContainsRow(final Collection<PositionCoordinate> selectedCells, final int rowIndex) {
+ boolean result = false;
+
+ Iterator<PositionCoordinate> selectedCellsIterator = selectedCells.iterator();
+ while (!result && selectedCellsIterator.hasNext()) {
+ final PositionCoordinate selectedCell = selectedCellsIterator.next();
+ if (selectedCell.getRowPosition() == rowIndex) {
+ result = true;
+ }
+ }
+
+ return result;
+ }
+
+ /**
+ * This allows to determinate if the column index to add to the columns selected have at least one of its cells in the selected cells.
+ *
+ * @param selectedCells
+ * The selected cells.
+ * @param columnIndex
+ * The column index to search.
+ * @return <code>true</code> if the column corresponding to at least one cell, <code>false</code> otherwise.
+ */
+ private boolean isSelectedCellsContainsColumn(final Collection<PositionCoordinate> selectedCells, final int columnIndex) {
+ boolean result = false;
+
+ Iterator<PositionCoordinate> selectedCellsIterator = selectedCells.iterator();
+ while (!result && selectedCellsIterator.hasNext()) {
+ final PositionCoordinate selectedCell = selectedCellsIterator.next();
+ if (selectedCell.getColumnPosition() == columnIndex) {
+ result = true;
+ }
+ }
+
+ return result;
+ }
+
+ /**
+ * This allows to calculate the selected objects from the wrapper filled.
+ *
+ * @param wrapper
+ * The wrapper filled.
+ * @return The collection of object selected.
+ */
+ protected Collection<Object> calculateSelectionFromWrapper(final TableSelectionWrapper wrapper) {
+ final Collection<Object> selection = new ArrayList<Object>();
+
+ // Fill the selection list with the selected columns
+ final List<Integer> selectedColumnsIndexes = new ArrayList<Integer>();
+ for (final Entry<Integer, Object> selectedColumn : wrapper.getFullySelectedColumns().entrySet()) {
+ final Object selectedObject = AxisUtils.getRepresentedElement(selectedColumn.getValue());
+ selection.add(selectedObject);
+ selectedColumnsIndexes.add(selectedColumn.getKey());
+ }
+ // Fill the selection list with the selected rows
+ final List<Integer> selectedRowsIndexes = new ArrayList<Integer>();
+ for (final Entry<Integer, Object> selectedRow : wrapper.getFullySelectedRows().entrySet()) {
+ final Object selectedObject = AxisUtils.getRepresentedElement(selectedRow.getValue());
+ selection.add(selectedObject);
+ selectedRowsIndexes.add(selectedRow.getKey());
+ }
+ // Fill the selection list with the selected cells
+ for (final PositionCoordinate cellLocation : wrapper.getSelectedCells()) {
+ final int colPos = cellLocation.getColumnPosition();
+ final int rowPos = cellLocation.getRowPosition();
+ if (!selectedColumnsIndexes.contains(new Integer(this.selectionLayer.getColumnIndexByPosition(colPos))) && !selectedRowsIndexes.contains(new Integer(this.selectionLayer.getRowIndexByPosition(rowPos)))) {
+ final ILayerCell cell = this.selectionLayer.getCellByPosition(colPos, rowPos);
+ if (cell != null) {
+ final Object value = cell.getDataValue();
+ if (value != null) {
+ if (value instanceof Collection<?>) {
+ final Iterator<?> iter = ((Collection<?>) value).iterator();
+ while (iter.hasNext()) {
+ final Object current = iter.next();
+ selection.add(current);
+ }
+ } else {
+ selection.add(value);
+ }
+ }else{
+ // Bug 481817 : When the value is null, we need to have the cell selection, so add the cell as selection instead of value
+ selection.add(cell);
+ }
+ }
+ }
+ }
+
+ return selection;
+ }
+
+ /**
+ * This allows to manage the selection when any type of selection was done (cell, row or column selection from the selection event).
+ *
+ * @param wrapper
+ * The wrapper to fill.
+ * @param event
+ * The event caught.
+ * @return The collection of object selected.
+ */
+ protected Collection<Object> calculateSelectionRowsAndColumnsWithoutTypeSelectionEvent(final TableSelectionWrapper wrapper, final ILayerEvent event) {
+ final Collection<Object> selection = new ArrayList<Object>();
+
+ // we are not able to distinguish the 2 ways to select a full axis :
+ // - first way : clicking on axis header
+ // - second way : clicking on first cell of the axis, Pressing SHIFT, clicking on the last cell of the axis (or selecting each cell of the axis pressing CTRL)
+ // so we are not able to know if the user want to select the element represented by the axis OR all values displayed on the axis, without the element represented by the axis
+ // we decided to implements this behavior for all kind of selection event :
+ // 1- we add in the selection elements represented by fully selected rows
+ // 2- we add in the selection elements represented by fully selected columns
+ // 3- we add in the selection the contents of selected cell which are not included in the fully selected axis
+
+ final List<Integer> selectedRowsIndexes = new ArrayList<Integer>();
+ for (int i : this.selectionLayer.getFullySelectedRowPositions()) {
+ int rowIndex = this.selectionLayer.getRowIndexByPosition(i);
+ selectedRowsIndexes.add(new Integer(rowIndex));
+ Object el = this.manager.getRowElement(rowIndex);
+ if (el != null) {
+ wrapper.getFullySelectedRows().put(Integer.valueOf(rowIndex), el);
+ el = AxisUtils.getRepresentedElement(el);
+ selection.add(el);
+ }
+ }
+ final List<Integer> selectedColumnsIndexes = new ArrayList<Integer>();
+ for (int i : this.selectionLayer.getFullySelectedColumnPositions()) {
+ int columnIndex = this.selectionLayer.getColumnIndexByPosition(i);
+ selectedColumnsIndexes.add(new Integer(columnIndex));
+ Object el = this.manager.getColumnElement(columnIndex);
+ if (el != null) {
+ wrapper.getFullySelectedColumns().put(Integer.valueOf(columnIndex), el);
+ el = AxisUtils.getRepresentedElement(el);
+ selection.add(el);
+ }
+ }
+
+ for (final PositionCoordinate cellLocation : wrapper.getSelectedCells()) {
+ final int colPos = cellLocation.getColumnPosition();
+ final int rowPos = cellLocation.getRowPosition();
+ if (!selectedColumnsIndexes.contains(new Integer(this.selectionLayer.getColumnIndexByPosition(colPos))) && !selectedRowsIndexes.contains(new Integer(this.selectionLayer.getRowIndexByPosition(rowPos)))) {
+ final ILayerCell cell = this.selectionLayer.getCellByPosition(colPos, rowPos);
+ if (cell != null) {
+ final Object value = cell.getDataValue();
+ if (value != null) {
+ if (value instanceof Collection<?>) {
+ final Iterator<?> iter = ((Collection<?>) value).iterator();
+ while (iter.hasNext()) {
+ final Object current = iter.next();
+ selection.add(current);
+ }
+ } else {
+ selection.add(value);
+ }
+ }else{
+ // Bug 481817 : When the value is null, we need to have the cell selection, so add the cell as selection instead of value
+ selection.add(cell);
+ }
+ }
+ }
+ }
+
+ return selection;
+ }
+
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.ui.services.IDisposable#dispose()
+ */
+ @Override
+ public void dispose() {
+ this.isDisposed = true;
+ this.manager = null;
+ // To be sure, to fix the bug 469376: [Table] Memory Leak : (Tree)NattableWidgetManager, EObjectTreeItemAxis and others objects are not disposed when the table is closed
+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=469376
+ setSelection(StructuredSelection.EMPTY);
+
+ if (this.selectionLayer != null) {
+ this.selectionLayer.removeLayerListener(this.selectionListener);
+ this.selectionLayer = null;
+ }
+ this.listeners.clear();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.nebula.widgets.nattable.layer.ILayerListener#handleLayerEvent(org.eclipse.nebula.widgets.nattable.layer.event.ILayerEvent)
+ */
+ @Override
+ public void handleLayerEvent(final ILayerEvent event) {
+ if (!isDisposed && event instanceof ISelectionEvent) {
+ calculateAndStoreNewSelection(event);
+ }
+ }
+}
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/selection/PapyrusSelectColumnCommandHandler.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/selection/PapyrusSelectColumnCommandHandler.java
new file mode 100644
index 00000000000..fe1c105ebf1
--- /dev/null
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/selection/PapyrusSelectColumnCommandHandler.java
@@ -0,0 +1,161 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.nattable.selection;
+
+import static org.eclipse.nebula.widgets.nattable.selection.SelectionUtils.bothShiftAndControl;
+import static org.eclipse.nebula.widgets.nattable.selection.SelectionUtils.isControlOnly;
+import static org.eclipse.nebula.widgets.nattable.selection.SelectionUtils.isShiftOnly;
+import static org.eclipse.nebula.widgets.nattable.selection.SelectionUtils.noShiftOrControl;
+
+import org.eclipse.nebula.widgets.nattable.layer.ILayer;
+import org.eclipse.nebula.widgets.nattable.selection.SelectColumnCommandHandler;
+import org.eclipse.nebula.widgets.nattable.selection.command.SelectColumnCommand;
+import org.eclipse.papyrus.infra.nattable.layer.PapyrusSelectionLayer;
+import org.eclipse.papyrus.infra.nattable.selection.event.PapyrusColumnSelectionEvent;
+import org.eclipse.swt.graphics.Rectangle;
+
+/**
+ * The select column command handler extended from the select column command handler (from natable) to manage th papyrus column selection event.
+ */
+public class PapyrusSelectColumnCommandHandler extends SelectColumnCommandHandler {
+
+ /**
+ * The papyrus selection layer.
+ */
+ protected final PapyrusSelectionLayer selectionLayer;
+
+ /**
+ * Constructor.
+ *
+ * @param selectionLayer
+ * The selection layer.
+ */
+ public PapyrusSelectColumnCommandHandler(final PapyrusSelectionLayer selectionLayer) {
+ super(selectionLayer);
+ this.selectionLayer = selectionLayer;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.nebula.widgets.nattable.selection.SelectColumnCommandHandler#doCommand(org.eclipse.nebula.widgets.nattable.layer.ILayer, org.eclipse.nebula.widgets.nattable.selection.command.SelectColumnCommand)
+ */
+ @Override
+ public boolean doCommand(final ILayer targetLayer, final SelectColumnCommand command) {
+ if (command.convertToTargetLayer(this.selectionLayer)) {
+ selectColumn(command.getColumnPosition(), command.getRowPosition(),
+ command.isWithShiftMask(), command.isWithControlMask());
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.nebula.widgets.nattable.selection.SelectColumnCommandHandler#selectColumn(int, int, boolean, boolean)
+ */
+ @Override
+ protected void selectColumn(final int columnPosition, final int rowPosition,
+ boolean withShiftMask, boolean withControlMask) {
+ if (noShiftOrControl(withShiftMask, withControlMask)) {
+ this.selectionLayer.clear(false);
+ this.selectionLayer.selectCell(columnPosition, 0, false, false);
+ this.selectionLayer
+ .selectRegion(columnPosition, 0, 1, Integer.MAX_VALUE);
+ this.selectionLayer.moveSelectionAnchor(columnPosition, rowPosition);
+ } else if (bothShiftAndControl(withShiftMask, withControlMask)) {
+ selectColumnWithShiftKey(columnPosition);
+ } else if (isShiftOnly(withShiftMask, withControlMask)) {
+ selectColumnWithShiftKey(columnPosition);
+ } else if (isControlOnly(withShiftMask, withControlMask)) {
+ selectColumnWithCtrlKey(columnPosition, rowPosition);
+ }
+
+ // Set last selected column position to the recently clicked column
+ this.selectionLayer.setLastSelectedCell(columnPosition, rowPosition);
+
+ this.selectionLayer.fireLayerEvent(new PapyrusColumnSelectionEvent(this.selectionLayer,
+ columnPosition, withShiftMask, withControlMask));
+ }
+
+ /**
+ * This allows to select the columns with the Control key.
+ *
+ * @param columnPosition
+ * The column position.
+ * @param rowPosition
+ * The row position
+ */
+ private void selectColumnWithCtrlKey(final int columnPosition, final int rowPosition) {
+ Rectangle selectedColumnRectangle = new Rectangle(columnPosition, 0, 1,
+ Integer.MAX_VALUE);
+
+ if (this.selectionLayer.isColumnPositionFullySelected(columnPosition)) {
+ this.selectionLayer.clearSelection(selectedColumnRectangle);
+ if (this.selectionLayer.getLastSelectedRegion() != null
+ && this.selectionLayer.getLastSelectedRegion().equals(
+ selectedColumnRectangle)) {
+ this.selectionLayer.setLastSelectedRegion(null);
+ }
+ } else {
+ if (this.selectionLayer.getLastSelectedRegion() != null) {
+ this.selectionLayer.getSelectionModel().addSelection(new Rectangle(
+ this.selectionLayer.getLastSelectedRegion().x,
+ this.selectionLayer.getLastSelectedRegion().y,
+ this.selectionLayer.getLastSelectedRegion().width,
+ this.selectionLayer.getLastSelectedRegion().height));
+ }
+ this.selectionLayer
+ .selectRegion(columnPosition, 0, 1, Integer.MAX_VALUE);
+ this.selectionLayer.moveSelectionAnchor(columnPosition, rowPosition);
+ }
+ }
+
+ /**
+ * This allows to select the columns with the shift key.
+ *
+ * @param columnPosition
+ * The column position
+ */
+ private void selectColumnWithShiftKey(final int columnPosition) {
+ int numOfColumnsToIncludeInRegion = 1;
+ int startColumnPosition = columnPosition;
+
+ // if multiple selection is disabled, we need to ensure to only select
+ // the current columnPosition
+ // modifying the selection anchor here ensures that the anchor also
+ // moves
+ if (!this.selectionLayer.getSelectionModel().isMultipleSelectionAllowed()) {
+ this.selectionLayer.getSelectionAnchor().columnPosition = columnPosition;
+ }
+
+ if (this.selectionLayer.getLastSelectedRegion() != null) {
+
+ // Negative when we move left, but we are only concerned with the
+ // num. of columns
+ numOfColumnsToIncludeInRegion = Math.abs(this.selectionLayer
+ .getSelectionAnchor().columnPosition - columnPosition) + 1;
+
+ // Select to the Left
+ if (columnPosition < this.selectionLayer.getSelectionAnchor().columnPosition) {
+ startColumnPosition = columnPosition;
+ } else {
+ startColumnPosition = this.selectionLayer.getSelectionAnchor().columnPosition;
+ }
+ }
+ this.selectionLayer.selectRegion(startColumnPosition, 0,
+ numOfColumnsToIncludeInRegion, Integer.MAX_VALUE);
+ }
+}
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/selection/PapyrusSelectRowCommandHandler.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/selection/PapyrusSelectRowCommandHandler.java
new file mode 100644
index 00000000000..237bb10671e
--- /dev/null
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/selection/PapyrusSelectRowCommandHandler.java
@@ -0,0 +1,235 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.nattable.selection;
+
+import static org.eclipse.nebula.widgets.nattable.selection.SelectionUtils.bothShiftAndControl;
+import static org.eclipse.nebula.widgets.nattable.selection.SelectionUtils.isControlOnly;
+import static org.eclipse.nebula.widgets.nattable.selection.SelectionUtils.isShiftOnly;
+import static org.eclipse.nebula.widgets.nattable.selection.SelectionUtils.noShiftOrControl;
+
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Set;
+
+import org.eclipse.nebula.widgets.nattable.coordinate.Range;
+import org.eclipse.nebula.widgets.nattable.layer.ILayer;
+import org.eclipse.nebula.widgets.nattable.selection.SelectRowCommandHandler;
+import org.eclipse.nebula.widgets.nattable.selection.SelectionLayer;
+import org.eclipse.nebula.widgets.nattable.selection.command.SelectRowsCommand;
+import org.eclipse.papyrus.infra.nattable.layer.PapyrusSelectionLayer;
+import org.eclipse.papyrus.infra.nattable.selection.event.PapyrusRowSelectionEvent;
+import org.eclipse.swt.graphics.Rectangle;
+
+/**
+ * The select row command handler extended from the select row command handler (from natable) to manage th papyrus row selection event.
+ */
+public class PapyrusSelectRowCommandHandler extends SelectRowCommandHandler {
+
+ /**
+ * The papyrus selection layer.
+ */
+ private final PapyrusSelectionLayer selectionLayer;
+
+ /**
+ * Constructor.
+ *
+ * @param selectionLayer
+ * The selection layer.
+ */
+ public PapyrusSelectRowCommandHandler(final PapyrusSelectionLayer selectionLayer) {
+ super(selectionLayer);
+ this.selectionLayer = selectionLayer;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.nebula.widgets.nattable.selection.SelectRowCommandHandler#doCommand(org.eclipse.nebula.widgets.nattable.layer.ILayer, org.eclipse.nebula.widgets.nattable.selection.command.SelectRowsCommand)
+ */
+ @Override
+ public boolean doCommand(final ILayer targetLayer, final SelectRowsCommand command) {
+ if (command.convertToTargetLayer(this.selectionLayer)) {
+ selectRows(
+ command.getColumnPosition(),
+ command.getRowPositions(),
+ command.isWithShiftMask(),
+ command.isWithControlMask(),
+ command.getRowPositionToMoveIntoViewport());
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.nebula.widgets.nattable.selection.SelectRowCommandHandler#selectRows(int, java.util.Collection, boolean, boolean, int)
+ */
+ protected void selectRows(
+ final int columnPosition, Collection<Integer> rowPositions,
+ final boolean withShiftMask, final boolean withControlMask,
+ final int rowPositionToMoveIntoViewport) {
+
+ Set<Range> changedRowRanges = new HashSet<Range>();
+
+ for (int rowPosition : rowPositions) {
+ changedRowRanges.addAll(
+ internalSelectRow(
+ columnPosition, rowPosition,
+ withShiftMask, withControlMask));
+ }
+
+ Set<Integer> changedRows = new HashSet<Integer>();
+ for (Range range : changedRowRanges) {
+ for (int i = range.start; i < range.end; i++) {
+ changedRows.add(Integer.valueOf(i));
+ }
+ }
+ this.selectionLayer.fireLayerEvent(
+ new PapyrusRowSelectionEvent(
+ this.selectionLayer, changedRows, rowPositionToMoveIntoViewport, withShiftMask, withControlMask));
+ }
+
+ /**
+ * Delegates the selection operations to execute regarding the state
+ * modifier keys.
+ *
+ * @param columnPosition
+ * The column position of the {@link SelectRowsCommand}.
+ * @param rowPositions
+ * The row position of the {@link SelectRowsCommand}.
+ * @param withShiftMask
+ * The shift mask information of the {@link SelectRowsCommand}.
+ * @param withControlMask
+ * The control mask information of the {@link SelectRowsCommand}.
+ * @return The changed selection.
+ */
+ private Set<Range> internalSelectRow(
+ final int columnPosition, final int rowPosition,
+ final boolean withShiftMask, final boolean withControlMask) {
+
+ Set<Range> changedRowRanges = new HashSet<Range>();
+
+ if (noShiftOrControl(withShiftMask, withControlMask)) {
+ changedRowRanges.addAll(this.selectionLayer.getSelectedRowPositions());
+ this.selectionLayer.clear(false);
+ this.selectionLayer.selectCell(0, rowPosition, withShiftMask, withControlMask);
+ this.selectionLayer.selectRegion(0, rowPosition, Integer.MAX_VALUE, 1);
+ this.selectionLayer.moveSelectionAnchor(columnPosition, rowPosition);
+ changedRowRanges.add(new Range(rowPosition, rowPosition + 1));
+ } else if (bothShiftAndControl(withShiftMask, withControlMask)) {
+ changedRowRanges.add(selectRowWithShiftKey(columnPosition, rowPosition));
+ } else if (isShiftOnly(withShiftMask, withControlMask)) {
+ changedRowRanges.add(selectRowWithShiftKey(columnPosition, rowPosition));
+ } else if (isControlOnly(withShiftMask, withControlMask)) {
+ changedRowRanges.add(selectRowWithCtrlKey(columnPosition, rowPosition));
+ }
+
+ this.selectionLayer.setLastSelectedCell(columnPosition, rowPosition);
+
+ return changedRowRanges;
+ }
+
+ /**
+ * Performs selection operations with pressed CTRL modifier.
+ *
+ * @param columnPosition
+ * The column position of the {@link SelectRowsCommand}. Needed
+ * to move the selection anchor.
+ * @param rowPositions
+ * The row position of the {@link SelectRowsCommand}.
+ * @return The changed selection.
+ */
+ private Range selectRowWithCtrlKey(final int columnPosition, final int rowPosition) {
+ Rectangle selectedRowRectangle = new Rectangle(0, rowPosition, Integer.MAX_VALUE, 1);
+
+ if (this.selectionLayer.isRowPositionFullySelected(rowPosition)) {
+ this.selectionLayer.clearSelection(selectedRowRectangle);
+ this.selectionLayer.setLastSelectedRegion(null);
+
+ // if there is still a row selected but no selection anchor, we
+ // need to set one for a consistent state
+ int[] selectedRows = this.selectionLayer.getFullySelectedRowPositions();
+ if (selectedRows.length > 0
+ && this.selectionLayer.getSelectionAnchor().rowPosition == SelectionLayer.NO_SELECTION) {
+
+ // determine row to move the anchor to
+ int toPos = selectedRows[0];
+ for (int i = 0; i < selectedRows.length; i++) {
+ if (selectedRows[i] < rowPosition) {
+ toPos = selectedRows[i];
+ } else {
+ break;
+ }
+ }
+ this.selectionLayer.moveSelectionAnchor(columnPosition, toPos);
+ }
+ } else {
+ // Preserve last selected region
+ if (this.selectionLayer.getLastSelectedRegion() != null) {
+ this.selectionLayer.selectRegion(
+ this.selectionLayer.getLastSelectedRegion().x,
+ this.selectionLayer.getLastSelectedRegion().y,
+ this.selectionLayer.getLastSelectedRegion().width,
+ this.selectionLayer.getLastSelectedRegion().height);
+ }
+ this.selectionLayer.selectRegion(0, rowPosition, Integer.MAX_VALUE, 1);
+ this.selectionLayer.moveSelectionAnchor(columnPosition, rowPosition);
+ }
+
+ return new Range(rowPosition, rowPosition + 1);
+ }
+
+ /**
+ * Performs selection operations with pressed SHIFT modifier.
+ *
+ * @param columnPosition
+ * The column position of the {@link SelectRowsCommand}. Needed
+ * to move the selection anchor.
+ * @param rowPositions
+ * The row position of the {@link SelectRowsCommand}.
+ * @return The changed selection.
+ */
+ private Range selectRowWithShiftKey(final int columnPosition, final int rowPosition) {
+ int numOfRowsToIncludeInRegion = 1;
+ int startRowPosition = rowPosition;
+
+ // as this method will return the whole range based on the selection
+ // anchor and the clicked position, we clear the selection prior adding
+ // the newly calculated selection.
+ this.selectionLayer.getSelectionModel().clearSelection();
+
+ // if multiple selection is disabled, we need to ensure to only moving
+ // the selection anchor
+ if (!this.selectionLayer.getSelectionModel().isMultipleSelectionAllowed()) {
+ this.selectionLayer.moveSelectionAnchor(columnPosition, rowPosition);
+ }
+
+ if (this.selectionLayer.getLastSelectedRegion() != null) {
+ numOfRowsToIncludeInRegion = Math.abs(this.selectionLayer.getSelectionAnchor().rowPosition - rowPosition) + 1;
+ if (startRowPosition < this.selectionLayer.getSelectionAnchor().rowPosition) {
+ // Selecting above
+ startRowPosition = rowPosition;
+ } else {
+ // Selecting below
+ startRowPosition = this.selectionLayer.getSelectionAnchor().rowPosition;
+ }
+ }
+ this.selectionLayer.selectRegion(
+ 0, startRowPosition, Integer.MAX_VALUE, numOfRowsToIncludeInRegion);
+
+ return new Range(startRowPosition, startRowPosition + numOfRowsToIncludeInRegion);
+ }
+
+}
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/selection/event/PapyrusColumnSelectionEvent.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/selection/event/PapyrusColumnSelectionEvent.java
new file mode 100644
index 00000000000..400a3767600
--- /dev/null
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/selection/event/PapyrusColumnSelectionEvent.java
@@ -0,0 +1,81 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.nattable.selection.event;
+
+import org.eclipse.nebula.widgets.nattable.selection.SelectionLayer;
+import org.eclipse.nebula.widgets.nattable.selection.event.ColumnSelectionEvent;
+
+/**
+ * The column selection event extended from column selection event (of nattable) to include the shift and the control masks.
+ */
+public class PapyrusColumnSelectionEvent extends ColumnSelectionEvent {
+
+ /**
+ * The shift mask used.
+ */
+ private boolean withShiftMask = false;
+
+ /**
+ * The control mask used.
+ */
+ private boolean withControlMask = false;
+
+ /**
+ * Constructor.
+ *
+ * @param selectionLayer
+ * The selection layer.
+ * @param columnPosition
+ * The column position.
+ * @param withShiftMask
+ * The shift mask used.
+ * @param withControlMask
+ * The control mask used.
+ */
+ public PapyrusColumnSelectionEvent(final SelectionLayer selectionLayer, final int columnPosition, final boolean withShiftMask, final boolean withControlMask) {
+ super(selectionLayer, columnPosition);
+ this.withShiftMask = withShiftMask;
+ this.withControlMask = withControlMask;
+ }
+
+ /**
+ * Constructor by copy.
+ *
+ * @param event
+ * The event to copy.
+ */
+ protected PapyrusColumnSelectionEvent(final PapyrusColumnSelectionEvent event) {
+ super(event);
+ this.withShiftMask = event.withShiftMask;
+ this.withControlMask = event.withControlMask;
+ }
+
+ /**
+ * Returns if the shift mask is used.
+ *
+ * @return <code>true</code> if the shift mask is used, <code>false</code> otherwise.
+ */
+ public boolean isWithShiftMask() {
+ return this.withShiftMask;
+ }
+
+ /**
+ * Returns if the control mask is used.
+ *
+ * @return <code>true</code> if the control mask is used, <code>false</code> otherwise.
+ */
+ public boolean isWithControlMask() {
+ return this.withControlMask;
+ }
+}
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/selection/event/PapyrusRowSelectionEvent.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/selection/event/PapyrusRowSelectionEvent.java
new file mode 100644
index 00000000000..2e80ace33c3
--- /dev/null
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/selection/event/PapyrusRowSelectionEvent.java
@@ -0,0 +1,85 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.nattable.selection.event;
+
+import java.util.Collection;
+
+import org.eclipse.nebula.widgets.nattable.selection.SelectionLayer;
+import org.eclipse.nebula.widgets.nattable.selection.event.RowSelectionEvent;
+
+/**
+ * The row selection event extended from row selection event (of nattable) to include the shift and the control masks.
+ */
+public class PapyrusRowSelectionEvent extends RowSelectionEvent {
+
+ /**
+ * The shift mask used.
+ */
+ private boolean withShiftMask = false;
+
+ /**
+ * The control mask used.
+ */
+ private boolean withControlMask = false;
+
+ /**
+ * Constructor.
+ *
+ * @param selectionLayer
+ * The selection layer.
+ * @param rowPositions
+ * The row positions.
+ * @param rowPositionToMoveIntoViewport
+ * The row position to move into viewport.
+ * @param withShiftMask
+ * The shift mask used.
+ * @param withControlMask
+ * The control mask used.
+ */
+ public PapyrusRowSelectionEvent(final SelectionLayer selectionLayer, final Collection<Integer> rowPositions, final int rowPositionToMoveIntoViewport, final boolean withShiftMask, final boolean withControlMask) {
+ super(selectionLayer, rowPositions, rowPositionToMoveIntoViewport);
+ this.withShiftMask = withShiftMask;
+ this.withControlMask = withControlMask;
+ }
+
+ /**
+ * Constructor by copy.
+ *
+ * @param event
+ * The event to copy.
+ */
+ protected PapyrusRowSelectionEvent(final PapyrusRowSelectionEvent event) {
+ super(event);
+ this.withShiftMask = event.withShiftMask;
+ this.withControlMask = event.withControlMask;
+ }
+
+ /**
+ * Returns if the shift mask is used.
+ *
+ * @return <code>true</code> if the shift mask is used, <code>false</code> otherwise.
+ */
+ public boolean isWithShiftMask() {
+ return this.withShiftMask;
+ }
+
+ /**
+ * Returns if the control mask is used.
+ *
+ * @return <code>true</code> if the control mask is used, <code>false</code> otherwise.
+ */
+ public boolean isWithControlMask() {
+ return this.withControlMask;
+ }
+}
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/AbstractPasteInsertInTableHandler.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/AbstractPasteInsertInTableHandler.java
new file mode 100644
index 00000000000..3068653f5ef
--- /dev/null
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/AbstractPasteInsertInTableHandler.java
@@ -0,0 +1,127 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.nattable.utils;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.jface.dialogs.ErrorDialog;
+import org.eclipse.papyrus.infra.nattable.dialog.PasteImportStatusDialog;
+import org.eclipse.papyrus.infra.nattable.handler.AbstractTableHandler;
+import org.eclipse.papyrus.infra.nattable.messages.Messages;
+import org.eclipse.papyrus.infra.widgets.Activator;
+import org.eclipse.papyrus.infra.widgets.util.ImageConstants;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+
+/**
+ * The abstract handler for the paste and insert handler.
+ */
+public abstract class AbstractPasteInsertInTableHandler extends AbstractTableHandler {
+
+ /**
+ * The variable name to determinate if the final dialog must be opened at the end of the paste.
+ */
+ public static final String OPEN_DIALOG_ON_FAIL_BOOLEAN_PARAMETER = "openDialogOnFail"; //$NON-NLS-1$
+
+ /**
+ * The variable name to determinate if the paste action must use the progress monitor;
+ */
+ public static final String OPEN__PROGRESS_MONITOR_DIALOG = "openProgressMonitorDialog"; //$NON-NLS-1$
+
+ /**
+ * The variable name to determinate the preferred user action to use for the row insert action when he is not determinate.
+ */
+ public static final String USER_ACTION__PREFERRED_USER_ACTION = "preferredUserAction"; //$NON-NLS-1$
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+ */
+ @Override
+ public abstract Object execute(ExecutionEvent event) throws ExecutionException;
+
+ /**
+ * This allows to display the error message when this is a paste configuration error type.
+ *
+ * @param result
+ * the result status of the paste process
+ */
+ protected void displayDialog(final IStatus result) {
+ if (null != result) {
+ // If the error is caracterized by the paste configuration error status, use the dialog concerning the paste configuration error
+ if (isPasteConfigurationStatus(result)) {
+ new PasteImportStatusDialog(Display.getDefault().getActiveShell(), result).open();
+ // If this is not a paste configuration error status, open an error status to display the problem
+ } else if (IStatus.OK != result.getSeverity()) {
+ String messageDialog = null;
+ switch (result.getSeverity()) {
+ case IStatus.INFO:
+ messageDialog = Messages.PasteInTableHandler_PasteInformation;
+ break;
+ case IStatus.WARNING:
+ messageDialog = Messages.PasteInTableHandler_PasteWarning;
+ break;
+ case IStatus.ERROR:
+ messageDialog = Messages.PasteInTableHandler_PasteError;
+ break;
+ case IStatus.CANCEL:
+ messageDialog = Messages.PasteInTableHandler_PasteCancelled;
+ break;
+ }
+
+ final ErrorDialog errorDialog = new ErrorDialog(Display.getDefault().getActiveShell(), Messages.PasteImportStatusDialog_ImportPasteDialogTitle, messageDialog, result, IStatus.OK
+ | IStatus.INFO | IStatus.WARNING | IStatus.ERROR) {
+
+ /**
+ * Redefine this method to manage the papyrus icon in shell.
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.jface.dialogs.ErrorDialog#configureShell(org.eclipse.swt.widgets.Shell)
+ */
+ @Override
+ protected void configureShell(Shell shell) {
+ super.configureShell(shell);
+ shell.setImage(Activator.getDefault().getImage(ImageConstants.PAPYRUS_ICON_PATH));
+ }
+ };
+ errorDialog.open();
+ }
+ }
+ }
+
+ /**
+ * This allows to determinate if the status is a paste configuration error status.
+ *
+ * @param status
+ * the status
+ * @return <code>true </code> if the status is a paste configuration error status, <code>false</code> otherwise.
+ */
+ protected boolean isPasteConfigurationStatus(final IStatus status) {
+ boolean result = false;
+ switch (status.getSeverity()) {
+ case IPapyrusNattableStatus.PASTE_CONFIGURATiON_INFO:
+ case IPapyrusNattableStatus.PASTE_CONFIGURATiON_WARNING:
+ case IPapyrusNattableStatus.PASTE_CONFIGURATiON_ERROR:
+ result = true;
+ break;
+ default:
+ result = false;
+ break;
+ }
+ return result;
+ }
+
+}
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/ExtendedCompoundCommand.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/ExtendedCompoundCommand.java
new file mode 100644
index 00000000000..dbae8c2d0f8
--- /dev/null
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/ExtendedCompoundCommand.java
@@ -0,0 +1,85 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.nattable.utils;
+
+import java.util.ListIterator;
+
+import org.eclipse.emf.common.CommonPlugin;
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.command.CompoundCommand;
+import org.eclipse.emf.common.util.WrappedException;
+import org.eclipse.papyrus.commands.wrappers.GMFtoEMFCommandWrapper;
+
+/**
+ * This allow to manage th execution of command if not already executed.
+ */
+public class ExtendedCompoundCommand extends CompoundCommand {
+
+ public ExtendedCompoundCommand(String label){
+ super(label);
+ }
+
+ /**
+ * @see org.eclipse.emf.common.command.CompoundCommand#execute()
+ *
+ */
+ @Override
+ public void execute() {
+ for (ListIterator<Command> commands = commandList.listIterator(); commands.hasNext(); )
+ {
+ try
+ {
+ Command command = commands.next();
+ if(!(command instanceof GMFtoEMFCommandWrapper)){
+ command.execute();
+ }else if(null == ((GMFtoEMFCommandWrapper)command).getGMFCommand().getCommandResult()){
+ command.execute();
+ }
+ }
+ catch (RuntimeException exception)
+ {
+ // Skip over the command that threw the exception.
+ //
+ commands.previous();
+
+ try
+ {
+ // Iterate back over the executed commands to undo them.
+ //
+ while (commands.hasPrevious())
+ {
+ Command command = commands.previous();
+ if (command.canUndo())
+ {
+ command.undo();
+ }
+ else
+ {
+ break;
+ }
+ }
+ }
+ catch (RuntimeException nestedException)
+ {
+ CommonPlugin.INSTANCE.log
+ (new WrappedException
+ (CommonPlugin.INSTANCE.getString("_UI_IgnoreException_exception"), nestedException).fillInStackTrace());
+ }
+
+ throw exception;
+ }
+ }
+ }
+
+}
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/IPapyrusNattableStatus.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/IPapyrusNattableStatus.java
new file mode 100644
index 00000000000..96afd991007
--- /dev/null
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/IPapyrusNattableStatus.java
@@ -0,0 +1,44 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.nattable.utils;
+
+import org.eclipse.core.runtime.IStatus;
+
+/**
+ * This allows to manage the "other" status (attach to the existing).
+ */
+public interface IPapyrusNattableStatus extends IStatus{
+
+ /**
+ * Status type severity (bit mask, value 16) indicating this status represents a paste configuration info.
+ * @see #getSeverity()
+ * @see #matches(int)
+ */
+ public static final int PASTE_CONFIGURATiON_INFO = 0x16;
+
+ /**
+ * Status type severity (bit mask, value 32) indicating this status represents a paste configuration warning.
+ * @see #getSeverity()
+ * @see #matches(int)
+ */
+ public static final int PASTE_CONFIGURATiON_WARNING = 0x32;
+
+ /**
+ * Status type severity (bit mask, value 64) indicating this status represents a paste configuration error.
+ * @see #getSeverity()
+ * @see #matches(int)
+ */
+ public static final int PASTE_CONFIGURATiON_ERROR = 0x64;
+
+}
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/InsertedElementInNattable.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/InsertedElementInNattable.java
new file mode 100644
index 00000000000..27ee85a903b
--- /dev/null
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/InsertedElementInNattable.java
@@ -0,0 +1,165 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.nattable.utils;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+
+/**
+ * This class allows to define the created elements by context on index (for parent and table).
+ * Those created elements come from the paste/insert in nattable.
+ */
+public class InsertedElementInNattable {
+
+ /**
+ * The context of the created elements.
+ */
+ protected EObject context;
+
+ /**
+ * The list of created elements.
+ */
+ protected List<Object> createdElements;
+
+ /**
+ * The containment feature.
+ */
+ protected EStructuralFeature containementFeature;
+
+ /**
+ * The index where add the created elements in the context.
+ */
+ protected int indexInParent;
+
+ /**
+ * The index where add the created elements in the table.
+ */
+ protected int indexInTable;
+
+
+ /**
+ * Constructor.
+ *
+ * @param context The context of the created elements
+ * @param containementFeature The containment feature.
+ * @param indexInParent The index where add the created elements in the context.
+ * @param indexInTable The index where add the created elements in the table.
+ */
+ public InsertedElementInNattable(EObject context, EStructuralFeature containementFeature, int indexInParent, int indexInTable) {
+ super();
+ this.context = context;
+ this.createdElements = new ArrayList<Object>();
+ this.containementFeature = containementFeature;
+ this.indexInParent = indexInParent;
+ this.indexInTable = indexInTable;
+ }
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param context The context of the created elements.
+ * @param createdElements The created elements to add.
+ * @param containementFeature The containment feature.
+ * @param indexInParent The index where add the created elements in the context.
+ * @param indexInTable The index where add the created elements in the table.
+ */
+ public InsertedElementInNattable(EObject context, List<Object> createdElements, EStructuralFeature containementFeature, int indexInParent, int indexInTable) {
+ super();
+ this.context = context;
+ this.createdElements = new ArrayList<Object>(createdElements.size());
+ this.createdElements.add(createdElements);
+ this.containementFeature = containementFeature;
+ this.indexInParent = indexInParent;
+ this.indexInTable = indexInTable;
+ }
+
+ /**
+ * Get the created elements.
+ *
+ * @return the created elements.
+ */
+ public List<Object> getCreatedElements() {
+ return createdElements;
+ }
+
+ /**
+ * This allows to add a created elements.
+ *
+ * @param object the created element to add.
+ */
+ public void addCreatedElement(final Object createdElement) {
+ this.createdElements.add(createdElement);
+ }
+
+ /**
+ * Get the context.
+ *
+ * @return the context.
+ */
+ public EObject getContext() {
+ return context;
+ }
+
+ /**
+ * Get the containment feature.
+ *
+ * @return the containment feature.
+ */
+ public EStructuralFeature getContainementFeature() {
+ return containementFeature;
+ }
+
+ /**
+ * Get the index where add the created elements in the context.
+ *
+ * @return the index where add the created elements in the context.
+ */
+ public int getIndexInParent() {
+ return indexInParent;
+ }
+
+ /**
+ * Get the index where add the created elements in the table.
+ *
+ * @return the index where add the created elements in the table.
+ */
+ public int getIndexInTable() {
+ return indexInTable;
+ }
+
+ /**
+ * Need to compare the context for the inserted element.
+ * {@inheritDoc}
+ *
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(Object obj) {
+ boolean result = false;
+
+ if (obj instanceof InsertedElementInNattable) {
+ result = ((InsertedElementInNattable) obj).getContext().equals(getContext());
+ } else if (obj instanceof EObject) {
+ result = ((EObject) obj).equals(getContext());
+ } else {
+ result = super.equals(obj);
+ }
+
+ return result;
+ }
+}
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/NattableConfigAttributes.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/NattableConfigAttributes.java
index 3e6289ae7c9..22ca596501f 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/NattableConfigAttributes.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/NattableConfigAttributes.java
@@ -1,129 +1,129 @@
-/*****************************************************************************
- * Copyright (c) 2013 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.infra.nattable.utils;
-
-import org.eclipse.nebula.widgets.nattable.filterrow.TextMatchingMode;
-import org.eclipse.nebula.widgets.nattable.sort.ISortModel;
-import org.eclipse.nebula.widgets.nattable.style.ConfigAttribute;
-import org.eclipse.papyrus.infra.nattable.comparator.ObjectNameAndPathComparator;
-import org.eclipse.papyrus.infra.nattable.display.converter.ObjectNameAndPathDisplayConverter;
-import org.eclipse.papyrus.infra.nattable.filter.IFilterValueToMatchManager;
-import org.eclipse.papyrus.infra.nattable.filter.IPapyrusMatcherEditorFactory;
-import org.eclipse.papyrus.infra.nattable.filter.PapyrusTextMatchingMode;
-import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
-import org.eclipse.papyrus.infra.services.decoration.DecorationService;
-import org.eclipse.papyrus.infra.services.labelprovider.service.LabelProviderService;
-
-/**
- * This class references the keys registered in the ConfigRegistry of the table to facilitate access to these objects
- *
- * @author Vincent Lorenzo
- *
- */
-public class NattableConfigAttributes {
-
- private NattableConfigAttributes() {
- // to prevent instaciantionF
- }
-
- /**
- * The config attribute used to register the table model manager
- *
- * <ul>
- * <li>To store it : <code> configRegistry.registerConfigAttribute(NattableConfigAttributes.NATTABLE_MODEL_MANAGER_CONFIG_ATTRIBUTE, YOUR_NATTABLE_MODEL_MANAGER, DisplayMode.NORMAL, NattableConfigAttributes.NATTABLE_MODEL_MANAGER_ID);</code></li>
- * <li>To get it : <code></code></li>
- * </ul>
- */
- public static final ConfigAttribute<INattableModelManager> NATTABLE_MODEL_MANAGER_CONFIG_ATTRIBUTE = new ConfigAttribute<INattableModelManager>();
-
- /**
- * The config attribute used to register the label provider service
- *
- * <ul>
- * <li>To store it : <code> configRegistry.registerConfigAttribute(NattableConfigAttributes.LABEL_PROVIDER_SERVICE_CONFIG_ATTRIBUTE, YOUR_LABEL_PROVER_SERVICE, DisplayMode.NORMAL, NattableConfigAttributes.LABEL_PROVIDER_SERVICE_ID);</code></li>
- * <li>To get it : <code></code></li>
- * LabelProviderService serv = configRegistry.getConfigAttribute(NattableConfigAttributes.LABEL_PROVIDER_SERVICE_CONFIG_ATTRIBUTE, DisplayMode.NORMAL, NattableConfigAttributes.LABEL_PROVIDER_SERVICE_ID);
- * </ul>
- */
- public static final ConfigAttribute<LabelProviderService> LABEL_PROVIDER_SERVICE_CONFIG_ATTRIBUTE = new ConfigAttribute<LabelProviderService>();
-
- /**
- * The config attribute used to register the decoration service
- *
- * <ul>
- * <li>To store it : <code> configRegistry.registerConfigAttribute(NattableConfigAttributes.DECORATION_SERVICE_CONFIG_ATTRIBUTE, YOUR_LABEL_PROVER_SERVICE, DisplayMode.NORMAL, NattableConfigAttributes.DECORATION_SERVICE_ID);</code></li>
- * <li>To get it : <code></code></li>
- * LabelProviderService serv = configRegistry.getConfigAttribute(NattableConfigAttributes.DECORATION_SERVICE_CONFIG_ATTRIBUTE, DisplayMode.NORMAL, NattableConfigAttributes.DECORATION_SERVICE_ID);
- * </ul>
- */
- public static final ConfigAttribute<DecorationService> DECORATION_SERVICE_CONFIG_ATTRIBUTE = new ConfigAttribute<DecorationService>();
-
-
- /**
- * Id used to register the label provider service
- */
- public static final String LABEL_PROVIDER_SERVICE_ID = "label_provider_service_id"; //$NON-NLS-1$
-
- /**
- * Id used to register the label provider service
- */
- public static final String DECORATION_SERVICE_ID = "decoration_service_id"; //$NON-NLS-1$
-
-
- /**
- * Id used to register the table model manager
- */
- public static final String NATTABLE_MODEL_MANAGER_ID = "nattable_model_manager_id"; //$NON-NLS-1$
-
- /**
- * Attribute used to register a comparator for object, comparing this kind of string : "name - path"
- */
- public static final ConfigAttribute<ObjectNameAndPathComparator> OBJECT_NAME_AND_PATH_COMPARATOR = new ConfigAttribute<ObjectNameAndPathComparator>();
-
- /**
- * the id used for the previous comparator
- */
- public static final String OBJECT_NAME_AND_PATH_COMPARATOR_ID = "object_name_and_path_comparator_id"; //$NON-NLS-1$
-
- /**
- * the attribute used to register a converter (object to string) the string as the format : "name - path" where name is the name of the object and path its path in the model
- */
- public static final ConfigAttribute<ObjectNameAndPathDisplayConverter> OBJECT_NAME_AND_PATH_DISPLAY_CONVERTER = new ConfigAttribute<ObjectNameAndPathDisplayConverter>();
-
- /**
- * the id of the previous converter
- */
- public static final String OBJECT_NAME_AND_PATH_DISPLAY_CONVERTER_ID = "object_name_and_path_display_converter_id"; //$NON-NLS-1$
-
- /**
- * the attribute used to store matched editor used for filtering in the table
- */
- public static final ConfigAttribute<IPapyrusMatcherEditorFactory<?>> MATCHER_EDITOR_FACTORY = new ConfigAttribute<IPapyrusMatcherEditorFactory<?>>();
-
- /**
- * the attribute used to define the matching mode to use for filter. The papyrus implements allows to use this one, or {@link TextMatchingMode}
- */
- public static final ConfigAttribute<PapyrusTextMatchingMode> STRING_FILTER_MATCHING_MODE = new ConfigAttribute<PapyrusTextMatchingMode>();
-
- /**
- * the config attribute used to register the class loading and storing filter state
- */
- public static final ConfigAttribute<IFilterValueToMatchManager> FILTER_VALUE_TO_MATCH_MANAGER = new ConfigAttribute<IFilterValueToMatchManager>();
-
- /**
- * the config attribute used to register the sort model
- */
- public static final ConfigAttribute<ISortModel> ROW_SORT_MODEl = new ConfigAttribute<ISortModel>();
-
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.nattable.utils;
+
+import org.eclipse.nebula.widgets.nattable.filterrow.TextMatchingMode;
+import org.eclipse.nebula.widgets.nattable.sort.ISortModel;
+import org.eclipse.nebula.widgets.nattable.style.ConfigAttribute;
+import org.eclipse.papyrus.infra.nattable.comparator.ObjectNameAndPathComparator;
+import org.eclipse.papyrus.infra.nattable.display.converter.ObjectNameAndPathDisplayConverter;
+import org.eclipse.papyrus.infra.nattable.filter.IFilterValueToMatchManager;
+import org.eclipse.papyrus.infra.nattable.filter.IPapyrusMatcherEditorFactory;
+import org.eclipse.papyrus.infra.nattable.filter.PapyrusTextMatchingMode;
+import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
+import org.eclipse.papyrus.infra.services.decoration.DecorationService;
+import org.eclipse.papyrus.infra.services.labelprovider.service.LabelProviderService;
+
+/**
+ * This class references the keys registered in the ConfigRegistry of the table to facilitate access to these objects
+ *
+ * @author Vincent Lorenzo
+ *
+ */
+public class NattableConfigAttributes {
+
+ private NattableConfigAttributes() {
+ // to prevent instaciantionF
+ }
+
+ /**
+ * The config attribute used to register the table model manager
+ *
+ * <ul>
+ * <li>To store it : <code> configRegistry.registerConfigAttribute(NattableConfigAttributes.NATTABLE_MODEL_MANAGER_CONFIG_ATTRIBUTE, YOUR_NATTABLE_MODEL_MANAGER, DisplayMode.NORMAL, NattableConfigAttributes.NATTABLE_MODEL_MANAGER_ID);</code></li>
+ * <li>To get it : <code></code></li>
+ * </ul>
+ */
+ public static final ConfigAttribute<INattableModelManager> NATTABLE_MODEL_MANAGER_CONFIG_ATTRIBUTE = new ConfigAttribute<INattableModelManager>();
+
+ /**
+ * The config attribute used to register the label provider service
+ *
+ * <ul>
+ * <li>To store it : <code> configRegistry.registerConfigAttribute(NattableConfigAttributes.LABEL_PROVIDER_SERVICE_CONFIG_ATTRIBUTE, YOUR_LABEL_PROVIDER_SERVICE, DisplayMode.NORMAL, NattableConfigAttributes.LABEL_PROVIDER_SERVICE_ID);</code></li>
+ * <li>To get it : <code></code></li>
+ * LabelProviderService serv = configRegistry.getConfigAttribute(NattableConfigAttributes.LABEL_PROVIDER_SERVICE_CONFIG_ATTRIBUTE, DisplayMode.NORMAL, NattableConfigAttributes.LABEL_PROVIDER_SERVICE_ID);
+ * </ul>
+ */
+ public static final ConfigAttribute<LabelProviderService> LABEL_PROVIDER_SERVICE_CONFIG_ATTRIBUTE = new ConfigAttribute<LabelProviderService>();
+
+ /**
+ * The config attribute used to register the decoration service
+ *
+ * <ul>
+ * <li>To store it : <code> configRegistry.registerConfigAttribute(NattableConfigAttributes.DECORATION_SERVICE_CONFIG_ATTRIBUTE, YOUR_LABEL_PROVER_SERVICE, DisplayMode.NORMAL, NattableConfigAttributes.DECORATION_SERVICE_ID);</code></li>
+ * <li>To get it : <code></code></li>
+ * LabelProviderService serv = configRegistry.getConfigAttribute(NattableConfigAttributes.DECORATION_SERVICE_CONFIG_ATTRIBUTE, DisplayMode.NORMAL, NattableConfigAttributes.DECORATION_SERVICE_ID);
+ * </ul>
+ */
+ public static final ConfigAttribute<DecorationService> DECORATION_SERVICE_CONFIG_ATTRIBUTE = new ConfigAttribute<DecorationService>();
+
+
+ /**
+ * Id used to register the label provider service
+ */
+ public static final String LABEL_PROVIDER_SERVICE_ID = "label_provider_service_id"; //$NON-NLS-1$
+
+ /**
+ * Id used to register the label provider service
+ */
+ public static final String DECORATION_SERVICE_ID = "decoration_service_id"; //$NON-NLS-1$
+
+
+ /**
+ * Id used to register the table model manager
+ */
+ public static final String NATTABLE_MODEL_MANAGER_ID = "nattable_model_manager_id"; //$NON-NLS-1$
+
+ /**
+ * Attribute used to register a comparator for object, comparing this kind of string : "name - path"
+ */
+ public static final ConfigAttribute<ObjectNameAndPathComparator> OBJECT_NAME_AND_PATH_COMPARATOR = new ConfigAttribute<ObjectNameAndPathComparator>();
+
+ /**
+ * the id used for the previous comparator
+ */
+ public static final String OBJECT_NAME_AND_PATH_COMPARATOR_ID = "object_name_and_path_comparator_id"; //$NON-NLS-1$
+
+ /**
+ * the attribute used to register a converter (object to string) the string as the format : "name - path" where name is the name of the object and path its path in the model
+ */
+ public static final ConfigAttribute<ObjectNameAndPathDisplayConverter> OBJECT_NAME_AND_PATH_DISPLAY_CONVERTER = new ConfigAttribute<ObjectNameAndPathDisplayConverter>();
+
+ /**
+ * the id of the previous converter
+ */
+ public static final String OBJECT_NAME_AND_PATH_DISPLAY_CONVERTER_ID = "object_name_and_path_display_converter_id"; //$NON-NLS-1$
+
+ /**
+ * the attribute used to store matched editor used for filtering in the table
+ */
+ public static final ConfigAttribute<IPapyrusMatcherEditorFactory<?>> MATCHER_EDITOR_FACTORY = new ConfigAttribute<IPapyrusMatcherEditorFactory<?>>();
+
+ /**
+ * the attribute used to define the matching mode to use for filter. The papyrus implements allows to use this one, or {@link TextMatchingMode}
+ */
+ public static final ConfigAttribute<PapyrusTextMatchingMode> STRING_FILTER_MATCHING_MODE = new ConfigAttribute<PapyrusTextMatchingMode>();
+
+ /**
+ * the config attribute used to register the class loading and storing filter state
+ */
+ public static final ConfigAttribute<IFilterValueToMatchManager> FILTER_VALUE_TO_MATCH_MANAGER = new ConfigAttribute<IFilterValueToMatchManager>();
+
+ /**
+ * the config attribute used to register the sort model
+ */
+ public static final ConfigAttribute<ISortModel> ROW_SORT_MODEl = new ConfigAttribute<ISortModel>();
+
} \ No newline at end of file
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/PapyrusNattableMultiStatus.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/PapyrusNattableMultiStatus.java
new file mode 100644
index 00000000000..1e80d6be97f
--- /dev/null
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/PapyrusNattableMultiStatus.java
@@ -0,0 +1,108 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.nattable.utils;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.MultiStatus;
+
+/**
+ * The multi status for the papyrus nattable status to add some severity (paste configuration severities).
+ */
+public class PapyrusNattableMultiStatus extends MultiStatus implements IPapyrusNattableStatus {
+
+ /**
+ * The severity.
+ */
+ private int severity;
+
+ /**
+ * Creates and returns a new multi-status object with the given children.
+ *
+ * @param pluginId the unique identifier of the relevant plug-in
+ * @param code the plug-in-specific status code
+ * @param newChildren the list of children status objects
+ * @param message a human-readable message, localized to the
+ * current locale
+ * @param exception a low-level exception, or <code>null</code> if not
+ * applicable
+ */
+ public PapyrusNattableMultiStatus(final String pluginId, final int code, final IStatus[] newChildren, final String message, final Throwable exception) {
+ super(pluginId, code, newChildren, message, exception);
+ int maxSeverity = getSeverity();
+ for (int i = 0; i < newChildren.length; i++) {
+ Assert.isLegal(newChildren[i] != null);
+ int severity = newChildren[i].getSeverity();
+ if (severity > maxSeverity)
+ maxSeverity = severity;
+ }
+ setSeverity(maxSeverity);
+ }
+
+ /**
+ * Creates and returns a new multi-status object with no children.
+ *
+ * @param pluginId the unique identifier of the relevant plug-in
+ * @param code the plug-in-specific status code
+ * @param message a human-readable message, localized to the
+ * current locale
+ * @param exception a low-level exception, or <code>null</code> if not
+ * applicable
+ */
+ public PapyrusNattableMultiStatus(String pluginId, int code, String message, Throwable exception) {
+ super(pluginId, code, message, exception);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.core.runtime.IStatus#getSeverity()
+ */
+ @Override
+ public int getSeverity() {
+ return severity;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.core.runtime.IStatus#isOK()
+ */
+ @Override
+ public boolean isOK() {
+ return severity == OK;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.core.runtime.IStatus#matches(int)
+ */
+ @Override
+ public boolean matches(int severityMask) {
+ return (severity & severityMask) != 0;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.core.runtime.Status#setSeverity(int)
+ */
+ @Override
+ protected void setSeverity(int severity) {
+ Assert.isLegal(severity == OK || severity == ERROR || severity == WARNING || severity == INFO || severity == CANCEL
+ || severity == PASTE_CONFIGURATiON_INFO || severity == PASTE_CONFIGURATiON_WARNING || severity == PASTE_CONFIGURATiON_ERROR);
+ this.severity = severity;
+ }
+}
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/PapyrusNattableStatus.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/PapyrusNattableStatus.java
new file mode 100644
index 00000000000..dd54f34d010
--- /dev/null
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/PapyrusNattableStatus.java
@@ -0,0 +1,168 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.nattable.utils;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.Status;
+
+/**
+ * The status for the papyrus nattable status to add some severity (paste configuration severities).
+ */
+public class PapyrusNattableStatus extends Status implements IPapyrusNattableStatus {
+
+ /**
+ * The severity.
+ */
+ private int severity;
+
+ /**
+ * Creates a new status object. The created status has no children.
+ *
+ * @param severity
+ * the severity; one of <code>OK</code>, <code>ERROR</code>,
+ * <code>INFO</code>, <code>WARNING</code>, or <code>CANCEL</code>
+ * @param pluginId
+ * the unique identifier of the relevant plug-in
+ * @param code
+ * the plug-in-specific status code, or <code>OK</code>
+ * @param message
+ * a human-readable message, localized to the
+ * current locale
+ * @param exception
+ * a low-level exception, or <code>null</code> if not
+ * applicable
+ */
+ public PapyrusNattableStatus(int severity, String pluginId, int code, String message, Throwable exception) {
+ super(severity, pluginId, code, message, exception);
+ }
+
+ /**
+ * Simplified constructor of a new status object; assumes that code is <code>OK</code>.
+ * The created status has no children.
+ *
+ * @param severity
+ * the severity; one of <code>OK</code>, <code>ERROR</code>,
+ * <code>INFO</code>, <code>WARNING</code>, or <code>CANCEL</code>
+ * @param pluginId
+ * the unique identifier of the relevant plug-in
+ * @param message
+ * a human-readable message, localized to the
+ * current locale
+ * @param exception
+ * a low-level exception, or <code>null</code> if not
+ * applicable
+ */
+ public PapyrusNattableStatus(int severity, String pluginId, String message, Throwable exception) {
+ super(severity, pluginId, message, exception);
+ }
+
+ /**
+ * Simplified constructor of a new status object; assumes that code is <code>OK</code> and
+ * exception is <code>null</code>. The created status has no children.
+ *
+ * @param severity
+ * the severity; one of <code>OK</code>, <code>ERROR</code>,
+ * <code>INFO</code>, <code>WARNING</code>, or <code>CANCEL</code>
+ * @param pluginId
+ * the unique identifier of the relevant plug-in
+ * @param message
+ * a human-readable message, localized to the
+ * current locale
+ */
+ public PapyrusNattableStatus(int severity, String pluginId, String message) {
+ super(severity, pluginId, message);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.core.runtime.IStatus#getSeverity()
+ */
+ @Override
+ public int getSeverity() {
+ return severity;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.core.runtime.IStatus#isOK()
+ */
+ @Override
+ public boolean isOK() {
+ return severity == OK;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.core.runtime.IStatus#matches(int)
+ */
+ @Override
+ public boolean matches(int severityMask) {
+ return (severity & severityMask) != 0;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.core.runtime.Status#setSeverity(int)
+ */
+ @Override
+ protected void setSeverity(int severity) {
+ Assert.isLegal(severity == OK || severity == ERROR || severity == WARNING || severity == INFO || severity == CANCEL
+ || severity == PASTE_CONFIGURATiON_INFO || severity == PASTE_CONFIGURATiON_WARNING || severity == PASTE_CONFIGURATiON_ERROR);
+ this.severity = severity;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.core.runtime.Status#toString()
+ */
+ @Override
+ public String toString() {
+ StringBuffer buf = new StringBuffer();
+ buf.append("Status "); //$NON-NLS-1$
+ if (severity == OK) {
+ buf.append("OK"); //$NON-NLS-1$
+ } else if (severity == ERROR) {
+ buf.append("ERROR"); //$NON-NLS-1$
+ } else if (severity == WARNING) {
+ buf.append("WARNING"); //$NON-NLS-1$
+ } else if (severity == INFO) {
+ buf.append("INFO"); //$NON-NLS-1$
+ } else if (severity == CANCEL) {
+ buf.append("CANCEL"); //$NON-NLS-1$
+ } else if (severity == PASTE_CONFIGURATiON_INFO) {
+ buf.append("PASTE_CONFIGURATiON_INFO"); //$NON-NLS-1$
+ } else if (severity == PASTE_CONFIGURATiON_WARNING) {
+ buf.append("PASTE_CONFIGURATiON_WARNING"); //$NON-NLS-1$
+ } else if (severity == PASTE_CONFIGURATiON_ERROR) {
+ buf.append("PASTE_CONFIGURATiON_ERROR"); //$NON-NLS-1$
+ } else {
+ buf.append("severity="); //$NON-NLS-1$
+ buf.append(severity);
+ }
+ buf.append(": "); //$NON-NLS-1$
+ buf.append(getPlugin());
+ buf.append(" code="); //$NON-NLS-1$
+ buf.append(getCode());
+ buf.append(' ');
+ buf.append(getMessage());
+ buf.append(' ');
+ buf.append(getException());
+ return buf.toString();
+ }
+}
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/PasteHelperUtils.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/PasteHelperUtils.java
new file mode 100644
index 00000000000..326f3407d54
--- /dev/null
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/PasteHelperUtils.java
@@ -0,0 +1,79 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas fAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.nattable.utils;
+
+import java.io.Reader;
+
+import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
+import org.eclipse.papyrus.infra.nattable.manager.table.NattableModelManager;
+import org.eclipse.papyrus.infra.nattable.parsers.CSVParser;
+import org.eclipse.papyrus.infra.nattable.parsers.CellIterator;
+import org.eclipse.papyrus.infra.nattable.parsers.RowIterator;
+
+/**
+ *
+ */
+public class PasteHelperUtils {
+
+ /**
+ * Constructor.
+ */
+ private PasteHelperUtils() {
+ // to prevent instanciation
+ }
+
+ /**
+ * Manage if this is a paste with overwrite or just a basic paste.
+ *
+ * @param tableManager The nattable model manager.
+ * @param pasteHelper The paste helper.
+ * @param reader The reader of the file.
+ * @return
+ */
+ public static final boolean isPasteWithOverwrite(final INattableModelManager tableManager, final CSVPasteHelper pasteHelper, final Reader reader) {
+ boolean isPasteWithOverwrite = false;
+
+ final CSVParser parser = pasteHelper.createParser(reader);
+
+ // Get the pasted text
+ final RowIterator rowIter = parser.parse();
+ int nbColumnRead = -1;
+
+ // Calculate the number of column pasted
+ while (rowIter.hasNext()) {
+ final CellIterator cellIter = rowIter.next();
+ int nbColumnReadByRow = 0;
+ if (cellIter.hasNext()) {
+ while (cellIter.hasNext()) {
+ cellIter.next();
+ nbColumnReadByRow++;
+ }
+ }
+ nbColumnRead = nbColumnRead >= nbColumnReadByRow ? nbColumnRead : nbColumnReadByRow;
+ }
+
+ // Calculate the number of column in the table (including rows header number column and excluding index column)
+ int nbExpectedColumn = tableManager.getColumnCount();
+ if (TableHelper.isSingleColumnTreeTable(tableManager)) {
+ nbExpectedColumn++;
+ } else {
+ nbExpectedColumn = nbExpectedColumn + ((NattableModelManager) tableManager).getRowHeaderLayerStack().getRowHeaderLayerLabel().getColumnCount();
+ }
+
+ // If the number of column read is equals to the number of column in table, this is a basic paste (PasteEObject...)
+ isPasteWithOverwrite = nbColumnRead != nbExpectedColumn;
+ return isPasteWithOverwrite;
+ }
+
+}
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/PastePropertyTester.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/PastePropertyTester.java
new file mode 100644
index 00000000000..dd72a13bcdb
--- /dev/null
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/PastePropertyTester.java
@@ -0,0 +1,135 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.nattable.utils;
+
+import org.eclipse.core.expressions.PropertyTester;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.papyrus.infra.nattable.provider.TableStructuredSelection;
+
+/**
+ * The property tester for the paste action.
+ */
+public class PastePropertyTester extends PropertyTester {
+
+ /**
+ * The Constant CAN_PASTE_PROPERTY.
+ */
+ private static final String CAN_PASTE_PROPERTY = "canPaste"; //$NON-NLS-1$
+
+ /**
+ * The Constant CAN_INSERT_PROPERTY.
+ */
+ private static final String CAN_INSERT_PROPERTY = "canInsert"; //$NON-NLS-1$
+
+ /**
+ * Constructor.
+ */
+ public PastePropertyTester() {
+ super();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.core.expressions.IPropertyTester#test(java.lang.Object, java.lang.String, java.lang.Object[], java.lang.Object)
+ */
+ @Override
+ public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
+ boolean result = false;
+
+ // Try to parse
+ TypeSelectionEnum typeSelection = TypeSelectionEnum.NONE;
+ if (1 == args.length) {
+ typeSelection = TypeSelectionEnum.getTypeSelection(args[0].toString());
+ }
+
+ // Manage the can paste property
+ if (CAN_PASTE_PROPERTY.equals(property)) {
+ if (receiver instanceof TableStructuredSelection) {
+ final TableStructuredSelection selection = (TableStructuredSelection) receiver;
+ final TableSelectionWrapper tableSelectionWrapper = (TableSelectionWrapper) selection.getAdapter(TableSelectionWrapper.class);
+ if (null != tableSelectionWrapper) {
+ TypeSelectionEnum typeSelectionFromWrapper = getTypeSelection(tableSelectionWrapper);
+ // The paste is allowed for :
+ // - empty selection
+ // - cells when only cells are selected
+ // - rows when only rows are selected (and no single cells selected)
+ // - columns when only columns are selected (and no single cells selected)
+ result = false;
+ if (TypeSelectionEnum.CELL.equals(typeSelection) && TypeSelectionEnum.CELL.equals(typeSelectionFromWrapper)) {
+ result = tableSelectionWrapper.getFullySelectedColumns().isEmpty()
+ && tableSelectionWrapper.getFullySelectedRows().isEmpty()
+ && !tableSelectionWrapper.getSelectedCells().isEmpty()
+ && tableSelectionWrapper.isContinuousCells();
+ } else if (TypeSelectionEnum.ROW.equals(typeSelection) && TypeSelectionEnum.ROW.equals(typeSelectionFromWrapper)) {
+ result = tableSelectionWrapper.getFullySelectedColumns().isEmpty()
+ && !tableSelectionWrapper.getFullySelectedRows().isEmpty()
+ && !tableSelectionWrapper.isCellsOutsideOfAxis()
+ && tableSelectionWrapper.isContinuousRows();
+ } else if (TypeSelectionEnum.COLUMN.equals(typeSelection) && TypeSelectionEnum.COLUMN.equals(typeSelectionFromWrapper)) {
+ result = !tableSelectionWrapper.getFullySelectedColumns().isEmpty()
+ && tableSelectionWrapper.getFullySelectedRows().isEmpty()
+ && !tableSelectionWrapper.isCellsOutsideOfAxis()
+ && tableSelectionWrapper.isContinuousColumns();
+ }
+ }
+ } else if (receiver instanceof StructuredSelection && ((StructuredSelection) receiver).isEmpty()) {
+ result = true;
+ }
+ // Manage the can insert property
+ } else if (CAN_INSERT_PROPERTY.equals(property)) {
+ if (receiver instanceof TableStructuredSelection) {
+ final TableStructuredSelection selection = (TableStructuredSelection) receiver;
+ final TableSelectionWrapper tableSelectionWrapper = (TableSelectionWrapper) selection.getAdapter(TableSelectionWrapper.class);
+ if (null != tableSelectionWrapper) {
+ TypeSelectionEnum typeSelectionFromWrapper = getTypeSelection(tableSelectionWrapper);
+ // The paste is allowed for :
+ // - empty selection
+ // - rows when only rows are selected (and no single cells selected)
+ // and not allowed for the cells and columns selection
+ result = false;
+ if (TypeSelectionEnum.ROW.equals(typeSelection) && TypeSelectionEnum.ROW.equals(typeSelectionFromWrapper)) {
+ result = tableSelectionWrapper.getFullySelectedColumns().isEmpty()
+ && !tableSelectionWrapper.getFullySelectedRows().isEmpty()
+ && !tableSelectionWrapper.isCellsOutsideOfAxis()
+ && tableSelectionWrapper.isContinuousRows();
+ }
+ }
+ } else if (receiver instanceof StructuredSelection && ((StructuredSelection) receiver).isEmpty()) {
+ result = true;
+ }
+ }
+
+ return result;
+ }
+
+ /**
+ * Get the calculate type selection from the table selection wrapper.
+ *
+ * @param tableSelectionWrapper
+ * the table selection wrapper.
+ * @return The type selection corresponding to the table selection wrapper.
+ */
+ protected TypeSelectionEnum getTypeSelection(final TableSelectionWrapper tableSelectionWrapper) {
+ TypeSelectionEnum result = TypeSelectionEnum.NONE;
+ if (!tableSelectionWrapper.getFullySelectedRows().isEmpty() && tableSelectionWrapper.getFullySelectedColumns().isEmpty()) {
+ result = TypeSelectionEnum.ROW;
+ } else if (tableSelectionWrapper.getFullySelectedRows().isEmpty() && !tableSelectionWrapper.getFullySelectedColumns().isEmpty()) {
+ result = TypeSelectionEnum.COLUMN;
+ } else if (tableSelectionWrapper.getFullySelectedRows().isEmpty() && tableSelectionWrapper.getFullySelectedColumns().isEmpty() && !tableSelectionWrapper.getSelectedCells().isEmpty()) {
+ result = TypeSelectionEnum.CELL;
+ }
+ return result;
+ }
+}
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/TableSelectionWrapper.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/TableSelectionWrapper.java
index c6a4271914c..e28256dbc16 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/TableSelectionWrapper.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/TableSelectionWrapper.java
@@ -1,103 +1,230 @@
-/*****************************************************************************
- * Copyright (c) 2013 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.infra.nattable.utils;
-
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Map;
-
-import org.eclipse.nebula.widgets.nattable.coordinate.PositionCoordinate;
-
-/**
- * Wrapper for the selection in the table
- *
- * @author VL222926
- *
- */
-public class TableSelectionWrapper {
-
- /**
- * the list of the coordinate of all selected cells
- */
- final private Collection<PositionCoordinate> selectedCells;
-
- /**
- * a map linking index of selected rows and the object in the selected row
- */
- final private Map<Integer, Object> fullySelectedRowsObject;
-
- /**
- * a map linking index of selected column and the object in the selected column
- */
- final private Map<Integer, Object> fullySelectionColumnsObject;
-
- /**
- *
- * Constructor.
- *
- * @param selectionCells
- */
- public TableSelectionWrapper(final Collection<PositionCoordinate> selectionCells) {
- this(selectionCells, Collections.<Integer, Object> emptyMap(), Collections.<Integer, Object> emptyMap());
- }
-
- /**
- *
- * Constructor.
- *
- * @param selectionCells
- */
- public TableSelectionWrapper(final Collection<PositionCoordinate> selectionCells, final Map<Integer, Object> fullySelectedRowObject, final Map<Integer, Object> fullySelectedColumnObject) {
- this.selectedCells = selectionCells;
- this.fullySelectedRowsObject = fullySelectedRowObject;
- this.fullySelectionColumnsObject = fullySelectedColumnObject;
- }
-
- /**
- *
- * @return
- * the list of the {@link PositionCoordinate} of all selected cells
- */
- public Collection<PositionCoordinate> getSelectedCells() {
- return selectedCells;
- }
-
- /**
- *
- * @return
- * a map with the fully selected rows and their index
- */
- public Map<Integer, Object> getFullySelectedRows() {
- return this.fullySelectedRowsObject;
- }
-
- /**
- *
- * @return
- * a map with the fully selected rows and their columns
- */
- public Map<Integer, Object> getFullySelectedColumns() {
- return this.fullySelectionColumnsObject;
- }
-
- /**
- * this method clear the values stored in the collections and in the maps of this wrapper
- */
- public void clearWrappedSelection(){
- this.fullySelectedRowsObject.clear();
- this.fullySelectionColumnsObject.clear();
- this.selectedCells.clear();
- }
-
-}
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 476618
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.nattable.utils;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.Map;
+
+import org.eclipse.nebula.widgets.nattable.coordinate.PositionCoordinate;
+
+/**
+ * Wrapper for the selection in the table
+ */
+public class TableSelectionWrapper {
+
+ /**
+ * the list of the coordinate of all selected cells
+ */
+ final private Collection<PositionCoordinate> selectedCells;
+
+ /**
+ * a map linking index of selected rows and the object in the selected row
+ */
+ final private Map<Integer, Object> fullySelectedRowsObject;
+
+ /**
+ * a map linking index of selected column and the object in the selected column
+ */
+ final private Map<Integer, Object> fullySelectionColumnsObject;
+
+ /**
+ * Constructor.
+ *
+ * @param selectionCells
+ * The selected cells.
+ */
+ public TableSelectionWrapper(final Collection<PositionCoordinate> selectionCells) {
+ this(selectionCells, Collections.<Integer, Object> emptyMap(), Collections.<Integer, Object> emptyMap());
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param selectionCells
+ * The selected cells.
+ * @param fullySelectedRowObject
+ * The selected rows (index or object affected).
+ * @param fullySelectedColumnObject
+ * The selected columns (index or object affected).
+ */
+ public TableSelectionWrapper(final Collection<PositionCoordinate> selectionCells, final Map<Integer, Object> fullySelectedRowObject, final Map<Integer, Object> fullySelectedColumnObject) {
+ this.selectedCells = selectionCells;
+ this.fullySelectedRowsObject = fullySelectedRowObject;
+ this.fullySelectionColumnsObject = fullySelectedColumnObject;
+ }
+
+ /**
+ * Get the selected cells.
+ *
+ * @return
+ * the list of the {@link PositionCoordinate} of all selected cells
+ */
+ public Collection<PositionCoordinate> getSelectedCells() {
+ return selectedCells;
+ }
+
+ /**
+ * Get the selected rows.
+ *
+ * @return
+ * a map with the fully selected rows and their index
+ */
+ public Map<Integer, Object> getFullySelectedRows() {
+ return this.fullySelectedRowsObject;
+ }
+
+ /**
+ * Get the selected columns.
+ *
+ * @return
+ * a map with the fully selected rows and their columns
+ */
+ public Map<Integer, Object> getFullySelectedColumns() {
+ return this.fullySelectionColumnsObject;
+ }
+
+ /**
+ * Rturns a boolean determining if at least one selected cell is outside of the selected rows and columns.
+ *
+ * @return <code>true</code> if at least one selected cell is outside of the selected rows and columns, <code>false</code> otherwise.
+ */
+ public boolean isCellsOutsideOfAxis() {
+ boolean result = false;
+
+ if ((null != this.selectedCells && !this.selectedCells.isEmpty()) && ((null != this.fullySelectedRowsObject && !this.fullySelectedRowsObject.isEmpty()) || (null != this.fullySelectionColumnsObject && !this.fullySelectionColumnsObject.isEmpty()))) {
+
+ // Loop on each selected cells to manage if one cell is outside of selected rows or columns
+ final Iterator<PositionCoordinate> selectedCells = this.selectedCells.iterator();
+ while (!result && selectedCells.hasNext()) {
+ final PositionCoordinate selectedCell = selectedCells.next();
+
+ boolean contains = false;
+ // Check that the selected cell is not outside of the selected rows
+ if (null != this.fullySelectedRowsObject && !this.fullySelectedRowsObject.isEmpty() && this.fullySelectedRowsObject.containsKey(selectedCell.getRowPosition())) {
+ contains = true;
+ }
+ // Check that the selected cell is not outside of the selected columns
+ if (null != this.fullySelectionColumnsObject && !this.fullySelectionColumnsObject.isEmpty() && this.fullySelectionColumnsObject.containsKey(selectedCell.getColumnPosition())) {
+ contains = true;
+ }
+
+ result = !contains;
+ }
+ }
+
+ return result;
+ }
+
+ /**
+ * Check if the selected rows are continuous.
+ *
+ * @return <code>true</code> if the selected rows are continuous, <code>false</code> otherwise.
+ */
+ public boolean isContinuousRows(){
+ int firstRowIndex = -1;
+ int lastRowIndex = -1;
+
+ // To check if the selected rows are continuous, calculate :
+ // - The first row index
+ // - The last row index
+ // To finalize :
+ // - The number of selected rows must be equals to last index subtracted to the first index
+ for(final int rowIndex : getFullySelectedRows().keySet()){
+ if(-1 == firstRowIndex || rowIndex < firstRowIndex){
+ firstRowIndex = rowIndex;
+ }
+ if(-1 == lastRowIndex || rowIndex > lastRowIndex){
+ lastRowIndex = rowIndex;
+ }
+ }
+
+ return (lastRowIndex-firstRowIndex+1) == getFullySelectedRows().size();
+ }
+
+ /**
+ * Check if the selected columns are continuous.
+ *
+ * @return <code>true</code> if the selected columns are continuous, <code>false</code> otherwise.
+ */
+ public boolean isContinuousColumns(){
+ int firstColumnIndex = -1;
+ int lastColumnIndex = -1;
+
+ // To check if the selected columns are continuous, calculate :
+ // - The first column index
+ // - The last column index
+ // To finalize :
+ // - The number of selected column must be equals to last index subtracted to the first index
+ for(final int rowIndex : getFullySelectedColumns().keySet()){
+ if(-1 == firstColumnIndex || rowIndex < firstColumnIndex){
+ firstColumnIndex = rowIndex;
+ }
+ if(-1 == lastColumnIndex || rowIndex > lastColumnIndex){
+ lastColumnIndex = rowIndex;
+ }
+ }
+
+ return (lastColumnIndex-firstColumnIndex+1) == getFullySelectedColumns().size();
+ }
+
+ /**
+ * Check if the selected cells are continuous.
+ *
+ * @return <code>true</code> if the selected cells are continuous, <code>false</code> otherwise.
+ */
+ public boolean isContinuousCells(){
+ int firstRowIndex = -1;
+ int lastRowIndex = -1;
+ int firstColumnIndex = -1;
+ int lastColumnIndex = -1;
+
+ // To check if the selected cells are continuous, calculate :
+ // - The first row index
+ // - The last row index
+ // - The first column index
+ // - The last column index
+ // To finalize :
+ // - The number of selected cells must be equals to number of row index multiplied to number of column index
+ for(final PositionCoordinate currentPosition : getSelectedCells()){
+ if(-1 == firstRowIndex || currentPosition.getRowPosition() < firstRowIndex){
+ firstRowIndex = currentPosition.getRowPosition();
+ }
+ if(-1 == firstColumnIndex || currentPosition.getColumnPosition() < firstColumnIndex){
+ firstColumnIndex = currentPosition.getColumnPosition();
+ }
+ if(-1 == lastRowIndex || currentPosition.getRowPosition() > lastRowIndex){
+ lastRowIndex = currentPosition.getRowPosition();
+ }
+ if(-1 == lastColumnIndex || currentPosition.getColumnPosition() > lastColumnIndex){
+ lastColumnIndex = currentPosition.getColumnPosition();
+ }
+ }
+
+ return ((lastColumnIndex - firstColumnIndex + 1) * (lastRowIndex - firstRowIndex + 1)) == getSelectedCells().size();
+ }
+
+ /**
+ * This method clear the values stored in the collections and in the maps of this wrapper
+ */
+ public void clearWrappedSelection() {
+ this.fullySelectedRowsObject.clear();
+ this.fullySelectionColumnsObject.clear();
+ this.selectedCells.clear();
+ }
+
+}
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/TypeSelectionEnum.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/TypeSelectionEnum.java
new file mode 100644
index 00000000000..3d6fca99f67
--- /dev/null
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/TypeSelectionEnum.java
@@ -0,0 +1,67 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.nattable.utils;
+
+/**
+ * The enumeration to manage the table selection (none, cell, row or column type)
+ */
+public enum TypeSelectionEnum {
+ NONE("None"),
+ CELL("cell"),
+ COLUMN("column"),
+ ROW("row");
+
+ /**
+ * The text corresponding to the enum item.
+ */
+ private final String text;
+
+ /**
+ * Constructor.
+ *
+ * @param text The text corresponding to the enum item.
+ */
+ private TypeSelectionEnum(final String text) {
+ this.text = text;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see java.lang.Enum#toString()
+ */
+ @Override
+ public String toString() {
+ return text;
+ }
+
+ /**
+ * Get the enum item corresponding to the value.
+ *
+ * @param value The string value.
+ * @return The corresponding item.
+ */
+ public static TypeSelectionEnum getTypeSelection(final String value){
+ TypeSelectionEnum result = NONE;
+ if(CELL.toString().equals(value)){
+ result = CELL;
+ } else if(COLUMN.toString().equals(value)){
+ result = COLUMN;
+ } else if(ROW.toString().equals(value)){
+ result = ROW;
+ }
+
+ return result;
+ }
+} \ No newline at end of file
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/UserActionConstants.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/UserActionConstants.java
new file mode 100644
index 00000000000..5117ef1d90c
--- /dev/null
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/UserActionConstants.java
@@ -0,0 +1,46 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.nattable.utils;
+
+/**
+ * This allows to define the constants for the user action.
+ */
+public interface UserActionConstants {
+
+ /**
+ * The integer representing the undefined user action.
+ */
+ public final static int UNDEFINED_USER_ACTION = -1;
+
+ /**
+ * The integer representing the replace user action.
+ */
+ public final static int REPLACE_USER_ACTION = 0;
+
+ /**
+ * The integer representing the add user action.
+ */
+ public final static int ADD_USER_ACTION = 1;
+
+ /**
+ * The integer representing the skip user action.
+ */
+ public final static int SKIP_USER_ACTION = 2;
+
+ /**
+ * The integer representing the cancel user action.
+ */
+ public final static int CANCEL_USER_ACTION = 3;
+
+}
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/wizard/ImportTableWizard.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/wizard/ImportTableWizard.java
index 16af7bf350d..621570113f1 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/wizard/ImportTableWizard.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/wizard/ImportTableWizard.java
@@ -1,106 +1,210 @@
-/*****************************************************************************
- * Copyright (c) 2014 CEA LIST.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.infra.nattable.wizard;
-
-import java.io.File;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.papyrus.infra.nattable.Activator;
-import org.eclipse.papyrus.infra.nattable.manager.ImportAxisInNattableManager;
-import org.eclipse.papyrus.infra.nattable.messages.Messages;
-import org.eclipse.papyrus.infra.nattable.paste.PasteSeparator;
-import org.eclipse.papyrus.infra.nattable.paste.TextDelimiter;
-import org.eclipse.papyrus.infra.nattable.utils.CSVPasteHelper;
-import org.eclipse.papyrus.infra.nattable.wizard.pages.ImportCSVConfigurationPage;
-import org.eclipse.papyrus.infra.nattable.wizard.pages.ImportFilePage;
-import org.eclipse.papyrus.infra.nattable.wizard.pages.ImportInvertedTableErrorPage;
-import org.eclipse.papyrus.infra.nattable.wizard.pages.ImportTableErrorPage;
-import org.eclipse.papyrus.infra.widgets.util.FileUtil;
-import org.eclipse.ui.IImportWizard;
-
-/**
- *
- * This wizard allows to import a table in the Papyrus nattable editor
- *
- */
-public class ImportTableWizard extends AbstractTableWizard implements IImportWizard {
-
- /**
- * the import page
- */
- private ImportFilePage importPage;
-
- /**
- * the page used to configure the CSV import
- */
- private ImportCSVConfigurationPage csvConfigurationPage;
-
-
- /**
- *
- * Constructor.
- *
- */
- public ImportTableWizard() {
- setWindowTitle(Messages.ImportTableWizard_ImportTableFromFileInPapyrusModel);
- String pluginId = Activator.PLUGIN_ID;
- String path = "icons/importTablePapyrusWizban.png"; //$NON-NLS-1$
- ImageDescriptor desc = org.eclipse.papyrus.infra.widgets.Activator.getDefault().getImageDescriptor(pluginId, path);
- setDefaultPageImageDescriptor(desc);
- }
-
-
- /**
- *
- * @see org.eclipse.jface.wizard.Wizard#addPages()
- *
- */
- @Override
- public void addPages() {
- super.addPages();
- final String pageTitle = Messages.ImportTableWizard_ImportTable;
- final ImageDescriptor desc = null;
- if (manager != null) {
- if (manager.getTable().isInvertAxis()) {
- addPage(new ImportInvertedTableErrorPage(Messages.ImportTableWizard_ImportTableError, pageTitle, desc));
- } else {
- this.importPage = new ImportFilePage(pageTitle, pageTitle, desc, this.manager);
- addPage(this.importPage);
- this.csvConfigurationPage = new ImportCSVConfigurationPage(pageTitle, Messages.ImportTableWizard_ConfigureImport, desc, PasteSeparator.SEMICOLON, TextDelimiter.DOUBLE_QUOTE);
- addPage(this.csvConfigurationPage);
- }
- } else {
- addPage(new ImportTableErrorPage(Messages.ImportTableWizard_ImportTableError, pageTitle, desc));
- }
- }
-
-
- /**
- *
- * @see org.eclipse.jface.wizard.Wizard#performFinish()
- *
- * @return
- */
- @Override
- public boolean performFinish() {
- // the import file
- final File file = FileUtil.getFile(this.importPage.getFilePath());
- final CSVPasteHelper pasteHelper = new CSVPasteHelper(this.csvConfigurationPage.getSeparator(), this.csvConfigurationPage.getTextDelimiter(), ","); //$NON-NLS-1$
- final ImportAxisInNattableManager pasteManager = new ImportAxisInNattableManager(this.manager, pasteHelper, file, true);
- IStatus status = pasteManager.doPaste();
- // TODO : do something with the status
- return true;
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.nattable.wizard;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.Reader;
+import java.io.StringReader;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.papyrus.infra.nattable.Activator;
+import org.eclipse.papyrus.infra.nattable.manager.AbstractPasteImportInsertInNattableManager;
+import org.eclipse.papyrus.infra.nattable.manager.ImportAxisAsInsertInNattableManager;
+import org.eclipse.papyrus.infra.nattable.manager.ImportAxisAsPasteInNattableManager;
+import org.eclipse.papyrus.infra.nattable.manager.InsertInNattableManager;
+import org.eclipse.papyrus.infra.nattable.manager.PasteAxisInNattableManager;
+import org.eclipse.papyrus.infra.nattable.manager.table.NattableModelManager;
+import org.eclipse.papyrus.infra.nattable.messages.Messages;
+import org.eclipse.papyrus.infra.nattable.paste.PasteSeparator;
+import org.eclipse.papyrus.infra.nattable.paste.TextDelimiter;
+import org.eclipse.papyrus.infra.nattable.provider.TableStructuredSelection;
+import org.eclipse.papyrus.infra.nattable.utils.CSVPasteHelper;
+import org.eclipse.papyrus.infra.nattable.utils.PasteHelperUtils;
+import org.eclipse.papyrus.infra.nattable.utils.TableSelectionWrapper;
+import org.eclipse.papyrus.infra.nattable.utils.UserActionConstants;
+import org.eclipse.papyrus.infra.nattable.wizard.pages.ImportCSVConfigurationPage;
+import org.eclipse.papyrus.infra.nattable.wizard.pages.ImportFilePage;
+import org.eclipse.papyrus.infra.nattable.wizard.pages.ImportInvertedTableErrorPage;
+import org.eclipse.papyrus.infra.nattable.wizard.pages.ImportTableErrorPage;
+import org.eclipse.papyrus.infra.widgets.util.FileUtil;
+import org.eclipse.ui.IImportWizard;
+
+/**
+ *
+ * This wizard allows to import a table in the Papyrus nattable editor
+ *
+ */
+public class ImportTableWizard extends AbstractTableWizard implements IImportWizard {
+
+ /**
+ * the import page
+ */
+ private ImportFilePage importPage;
+
+ /**
+ * the page used to configure the CSV import
+ */
+ private ImportCSVConfigurationPage csvConfigurationPage;
+
+ /**
+ * The initial selected file path.
+ */
+ private String importedText = ""; //$NON-NLS-1$
+
+ /**
+ * Boolean to determinate if a progress monitor must be used for the command.
+ */
+ private boolean useProgressMonitor = true;
+
+ /**
+ * Boolean to determinate if the dialog must be opened during the process.
+ */
+ private boolean openDialog = true;
+
+ /**
+ * The preferred user action defined.
+ */
+ private int preferredUserAction = UserActionConstants.UNDEFINED_USER_ACTION;
+
+ /**
+ *
+ * Constructor.
+ *
+ */
+ public ImportTableWizard() {
+ setWindowTitle(Messages.ImportTableWizard_ImportTableFromFileInPapyrusModel);
+ String pluginId = Activator.PLUGIN_ID;
+ String path = "icons/importTablePapyrusWizban.png"; //$NON-NLS-1$
+ ImageDescriptor desc = org.eclipse.papyrus.infra.widgets.Activator.getDefault().getImageDescriptor(pluginId, path);
+ setDefaultPageImageDescriptor(desc);
+ }
+
+ /**
+ *
+ * Constructor.
+ *
+ */
+ public ImportTableWizard(final String importedText, final boolean useProgressMonitor, final boolean openDialog, final int preferredUserAction) {
+ this();
+ this.importedText = importedText;
+ this.useProgressMonitor = useProgressMonitor;
+ this.openDialog = openDialog;
+ this.preferredUserAction = preferredUserAction;
+ }
+
+ /**
+ *
+ * @see org.eclipse.jface.wizard.Wizard#addPages()
+ *
+ */
+ @Override
+ public void addPages() {
+ super.addPages();
+ final String pageTitle = Messages.ImportTableWizard_ImportTable;
+ final ImageDescriptor desc = null;
+ if (manager != null) {
+ if (manager.getTable().isInvertAxis()) {
+ addPage(new ImportInvertedTableErrorPage(Messages.ImportTableWizard_ImportTableError, pageTitle, desc));
+ } else {
+ this.importPage = new ImportFilePage(pageTitle, pageTitle, desc, this.manager);
+ addPage(this.importPage);
+ this.csvConfigurationPage = new ImportCSVConfigurationPage(pageTitle, Messages.ImportTableWizard_ConfigureImport, desc, PasteSeparator.SEMICOLON, TextDelimiter.DOUBLE_QUOTE);
+ addPage(this.csvConfigurationPage);
+ }
+ } else {
+ addPage(new ImportTableErrorPage(Messages.ImportTableWizard_ImportTableError, pageTitle, desc));
+ }
+ }
+
+
+ /**
+ *
+ * @see org.eclipse.jface.wizard.Wizard#performFinish()
+ *
+ * @return
+ */
+ @Override
+ public boolean performFinish() {
+ // the import file
+ File file = null;
+ if (openDialog) {
+ file = FileUtil.getFile(this.importPage.getFilePath());
+ }
+ final CSVPasteHelper pasteHelper = new CSVPasteHelper(this.csvConfigurationPage.getSeparator(), this.csvConfigurationPage.getTextDelimiter(), ","); //$NON-NLS-1$
+
+ final TableStructuredSelection currentSelection = ((NattableModelManager) this.manager).getSelectionInTable();
+ TableSelectionWrapper tableSelectionWrapper = null;
+ if (null != currentSelection) {
+ tableSelectionWrapper = (TableSelectionWrapper) ((TableStructuredSelection) currentSelection).getAdapter(TableSelectionWrapper.class);
+ if (tableSelectionWrapper.getSelectedCells().isEmpty()) {
+ tableSelectionWrapper = null;
+ }
+ }
+
+ AbstractPasteImportInsertInNattableManager pasteManager = null;
+
+ // The insert is not authorized when columns or cells are selected, so its a basic with header paste
+ if (null != tableSelectionWrapper &&
+ ((!tableSelectionWrapper.getFullySelectedColumns().isEmpty()) ||
+ (tableSelectionWrapper.getFullySelectedColumns().isEmpty() && tableSelectionWrapper.getFullySelectedRows().isEmpty() && !tableSelectionWrapper.getSelectedCells().isEmpty()))) {
+ if (null != file && openDialog) {
+ pasteManager = new ImportAxisAsPasteInNattableManager(this.manager, pasteHelper, file, useProgressMonitor, openDialog, preferredUserAction, null, false);
+ } else {
+ pasteManager = new PasteAxisInNattableManager(this.manager, pasteHelper, useProgressMonitor, openDialog, preferredUserAction, null, importedText, false);
+ }
+ } else {
+ // Is no selection or rows selection, check if columns are present
+ if (null != file && openDialog) {
+ boolean isPasteWithOverwrite = PasteHelperUtils.isPasteWithOverwrite(manager, pasteHelper, createReader(file));
+ if (!isPasteWithOverwrite) {
+ pasteManager = new ImportAxisAsPasteInNattableManager(this.manager, pasteHelper, file, useProgressMonitor, openDialog, preferredUserAction, tableSelectionWrapper, isPasteWithOverwrite);
+ } else {
+ pasteManager = new ImportAxisAsInsertInNattableManager(this.manager, pasteHelper, file, useProgressMonitor, openDialog, preferredUserAction, tableSelectionWrapper);
+ }
+ } else {
+ boolean isPasteWithOverwrite = PasteHelperUtils.isPasteWithOverwrite(manager, pasteHelper, new StringReader(importedText));
+ if (!isPasteWithOverwrite) {
+ pasteManager = new PasteAxisInNattableManager(this.manager, pasteHelper, useProgressMonitor, openDialog, preferredUserAction, tableSelectionWrapper, importedText, isPasteWithOverwrite);
+ } else {
+ pasteManager = new InsertInNattableManager(this.manager, pasteHelper, useProgressMonitor, openDialog, preferredUserAction, tableSelectionWrapper, importedText);
+ }
+ }
+ }
+
+ IStatus status = pasteManager.doAction();
+ // TODO : do something with the status ?
+ return true;
+ }
+
+ /**
+ * This allows to create the reader and returns it.
+ *
+ * @param file
+ * The file to read.
+ * @return
+ * a new reader
+ */
+ protected Reader createReader(final File file) {
+ FileReader reader = null;
+ try {
+ reader = new FileReader(file);
+ } catch (FileNotFoundException e) {
+ Activator.log.error(e);
+ }
+ return reader;
+ }
+}
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/wizard/pages/ImportFilePage.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/wizard/pages/ImportFilePage.java
index ae1d5e5bc96..72b7abc1a18 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/wizard/pages/ImportFilePage.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/wizard/pages/ImportFilePage.java
@@ -1,184 +1,184 @@
-/*****************************************************************************
- * Copyright (c) 2014 CEA LIST.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.infra.nattable.wizard.pages;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.papyrus.infra.core.services.ServiceException;
-import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForEObject;
-import org.eclipse.papyrus.infra.nattable.Activator;
-import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
-import org.eclipse.papyrus.infra.nattable.messages.Messages;
-import org.eclipse.papyrus.infra.services.labelprovider.service.LabelProviderService;
-import org.eclipse.papyrus.infra.widgets.editors.AbstractEditor;
-import org.eclipse.papyrus.infra.widgets.editors.ICommitListener;
-import org.eclipse.papyrus.infra.widgets.editors.StringFileSelector;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.CLabel;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-
-/**
- *
- * Import page
- *
- */
-public class ImportFilePage extends WizardPage {
-
- /**
- * allowed file to import table
- */
- private static final String[] allowedFiles = new String[] { "*.csv" }; //$NON-NLS-1$
-
- /**
- * the selected file path
- */
- private String selectedFilePath;
-
- /**
- * the table manager where the import will be done
- */
- private final INattableModelManager tableManager;
-
- /**
- *
- * Constructor.
- *
- * @param pageName
- * the name of the import page
- * @param title
- * the title of the page
- * @param titleImage
- * the image for this page
- * @param tableManager
- * the table manager where the import will be done
- */
- public ImportFilePage(final String pageName, final String title, final ImageDescriptor titleImage, final INattableModelManager tableManager) {
- super(pageName, title, titleImage);
- setDescription(Messages.ImportFilePage_SelectTheFileToImport);
- this.tableManager = tableManager;
- this.selectedFilePath = null;
- }
-
- /**
- *
- * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
- *
- * @param parent
- */
- @Override
- public void createControl(final Composite parent) {
- final Composite localComposite = new Composite(parent, SWT.NONE);
- setControl(localComposite);
- final ILabelProvider labelProvider = getLabelProvider();
- Composite localParent = new Composite(localComposite, SWT.NONE);
- final Label label = new Label(localParent, SWT.NONE);
- label.setText(Messages.ImportFilePage_YourFileWillBeImported);
- final CLabel cLabel = new CLabel(localParent, SWT.NONE);
- cLabel.setText(tableManager.getTableName());
-
- final Label label2 = new Label(localParent, SWT.NONE);
- label2.setText(Messages.ImportFilePage_TheImportedElementWillBeAddedTo);
- final CLabel cLabel2 = new CLabel(localParent, SWT.NONE);
- cLabel2.setText(labelProvider.getText(tableManager.getTable().getContext()));
- cLabel2.setImage(labelProvider.getImage(tableManager.getTable().getContext()));
-
-
- cLabel.setImage(labelProvider.getImage(this.tableManager.getTable()));
-
- localParent.setLayout(new GridLayout(2, true));
- final StringFileSelector selector = new StringFileSelector(localComposite, SWT.NONE);
- selector.setAllowFileSystem(true);
- selector.setAllowWorkspace(true);
- selector.setFilterExtensions(allowedFiles);
-
- localComposite.setLayout(new GridLayout(1, true));
- selector.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
- selector.getText().setEditable(false);
- selector.addCommitListener(new ICommitListener() {
-
- @Override
- public void commit(final AbstractEditor editor) {
- final Object value = selector.getValue();
- if (value instanceof String && ((String) value).length() > 0) {
- setFilePath((String) value);
- setPageComplete(isPageComplete());
- }
- }
- });
-
- final CLabel warningLabel = new CLabel(localComposite, SWT.NONE);
- warningLabel.setText(Messages.ImportFilePage_BeSureThatYourImportFileHasTheSameNumberOfColumns);
- warningLabel.setImage(org.eclipse.papyrus.infra.widgets.Activator.getDefault().getImage(Activator.PLUGIN_ID, "/icons/warning.gif")); //$NON-NLS-1$
- }
-
- /**
- *
- * @return
- * the label provider to use or <code>null</code> if not found
- */
- protected ILabelProvider getLabelProvider() {
- LabelProviderService labelService = null;
- try {
- labelService = ServiceUtilsForEObject.getInstance().getService(LabelProviderService.class, tableManager.getTable());
-
- } catch (ServiceException e) {
- Activator.log.error("Label Provider Service Not Found", e); //$NON-NLS-1$
- }
- if (labelService != null) {
- return labelService.getLabelProvider();
- }
- return null;
-
- }
-
- /**
- *
- * @see org.eclipse.jface.wizard.WizardPage#isPageComplete()
- *
- * @return
- */
- @Override
- public boolean isPageComplete() {
- return getFilePath() != null;
- }
-
-
- /**
- *
- * @return
- * the selected file
- */
- public String getFilePath() {
- return this.selectedFilePath;
- }
-
- /**
- *
- * @param filePath
- * find the file from the filePath and set it
- */
- protected void setFilePath(final String filePath) {
- if (filePath == null || filePath.length() == 0) {
- this.selectedFilePath = null;
- } else {
- this.selectedFilePath = filePath;
- }
-
- }
-
-}
+/*****************************************************************************
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.nattable.wizard.pages;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForEObject;
+import org.eclipse.papyrus.infra.nattable.Activator;
+import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
+import org.eclipse.papyrus.infra.nattable.messages.Messages;
+import org.eclipse.papyrus.infra.services.labelprovider.service.LabelProviderService;
+import org.eclipse.papyrus.infra.widgets.editors.AbstractEditor;
+import org.eclipse.papyrus.infra.widgets.editors.ICommitListener;
+import org.eclipse.papyrus.infra.widgets.editors.StringFileSelector;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.CLabel;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+
+/**
+ *
+ * Import page
+ *
+ */
+public class ImportFilePage extends WizardPage {
+
+ /**
+ * allowed file to import table
+ */
+ private static final String[] allowedFiles = new String[] { "*.csv" }; //$NON-NLS-1$
+
+ /**
+ * the selected file path
+ */
+ private String selectedFilePath;
+
+ /**
+ * the table manager where the import will be done
+ */
+ private final INattableModelManager tableManager;
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param pageName
+ * the name of the import page
+ * @param title
+ * the title of the page
+ * @param titleImage
+ * the image for this page
+ * @param tableManager
+ * the table manager where the import will be done
+ */
+ public ImportFilePage(final String pageName, final String title, final ImageDescriptor titleImage, final INattableModelManager tableManager) {
+ super(pageName, title, titleImage);
+ setDescription(Messages.ImportFilePage_SelectTheFileToImport);
+ this.tableManager = tableManager;
+ this.selectedFilePath = null;
+ }
+
+ /**
+ *
+ * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
+ *
+ * @param parent
+ */
+ @Override
+ public void createControl(final Composite parent) {
+ final Composite localComposite = new Composite(parent, SWT.NONE);
+ setControl(localComposite);
+ final ILabelProvider labelProvider = getLabelProvider();
+ Composite localParent = new Composite(localComposite, SWT.NONE);
+ final Label label = new Label(localParent, SWT.NONE);
+ label.setText(Messages.ImportFilePage_YourFileWillBeImported);
+ final CLabel cLabel = new CLabel(localParent, SWT.NONE);
+ cLabel.setText(tableManager.getTableName());
+
+ final Label label2 = new Label(localParent, SWT.NONE);
+ label2.setText(Messages.ImportFilePage_TheImportedElementWillBeAddedTo);
+ final CLabel cLabel2 = new CLabel(localParent, SWT.NONE);
+ cLabel2.setText(labelProvider.getText(tableManager.getTable().getContext()));
+ cLabel2.setImage(labelProvider.getImage(tableManager.getTable().getContext()));
+
+
+ cLabel.setImage(labelProvider.getImage(this.tableManager.getTable()));
+
+ localParent.setLayout(new GridLayout(2, true));
+ final StringFileSelector selector = new StringFileSelector(localComposite, SWT.NONE);
+ selector.setAllowFileSystem(true);
+ selector.setAllowWorkspace(true);
+ selector.setFilterExtensions(allowedFiles);
+
+ localComposite.setLayout(new GridLayout(1, true));
+ selector.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
+ selector.getText().setEditable(false);
+ selector.addCommitListener(new ICommitListener() {
+
+ @Override
+ public void commit(final AbstractEditor editor) {
+ final Object value = selector.getValue();
+ if (value instanceof String && ((String) value).length() > 0) {
+ setFilePath((String) value);
+ setPageComplete(isPageComplete());
+ }
+ }
+ });
+
+ final CLabel warningLabel = new CLabel(localComposite, SWT.NONE);
+ warningLabel.setText(Messages.ImportFilePage_BeSureThatYourImportFileHasTheSameNumberOfColumns);
+ warningLabel.setImage(org.eclipse.papyrus.infra.widgets.Activator.getDefault().getImage(Activator.PLUGIN_ID, "/icons/warning.gif")); //$NON-NLS-1$
+ }
+
+ /**
+ *
+ * @return
+ * the label provider to use or <code>null</code> if not found
+ */
+ protected ILabelProvider getLabelProvider() {
+ LabelProviderService labelService = null;
+ try {
+ labelService = ServiceUtilsForEObject.getInstance().getService(LabelProviderService.class, tableManager.getTable());
+
+ } catch (ServiceException e) {
+ Activator.log.error("Label Provider Service Not Found", e); //$NON-NLS-1$
+ }
+ if (labelService != null) {
+ return labelService.getLabelProvider();
+ }
+ return null;
+
+ }
+
+ /**
+ *
+ * @see org.eclipse.jface.wizard.WizardPage#isPageComplete()
+ *
+ * @return
+ */
+ @Override
+ public boolean isPageComplete() {
+ return getFilePath() != null;
+ }
+
+
+ /**
+ *
+ * @return
+ * the selected file
+ */
+ public String getFilePath() {
+ return this.selectedFilePath;
+ }
+
+ /**
+ *
+ * @param filePath
+ * find the file from the filePath and set it
+ */
+ public void setFilePath(final String filePath) {
+ if (filePath == null || filePath.length() == 0) {
+ this.selectedFilePath = null;
+ } else {
+ this.selectedFilePath = filePath;
+ }
+
+ }
+
+}
diff --git a/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.allocation.config/resources/allocation.nattableconfiguration b/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.allocation.config/resources/allocation.nattableconfiguration
index bc3054acfee..1ad0d2d3189 100644
--- a/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.allocation.config/resources/allocation.nattableconfiguration
+++ b/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.allocation.config/resources/allocation.nattableconfiguration
@@ -1,35 +1,39 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<nattableconfiguration:TableConfiguration xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:nattableaxis="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis" xmlns:nattableaxisconfiguration="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration" xmlns:nattableaxisprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider" xmlns:nattableconfiguration="http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration" xmlns:nattablelabelprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattablecontentprovider" xmlns:nattabletester="http://www.eclipse.org/papyrus/nattable/model/table/nattabletester" description="This table is used to display SysML Allocation" name="AllocationTable" type="PapyrusSysMLAllocationTable" iconPath="platform:/plugin/org.eclipse.papyrus.sysml.nattable.allocation.config/icons/table_SysML_Allocation.png" defaultRowAxisProvider="//@rowAxisProviders.0" defaultColumnAxisProvider="//@columnAxisProviders.0">
- <creationTester xsi:type="nattabletester:JavaTableTester" tester="org.eclipse.papyrus.sysml.nattable.allocation.config.allocationtablecreationtester"/>
- <rowHeaderAxisConfiguration xsi:type="nattableaxisconfiguration:TableHeaderAxisConfiguration" indexStyle="NUMERIC">
- <ownedLabelConfigurations xsi:type="nattablelabelprovider:ObjectLabelProviderConfiguration"/>
- <ownedAxisConfigurations xsi:type="nattableaxisconfiguration:EStructuralFeatureValueFillingConfiguration">
- <listenFeature xsi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Namespace/ownedMember"/>
- </ownedAxisConfigurations>
- <ownedAxisConfigurations xsi:type="nattableaxisconfiguration:PasteEObjectConfiguration" pastedElementId="org.eclipse.papyrus.sysml.Allocate">
- <pasteElementContainementFeature xsi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Package/packagedElement"/>
- <postActions>applyStereotype:/SysML::Allocations::Allocate</postActions>
- </ownedAxisConfigurations>
- <axisManagers xsi:type="nattableaxisconfiguration:AxisManagerRepresentation" axisManagerId="org.eclipse.papyrus.sysml.nattable.allocate.axis.manager" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.labelprovider" headerLabelConfiguration="//@rowHeaderAxisConfiguration/@ownedLabelConfigurations.0" specificAxisConfigurations="//@rowHeaderAxisConfiguration/@ownedAxisConfigurations.0"/>
- </rowHeaderAxisConfiguration>
- <columnHeaderAxisConfiguration xsi:type="nattableaxisconfiguration:TableHeaderAxisConfiguration">
- <ownedLabelConfigurations xsi:type="nattablelabelprovider:FeatureLabelProviderConfiguration"/>
- <axisManagers xsi:type="nattableaxisconfiguration:AxisManagerRepresentation" axisManagerId="org.eclipse.papyrus.uml.nattable.feature.axis.manager" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.feature.labelprovider" headerLabelConfiguration="//@columnHeaderAxisConfiguration/@ownedLabelConfigurations.0"/>
- <axisManagers xsi:type="nattableaxisconfiguration:AxisManagerRepresentation" axisManagerId="org.eclipse.papyrus.uml.nattable.stereotype.property.axis.manager" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.feature.labelprovider" headerLabelConfiguration="//@columnHeaderAxisConfiguration/@ownedLabelConfigurations.0"/>
- </columnHeaderAxisConfiguration>
- <columnAxisProviders xsi:type="nattableaxisprovider:SlaveObjectAxisProvider" description="This provider provides the default columns for the SysML Allocation Table" name="SysMLAllocationFeatureProvider">
- <axis xsi:type="nattableaxis:EStructuralFeatureAxis" manager="//@columnHeaderAxisConfiguration/@axisManagers.0">
- <element xsi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/name"/>
- </axis>
- <axis xsi:type="nattableaxis:EStructuralFeatureAxis" manager="//@columnHeaderAxisConfiguration/@axisManagers.0">
- <element xsi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//Dependency/client"/>
- </axis>
- <axis xsi:type="nattableaxis:EStructuralFeatureAxis" manager="//@columnHeaderAxisConfiguration/@axisManagers.0">
- <element xsi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//Dependency/supplier"/>
- </axis>
- <axis xsi:type="nattableaxis:EStructuralFeatureAxis" manager="//@columnHeaderAxisConfiguration/@axisManagers.0">
- <element xsi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//Element/owner"/>
- </axis>
- </columnAxisProviders>
- <rowAxisProviders xsi:type="nattableaxisprovider:MasterObjectAxisProvider" description="This row providers allows to display all Allocation in a Table" name="SysMLAllocationProvider" disconnectSlave="true"/>
-</nattableconfiguration:TableConfiguration>
+<?xml version="1.0" encoding="UTF-8"?>
+<nattableconfiguration:TableConfiguration xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:nattableaxis="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis" xmlns:nattableaxisconfiguration="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration" xmlns:nattableaxisprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider" xmlns:nattableconfiguration="http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration" xmlns:nattablelabelprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattablecontentprovider" xmlns:nattabletester="http://www.eclipse.org/papyrus/nattable/model/table/nattabletester" description="This table is used to display SysML Allocation" name="AllocationTable" type="PapyrusSysMLAllocationTable" iconPath="platform:/plugin/org.eclipse.papyrus.sysml.nattable.allocation.config/icons/table_SysML_Allocation.png" defaultRowAxisProvider="//@rowAxisProviders.0" defaultColumnAxisProvider="//@columnAxisProviders.0">
+ <creationTester xsi:type="nattabletester:JavaTableTester" tester="org.eclipse.papyrus.sysml.nattable.allocation.config.allocationtablecreationtester"/>
+ <rowHeaderAxisConfiguration xsi:type="nattableaxisconfiguration:TableHeaderAxisConfiguration" indexStyle="NUMERIC">
+ <ownedLabelConfigurations xsi:type="nattablelabelprovider:ObjectLabelProviderConfiguration"/>
+ <ownedAxisConfigurations xsi:type="nattableaxisconfiguration:EStructuralFeatureValueFillingConfiguration">
+ <listenFeature xsi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Namespace/ownedMember"/>
+ </ownedAxisConfigurations>
+ <ownedAxisConfigurations xsi:type="nattableaxisconfiguration:PasteEObjectConfiguration" pastedElementId="org.eclipse.papyrus.sysml.Allocate">
+ <pasteElementContainementFeature xsi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Package/packagedElement"/>
+ <postActions>applyStereotype:/SysML::Allocations::Allocate</postActions>
+ <axisIdentifier xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_OgydQXmoEeWVZIGG1XbiFw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.allocation.config/configs/allocation.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axisIdentifier>
+ </ownedAxisConfigurations>
+ <axisManagers xsi:type="nattableaxisconfiguration:AxisManagerRepresentation" axisManagerId="org.eclipse.papyrus.sysml.nattable.allocate.axis.manager" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.labelprovider" headerLabelConfiguration="//@rowHeaderAxisConfiguration/@ownedLabelConfigurations.0" specificAxisConfigurations="//@rowHeaderAxisConfiguration/@ownedAxisConfigurations.0"/>
+ </rowHeaderAxisConfiguration>
+ <columnHeaderAxisConfiguration xsi:type="nattableaxisconfiguration:TableHeaderAxisConfiguration">
+ <ownedLabelConfigurations xsi:type="nattablelabelprovider:FeatureLabelProviderConfiguration"/>
+ <axisManagers xsi:type="nattableaxisconfiguration:AxisManagerRepresentation" axisManagerId="org.eclipse.papyrus.uml.nattable.feature.axis.manager" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.feature.labelprovider" headerLabelConfiguration="//@columnHeaderAxisConfiguration/@ownedLabelConfigurations.0"/>
+ <axisManagers xsi:type="nattableaxisconfiguration:AxisManagerRepresentation" axisManagerId="org.eclipse.papyrus.uml.nattable.stereotype.property.axis.manager" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.feature.labelprovider" headerLabelConfiguration="//@columnHeaderAxisConfiguration/@ownedLabelConfigurations.0"/>
+ </columnHeaderAxisConfiguration>
+ <columnAxisProviders xsi:type="nattableaxisprovider:SlaveObjectAxisProvider" description="This provider provides the default columns for the SysML Allocation Table" name="SysMLAllocationFeatureProvider">
+ <axis xsi:type="nattableaxis:EStructuralFeatureAxis" manager="//@columnHeaderAxisConfiguration/@axisManagers.0">
+ <element xsi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/name"/>
+ </axis>
+ <axis xsi:type="nattableaxis:EStructuralFeatureAxis" manager="//@columnHeaderAxisConfiguration/@axisManagers.0">
+ <element xsi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//Dependency/client"/>
+ </axis>
+ <axis xsi:type="nattableaxis:EStructuralFeatureAxis" manager="//@columnHeaderAxisConfiguration/@axisManagers.0">
+ <element xsi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//Dependency/supplier"/>
+ </axis>
+ <axis xsi:type="nattableaxis:EStructuralFeatureAxis" manager="//@columnHeaderAxisConfiguration/@axisManagers.0">
+ <element xsi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//Element/owner"/>
+ </axis>
+ </columnAxisProviders>
+ <rowAxisProviders xsi:type="nattableaxisprovider:MasterObjectAxisProvider" description="This row providers allows to display all Allocation in a Table" name="SysMLAllocationProvider" disconnectSlave="true"/>
+</nattableconfiguration:TableConfiguration>
diff --git a/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration b/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration
index 255510ad166..b139c018153 100644
--- a/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration
+++ b/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration
@@ -1,28 +1,32 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<nattableconfiguration:TableConfiguration xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:nattableaxis="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis" xmlns:nattableaxisconfiguration="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration" xmlns:nattableaxisprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider" xmlns:nattableconfiguration="http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration" xmlns:nattablelabelprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattablecontentprovider" xmlns:nattabletester="http://www.eclipse.org/papyrus/nattable/model/table/nattabletester" description="A synchronized table for SysML Requirements" name="RequirementTable" type="PapyrusSysMLRequirementTable" iconPath="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/icons/table_SysML_Requirement.png" defaultRowAxisProvider="//@rowAxisProviders.0" defaultColumnAxisProvider="//@columnAxisProviders.0">
- <creationTester xsi:type="nattabletester:JavaTableTester" tester="org.eclipse.papyrus.sysml.nattable.config.canCreateRequirementTable"/>
- <rowHeaderAxisConfiguration xsi:type="nattableaxisconfiguration:TableHeaderAxisConfiguration" indexStyle="NUMERIC">
- <ownedLabelConfigurations xsi:type="nattablelabelprovider:ObjectLabelProviderConfiguration"/>
- <ownedAxisConfigurations xsi:type="nattableaxisconfiguration:EStructuralFeatureValueFillingConfiguration">
- <listenFeature xsi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Namespace/ownedMember"/>
- </ownedAxisConfigurations>
- <ownedAxisConfigurations xsi:type="nattableaxisconfiguration:PasteEObjectConfiguration" pastedElementId="org.eclipse.papyrus.sysml.Requirement">
- <postActions>applyStereotype:/SysML::Requirements::Requirement</postActions>
- <pasteElementContainementFeature xsi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Package/packagedElement"/>
- </ownedAxisConfigurations>
- <axisManagers xsi:type="nattableaxisconfiguration:AxisManagerRepresentation" axisManagerId="org.eclipse.papyrus.sysml.nattable.requirement.axis.manager" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.labelprovider" headerLabelConfiguration="//@rowHeaderAxisConfiguration/@ownedLabelConfigurations.0" specificAxisConfigurations="//@rowHeaderAxisConfiguration/@ownedAxisConfigurations.0"/>
- </rowHeaderAxisConfiguration>
- <columnHeaderAxisConfiguration xsi:type="nattableaxisconfiguration:TableHeaderAxisConfiguration">
- <ownedLabelConfigurations xsi:type="nattablelabelprovider:FeatureLabelProviderConfiguration"/>
- <axisManagers xsi:type="nattableaxisconfiguration:AxisManagerRepresentation" axisManagerId="org.eclipse.papyrus.uml.nattable.feature.axis.manager" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.feature.labelprovider" headerLabelConfiguration="//@columnHeaderAxisConfiguration/@ownedLabelConfigurations.0"/>
- <axisManagers xsi:type="nattableaxisconfiguration:AxisManagerRepresentation" axisManagerId="org.eclipse.papyrus.uml.nattable.stereotype.property.axis.manager" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.feature.labelprovider" headerLabelConfiguration="//@columnHeaderAxisConfiguration/@ownedLabelConfigurations.0"/>
- </columnHeaderAxisConfiguration>
- <columnAxisProviders xsi:type="nattableaxisprovider:SlaveObjectAxisProvider" description="Provides the columns of the tables with a default configuration" name="Requirements Feature Columns Provider">
- <axis xsi:type="nattableaxis:FeatureIdAxis" manager="//@columnHeaderAxisConfiguration/@axisManagers.1" element="property_of_stereotype:/SysML::Requirements::Requirement::id"/>
- <axis xsi:type="nattableaxis:EStructuralFeatureAxis" manager="//@columnHeaderAxisConfiguration/@axisManagers.0">
- <element xsi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/name"/>
- </axis>
- <axis xsi:type="nattableaxis:FeatureIdAxis" manager="//@columnHeaderAxisConfiguration/@axisManagers.1" element="property_of_stereotype:/SysML::Requirements::Requirement::text"/>
- </columnAxisProviders>
- <rowAxisProviders xsi:type="nattableaxisprovider:MasterObjectAxisProvider" description="Provides the requirements directly owned by the context of the table" name="Requirement Axis Provider" disconnectSlave="true"/>
-</nattableconfiguration:TableConfiguration>
+<?xml version="1.0" encoding="UTF-8"?>
+<nattableconfiguration:TableConfiguration xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:nattableaxis="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis" xmlns:nattableaxisconfiguration="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration" xmlns:nattableaxisprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider" xmlns:nattableconfiguration="http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration" xmlns:nattablelabelprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattablecontentprovider" xmlns:nattabletester="http://www.eclipse.org/papyrus/nattable/model/table/nattabletester" description="A synchronized table for SysML Requirements" name="RequirementTable" type="PapyrusSysMLRequirementTable" iconPath="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/icons/table_SysML_Requirement.png" defaultRowAxisProvider="//@rowAxisProviders.0" defaultColumnAxisProvider="//@columnAxisProviders.0">
+ <creationTester xsi:type="nattabletester:JavaTableTester" tester="org.eclipse.papyrus.sysml.nattable.config.canCreateRequirementTable"/>
+ <rowHeaderAxisConfiguration xsi:type="nattableaxisconfiguration:TableHeaderAxisConfiguration" indexStyle="NUMERIC">
+ <ownedLabelConfigurations xsi:type="nattablelabelprovider:ObjectLabelProviderConfiguration"/>
+ <ownedAxisConfigurations xsi:type="nattableaxisconfiguration:EStructuralFeatureValueFillingConfiguration">
+ <listenFeature xsi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Namespace/ownedMember"/>
+ </ownedAxisConfigurations>
+ <ownedAxisConfigurations xsi:type="nattableaxisconfiguration:PasteEObjectConfiguration" pastedElementId="org.eclipse.papyrus.sysml.Requirement">
+ <postActions>applyStereotype:/SysML::Requirements::Requirement</postActions>
+ <pasteElementContainementFeature xsi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Package/packagedElement"/>
+ <axisIdentifier xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_OgydQXmoEeWVZIGG1XbiFw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axisIdentifier>
+ </ownedAxisConfigurations>
+ <axisManagers xsi:type="nattableaxisconfiguration:AxisManagerRepresentation" axisManagerId="org.eclipse.papyrus.sysml.nattable.requirement.axis.manager" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.labelprovider" headerLabelConfiguration="//@rowHeaderAxisConfiguration/@ownedLabelConfigurations.0" specificAxisConfigurations="//@rowHeaderAxisConfiguration/@ownedAxisConfigurations.0"/>
+ </rowHeaderAxisConfiguration>
+ <columnHeaderAxisConfiguration xsi:type="nattableaxisconfiguration:TableHeaderAxisConfiguration">
+ <ownedLabelConfigurations xsi:type="nattablelabelprovider:FeatureLabelProviderConfiguration"/>
+ <axisManagers xsi:type="nattableaxisconfiguration:AxisManagerRepresentation" axisManagerId="org.eclipse.papyrus.uml.nattable.feature.axis.manager" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.feature.labelprovider" headerLabelConfiguration="//@columnHeaderAxisConfiguration/@ownedLabelConfigurations.0"/>
+ <axisManagers xsi:type="nattableaxisconfiguration:AxisManagerRepresentation" axisManagerId="org.eclipse.papyrus.uml.nattable.stereotype.property.axis.manager" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.feature.labelprovider" headerLabelConfiguration="//@columnHeaderAxisConfiguration/@ownedLabelConfigurations.0"/>
+ </columnHeaderAxisConfiguration>
+ <columnAxisProviders xsi:type="nattableaxisprovider:SlaveObjectAxisProvider" description="Provides the columns of the tables with a default configuration" name="Requirements Feature Columns Provider">
+ <axis xsi:type="nattableaxis:FeatureIdAxis" manager="//@columnHeaderAxisConfiguration/@axisManagers.1" element="property_of_stereotype:/SysML::Requirements::Requirement::id"/>
+ <axis xsi:type="nattableaxis:EStructuralFeatureAxis" manager="//@columnHeaderAxisConfiguration/@axisManagers.0">
+ <element xsi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/name"/>
+ </axis>
+ <axis xsi:type="nattableaxis:FeatureIdAxis" manager="//@columnHeaderAxisConfiguration/@axisManagers.1" element="property_of_stereotype:/SysML::Requirements::Requirement::text"/>
+ </columnAxisProviders>
+ <rowAxisProviders xsi:type="nattableaxisprovider:MasterObjectAxisProvider" description="Provides the requirements directly owned by the context of the table" name="Requirement Axis Provider" disconnectSlave="true"/>
+</nattableconfiguration:TableConfiguration>
diff --git a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config/configs/class_synchronized_tree.nattableconfiguration b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config/configs/class_synchronized_tree.nattableconfiguration
index d7bb17383b1..df516b09eff 100644
--- a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config/configs/class_synchronized_tree.nattableconfiguration
+++ b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config/configs/class_synchronized_tree.nattableconfiguration
@@ -1,61 +1,65 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<nattableconfiguration:TableConfiguration xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:nattableaxis="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis" xmlns:nattableaxisconfiguration="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration" xmlns:nattableaxisprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider" xmlns:nattableconfiguration="http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration" xmlns:nattablelabelprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattablecontentprovider" xmlns:nattablestyle="http://www.eclipse.org/papyrus/nattable/model/table/nattablestyle" xmlns:nattabletester="http://www.eclipse.org/papyrus/nattable/model/table/nattabletester" description="" name="ClassTreeTable" type="PapyrusClassTreeTable" iconPath="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/icons/uml_generic_table.png" defaultRowAxisProvider="//@rowAxisProviders.0" defaultColumnAxisProvider="//@columnAxisProviders.0">
- <styles xsi:type="nattablestyle:TableDisplayStyle" displayStyle="HIERARCHIC_MULTI_TREE_COLUMN"/>
- <creationTester xsi:type="nattabletester:JavaTableTester" tester="org.eclipse.papyrus.uml.nattable.tester.isumlelement"/>
- <rowHeaderAxisConfiguration xsi:type="nattableaxisconfiguration:TableHeaderAxisConfiguration" indexStyle="NUMERIC">
- <ownedLabelConfigurations xsi:type="nattablelabelprovider:ObjectLabelProviderConfiguration"/>
- <ownedLabelConfigurations xsi:type="nattablelabelprovider:FeatureLabelProviderConfiguration" displayType="false" displayMultiplicity="false"/>
- <ownedAxisConfigurations xsi:type="nattableaxisconfiguration:TreeFillingConfiguration" pasteConfiguration="//@rowHeaderAxisConfiguration/@ownedAxisConfigurations.5" labelProvider="//@rowHeaderAxisConfiguration/@ownedLabelConfigurations.1" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.treefilling.feature.labelprovider">
- <axisUsedAsAxisProvider xsi:type="nattableaxis:EStructuralFeatureAxis" alias="Class">
- <element xsi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Package/packagedElement"/>
- </axisUsedAsAxisProvider>
- </ownedAxisConfigurations>
- <ownedAxisConfigurations xsi:type="nattableaxisconfiguration:TreeFillingConfiguration" pasteConfiguration="//@rowHeaderAxisConfiguration/@ownedAxisConfigurations.6" depth="1" labelProvider="//@rowHeaderAxisConfiguration/@ownedLabelConfigurations.1" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.treefilling.feature.labelprovider">
- <axisUsedAsAxisProvider xsi:type="nattableaxis:EStructuralFeatureAxis" alias="">
- <element xsi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//StructuredClassifier/ownedAttribute"/>
- </axisUsedAsAxisProvider>
- </ownedAxisConfigurations>
- <ownedAxisConfigurations xsi:type="nattableaxisconfiguration:TreeFillingConfiguration" pasteConfiguration="//@rowHeaderAxisConfiguration/@ownedAxisConfigurations.7" depth="1" labelProvider="//@rowHeaderAxisConfiguration/@ownedLabelConfigurations.1" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.treefilling.feature.labelprovider">
- <axisUsedAsAxisProvider xsi:type="nattableaxis:EStructuralFeatureAxis" alias="">
- <element xsi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class/ownedOperation"/>
- </axisUsedAsAxisProvider>
- </ownedAxisConfigurations>
- <ownedAxisConfigurations xsi:type="nattableaxisconfiguration:TreeFillingConfiguration" pasteConfiguration="//@rowHeaderAxisConfiguration/@ownedAxisConfigurations.8" depth="1" labelProvider="//@rowHeaderAxisConfiguration/@ownedLabelConfigurations.1" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.treefilling.feature.labelprovider">
- <axisUsedAsAxisProvider xsi:type="nattableaxis:EStructuralFeatureAxis" alias="">
- <element xsi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class/nestedClassifier"/>
- </axisUsedAsAxisProvider>
- </ownedAxisConfigurations>
- <ownedAxisConfigurations xsi:type="nattableaxisconfiguration:TreeFillingConfiguration" pasteConfiguration="//@rowHeaderAxisConfiguration/@ownedAxisConfigurations.9" depth="2" labelProvider="//@rowHeaderAxisConfiguration/@ownedLabelConfigurations.1" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.treefilling.feature.labelprovider">
- <axisUsedAsAxisProvider xsi:type="nattableaxis:EStructuralFeatureAxis" alias="">
- <element xsi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//BehavioralFeature/ownedParameter"/>
- </axisUsedAsAxisProvider>
- </ownedAxisConfigurations>
- <ownedAxisConfigurations xsi:type="nattableaxisconfiguration:PasteEObjectConfiguration" pastedElementId="org.eclipse.papyrus.uml.Class">
- <pasteElementContainementFeature xsi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Package/packagedElement"/>
- </ownedAxisConfigurations>
- <ownedAxisConfigurations xsi:type="nattableaxisconfiguration:PasteEObjectConfiguration" pastedElementId="org.eclipse.papyrus.uml.Property">
- <pasteElementContainementFeature xsi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//StructuredClassifier/ownedAttribute"/>
- </ownedAxisConfigurations>
- <ownedAxisConfigurations xsi:type="nattableaxisconfiguration:PasteEObjectConfiguration" pastedElementId="org.eclipse.papyrus.uml.Operation">
- <pasteElementContainementFeature xsi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class/ownedOperation"/>
- </ownedAxisConfigurations>
- <ownedAxisConfigurations xsi:type="nattableaxisconfiguration:PasteEObjectConfiguration" pastedElementId="org.eclipse.papyrus.uml.Class">
- <pasteElementContainementFeature xsi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class/nestedClassifier"/>
- </ownedAxisConfigurations>
- <ownedAxisConfigurations xsi:type="nattableaxisconfiguration:PasteEObjectConfiguration" pastedElementId="org.eclipse.papyrus.uml.Parameter">
- <pasteElementContainementFeature xsi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//BehavioralFeature/ownedParameter"/>
- </ownedAxisConfigurations>
- <axisManagers xsi:type="nattableaxisconfiguration:AxisManagerRepresentation" axisManagerId="org.eclipse.papyrus.infra.uml.nattable.class.tree.axis.manager" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.labelprovider" headerLabelConfiguration="//@rowHeaderAxisConfiguration/@ownedLabelConfigurations.0" specificAxisConfigurations="//@rowHeaderAxisConfiguration/@ownedAxisConfigurations.0 //@rowHeaderAxisConfiguration/@ownedAxisConfigurations.1 //@rowHeaderAxisConfiguration/@ownedAxisConfigurations.3 //@rowHeaderAxisConfiguration/@ownedAxisConfigurations.2 //@rowHeaderAxisConfiguration/@ownedAxisConfigurations.4"/>
- </rowHeaderAxisConfiguration>
- <columnHeaderAxisConfiguration xsi:type="nattableaxisconfiguration:TableHeaderAxisConfiguration">
- <ownedLabelConfigurations xsi:type="nattablelabelprovider:FeatureLabelProviderConfiguration"/>
- <axisManagers xsi:type="nattableaxisconfiguration:AxisManagerRepresentation" axisManagerId="org.eclipse.papyrus.uml.nattable.feature.axis.manager" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.feature.labelprovider" headerLabelConfiguration="//@columnHeaderAxisConfiguration/@ownedLabelConfigurations.0"/>
- <axisManagers xsi:type="nattableaxisconfiguration:AxisManagerRepresentation" axisManagerId="org.eclipse.papyrus.uml.nattable.stereotype.property.axis.manager" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.feature.labelprovider" headerLabelConfiguration="//@columnHeaderAxisConfiguration/@ownedLabelConfigurations.0"/>
- </columnHeaderAxisConfiguration>
- <columnAxisProviders xsi:type="nattableaxisprovider:SlaveObjectAxisProvider" description="This axis provider provides available columns according to the rows of the table (features of the object displayed on the other axis)" name="UML Feature axis provider">
- <axis xsi:type="nattableaxis:EStructuralFeatureAxis" manager="//@columnHeaderAxisConfiguration/@axisManagers.0">
- <element xsi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
- </axis>
- </columnAxisProviders>
- <rowAxisProviders xsi:type="nattableaxisprovider:MasterObjectAxisProvider" description="This axis provider manages the rows, according to the wanted hierarchy" name="HierarchicalRowaAxisManager" disconnectSlave="true"/>
-</nattableconfiguration:TableConfiguration>
+<?xml version="1.0" encoding="UTF-8"?>
+<nattableconfiguration:TableConfiguration xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:nattableaxis="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis" xmlns:nattableaxisconfiguration="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration" xmlns:nattableaxisprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider" xmlns:nattableconfiguration="http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration" xmlns:nattablelabelprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattablecontentprovider" xmlns:nattablestyle="http://www.eclipse.org/papyrus/nattable/model/table/nattablestyle" xmlns:nattabletester="http://www.eclipse.org/papyrus/nattable/model/table/nattabletester" description="" name="ClassTreeTable" type="PapyrusClassTreeTable" iconPath="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/icons/uml_generic_table.png" defaultRowAxisProvider="//@rowAxisProviders.0" defaultColumnAxisProvider="//@columnAxisProviders.0">
+ <styles xsi:type="nattablestyle:TableDisplayStyle" displayStyle="HIERARCHIC_MULTI_TREE_COLUMN"/>
+ <creationTester xsi:type="nattabletester:JavaTableTester" tester="org.eclipse.papyrus.uml.nattable.tester.isumlelement"/>
+ <rowHeaderAxisConfiguration xsi:type="nattableaxisconfiguration:TableHeaderAxisConfiguration" indexStyle="NUMERIC">
+ <ownedLabelConfigurations xsi:type="nattablelabelprovider:ObjectLabelProviderConfiguration"/>
+ <ownedLabelConfigurations xsi:type="nattablelabelprovider:FeatureLabelProviderConfiguration" displayType="false" displayMultiplicity="false"/>
+ <ownedAxisConfigurations xsi:type="nattableaxisconfiguration:TreeFillingConfiguration" pasteConfiguration="//@rowHeaderAxisConfiguration/@ownedAxisConfigurations.5" labelProvider="//@rowHeaderAxisConfiguration/@ownedLabelConfigurations.1" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.treefilling.feature.labelprovider">
+ <axisUsedAsAxisProvider xsi:type="nattableaxis:EStructuralFeatureAxis" alias="Class">
+ <element xsi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Package/packagedElement"/>
+ </axisUsedAsAxisProvider>
+ </ownedAxisConfigurations>
+ <ownedAxisConfigurations xsi:type="nattableaxisconfiguration:TreeFillingConfiguration" pasteConfiguration="//@rowHeaderAxisConfiguration/@ownedAxisConfigurations.6" depth="1" labelProvider="//@rowHeaderAxisConfiguration/@ownedLabelConfigurations.1" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.treefilling.feature.labelprovider">
+ <axisUsedAsAxisProvider xsi:type="nattableaxis:EStructuralFeatureAxis" alias="">
+ <element xsi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//StructuredClassifier/ownedAttribute"/>
+ </axisUsedAsAxisProvider>
+ </ownedAxisConfigurations>
+ <ownedAxisConfigurations xsi:type="nattableaxisconfiguration:TreeFillingConfiguration" pasteConfiguration="//@rowHeaderAxisConfiguration/@ownedAxisConfigurations.7" depth="1" labelProvider="//@rowHeaderAxisConfiguration/@ownedLabelConfigurations.1" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.treefilling.feature.labelprovider">
+ <axisUsedAsAxisProvider xsi:type="nattableaxis:EStructuralFeatureAxis" alias="">
+ <element xsi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class/ownedOperation"/>
+ </axisUsedAsAxisProvider>
+ </ownedAxisConfigurations>
+ <ownedAxisConfigurations xsi:type="nattableaxisconfiguration:TreeFillingConfiguration" pasteConfiguration="//@rowHeaderAxisConfiguration/@ownedAxisConfigurations.8" depth="1" labelProvider="//@rowHeaderAxisConfiguration/@ownedLabelConfigurations.1" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.treefilling.feature.labelprovider">
+ <axisUsedAsAxisProvider xsi:type="nattableaxis:EStructuralFeatureAxis" alias="">
+ <element xsi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class/nestedClassifier"/>
+ </axisUsedAsAxisProvider>
+ </ownedAxisConfigurations>
+ <ownedAxisConfigurations xsi:type="nattableaxisconfiguration:TreeFillingConfiguration" pasteConfiguration="//@rowHeaderAxisConfiguration/@ownedAxisConfigurations.9" depth="2" labelProvider="//@rowHeaderAxisConfiguration/@ownedLabelConfigurations.1" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.treefilling.feature.labelprovider">
+ <axisUsedAsAxisProvider xsi:type="nattableaxis:EStructuralFeatureAxis" alias="">
+ <element xsi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//BehavioralFeature/ownedParameter"/>
+ </axisUsedAsAxisProvider>
+ </ownedAxisConfigurations>
+ <ownedAxisConfigurations xsi:type="nattableaxisconfiguration:PasteEObjectConfiguration" pastedElementId="org.eclipse.papyrus.uml.Class">
+ <pasteElementContainementFeature xsi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Package/packagedElement"/>
+ <axisIdentifier xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_inl0QHl4EeWqi9yWvPfrQQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.clazz.config/configs/class_synchronized_tree.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axisIdentifier>
+ </ownedAxisConfigurations>
+ <ownedAxisConfigurations xsi:type="nattableaxisconfiguration:PasteEObjectConfiguration" pastedElementId="org.eclipse.papyrus.uml.Property">
+ <pasteElementContainementFeature xsi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//StructuredClassifier/ownedAttribute"/>
+ </ownedAxisConfigurations>
+ <ownedAxisConfigurations xsi:type="nattableaxisconfiguration:PasteEObjectConfiguration" pastedElementId="org.eclipse.papyrus.uml.Operation">
+ <pasteElementContainementFeature xsi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class/ownedOperation"/>
+ </ownedAxisConfigurations>
+ <ownedAxisConfigurations xsi:type="nattableaxisconfiguration:PasteEObjectConfiguration" pastedElementId="org.eclipse.papyrus.uml.Class">
+ <pasteElementContainementFeature xsi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class/nestedClassifier"/>
+ </ownedAxisConfigurations>
+ <ownedAxisConfigurations xsi:type="nattableaxisconfiguration:PasteEObjectConfiguration" pastedElementId="org.eclipse.papyrus.uml.Parameter">
+ <pasteElementContainementFeature xsi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//BehavioralFeature/ownedParameter"/>
+ </ownedAxisConfigurations>
+ <axisManagers xsi:type="nattableaxisconfiguration:AxisManagerRepresentation" axisManagerId="org.eclipse.papyrus.infra.uml.nattable.class.tree.axis.manager" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.labelprovider" headerLabelConfiguration="//@rowHeaderAxisConfiguration/@ownedLabelConfigurations.0" specificAxisConfigurations="//@rowHeaderAxisConfiguration/@ownedAxisConfigurations.0 //@rowHeaderAxisConfiguration/@ownedAxisConfigurations.1 //@rowHeaderAxisConfiguration/@ownedAxisConfigurations.3 //@rowHeaderAxisConfiguration/@ownedAxisConfigurations.2 //@rowHeaderAxisConfiguration/@ownedAxisConfigurations.4"/>
+ </rowHeaderAxisConfiguration>
+ <columnHeaderAxisConfiguration xsi:type="nattableaxisconfiguration:TableHeaderAxisConfiguration">
+ <ownedLabelConfigurations xsi:type="nattablelabelprovider:FeatureLabelProviderConfiguration"/>
+ <axisManagers xsi:type="nattableaxisconfiguration:AxisManagerRepresentation" axisManagerId="org.eclipse.papyrus.uml.nattable.feature.axis.manager" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.feature.labelprovider" headerLabelConfiguration="//@columnHeaderAxisConfiguration/@ownedLabelConfigurations.0"/>
+ <axisManagers xsi:type="nattableaxisconfiguration:AxisManagerRepresentation" axisManagerId="org.eclipse.papyrus.uml.nattable.stereotype.property.axis.manager" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.feature.labelprovider" headerLabelConfiguration="//@columnHeaderAxisConfiguration/@ownedLabelConfigurations.0"/>
+ </columnHeaderAxisConfiguration>
+ <columnAxisProviders xsi:type="nattableaxisprovider:SlaveObjectAxisProvider" description="This axis provider provides available columns according to the rows of the table (features of the object displayed on the other axis)" name="UML Feature axis provider">
+ <axis xsi:type="nattableaxis:EStructuralFeatureAxis" manager="//@columnHeaderAxisConfiguration/@axisManagers.0">
+ <element xsi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axis>
+ </columnAxisProviders>
+ <rowAxisProviders xsi:type="nattableaxisprovider:MasterObjectAxisProvider" description="This axis provider manages the rows, according to the wanted hierarchy" name="HierarchicalRowaAxisManager" disconnectSlave="true"/>
+</nattableconfiguration:TableConfiguration>
diff --git a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.stereotype.display/src/org/eclipse/papyrus/uml/nattable/stereotype/display/label/provider/StereotypeDisplayPropertyHeaderLabelProvider.java b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.stereotype.display/src/org/eclipse/papyrus/uml/nattable/stereotype/display/label/provider/StereotypeDisplayPropertyHeaderLabelProvider.java
index 9b45c2a801d..8c8c2e994ac 100644
--- a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.stereotype.display/src/org/eclipse/papyrus/uml/nattable/stereotype/display/label/provider/StereotypeDisplayPropertyHeaderLabelProvider.java
+++ b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.stereotype.display/src/org/eclipse/papyrus/uml/nattable/stereotype/display/label/provider/StereotypeDisplayPropertyHeaderLabelProvider.java
@@ -26,6 +26,7 @@ import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.IAxis;
import org.eclipse.papyrus.infra.nattable.model.nattable.nattablelabelprovider.FeatureLabelProviderConfiguration;
import org.eclipse.papyrus.infra.nattable.model.nattable.nattablelabelprovider.ILabelProviderConfiguration;
import org.eclipse.papyrus.infra.nattable.model.nattable.nattablelabelprovider.ObjectLabelProviderConfiguration;
+import org.eclipse.papyrus.infra.nattable.utils.ILabelProviderCellContextElementWrapper;
import org.eclipse.papyrus.infra.nattable.utils.ILabelProviderContextElementWrapper;
import org.eclipse.papyrus.infra.nattable.utils.LabelConfigurationManagementUtils;
import org.eclipse.papyrus.infra.nattable.utils.LabelProviderCellContextElementWrapper;
@@ -119,13 +120,13 @@ public class StereotypeDisplayPropertyHeaderLabelProvider extends EMFFeatureHead
* @see org.eclipse.papyrus.infra.nattable.provider.AbstractNattableCellLabelProvider#getLabelConfiguration(org.eclipse.papyrus.infra.nattable.utils.LabelProviderCellContextElementWrapper)
*/
@Override
- protected ILabelProviderConfiguration getLabelConfiguration(final LabelProviderCellContextElementWrapper wrapper) {
+ protected ILabelProviderConfiguration getLabelConfiguration(final ILabelProviderCellContextElementWrapper wrapper) {
ILabelProviderConfiguration conf = null;
final IConfigRegistry configRegistry = wrapper.getConfigRegistry();
final INattableModelManager modelManager = configRegistry.getConfigAttribute(NattableConfigAttributes.NATTABLE_MODEL_MANAGER_CONFIG_ATTRIBUTE, DisplayMode.NORMAL, NattableConfigAttributes.NATTABLE_MODEL_MANAGER_ID);
final Table table = modelManager.getTable();
- if (wrapper instanceof LabelProviderCellContextElementWrapper) {
- LabelStack labels = ((LabelProviderCellContextElementWrapper) wrapper).getConfigLabels();
+ if (wrapper instanceof ILabelProviderCellContextElementWrapper) {
+ LabelStack labels = ((ILabelProviderCellContextElementWrapper) wrapper).getConfigLabels();
if (labels.hasLabel(GridRegion.COLUMN_HEADER)) {
conf = LabelConfigurationManagementUtils.getUsedColumnFeatureLabelConfiguration(table);
} else if (labels.hasLabel(GridRegion.ROW_HEADER)) {
diff --git a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/manager/axis/UMLElementAxisManager.java b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/manager/axis/UMLElementAxisManager.java
index ab03e48dd18..5ca1610a1c1 100644
--- a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/manager/axis/UMLElementAxisManager.java
+++ b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/manager/axis/UMLElementAxisManager.java
@@ -1,61 +1,70 @@
-/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.nattable.manager.axis;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.gmf.runtime.emf.type.core.ElementTypeRegistry;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.papyrus.infra.emf.nattable.manager.axis.EObjectAxisManager;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- *
- * This axis manager restrict the allowed contents to UML Element
- *
- */
-public class UMLElementAxisManager extends EObjectAxisManager {
-
- /**
- *
- * @see org.eclipse.papyrus.infra.emf.nattable.manager.axis.EObjectAxisManager#isAllowedContents(java.lang.Object)
- *
- * @param object
- * @return
- */
- @Override
- public boolean isAllowedContents(Object object) {
- return object instanceof Element;
- }
-
- /**
- *
- * @see org.eclipse.papyrus.infra.nattable.manager.axis.AbstractAxisManager#canCreateAxisElement(java.lang.String)
- *
- * @param elementId
- * @return
- */
- @Override
- public boolean canCreateAxisElement(String elementId) {
- final IElementType types = ElementTypeRegistry.getInstance().getType(elementId);
- final EClass eClass = types.getEClass();
- if (eClass != null) {
- if (eClass.getEPackage() == UMLPackage.eINSTANCE) {
- return true;
- }
- }
- return false;
- }
-
-}
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.nattable.manager.axis;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.gmf.runtime.emf.type.core.ElementTypeRegistry;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.SpecializationType;
+import org.eclipse.papyrus.infra.emf.nattable.manager.axis.EObjectAxisManager;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ *
+ * This axis manager restrict the allowed contents to UML Element
+ *
+ */
+public class UMLElementAxisManager extends EObjectAxisManager {
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.emf.nattable.manager.axis.EObjectAxisManager#isAllowedContents(java.lang.Object)
+ *
+ * @param object
+ * @return
+ */
+ @Override
+ public boolean isAllowedContents(Object object) {
+ return object instanceof Element;
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.axis.AbstractAxisManager#canCreateAxisElement(java.lang.String)
+ *
+ * @param elementId
+ * @return
+ */
+ @Override
+ public boolean canCreateAxisElement(String elementId) {
+ if (elementId == null) {
+ return false;
+ }
+
+ final IElementType types = ElementTypeRegistry.getInstance().getType(elementId);
+ if (types == null || (types instanceof SpecializationType && ((SpecializationType) types).getMetamodelType() == null)) {
+ return false;
+ }
+
+ final EClass eClass = types.getEClass();
+ if (eClass != null) {
+ if (eClass.getEPackage() == UMLPackage.eINSTANCE) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+}
diff --git a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/manager/axis/UMLElementTreeAxisManagerForEventList.java b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/manager/axis/UMLElementTreeAxisManagerForEventList.java
index f6489082f06..4a2d11b42fd 100644
--- a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/manager/axis/UMLElementTreeAxisManagerForEventList.java
+++ b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/manager/axis/UMLElementTreeAxisManagerForEventList.java
@@ -1,235 +1,267 @@
-/*****************************************************************************
- * Copyright (c) 2014 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.nattable.manager.axis;
-
-import java.util.Collection;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EReference;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.papyrus.infra.emf.nattable.manager.axis.EObjectTreeAxisManagerForEventList;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.ITreeItemAxis;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.TreeFillingConfiguration;
-import org.eclipse.papyrus.infra.nattable.utils.FillingConfigurationUtils;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.Extension;
-
-/**
- *
- * @author VL222926
- * UML manager for Element in a Tree Table
- */
-public class UMLElementTreeAxisManagerForEventList extends EObjectTreeAxisManagerForEventList {
-
-
- public UMLElementTreeAxisManagerForEventList() {
- super();
- }
-
-
- /**
- * @see org.eclipse.papyrus.infra.emf.nattable.manager.axis.EObjectTreeAxisManagerForEventList#isAllowedContents(java.lang.Object, Object, TreeFillingConfiguration, int)
- *
- * @param objectToTest
- * @param depth
- * @return
- */
- @Override
- public boolean isAllowedContents(Object objectToTest, Object semanticParent, TreeFillingConfiguration conf, int depth) {
- return objectToTest instanceof Element;
- }
-
- /**
- * @see org.eclipse.papyrus.infra.nattable.manager.axis.AbstractTreeAxisManagerForEventList#manageSetNotification(org.eclipse.emf.common.notify.Notification)
- *
- * @param notification
- */
- @Override
- protected void manageSetNotification(Notification notification) {
- if (isStereotypeApplicationNotification(notification)) {
- manageStereotypeApplication(notification);
- return;
- }
- super.manageSetNotification(notification);
- }
-
-
- /**
- * @see org.eclipse.papyrus.infra.nattable.manager.axis.AbstractTreeAxisManagerForEventList#manageUnsetNotification(org.eclipse.emf.common.notify.Notification)
- *
- * @param notification
- */
- @Override
- protected void manageUnsetNotification(Notification notification) {
- if (isStereotypeApplicationNotification(notification)) {
- manageStereotypeApplication(notification);
- return;
- }
- super.manageUnsetNotification(notification);
- }
-
-
-
-
- /**
- * @see org.eclipse.papyrus.infra.emf.nattable.manager.axis.EObjectTreeAxisManagerForEventList#ignoreEvent(org.eclipse.emf.common.notify.Notification)
- *
- * @param notification
- * @return
- */
- @Override
- protected boolean ignoreEvent(Notification notification) {
- int event = notification.getEventType();
- Object notifier = notification.getNotifier();
- switch (event) {
- case Notification.ADD:
- case Notification.REMOVE:
- // we ignore the addition and the remove of stereotype application to the resource
- return notifier instanceof Resource && isStereotypeApplicationNotification(notification);
-
- default:
- return super.ignoreEvent(notification);
- }
- }
-
- /**
- * This method allows to add/remove elements from the table, according to values returned by {@link #getFilteredValueAsCollection(TreeFillingConfiguration, Object, int)},
- * when the attribute base_metaclass_name is modified in a stereotype application
- *
- * @param notification
- * a notification which concern the feature base_ of a stereotype application
- */
- protected void manageStereotypeApplication(final Notification notification) {
- Object feature = notification.getFeature();
- if (!(feature instanceof EReference)) {
- return;
- }
- EReference ref = (EReference) feature;
- if (ref.isContainment() || ref.isMany()) {
- return;
- }
-
- Object notifier = notification.getNotifier();
- if (!(notifier instanceof EObject)) {
- return;
- }
-
-
-
-
- Object newValue = notification.getNewValue();
- Object oldValue = notification.getOldValue();
- Element baseElement = null;
- if (oldValue instanceof Element) {
- baseElement = (Element) oldValue;
- } else if (newValue instanceof Element) {
- baseElement = (Element) newValue;
- }
- if (baseElement == null) {
- return;
- }
-
- // we assume that the stereotyped element is always displayed as child of its semantic parent
- Element owner = baseElement.getOwner();
- if (this.managedElements.containsKey(owner)) {
- Set<ITreeItemAxis> parentRepresentation = this.managedElements.get(owner);
-
- for (ITreeItemAxis curr : parentRepresentation) {
- manageStereotypeApplication(curr, baseElement);
- }
- }
-
- // in all cases we need to upate root elements
- if (FillingConfigurationUtils.hasTreeFillingConfigurationForDepth(getTable(), 0)) {
- manageStereotypeApplication(null, baseElement);
- }
- }
-
- /**
- *
- * @param semanticParent
- * the {@link ITreeItemAxis} representing the semantic parent of the baseElement concerned by the stereotype application
- * @param baseElement
- */
- protected void manageStereotypeApplication(final ITreeItemAxis semanticParent, final Element baseElement) {
- Object context;
- List<TreeFillingConfiguration> fillingConf;
- int nextDepth = 0;
- if (semanticParent != null) {
- context = semanticParent.getElement();
- nextDepth = getSemanticDepth(semanticParent) + 1;
- } else {
- context = getTableContext();
- }
- fillingConf = FillingConfigurationUtils.getTreeFillingConfigurationForDepth(getTable(), representedAxisManager, nextDepth);
-
- for (TreeFillingConfiguration curr : fillingConf) {
- Collection<?> values = getFilteredValueAsCollection(curr, context, 0);
- ITreeItemAxis confRep = null;
- if (this.managedElements.containsKey(curr)) {
- // we are on the root, only null or 1 representation is possible
- confRep = this.managedElements.get(curr).iterator().next();
- }
- if (values.isEmpty()) {
- if (confRep != null) {
- ITreeItemAxis toDestroy = getITreeItemAxisRepresentingObject(confRep.getChildren(), baseElement);
- removeObject(toDestroy);
- }
- } else {
- if (values.contains(baseElement)) {
- // we create the conf rep only for depth==0 (<=> semanticParent==null) or when the semantic parent has already been expanded
- if (confRep == null && (nextDepth == 0 || !alreadyExpanded.contains(semanticParent))) {
- confRep = addObject(null, curr);
- }
-
- if (nextDepth == 0 || alreadyExpanded.contains(confRep)) {
- ITreeItemAxis stereotypedElementRep = getITreeItemAxisRepresentingObject(confRep.getChildren(), baseElement);
- if (stereotypedElementRep == null) {
- ITreeItemAxis newAxis = addObject(confRep, baseElement);
- if (alreadyExpanded.contains(confRep) || confRep.getParent() == null) {// already expanded or root!
- fillChildrenForSemanticElement(newAxis);
- }
- }
- }
- } else {
- ITreeItemAxis toDestroy = getITreeItemAxisRepresentingObject(confRep.getChildren(), baseElement);
- if (toDestroy != null) {
- removeObject(toDestroy);
- }
- }
- }
- }
- }
-
- /**
- *
- * @param notification
- * a notification
- * @return
- * <code>true</code> if the notification concerns a stereotype application
- */
- protected boolean isStereotypeApplicationNotification(final Notification notification) {
- Object notifier = notification.getNotifier();
- if (notifier instanceof EObject) {
- Object feature = notification.getFeature();
- if (feature instanceof EReference && !((EReference) feature).isContainment() && ((EReference) feature).getName().startsWith(Extension.METACLASS_ROLE_PREFIX)) {
- return true;
- }
- }
- return false;
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2014 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.nattable.manager.axis;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.gmf.runtime.emf.type.core.ElementTypeRegistry;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.SpecializationType;
+import org.eclipse.papyrus.infra.emf.nattable.manager.axis.EObjectTreeAxisManagerForEventList;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.ITreeItemAxis;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.TreeFillingConfiguration;
+import org.eclipse.papyrus.infra.nattable.utils.FillingConfigurationUtils;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Extension;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ *
+ * @author VL222926
+ * UML manager for Element in a Tree Table
+ */
+public class UMLElementTreeAxisManagerForEventList extends EObjectTreeAxisManagerForEventList {
+
+
+ public UMLElementTreeAxisManagerForEventList() {
+ super();
+ }
+
+
+ /**
+ * @see org.eclipse.papyrus.infra.emf.nattable.manager.axis.EObjectTreeAxisManagerForEventList#isAllowedContents(java.lang.Object, Object, TreeFillingConfiguration, int)
+ *
+ * @param objectToTest
+ * @param depth
+ * @return
+ */
+ @Override
+ public boolean isAllowedContents(Object objectToTest, Object semanticParent, TreeFillingConfiguration conf, int depth) {
+ return objectToTest instanceof Element;
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.axis.AbstractAxisManager#canCreateAxisElement(java.lang.String)
+ *
+ * @param elementId
+ * @return
+ */
+ @Override
+ public boolean canCreateAxisElement(String elementId) {
+ if (elementId == null) {
+ return false;
+ }
+
+ final IElementType types = ElementTypeRegistry.getInstance().getType(elementId);
+ if (types == null || (types instanceof SpecializationType && ((SpecializationType) types).getMetamodelType() == null)) {
+ return false;
+ }
+
+ final EClass eClass = types.getEClass();
+ if (eClass != null) {
+ if (eClass.getEPackage() == UMLPackage.eINSTANCE) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.nattable.manager.axis.AbstractTreeAxisManagerForEventList#manageSetNotification(org.eclipse.emf.common.notify.Notification)
+ *
+ * @param notification
+ */
+ @Override
+ protected void manageSetNotification(Notification notification) {
+ if (isStereotypeApplicationNotification(notification)) {
+ manageStereotypeApplication(notification);
+ return;
+ }
+ super.manageSetNotification(notification);
+ }
+
+
+ /**
+ * @see org.eclipse.papyrus.infra.nattable.manager.axis.AbstractTreeAxisManagerForEventList#manageUnsetNotification(org.eclipse.emf.common.notify.Notification)
+ *
+ * @param notification
+ */
+ @Override
+ protected void manageUnsetNotification(Notification notification) {
+ if (isStereotypeApplicationNotification(notification)) {
+ manageStereotypeApplication(notification);
+ return;
+ }
+ super.manageUnsetNotification(notification);
+ }
+
+
+
+
+ /**
+ * @see org.eclipse.papyrus.infra.emf.nattable.manager.axis.EObjectTreeAxisManagerForEventList#ignoreEvent(org.eclipse.emf.common.notify.Notification)
+ *
+ * @param notification
+ * @return
+ */
+ @Override
+ protected boolean ignoreEvent(Notification notification) {
+ int event = notification.getEventType();
+ Object notifier = notification.getNotifier();
+ switch (event) {
+ case Notification.ADD:
+ case Notification.REMOVE:
+ // we ignore the addition and the remove of stereotype application to the resource
+ return notifier instanceof Resource && isStereotypeApplicationNotification(notification);
+
+ default:
+ return super.ignoreEvent(notification);
+ }
+ }
+
+ /**
+ * This method allows to add/remove elements from the table, according to values returned by {@link #getFilteredValueAsCollection(TreeFillingConfiguration, Object, int)},
+ * when the attribute base_metaclass_name is modified in a stereotype application
+ *
+ * @param notification
+ * a notification which concern the feature base_ of a stereotype application
+ */
+ protected void manageStereotypeApplication(final Notification notification) {
+ Object feature = notification.getFeature();
+ if (!(feature instanceof EReference)) {
+ return;
+ }
+ EReference ref = (EReference) feature;
+ if (ref.isContainment() || ref.isMany()) {
+ return;
+ }
+
+ Object notifier = notification.getNotifier();
+ if (!(notifier instanceof EObject)) {
+ return;
+ }
+
+
+
+
+ Object newValue = notification.getNewValue();
+ Object oldValue = notification.getOldValue();
+ Element baseElement = null;
+ if (oldValue instanceof Element) {
+ baseElement = (Element) oldValue;
+ } else if (newValue instanceof Element) {
+ baseElement = (Element) newValue;
+ }
+ if (baseElement == null) {
+ return;
+ }
+
+ // we assume that the stereotyped element is always displayed as child of its semantic parent
+ Element owner = baseElement.getOwner();
+ if (this.managedElements.containsKey(owner)) {
+ Set<ITreeItemAxis> parentRepresentation = this.managedElements.get(owner);
+
+ for (ITreeItemAxis curr : parentRepresentation) {
+ manageStereotypeApplication(curr, baseElement);
+ }
+ }
+
+ // in all cases we need to upate root elements
+ if (FillingConfigurationUtils.hasTreeFillingConfigurationForDepth(getTable(), 0)) {
+ manageStereotypeApplication(null, baseElement);
+ }
+ }
+
+ /**
+ *
+ * @param semanticParent
+ * the {@link ITreeItemAxis} representing the semantic parent of the baseElement concerned by the stereotype application
+ * @param baseElement
+ */
+ protected void manageStereotypeApplication(final ITreeItemAxis semanticParent, final Element baseElement) {
+ Object context;
+ List<TreeFillingConfiguration> fillingConf;
+ int nextDepth = 0;
+ if (semanticParent != null) {
+ context = semanticParent.getElement();
+ nextDepth = getSemanticDepth(semanticParent) + 1;
+ } else {
+ context = getTableContext();
+ }
+ fillingConf = FillingConfigurationUtils.getTreeFillingConfigurationForDepth(getTable(), representedAxisManager, nextDepth);
+
+ for (TreeFillingConfiguration curr : fillingConf) {
+ Collection<?> values = getFilteredValueAsCollection(curr, context, 0);
+ ITreeItemAxis confRep = null;
+ if (this.managedElements.containsKey(curr)) {
+ // we are on the root, only null or 1 representation is possible
+ confRep = this.managedElements.get(curr).iterator().next();
+ }
+ if (values.isEmpty()) {
+ if (confRep != null) {
+ ITreeItemAxis toDestroy = getITreeItemAxisRepresentingObject(confRep.getChildren(), baseElement);
+ removeObject(toDestroy);
+ }
+ } else {
+ if (values.contains(baseElement)) {
+ // we create the conf rep only for depth==0 (<=> semanticParent==null) or when the semantic parent has already been expanded
+ if (confRep == null && (nextDepth == 0 || !alreadyExpanded.contains(semanticParent))) {
+ confRep = addObject(null, curr);
+ }
+
+ if (nextDepth == 0 || alreadyExpanded.contains(confRep)) {
+ ITreeItemAxis stereotypedElementRep = getITreeItemAxisRepresentingObject(confRep.getChildren(), baseElement);
+ if (stereotypedElementRep == null) {
+ ITreeItemAxis newAxis = addObject(confRep, baseElement);
+ if (alreadyExpanded.contains(confRep) || confRep.getParent() == null) {// already expanded or root!
+ fillChildrenForSemanticElement(newAxis);
+ }
+ }
+ }
+ } else {
+ ITreeItemAxis toDestroy = getITreeItemAxisRepresentingObject(confRep.getChildren(), baseElement);
+ if (toDestroy != null) {
+ removeObject(toDestroy);
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ *
+ * @param notification
+ * a notification
+ * @return
+ * <code>true</code> if the notification concerns a stereotype application
+ */
+ protected boolean isStereotypeApplicationNotification(final Notification notification) {
+ Object notifier = notification.getNotifier();
+ if (notifier instanceof EObject) {
+ Object feature = notification.getFeature();
+ if (feature instanceof EReference && !((EReference) feature).isContainment() && ((EReference) feature).getName().startsWith(Extension.METACLASS_ROLE_PREFIX)) {
+ return true;
+ }
+ }
+ return false;
+ }
+}
diff --git a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/manager/axis/UMLStereotypePropertyAxisManager.java b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/manager/axis/UMLStereotypePropertyAxisManager.java
index 31f9dca550f..b1c4be110de 100644
--- a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/manager/axis/UMLStereotypePropertyAxisManager.java
+++ b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/manager/axis/UMLStereotypePropertyAxisManager.java
@@ -30,6 +30,7 @@ import org.eclipse.papyrus.commands.wrappers.GMFtoEMFCommandWrapper;
import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
import org.eclipse.papyrus.infra.nattable.manager.axis.IIdAxisManager;
import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.EObjectAxis;
import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.IAxis;
import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.IdAxis;
import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.NattableaxisFactory;
@@ -93,6 +94,38 @@ public class UMLStereotypePropertyAxisManager extends UMLFeatureAxisManager impl
*/
@Override
public Command getComplementaryAddAxisCommand(final TransactionalEditingDomain domain, final Collection<Object> objectToAdd) {
+ final Set<Object> propertiesToAdd = getPropertiesToAdd(objectToAdd);
+ if (!propertiesToAdd.isEmpty()) {
+ return getAddAxisCommand(domain, propertiesToAdd);
+ }
+ return null;
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.emf.nattable.manager.axis.EStructuralFeatureAxisManager#getComplementaryAddAxisCommand(org.eclipse.emf.transaction.TransactionalEditingDomain, java.util.Collection, int)
+ *
+ * @param domain
+ * @param objectToAdd
+ * @param index
+ * @return
+ */
+ @Override
+ public Command getComplementaryAddAxisCommand(final TransactionalEditingDomain domain, final Collection<Object> objectToAdd, final int index) {
+ final Set<Object> propertiesToAdd = getPropertiesToAdd(objectToAdd);
+ if (!propertiesToAdd.isEmpty()) {
+ return getAddAxisCommand(domain, propertiesToAdd, index);
+ }
+ return null;
+ }
+
+ /**
+ * Get the properties to add.
+ *
+ * @param objectToAdd The initial objects to add.
+ * @return The properties to add.
+ */
+ protected Set<Object> getPropertiesToAdd(final Collection<Object> objectToAdd){
final Set<Stereotype> appliedStereotypes = new HashSet<Stereotype>();
for (final Object current : objectToAdd) {
if (current instanceof Element) {
@@ -104,12 +137,9 @@ public class UMLStereotypePropertyAxisManager extends UMLFeatureAxisManager impl
for (final Stereotype stereotype : appliedStereotypes) {
propertiesToAdd.addAll(StereotypeUtil.getAllStereotypePropertiesWithoutBaseProperties(stereotype));
}
- if (!propertiesToAdd.isEmpty()) {
- return getAddAxisCommand(domain, propertiesToAdd);
- }
- return null;
+ return propertiesToAdd;
}
-
+
/**
*
* @see org.eclipse.papyrus.infra.nattable.manager.axis.AbstractAxisManager#getAddAxisCommand(TransactionalEditingDomain, java.util.Collection)
@@ -120,6 +150,39 @@ public class UMLStereotypePropertyAxisManager extends UMLFeatureAxisManager impl
*/
@Override
public Command getAddAxisCommand(final TransactionalEditingDomain domain, final Collection<Object> objectToAdd) {
+ Collection<IAxis> toAdd = getAxisToAdd(objectToAdd);
+ if(!toAdd.isEmpty()){
+ return AddCommand.create(domain, getRepresentedContentProvider(), NattableaxisproviderPackage.eINSTANCE.getAxisProvider_Axis(), toAdd);
+ }
+ return null;
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.emf.nattable.manager.axis.EStructuralFeatureAxisManager#getAddAxisCommand(org.eclipse.emf.transaction.TransactionalEditingDomain, java.util.Collection, int)
+ *
+ * @param domain
+ * @param objectToAdd
+ * @param index
+ * @return
+ */
+ @Override
+ public Command getAddAxisCommand(final TransactionalEditingDomain domain, final Collection<Object> objectToAdd, final int index) {
+ Collection<IAxis> toAdd = getAxisToAdd(objectToAdd);
+ if(!toAdd.isEmpty()){
+ return AddCommand.create(domain, getRepresentedContentProvider(), NattableaxisproviderPackage.eINSTANCE.getAxisProvider_Axis(), toAdd, index);
+ }
+ return null;
+ }
+
+ /**
+ * Get the axis to add from the objects to add.
+ *
+ * @param objectToAdd The objects to add.
+ * @return The axis to add.
+ */
+ protected Collection<IAxis> getAxisToAdd(final Collection<Object> objectToAdd){
+ final Collection<IAxis> toAdd = new ArrayList<IAxis>();
final List<String> allPropertyQN = new ArrayList<String>();
for (Object object : objectToAdd) {
if (isAllowedContents(object)) {
@@ -128,7 +191,6 @@ public class UMLStereotypePropertyAxisManager extends UMLFeatureAxisManager impl
}
allPropertyQN.removeAll(getElements());
if (!allPropertyQN.isEmpty()) {
- final Collection<IAxis> toAdd = new ArrayList<IAxis>();
for (String propQN : allPropertyQN) {
final IdAxis newAxis = NattableaxisFactory.eINSTANCE.createFeatureIdAxis();
newAxis.setElement(propQN);
@@ -136,12 +198,8 @@ public class UMLStereotypePropertyAxisManager extends UMLFeatureAxisManager impl
toAdd.add(newAxis);
managedObject.add(propQN);
}
-
- if(!toAdd.isEmpty()){
- return AddCommand.create(domain, getRepresentedContentProvider(), NattableaxisproviderPackage.eINSTANCE.getAxisProvider_Axis(), toAdd);
- }
}
- return null;
+ return toAdd;
}
diff --git a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/provider/StereotypePropertyHeaderLabelProvider.java b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/provider/StereotypePropertyHeaderLabelProvider.java
index 8c0bc0ef59a..c1239532730 100644
--- a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/provider/StereotypePropertyHeaderLabelProvider.java
+++ b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/provider/StereotypePropertyHeaderLabelProvider.java
@@ -27,9 +27,9 @@ import org.eclipse.papyrus.infra.nattable.model.nattable.nattablelabelprovider.F
import org.eclipse.papyrus.infra.nattable.model.nattable.nattablelabelprovider.ILabelProviderConfiguration;
import org.eclipse.papyrus.infra.nattable.model.nattable.nattablelabelprovider.ObjectLabelProviderConfiguration;
import org.eclipse.papyrus.infra.nattable.utils.AxisUtils;
+import org.eclipse.papyrus.infra.nattable.utils.ILabelProviderCellContextElementWrapper;
import org.eclipse.papyrus.infra.nattable.utils.ILabelProviderContextElementWrapper;
import org.eclipse.papyrus.infra.nattable.utils.LabelConfigurationManagementUtils;
-import org.eclipse.papyrus.infra.nattable.utils.LabelProviderCellContextElementWrapper;
import org.eclipse.papyrus.infra.nattable.utils.NattableConfigAttributes;
import org.eclipse.papyrus.infra.widgets.Activator;
import org.eclipse.papyrus.uml.nattable.messages.Messages;
@@ -92,8 +92,8 @@ public class StereotypePropertyHeaderLabelProvider extends EMFFeatureHeaderLabel
}
ILabelProviderConfiguration conf = null;
- if (wrapper instanceof LabelProviderCellContextElementWrapper) {
- conf = getLabelConfiguration((LabelProviderCellContextElementWrapper) wrapper);
+ if (wrapper instanceof ILabelProviderCellContextElementWrapper) {
+ conf = getLabelConfiguration((ILabelProviderCellContextElementWrapper) wrapper);
}
String returnedValue = null;
@@ -122,13 +122,19 @@ public class StereotypePropertyHeaderLabelProvider extends EMFFeatureHeaderLabel
return returnedValue;
}
- protected ILabelProviderConfiguration getLabelConfiguration(LabelProviderCellContextElementWrapper wrapper) {
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.infra.nattable.provider.AbstractNattableCellLabelProvider#getLabelConfiguration(org.eclipse.papyrus.infra.nattable.utils.ILabelProviderCellContextElementWrapper)
+ */
+ @Override
+ protected ILabelProviderConfiguration getLabelConfiguration(ILabelProviderCellContextElementWrapper wrapper) {
ILabelProviderConfiguration conf = null;
final IConfigRegistry configRegistry = wrapper.getConfigRegistry();
final INattableModelManager modelManager = configRegistry.getConfigAttribute(NattableConfigAttributes.NATTABLE_MODEL_MANAGER_CONFIG_ATTRIBUTE, DisplayMode.NORMAL, NattableConfigAttributes.NATTABLE_MODEL_MANAGER_ID);
final Table table = modelManager.getTable();
- if (wrapper instanceof LabelProviderCellContextElementWrapper) {
- LabelStack labels = ((LabelProviderCellContextElementWrapper) wrapper).getConfigLabels();
+ if (wrapper instanceof ILabelProviderCellContextElementWrapper) {
+ LabelStack labels = ((ILabelProviderCellContextElementWrapper) wrapper).getConfigLabels();
if (labels.hasLabel(GridRegion.COLUMN_HEADER)) {
conf = LabelConfigurationManagementUtils.getUsedColumnFeatureLabelConfiguration(table);
} else if (labels.hasLabel(GridRegion.ROW_HEADER)) {
@@ -150,7 +156,7 @@ public class StereotypePropertyHeaderLabelProvider extends EMFFeatureHeaderLabel
final Object value = getWrappedValue((ILabelProviderContextElementWrapper) element);
final IConfigRegistry configRegistry = ((ILabelProviderContextElementWrapper) element).getConfigRegistry();
final INattableModelManager modelManager = getAxisContentProvider(configRegistry);
- ILabelProviderConfiguration conf = getLabelConfiguration((LabelProviderCellContextElementWrapper) element);
+ ILabelProviderConfiguration conf = getLabelConfiguration((ILabelProviderCellContextElementWrapper) element);
if (conf instanceof ObjectLabelProviderConfiguration && !((ObjectLabelProviderConfiguration) conf).isDisplayIcon()) {
return null;
}
diff --git a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/provider/TreeFillingStereotypePropertyLabelProvider.java b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/provider/TreeFillingStereotypePropertyLabelProvider.java
index 7ad6202cbab..68d6cf7d3d3 100644
--- a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/provider/TreeFillingStereotypePropertyLabelProvider.java
+++ b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/provider/TreeFillingStereotypePropertyLabelProvider.java
@@ -1,85 +1,85 @@
-/*****************************************************************************
- * Copyright (c) 2014 CEA LIST and others.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-
-package org.eclipse.papyrus.uml.nattable.provider;
-
-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.nattableaxisconfiguration.TreeFillingConfiguration;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattablelabelprovider.ILabelProviderConfiguration;
-import org.eclipse.papyrus.infra.nattable.utils.AxisUtils;
-import org.eclipse.papyrus.infra.nattable.utils.ILabelProviderContextElementWrapper;
-import org.eclipse.papyrus.infra.nattable.utils.LabelProviderCellContextElementWrapper;
-import org.eclipse.papyrus.uml.nattable.utils.UMLTableUtils;
-
-/**
- * @author VL222926
- *
- */
-public class TreeFillingStereotypePropertyLabelProvider extends StereotypePropertyHeaderLabelProvider {
-
- /**
- * @see org.eclipse.papyrus.uml.nattable.provider.StereotypePropertyHeaderLabelProvider#accept(java.lang.Object)
- *
- * @param element
- * @return
- */
- @Override
- public boolean accept(Object element) {
- if (element instanceof ILabelProviderContextElementWrapper) {
- final Object object = ((ILabelProviderContextElementWrapper) element).getObject();
- if (object instanceof ITreeItemAxis) {
- ITreeItemAxis curr = (ITreeItemAxis) object;
- Object el = curr.getElement();
- if (el instanceof TreeFillingConfiguration) {
- final IAxis axis = ((TreeFillingConfiguration) el).getAxisUsedAsAxisProvider();
- String id = AxisUtils.getPropertyId(axis);
- return (id != null && id.startsWith(UMLTableUtils.PROPERTY_OF_STEREOTYPE_PREFIX));
- }
- }
- }
- return false;
- }
-
- /**
- * @see org.eclipse.papyrus.infra.nattable.provider.AbstractNattableCellLabelProvider#getLabelConfiguration(org.eclipse.papyrus.infra.nattable.utils.LabelProviderCellContextElementWrapper)
- *
- * @param element
- * @return
- */
- @Override
- protected ILabelProviderConfiguration getLabelConfiguration(LabelProviderCellContextElementWrapper element) {
- if (element instanceof ILabelProviderContextElementWrapper) {
- final Object object = ((ILabelProviderContextElementWrapper) element).getObject();
- if (object instanceof IAxis && ((IAxis) object).getElement() instanceof TreeFillingConfiguration) {
- return ((TreeFillingConfiguration) ((IAxis) object).getElement()).getLabelProvider();
- }
- }
- return null;
- }
-
- /**
- *
- * @param wrapper
- * @return
- * the wrapped value to use to calculate the label
- */
- @Override
- protected Object getWrappedValue(final ILabelProviderContextElementWrapper wrapper) {
- Object value = wrapper.getObject();
- if (value instanceof IAxis && ((IAxis) value).getElement() instanceof TreeFillingConfiguration) {
- return ((TreeFillingConfiguration) ((IAxis) value).getElement()).getAxisUsedAsAxisProvider();
- }
- return super.getWrappedValue(wrapper);
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.nattable.provider;
+
+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.nattableaxisconfiguration.TreeFillingConfiguration;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattablelabelprovider.ILabelProviderConfiguration;
+import org.eclipse.papyrus.infra.nattable.utils.AxisUtils;
+import org.eclipse.papyrus.infra.nattable.utils.ILabelProviderCellContextElementWrapper;
+import org.eclipse.papyrus.infra.nattable.utils.ILabelProviderContextElementWrapper;
+import org.eclipse.papyrus.uml.nattable.utils.UMLTableUtils;
+
+/**
+ * @author VL222926
+ *
+ */
+public class TreeFillingStereotypePropertyLabelProvider extends StereotypePropertyHeaderLabelProvider {
+
+ /**
+ * @see org.eclipse.papyrus.uml.nattable.provider.StereotypePropertyHeaderLabelProvider#accept(java.lang.Object)
+ *
+ * @param element
+ * @return
+ */
+ @Override
+ public boolean accept(Object element) {
+ if (element instanceof ILabelProviderContextElementWrapper) {
+ final Object object = ((ILabelProviderContextElementWrapper) element).getObject();
+ if (object instanceof ITreeItemAxis) {
+ ITreeItemAxis curr = (ITreeItemAxis) object;
+ Object el = curr.getElement();
+ if (el instanceof TreeFillingConfiguration) {
+ final IAxis axis = ((TreeFillingConfiguration) el).getAxisUsedAsAxisProvider();
+ String id = AxisUtils.getPropertyId(axis);
+ return (id != null && id.startsWith(UMLTableUtils.PROPERTY_OF_STEREOTYPE_PREFIX));
+ }
+ }
+ }
+ return false;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.nattable.provider.AbstractNattableCellLabelProvider#getLabelConfiguration(org.eclipse.papyrus.infra.nattable.utils.LabelProviderCellContextElementWrapper)
+ *
+ * @param element
+ * @return
+ */
+ @Override
+ protected ILabelProviderConfiguration getLabelConfiguration(ILabelProviderCellContextElementWrapper element) {
+ if (element instanceof ILabelProviderContextElementWrapper) {
+ final Object object = ((ILabelProviderContextElementWrapper) element).getObject();
+ if (object instanceof IAxis && ((IAxis) object).getElement() instanceof TreeFillingConfiguration) {
+ return ((TreeFillingConfiguration) ((IAxis) object).getElement()).getLabelProvider();
+ }
+ }
+ return null;
+ }
+
+ /**
+ *
+ * @param wrapper
+ * @return
+ * the wrapped value to use to calculate the label
+ */
+ @Override
+ protected Object getWrappedValue(final ILabelProviderContextElementWrapper wrapper) {
+ Object value = wrapper.getObject();
+ if (value instanceof IAxis && ((IAxis) value).getElement() instanceof TreeFillingConfiguration) {
+ return ((TreeFillingConfiguration) ((IAxis) value).getElement()).getAxisUsedAsAxisProvider();
+ }
+ return super.getWrappedValue(wrapper);
+ }
+}
diff --git a/tests/junit/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/tests/RevealRequirementTableTest.java b/tests/junit/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/tests/RevealRequirementTableTest.java
index af62ef8c1cf..a1cd25d49c3 100755
--- a/tests/junit/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/tests/RevealRequirementTableTest.java
+++ b/tests/junit/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/tests/RevealRequirementTableTest.java
@@ -455,7 +455,7 @@ public class RevealRequirementTableTest extends AbstractEditorTest {
break;
}
}
- Assert.assertEquals(4, selectedRows.size());
+ Assert.assertEquals(0, selectedRows.size());
Assert.assertEquals(3, selectedColumns.size());

Back to the top