[451364] Clean internal SiriusCellEditorProviderCollector cache
in this test to avoid to have a not clean environment for following
tests.
Bug: 451364
Change-Id: I279323396fea9a51bcd925353698422de6c2ac73
Signed-off-by: Laurent Redor <laurent.redor@obeo.fr>
diff --git a/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/celleditor/CellEditorExtensionTest.java b/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/celleditor/CellEditorExtensionTest.java
index eea42c8..583fe28 100644
--- a/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/celleditor/CellEditorExtensionTest.java
+++ b/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/celleditor/CellEditorExtensionTest.java
@@ -18,6 +18,7 @@
import org.eclipse.core.runtime.IExtension;
import org.eclipse.core.runtime.IExtensionRegistry;
import org.eclipse.core.runtime.Platform;
+import org.eclipse.sirius.common.tools.api.util.ReflectionHelper;
import org.eclipse.sirius.diagram.DDiagram;
import org.eclipse.sirius.diagram.ui.edit.api.part.AbstractDiagramContainerEditPart;
import org.eclipse.sirius.table.metamodel.table.DTable;
@@ -143,6 +144,9 @@
IExtensionRegistry extensionRegistry = Platform.getExtensionRegistry();
IExtension extension = extensionRegistry.getExtension(SiriusCellEditorProviderCollector.EXTENSION_POINT_ID, Activator.PLUGIN_ID + ".customCellEditor");
extensionRegistry.removeExtension(extension, ((ExtensionRegistry) extensionRegistry).getTemporaryUserToken());
+ // Also force a clean of the internal cache of
+ // SiriusCellEditorProviderCollector
+ ReflectionHelper.setFieldValueWithoutException(SiriusCellEditorProviderCollector.getInstance(), "cache", null);
}
@Override