diff options
author | Nicolas FAUVERGUE | 2015-11-10 14:48:39 +0000 |
---|---|---|
committer | vincent lorenzo | 2015-11-12 12:09:44 +0000 |
commit | ed2ed2d18a122cb6042c5e18e61afc4dd29d73c0 (patch) | |
tree | 3b8d67f14a85e89ba40e4599ede68e717d160b15 | |
parent | 7e2c22b4effb2d2dfaaf2f23538392918ef8b01d (diff) | |
download | org.eclipse.papyrus-ed2ed2d18a122cb6042c5e18e61afc4dd29d73c0.tar.gz org.eclipse.papyrus-ed2ed2d18a122cb6042c5e18e61afc4dd29d73c0.tar.xz org.eclipse.papyrus-ed2ed2d18a122cb6042c5e18e61afc4dd29d73c0.zip |
Bug 481308: [Table] Insert/Paste rows selecting a row rcategory throws
an exception
https://bugs.eclipse.org/bugs/show_bug.cgi?id=481308
- Manage the insert of child when a feature is selected
- If an element to insert is already existing and the user want to add
it, an element with same type must be created
- When a blank line was available before an element to create (not
existing in the table), theelement was created with hierarchy. A problem
was present, indeed, we can't decided if the blank line is here for a
tree filling with depth superior or if this is a sibling tree filling to
the previous one -> So we always create a first depth element
Change-Id: Iad29614e18236fa1d6344341f41f2a8e61779e70
Signed-off-by: Nicolas FAUVERGUE <nicolas.fauvergue@all4tec.net>
24 files changed, 275 insertions, 779 deletions
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/AbstractInsertImportInNattableManager.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/AbstractInsertImportInNattableManager.java index 4e71de31e9c..af5d5796fc1 100644 --- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/AbstractInsertImportInNattableManager.java +++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/AbstractInsertImportInNattableManager.java @@ -15,26 +15,19 @@ package org.eclipse.papyrus.infra.nattable.manager; import java.io.IOException; import java.io.Reader; -import java.util.HashMap; -import java.util.Map; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.MultiStatus; import org.eclipse.core.runtime.Status; import org.eclipse.jface.dialogs.MessageDialog; -import org.eclipse.osgi.util.NLS; import org.eclipse.papyrus.infra.nattable.Activator; import org.eclipse.papyrus.infra.nattable.dialog.PasteImportStatusDialog; import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager; import org.eclipse.papyrus.infra.nattable.messages.Messages; -import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.IPasteConfiguration; -import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.PasteEObjectConfiguration; -import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.TreeFillingConfiguration; import org.eclipse.papyrus.infra.nattable.provider.PasteInSelectionNattableCommandProvider; import org.eclipse.papyrus.infra.nattable.provider.PasteInSelectionTreeNattableCommandProvider; import org.eclipse.papyrus.infra.nattable.provider.PasteNattableCommandProvider; import org.eclipse.papyrus.infra.nattable.utils.CSVPasteHelper; -import org.eclipse.papyrus.infra.nattable.utils.FillingConfigurationUtils; import org.eclipse.papyrus.infra.nattable.utils.IPapyrusNattableStatus; import org.eclipse.papyrus.infra.nattable.utils.PapyrusNattableStatus; import org.eclipse.papyrus.infra.nattable.utils.PasteEnablementStatus; @@ -163,38 +156,6 @@ public abstract class AbstractInsertImportInNattableManager extends AbstractPast } /** - * @see org.eclipse.papyrus.infra.nattable.manager.AbstractPasteImportInsertInNattableManager#checkTreeTableConfiguration(org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager) - * - * @param manager - * @return - */ - @Override - protected IStatus checkTreeTableConfiguration(INattableModelManager manager) { - IStatus status = super.checkTreeTableConfiguration(manager); - - // Check if no more than one paste configuration by depth for the creation - if (status.isOK()) { - final String pluginId = Activator.PLUGIN_ID; - Map<Integer, PasteEObjectConfiguration> configurationByDepth = new HashMap<Integer, PasteEObjectConfiguration>(); - for (final TreeFillingConfiguration current : FillingConfigurationUtils.getAllTreeFillingConfiguration(tableManager.getTable())) { - final IPasteConfiguration conf = current.getPasteConfiguration(); - if (conf instanceof PasteEObjectConfiguration) { - - if (configurationByDepth.containsKey(current.getDepth())) { - if (!configurationByDepth.get(current.getDepth()).equals(conf)) { - status = new PapyrusNattableStatus(IPapyrusNattableStatus.PASTE_CONFIGURATiON_ERROR, pluginId, NLS.bind(Messages.AbstractInsertImportInNattableManager_MoreThanOnePasteConfigurationByDepth, current.getDepth())); - } - } else { - configurationByDepth.put(current.getDepth(), (PasteEObjectConfiguration) conf); - } - } - } - } - - return status; - } - - /** * Insert the row. * * @param manager diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/AbstractPasteInSelectionNattableCommandProvider.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/AbstractPasteInSelectionNattableCommandProvider.java index adf3c4e132f..046784dd91e 100644 --- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/AbstractPasteInSelectionNattableCommandProvider.java +++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/AbstractPasteInSelectionNattableCommandProvider.java @@ -1150,17 +1150,12 @@ public abstract class AbstractPasteInSelectionNattableCommandProvider implements long readChar = 0; long previousreadChar = 0; - EObject parentContext = table.getContext(); - // Calculate the first row position of the selection and the index of the first selected element i the root parent (to determinate where the inserted element have to be) - int initialFirstIndexInParent = -1; int initialFirstRowPosition = -1; if (null != rows) { for (int rowIndex : rows.keySet()) { if (-1 == initialFirstRowPosition || rowIndex < initialFirstRowPosition) { initialFirstRowPosition = rowIndex; - parentContext = getContentOfSelection(rows, rowIndex); - initialFirstIndexInParent = getFirstSelectedElementIndexOfTableContext(rows, rowIndex, parentContext); } } } @@ -1169,16 +1164,27 @@ public abstract class AbstractPasteInSelectionNattableCommandProvider implements lastRowPosition = firstRowPosition; lastColumnPosition = firstColumnPosition; - EObject currentContext = parentContext; - int currentDepth = 0; + // Calculate the parent context, depth and category from the row position + int noIndex = 0; + if (-1 != firstRowPosition) { + noIndex = firstRowPosition; + } + final EObject parentContext = getContentOfSelection(rows, noIndex); + final Object firstRowElementSelected = tableManager.getRowElement(noIndex); + final int parentDepth = getDepthFromObject(firstRowElementSelected); + final String parentCategory = getCategoryFromObject(firstRowElementSelected); + + // Calculate the index of the first selected item in the parent context + int initialFirstIndexInParent = -1; + if (-1 != firstRowPosition) { + initialFirstIndexInParent = getFirstSelectedElementIndexOfTableContext(rows, firstRowPosition, parentContext); + } // Get the hide show layer to calculate the index from the position final ColumnHideShowLayer columnHideShowLayer = tableManager.getBodyLayerStack().getColumnHideShowLayer(); final Iterator<Object> rowIter = pastedValues.keySet().iterator(); - boolean isPreviousBlankLine = false; - // Loop on each row while (rowIter.hasNext() && canContinue(multiStatus)) { @@ -1244,27 +1250,26 @@ public abstract class AbstractPasteInSelectionNattableCommandProvider implements if (UserActionConstants.ADD_USER_ACTION == currentUserAction) { if (isInsert) { + // This allows to manage the add of the object in the correct owner + + int currentDepth = parentDepth; + String currentCategory = parentCategory; + EObject currentContext = parentContext; + // If a row is found, the created item must be created as the same depth - if (-1 == rowIndexToModify) { - // If the previous line is not a blank line, create an item for the depth 0 - if (!isPreviousBlankLine) { - currentContext = parentContext; - currentDepth = 0; - } else { - // The previous line is a blank line, increment the depth - currentDepth++; - } - } else { - // Get the depth from the object found in the table (because the added once will be at the same level) + if (-1 != rowIndexToModify) { + + // Get the depth and the category from the object found in the table (because the added once will be at the same level) Object object = tableManager.getRowElement(rowIndexToModify); currentDepth = getDepthFromObject(object); + currentCategory = getCategoryFromObject(object); Object element = AxisUtils.getRepresentedElement(object); currentContext = ((EObject) element).eContainer(); } // Get the paste configuration and its attributes - final PasteEObjectConfiguration currentPasteConfiguration = getPasteConfiguration(table, currentDepth); + final PasteEObjectConfiguration currentPasteConfiguration = getPasteConfiguration(table, currentDepth, currentCategory); final EStructuralFeature containementFeature = currentPasteConfiguration.getPasteElementContainementFeature(); final IElementType elementType = ElementTypeRegistry.getInstance().getType(currentPasteConfiguration.getPastedElementId()); @@ -1291,7 +1296,7 @@ public abstract class AbstractPasteInSelectionNattableCommandProvider implements Iterator<InsertedElementInNattable> objectsToAddIterator = objectsToAdd.iterator(); while (objectsToAddIterator.hasNext() && null == foundInsertedElement) { final InsertedElementInNattable insertedElement = objectsToAddIterator.next(); - if (insertedElement.equals(currentContext)) { + if (insertedElement.equals(currentContext) && insertedElement.getContainementFeature().equals(containementFeature)) { foundInsertedElement = insertedElement; } } @@ -1365,7 +1370,12 @@ public abstract class AbstractPasteInSelectionNattableCommandProvider implements } } } else { - CellManagerFactory.INSTANCE.setStringValue(columnElement, rowElement, valueAsString, converter, tableManager, sharedMap); + try { + CellManagerFactory.INSTANCE.setStringValue(columnElement, rowElement, valueAsString, converter, tableManager, sharedMap); + } catch (final Exception e) { + Activator.log.error("Cannot set value '" + valueAsString + "' for element '" + rowElement + "' and feature '" + columnElement + "'", e); + multiStatus.add(new Status(IStatus.ERROR, Activator.PLUGIN_ID, "Cannot set value '" + valueAsString + "' for element '" + rowElement + "' and feature '" + columnElement + "'")); + } } } else { // Manage the warnings when the user tried to add a value (except exmpty, N/A or null) in a non-editable cell @@ -1380,47 +1390,42 @@ public abstract class AbstractPasteInSelectionNattableCommandProvider implements if (lastColumnPosition < nbColmnRead) { lastColumnPosition = nbColmnRead; } - - isPreviousBlankLine = false; } - - // Set the current element as current context - currentContext = (EObject) rowElement; - } else { - isPreviousBlankLine = true; } } lastRowPosition++; } - // Need to create the add command to add the created elements to their container and to the table if necessary - if (!objectsToAdd.isEmpty()) { - if (detachedMode) { - createTableRowInDetachedModeCommand(compoundCommand, objectsToAdd); - } else { - createTableRowInAttachedModeCommand(compoundCommand, objectsToAdd); - } - } - - // Execute some actions available in the share map when this is the detached mode - if(!attachedMode){ - // Manage the reference to set - @SuppressWarnings("unchecked") - final List<IValueSetter> valueToSet = (List<IValueSetter>) sharedMap.get(Constants.REFERENCES_TO_SET_KEY); - - if (valueToSet.size() > 0) { - for (final IValueSetter current : valueToSet) { - current.doSetValue(contextEditingDomain); + if (canContinue(multiStatus)) { + // Need to create the add command to add the created elements to their container and to the table if necessary + if (!objectsToAdd.isEmpty()) { + if (detachedMode) { + createTableRowInDetachedModeCommand(compoundCommand, objectsToAdd); + } else { + createTableRowInAttachedModeCommand(compoundCommand, objectsToAdd); } } - // Manage the cells problems to add - @SuppressWarnings("unchecked") - final List<Cell> cells = (List<Cell>) sharedMap.get(Constants.CELLS_TO_ADD_KEY); - - // add the created cells to the table - if (null != cells && !cells.isEmpty()) { - compoundCommand.append(AddCommand.create(tableEditingDomain, table, NattablePackage.eINSTANCE.getTable_Cells(), cells)); + // Execute some actions available in the share map when this is the detached mode + if(!attachedMode){ + // Manage the reference to set + @SuppressWarnings("unchecked") + final List<IValueSetter> valueToSet = (List<IValueSetter>) sharedMap.get(Constants.REFERENCES_TO_SET_KEY); + + if (valueToSet.size() > 0) { + for (final IValueSetter current : valueToSet) { + current.doSetValue(contextEditingDomain); + } + } + + // Manage the cells problems to add + @SuppressWarnings("unchecked") + final List<Cell> cells = (List<Cell>) sharedMap.get(Constants.CELLS_TO_ADD_KEY); + + // add the created cells to the table + if (null != cells && !cells.isEmpty()) { + compoundCommand.append(AddCommand.create(tableEditingDomain, table, NattablePackage.eINSTANCE.getTable_Cells(), cells)); + } } } @@ -1460,7 +1465,9 @@ public abstract class AbstractPasteInSelectionNattableCommandProvider implements } else { errorStatus.add(resultStatus); } - errorStatus.add(new Status(IStatus.ERROR, Activator.PLUGIN_ID, null)); + if (IStatus.ERROR != errorStatus.getSeverity()) { + errorStatus.add(new Status(IStatus.ERROR, Activator.PLUGIN_ID, null)); + } resultStatus = errorStatus; } return new CommandResult(resultStatus); @@ -1853,7 +1860,8 @@ public abstract class AbstractPasteInSelectionNattableCommandProvider implements if (isInsert) { Object rowElement = tableManager.getRowElement(currentRowIndex); int depth = getDepthFromObject(rowElement); - final PasteEObjectConfiguration pasteConfiguration = getPasteConfiguration(table, depth); + String categoryName = getCategoryFromObject(rowElement); + final PasteEObjectConfiguration pasteConfiguration = getPasteConfiguration(table, depth, categoryName); Object axis = rows.get(currentRowIndex); Object object = AxisUtils.getRepresentedElement(axis); @@ -1913,10 +1921,12 @@ public abstract class AbstractPasteInSelectionNattableCommandProvider implements * @param table * The table to manage. * @param currentDepth - * the depth to get the paste configuration. + * The depth to get the paste configuration. + * @param categoryName + * The category name searched (can be null or empty for only depth search). * @return The paste configuration corresponding to the depth. */ - protected abstract PasteEObjectConfiguration getPasteConfiguration(final Table table, final int currentDepth); + protected abstract PasteEObjectConfiguration getPasteConfiguration(final Table table, final int currentDepth, final String categoryName); /** * Get the depth from the object in parameter. @@ -1926,6 +1936,15 @@ public abstract class AbstractPasteInSelectionNattableCommandProvider implements * @return The depth from the object in parameter. */ protected abstract int getDepthFromObject(final Object object); + + /** + * Get the category from the object in parameter. + * + * @param object + * The object corresponding to element or IAxis. + * @return The category from the object in parameter. + */ + protected abstract String getCategoryFromObject(final Object object); /** * This allows to get the column object to modify. diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/PasteInSelectionNattableCommandProvider.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/PasteInSelectionNattableCommandProvider.java index b69d679f7ea..92682310dcd 100644 --- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/PasteInSelectionNattableCommandProvider.java +++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/PasteInSelectionNattableCommandProvider.java @@ -118,10 +118,10 @@ public class PasteInSelectionNattableCommandProvider extends AbstractPasteInSele /** * {@inheritDoc} * - * @see org.eclipse.papyrus.infra.nattable.provider.AbstractPasteInSelectionNattableCommandProvider#getPasteConfiguration(int) + * @see org.eclipse.papyrus.infra.nattable.provider.AbstractPasteInSelectionNattableCommandProvider#getPasteConfiguration(org.eclipse.papyrus.infra.nattable.model.nattable.Table, int, java.lang.String) */ @Override - protected PasteEObjectConfiguration getPasteConfiguration(final Table table, final int currentDepth) { + protected PasteEObjectConfiguration getPasteConfiguration(final Table table, final int currentDepth, final String categoryName) { return getPasteconfigurationTopLevel(table); } @@ -138,6 +138,16 @@ public class PasteInSelectionNattableCommandProvider extends AbstractPasteInSele /** * {@inheritDoc} * + * @see org.eclipse.papyrus.infra.nattable.provider.AbstractPasteInSelectionNattableCommandProvider#getCategoryFromObject(java.lang.Object) + */ + @Override + protected String getCategoryFromObject(final Object object) { + return ""; + } + + /** + * {@inheritDoc} + * * @see org.eclipse.papyrus.infra.nattable.provider.AbstractPasteInSelectionNattableCommandProvider#getRowElementCreatedInAttachedMode() */ @Override diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/PasteInSelectionTreeNattableCommandProvider.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/PasteInSelectionTreeNattableCommandProvider.java index 584ff9df1da..06b6ff5e0d6 100644 --- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/PasteInSelectionTreeNattableCommandProvider.java +++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/PasteInSelectionTreeNattableCommandProvider.java @@ -109,7 +109,7 @@ public class PasteInSelectionTreeNattableCommandProvider extends PasteInSelectio * The category name. * @return The paste configuration corresponding to the depth and to the category name. */ - protected PasteEObjectConfiguration getPasteConfigurationsFor(final Table table, final int depth) { + protected PasteEObjectConfiguration getPasteConfigurationsFor(final Table table, final int depth, final String categoryName) { if (depth == 0 && !FillingConfigurationUtils.hasTreeFillingConfigurationForDepth(table, 0)) { AbstractHeaderAxisConfiguration conf = table.getLocalRowHeaderAxisConfiguration(); if (conf != null) { @@ -130,7 +130,20 @@ public class PasteInSelectionTreeNattableCommandProvider extends PasteInSelectio } for (final TreeFillingConfiguration curr : FillingConfigurationUtils.getAllTreeFillingConfiguration(table)) { if (curr.getDepth() == depth) { - return curr.getPasteConfiguration(); + if (null == categoryName || categoryName.isEmpty()) { + return curr.getPasteConfiguration(); + } else { + String featureName = curr.getAxisUsedAsAxisProvider().getAlias(); + if (featureName == null || "".equals(featureName)) { + final Object element = curr.getAxisUsedAsAxisProvider().getElement(); + if (element instanceof EStructuralFeature) { + featureName = ((EStructuralFeature) element).getName(); + } + } + if (categoryName.equals(featureName)) { + return curr.getPasteConfiguration(); + } + } } } return null; @@ -139,11 +152,11 @@ public class PasteInSelectionTreeNattableCommandProvider extends PasteInSelectio /** * {@inheritDoc} * - * @see org.eclipse.papyrus.infra.nattable.provider.PasteInSelectionNattableCommandProvider#getPasteConfiguration(org.eclipse.papyrus.infra.nattable.model.nattable.Table, int) + * @see org.eclipse.papyrus.infra.nattable.provider.PasteInSelectionNattableCommandProvider#getPasteConfiguration(org.eclipse.papyrus.infra.nattable.model.nattable.Table, int, java.lang.String) */ @Override - protected PasteEObjectConfiguration getPasteConfiguration(final Table table, final int currentDepth) { - return (PasteEObjectConfiguration) getPasteConfigurationsFor(table, currentDepth); + protected PasteEObjectConfiguration getPasteConfiguration(final Table table, final int currentDepth, final String categoryName) { + return (PasteEObjectConfiguration) getPasteConfigurationsFor(table, currentDepth, categoryName); } /** @@ -176,7 +189,7 @@ public class PasteInSelectionTreeNattableCommandProvider extends PasteInSelectio if (fullSynchro) { pasteConfigurationTopLevel = getPasteConfigurationForFullSynchroTable(tableManager.getTable()); } else { - pasteConfigurationTopLevel = getPasteConfigurationsFor(table, 0); + pasteConfigurationTopLevel = getPasteConfigurationsFor(table, 0, null); } } return pasteConfigurationTopLevel; @@ -196,6 +209,32 @@ public class PasteInSelectionTreeNattableCommandProvider extends PasteInSelectio return -1 == depth ? super.getDepthFromObject(object) : depth; } + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.infra.nattable.provider.PasteInSelectionNattableCommandProvider#getCategoryFromObject(java.lang.Object) + */ + @Override + protected String getCategoryFromObject(final Object object) { + String category = ""; + if (object instanceof ITreeItemAxis) { + if (((ITreeItemAxis) object).getElement() instanceof TreeFillingConfiguration) { + final TreeFillingConfiguration configuration = (TreeFillingConfiguration) ((ITreeItemAxis) object).getElement(); + category = configuration.getAxisUsedAsAxisProvider().getAlias(); + if (category == null || "".equals(category)) { + final Object element = configuration.getAxisUsedAsAxisProvider().getElement(); + if (element instanceof EStructuralFeature) { + category = ((EStructuralFeature) element).getName(); + } + } + } else if (null != ((ITreeItemAxis) object).getParent()) { + final ITreeItemAxis parentAxis = ((ITreeItemAxis) object).getParent(); + category = getCategoryFromObject(parentAxis); + } + } + return category; + } + /** * {@inheritDoc} @@ -389,4 +428,30 @@ public class PasteInSelectionTreeNattableCommandProvider extends PasteInSelectio protected Object getColumnElement(final int realColumnIndex) { return AxisUtils.getRepresentedElement(tableManager.getColumnElement(realColumnIndex)); } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.infra.nattable.provider.AbstractPasteInSelectionNattableCommandProvider#getContentOfSelection(java.util.Map, int) + */ + protected EObject getContentOfSelection(final Map<Integer, Object> rows, final int currentRowIndex) { + EObject context = null; + + if (0 == currentRowIndex) { + context = table.getContext(); + } else { + Object axis = rows.get(currentRowIndex); + Object object = AxisUtils.getRepresentedElement(axis); + if (object instanceof TreeFillingConfiguration && axis instanceof ITreeItemAxis) { + axis = ((ITreeItemAxis) axis).getParent(); + if (null != axis) { + context = (EObject) AxisUtils.getRepresentedElement(axis); + } + } else if (object instanceof EObject) { + context = ((EObject) object).eContainer(); + } + } + + return context; + } } diff --git a/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/resources/insert/InsertEmptyAddAll_V1_V3_V1_MultiColumns_Test.notation b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/resources/insert/InsertEmptyAddAll_V1_V3_V1_MultiColumns_Test.notation index 0182d8ccf25..7f13f164672 100644 --- a/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/resources/insert/InsertEmptyAddAll_V1_V3_V1_MultiColumns_Test.notation +++ b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/resources/insert/InsertEmptyAddAll_V1_V3_V1_MultiColumns_Test.notation @@ -30,13 +30,13 @@ </axisUsedAsAxisProvider> <labelProvider xmi:type="nattablelabelprovider:FeatureLabelProviderConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.clazz.config/configs/class_synchronized_tree.nattableconfiguration#//@rowHeaderAxisConfiguration/@ownedLabelConfigurations.1"/> </ownedAxisConfigurations> - <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:TreeFillingConfiguration" xmi:id="_OmK7QnmiEeWJ7-W-e5W1og" pasteConfiguration="_OmK7TXmiEeWJ7-W-e5W1og" depth="1" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.treefilling.feature.labelprovider"> + <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:TreeFillingConfiguration" xmi:id="_OmK7QnmiEeWJ7-W-e5W1og" pasteConfiguration="_OmK7S3miEeWJ7-W-e5W1og" depth="1" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.treefilling.feature.labelprovider"> <axisUsedAsAxisProvider xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_OmK7Q3miEeWJ7-W-e5W1og" alias=""> <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//StructuredClassifier/ownedAttribute"/> </axisUsedAsAxisProvider> <labelProvider xmi:type="nattablelabelprovider:FeatureLabelProviderConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.clazz.config/configs/class_synchronized_tree.nattableconfiguration#//@rowHeaderAxisConfiguration/@ownedLabelConfigurations.1"/> </ownedAxisConfigurations> - <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:TreeFillingConfiguration" xmi:id="_OmK7RHmiEeWJ7-W-e5W1og" pasteConfiguration="_OmK7TXmiEeWJ7-W-e5W1og" depth="1" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.treefilling.feature.labelprovider"> + <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:TreeFillingConfiguration" xmi:id="_OmK7RHmiEeWJ7-W-e5W1og" pasteConfiguration="_OmK7THmiEeWJ7-W-e5W1og" depth="1" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.treefilling.feature.labelprovider"> <axisUsedAsAxisProvider xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_OmK7RXmiEeWJ7-W-e5W1og" alias=""> <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class/nestedClassifier"/> </axisUsedAsAxisProvider> @@ -61,6 +61,12 @@ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/> </axisIdentifier> </ownedAxisConfigurations> + <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:PasteEObjectConfiguration" xmi:id="_OmK7S3miEeWJ7-W-e5W1og" pastedElementId="org.eclipse.papyrus.uml.Property"> + <pasteElementContainementFeature xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//StructuredClassifier/ownedAttribute"/> + </ownedAxisConfigurations> + <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:PasteEObjectConfiguration" xmi:id="_OmK7THmiEeWJ7-W-e5W1og" pastedElementId="org.eclipse.papyrus.uml.Class"> + <pasteElementContainementFeature xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class/nestedClassifier"/> + </ownedAxisConfigurations> <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:PasteEObjectConfiguration" xmi:id="_OmK7TXmiEeWJ7-W-e5W1og" pastedElementId="org.eclipse.papyrus.uml.Operation"> <pasteElementContainementFeature xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class/ownedOperation"/> </ownedAxisConfigurations> diff --git a/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/resources/insert/InsertEmptyAddAll_V1_V3_V1_MultiColumns_Test_Result.txt b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/resources/insert/InsertEmptyAddAll_V1_V3_V1_MultiColumns_Test_Result.txt index 97a5283e6c2..e59cad6fc70 100644 --- a/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/resources/insert/InsertEmptyAddAll_V1_V3_V1_MultiColumns_Test_Result.txt +++ b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/resources/insert/InsertEmptyAddAll_V1_V3_V1_MultiColumns_Test_Result.txt @@ -4,10 +4,16 @@ Class0 public false N/A Property0_0 protected true N/A Property0_1 protected true N/A Property0_2 protected true N/A +Property0_0 public false N/A +Property0_1 public false N/A +Property0_2 public false N/A NestedClass0_0 private true N/A NestedClass0_1 private true N/A NestedClass0_2 private true N/A +NestedClass0_0 package false N/A +NestedClass0_1 package false N/A +NestedClass0_2 package false N/A Operation0_0 package false N/A @@ -33,12 +39,6 @@ Param0_2_2 package N/A return Param0_2_0 private N/A in Param0_2_1 private N/A out Param0_2_2 private N/A return -Property0_0 public false N/A -Property0_1 public false N/A -Property0_2 public false N/A -NestedClass0_0 package false N/A -NestedClass0_1 package false N/A -NestedClass0_2 package false N/A Operation0_0 public true N/A Operation0_1 private true N/A Operation0_2 public true N/A @@ -47,10 +47,16 @@ Class1 public false N/A Property1_0 protected true N/A Property1_1 protected true N/A Property1_2 protected true N/A +Property1_0 public false N/A +Property1_1 public false N/A +Property1_2 public false N/A NestedClass1_0 private true N/A NestedClass1_1 private true N/A NestedClass1_2 private true N/A +NestedClass1_0 package false N/A +NestedClass1_1 package false N/A +NestedClass1_2 package false N/A Operation1_0 package false N/A @@ -76,12 +82,6 @@ Param1_2_2 package N/A return Param1_2_0 private N/A in Param1_2_1 private N/A out Param1_2_2 private N/A return -Property1_0 public false N/A -Property1_1 public false N/A -Property1_2 public false N/A -NestedClass1_0 package false N/A -NestedClass1_1 package false N/A -NestedClass1_2 package false N/A Operation1_0 public true N/A Operation1_1 private true N/A Operation1_2 public true N/A diff --git a/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/resources/insert/InsertEmptyReplaceAll_V1_V3_V1_MultiColumns_Test.notation b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/resources/insert/InsertEmptyReplaceAll_V1_V3_V1_MultiColumns_Test.notation index c388febdddc..3d73a1e2b1e 100644 --- a/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/resources/insert/InsertEmptyReplaceAll_V1_V3_V1_MultiColumns_Test.notation +++ b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/resources/insert/InsertEmptyReplaceAll_V1_V3_V1_MultiColumns_Test.notation @@ -30,13 +30,13 @@ </axisUsedAsAxisProvider> <labelProvider xmi:type="nattablelabelprovider:FeatureLabelProviderConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.clazz.config/configs/class_synchronized_tree.nattableconfiguration#//@rowHeaderAxisConfiguration/@ownedLabelConfigurations.1"/> </ownedAxisConfigurations> - <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:TreeFillingConfiguration" xmi:id="_SBJNUnmiEeWJ7-W-e5W1og" pasteConfiguration="_SBJNXXmiEeWJ7-W-e5W1og" depth="1" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.treefilling.feature.labelprovider"> + <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:TreeFillingConfiguration" xmi:id="_SBJNUnmiEeWJ7-W-e5W1og" pasteConfiguration="_SBJNW3miEeWJ7-W-e5W1og" depth="1" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.treefilling.feature.labelprovider"> <axisUsedAsAxisProvider xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_SBJNU3miEeWJ7-W-e5W1og" alias=""> <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//StructuredClassifier/ownedAttribute"/> </axisUsedAsAxisProvider> <labelProvider xmi:type="nattablelabelprovider:FeatureLabelProviderConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.clazz.config/configs/class_synchronized_tree.nattableconfiguration#//@rowHeaderAxisConfiguration/@ownedLabelConfigurations.1"/> </ownedAxisConfigurations> - <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:TreeFillingConfiguration" xmi:id="_SBJNVHmiEeWJ7-W-e5W1og" pasteConfiguration="_SBJNXXmiEeWJ7-W-e5W1og" depth="1" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.treefilling.feature.labelprovider"> + <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:TreeFillingConfiguration" xmi:id="_SBJNVHmiEeWJ7-W-e5W1og" pasteConfiguration="_SBJNXHmiEeWJ7-W-e5W1og" depth="1" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.treefilling.feature.labelprovider"> <axisUsedAsAxisProvider xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_SBJNVXmiEeWJ7-W-e5W1og" alias=""> <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class/nestedClassifier"/> </axisUsedAsAxisProvider> @@ -61,6 +61,12 @@ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/> </axisIdentifier> </ownedAxisConfigurations> + <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:PasteEObjectConfiguration" xmi:id="_SBJNW3miEeWJ7-W-e5W1og" pastedElementId="org.eclipse.papyrus.uml.Property"> + <pasteElementContainementFeature xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//StructuredClassifier/ownedAttribute"/> + </ownedAxisConfigurations> + <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:PasteEObjectConfiguration" xmi:id="_SBJNXHmiEeWJ7-W-e5W1og" pastedElementId="org.eclipse.papyrus.uml.Class"> + <pasteElementContainementFeature xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class/nestedClassifier"/> + </ownedAxisConfigurations> <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:PasteEObjectConfiguration" xmi:id="_SBJNXXmiEeWJ7-W-e5W1og" pastedElementId="org.eclipse.papyrus.uml.Operation"> <pasteElementContainementFeature xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class/ownedOperation"/> </ownedAxisConfigurations> diff --git a/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/resources/insert/InsertEmptySkipAll_V1_V3_V1_MultiColumns_Test.notation b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/resources/insert/InsertEmptySkipAll_V1_V3_V1_MultiColumns_Test.notation index ddec3a29477..b5616ed2dcb 100644 --- a/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/resources/insert/InsertEmptySkipAll_V1_V3_V1_MultiColumns_Test.notation +++ b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/resources/insert/InsertEmptySkipAll_V1_V3_V1_MultiColumns_Test.notation @@ -30,13 +30,13 @@ </axisUsedAsAxisProvider> <labelProvider xmi:type="nattablelabelprovider:FeatureLabelProviderConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.clazz.config/configs/class_synchronized_tree.nattableconfiguration#//@rowHeaderAxisConfiguration/@ownedLabelConfigurations.1"/> </ownedAxisConfigurations> - <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:TreeFillingConfiguration" xmi:id="_SBJNUnmiEeWJ7-W-e5W1og" pasteConfiguration="_SBJNXXmiEeWJ7-W-e5W1og" depth="1" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.treefilling.feature.labelprovider"> + <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:TreeFillingConfiguration" xmi:id="_SBJNUnmiEeWJ7-W-e5W1og" pasteConfiguration="_SBJNW3miEeWJ7-W-e5W1og" depth="1" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.treefilling.feature.labelprovider"> <axisUsedAsAxisProvider xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_SBJNU3miEeWJ7-W-e5W1og" alias=""> <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//StructuredClassifier/ownedAttribute"/> </axisUsedAsAxisProvider> <labelProvider xmi:type="nattablelabelprovider:FeatureLabelProviderConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.clazz.config/configs/class_synchronized_tree.nattableconfiguration#//@rowHeaderAxisConfiguration/@ownedLabelConfigurations.1"/> </ownedAxisConfigurations> - <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:TreeFillingConfiguration" xmi:id="_SBJNVHmiEeWJ7-W-e5W1og" pasteConfiguration="_SBJNXXmiEeWJ7-W-e5W1og" depth="1" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.treefilling.feature.labelprovider"> + <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:TreeFillingConfiguration" xmi:id="_SBJNVHmiEeWJ7-W-e5W1og" pasteConfiguration="_SBJNXHmiEeWJ7-W-e5W1og" depth="1" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.treefilling.feature.labelprovider"> <axisUsedAsAxisProvider xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_SBJNVXmiEeWJ7-W-e5W1og" alias=""> <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class/nestedClassifier"/> </axisUsedAsAxisProvider> @@ -61,6 +61,12 @@ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/> </axisIdentifier> </ownedAxisConfigurations> + <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:PasteEObjectConfiguration" xmi:id="_SBJNW3miEeWJ7-W-e5W1og" pastedElementId="org.eclipse.papyrus.uml.Property"> + <pasteElementContainementFeature xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//StructuredClassifier/ownedAttribute"/> + </ownedAxisConfigurations> + <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:PasteEObjectConfiguration" xmi:id="_SBJNXHmiEeWJ7-W-e5W1og" pastedElementId="org.eclipse.papyrus.uml.Class"> + <pasteElementContainementFeature xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class/nestedClassifier"/> + </ownedAxisConfigurations> <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:PasteEObjectConfiguration" xmi:id="_SBJNXXmiEeWJ7-W-e5W1og" pastedElementId="org.eclipse.papyrus.uml.Operation"> <pasteElementContainementFeature xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class/ownedOperation"/> </ownedAxisConfigurations> diff --git a/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/resources/insert/InsertRowsAddAll_H1_H1_H1_MultiColumns_Test_Result.txt b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/resources/insert/InsertRowsAddAll_H1_H1_H1_MultiColumns_Test_Result.txt index 486d52db9c6..257f9541e8d 100644 --- a/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/resources/insert/InsertRowsAddAll_H1_H1_H1_MultiColumns_Test_Result.txt +++ b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/resources/insert/InsertRowsAddAll_H1_H1_H1_MultiColumns_Test_Result.txt @@ -1,5 +1,3 @@ -Class0 package true N/A -Class1 package true N/A Class0 public false N/A Operation0_0 package false N/A Param0_0_0 public N/A in @@ -50,3 +48,5 @@ Param1_2_2 private N/A return Operation1_0 public true N/A Operation1_1 private true N/A Operation1_2 public true N/A +Class0 package true N/A +Class1 package true N/A
\ No newline at end of file diff --git a/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/resources/insert/InsertRowsAddAll_V1_V3_V1_MultiColumns_Test.notation b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/resources/insert/InsertRowsAddAll_V1_V3_V1_MultiColumns_Test.notation index 80b63831b0c..cef5bec0980 100644 --- a/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/resources/insert/InsertRowsAddAll_V1_V3_V1_MultiColumns_Test.notation +++ b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/resources/insert/InsertRowsAddAll_V1_V3_V1_MultiColumns_Test.notation @@ -30,13 +30,13 @@ </axisUsedAsAxisProvider> <labelProvider xmi:type="nattablelabelprovider:FeatureLabelProviderConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.clazz.config/configs/class_synchronized_tree.nattableconfiguration#//@rowHeaderAxisConfiguration/@ownedLabelConfigurations.1"/> </ownedAxisConfigurations> - <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:TreeFillingConfiguration" xmi:id="_OmK7QnmiEeWJ7-W-e5W1og" pasteConfiguration="_OmK7TXmiEeWJ7-W-e5W1og" depth="1" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.treefilling.feature.labelprovider"> + <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:TreeFillingConfiguration" xmi:id="_OmK7QnmiEeWJ7-W-e5W1og" pasteConfiguration="_OmK7S3miEeWJ7-W-e5W1og" depth="1" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.treefilling.feature.labelprovider"> <axisUsedAsAxisProvider xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_OmK7Q3miEeWJ7-W-e5W1og" alias=""> <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//StructuredClassifier/ownedAttribute"/> </axisUsedAsAxisProvider> <labelProvider xmi:type="nattablelabelprovider:FeatureLabelProviderConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.clazz.config/configs/class_synchronized_tree.nattableconfiguration#//@rowHeaderAxisConfiguration/@ownedLabelConfigurations.1"/> </ownedAxisConfigurations> - <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:TreeFillingConfiguration" xmi:id="_OmK7RHmiEeWJ7-W-e5W1og" pasteConfiguration="_OmK7TXmiEeWJ7-W-e5W1og" depth="1" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.treefilling.feature.labelprovider"> + <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:TreeFillingConfiguration" xmi:id="_OmK7RHmiEeWJ7-W-e5W1og" pasteConfiguration="_OmK7THmiEeWJ7-W-e5W1og" depth="1" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.treefilling.feature.labelprovider"> <axisUsedAsAxisProvider xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_OmK7RXmiEeWJ7-W-e5W1og" alias=""> <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class/nestedClassifier"/> </axisUsedAsAxisProvider> @@ -61,6 +61,12 @@ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/> </axisIdentifier> </ownedAxisConfigurations> + <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:PasteEObjectConfiguration" xmi:id="_OmK7S3miEeWJ7-W-e5W1og" pastedElementId="org.eclipse.papyrus.uml.Property"> + <pasteElementContainementFeature xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//StructuredClassifier/ownedAttribute"/> + </ownedAxisConfigurations> + <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:PasteEObjectConfiguration" xmi:id="_OmK7THmiEeWJ7-W-e5W1og" pastedElementId="org.eclipse.papyrus.uml.Class"> + <pasteElementContainementFeature xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class/nestedClassifier"/> + </ownedAxisConfigurations> <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:PasteEObjectConfiguration" xmi:id="_OmK7TXmiEeWJ7-W-e5W1og" pastedElementId="org.eclipse.papyrus.uml.Operation"> <pasteElementContainementFeature xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class/ownedOperation"/> </ownedAxisConfigurations> diff --git a/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/resources/insert/InsertRowsAddAll_V1_V3_V1_MultiColumns_Test_Result.txt b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/resources/insert/InsertRowsAddAll_V1_V3_V1_MultiColumns_Test_Result.txt index d5507989943..f5a0e28359d 100644 --- a/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/resources/insert/InsertRowsAddAll_V1_V3_V1_MultiColumns_Test_Result.txt +++ b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/resources/insert/InsertRowsAddAll_V1_V3_V1_MultiColumns_Test_Result.txt @@ -6,10 +6,16 @@ Class0 public false N/A Property0_0 protected true N/A Property0_1 protected true N/A Property0_2 protected true N/A +Property0_0 public false N/A +Property0_1 public false N/A +Property0_2 public false N/A NestedClass0_0 private true N/A NestedClass0_1 private true N/A NestedClass0_2 private true N/A +NestedClass0_0 package false N/A +NestedClass0_1 package false N/A +NestedClass0_2 package false N/A Operation0_0 package false N/A @@ -35,12 +41,6 @@ Param0_2_2 package N/A return Param0_2_0 private N/A in Param0_2_1 private N/A out Param0_2_2 private N/A return -Property0_0 public false N/A -Property0_1 public false N/A -Property0_2 public false N/A -NestedClass0_0 package false N/A -NestedClass0_1 package false N/A -NestedClass0_2 package false N/A Operation0_0 public true N/A Operation0_1 private true N/A Operation0_2 public true N/A @@ -49,10 +49,16 @@ Class1 public false N/A Property1_0 protected true N/A Property1_1 protected true N/A Property1_2 protected true N/A +Property1_0 public false N/A +Property1_1 public false N/A +Property1_2 public false N/A NestedClass1_0 private true N/A NestedClass1_1 private true N/A NestedClass1_2 private true N/A +NestedClass1_0 package false N/A +NestedClass1_1 package false N/A +NestedClass1_2 package false N/A Operation1_0 package false N/A @@ -78,12 +84,6 @@ Param1_2_2 package N/A return Param1_2_0 private N/A in Param1_2_1 private N/A out Param1_2_2 private N/A return -Property1_0 public false N/A -Property1_1 public false N/A -Property1_2 public false N/A -NestedClass1_0 package false N/A -NestedClass1_1 package false N/A -NestedClass1_2 package false N/A Operation1_0 public true N/A Operation1_1 private true N/A -Operation1_2 public true N/A +Operation1_2 public true N/A
\ No newline at end of file diff --git a/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/resources/insert/InsertRowsReplaceAll_V1_V3_V1_MultiColumns_Test.notation b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/resources/insert/InsertRowsReplaceAll_V1_V3_V1_MultiColumns_Test.notation index 5f0fb27ae28..2f2ebaa9612 100644 --- a/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/resources/insert/InsertRowsReplaceAll_V1_V3_V1_MultiColumns_Test.notation +++ b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/resources/insert/InsertRowsReplaceAll_V1_V3_V1_MultiColumns_Test.notation @@ -30,13 +30,13 @@ </axisUsedAsAxisProvider> <labelProvider xmi:type="nattablelabelprovider:FeatureLabelProviderConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.clazz.config/configs/class_synchronized_tree.nattableconfiguration#//@rowHeaderAxisConfiguration/@ownedLabelConfigurations.1"/> </ownedAxisConfigurations> - <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:TreeFillingConfiguration" xmi:id="_SBJNUnmiEeWJ7-W-e5W1og" pasteConfiguration="_SBJNXXmiEeWJ7-W-e5W1og" depth="1" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.treefilling.feature.labelprovider"> + <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:TreeFillingConfiguration" xmi:id="_SBJNUnmiEeWJ7-W-e5W1og" pasteConfiguration="_SBJNW3miEeWJ7-W-e5W1og" depth="1" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.treefilling.feature.labelprovider"> <axisUsedAsAxisProvider xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_SBJNU3miEeWJ7-W-e5W1og" alias=""> <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//StructuredClassifier/ownedAttribute"/> </axisUsedAsAxisProvider> <labelProvider xmi:type="nattablelabelprovider:FeatureLabelProviderConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.clazz.config/configs/class_synchronized_tree.nattableconfiguration#//@rowHeaderAxisConfiguration/@ownedLabelConfigurations.1"/> </ownedAxisConfigurations> - <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:TreeFillingConfiguration" xmi:id="_SBJNVHmiEeWJ7-W-e5W1og" pasteConfiguration="_SBJNXXmiEeWJ7-W-e5W1og" depth="1" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.treefilling.feature.labelprovider"> + <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:TreeFillingConfiguration" xmi:id="_SBJNVHmiEeWJ7-W-e5W1og" pasteConfiguration="_SBJNXHmiEeWJ7-W-e5W1og" depth="1" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.treefilling.feature.labelprovider"> <axisUsedAsAxisProvider xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_SBJNVXmiEeWJ7-W-e5W1og" alias=""> <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class/nestedClassifier"/> </axisUsedAsAxisProvider> @@ -61,6 +61,12 @@ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/> </axisIdentifier> </ownedAxisConfigurations> + <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:PasteEObjectConfiguration" xmi:id="_SBJNW3miEeWJ7-W-e5W1og" pastedElementId="org.eclipse.papyrus.uml.Property"> + <pasteElementContainementFeature xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//StructuredClassifier/ownedAttribute"/> + </ownedAxisConfigurations> + <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:PasteEObjectConfiguration" xmi:id="_SBJNXHmiEeWJ7-W-e5W1og" pastedElementId="org.eclipse.papyrus.uml.Class"> + <pasteElementContainementFeature xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class/nestedClassifier"/> + </ownedAxisConfigurations> <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:PasteEObjectConfiguration" xmi:id="_SBJNXXmiEeWJ7-W-e5W1og" pastedElementId="org.eclipse.papyrus.uml.Operation"> <pasteElementContainementFeature xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class/ownedOperation"/> </ownedAxisConfigurations> diff --git a/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/resources/insert/InsertRowsSkipAll_V1_V3_V1_MultiColumns_Test.notation b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/resources/insert/InsertRowsSkipAll_V1_V3_V1_MultiColumns_Test.notation index 2230d74495d..a38b5789ebd 100644 --- a/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/resources/insert/InsertRowsSkipAll_V1_V3_V1_MultiColumns_Test.notation +++ b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/resources/insert/InsertRowsSkipAll_V1_V3_V1_MultiColumns_Test.notation @@ -30,13 +30,13 @@ </axisUsedAsAxisProvider> <labelProvider xmi:type="nattablelabelprovider:FeatureLabelProviderConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.clazz.config/configs/class_synchronized_tree.nattableconfiguration#//@rowHeaderAxisConfiguration/@ownedLabelConfigurations.1"/> </ownedAxisConfigurations> - <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:TreeFillingConfiguration" xmi:id="_SBJNUnmiEeWJ7-W-e5W1og" pasteConfiguration="_SBJNXXmiEeWJ7-W-e5W1og" depth="1" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.treefilling.feature.labelprovider"> + <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:TreeFillingConfiguration" xmi:id="_SBJNUnmiEeWJ7-W-e5W1og" pasteConfiguration="_SBJNW3miEeWJ7-W-e5W1og" depth="1" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.treefilling.feature.labelprovider"> <axisUsedAsAxisProvider xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_SBJNU3miEeWJ7-W-e5W1og" alias=""> <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//StructuredClassifier/ownedAttribute"/> </axisUsedAsAxisProvider> <labelProvider xmi:type="nattablelabelprovider:FeatureLabelProviderConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.clazz.config/configs/class_synchronized_tree.nattableconfiguration#//@rowHeaderAxisConfiguration/@ownedLabelConfigurations.1"/> </ownedAxisConfigurations> - <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:TreeFillingConfiguration" xmi:id="_SBJNVHmiEeWJ7-W-e5W1og" pasteConfiguration="_SBJNXXmiEeWJ7-W-e5W1og" depth="1" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.treefilling.feature.labelprovider"> + <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:TreeFillingConfiguration" xmi:id="_SBJNVHmiEeWJ7-W-e5W1og" pasteConfiguration="_SBJNXHmiEeWJ7-W-e5W1og" depth="1" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.treefilling.feature.labelprovider"> <axisUsedAsAxisProvider xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_SBJNVXmiEeWJ7-W-e5W1og" alias=""> <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class/nestedClassifier"/> </axisUsedAsAxisProvider> @@ -61,6 +61,12 @@ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/> </axisIdentifier> </ownedAxisConfigurations> + <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:PasteEObjectConfiguration" xmi:id="_SBJNW3miEeWJ7-W-e5W1og" pastedElementId="org.eclipse.papyrus.uml.Property"> + <pasteElementContainementFeature xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//StructuredClassifier/ownedAttribute"/> + </ownedAxisConfigurations> + <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:PasteEObjectConfiguration" xmi:id="_SBJNXHmiEeWJ7-W-e5W1og" pastedElementId="org.eclipse.papyrus.uml.Class"> + <pasteElementContainementFeature xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class/nestedClassifier"/> + </ownedAxisConfigurations> <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:PasteEObjectConfiguration" xmi:id="_SBJNXXmiEeWJ7-W-e5W1og" pastedElementId="org.eclipse.papyrus.uml.Operation"> <pasteElementContainementFeature xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class/ownedOperation"/> </ownedAxisConfigurations> diff --git a/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/resources/paste_overwrite/PasteCellsOverwriteAll_H1_H1_H1_MultiColumns_Test.notation b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/resources/paste_overwrite/PasteCellsOverwriteAll_H1_H1_H1_MultiColumns_Test.notation index c20958bd3bf..42512ff0774 100644 --- a/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/resources/paste_overwrite/PasteCellsOverwriteAll_H1_H1_H1_MultiColumns_Test.notation +++ b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/resources/paste_overwrite/PasteCellsOverwriteAll_H1_H1_H1_MultiColumns_Test.notation @@ -49,6 +49,10 @@ </ownedAxisConfigurations> <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:PasteEObjectConfiguration" xmi:id="_BOaEMHufEeSTu_GUJ96b9g" pastedElementId="org.eclipse.papyrus.uml.Class"> <pasteElementContainementFeature xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Package/packagedElement"/> + <axisIdentifier xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_vxwyIILREeWLaq02JKSl_g"> + <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.clazz.config/configs/class_synchronized_tree.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/> + <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/> + </axisIdentifier> </ownedAxisConfigurations> <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:PasteEObjectConfiguration" xmi:id="_BOaEMnufEeSTu_GUJ96b9g" pastedElementId="org.eclipse.papyrus.uml.Operation"> <pasteElementContainementFeature xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class/ownedOperation"/> diff --git a/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/resources/paste_overwrite/PasteCellsOverwriteAll_V1_V3_V1_MultiColumns_Test.notation b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/resources/paste_overwrite/PasteCellsOverwriteAll_V1_V3_V1_MultiColumns_Test.notation index 44358bb642e..a54b3702e65 100644 --- a/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/resources/paste_overwrite/PasteCellsOverwriteAll_V1_V3_V1_MultiColumns_Test.notation +++ b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/resources/paste_overwrite/PasteCellsOverwriteAll_V1_V3_V1_MultiColumns_Test.notation @@ -1,5 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> -<nattable:Table xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:configuration="http://www.eclipse.org/papyrus/infra/viewpoints/configuration" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:nattable="http://www.eclipse.org/papyrus/nattable/model" xmlns:nattableaxis="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis" xmlns:nattableaxisconfiguration="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration" xmlns:nattableaxisprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider" xmlns:nattableconfiguration="http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis http://www.eclipse.org/papyrus/nattable/model#//nattableaxis http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model#//nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableconfiguration" xmi:id="_0tdPAHcSEeSOKsM2DkqZ0A" name="ClassTreeTable0" currentRowAxisProvider="_0tdPA3cSEeSOKsM2DkqZ0A" currentColumnAxisProvider="_0tdPAXcSEeSOKsM2DkqZ0A"> +<nattable:Table xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:configuration="http://www.eclipse.org/papyrus/infra/viewpoints/configuration" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:nattable="http://www.eclipse.org/papyrus/nattable/model" xmlns:nattableaxis="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis" xmlns:nattableaxisconfiguration="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration" xmlns:nattableaxisprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider" xmlns:nattableconfiguration="http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration" xmlns:nattablestyle="http://www.eclipse.org/papyrus/nattable/model/table/nattablestyle" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis http://www.eclipse.org/papyrus/nattable/model#//nattableaxis http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model#//nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableconfiguration http://www.eclipse.org/papyrus/nattable/model/table/nattablestyle http://www.eclipse.org/papyrus/nattable/model#//nattablestyle" xmi:id="_0tdPAHcSEeSOKsM2DkqZ0A" name="ClassTreeTable0" currentRowAxisProvider="_0tdPA3cSEeSOKsM2DkqZ0A" currentColumnAxisProvider="_0tdPAXcSEeSOKsM2DkqZ0A"> + <styles xmi:type="nattablestyle:TableDisplayStyle" xmi:id="_aB82wILREeWLaq02JKSl_g" displayStyle="HIERARCHIC_MULTI_TREE_COLUMN"/> <context xmi:type="uml:Model" href="PasteCellsOverwriteAll_V1_V3_V1_MultiColumns_Test.uml#_W0BLkGZzEeSDCaDFwPGYVw"/> <owner xmi:type="uml:Model" href="PasteCellsOverwriteAll_V1_V3_V1_MultiColumns_Test.uml#_W0BLkGZzEeSDCaDFwPGYVw"/> <prototype xmi:type="configuration:PapyrusSyncTable" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.clazz.config/configs/classTreeTable.configuration#_P3J1cEr7EeSVGbM3cmVSqQ"/> @@ -23,4 +24,14 @@ </axis> </columnAxisProvidersHistory> <rowAxisProvidersHistory xmi:type="nattableaxisprovider:MasterObjectAxisProvider" xmi:id="_0tdPA3cSEeSOKsM2DkqZ0A" description="This axis provider manages the rows, according to the wanted hierarchy" name="HierarchicalRowaAxisManager" disconnectSlave="true"/> + <localRowHeaderAxisConfiguration xmi:type="nattableaxisconfiguration:LocalTableHeaderAxisConfiguration" xmi:id="_aTpqwILREeWLaq02JKSl_g" indexStyle="NUMERIC"> + <styles xmi:type="nattablestyle:IntValueStyle" xmi:id="_aTrf8ILREeWLaq02JKSl_g" name="rowLabelWidth" intValue="153"/> + <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:PasteEObjectConfiguration" xmi:id="_cE4vIILiEeW7yO4jdkH8eQ" pastedElementId="org.eclipse.papyrus.uml.Class"> + <pasteElementContainementFeature xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Package/packagedElement"/> + <axisIdentifier xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_cE4vIYLiEeW7yO4jdkH8eQ"> + <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.clazz.config/configs/class_synchronized_tree.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/> + <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/> + </axisIdentifier> + </ownedAxisConfigurations> + </localRowHeaderAxisConfiguration> </nattable:Table> diff --git a/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/resources/paste_overwrite/PasteEmptyOverwriteAddAll_V1_V3_V1_MultiColumns_Test.notation b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/resources/paste_overwrite/PasteEmptyOverwriteAddAll_V1_V3_V1_MultiColumns_Test.notation index 1a4d3a2f6f5..2772e3ccf5e 100644 --- a/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/resources/paste_overwrite/PasteEmptyOverwriteAddAll_V1_V3_V1_MultiColumns_Test.notation +++ b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/resources/paste_overwrite/PasteEmptyOverwriteAddAll_V1_V3_V1_MultiColumns_Test.notation @@ -30,13 +30,13 @@ </axisUsedAsAxisProvider> <labelProvider xmi:type="nattablelabelprovider:FeatureLabelProviderConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.clazz.config/configs/class_synchronized_tree.nattableconfiguration#//@rowHeaderAxisConfiguration/@ownedLabelConfigurations.1"/> </ownedAxisConfigurations> - <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:TreeFillingConfiguration" xmi:id="_OmK7QnmiEeWJ7-W-e5W1og" pasteConfiguration="_OmK7TXmiEeWJ7-W-e5W1og" depth="1" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.treefilling.feature.labelprovider"> + <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:TreeFillingConfiguration" xmi:id="_OmK7QnmiEeWJ7-W-e5W1og" pasteConfiguration="_OmK7S3miEeWJ7-W-e5W1og" depth="1" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.treefilling.feature.labelprovider"> <axisUsedAsAxisProvider xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_OmK7Q3miEeWJ7-W-e5W1og" alias=""> <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//StructuredClassifier/ownedAttribute"/> </axisUsedAsAxisProvider> <labelProvider xmi:type="nattablelabelprovider:FeatureLabelProviderConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.clazz.config/configs/class_synchronized_tree.nattableconfiguration#//@rowHeaderAxisConfiguration/@ownedLabelConfigurations.1"/> </ownedAxisConfigurations> - <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:TreeFillingConfiguration" xmi:id="_OmK7RHmiEeWJ7-W-e5W1og" pasteConfiguration="_OmK7TXmiEeWJ7-W-e5W1og" depth="1" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.treefilling.feature.labelprovider"> + <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:TreeFillingConfiguration" xmi:id="_OmK7RHmiEeWJ7-W-e5W1og" pasteConfiguration="_OmK7THmiEeWJ7-W-e5W1og" depth="1" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.treefilling.feature.labelprovider"> <axisUsedAsAxisProvider xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_OmK7RXmiEeWJ7-W-e5W1og" alias=""> <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class/nestedClassifier"/> </axisUsedAsAxisProvider> @@ -61,6 +61,12 @@ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/> </axisIdentifier> </ownedAxisConfigurations> + <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:PasteEObjectConfiguration" xmi:id="_OmK7S3miEeWJ7-W-e5W1og" pastedElementId="org.eclipse.papyrus.uml.Property"> + <pasteElementContainementFeature xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//StructuredClassifier/ownedAttribute"/> + </ownedAxisConfigurations> + <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:PasteEObjectConfiguration" xmi:id="_OmK7THmiEeWJ7-W-e5W1og" pastedElementId="org.eclipse.papyrus.uml.Class"> + <pasteElementContainementFeature xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class/nestedClassifier"/> + </ownedAxisConfigurations> <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:PasteEObjectConfiguration" xmi:id="_OmK7TXmiEeWJ7-W-e5W1og" pastedElementId="org.eclipse.papyrus.uml.Operation"> <pasteElementContainementFeature xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class/ownedOperation"/> </ownedAxisConfigurations> diff --git a/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/resources/paste_overwrite/PasteEmptyOverwriteAddAll_V1_V3_V1_MultiColumns_Test_Result.txt b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/resources/paste_overwrite/PasteEmptyOverwriteAddAll_V1_V3_V1_MultiColumns_Test_Result.txt index 97a5283e6c2..8083307f368 100644 --- a/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/resources/paste_overwrite/PasteEmptyOverwriteAddAll_V1_V3_V1_MultiColumns_Test_Result.txt +++ b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/resources/paste_overwrite/PasteEmptyOverwriteAddAll_V1_V3_V1_MultiColumns_Test_Result.txt @@ -4,10 +4,16 @@ Class0 public false N/A Property0_0 protected true N/A Property0_1 protected true N/A Property0_2 protected true N/A +Property0_0 public false N/A +Property0_1 public false N/A +Property0_2 public false N/A NestedClass0_0 private true N/A NestedClass0_1 private true N/A NestedClass0_2 private true N/A +NestedClass0_0 package false N/A +NestedClass0_1 package false N/A +NestedClass0_2 package false N/A Operation0_0 package false N/A @@ -33,12 +39,6 @@ Param0_2_2 package N/A return Param0_2_0 private N/A in Param0_2_1 private N/A out Param0_2_2 private N/A return -Property0_0 public false N/A -Property0_1 public false N/A -Property0_2 public false N/A -NestedClass0_0 package false N/A -NestedClass0_1 package false N/A -NestedClass0_2 package false N/A Operation0_0 public true N/A Operation0_1 private true N/A Operation0_2 public true N/A @@ -47,10 +47,16 @@ Class1 public false N/A Property1_0 protected true N/A Property1_1 protected true N/A Property1_2 protected true N/A +Property1_0 public false N/A +Property1_1 public false N/A +Property1_2 public false N/A NestedClass1_0 private true N/A NestedClass1_1 private true N/A NestedClass1_2 private true N/A +NestedClass1_0 package false N/A +NestedClass1_1 package false N/A +NestedClass1_2 package false N/A Operation1_0 package false N/A @@ -76,14 +82,8 @@ Param1_2_2 package N/A return Param1_2_0 private N/A in Param1_2_1 private N/A out Param1_2_2 private N/A return -Property1_0 public false N/A -Property1_1 public false N/A -Property1_2 public false N/A -NestedClass1_0 package false N/A -NestedClass1_1 package false N/A -NestedClass1_2 package false N/A Operation1_0 public true N/A Operation1_1 private true N/A Operation1_2 public true N/A Class0 package true N/A -Class1 package true N/A +Class1 package true N/A
\ No newline at end of file diff --git a/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/src/org/eclipse/papyrus/uml/nattable/clazz/config/tests/insert/InsertEmptyAddAll_V1_V3_V1_MultiColumns_Test.java b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/src/org/eclipse/papyrus/uml/nattable/clazz/config/tests/insert/InsertEmptyAddAll_V1_V3_V1_MultiColumns_Test.java index 1e10bffddda..200c3114ec0 100644 --- a/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/src/org/eclipse/papyrus/uml/nattable/clazz/config/tests/insert/InsertEmptyAddAll_V1_V3_V1_MultiColumns_Test.java +++ b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/src/org/eclipse/papyrus/uml/nattable/clazz/config/tests/insert/InsertEmptyAddAll_V1_V3_V1_MultiColumns_Test.java @@ -13,18 +13,10 @@ package org.eclipse.papyrus.uml.nattable.clazz.config.tests.insert; -import java.util.List; import java.util.Map; -import org.eclipse.osgi.util.NLS; import org.eclipse.papyrus.infra.nattable.handler.InsertInTableHandler; -import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.PasteEObjectConfiguration; -import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.TreeFillingConfiguration; -import org.eclipse.papyrus.infra.nattable.utils.FillingConfigurationUtils; -import org.eclipse.papyrus.infra.nattable.utils.StyleUtils; import org.eclipse.papyrus.infra.nattable.utils.UserActionConstants; -import org.junit.Assert; -import org.junit.Test; /** * Test pastes overwrite all of selection with visible categories. @@ -40,86 +32,6 @@ public class InsertEmptyAddAll_V1_V3_V1_MultiColumns_Test extends AbstractInsert public String removeClassName(final String className) throws Exception { return className.replaceFirst("InsertEmptyAddAll_", ""); //$NON-NLS-1$ //$NON-NLS-2$ } - - /** - * Check the model for the test consistency. - * - * @throws Exception - * The caught exception. - */ - @Test - @Override - public void checkModelForTestConsistency() throws Exception { - String className = getClass().getSimpleName(); - className = removeClassName(className); - String[] result = className.split("_"); //$NON-NLS-1$ - Assert.assertTrue("The class name is not correcly build", result.length == 5); //$NON-NLS-1$ - for (int depth = 0; depth < 3; depth++) { - String current = result[depth]; - // filled by DnD - if (current.equals("Empty")) { //$NON-NLS-1$ - // no configuration - Assert.assertTrue("We must not have filling configuration for depth==0", FillingConfigurationUtils.getAllTreeFillingConfigurationForDepth(getTable(), 0).size() == 0); //$NON-NLS-1$ - // we can't hide a depth for which we don't have category - - Assert.assertTrue("The depth 0 can't be hidden", StyleUtils.isHiddenDepth(getTable(), 0) == false);//$NON-NLS-1$ - } else { - Assert.assertEquals("The class name is not correcly build", 2, current.length()); //$NON-NLS-1$ - char visibility = current.charAt(0); - char nbCategoriesForTheDepth = current.charAt(1); - switch (visibility) { - case 'H': - Assert.assertTrue(NLS.bind("The depth {0} must be hidden", depth), true == StyleUtils.isHiddenDepth(getTable(), depth));//$NON-NLS-1$ - break; - case 'V': - Assert.assertTrue(NLS.bind("The depth {0} must be visible", depth), false == StyleUtils.isHiddenDepth(getTable(), depth));//$NON-NLS-1$ - break; - default: - throw new Exception("Not supported case"); //$NON-NLS-1$ - } - // we check that we have the wanted number of filling categories - List<TreeFillingConfiguration> confs = FillingConfigurationUtils.getAllTreeFillingConfigurationForDepth(getTable(), depth); - int nbConfig = confs.size(); - int wantedConfig = Integer.parseInt(String.valueOf(nbCategoriesForTheDepth)); - Assert.assertEquals("The number of configuration is not the expected one", wantedConfig, nbConfig); //$NON-NLS-1$ - - if (depth == 0) { - Assert.assertTrue("The configuration number is not correct", confs.size() == 1); //$NON-NLS-1$ - for (TreeFillingConfiguration tmp : confs) { - PasteEObjectConfiguration pasteConf = tmp.getPasteConfiguration(); - Assert.assertNotNull("We don't have paste configuration for a TreeFillingConfiguration, depth=" + tmp.getDepth(), pasteConf); //$NON-NLS-1$ - if (depth == 0) { - Assert.assertTrue("The configuration number is not correct for the tree filling", confs.size() == 1); //$NON-NLS-1$ - Assert.assertTrue("The pasted element id is not correctly defined", CLASS_ELEMENT_ID.equals(pasteConf.getPastedElementId())); //$NON-NLS-1$ - } - } - }else if (depth == 1) { - boolean nestedClass = false; - boolean operation = false; - boolean property = false; - - for (TreeFillingConfiguration tmp : confs) { - PasteEObjectConfiguration pasteConf = tmp.getPasteConfiguration(); - Assert.assertNotNull("We don't have paste configuration for a TreeFillingConfiguration, depth=" + tmp.getDepth(), pasteConf); //$NON-NLS-1$ - if (depth == 1) { - operation = true; - } - } - Assert.assertTrue("Table configuration must not contains property", !property); //$NON-NLS-1$ - Assert.assertTrue("Table configuration must contains opration", operation); //$NON-NLS-1$ - Assert.assertTrue("Table configuration must not contains nestedClass", !nestedClass); //$NON-NLS-1$ - }else if (depth == 2) { - for (TreeFillingConfiguration tmp : confs) { - PasteEObjectConfiguration pasteConf = tmp.getPasteConfiguration(); - Assert.assertNotNull("We don't have paste configuration for a TreeFillingConfiguration, depth=" + tmp.getDepth(), pasteConf); //$NON-NLS-1$ - - Assert.assertTrue("The configuration number is not correct for the tree filling", confs.size() == 1); //$NON-NLS-1$ - Assert.assertTrue("The pasted element id is not correctly defined", PARAMETER_ELEMENT_ID.equals(pasteConf.getPastedElementId())); //$NON-NLS-1$ - } - } - } - } - } /** * @see org.eclipse.papyrus.uml.nattable.generic.tests.insert.AbstractInsertTest#manageParameters(java.util.Map) diff --git a/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/src/org/eclipse/papyrus/uml/nattable/clazz/config/tests/insert/InsertEmptyReplaceAll_V1_V3_V1_MultiColumns_Test.java b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/src/org/eclipse/papyrus/uml/nattable/clazz/config/tests/insert/InsertEmptyReplaceAll_V1_V3_V1_MultiColumns_Test.java index 38e236f8d59..59f9f2d8578 100644 --- a/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/src/org/eclipse/papyrus/uml/nattable/clazz/config/tests/insert/InsertEmptyReplaceAll_V1_V3_V1_MultiColumns_Test.java +++ b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/src/org/eclipse/papyrus/uml/nattable/clazz/config/tests/insert/InsertEmptyReplaceAll_V1_V3_V1_MultiColumns_Test.java @@ -13,18 +13,10 @@ package org.eclipse.papyrus.uml.nattable.clazz.config.tests.insert; -import java.util.List; import java.util.Map; -import org.eclipse.osgi.util.NLS; import org.eclipse.papyrus.infra.nattable.handler.InsertInTableHandler; -import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.PasteEObjectConfiguration; -import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.TreeFillingConfiguration; -import org.eclipse.papyrus.infra.nattable.utils.FillingConfigurationUtils; -import org.eclipse.papyrus.infra.nattable.utils.StyleUtils; import org.eclipse.papyrus.infra.nattable.utils.UserActionConstants; -import org.junit.Assert; -import org.junit.Test; /** * Test pastes overwrite all of selection with visible categories. @@ -40,86 +32,6 @@ public class InsertEmptyReplaceAll_V1_V3_V1_MultiColumns_Test extends AbstractIn public String removeClassName(final String className) throws Exception { return className.replaceFirst("InsertEmptyReplaceAll_", ""); //$NON-NLS-1$ //$NON-NLS-2$ } - - /** - * Check the model for the test consistency. - * - * @throws Exception - * The caught exception. - */ - @Test - @Override - public void checkModelForTestConsistency() throws Exception { - String className = getClass().getSimpleName(); - className = removeClassName(className); - String[] result = className.split("_"); //$NON-NLS-1$ - Assert.assertTrue("The class name is not correcly build", result.length == 5); //$NON-NLS-1$ - for (int depth = 0; depth < 3; depth++) { - String current = result[depth]; - // filled by DnD - if (current.equals("Empty")) { //$NON-NLS-1$ - // no configuration - Assert.assertTrue("We must not have filling configuration for depth==0", FillingConfigurationUtils.getAllTreeFillingConfigurationForDepth(getTable(), 0).size() == 0); //$NON-NLS-1$ - // we can't hide a depth for which we don't have category - - Assert.assertTrue("The depth 0 can't be hidden", StyleUtils.isHiddenDepth(getTable(), 0) == false);//$NON-NLS-1$ - } else { - Assert.assertEquals("The class name is not correcly build", 2, current.length()); //$NON-NLS-1$ - char visibility = current.charAt(0); - char nbCategoriesForTheDepth = current.charAt(1); - switch (visibility) { - case 'H': - Assert.assertTrue(NLS.bind("The depth {0} must be hidden", depth), true == StyleUtils.isHiddenDepth(getTable(), depth));//$NON-NLS-1$ - break; - case 'V': - Assert.assertTrue(NLS.bind("The depth {0} must be visible", depth), false == StyleUtils.isHiddenDepth(getTable(), depth));//$NON-NLS-1$ - break; - default: - throw new Exception("Not supported case"); //$NON-NLS-1$ - } - // we check that we have the wanted number of filling categories - List<TreeFillingConfiguration> confs = FillingConfigurationUtils.getAllTreeFillingConfigurationForDepth(getTable(), depth); - int nbConfig = confs.size(); - int wantedConfig = Integer.parseInt(String.valueOf(nbCategoriesForTheDepth)); - Assert.assertEquals("The number of configuration is not the expected one", wantedConfig, nbConfig); //$NON-NLS-1$ - - if (depth == 0) { - Assert.assertTrue("The configuration number is not correct", confs.size() == 1); //$NON-NLS-1$ - for (TreeFillingConfiguration tmp : confs) { - PasteEObjectConfiguration pasteConf = tmp.getPasteConfiguration(); - Assert.assertNotNull("We don't have paste configuration for a TreeFillingConfiguration, depth=" + tmp.getDepth(), pasteConf); //$NON-NLS-1$ - if (depth == 0) { - Assert.assertTrue("The configuration number is not correct for the tree filling", confs.size() == 1); //$NON-NLS-1$ - Assert.assertTrue("The pasted element id is not correctly defined", CLASS_ELEMENT_ID.equals(pasteConf.getPastedElementId())); //$NON-NLS-1$ - } - } - }else if (depth == 1) { - boolean nestedClass = false; - boolean operation = false; - boolean property = false; - - for (TreeFillingConfiguration tmp : confs) { - PasteEObjectConfiguration pasteConf = tmp.getPasteConfiguration(); - Assert.assertNotNull("We don't have paste configuration for a TreeFillingConfiguration, depth=" + tmp.getDepth(), pasteConf); //$NON-NLS-1$ - if (depth == 1) { - operation = true; - } - } - Assert.assertTrue("Table configuration must not contains property", !property); //$NON-NLS-1$ - Assert.assertTrue("Table configuration must contains opration", operation); //$NON-NLS-1$ - Assert.assertTrue("Table configuration must not contains nestedClass", !nestedClass); //$NON-NLS-1$ - }else if (depth == 2) { - for (TreeFillingConfiguration tmp : confs) { - PasteEObjectConfiguration pasteConf = tmp.getPasteConfiguration(); - Assert.assertNotNull("We don't have paste configuration for a TreeFillingConfiguration, depth=" + tmp.getDepth(), pasteConf); //$NON-NLS-1$ - - Assert.assertTrue("The configuration number is not correct for the tree filling", confs.size() == 1); //$NON-NLS-1$ - Assert.assertTrue("The pasted element id is not correctly defined", PARAMETER_ELEMENT_ID.equals(pasteConf.getPastedElementId())); //$NON-NLS-1$ - } - } - } - } - } /** * @see org.eclipse.papyrus.uml.nattable.generic.tests.insert.AbstractInsertTest#manageParameters(java.util.Map) diff --git a/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/src/org/eclipse/papyrus/uml/nattable/clazz/config/tests/insert/InsertEmptySkipAll_V1_V3_V1_MultiColumns_Test.java b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/src/org/eclipse/papyrus/uml/nattable/clazz/config/tests/insert/InsertEmptySkipAll_V1_V3_V1_MultiColumns_Test.java index b480dc81b05..53ada89edab 100644 --- a/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/src/org/eclipse/papyrus/uml/nattable/clazz/config/tests/insert/InsertEmptySkipAll_V1_V3_V1_MultiColumns_Test.java +++ b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/src/org/eclipse/papyrus/uml/nattable/clazz/config/tests/insert/InsertEmptySkipAll_V1_V3_V1_MultiColumns_Test.java @@ -13,19 +13,11 @@ package org.eclipse.papyrus.uml.nattable.clazz.config.tests.insert; -import java.util.List; import java.util.Map; -import org.eclipse.osgi.util.NLS; import org.eclipse.papyrus.infra.nattable.handler.InsertInTableHandler; import org.eclipse.papyrus.infra.nattable.manager.table.TreeNattableModelManager; -import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.PasteEObjectConfiguration; -import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.TreeFillingConfiguration; -import org.eclipse.papyrus.infra.nattable.utils.FillingConfigurationUtils; -import org.eclipse.papyrus.infra.nattable.utils.StyleUtils; import org.eclipse.papyrus.infra.nattable.utils.UserActionConstants; -import org.junit.Assert; -import org.junit.Test; /** * Test pastes overwrite all of selection with visible categories. @@ -41,86 +33,6 @@ public class InsertEmptySkipAll_V1_V3_V1_MultiColumns_Test extends AbstractInser public String removeClassName(final String className) throws Exception { return className.replaceFirst("InsertEmptySkipAll_", ""); //$NON-NLS-1$ //$NON-NLS-2$ } - - /** - * Check the model for the test consistency. - * - * @throws Exception - * The caught exception. - */ - @Test - @Override - public void checkModelForTestConsistency() throws Exception { - String className = getClass().getSimpleName(); - className = removeClassName(className); - String[] result = className.split("_"); //$NON-NLS-1$ - Assert.assertTrue("The class name is not correcly build", result.length == 5); //$NON-NLS-1$ - for (int depth = 0; depth < 3; depth++) { - String current = result[depth]; - // filled by DnD - if (current.equals("Empty")) { //$NON-NLS-1$ - // no configuration - Assert.assertTrue("We must not have filling configuration for depth==0", FillingConfigurationUtils.getAllTreeFillingConfigurationForDepth(getTable(), 0).size() == 0); //$NON-NLS-1$ - // we can't hide a depth for which we don't have category - - Assert.assertTrue("The depth 0 can't be hidden", StyleUtils.isHiddenDepth(getTable(), 0) == false);//$NON-NLS-1$ - } else { - Assert.assertEquals("The class name is not correcly build", 2, current.length()); //$NON-NLS-1$ - char visibility = current.charAt(0); - char nbCategoriesForTheDepth = current.charAt(1); - switch (visibility) { - case 'H': - Assert.assertTrue(NLS.bind("The depth {0} must be hidden", depth), true == StyleUtils.isHiddenDepth(getTable(), depth));//$NON-NLS-1$ - break; - case 'V': - Assert.assertTrue(NLS.bind("The depth {0} must be visible", depth), false == StyleUtils.isHiddenDepth(getTable(), depth));//$NON-NLS-1$ - break; - default: - throw new Exception("Not supported case"); //$NON-NLS-1$ - } - // we check that we have the wanted number of filling categories - List<TreeFillingConfiguration> confs = FillingConfigurationUtils.getAllTreeFillingConfigurationForDepth(getTable(), depth); - int nbConfig = confs.size(); - int wantedConfig = Integer.parseInt(String.valueOf(nbCategoriesForTheDepth)); - Assert.assertEquals("The number of configuration is not the expected one", wantedConfig, nbConfig); //$NON-NLS-1$ - - if (depth == 0) { - Assert.assertTrue("The configuration number is not correct", confs.size() == 1); //$NON-NLS-1$ - for (TreeFillingConfiguration tmp : confs) { - PasteEObjectConfiguration pasteConf = tmp.getPasteConfiguration(); - Assert.assertNotNull("We don't have paste configuration for a TreeFillingConfiguration, depth=" + tmp.getDepth(), pasteConf); //$NON-NLS-1$ - if (depth == 0) { - Assert.assertTrue("The configuration number is not correct for the tree filling", confs.size() == 1); //$NON-NLS-1$ - Assert.assertTrue("The pasted element id is not correctly defined", CLASS_ELEMENT_ID.equals(pasteConf.getPastedElementId())); //$NON-NLS-1$ - } - } - }else if (depth == 1) { - boolean nestedClass = false; - boolean operation = false; - boolean property = false; - - for (TreeFillingConfiguration tmp : confs) { - PasteEObjectConfiguration pasteConf = tmp.getPasteConfiguration(); - Assert.assertNotNull("We don't have paste configuration for a TreeFillingConfiguration, depth=" + tmp.getDepth(), pasteConf); //$NON-NLS-1$ - if (depth == 1) { - operation = true; - } - } - Assert.assertTrue("Table configuration must not contains property", !property); //$NON-NLS-1$ - Assert.assertTrue("Table configuration must contains opration", operation); //$NON-NLS-1$ - Assert.assertTrue("Table configuration must not contains nestedClass", !nestedClass); //$NON-NLS-1$ - }else if (depth == 2) { - for (TreeFillingConfiguration tmp : confs) { - PasteEObjectConfiguration pasteConf = tmp.getPasteConfiguration(); - Assert.assertNotNull("We don't have paste configuration for a TreeFillingConfiguration, depth=" + tmp.getDepth(), pasteConf); //$NON-NLS-1$ - - Assert.assertTrue("The configuration number is not correct for the tree filling", confs.size() == 1); //$NON-NLS-1$ - Assert.assertTrue("The pasted element id is not correctly defined", PARAMETER_ELEMENT_ID.equals(pasteConf.getPastedElementId())); //$NON-NLS-1$ - } - } - } - } - } /** * {@inheritDoc} diff --git a/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/src/org/eclipse/papyrus/uml/nattable/clazz/config/tests/insert/InsertRowsAddAll_V1_V3_V1_MultiColumns_Test.java b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/src/org/eclipse/papyrus/uml/nattable/clazz/config/tests/insert/InsertRowsAddAll_V1_V3_V1_MultiColumns_Test.java index 60d5e90877d..5ea96dd9a72 100644 --- a/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/src/org/eclipse/papyrus/uml/nattable/clazz/config/tests/insert/InsertRowsAddAll_V1_V3_V1_MultiColumns_Test.java +++ b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/src/org/eclipse/papyrus/uml/nattable/clazz/config/tests/insert/InsertRowsAddAll_V1_V3_V1_MultiColumns_Test.java @@ -13,20 +13,12 @@ package org.eclipse.papyrus.uml.nattable.clazz.config.tests.insert; -import java.util.List; import java.util.Map; import org.eclipse.nebula.widgets.nattable.selection.command.SelectRowsCommand; -import org.eclipse.osgi.util.NLS; import org.eclipse.papyrus.infra.nattable.handler.InsertInTableHandler; import org.eclipse.papyrus.infra.nattable.manager.table.NattableModelManager; -import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.PasteEObjectConfiguration; -import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.TreeFillingConfiguration; -import org.eclipse.papyrus.infra.nattable.utils.FillingConfigurationUtils; -import org.eclipse.papyrus.infra.nattable.utils.StyleUtils; import org.eclipse.papyrus.infra.nattable.utils.UserActionConstants; -import org.junit.Assert; -import org.junit.Test; /** * Test pastes overwrite all of selection with visible categories. @@ -42,86 +34,6 @@ public class InsertRowsAddAll_V1_V3_V1_MultiColumns_Test extends AbstractInsertR public String removeClassName(final String className) throws Exception { return className.replaceFirst("InsertRowsAddAll_", ""); //$NON-NLS-1$ //$NON-NLS-2$ } - - /** - * Check the model for the test consistency. - * - * @throws Exception - * The caught exception. - */ - @Test - @Override - public void checkModelForTestConsistency() throws Exception { - String className = getClass().getSimpleName(); - className = removeClassName(className); - String[] result = className.split("_"); //$NON-NLS-1$ - Assert.assertTrue("The class name is not correcly build", result.length == 5); //$NON-NLS-1$ - for (int depth = 0; depth < 3; depth++) { - String current = result[depth]; - // filled by DnD - if (current.equals("Empty")) { //$NON-NLS-1$ - // no configuration - Assert.assertTrue("We must not have filling configuration for depth==0", FillingConfigurationUtils.getAllTreeFillingConfigurationForDepth(getTable(), 0).size() == 0); //$NON-NLS-1$ - // we can't hide a depth for which we don't have category - - Assert.assertTrue("The depth 0 can't be hidden", StyleUtils.isHiddenDepth(getTable(), 0) == false);//$NON-NLS-1$ - } else { - Assert.assertEquals("The class name is not correcly build", 2, current.length()); //$NON-NLS-1$ - char visibility = current.charAt(0); - char nbCategoriesForTheDepth = current.charAt(1); - switch (visibility) { - case 'H': - Assert.assertTrue(NLS.bind("The depth {0} must be hidden", depth), true == StyleUtils.isHiddenDepth(getTable(), depth));//$NON-NLS-1$ - break; - case 'V': - Assert.assertTrue(NLS.bind("The depth {0} must be visible", depth), false == StyleUtils.isHiddenDepth(getTable(), depth));//$NON-NLS-1$ - break; - default: - throw new Exception("Not supported case"); //$NON-NLS-1$ - } - // we check that we have the wanted number of filling categories - List<TreeFillingConfiguration> confs = FillingConfigurationUtils.getAllTreeFillingConfigurationForDepth(getTable(), depth); - int nbConfig = confs.size(); - int wantedConfig = Integer.parseInt(String.valueOf(nbCategoriesForTheDepth)); - Assert.assertEquals("The number of configuration is not the expected one", wantedConfig, nbConfig); //$NON-NLS-1$ - - if (depth == 0) { - Assert.assertTrue("The configuration number is not correct", confs.size() == 1); //$NON-NLS-1$ - for (TreeFillingConfiguration tmp : confs) { - PasteEObjectConfiguration pasteConf = tmp.getPasteConfiguration(); - Assert.assertNotNull("We don't have paste configuration for a TreeFillingConfiguration, depth=" + tmp.getDepth(), pasteConf); //$NON-NLS-1$ - if (depth == 0) { - Assert.assertTrue("The configuration number is not correct for the tree filling", confs.size() == 1); //$NON-NLS-1$ - Assert.assertTrue("The pasted element id is not correctly defined", CLASS_ELEMENT_ID.equals(pasteConf.getPastedElementId())); //$NON-NLS-1$ - } - } - }else if (depth == 1) { - boolean nestedClass = false; - boolean operation = false; - boolean property = false; - - for (TreeFillingConfiguration tmp : confs) { - PasteEObjectConfiguration pasteConf = tmp.getPasteConfiguration(); - Assert.assertNotNull("We don't have paste configuration for a TreeFillingConfiguration, depth=" + tmp.getDepth(), pasteConf); //$NON-NLS-1$ - if (depth == 1) { - operation = true; - } - } - Assert.assertTrue("Table configuration must not contains property", !property); //$NON-NLS-1$ - Assert.assertTrue("Table configuration must contains opration", operation); //$NON-NLS-1$ - Assert.assertTrue("Table configuration must not contains nestedClass", !nestedClass); //$NON-NLS-1$ - }else if (depth == 2) { - for (TreeFillingConfiguration tmp : confs) { - PasteEObjectConfiguration pasteConf = tmp.getPasteConfiguration(); - Assert.assertNotNull("We don't have paste configuration for a TreeFillingConfiguration, depth=" + tmp.getDepth(), pasteConf); //$NON-NLS-1$ - - Assert.assertTrue("The configuration number is not correct for the tree filling", confs.size() == 1); //$NON-NLS-1$ - Assert.assertTrue("The pasted element id is not correctly defined", PARAMETER_ELEMENT_ID.equals(pasteConf.getPastedElementId())); //$NON-NLS-1$ - } - } - } - } - } /** * {@inheritDoc} @@ -133,7 +45,7 @@ public class InsertRowsAddAll_V1_V3_V1_MultiColumns_Test extends AbstractInsertR super.manageSelection(manager); manager.getBodyLayerStack().getSelectionLayer().doCommand(new SelectRowsCommand(manager.getBodyLayerStack().getSelectionLayer(), 0, 50, true, false)); } - + /** * @see org.eclipse.papyrus.uml.nattable.generic.tests.insert.AbstractInsertTest#manageParameters(java.util.Map) * diff --git a/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/src/org/eclipse/papyrus/uml/nattable/clazz/config/tests/insert/InsertRowsReplaceAll_V1_V3_V1_MultiColumns_Test.java b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/src/org/eclipse/papyrus/uml/nattable/clazz/config/tests/insert/InsertRowsReplaceAll_V1_V3_V1_MultiColumns_Test.java index e90fecc7353..b4c1e8b67cd 100644 --- a/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/src/org/eclipse/papyrus/uml/nattable/clazz/config/tests/insert/InsertRowsReplaceAll_V1_V3_V1_MultiColumns_Test.java +++ b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/src/org/eclipse/papyrus/uml/nattable/clazz/config/tests/insert/InsertRowsReplaceAll_V1_V3_V1_MultiColumns_Test.java @@ -13,20 +13,12 @@ package org.eclipse.papyrus.uml.nattable.clazz.config.tests.insert; -import java.util.List; import java.util.Map; import org.eclipse.nebula.widgets.nattable.selection.command.SelectRowsCommand; -import org.eclipse.osgi.util.NLS; import org.eclipse.papyrus.infra.nattable.handler.InsertInTableHandler; import org.eclipse.papyrus.infra.nattable.manager.table.NattableModelManager; -import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.PasteEObjectConfiguration; -import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.TreeFillingConfiguration; -import org.eclipse.papyrus.infra.nattable.utils.FillingConfigurationUtils; -import org.eclipse.papyrus.infra.nattable.utils.StyleUtils; import org.eclipse.papyrus.infra.nattable.utils.UserActionConstants; -import org.junit.Assert; -import org.junit.Test; /** * Test pastes overwrite all of selection with visible categories. @@ -42,86 +34,6 @@ public class InsertRowsReplaceAll_V1_V3_V1_MultiColumns_Test extends AbstractIns public String removeClassName(final String className) throws Exception { return className.replaceFirst("InsertRowsReplaceAll_", ""); //$NON-NLS-1$ //$NON-NLS-2$ } - - /** - * Check the model for the test consistency. - * - * @throws Exception - * The caught exception. - */ - @Test - @Override - public void checkModelForTestConsistency() throws Exception { - String className = getClass().getSimpleName(); - className = removeClassName(className); - String[] result = className.split("_"); //$NON-NLS-1$ - Assert.assertTrue("The class name is not correcly build", result.length == 5); //$NON-NLS-1$ - for (int depth = 0; depth < 3; depth++) { - String current = result[depth]; - // filled by DnD - if (current.equals("Empty")) { //$NON-NLS-1$ - // no configuration - Assert.assertTrue("We must not have filling configuration for depth==0", FillingConfigurationUtils.getAllTreeFillingConfigurationForDepth(getTable(), 0).size() == 0); //$NON-NLS-1$ - // we can't hide a depth for which we don't have category - - Assert.assertTrue("The depth 0 can't be hidden", StyleUtils.isHiddenDepth(getTable(), 0) == false);//$NON-NLS-1$ - } else { - Assert.assertEquals("The class name is not correcly build", 2, current.length()); //$NON-NLS-1$ - char visibility = current.charAt(0); - char nbCategoriesForTheDepth = current.charAt(1); - switch (visibility) { - case 'H': - Assert.assertTrue(NLS.bind("The depth {0} must be hidden", depth), true == StyleUtils.isHiddenDepth(getTable(), depth));//$NON-NLS-1$ - break; - case 'V': - Assert.assertTrue(NLS.bind("The depth {0} must be visible", depth), false == StyleUtils.isHiddenDepth(getTable(), depth));//$NON-NLS-1$ - break; - default: - throw new Exception("Not supported case"); //$NON-NLS-1$ - } - // we check that we have the wanted number of filling categories - List<TreeFillingConfiguration> confs = FillingConfigurationUtils.getAllTreeFillingConfigurationForDepth(getTable(), depth); - int nbConfig = confs.size(); - int wantedConfig = Integer.parseInt(String.valueOf(nbCategoriesForTheDepth)); - Assert.assertEquals("The number of configuration is not the expected one", wantedConfig, nbConfig); //$NON-NLS-1$ - - if (depth == 0) { - Assert.assertTrue("The configuration number is not correct", confs.size() == 1); //$NON-NLS-1$ - for (TreeFillingConfiguration tmp : confs) { - PasteEObjectConfiguration pasteConf = tmp.getPasteConfiguration(); - Assert.assertNotNull("We don't have paste configuration for a TreeFillingConfiguration, depth=" + tmp.getDepth(), pasteConf); //$NON-NLS-1$ - if (depth == 0) { - Assert.assertTrue("The configuration number is not correct for the tree filling", confs.size() == 1); //$NON-NLS-1$ - Assert.assertTrue("The pasted element id is not correctly defined", CLASS_ELEMENT_ID.equals(pasteConf.getPastedElementId())); //$NON-NLS-1$ - } - } - }else if (depth == 1) { - boolean nestedClass = false; - boolean operation = false; - boolean property = false; - - for (TreeFillingConfiguration tmp : confs) { - PasteEObjectConfiguration pasteConf = tmp.getPasteConfiguration(); - Assert.assertNotNull("We don't have paste configuration for a TreeFillingConfiguration, depth=" + tmp.getDepth(), pasteConf); //$NON-NLS-1$ - if (depth == 1) { - operation = true; - } - } - Assert.assertTrue("Table configuration must not contains property", !property); //$NON-NLS-1$ - Assert.assertTrue("Table configuration must contains opration", operation); //$NON-NLS-1$ - Assert.assertTrue("Table configuration must not contains nestedClass", !nestedClass); //$NON-NLS-1$ - }else if (depth == 2) { - for (TreeFillingConfiguration tmp : confs) { - PasteEObjectConfiguration pasteConf = tmp.getPasteConfiguration(); - Assert.assertNotNull("We don't have paste configuration for a TreeFillingConfiguration, depth=" + tmp.getDepth(), pasteConf); //$NON-NLS-1$ - - Assert.assertTrue("The configuration number is not correct for the tree filling", confs.size() == 1); //$NON-NLS-1$ - Assert.assertTrue("The pasted element id is not correctly defined", PARAMETER_ELEMENT_ID.equals(pasteConf.getPastedElementId())); //$NON-NLS-1$ - } - } - } - } - } /** * {@inheritDoc} @@ -133,7 +45,7 @@ public class InsertRowsReplaceAll_V1_V3_V1_MultiColumns_Test extends AbstractIns super.manageSelection(manager); manager.getBodyLayerStack().getSelectionLayer().doCommand(new SelectRowsCommand(manager.getBodyLayerStack().getSelectionLayer(), 0, 50, true, false)); } - + /** * @see org.eclipse.papyrus.uml.nattable.generic.tests.insert.AbstractInsertTest#manageParameters(java.util.Map) * diff --git a/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/src/org/eclipse/papyrus/uml/nattable/clazz/config/tests/insert/InsertRowsSkipAll_V1_V3_V1_MultiColumns_Test.java b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/src/org/eclipse/papyrus/uml/nattable/clazz/config/tests/insert/InsertRowsSkipAll_V1_V3_V1_MultiColumns_Test.java index 78218f23c3e..06f854c5f8b 100644 --- a/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/src/org/eclipse/papyrus/uml/nattable/clazz/config/tests/insert/InsertRowsSkipAll_V1_V3_V1_MultiColumns_Test.java +++ b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/src/org/eclipse/papyrus/uml/nattable/clazz/config/tests/insert/InsertRowsSkipAll_V1_V3_V1_MultiColumns_Test.java @@ -13,21 +13,13 @@ package org.eclipse.papyrus.uml.nattable.clazz.config.tests.insert; -import java.util.List; import java.util.Map; import org.eclipse.nebula.widgets.nattable.selection.command.SelectRowsCommand; -import org.eclipse.osgi.util.NLS; import org.eclipse.papyrus.infra.nattable.handler.InsertInTableHandler; import org.eclipse.papyrus.infra.nattable.manager.table.NattableModelManager; import org.eclipse.papyrus.infra.nattable.manager.table.TreeNattableModelManager; -import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.PasteEObjectConfiguration; -import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.TreeFillingConfiguration; -import org.eclipse.papyrus.infra.nattable.utils.FillingConfigurationUtils; -import org.eclipse.papyrus.infra.nattable.utils.StyleUtils; import org.eclipse.papyrus.infra.nattable.utils.UserActionConstants; -import org.junit.Assert; -import org.junit.Test; /** * Test pastes overwrite all of selection with visible categories. @@ -43,86 +35,6 @@ public class InsertRowsSkipAll_V1_V3_V1_MultiColumns_Test extends AbstractInsert public String removeClassName(final String className) throws Exception { return className.replaceFirst("InsertRowsSkipAll_", ""); //$NON-NLS-1$ //$NON-NLS-2$ } - - /** - * Check the model for the test consistency. - * - * @throws Exception - * The caught exception. - */ - @Test - @Override - public void checkModelForTestConsistency() throws Exception { - String className = getClass().getSimpleName(); - className = removeClassName(className); - String[] result = className.split("_"); //$NON-NLS-1$ - Assert.assertTrue("The class name is not correcly build", result.length == 5); //$NON-NLS-1$ - for (int depth = 0; depth < 3; depth++) { - String current = result[depth]; - // filled by DnD - if (current.equals("Empty")) { //$NON-NLS-1$ - // no configuration - Assert.assertTrue("We must not have filling configuration for depth==0", FillingConfigurationUtils.getAllTreeFillingConfigurationForDepth(getTable(), 0).size() == 0); //$NON-NLS-1$ - // we can't hide a depth for which we don't have category - - Assert.assertTrue("The depth 0 can't be hidden", StyleUtils.isHiddenDepth(getTable(), 0) == false);//$NON-NLS-1$ - } else { - Assert.assertEquals("The class name is not correcly build", 2, current.length()); //$NON-NLS-1$ - char visibility = current.charAt(0); - char nbCategoriesForTheDepth = current.charAt(1); - switch (visibility) { - case 'H': - Assert.assertTrue(NLS.bind("The depth {0} must be hidden", depth), true == StyleUtils.isHiddenDepth(getTable(), depth));//$NON-NLS-1$ - break; - case 'V': - Assert.assertTrue(NLS.bind("The depth {0} must be visible", depth), false == StyleUtils.isHiddenDepth(getTable(), depth));//$NON-NLS-1$ - break; - default: - throw new Exception("Not supported case"); //$NON-NLS-1$ - } - // we check that we have the wanted number of filling categories - List<TreeFillingConfiguration> confs = FillingConfigurationUtils.getAllTreeFillingConfigurationForDepth(getTable(), depth); - int nbConfig = confs.size(); - int wantedConfig = Integer.parseInt(String.valueOf(nbCategoriesForTheDepth)); - Assert.assertEquals("The number of configuration is not the expected one", wantedConfig, nbConfig); //$NON-NLS-1$ - - if (depth == 0) { - Assert.assertTrue("The configuration number is not correct", confs.size() == 1); //$NON-NLS-1$ - for (TreeFillingConfiguration tmp : confs) { - PasteEObjectConfiguration pasteConf = tmp.getPasteConfiguration(); - Assert.assertNotNull("We don't have paste configuration for a TreeFillingConfiguration, depth=" + tmp.getDepth(), pasteConf); //$NON-NLS-1$ - if (depth == 0) { - Assert.assertTrue("The configuration number is not correct for the tree filling", confs.size() == 1); //$NON-NLS-1$ - Assert.assertTrue("The pasted element id is not correctly defined", CLASS_ELEMENT_ID.equals(pasteConf.getPastedElementId())); //$NON-NLS-1$ - } - } - }else if (depth == 1) { - boolean nestedClass = false; - boolean operation = false; - boolean property = false; - - for (TreeFillingConfiguration tmp : confs) { - PasteEObjectConfiguration pasteConf = tmp.getPasteConfiguration(); - Assert.assertNotNull("We don't have paste configuration for a TreeFillingConfiguration, depth=" + tmp.getDepth(), pasteConf); //$NON-NLS-1$ - if (depth == 1) { - operation = true; - } - } - Assert.assertTrue("Table configuration must not contains property", !property); //$NON-NLS-1$ - Assert.assertTrue("Table configuration must contains opration", operation); //$NON-NLS-1$ - Assert.assertTrue("Table configuration must not contains nestedClass", !nestedClass); //$NON-NLS-1$ - }else if (depth == 2) { - for (TreeFillingConfiguration tmp : confs) { - PasteEObjectConfiguration pasteConf = tmp.getPasteConfiguration(); - Assert.assertNotNull("We don't have paste configuration for a TreeFillingConfiguration, depth=" + tmp.getDepth(), pasteConf); //$NON-NLS-1$ - - Assert.assertTrue("The configuration number is not correct for the tree filling", confs.size() == 1); //$NON-NLS-1$ - Assert.assertTrue("The pasted element id is not correctly defined", PARAMETER_ELEMENT_ID.equals(pasteConf.getPastedElementId())); //$NON-NLS-1$ - } - } - } - } - } /** * {@inheritDoc} diff --git a/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/src/org/eclipse/papyrus/uml/nattable/clazz/config/tests/paste/overwrite/PasteEmptyOverwriteAddAll_V1_V3_V1_MultiColumns_Test.java b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/src/org/eclipse/papyrus/uml/nattable/clazz/config/tests/paste/overwrite/PasteEmptyOverwriteAddAll_V1_V3_V1_MultiColumns_Test.java index 300b777c4be..8299bdae33a 100644 --- a/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/src/org/eclipse/papyrus/uml/nattable/clazz/config/tests/paste/overwrite/PasteEmptyOverwriteAddAll_V1_V3_V1_MultiColumns_Test.java +++ b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/src/org/eclipse/papyrus/uml/nattable/clazz/config/tests/paste/overwrite/PasteEmptyOverwriteAddAll_V1_V3_V1_MultiColumns_Test.java @@ -13,18 +13,10 @@ package org.eclipse.papyrus.uml.nattable.clazz.config.tests.paste.overwrite; -import java.util.List; import java.util.Map; -import org.eclipse.osgi.util.NLS; import org.eclipse.papyrus.infra.nattable.handler.InsertInTableHandler; -import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.PasteEObjectConfiguration; -import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.TreeFillingConfiguration; -import org.eclipse.papyrus.infra.nattable.utils.FillingConfigurationUtils; -import org.eclipse.papyrus.infra.nattable.utils.StyleUtils; import org.eclipse.papyrus.infra.nattable.utils.UserActionConstants; -import org.junit.Assert; -import org.junit.Test; /** * Test pastes overwrite all of selection with visible categories. @@ -32,86 +24,6 @@ import org.junit.Test; public class PasteEmptyOverwriteAddAll_V1_V3_V1_MultiColumns_Test extends AbstractPasteEmptyOverwriteTest { /** - * Check the model for the test consistency. - * - * @throws Exception - * The caught exception. - */ - @Test - @Override - public void checkModelForTestConsistency() throws Exception { - String className = getClass().getSimpleName(); - className = removeClassName(className); - String[] result = className.split("_"); //$NON-NLS-1$ - Assert.assertTrue("The class name is not correcly build", result.length == 5); //$NON-NLS-1$ - for (int depth = 0; depth < 3; depth++) { - String current = result[depth]; - // filled by DnD - if (current.equals("Empty")) { //$NON-NLS-1$ - // no configuration - Assert.assertTrue("We must not have filling configuration for depth==0", FillingConfigurationUtils.getAllTreeFillingConfigurationForDepth(getTable(), 0).size() == 0); //$NON-NLS-1$ - // we can't hide a depth for which we don't have category - - Assert.assertTrue("The depth 0 can't be hidden", StyleUtils.isHiddenDepth(getTable(), 0) == false);//$NON-NLS-1$ - } else { - Assert.assertEquals("The class name is not correcly build", 2, current.length()); //$NON-NLS-1$ - char visibility = current.charAt(0); - char nbCategoriesForTheDepth = current.charAt(1); - switch (visibility) { - case 'H': - Assert.assertTrue(NLS.bind("The depth {0} must be hidden", depth), true == StyleUtils.isHiddenDepth(getTable(), depth));//$NON-NLS-1$ - break; - case 'V': - Assert.assertTrue(NLS.bind("The depth {0} must be visible", depth), false == StyleUtils.isHiddenDepth(getTable(), depth));//$NON-NLS-1$ - break; - default: - throw new Exception("Not supported case"); //$NON-NLS-1$ - } - // we check that we have the wanted number of filling categories - List<TreeFillingConfiguration> confs = FillingConfigurationUtils.getAllTreeFillingConfigurationForDepth(getTable(), depth); - int nbConfig = confs.size(); - int wantedConfig = Integer.parseInt(String.valueOf(nbCategoriesForTheDepth)); - Assert.assertEquals("The number of configuration is not the expected one", wantedConfig, nbConfig); //$NON-NLS-1$ - - if (depth == 0) { - Assert.assertTrue("The configuration number is not correct", confs.size() == 1); //$NON-NLS-1$ - for (TreeFillingConfiguration tmp : confs) { - PasteEObjectConfiguration pasteConf = tmp.getPasteConfiguration(); - Assert.assertNotNull("We don't have paste configuration for a TreeFillingConfiguration, depth=" + tmp.getDepth(), pasteConf); //$NON-NLS-1$ - if (depth == 0) { - Assert.assertTrue("The configuration number is not correct for the tree filling", confs.size() == 1); //$NON-NLS-1$ - Assert.assertTrue("The pasted element id is not correctly defined", CLASS_ELEMENT_ID.equals(pasteConf.getPastedElementId())); //$NON-NLS-1$ - } - } - }else if (depth == 1) { - boolean nestedClass = false; - boolean operation = false; - boolean property = false; - - for (TreeFillingConfiguration tmp : confs) { - PasteEObjectConfiguration pasteConf = tmp.getPasteConfiguration(); - Assert.assertNotNull("We don't have paste configuration for a TreeFillingConfiguration, depth=" + tmp.getDepth(), pasteConf); //$NON-NLS-1$ - if (depth == 1) { - operation = true; - } - } - Assert.assertTrue("Table configuration must not contains property", !property); //$NON-NLS-1$ - Assert.assertTrue("Table configuration must contains opration", operation); //$NON-NLS-1$ - Assert.assertTrue("Table configuration must not contains nestedClass", !nestedClass); //$NON-NLS-1$ - }else if (depth == 2) { - for (TreeFillingConfiguration tmp : confs) { - PasteEObjectConfiguration pasteConf = tmp.getPasteConfiguration(); - Assert.assertNotNull("We don't have paste configuration for a TreeFillingConfiguration, depth=" + tmp.getDepth(), pasteConf); //$NON-NLS-1$ - - Assert.assertTrue("The configuration number is not correct for the tree filling", confs.size() == 1); //$NON-NLS-1$ - Assert.assertTrue("The pasted element id is not correctly defined", PARAMETER_ELEMENT_ID.equals(pasteConf.getPastedElementId())); //$NON-NLS-1$ - } - } - } - } - } - - /** * {@inheritDoc} * * @see org.eclipse.papyrus.uml.nattable.clazz.config.tests.paste.overwrite.AbstractPasteOverwriteTest#removeClassName(java.lang.String) |