Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas FAUVERGUE2015-12-11 10:51:29 +0000
committerGerrit Code Review @ Eclipse.org2016-01-12 12:51:15 +0000
commit7c5f20d4e792268fd347757e72f0e06f951a8884 (patch)
treebf381aee98d4921ad63e40af053402822788efe4 /plugins
parentb03213ac35f6c0f3bb9702558d3d3c58c2e39ef8 (diff)
downloadorg.eclipse.papyrus-7c5f20d4e792268fd347757e72f0e06f951a8884.tar.gz
org.eclipse.papyrus-7c5f20d4e792268fd347757e72f0e06f951a8884.tar.xz
org.eclipse.papyrus-7c5f20d4e792268fd347757e72f0e06f951a8884.zip
Bug 484185: [Table] EOperation must be managed in table
https://bugs.eclipse.org/bugs/show_bug.cgi?id=484185 - Change the nattable configurations - Change the axis creation for tree table categories (to manage the operations) - Change the provider for parameters in operation (simplify the type name) - Correctly manage the operation label providers in plugin.xml Change-Id: Id870fb3011b4e8534a5bf96670e40a0926ddce2b Signed-off-by: Nicolas FAUVERGUE <nicolas.fauvergue@all4tec.net>
Diffstat (limited to 'plugins')
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/plugin.xml9
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/provider/EMFEObjectHeaderLabelProvider.java213
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/provider/EMFEOperationHeaderLabelProvider.java2
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/provider/TreeFillingOperationLabelProvider.java2
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/src/org/eclipse/papyrus/infra/nattable/model/factory/IAxisFactory.java251
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/plugin.xml4
-rwxr-xr-xplugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/wizard/ConfigureTableCategoriesWizard.java1084
-rw-r--r--plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.allocation.config/resources/allocation.nattableconfiguration17
-rw-r--r--plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration11
-rw-r--r--plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config/configs/class_synchronized_tree.nattableconfiguration40
-rw-r--r--plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration32
-rw-r--r--plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.stereotype.display/config/stereotype.nattableconfiguration10
-rwxr-xr-xplugins/uml/nattable/org.eclipse.papyrus.uml.nattable/configs/genericTreeTable.nattableconfiguration14
13 files changed, 885 insertions, 804 deletions
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/plugin.xml b/plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/plugin.xml
index 925a8991bca..5d037f71f46 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/plugin.xml
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/plugin.xml
@@ -51,14 +51,17 @@
</labelProviderContext>
</labelProvider>
<labelProvider
- priority="1401"
+ priority="1450"
provider="org.eclipse.papyrus.infra.emf.nattable.provider.EMFEOperationHeaderLabelProvider">
<labelProviderContext
- context="org.eclipse.papyrus.infra.nattable.header.treefilling.operation.labelprovider">
+ context="org.eclipse.papyrus.infra.nattable.header.labelprovider">
+ </labelProviderContext>
+ <labelProviderContext
+ context="org.eclipse.papyrus.infra.nattable.header.operation.labelprovider">
</labelProviderContext>
</labelProvider>
<labelProvider
- priority="1301"
+ priority="1350"
provider="org.eclipse.papyrus.infra.emf.nattable.provider.TreeFillingOperationLabelProvider">
<labelProviderContext
context="org.eclipse.papyrus.infra.nattable.header.treefilling.operation.labelprovider">
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/provider/EMFEObjectHeaderLabelProvider.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/provider/EMFEObjectHeaderLabelProvider.java
index 55800df83b1..5a5ea973329 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/provider/EMFEObjectHeaderLabelProvider.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/provider/EMFEObjectHeaderLabelProvider.java
@@ -1,106 +1,107 @@
-/*****************************************************************************
- * 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.emf.nattable.provider;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.nebula.widgets.nattable.config.IConfigRegistry;
-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.nattablelabelprovider.ILabelProviderConfiguration;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattablelabelprovider.ObjectLabelProviderConfiguration;
-import org.eclipse.papyrus.infra.nattable.provider.AbstractNattableCellLabelProvider;
-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;
-
-/**
- * The label provider used for header when they represents an {@link EObject} and NOT an {@link EStructuralFeature}
- *
- * @author Vincent Lorenzo
- *
- */
-public class EMFEObjectHeaderLabelProvider extends AbstractNattableCellLabelProvider {
-
- /**
- *
- * @see org.eclipse.papyrus.infra.nattable.provider.AbstractNattableCellLabelProvider#accept(java.lang.Object)
- *
- * @param element
- * @return
- */
- @Override
- public boolean accept(Object element) {
- if (element instanceof ILabelProviderContextElementWrapper) {
- Object object = ((ILabelProviderContextElementWrapper) element).getObject();
- if (object instanceof IAxis) {
- object = ((IAxis) object).getElement();
- }
- return object instanceof EObject && !(object instanceof EStructuralFeature);
- }
- return false;
- }
-
- /**
- *
- * @see org.eclipse.papyrus.infra.nattable.provider.AbstractNattableCellLabelProvider#getText(java.lang.Object)
- *
- * @param element
- * @return
- */
- @Override
- public String getText(Object element) {
- ILabelProviderContextElementWrapper context = (ILabelProviderContextElementWrapper) element;
- EObject object = (EObject) ((ILabelProviderContextElementWrapper) element).getObject();
- if (object instanceof EObjectAxis) {
- object = ((EObjectAxis) object).getElement();
- }
- final IConfigRegistry configRegistry = context.getConfigRegistry();
- final LabelProviderService serv = getLabelProviderService(configRegistry);
- ILabelProviderConfiguration conf = null;
- if (element instanceof LabelProviderCellContextElementWrapper) {
- conf = getLabelConfiguration((LabelProviderCellContextElementWrapper) element);
- }
- if (conf instanceof ObjectLabelProviderConfiguration && !((ObjectLabelProviderConfiguration) conf).isDisplayLabel()) {
- return ""; //$NON-NLS-1$
- }
- return serv.getLabelProvider(object).getText(object);
- }
-
- /**
- *
- * @see org.eclipse.papyrus.infra.nattable.provider.AbstractNattableCellLabelProvider#getImage(java.lang.Object)
- *
- * @param element
- * @return
- */
- @Override
- public Image getImage(Object element) {
- EObject object = (EObject) ((ILabelProviderContextElementWrapper) element).getObject();
- if (object instanceof EObjectAxis) {
- object = ((EObjectAxis) object).getElement();
- }
- final IConfigRegistry configRegistry = ((ILabelProviderContextElementWrapper) element).getConfigRegistry();
- final LabelProviderService serv = getLabelProviderService(configRegistry);
- ILabelProviderConfiguration conf = null;
- if (element instanceof LabelProviderCellContextElementWrapper) {
- conf = getLabelConfiguration((LabelProviderCellContextElementWrapper) element);
- }
- if (conf instanceof ObjectLabelProviderConfiguration && !((ObjectLabelProviderConfiguration) conf).isDisplayIcon()) {
- return null;
- }
- return serv.getLabelProvider(object).getImage(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.emf.nattable.provider;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EOperation;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.nebula.widgets.nattable.config.IConfigRegistry;
+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.nattablelabelprovider.ILabelProviderConfiguration;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattablelabelprovider.ObjectLabelProviderConfiguration;
+import org.eclipse.papyrus.infra.nattable.provider.AbstractNattableCellLabelProvider;
+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;
+
+/**
+ * The label provider used for header when they represents an {@link EObject} and NOT an {@link EStructuralFeature}
+ *
+ * @author Vincent Lorenzo
+ *
+ */
+public class EMFEObjectHeaderLabelProvider extends AbstractNattableCellLabelProvider {
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.provider.AbstractNattableCellLabelProvider#accept(java.lang.Object)
+ *
+ * @param element
+ * @return
+ */
+ @Override
+ public boolean accept(Object element) {
+ if (element instanceof ILabelProviderContextElementWrapper) {
+ Object object = ((ILabelProviderContextElementWrapper) element).getObject();
+ if (object instanceof IAxis) {
+ object = ((IAxis) object).getElement();
+ }
+ return object instanceof EObject && !(object instanceof EStructuralFeature) && !(object instanceof EOperation);
+ }
+ return false;
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.provider.AbstractNattableCellLabelProvider#getText(java.lang.Object)
+ *
+ * @param element
+ * @return
+ */
+ @Override
+ public String getText(Object element) {
+ ILabelProviderContextElementWrapper context = (ILabelProviderContextElementWrapper) element;
+ EObject object = (EObject) ((ILabelProviderContextElementWrapper) element).getObject();
+ if (object instanceof EObjectAxis) {
+ object = ((EObjectAxis) object).getElement();
+ }
+ final IConfigRegistry configRegistry = context.getConfigRegistry();
+ final LabelProviderService serv = getLabelProviderService(configRegistry);
+ ILabelProviderConfiguration conf = null;
+ if (element instanceof LabelProviderCellContextElementWrapper) {
+ conf = getLabelConfiguration((LabelProviderCellContextElementWrapper) element);
+ }
+ if (conf instanceof ObjectLabelProviderConfiguration && !((ObjectLabelProviderConfiguration) conf).isDisplayLabel()) {
+ return ""; //$NON-NLS-1$
+ }
+ return serv.getLabelProvider(object).getText(object);
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.provider.AbstractNattableCellLabelProvider#getImage(java.lang.Object)
+ *
+ * @param element
+ * @return
+ */
+ @Override
+ public Image getImage(Object element) {
+ EObject object = (EObject) ((ILabelProviderContextElementWrapper) element).getObject();
+ if (object instanceof EObjectAxis) {
+ object = ((EObjectAxis) object).getElement();
+ }
+ final IConfigRegistry configRegistry = ((ILabelProviderContextElementWrapper) element).getConfigRegistry();
+ final LabelProviderService serv = getLabelProviderService(configRegistry);
+ ILabelProviderConfiguration conf = null;
+ if (element instanceof LabelProviderCellContextElementWrapper) {
+ conf = getLabelConfiguration((LabelProviderCellContextElementWrapper) element);
+ }
+ if (conf instanceof ObjectLabelProviderConfiguration && !((ObjectLabelProviderConfiguration) conf).isDisplayIcon()) {
+ return null;
+ }
+ return serv.getLabelProvider(object).getImage(object);
+ }
+}
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/provider/EMFEOperationHeaderLabelProvider.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/provider/EMFEOperationHeaderLabelProvider.java
index 5b7d44da9ad..b393fb0974f 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/provider/EMFEOperationHeaderLabelProvider.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/provider/EMFEOperationHeaderLabelProvider.java
@@ -225,7 +225,7 @@ public class EMFEOperationHeaderLabelProvider extends EMFEObjectHeaderLabelProvi
final Iterator<EParameter> parameters = operation.getEParameters().iterator();
while (parameters.hasNext()) {
final EParameter parameter = parameters.next();
- returnedValueBuilder.append(parameter.getEType());
+ returnedValueBuilder.append(parameter.getEType().getName());
returnedValueBuilder.append(" "); //$NON-NLS-1$
returnedValueBuilder.append(parameter.getName());
if (parameters.hasNext()) {
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 49409cafb34..ded4e877e4f 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
@@ -30,7 +30,7 @@ public class TreeFillingOperationLabelProvider extends EMFEOperationHeaderLabelP
/**
* {@inheritDoc}
*
- * @see org.eclipse.papyrus.infra.emf.nattable.provider.EMFFeatureHeaderLabelProvider#accept(java.lang.Object)
+ * @see org.eclipse.papyrus.infra.emf.nattable.provider.EMFEOperationHeaderLabelProvider#accept(java.lang.Object)
*/
@Override
public boolean accept(final Object element) {
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/src/org/eclipse/papyrus/infra/nattable/model/factory/IAxisFactory.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/src/org/eclipse/papyrus/infra/nattable/model/factory/IAxisFactory.java
index 47c64bdde80..28a29564dae 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/src/org/eclipse/papyrus/infra/nattable/model/factory/IAxisFactory.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/src/org/eclipse/papyrus/infra/nattable/model/factory/IAxisFactory.java
@@ -1,103 +1,148 @@
-/*****************************************************************************
- * 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.nattable.model.factory;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.EObjectTreeItemAxis;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.EStructuralFeatureAxis;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.EStructuralFeatureTreeItemAxis;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.FeatureAxis;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.FeatureIdAxis;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.ITreeItemAxis;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.IdTreeItemAxis;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.NattableaxisFactory;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AxisManagerRepresentation;
-
-/**
- * @author VL222926
- *
- */
-public class IAxisFactory {
-
- /**
- * Constructor.
- *
- */
- private IAxisFactory() {
- // to prevent instanciation
- }
-
- /**
- *
- * @param parent
- * the parent for the tree axis item
- * @param object
- * the object to represent with a ITreeItemAxis
- * @param manager
- * the axis manager representation for the new axis
- * @return
- * the created ITreeAxisItem for the object
- */
- public static final ITreeItemAxis createITreeItemAxis(ITreeItemAxis parent, Object object, AxisManagerRepresentation manager, String alias) {
- ITreeItemAxis createdAxis = null;
- if(object instanceof Integer || object instanceof Float || object instanceof Boolean) {
- object = object.toString();
- }
- if(object instanceof String) {
- IdTreeItemAxis newAxis = NattableaxisFactory.eINSTANCE.createIdTreeItemAxis();
- newAxis.setElement((String)object);
- createdAxis = newAxis;
- } else if(object instanceof EStructuralFeature) {
- EStructuralFeatureTreeItemAxis newAxis = NattableaxisFactory.eINSTANCE.createEStructuralFeatureTreeItemAxis();
- newAxis.setElement((EStructuralFeature)object);
- createdAxis = newAxis;
- } else if(object instanceof EObject) {
- EObjectTreeItemAxis newAxis = NattableaxisFactory.eINSTANCE.createEObjectTreeItemAxis();
- newAxis.setElement((EObject)object);
- createdAxis = newAxis;
- }
- if(createdAxis == null) {
- throw new UnsupportedOperationException(NLS.bind("The creation for {0} is not yet implemented", object)); //$NON-NLS-1$
- } else {
- createdAxis.setParent(parent);
- createdAxis.setManager(manager);
- createdAxis.setAlias(alias);
- }
- return createdAxis;
- }
-
- /**
- *
- * @param object
- * an object representing a feature
- * @return
- * a feature axis to represent it
- */
- public static final FeatureAxis createAxisForFeature(Object object, AxisManagerRepresentation manager, String alias) {
- if(object instanceof String) {
- FeatureIdAxis axis = NattableaxisFactory.eINSTANCE.createFeatureIdAxis();
- axis.setElement((String)object);
- axis.setAlias(alias);
- return axis;
- }
- if(object instanceof EStructuralFeature) {
- EStructuralFeatureAxis axis = NattableaxisFactory.eINSTANCE.createEStructuralFeatureAxis();
- axis.setElement((EStructuralFeature)object);
- axis.setAlias(alias);
- return axis;
- }
- throw new UnsupportedOperationException(NLS.bind("The creation for {0} is not yet implemented", object)); //$NON-NLS-1$
- }
-}
+/*****************************************************************************
+ * 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.nattable.model.factory;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EOperation;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.EObjectTreeItemAxis;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.EOperationAxis;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.EOperationTreeItemAxis;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.EStructuralFeatureAxis;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.EStructuralFeatureTreeItemAxis;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.FeatureAxis;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.FeatureIdAxis;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.IAxis;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.ITreeItemAxis;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.IdTreeItemAxis;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.NattableaxisFactory;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AxisManagerRepresentation;
+
+/**
+ * @author VL222926
+ *
+ */
+public class IAxisFactory {
+
+ /**
+ * Constructor.
+ *
+ */
+ private IAxisFactory() {
+ // to prevent instanciation
+ }
+
+ /**
+ *
+ * @param parent
+ * the parent for the tree axis item
+ * @param object
+ * the object to represent with a ITreeItemAxis
+ * @param manager
+ * the axis manager representation for the new axis
+ * @return
+ * the created ITreeAxisItem for the object
+ */
+ public static final ITreeItemAxis createITreeItemAxis(ITreeItemAxis parent, Object object, AxisManagerRepresentation manager, String alias) {
+ ITreeItemAxis createdAxis = null;
+ if (object instanceof Integer || object instanceof Float || object instanceof Boolean) {
+ object = object.toString();
+ }
+ if (object instanceof String) {
+ IdTreeItemAxis newAxis = NattableaxisFactory.eINSTANCE.createIdTreeItemAxis();
+ newAxis.setElement((String) object);
+ createdAxis = newAxis;
+ } else if (object instanceof EStructuralFeature) {
+ EStructuralFeatureTreeItemAxis newAxis = NattableaxisFactory.eINSTANCE.createEStructuralFeatureTreeItemAxis();
+ newAxis.setElement((EStructuralFeature) object);
+ createdAxis = newAxis;
+ } else if(object instanceof EOperation){
+ EOperationTreeItemAxis newAxis = NattableaxisFactory.eINSTANCE.createEOperationTreeItemAxis();
+ newAxis.setElement((EOperation) object);
+ createdAxis = newAxis;
+ } else if (object instanceof EObject) {
+ EObjectTreeItemAxis newAxis = NattableaxisFactory.eINSTANCE.createEObjectTreeItemAxis();
+ newAxis.setElement((EObject) object);
+ createdAxis = newAxis;
+ }
+ if (createdAxis == null) {
+ throw new UnsupportedOperationException(NLS.bind("The creation for {0} is not yet implemented", object)); //$NON-NLS-1$
+ } else {
+ createdAxis.setParent(parent);
+ createdAxis.setManager(manager);
+ createdAxis.setAlias(alias);
+ }
+ return createdAxis;
+ }
+
+ /**
+ * This allows to create a feature axis representing the object in parameter.
+ *
+ * @param object
+ * an object representing a feature
+ * @return
+ * a feature axis to represent it
+ * @deprecated since 1.2.0, use createAxisForTypedElement isntead of this method
+ */
+ @Deprecated
+ public static final FeatureAxis createAxisForFeature(final Object object, final AxisManagerRepresentation manager, final String alias) {
+ if(object instanceof String) {
+ FeatureIdAxis axis = NattableaxisFactory.eINSTANCE.createFeatureIdAxis();
+ axis.setElement((String)object);
+ axis.setAlias(alias);
+ return axis;
+ }
+ if(object instanceof EStructuralFeature) {
+ EStructuralFeatureAxis axis = NattableaxisFactory.eINSTANCE.createEStructuralFeatureAxis();
+ axis.setElement((EStructuralFeature)object);
+ axis.setAlias(alias);
+ return axis;
+ }
+ throw new UnsupportedOperationException(NLS.bind("The creation for {0} is not yet implemented", object)); //$NON-NLS-1$
+ }
+
+ /**
+ * This allows to create an axis representing the object in parameter.
+ *
+ * @param object
+ * An object representing a feature or an operation
+ * @param manager
+ * The axis manager representation
+ * @param alias
+ * The alias of the axis
+ * @return
+ * An axis representing the object in parameter
+ */
+ public static final IAxis createAxisForTypedElement(final Object object, final AxisManagerRepresentation manager, final String alias) {
+ if (object instanceof String) {
+ FeatureIdAxis axis = NattableaxisFactory.eINSTANCE.createFeatureIdAxis();
+ axis.setElement((String) object);
+ axis.setAlias(alias);
+ return axis;
+ }
+ if (object instanceof EStructuralFeature) {
+ EStructuralFeatureAxis axis = NattableaxisFactory.eINSTANCE.createEStructuralFeatureAxis();
+ axis.setElement((EStructuralFeature) object);
+ axis.setAlias(alias);
+ return axis;
+ }
+ if (object instanceof EOperation) {
+ EOperationAxis axis = NattableaxisFactory.eINSTANCE.createEOperationAxis();
+ axis.setElement((EOperation) object);
+ axis.setAlias(alias);
+ return axis;
+ }
+ throw new UnsupportedOperationException(NLS.bind("The creation for {0} is not yet implemented", object)); //$NON-NLS-1$
+ }
+}
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 55cde3dde08..3f5d715c510 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/plugin.xml
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/plugin.xml
@@ -967,6 +967,10 @@
id="org.eclipse.papyrus.infra.nattable.header.feature.labelprovider">
</context>
<context
+ description="Context for operation in the header of the axis"
+ id="org.eclipse.papyrus.infra.nattable.header.operation.labelprovider">
+ </context>
+ <context
description="Context for the body of the table"
id="org.eclipse.papyrus.infra.nattable.body.labelprovider">
</context>
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/wizard/ConfigureTableCategoriesWizard.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/wizard/ConfigureTableCategoriesWizard.java
index ab44588698c..af292d11c77 100755
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/wizard/ConfigureTableCategoriesWizard.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/wizard/ConfigureTableCategoriesWizard.java
@@ -1,539 +1,545 @@
-/*****************************************************************************
- * 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.nattable.wizard;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EReference;
-import org.eclipse.emf.ecore.EcorePackage;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.emf.transaction.RecordingCommand;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.ILabelProviderListener;
-import org.eclipse.jface.viewers.ViewerComparator;
-import org.eclipse.nebula.widgets.nattable.NatTable;
-import org.eclipse.nebula.widgets.nattable.style.DisplayMode;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
-import org.eclipse.papyrus.infra.nattable.manager.axis.IAxisManager;
-import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
-import org.eclipse.papyrus.infra.nattable.model.factory.IAxisFactory;
-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.nattableaxis.ITreeItemAxis;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AbstractHeaderAxisConfiguration;
-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.IAxisConfiguration;
-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.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.nattablelabelprovider.ILabelProviderConfiguration;
-import org.eclipse.papyrus.infra.nattable.utils.Constants;
-import org.eclipse.papyrus.infra.nattable.utils.FillingConfigurationUtils;
-import org.eclipse.papyrus.infra.nattable.utils.HeaderAxisConfigurationManagementUtils;
-import org.eclipse.papyrus.infra.nattable.utils.LabelProviderContextElementWrapper;
-import org.eclipse.papyrus.infra.nattable.utils.NattableConfigAttributes;
-import org.eclipse.papyrus.infra.nattable.utils.StringComparator;
-import org.eclipse.papyrus.infra.nattable.utils.TableEditingDomainUtils;
-import org.eclipse.papyrus.infra.nattable.wizard.pages.ConfigurePasteForCategoriesWizardPage;
-import org.eclipse.papyrus.infra.nattable.wizard.pages.SelectCategoriesWizardPage;
-import org.eclipse.papyrus.infra.services.labelprovider.service.LabelProviderService;
-import org.eclipse.papyrus.infra.tools.util.TypeUtils;
-import org.eclipse.papyrus.infra.widgets.providers.FlattenableRestrictedFilteredContentProvider;
-import org.eclipse.papyrus.infra.widgets.providers.IRestrictedContentProvider;
-import org.eclipse.papyrus.infra.widgets.providers.IStaticContentProvider;
-import org.eclipse.papyrus.infra.widgets.selectors.ReferenceSelector;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Composite;
-
-/**
- * @author VL222926
- * This wizard allows to configure the categories to listen in the table And the paste action for each categories
- */
-public class ConfigureTableCategoriesWizard extends AbstractTableWizard {
-
- /**
- * the page used to choose the categories
- */
- private SelectCategoriesWizardPage categoriesPage;
-
- /**
- * the page used to configure the paste
- */
- private ConfigurePasteForCategoriesWizardPage pastePage;
-
- /**
- * the nattable model manager
- */
- private INattableModelManager manager;
-
- /**
- * the nattable widget
- */
- private final NatTable natTable;
-
- /**
- * the initial selection
- */
- private List<Object> initialSelection;
-
- /**
- *
- * Constructor.
- *
- */
- public ConfigureTableCategoriesWizard(INattableModelManager manager) {
- this.manager = manager;
- this.natTable = (NatTable) ((IAdaptable) manager).getAdapter(NatTable.class);
- setWindowTitle("Configure Categories");
- this.initialSelection = createInitialSelection();
- }
-
- /**
- *
- * @param selector
- * the reference selector
- * @return
- * the content provider to use for the selector
- */
- protected IStaticContentProvider createSelectorContentProvider(ReferenceSelector selector) {
- final IAxisManager editedAxisManager = this.manager.getColumnAxisManager();
- IStaticContentProvider provider = editedAxisManager.createPossibleAxisContentProvider(true);
- Assert.isNotNull(provider);
-
- return new FlattenableRestrictedFilteredContentProvider((IRestrictedContentProvider) provider, selector) {
-
- /**
- * @see org.eclipse.papyrus.infra.widgets.providers.FlattenableRestrictedFilteredContentProvider#isValidValue(java.lang.Object)
- *
- * @param element
- * @return
- */
- @Override
- public boolean isValidValue(Object element) {
- // EMF dependency, must not be done here, it should be better with a new content provider service
- return element instanceof EReference && ((EReference) element).isMany() && element != EcorePackage.eINSTANCE.getEModelElement_EAnnotations();
- }
- };
-
- }
-
- /**
- *
- * @return
- * the created and initialized reference selector
- */
- protected ReferenceSelector createReferenceSelector() {
- ReferenceSelector selector = new ReferenceSelector(false) {
-
-
- /**
- *
- * @see org.eclipse.papyrus.infra.widgets.selectors.ReferenceSelector#createControls(org.eclipse.swt.widgets.Composite)
- *
- * @param parent
- */
- @Override
- public void createControls(Composite parent) {
- super.createControls(parent);
- this.treeViewer.setComparator(new ViewerComparator(new StringComparator()));// should always be string element
- }
- };
-
- final LabelProviderService serv = this.natTable.getConfigRegistry().getConfigAttribute(NattableConfigAttributes.LABEL_PROVIDER_SERVICE_CONFIG_ATTRIBUTE, DisplayMode.NORMAL, NattableConfigAttributes.LABEL_PROVIDER_SERVICE_ID);
- final ILabelProvider labelProvider = serv.getLabelProvider();
- selector.setLabelProvider(labelProvider);
- selector.setContentProvider(createSelectorContentProvider(selector));
- return selector;
-
- }
-
- /**
- *
- * @return
- * the page to use to select the categories to listen in the table
- */
- protected SelectCategoriesWizardPage createSelectCategoriesPage() {
- this.categoriesPage = new SelectCategoriesWizardPage(createReferenceSelector());
- final LabelProviderService serv = this.natTable.getConfigRegistry().getConfigAttribute(NattableConfigAttributes.LABEL_PROVIDER_SERVICE_CONFIG_ATTRIBUTE, DisplayMode.NORMAL, NattableConfigAttributes.LABEL_PROVIDER_SERVICE_ID);
- this.categoriesPage.setLabelProvider(new ITreeItemWrappedObjectLabelProvider(serv.getLabelProvider(), this.natTable));
- this.categoriesPage.setInitialElementSelections(this.initialSelection);
- return this.categoriesPage;
- }
-
- /**
- *
- * @return
- * the paste page used to configure the paste
- */
- protected ConfigurePasteForCategoriesWizardPage createConfigurePastePage() {
- this.pastePage = new ConfigurePasteForCategoriesWizardPage(createReferenceSelector());
- final LabelProviderService serv = this.natTable.getConfigRegistry().getConfigAttribute(NattableConfigAttributes.LABEL_PROVIDER_SERVICE_CONFIG_ATTRIBUTE, DisplayMode.NORMAL, NattableConfigAttributes.LABEL_PROVIDER_SERVICE_ID);
- this.pastePage.setLabelProvider(new ITreeItemWrappedObjectLabelProvider(serv.getLabelProvider(), this.natTable));
- this.pastePage.setInitialElementSelections(this.initialSelection);
- return this.pastePage;
- }
-
- /**
- * @see org.eclipse.jface.wizard.Wizard#addPages()
- *
- */
- @Override
- public void addPages() {
- super.addPages();
- addPage(createSelectCategoriesPage());
- // addPage(createConfigurePastePage());
- }
-
- /**
- *
- * The label provider to use for the selected elements viewer
- *
- */
- private static class ITreeItemWrappedObjectLabelProvider implements ILabelProvider {
-
- /**
- * default label provider
- */
- private ILabelProvider wrappedLabelprovider;
-
- private NatTable natTable;
-
- private LabelProviderContextElementWrapper wrapper;
-
- /**
- *
- * Constructor.
- *
- * @param wrappedProvider
- */
- public ITreeItemWrappedObjectLabelProvider(ILabelProvider wrappedProvider, NatTable natTable) {
- this.wrappedLabelprovider = wrappedProvider;
- this.natTable = natTable;
- wrapper = new LabelProviderContextElementWrapper();
- wrapper.setConfigRegistry(natTable.getConfigRegistry());
- }
-
- /**
- * @see org.eclipse.jface.viewers.IBaseLabelProvider#addListener(org.eclipse.jface.viewers.ILabelProviderListener)
- *
- * @param arg0
- */
- @Override
- public void addListener(ILabelProviderListener arg0) {
- // nothing to do
- }
-
- /**
- * @see org.eclipse.jface.viewers.IBaseLabelProvider#dispose()
- *
- */
- @Override
- public void dispose() {
- // nothing to do
- }
-
- /**
- * @see org.eclipse.jface.viewers.IBaseLabelProvider#isLabelProperty(java.lang.Object, java.lang.String)
- *
- * @param arg0
- * @param arg1
- * @return
- */
- @Override
- public boolean isLabelProperty(Object arg0, String arg1) {
- return false;
- }
-
- /**
- * @see org.eclipse.jface.viewers.IBaseLabelProvider#removeListener(org.eclipse.jface.viewers.ILabelProviderListener)
- *
- * @param arg0
- */
- @Override
- public void removeListener(ILabelProviderListener arg0) {
- // nothing to do
- }
-
- /**
- * @see org.eclipse.jface.viewers.ILabelProvider#getImage(java.lang.Object)
- *
- * @param arg0
- * @return
- */
- @Override
- public Image getImage(Object arg0) {
- if (arg0 instanceof ITreeItemAxis) {
- arg0 = ((ITreeItemAxis) arg0).getElement();
- }
- return wrappedLabelprovider.getImage(arg0);
- }
-
- /**
- * @see org.eclipse.jface.viewers.ILabelProvider#getText(java.lang.Object)
- *
- * @param arg0
- * @return
- */
- @Override
- public String getText(Object arg0) {
- Assert.isTrue(arg0 instanceof ITreeItemAxis);
- ITreeItemAxis axis = (ITreeItemAxis) arg0;
- Object element = axis.getElement();
- if (element instanceof String) {
- if (TypeUtils.isNaturalValue((String) element)) {
- Integer value = Integer.parseInt((String) element);
- int depth = value;
- if (depth == 0 && axis.getChildren().isEmpty()) {
- return NLS.bind("depth {0} (filled by user)", depth);
- } else {
- return NLS.bind("depth {0}", depth);
- }
- }
- }
- wrapper.setObject(axis);
- final LabelProviderService serv = this.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);
- return p.getText(wrapper);
- // return wrappedLabelprovider.getText(wrapper);
- }
- }
-
- /**
- *
- * @return
- * the initial selection to use in the wizard page
- */
- protected List<Object> createInitialSelection() {
- Table table = this.manager.getTable();
- EObject tableContext = table.getContext();
-
- // the number of elements in initial selection is the number of AxisManagerRepresentation for rows
- List<Object> initialSelection = new ArrayList<Object>();
-
- // 0. we iterate on the row axis manager representation
- for (AxisManagerRepresentation rep : getRowAxisManagerRepresentations(table)) {// this iteration has not been tested
- Map<Object, ITreeItemAxis> map = new HashMap<Object, ITreeItemAxis>();
- ITreeItemAxis rootAxis = IAxisFactory.createITreeItemAxis(null, tableContext, rep, null);
- map.put(tableContext, rootAxis);
- initialSelection.add(rootAxis);
-
- // 1. we cross the existing tree filling configuration
- for (TreeFillingConfiguration fillingConf : FillingConfigurationUtils.getTreeFillingConfiguration(table, rep)) {
- Integer depth = Integer.valueOf(fillingConf.getDepth());
- ITreeItemAxis axis = map.get(depth);
- // 2. we create an idAxis if required for the depth of the current filling configuration
- if (axis == null) {
- axis = IAxisFactory.createITreeItemAxis(rootAxis, depth, null, null);
- map.put(depth, axis);
- }
-
- // 3. we create an axis to represent the element represented by the TreeFillingConfiguration
- Object representedElement = fillingConf.getAxisUsedAsAxisProvider().getElement();
- for (ITreeItemAxis curr : axis.getChildren()) {
- if (curr.getElement() == representedElement) {
- continue;
- }
- }
- ITreeItemAxis categoryAxis = IAxisFactory.createITreeItemAxis(axis, representedElement, null, fillingConf.getAxisUsedAsAxisProvider().getAlias());
- if (fillingConf.getPasteConfiguration() != null) {
- // create an axis to configure the paste in the table
- IAxisFactory.createITreeItemAxis(categoryAxis, fillingConf.getPasteConfiguration(), null, null);
- }
- }
- // the 0 depth must always be here
- if (map.get(Integer.valueOf(0)) == null) {
- ITreeItemAxis axis = IAxisFactory.createITreeItemAxis(rootAxis, 0, null, null);
- map.put(Integer.valueOf(0), axis);
- rootAxis.getChildren().move(0, axis);
- }
- }
-
- return initialSelection;
- }
-
-
- /**
- * @see org.eclipse.jface.wizard.Wizard#performFinish()
- *
- * @return
- */
- @Override
- public boolean performFinish() {
- Table table = manager.getTable();
- List<ITreeItemAxis> configureCategoriesResult = new ArrayList<ITreeItemAxis>();
- for (Object curr : initialSelection) {
- configureCategoriesResult.add((ITreeItemAxis) curr);
- }
- Command cmd = getConfigureCategoriesCommand(configureCategoriesResult);
- EditingDomain domain = TableEditingDomainUtils.getTableEditingDomain(table);
- domain.getCommandStack().execute(cmd);
- return true;
- }
-
- private ILabelProviderConfiguration getLabelConfigurationForTreeFillingConfiguration(Table table) {
- TableHeaderAxisConfiguration conf = (TableHeaderAxisConfiguration) HeaderAxisConfigurationManagementUtils.getRowAbstractHeaderAxisInTableConfiguration(table);
- for (IAxisConfiguration tmp : conf.getOwnedAxisConfigurations()) {
- if (tmp instanceof TreeFillingConfiguration) {
- if (((TreeFillingConfiguration) tmp).getLabelProvider() != null) {
- return ((TreeFillingConfiguration) tmp).getLabelProvider();
- }
- }
- }
- return null;
- }
-
- private String getLabelProviderContextForTreeFillingConfiguration(Table table) {
- return Constants.HEADER_LABEL_PROVIDER_TREE_FILLING_FEATURE_CONFIGURATION_CONTEXT;
- }
-
-
- protected Command getConfigureCategoriesCommand(final List<ITreeItemAxis> userSelection) {
- return new RecordingCommand(TableEditingDomainUtils.getTableEditingDomain(manager.getTable())) {
-
- @Override
- protected void doExecute() {
- Table table = manager.getTable();
-
- for (Object tmp : userSelection) {
- ITreeItemAxis root = (ITreeItemAxis) tmp;
- AxisManagerRepresentation representation = root.getManager();
- List<TreeFillingConfiguration> createdFillingConfiguration = new ArrayList<TreeFillingConfiguration>();
- List<PasteEObjectConfiguration> createdPasteEObjectConfiguration = new ArrayList<PasteEObjectConfiguration>();
-
- for (ITreeItemAxis depthItem : root.getChildren()) {
- Assert.isTrue(CategoriesWizardUtils.isDepthItem(depthItem));
- int wantedDepth = Integer.valueOf((String) depthItem.getElement());
- if (depthItem.getChildren().isEmpty()) {
- // we do nothing if there is no child, in standard usecase, it is only possible when wantedDepth==0;
- continue;
- }
-
-
- for (ITreeItemAxis categoryItem : depthItem.getChildren()) {
-
- // 1. try to find existing conf
- TreeFillingConfiguration newConf = findExistingTreeFillingConfiguration(table, representation, wantedDepth, categoryItem.getElement());
- if (null == newConf || EMFHelper.isReadOnly(newConf)) {
- PasteEObjectConfiguration copiedEObjectConfiguration = null;
- if(null != newConf){
- PasteEObjectConfiguration existingPasteConfiguration = newConf.getPasteConfiguration();
- copiedEObjectConfiguration = EcoreUtil.copy(existingPasteConfiguration);
- if(null != copiedEObjectConfiguration){
- createdPasteEObjectConfiguration.add(copiedEObjectConfiguration);
- }
- }
- // we create new TreeFillingConfiguration
- newConf = NattableaxisconfigurationFactory.eINSTANCE.createTreeFillingConfiguration();
- newConf.setDepth(wantedDepth);
- IAxis axis = IAxisFactory.createAxisForFeature(categoryItem.getElement(), representation, categoryItem.getAlias());
- newConf.setAxisUsedAsAxisProvider(axis);
- newConf.setLabelProvider(getLabelConfigurationForTreeFillingConfiguration(table));
- newConf.setLabelProviderContext(getLabelProviderContextForTreeFillingConfiguration(table));
- // Manage the paste configuration
- newConf.setPasteConfiguration(copiedEObjectConfiguration);
- } else {
-
- // update the alias if required
- String oldAlias = newConf.getAxisUsedAsAxisProvider().getAlias();
- String newAlias = categoryItem.getAlias();
- if ((oldAlias != null && !oldAlias.equals(newAlias)) || (newAlias != null && !newAlias.equals(oldAlias))) {
- newConf.getAxisUsedAsAxisProvider().setAlias(newAlias);
- }
- }
-
-
- createdFillingConfiguration.add(newConf);
-
- // TODO : manage paste
- }
- }
-
- LocalTableHeaderAxisConfiguration local = (LocalTableHeaderAxisConfiguration) HeaderAxisConfigurationManagementUtils.getRowAbstractHeaderAxisInTable(table);
- if (local == null) {
- local = HeaderAxisConfigurationManagementUtils.transformToLocalHeaderConfiguration((TableHeaderAxisConfiguration) HeaderAxisConfigurationManagementUtils.getRowAbstractHeaderAxisInTableConfiguration(table));
- table.setLocalRowHeaderAxisConfiguration(local);
- }
- List<AxisManagerConfiguration> axisManagerConfigurations = local.getAxisManagerConfigurations();
- AxisManagerConfiguration wantedAxisManagerConfiguration = null;
- for (AxisManagerConfiguration curr : axisManagerConfigurations) {
- if (curr.getAxisManager() == representation) {
- wantedAxisManagerConfiguration = curr;
- }
- }
- if (wantedAxisManagerConfiguration == null) {
- wantedAxisManagerConfiguration = NattableaxisconfigurationFactory.eINSTANCE.createAxisManagerConfiguration();
- wantedAxisManagerConfiguration.setAxisManager(representation);
- // TODO
- // /wantedAxisManagerConfiguration.setLocalHeaderLabelConfiguration(value);
- local.getAxisManagerConfigurations().add(wantedAxisManagerConfiguration);
- }
- local.getOwnedAxisConfigurations().clear();
- local.getOwnedAxisConfigurations().addAll(createdFillingConfiguration);
- local.getOwnedAxisConfigurations().addAll(createdPasteEObjectConfiguration);
- wantedAxisManagerConfiguration.getLocalSpecificConfigurations().clear();
- wantedAxisManagerConfiguration.getLocalSpecificConfigurations().addAll(createdFillingConfiguration);
- }
- }
- };
- }
-
- /**
- *
- * @param table
- * @param representedAxisManager
- * @param depth
- * @param representedObject
- * @return
- */
- // TODO : move me
- public static final TreeFillingConfiguration findExistingTreeFillingConfiguration(Table table, AxisManagerRepresentation representedAxisManager, int depth, Object representedObject) {
- List<TreeFillingConfiguration> existingConf = FillingConfigurationUtils.getTreeFillingConfigurationForDepth(table, representedAxisManager, depth);
- for (TreeFillingConfiguration treeFillingConfiguration : existingConf) {
- if (treeFillingConfiguration.getAxisUsedAsAxisProvider().getElement().equals(representedObject)) {
- return treeFillingConfiguration;
- }
- }
- return null;
- }
-
- /**
- *
- * @param table
- * the table
- * @return
- * the axis manager representation for rows
- */
- private static final List<AxisManagerRepresentation> getRowAxisManagerRepresentations(Table table) {
- AbstractHeaderAxisConfiguration tmp = HeaderAxisConfigurationManagementUtils.getRowAbstractHeaderAxisInTableConfiguration(table);
- Assert.isTrue(tmp instanceof TableHeaderAxisConfiguration);
- TableHeaderAxisConfiguration conf = (TableHeaderAxisConfiguration) tmp;
- return conf.getAxisManagers();
- }
-
-
-
-}
+/*****************************************************************************
+ * 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.nattable.wizard;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EOperation;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.EcorePackage;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.ILabelProviderListener;
+import org.eclipse.jface.viewers.ViewerComparator;
+import org.eclipse.nebula.widgets.nattable.NatTable;
+import org.eclipse.nebula.widgets.nattable.style.DisplayMode;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.infra.nattable.manager.axis.IAxisManager;
+import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
+import org.eclipse.papyrus.infra.nattable.model.factory.IAxisFactory;
+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.nattableaxis.ITreeItemAxis;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.NattableaxisPackage;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AbstractHeaderAxisConfiguration;
+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.IAxisConfiguration;
+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.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.nattablelabelprovider.ILabelProviderConfiguration;
+import org.eclipse.papyrus.infra.nattable.utils.Constants;
+import org.eclipse.papyrus.infra.nattable.utils.FillingConfigurationUtils;
+import org.eclipse.papyrus.infra.nattable.utils.HeaderAxisConfigurationManagementUtils;
+import org.eclipse.papyrus.infra.nattable.utils.LabelProviderContextElementWrapper;
+import org.eclipse.papyrus.infra.nattable.utils.NattableConfigAttributes;
+import org.eclipse.papyrus.infra.nattable.utils.StringComparator;
+import org.eclipse.papyrus.infra.nattable.utils.TableEditingDomainUtils;
+import org.eclipse.papyrus.infra.nattable.wizard.pages.ConfigurePasteForCategoriesWizardPage;
+import org.eclipse.papyrus.infra.nattable.wizard.pages.SelectCategoriesWizardPage;
+import org.eclipse.papyrus.infra.services.labelprovider.service.LabelProviderService;
+import org.eclipse.papyrus.infra.tools.util.TypeUtils;
+import org.eclipse.papyrus.infra.widgets.providers.FlattenableRestrictedFilteredContentProvider;
+import org.eclipse.papyrus.infra.widgets.providers.IRestrictedContentProvider;
+import org.eclipse.papyrus.infra.widgets.providers.IStaticContentProvider;
+import org.eclipse.papyrus.infra.widgets.selectors.ReferenceSelector;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Composite;
+
+/**
+ * @author VL222926
+ * This wizard allows to configure the categories to listen in the table And the paste action for each categories
+ */
+public class ConfigureTableCategoriesWizard extends AbstractTableWizard {
+
+ /**
+ * the page used to choose the categories
+ */
+ private SelectCategoriesWizardPage categoriesPage;
+
+ /**
+ * the page used to configure the paste
+ */
+ private ConfigurePasteForCategoriesWizardPage pastePage;
+
+ /**
+ * the nattable model manager
+ */
+ private INattableModelManager manager;
+
+ /**
+ * the nattable widget
+ */
+ private final NatTable natTable;
+
+ /**
+ * the initial selection
+ */
+ private List<Object> initialSelection;
+
+ /**
+ *
+ * Constructor.
+ *
+ */
+ public ConfigureTableCategoriesWizard(INattableModelManager manager) {
+ this.manager = manager;
+ this.natTable = (NatTable) ((IAdaptable) manager).getAdapter(NatTable.class);
+ setWindowTitle("Configure Categories");
+ this.initialSelection = createInitialSelection();
+ }
+
+ /**
+ *
+ * @param selector
+ * the reference selector
+ * @return
+ * the content provider to use for the selector
+ */
+ protected IStaticContentProvider createSelectorContentProvider(ReferenceSelector selector) {
+ final IAxisManager editedAxisManager = this.manager.getColumnAxisManager();
+ IStaticContentProvider provider = editedAxisManager.createPossibleAxisContentProvider(true);
+ Assert.isNotNull(provider);
+
+ return new FlattenableRestrictedFilteredContentProvider((IRestrictedContentProvider) provider, selector) {
+
+ /**
+ * @see org.eclipse.papyrus.infra.widgets.providers.FlattenableRestrictedFilteredContentProvider#isValidValue(java.lang.Object)
+ *
+ * @param element
+ * @return
+ */
+ @Override
+ public boolean isValidValue(Object element) {
+ // EMF dependency, must not be done here, it should be better with a new content provider service
+ return (element instanceof EReference && ((EReference) element).isMany() && element != EcorePackage.eINSTANCE.getEModelElement_EAnnotations())
+ || (element instanceof EOperation && ((EOperation)element).isMany());
+ }
+ };
+
+ }
+
+ /**
+ *
+ * @return
+ * the created and initialized reference selector
+ */
+ protected ReferenceSelector createReferenceSelector() {
+ ReferenceSelector selector = new ReferenceSelector(false) {
+
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.widgets.selectors.ReferenceSelector#createControls(org.eclipse.swt.widgets.Composite)
+ *
+ * @param parent
+ */
+ @Override
+ public void createControls(Composite parent) {
+ super.createControls(parent);
+ this.treeViewer.setComparator(new ViewerComparator(new StringComparator()));// should always be string element
+ }
+ };
+
+ final LabelProviderService serv = this.natTable.getConfigRegistry().getConfigAttribute(NattableConfigAttributes.LABEL_PROVIDER_SERVICE_CONFIG_ATTRIBUTE, DisplayMode.NORMAL, NattableConfigAttributes.LABEL_PROVIDER_SERVICE_ID);
+ final ILabelProvider labelProvider = serv.getLabelProvider();
+ selector.setLabelProvider(labelProvider);
+ selector.setContentProvider(createSelectorContentProvider(selector));
+ return selector;
+
+ }
+
+ /**
+ *
+ * @return
+ * the page to use to select the categories to listen in the table
+ */
+ protected SelectCategoriesWizardPage createSelectCategoriesPage() {
+ this.categoriesPage = new SelectCategoriesWizardPage(createReferenceSelector());
+ final LabelProviderService serv = this.natTable.getConfigRegistry().getConfigAttribute(NattableConfigAttributes.LABEL_PROVIDER_SERVICE_CONFIG_ATTRIBUTE, DisplayMode.NORMAL, NattableConfigAttributes.LABEL_PROVIDER_SERVICE_ID);
+ this.categoriesPage.setLabelProvider(new ITreeItemWrappedObjectLabelProvider(serv.getLabelProvider(), this.natTable));
+ this.categoriesPage.setInitialElementSelections(this.initialSelection);
+ return this.categoriesPage;
+ }
+
+ /**
+ *
+ * @return
+ * the paste page used to configure the paste
+ */
+ protected ConfigurePasteForCategoriesWizardPage createConfigurePastePage() {
+ this.pastePage = new ConfigurePasteForCategoriesWizardPage(createReferenceSelector());
+ final LabelProviderService serv = this.natTable.getConfigRegistry().getConfigAttribute(NattableConfigAttributes.LABEL_PROVIDER_SERVICE_CONFIG_ATTRIBUTE, DisplayMode.NORMAL, NattableConfigAttributes.LABEL_PROVIDER_SERVICE_ID);
+ this.pastePage.setLabelProvider(new ITreeItemWrappedObjectLabelProvider(serv.getLabelProvider(), this.natTable));
+ this.pastePage.setInitialElementSelections(this.initialSelection);
+ return this.pastePage;
+ }
+
+ /**
+ * @see org.eclipse.jface.wizard.Wizard#addPages()
+ *
+ */
+ @Override
+ public void addPages() {
+ super.addPages();
+ addPage(createSelectCategoriesPage());
+ // addPage(createConfigurePastePage());
+ }
+
+ /**
+ *
+ * The label provider to use for the selected elements viewer
+ *
+ */
+ private static class ITreeItemWrappedObjectLabelProvider implements ILabelProvider {
+
+ /**
+ * default label provider
+ */
+ private ILabelProvider wrappedLabelprovider;
+
+ private NatTable natTable;
+
+ private LabelProviderContextElementWrapper wrapper;
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param wrappedProvider
+ */
+ public ITreeItemWrappedObjectLabelProvider(ILabelProvider wrappedProvider, NatTable natTable) {
+ this.wrappedLabelprovider = wrappedProvider;
+ this.natTable = natTable;
+ wrapper = new LabelProviderContextElementWrapper();
+ wrapper.setConfigRegistry(natTable.getConfigRegistry());
+ }
+
+ /**
+ * @see org.eclipse.jface.viewers.IBaseLabelProvider#addListener(org.eclipse.jface.viewers.ILabelProviderListener)
+ *
+ * @param arg0
+ */
+ @Override
+ public void addListener(ILabelProviderListener arg0) {
+ // nothing to do
+ }
+
+ /**
+ * @see org.eclipse.jface.viewers.IBaseLabelProvider#dispose()
+ *
+ */
+ @Override
+ public void dispose() {
+ // nothing to do
+ }
+
+ /**
+ * @see org.eclipse.jface.viewers.IBaseLabelProvider#isLabelProperty(java.lang.Object, java.lang.String)
+ *
+ * @param arg0
+ * @param arg1
+ * @return
+ */
+ @Override
+ public boolean isLabelProperty(Object arg0, String arg1) {
+ return false;
+ }
+
+ /**
+ * @see org.eclipse.jface.viewers.IBaseLabelProvider#removeListener(org.eclipse.jface.viewers.ILabelProviderListener)
+ *
+ * @param arg0
+ */
+ @Override
+ public void removeListener(ILabelProviderListener arg0) {
+ // nothing to do
+ }
+
+ /**
+ * @see org.eclipse.jface.viewers.ILabelProvider#getImage(java.lang.Object)
+ *
+ * @param arg0
+ * @return
+ */
+ @Override
+ public Image getImage(Object arg0) {
+ if (arg0 instanceof ITreeItemAxis) {
+ arg0 = ((ITreeItemAxis) arg0).getElement();
+ }
+ return wrappedLabelprovider.getImage(arg0);
+ }
+
+ /**
+ * @see org.eclipse.jface.viewers.ILabelProvider#getText(java.lang.Object)
+ *
+ * @param arg0
+ * @return
+ */
+ @Override
+ public String getText(Object arg0) {
+ Assert.isTrue(arg0 instanceof ITreeItemAxis);
+ ITreeItemAxis axis = (ITreeItemAxis) arg0;
+ Object element = axis.getElement();
+ if (element instanceof String) {
+ if (TypeUtils.isNaturalValue((String) element)) {
+ Integer value = Integer.parseInt((String) element);
+ int depth = value;
+ if (depth == 0 && axis.getChildren().isEmpty()) {
+ return NLS.bind("depth {0} (filled by user)", depth);
+ } else {
+ return NLS.bind("depth {0}", depth);
+ }
+ }
+ }
+ wrapper.setObject(axis);
+ final LabelProviderService serv = this.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);
+ return p.getText(wrapper);
+ // return wrappedLabelprovider.getText(wrapper);
+ }
+ }
+
+ /**
+ *
+ * @return
+ * the initial selection to use in the wizard page
+ */
+ protected List<Object> createInitialSelection() {
+ Table table = this.manager.getTable();
+ EObject tableContext = table.getContext();
+
+ // the number of elements in initial selection is the number of AxisManagerRepresentation for rows
+ List<Object> initialSelection = new ArrayList<Object>();
+
+ // 0. we iterate on the row axis manager representation
+ for (AxisManagerRepresentation rep : getRowAxisManagerRepresentations(table)) {// this iteration has not been tested
+ Map<Object, ITreeItemAxis> map = new HashMap<Object, ITreeItemAxis>();
+ ITreeItemAxis rootAxis = IAxisFactory.createITreeItemAxis(null, tableContext, rep, null);
+ map.put(tableContext, rootAxis);
+ initialSelection.add(rootAxis);
+
+ // 1. we cross the existing tree filling configuration
+ for (TreeFillingConfiguration fillingConf : FillingConfigurationUtils.getTreeFillingConfiguration(table, rep)) {
+ Integer depth = Integer.valueOf(fillingConf.getDepth());
+ ITreeItemAxis axis = map.get(depth);
+ // 2. we create an idAxis if required for the depth of the current filling configuration
+ if (axis == null) {
+ axis = IAxisFactory.createITreeItemAxis(rootAxis, depth, null, null);
+ map.put(depth, axis);
+ }
+
+ // 3. we create an axis to represent the element represented by the TreeFillingConfiguration
+ Object representedElement = fillingConf.getAxisUsedAsAxisProvider().getElement();
+ for (ITreeItemAxis curr : axis.getChildren()) {
+ if (curr.getElement() == representedElement) {
+ continue;
+ }
+ }
+ ITreeItemAxis categoryAxis = IAxisFactory.createITreeItemAxis(axis, representedElement, null, fillingConf.getAxisUsedAsAxisProvider().getAlias());
+ if (fillingConf.getPasteConfiguration() != null) {
+ // create an axis to configure the paste in the table
+ IAxisFactory.createITreeItemAxis(categoryAxis, fillingConf.getPasteConfiguration(), null, null);
+ }
+ }
+ // the 0 depth must always be here
+ if (map.get(Integer.valueOf(0)) == null) {
+ ITreeItemAxis axis = IAxisFactory.createITreeItemAxis(rootAxis, 0, null, null);
+ map.put(Integer.valueOf(0), axis);
+ rootAxis.getChildren().move(0, axis);
+ }
+ }
+
+ return initialSelection;
+ }
+
+
+ /**
+ * @see org.eclipse.jface.wizard.Wizard#performFinish()
+ *
+ * @return
+ */
+ @Override
+ public boolean performFinish() {
+ Table table = manager.getTable();
+ List<ITreeItemAxis> configureCategoriesResult = new ArrayList<ITreeItemAxis>();
+ for (Object curr : initialSelection) {
+ configureCategoriesResult.add((ITreeItemAxis) curr);
+ }
+ Command cmd = getConfigureCategoriesCommand(configureCategoriesResult);
+ EditingDomain domain = TableEditingDomainUtils.getTableEditingDomain(table);
+ domain.getCommandStack().execute(cmd);
+ return true;
+ }
+
+ private ILabelProviderConfiguration getLabelConfigurationForTreeFillingConfiguration(Table table, final IAxis axis) {
+ TableHeaderAxisConfiguration conf = (TableHeaderAxisConfiguration) HeaderAxisConfigurationManagementUtils.getRowAbstractHeaderAxisInTableConfiguration(table);
+ for (IAxisConfiguration tmp : conf.getOwnedAxisConfigurations()) {
+ if (tmp instanceof TreeFillingConfiguration) {
+ if(((TreeFillingConfiguration) tmp).getAxisUsedAsAxisProvider().eClass().equals(axis.eClass()) && null != ((TreeFillingConfiguration) tmp).getLabelProvider()){
+ return ((TreeFillingConfiguration) tmp).getLabelProvider();
+ }
+ }
+ }
+ return null;
+ }
+
+ private String getLabelProviderContextForTreeFillingConfiguration(Table table, final IAxis axis) {
+ if(axis.eClass().equals(NattableaxisPackage.eINSTANCE.getEOperationAxis()) || axis.eClass().equals(NattableaxisPackage.eINSTANCE.getEOperationTreeItemAxis())){
+ return Constants.HEADER_LABEL_PROVIDER_TREE_FILLING_OPERATION_CONFIGURATION_CONTEXT;
+ }
+ return Constants.HEADER_LABEL_PROVIDER_TREE_FILLING_FEATURE_CONFIGURATION_CONTEXT;
+ }
+
+
+ protected Command getConfigureCategoriesCommand(final List<ITreeItemAxis> userSelection) {
+ return new RecordingCommand(TableEditingDomainUtils.getTableEditingDomain(manager.getTable())) {
+
+ @Override
+ protected void doExecute() {
+ Table table = manager.getTable();
+
+ for (Object tmp : userSelection) {
+ ITreeItemAxis root = (ITreeItemAxis) tmp;
+ AxisManagerRepresentation representation = root.getManager();
+ List<TreeFillingConfiguration> createdFillingConfiguration = new ArrayList<TreeFillingConfiguration>();
+ List<PasteEObjectConfiguration> createdPasteEObjectConfiguration = new ArrayList<PasteEObjectConfiguration>();
+
+ for (ITreeItemAxis depthItem : root.getChildren()) {
+ Assert.isTrue(CategoriesWizardUtils.isDepthItem(depthItem));
+ int wantedDepth = Integer.valueOf((String) depthItem.getElement());
+ if (depthItem.getChildren().isEmpty()) {
+ // we do nothing if there is no child, in standard usecase, it is only possible when wantedDepth==0;
+ continue;
+ }
+
+
+ for (ITreeItemAxis categoryItem : depthItem.getChildren()) {
+
+ // 1. try to find existing conf
+ TreeFillingConfiguration newConf = findExistingTreeFillingConfiguration(table, representation, wantedDepth, categoryItem.getElement());
+ if (null == newConf || EMFHelper.isReadOnly(newConf)) {
+ PasteEObjectConfiguration copiedEObjectConfiguration = null;
+ if(null != newConf){
+ PasteEObjectConfiguration existingPasteConfiguration = newConf.getPasteConfiguration();
+ copiedEObjectConfiguration = EcoreUtil.copy(existingPasteConfiguration);
+ if(null != copiedEObjectConfiguration){
+ createdPasteEObjectConfiguration.add(copiedEObjectConfiguration);
+ }
+ }
+ // we create new TreeFillingConfiguration
+ newConf = NattableaxisconfigurationFactory.eINSTANCE.createTreeFillingConfiguration();
+ newConf.setDepth(wantedDepth);
+ IAxis axis = IAxisFactory.createAxisForTypedElement(categoryItem.getElement(), representation, categoryItem.getAlias());
+ newConf.setAxisUsedAsAxisProvider(axis);
+ newConf.setLabelProvider(getLabelConfigurationForTreeFillingConfiguration(table, axis));
+ newConf.setLabelProviderContext(getLabelProviderContextForTreeFillingConfiguration(table, axis));
+ // Manage the paste configuration
+ newConf.setPasteConfiguration(copiedEObjectConfiguration);
+ } else {
+
+ // update the alias if required
+ String oldAlias = newConf.getAxisUsedAsAxisProvider().getAlias();
+ String newAlias = categoryItem.getAlias();
+ if ((oldAlias != null && !oldAlias.equals(newAlias)) || (newAlias != null && !newAlias.equals(oldAlias))) {
+ newConf.getAxisUsedAsAxisProvider().setAlias(newAlias);
+ }
+ }
+
+
+ createdFillingConfiguration.add(newConf);
+
+ // TODO : manage paste
+ }
+ }
+
+ LocalTableHeaderAxisConfiguration local = (LocalTableHeaderAxisConfiguration) HeaderAxisConfigurationManagementUtils.getRowAbstractHeaderAxisInTable(table);
+ if (local == null) {
+ local = HeaderAxisConfigurationManagementUtils.transformToLocalHeaderConfiguration((TableHeaderAxisConfiguration) HeaderAxisConfigurationManagementUtils.getRowAbstractHeaderAxisInTableConfiguration(table));
+ table.setLocalRowHeaderAxisConfiguration(local);
+ }
+ List<AxisManagerConfiguration> axisManagerConfigurations = local.getAxisManagerConfigurations();
+ AxisManagerConfiguration wantedAxisManagerConfiguration = null;
+ for (AxisManagerConfiguration curr : axisManagerConfigurations) {
+ if (curr.getAxisManager() == representation) {
+ wantedAxisManagerConfiguration = curr;
+ }
+ }
+ if (wantedAxisManagerConfiguration == null) {
+ wantedAxisManagerConfiguration = NattableaxisconfigurationFactory.eINSTANCE.createAxisManagerConfiguration();
+ wantedAxisManagerConfiguration.setAxisManager(representation);
+ // TODO
+ // /wantedAxisManagerConfiguration.setLocalHeaderLabelConfiguration(value);
+ local.getAxisManagerConfigurations().add(wantedAxisManagerConfiguration);
+ }
+ local.getOwnedAxisConfigurations().clear();
+ local.getOwnedAxisConfigurations().addAll(createdFillingConfiguration);
+ local.getOwnedAxisConfigurations().addAll(createdPasteEObjectConfiguration);
+ wantedAxisManagerConfiguration.getLocalSpecificConfigurations().clear();
+ wantedAxisManagerConfiguration.getLocalSpecificConfigurations().addAll(createdFillingConfiguration);
+ }
+ }
+ };
+ }
+
+ /**
+ *
+ * @param table
+ * @param representedAxisManager
+ * @param depth
+ * @param representedObject
+ * @return
+ */
+ // TODO : move me
+ public static final TreeFillingConfiguration findExistingTreeFillingConfiguration(Table table, AxisManagerRepresentation representedAxisManager, int depth, Object representedObject) {
+ List<TreeFillingConfiguration> existingConf = FillingConfigurationUtils.getTreeFillingConfigurationForDepth(table, representedAxisManager, depth);
+ for (TreeFillingConfiguration treeFillingConfiguration : existingConf) {
+ if (treeFillingConfiguration.getAxisUsedAsAxisProvider().getElement().equals(representedObject)) {
+ return treeFillingConfiguration;
+ }
+ }
+ return null;
+ }
+
+ /**
+ *
+ * @param table
+ * the table
+ * @return
+ * the axis manager representation for rows
+ */
+ private static final List<AxisManagerRepresentation> getRowAxisManagerRepresentations(Table table) {
+ AbstractHeaderAxisConfiguration tmp = HeaderAxisConfigurationManagementUtils.getRowAbstractHeaderAxisInTableConfiguration(table);
+ Assert.isTrue(tmp instanceof TableHeaderAxisConfiguration);
+ TableHeaderAxisConfiguration conf = (TableHeaderAxisConfiguration) tmp;
+ return conf.getAxisManagers();
+ }
+
+
+
+}
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 1ad0d2d3189..dce0f1bbc88 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
@@ -3,36 +3,39 @@
<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"/>
+ <ownedLabelConfigurations xsi:type="nattablelabelprovider:OperationLabelProviderConfiguration" displayType="false" displayMultiplicity="false"/>
<ownedAxisConfigurations xsi:type="nattableaxisconfiguration:EStructuralFeatureValueFillingConfiguration">
- <listenFeature xsi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Namespace/ownedMember"/>
+ <listenFeature xsi:type="ecore:EReference" href="platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//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"/>
+ <pasteElementContainementFeature xsi:type="ecore:EReference" href="platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//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"/>
+ <element xmi:type="ecore:EAttribute" href="platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//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"/>
+ <ownedLabelConfigurations xsi:type="nattablelabelprovider:OperationLabelProviderConfiguration"/>
<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"/>
+ <axisManagers xsi:type="nattableaxisconfiguration:AxisManagerRepresentation" axisManagerId="org.eclipse.papyrus.uml.nattable.operation.axis.manager" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.operation.labelprovider" headerLabelConfiguration="//@columnHeaderAxisConfiguration/@ownedLabelConfigurations.1"/>
</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"/>
+ <element xsi:type="ecore:EAttribute" href="platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//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"/>
+ <element xsi:type="ecore:EReference" href="platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//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"/>
+ <element xsi:type="ecore:EReference" href="platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//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"/>
+ <element xsi:type="ecore:EReference" href="platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//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"/>
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 b139c018153..c1771fb08f4 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
@@ -3,28 +3,31 @@
<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"/>
+ <ownedLabelConfigurations xsi:type="nattablelabelprovider:OperationLabelProviderConfiguration" displayType="false" displayMultiplicity="false"/>
<ownedAxisConfigurations xsi:type="nattableaxisconfiguration:EStructuralFeatureValueFillingConfiguration">
- <listenFeature xsi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Namespace/ownedMember"/>
+ <listenFeature xsi:type="ecore:EReference" href="platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//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"/>
+ <pasteElementContainementFeature xsi:type="ecore:EReference" href="platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//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"/>
+ <element xmi:type="ecore:EAttribute" href="platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//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"/>
+ <ownedLabelConfigurations xsi:type="nattablelabelprovider:OperationLabelProviderConfiguration"/>
<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"/>
+ <axisManagers xsi:type="nattableaxisconfiguration:AxisManagerRepresentation" axisManagerId="org.eclipse.papyrus.uml.nattable.operation.axis.manager" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.operation.labelprovider" headerLabelConfiguration="//@columnHeaderAxisConfiguration/@ownedLabelConfigurations.1"/>
</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"/>
+ <element xsi:type="ecore:EAttribute" href="platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//NamedElement/name"/>
</axis>
<axis xsi:type="nattableaxis:FeatureIdAxis" manager="//@columnHeaderAxisConfiguration/@axisManagers.1" element="property_of_stereotype:/SysML::Requirements::Requirement::text"/>
</columnAxisProviders>
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 df516b09eff..ab7497bd359 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
@@ -5,60 +5,66 @@
<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">
+ <ownedLabelConfigurations xsi:type="nattablelabelprovider:OperationLabelProviderConfiguration" displayType="false" displayMultiplicity="false"/>
+ <ownedAxisConfigurations xsi:type="nattableaxisconfiguration:TreeFillingConfiguration" pasteConfiguration="//@rowHeaderAxisConfiguration/@ownedAxisConfigurations.6" 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"/>
+ <element xsi:type="ecore:EReference" href="platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//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">
+ <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#//StructuredClassifier/ownedAttribute"/>
+ <element xsi:type="ecore:EReference" href="platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//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">
+ <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/ownedOperation"/>
+ <element xsi:type="ecore:EReference" href="platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//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">
+ <ownedAxisConfigurations xsi:type="nattableaxisconfiguration:TreeFillingConfiguration" pasteConfiguration="//@rowHeaderAxisConfiguration/@ownedAxisConfigurations.9" 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"/>
+ <element xsi:type="ecore:EReference" href="platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//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">
+ <ownedAxisConfigurations xsi:type="nattableaxisconfiguration:TreeFillingConfiguration" pasteConfiguration="//@rowHeaderAxisConfiguration/@ownedAxisConfigurations.10" 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"/>
+ <element xsi:type="ecore:EReference" href="platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//BehavioralFeature/ownedParameter"/>
</axisUsedAsAxisProvider>
</ownedAxisConfigurations>
+ <ownedAxisConfigurations xsi:type="nattableaxisconfiguration:TreeFillingConfiguration" pasteConfiguration="//@rowHeaderAxisConfiguration/@ownedAxisConfigurations.6" depth="1" labelProvider="//@rowHeaderAxisConfiguration/@ownedLabelConfigurations.2" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.treefilling.operation.labelprovider">
+ <axisUsedAsAxisProvider xsi:type="nattableaxis:EOperationAxis"/>
+ </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"/>
+ <pasteElementContainementFeature xsi:type="ecore:EReference" href="platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//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"/>
+ <element xmi:type="ecore:EAttribute" href="platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//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"/>
+ <pasteElementContainementFeature xsi:type="ecore:EReference" href="platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//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"/>
+ <pasteElementContainementFeature xsi:type="ecore:EReference" href="platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//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"/>
+ <pasteElementContainementFeature xsi:type="ecore:EReference" href="platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//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"/>
+ <pasteElementContainementFeature xsi:type="ecore:EReference" href="platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//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"/>
+ <ownedLabelConfigurations xsi:type="nattablelabelprovider:OperationLabelProviderConfiguration"/>
<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"/>
+ <axisManagers xsi:type="nattableaxisconfiguration:AxisManagerRepresentation" axisManagerId="org.eclipse.papyrus.uml.nattable.operation.axis.manager" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.operation.labelprovider" headerLabelConfiguration="//@columnHeaderAxisConfiguration/@ownedLabelConfigurations.1"/>
</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"/>
+ <element xsi:type="ecore:EAttribute" href="platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//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"/>
diff --git a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration
index 4766d364acc..a59c1ed7dad 100644
--- a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration
+++ b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration
@@ -1,15 +1,17 @@
-<?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: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="The generic table allows to edit all UML elements of your model, dropping them from the ModelExplorer View" name="GenericTable" type="PapyrusGenericTable" iconPath="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/icons/uml_generic_table.png" defaultRowAxisProvider="//@rowAxisProviders.0" defaultColumnAxisProvider="//@columnAxisProviders.0">
- <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"/>
- <axisManagers xsi:type="nattableaxisconfiguration:AxisManagerRepresentation" axisManagerId="org.eclipse.papyrus.uml.nattable.element.axis.manager" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.labelprovider" headerLabelConfiguration="//@rowHeaderAxisConfiguration/@ownedLabelConfigurations.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 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"/>
- <rowAxisProviders xsi:type="nattableaxisprovider:MasterObjectAxisProvider" description="This axis provider contains the object dropped by the user into the table" name="DroppedElementAxisProvider"/>
-</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: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="The generic table allows to edit all UML elements of your model, dropping them from the ModelExplorer View" name="GenericTable" type="PapyrusGenericTable" iconPath="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/icons/uml_generic_table.png" defaultRowAxisProvider="//@rowAxisProviders.0" defaultColumnAxisProvider="//@columnAxisProviders.0">
+ <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"/>
+ <axisManagers xsi:type="nattableaxisconfiguration:AxisManagerRepresentation" axisManagerId="org.eclipse.papyrus.uml.nattable.element.axis.manager" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.labelprovider" headerLabelConfiguration="//@rowHeaderAxisConfiguration/@ownedLabelConfigurations.0"/>
+ </rowHeaderAxisConfiguration>
+ <columnHeaderAxisConfiguration xsi:type="nattableaxisconfiguration:TableHeaderAxisConfiguration">
+ <ownedLabelConfigurations xsi:type="nattablelabelprovider:FeatureLabelProviderConfiguration"/>
+ <ownedLabelConfigurations xsi:type="nattablelabelprovider:OperationLabelProviderConfiguration"/>
+ <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"/>
+ <axisManagers xsi:type="nattableaxisconfiguration:AxisManagerRepresentation" axisManagerId="org.eclipse.papyrus.uml.nattable.operation.axis.manager" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.operation.labelprovider" headerLabelConfiguration="//@columnHeaderAxisConfiguration/@ownedLabelConfigurations.1"/>
+ </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"/>
+ <rowAxisProviders xsi:type="nattableaxisprovider:MasterObjectAxisProvider" description="This axis provider contains the object dropped by the user into the table" name="DroppedElementAxisProvider"/>
+</nattableconfiguration:TableConfiguration>
diff --git a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.stereotype.display/config/stereotype.nattableconfiguration b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.stereotype.display/config/stereotype.nattableconfiguration
index 396f94edebb..baca065a9e1 100644
--- a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.stereotype.display/config/stereotype.nattableconfiguration
+++ b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.stereotype.display/config/stereotype.nattableconfiguration
@@ -10,7 +10,7 @@
<rowHeaderAxisConfiguration xsi:type="nattableaxisconfiguration:TableHeaderAxisConfiguration" indexStyle="NUMERIC" displayIndex="false">
<styles xsi:type="nattablestyle:IntValueStyle" name="rowLabelWidth" intValue="250"/>
<ownedLabelConfigurations xsi:type="nattablelabelprovider:FeatureLabelProviderConfiguration" displayIcon="false" displayIsDerived="false" displayType="false" displayMultiplicity="false"/>
- <ownedLabelConfigurations xsi:type="nattablelabelprovider:FeatureLabelProviderConfiguration" displayIcon="false" displayIsDerived="false" displayType="false" displayMultiplicity="false"/>
+ <ownedLabelConfigurations xsi:type="nattablelabelprovider:OperationLabelProviderConfiguration" displayIcon="false" displayType="false" displayMultiplicity="false"/>
<ownedAxisConfigurations xsi:type="nattableaxisconfiguration:TreeFillingConfiguration" depth="1" labelProvider="//@rowHeaderAxisConfiguration/@ownedLabelConfigurations.0" 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/gmf/runtime/1.0.2/notation#//View/element"/>
@@ -18,19 +18,21 @@
</ownedAxisConfigurations>
<ownedAxisConfigurations xsi:type="nattableaxisconfiguration:TreeFillingConfiguration" depth="2" labelProvider="//@rowHeaderAxisConfiguration/@ownedLabelConfigurations.0" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.treefilling.operation.labelprovider">
<axisUsedAsAxisProvider xsi:type="nattableaxis:EOperationAxis">
- <element xsi:type="ecore:EOperation" href="http://www.eclipse.org/uml2/5.0.0/UML#//Element/getAppliedStereotypes"/>
+ <element xsi:type="ecore:EOperation" href="platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//Element/getAppliedStereotypes"/>
</axisUsedAsAxisProvider>
</ownedAxisConfigurations>
<ownedAxisConfigurations xsi:type="nattableaxisconfiguration:TreeFillingConfiguration" depth="3" labelProvider="//@rowHeaderAxisConfiguration/@ownedLabelConfigurations.0" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.treefilling.operation.labelprovider">
<axisUsedAsAxisProvider xsi:type="nattableaxis:EOperationAxis" alias="">
- <element xsi:type="ecore:EOperation" href="http://www.eclipse.org/uml2/5.0.0/UML#//Classifier/getAllAttributes"/>
+ <element xsi:type="ecore:EOperation" href="platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//Classifier/getAllAttributes"/>
</axisUsedAsAxisProvider>
</ownedAxisConfigurations>
- <axisManagers xsi:type="nattableaxisconfiguration:AxisManagerRepresentation" axisManagerId="org.eclipse.papyrus.uml.nattable.stereotype.display.axis.manager" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.labelprovider" headerLabelConfiguration="//@rowHeaderAxisConfiguration/@ownedLabelConfigurations.1" specificAxisConfigurations="//@rowHeaderAxisConfiguration/@ownedAxisConfigurations.0 //@rowHeaderAxisConfiguration/@ownedAxisConfigurations.1 //@rowHeaderAxisConfiguration/@ownedAxisConfigurations.2"/>
+ <axisManagers xsi:type="nattableaxisconfiguration:AxisManagerRepresentation" axisManagerId="org.eclipse.papyrus.uml.nattable.stereotype.display.axis.manager" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.labelprovider" headerLabelConfiguration="//@columnHeaderAxisConfiguration/@ownedLabelConfigurations.0" specificAxisConfigurations="//@rowHeaderAxisConfiguration/@ownedAxisConfigurations.0 //@rowHeaderAxisConfiguration/@ownedAxisConfigurations.1 //@rowHeaderAxisConfiguration/@ownedAxisConfigurations.2"/>
</rowHeaderAxisConfiguration>
<columnHeaderAxisConfiguration xsi:type="nattableaxisconfiguration:TableHeaderAxisConfiguration" displayIndex="false">
<ownedLabelConfigurations xsi:type="nattablelabelprovider:FeatureLabelProviderConfiguration"/>
+ <ownedLabelConfigurations xsi:type="nattablelabelprovider:OperationLabelProviderConfiguration"/>
<axisManagers xsi:type="nattableaxisconfiguration:AxisManagerRepresentation" axisManagerId="org.eclipse.papyrus.uml.nattable.stereotype.display.properties.axis.manager" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.labelprovider" headerLabelConfiguration="//@columnHeaderAxisConfiguration/@ownedLabelConfigurations.0"/>
+ <axisManagers xsi:type="nattableaxisconfiguration:AxisManagerRepresentation" axisManagerId="org.eclipse.papyrus.uml.nattable.operation.axis.manager" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.operation.labelprovider" headerLabelConfiguration="//@columnHeaderAxisConfiguration/@ownedLabelConfigurations.1"/>
</columnHeaderAxisConfiguration>
<columnAxisProviders xsi:type="nattableaxisprovider:SlaveObjectAxisProvider" description="This axis provider provides available columns according to the columns of the table ( features of the object displayed on the other axis)" name="Stereotype display properties axis provider">
<axis xsi:type="nattableaxis:FeatureIdAxis" manager="//@columnHeaderAxisConfiguration/@axisManagers.0" alias="Name Depth" element="stereotype_display_properties:/nameDepth">
diff --git a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/configs/genericTreeTable.nattableconfiguration b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/configs/genericTreeTable.nattableconfiguration
index 426d46390e9..2348a184146 100755
--- a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/configs/genericTreeTable.nattableconfiguration
+++ b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/configs/genericTreeTable.nattableconfiguration
@@ -5,31 +5,37 @@
<rowHeaderAxisConfiguration xsi:type="nattableaxisconfiguration:TableHeaderAxisConfiguration" indexStyle="NUMERIC">
<ownedLabelConfigurations xsi:type="nattablelabelprovider:ObjectLabelProviderConfiguration"/>
<ownedLabelConfigurations xsi:type="nattablelabelprovider:FeatureLabelProviderConfiguration" displayType="false" displayMultiplicity="false"/>
+ <ownedLabelConfigurations xsi:type="nattablelabelprovider:OperationLabelProviderConfiguration" displayType="false" displayMultiplicity="false"/>
<ownedAxisConfigurations xsi:type="nattableaxisconfiguration:TreeFillingConfiguration" 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#//Element/ownedElement"/>
+ <element xsi:type="ecore:EReference" href="platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//Element/ownedElement"/>
</axisUsedAsAxisProvider>
</ownedAxisConfigurations>
<ownedAxisConfigurations xsi:type="nattableaxisconfiguration:TreeFillingConfiguration" 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#//Element/ownedElement"/>
+ <element xsi:type="ecore:EReference" href="platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//Element/ownedElement"/>
</axisUsedAsAxisProvider>
</ownedAxisConfigurations>
<ownedAxisConfigurations xsi:type="nattableaxisconfiguration:TreeFillingConfiguration" 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#//Element/ownedElement"/>
+ <element xsi:type="ecore:EReference" href="platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//Element/ownedElement"/>
</axisUsedAsAxisProvider>
</ownedAxisConfigurations>
+ <ownedAxisConfigurations xsi:type="nattableaxisconfiguration:TreeFillingConfiguration" depth="1" labelProvider="//@rowHeaderAxisConfiguration/@ownedLabelConfigurations.2" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.treefilling.operation.labelprovider">
+ <axisUsedAsAxisProvider xsi:type="nattableaxis:EOperationAxis"/>
+ </ownedAxisConfigurations>
<axisManagers xsi:type="nattableaxisconfiguration:AxisManagerRepresentation" axisManagerId="org.eclipse.papyrus.infra.uml.nattable.tree.axis.manager" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.labelprovider" headerLabelConfiguration="//@rowHeaderAxisConfiguration/@ownedLabelConfigurations.0" specificAxisConfigurations="//@rowHeaderAxisConfiguration/@ownedAxisConfigurations.0 //@rowHeaderAxisConfiguration/@ownedAxisConfigurations.1 //@rowHeaderAxisConfiguration/@ownedAxisConfigurations.2"/>
</rowHeaderAxisConfiguration>
<columnHeaderAxisConfiguration xsi:type="nattableaxisconfiguration:TableHeaderAxisConfiguration">
<ownedLabelConfigurations xsi:type="nattablelabelprovider:FeatureLabelProviderConfiguration"/>
+ <ownedLabelConfigurations xsi:type="nattablelabelprovider:OperationLabelProviderConfiguration"/>
<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"/>
+ <axisManagers xsi:type="nattableaxisconfiguration:AxisManagerRepresentation" axisManagerId="org.eclipse.papyrus.uml.nattable.operation.axis.manager" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.operation.labelprovider" headerLabelConfiguration="//@columnHeaderAxisConfiguration/@ownedLabelConfigurations.1"/>
</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"/>
+ <element xsi:type="ecore:EAttribute" href="platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//NamedElement/name"/>
</axis>
</columnAxisProviders>
<rowAxisProviders xsi:type="nattableaxisprovider:MasterObjectAxisProvider" description="This axis provider manages the rows, according to the wanted hierarchy" name="HierarchicalRowAxisManager" disconnectSlave="true"/>

Back to the top