From 0c692799e070d0c6e568fd771d15ee0397d154df Mon Sep 17 00:00:00 2001 From: Vincent Lorenzo Date: Tue, 16 Jul 2013 14:13:35 +0200 Subject: 412841: [Table 2] Table metamodel must have a Cell Element to allow to store specific information for a specific cell https://bugs.eclipse.org/bugs/show_bug.cgi?id=412841 Correct the cell metamodel (change isContainment for CellAxisWrapper Provides test the the generated emf cell editor and problem editor--- .../infra/nattable/model/editor/tests/Activator.java | 7 +++++-- .../nattable/model/editor/tests/tests/EditorsTests.java | 16 ++++++++++++++++ 2 files changed, 21 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/junit/extraplugins/table/org.eclipse.papyrus.infra.nattable.model.editor.tests/src/org/eclipse/papyrus/infra/nattable/model/editor/tests/Activator.java b/tests/junit/extraplugins/table/org.eclipse.papyrus.infra.nattable.model.editor.tests/src/org/eclipse/papyrus/infra/nattable/model/editor/tests/Activator.java index 231e537885e..3dbf0bbf06f 100644 --- a/tests/junit/extraplugins/table/org.eclipse.papyrus.infra.nattable.model.editor.tests/src/org/eclipse/papyrus/infra/nattable/model/editor/tests/Activator.java +++ b/tests/junit/extraplugins/table/org.eclipse.papyrus.infra.nattable.model.editor.tests/src/org/eclipse/papyrus/infra/nattable/model/editor/tests/Activator.java @@ -27,8 +27,9 @@ public class Activator extends AbstractUIPlugin { // The shared instance private static Activator plugin; - + public static LogHelper log; + /** * The constructor */ @@ -37,6 +38,7 @@ public class Activator extends AbstractUIPlugin { /* * (non-Javadoc) + * * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) */ public void start(BundleContext context) throws Exception { @@ -47,6 +49,7 @@ public class Activator extends AbstractUIPlugin { /* * (non-Javadoc) + * * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) */ public void stop(BundleContext context) throws Exception { @@ -56,7 +59,7 @@ public class Activator extends AbstractUIPlugin { /** * Returns the shared instance - * + * * @return the shared instance */ public static Activator getDefault() { diff --git a/tests/junit/extraplugins/table/org.eclipse.papyrus.infra.nattable.model.editor.tests/src/org/eclipse/papyrus/infra/nattable/model/editor/tests/tests/EditorsTests.java b/tests/junit/extraplugins/table/org.eclipse.papyrus.infra.nattable.model.editor.tests/src/org/eclipse/papyrus/infra/nattable/model/editor/tests/tests/EditorsTests.java index 0aa271395ee..9c2c655af28 100644 --- a/tests/junit/extraplugins/table/org.eclipse.papyrus.infra.nattable.model.editor.tests/src/org/eclipse/papyrus/infra/nattable/model/editor/tests/tests/EditorsTests.java +++ b/tests/junit/extraplugins/table/org.eclipse.papyrus.infra.nattable.model.editor.tests/src/org/eclipse/papyrus/infra/nattable/model/editor/tests/tests/EditorsTests.java @@ -23,8 +23,10 @@ import org.eclipse.papyrus.infra.nattable.model.editor.customeditors.CustomNatta import org.eclipse.papyrus.infra.nattable.model.editor.customeditors.CustomNattableaxisEditor; import org.eclipse.papyrus.infra.nattable.model.editor.customeditors.CustomNattableaxisconfigurationEditor; import org.eclipse.papyrus.infra.nattable.model.editor.customeditors.CustomNattableaxisproviderEditor; +import org.eclipse.papyrus.infra.nattable.model.editor.customeditors.CustomNattablecellEditor; import org.eclipse.papyrus.infra.nattable.model.editor.customeditors.CustomNattableconfigurationEditor; import org.eclipse.papyrus.infra.nattable.model.editor.customeditors.CustomNattablelabelproviderEditor; +import org.eclipse.papyrus.infra.nattable.model.editor.customeditors.CustomNattableproblemEditor; import org.eclipse.papyrus.infra.nattable.model.editor.customeditors.CustomNattabletesterEditor; import org.eclipse.papyrus.infra.nattable.model.editor.tests.Activator; import org.eclipse.papyrus.junit.utils.EditorUtils; @@ -140,6 +142,20 @@ public class EditorsTests { Assert.assertTrue(editor instanceof CustomNattabletesterEditor); } + + @Test + public void testOpenNattableTesterCellEditor() throws Exception { + IEditorPart editor = openFile("testTableConfiguration", "My.nattablecell", getBundle()); //$NON-NLS-1$ //$NON-NLS-2$ + Assert.assertTrue(editor instanceof CustomNattablecellEditor); + } + + + @Test + public void testOpenNattableTesterProblemEditor() throws Exception { + IEditorPart editor = openFile("testTableConfiguration", "My.nattableproblem", getBundle()); //$NON-NLS-1$ //$NON-NLS-2$ + Assert.assertTrue(editor instanceof CustomNattableproblemEditor); + } + protected String getSourcePath() { return "/resources/"; //$NON-NLS-1$ } -- cgit v1.2.3