Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Barbin2015-01-27 08:48:35 +0000
committerFlorian Barbin2015-02-19 16:37:13 +0000
commit96ecae77c9b57d5a76bb2f3d54f758e9fd8ff994 (patch)
tree325d68bd28da69584096dc7888348f05a385b835
parent30bf81f3b68d748c75d70bf6ad83c6ecb79d6b5c (diff)
downloadorg.eclipse.sirius-96ecae77c9b57d5a76bb2f3d54f758e9fd8ff994.tar.gz
org.eclipse.sirius-96ecae77c9b57d5a76bb2f3d54f758e9fd8ff994.tar.xz
org.eclipse.sirius-96ecae77c9b57d5a76bb2f3d54f758e9fd8ff994.zip
[451364] Allows clients to provide their own cell editors.
This commit allows clients to customize the cell editors in properties view: * Adds the feature specification * Creates a new extension point org.eclipse.sirius.ui.siriuspropertiescelleditor * Creates a new SiriusPropertySource that provides a SiriusPropertyDescriptor that will ask for any CellEditor provider. * Updates the release note and the Sirius Documentation * Add a new SWTBot test Bug: 451364 Change-Id: If41dbe84d867ae195e87e18facbb74b8b8d71a37 Signed-off-by: Florian Barbin <florian.barbin@obeo.fr>
-rw-r--r--packaging/org.eclipse.sirius.runtime.ide.ui/feature.xml7
-rw-r--r--plugins/org.eclipse.sirius.diagram.ui/META-INF/MANIFEST.MF1
-rw-r--r--plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/internal/properties/ExtensionSemanticPropertiesSection.java4
-rw-r--r--plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/internal/properties/SemanticPropertySection.java8
-rw-r--r--plugins/org.eclipse.sirius.doc/doc/Release Notes.html95
-rw-r--r--plugins/org.eclipse.sirius.doc/doc/Release Notes.textile10
-rw-r--r--plugins/org.eclipse.sirius.doc/doc/developer/Sirius Developer Manual.html7
-rw-r--r--plugins/org.eclipse.sirius.doc/doc/developer/Sirius Developer Manual.textile3
-rw-r--r--plugins/org.eclipse.sirius.doc/doc/developer/extensions-provide_celleditor.html27
-rw-r--r--plugins/org.eclipse.sirius.doc/doc/developer/extensions-provide_celleditor.textile12
-rw-r--r--plugins/org.eclipse.sirius.doc/doc/developer/images/propertiesView.pngbin0 -> 20524 bytes
-rw-r--r--plugins/org.eclipse.sirius.doc/doc/toc.xml1
-rw-r--r--plugins/org.eclipse.sirius.doc/specs/proposal/451364_cellEditors/451364.html1
-rw-r--r--plugins/org.eclipse.sirius.doc/specs/proposal/451364_cellEditors/451364.textile58
-rw-r--r--plugins/org.eclipse.sirius.doc/specs/proposal/451364_cellEditors/properties.pngbin0 -> 23143 bytes
-rw-r--r--plugins/org.eclipse.sirius.ext.emf.ui/.settings/org.eclipse.pde.core.prefs2
-rw-r--r--plugins/org.eclipse.sirius.ext.emf.ui/META-INF/MANIFEST.MF5
-rw-r--r--plugins/org.eclipse.sirius.ext.emf.ui/src/org/eclipse/sirius/ext/emf/ui/ICellEditorProvider.java55
-rw-r--r--plugins/org.eclipse.sirius.ext.emf.ui/src/org/eclipse/sirius/ext/emf/ui/properties/CellEditorProviderCollector.java42
-rw-r--r--plugins/org.eclipse.sirius.ext.emf.ui/src/org/eclipse/sirius/ext/emf/ui/properties/ExtensiblePropertyDescriptor.java62
-rw-r--r--plugins/org.eclipse.sirius.ext.emf.ui/src/org/eclipse/sirius/ext/emf/ui/properties/ExtensiblePropertySource.java51
-rw-r--r--plugins/org.eclipse.sirius.table.ui/META-INF/MANIFEST.MF1
-rw-r--r--plugins/org.eclipse.sirius.table.ui/src/org/eclipse/sirius/table/ui/tools/internal/properties/section/semantic/SemanticPropertySection.java3
-rw-r--r--plugins/org.eclipse.sirius.tests.swtbot/META-INF/MANIFEST.MF1
-rw-r--r--plugins/org.eclipse.sirius.tests.swtbot/data/unit/cellEditor/cellEditor.aird146
-rw-r--r--plugins/org.eclipse.sirius.tests.swtbot/data/unit/cellEditor/cellEditor.ecore15
-rw-r--r--plugins/org.eclipse.sirius.tests.swtbot/data/unit/cellEditor/cellEditor.odesign29
-rw-r--r--plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/celleditor/CellEditorExtensionTest.java156
-rw-r--r--plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/celleditor/CustomCellEditor.java40
-rw-r--r--plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/suite/AllTestSuite.java2
-rw-r--r--plugins/org.eclipse.sirius.tree.ui/META-INF/MANIFEST.MF3
-rw-r--r--plugins/org.eclipse.sirius.tree.ui/src/org/eclipse/sirius/tree/ui/properties/section/semantic/SemanticPropertySection.java3
-rw-r--r--plugins/org.eclipse.sirius.ui/META-INF/MANIFEST.MF3
-rw-r--r--plugins/org.eclipse.sirius.ui/plugin.xml1
-rw-r--r--plugins/org.eclipse.sirius.ui/schema/siriuspropertiescelleditor.exsd78
-rw-r--r--plugins/org.eclipse.sirius.ui/src/org/eclipse/sirius/ui/tools/api/properties/AbstractCompositeEObjectPropertySource.java8
-rw-r--r--plugins/org.eclipse.sirius.ui/src/org/eclipse/sirius/ui/tools/api/properties/SiriusExtensiblePropertySource.java39
-rw-r--r--plugins/org.eclipse.sirius.ui/src/org/eclipse/sirius/ui/tools/internal/properties/SiriusCellEditorProviderCollector.java102
38 files changed, 1017 insertions, 64 deletions
diff --git a/packaging/org.eclipse.sirius.runtime.ide.ui/feature.xml b/packaging/org.eclipse.sirius.runtime.ide.ui/feature.xml
index aa9cb8554a..8be1e9386a 100644
--- a/packaging/org.eclipse.sirius.runtime.ide.ui/feature.xml
+++ b/packaging/org.eclipse.sirius.runtime.ide.ui/feature.xml
@@ -136,4 +136,11 @@
version="0.0.0"
unpack="false"/>
+ <plugin
+ id="org.eclipse.sirius.ext.emf.ui"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
</feature>
diff --git a/plugins/org.eclipse.sirius.diagram.ui/META-INF/MANIFEST.MF b/plugins/org.eclipse.sirius.diagram.ui/META-INF/MANIFEST.MF
index 540976364b..4aa7448102 100644
--- a/plugins/org.eclipse.sirius.diagram.ui/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.sirius.diagram.ui/META-INF/MANIFEST.MF
@@ -193,6 +193,7 @@ Bundle-ActivationPolicy: lazy
Import-Package: org.eclipse.sirius.ext.base;version="2.0.0",
org.eclipse.sirius.ext.draw2d.figure;version="2.0.0",
org.eclipse.sirius.ext.emf;version="2.0.0",
+ org.eclipse.sirius.ext.emf.ui.properties,
org.eclipse.sirius.ext.gef.editpolicies;version="2.0.0",
org.eclipse.sirius.ext.gmf.runtime.editparts;version="2.0.0",
org.eclipse.sirius.ext.swt;version="2.0.0"
diff --git a/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/internal/properties/ExtensionSemanticPropertiesSection.java b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/internal/properties/ExtensionSemanticPropertiesSection.java
index 44833be737..791537717c 100644
--- a/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/internal/properties/ExtensionSemanticPropertiesSection.java
+++ b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/internal/properties/ExtensionSemanticPropertiesSection.java
@@ -19,7 +19,6 @@ import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.edit.provider.IItemPropertySource;
-import org.eclipse.emf.edit.ui.provider.PropertySource;
import org.eclipse.gef.EditPart;
import org.eclipse.gmf.runtime.diagram.ui.properties.sections.AdvancedPropertySection;
import org.eclipse.gmf.runtime.notation.View;
@@ -27,6 +26,7 @@ import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.sirius.diagram.ui.provider.DiagramUIPlugin;
import org.eclipse.sirius.diagram.ui.tools.api.editor.DDiagramEditor;
+import org.eclipse.sirius.ui.tools.api.properties.SiriusExtensiblePropertySource;
import org.eclipse.sirius.viewpoint.DSemanticDecorator;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.views.properties.IPropertySource;
@@ -61,7 +61,7 @@ public class ExtensionSemanticPropertiesSection extends AdvancedPropertySection
if (adapterFactory != null) {
final IItemPropertySource ips = (IItemPropertySource) adapterFactory.adapt(object, IItemPropertySource.class);
if (ips != null) {
- propertySrc = new PropertySource(object, ips);
+ propertySrc = new SiriusExtensiblePropertySource(object, ips);
}
}
if (propertySrc == null && object instanceof IAdaptable) {
diff --git a/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/internal/properties/SemanticPropertySection.java b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/internal/properties/SemanticPropertySection.java
index 2112d17ba3..83d1166915 100644
--- a/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/internal/properties/SemanticPropertySection.java
+++ b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/internal/properties/SemanticPropertySection.java
@@ -19,7 +19,6 @@ import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.edit.provider.IItemPropertySource;
-import org.eclipse.emf.edit.ui.provider.PropertySource;
import org.eclipse.gef.EditPart;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.jface.viewers.ISelection;
@@ -29,6 +28,7 @@ import org.eclipse.sirius.diagram.ui.provider.DiagramUIPlugin;
import org.eclipse.sirius.diagram.ui.tools.api.editor.DDiagramEditor;
import org.eclipse.sirius.diagram.ui.tools.api.properties.AbstractPropertySection;
import org.eclipse.sirius.ecore.extender.business.api.accessor.ModelAccessor;
+import org.eclipse.sirius.ui.tools.api.properties.SiriusExtensiblePropertySource;
import org.eclipse.sirius.viewpoint.DSemanticDecorator;
import org.eclipse.sirius.viewpoint.SiriusPlugin;
import org.eclipse.ui.IWorkbenchPart;
@@ -71,7 +71,7 @@ public class SemanticPropertySection extends AbstractPropertySection implements
if (af != null) {
final IItemPropertySource ips = (IItemPropertySource) af.adapt(semanticElement, IItemPropertySource.class);
if (ips != null) {
- final IPropertySource targetPropertySource = new PropertySource(semanticElement, ips);
+ final IPropertySource targetPropertySource = new SiriusExtensiblePropertySource(semanticElement, ips);
propertySource.addPropertySource(semanticElement, targetPropertySource);
}
}
@@ -87,7 +87,7 @@ public class SemanticPropertySection extends AbstractPropertySection implements
if (af != null) {
final IItemPropertySource ips = (IItemPropertySource) af.adapt(semanticElement, IItemPropertySource.class);
if (ips != null) {
- final IPropertySource targetPropertySource = new PropertySource(semanticElement, ips);
+ final IPropertySource targetPropertySource = new SiriusExtensiblePropertySource(semanticElement, ips);
propertySource.addPropertySource(semanticElement, targetPropertySource);
}
}
@@ -98,7 +98,7 @@ public class SemanticPropertySection extends AbstractPropertySection implements
if (af != null) {
final IItemPropertySource ips = (IItemPropertySource) af.adapt(object, IItemPropertySource.class);
if (ips != null) {
- return new PropertySource(object, ips);
+ return new SiriusExtensiblePropertySource(object, ips);
}
}
if (object instanceof IAdaptable) {
diff --git a/plugins/org.eclipse.sirius.doc/doc/Release Notes.html b/plugins/org.eclipse.sirius.doc/doc/Release Notes.html
index cf7ea6b792..b147ca7b34 100644
--- a/plugins/org.eclipse.sirius.doc/doc/Release Notes.html
+++ b/plugins/org.eclipse.sirius.doc/doc/Release Notes.html
@@ -48,7 +48,7 @@
<code>[eContents()-&gt;size()/]</code>) in the VSM, that was implicit before. Customers who want to completely remove this dependency must remove the A3 expressions from there VSM after the migration.
</li>
<li>The default icons paths of Selection Wizard and Pane Based Selection Wizard used to reference invalid icons, so the corresponding tools had no icon per default in the palette. The default icons paths have been corrected to reference the icons displayed for those elements in the VSM editor.</li>
- <li>&#171;*&#187; can now be used as feature name of a FeatureColumn to skip the feature name validation during the cell creation. This allow to compute the label of cells for lines whose semantic element types have no common EStructuralFeatures (inherited or with same name).</li>
+ <li>&#8220;*&#8221; can now be used as feature name of a FeatureColumn to skip the feature name validation during the cell creation. This allow to compute the label of cells for lines whose semantic element types have no common EStructuralFeatures (inherited or with same name).</li>
</ul>
<h3 id="APIChanges">API Changes</h3>
<h4 id="Changesinorg.eclipse.sirius.ext.emf.tx">Changes in
@@ -75,7 +75,7 @@
<code>org.eclipse.sirius.business.api.helper.SiriusUtil.ENVIRONMENT_URI_SCHEME</code> declares environment URI scheme.
</li>
<li>Constant
- <code>org.eclipse.sirius.business.api.helper.SiriusUtil.VIEWPOINT_ENVIRONMENT_RESOURCE_URI</code> declares &#171;environment:/viewpoint&#187; resource uri.
+ <code>org.eclipse.sirius.business.api.helper.SiriusUtil.VIEWPOINT_ENVIRONMENT_RESOURCE_URI</code> declares &#8220;environment:/viewpoint&#8221; resource uri.
</li>
<li>Constant
<code>org.eclipse.sirius.viewpoint.description.util.DescriptionResourceImpl.OPTION_SIRIUS_USE_URI_FRAGMENT_AS_ID</code> added to define a option to enable the use of a id map for odesign resource, id being uri&#8217;s fragment.
@@ -90,6 +90,24 @@
<code>Session.addSemanticResource()</code> instead.
</li>
</ul>
+ <h4 id="Changesinorg.eclipse.sirius.ui">Changes in
+ <code>org.eclipse.sirius.ui</code>
+ </h4>
+ <ul>
+ <li>The method
+ <code>org.eclipse.sirius.ui.business.api.dialect.DialectUIServices.completeToolTipText(String, EObject, EStructuralFeature)</code> has been added to customize the tooltip displayed in the VSM editor by using the feature of the current object. The old method
+ <code>org.eclipse.sirius.ui.business.api.dialect.DialectUIServices.completeToolTipText(String, EObject)</code> has been deprecated.
+ </li>
+ <li>The class
+ <code>org.eclipse.sirius.ui.tools.api.properties.SiriusExtensiblePropertySource</code> has been added. It allows developers to make their properties views CellEditor customizable by using the new extension point
+ <code>org.eclipse.sirius.ui.siriuspropertiescelleditor</code>
+ </li>
+ <li>The interface
+ <code>org.eclipse.sirius.ext.emf.ui.ICellEditorProvider</code> has been added to allow clients to provide their own
+ <code>CellEditor</code> - in the Sirius semantic properties views &#8211; through the new extension point
+ <code>org.eclipse.sirius.ui.siriuspropertiescelleditor</code>.
+ </li>
+ </ul>
<h4 id="Changesinorg.eclipse.sirius.common">Changes in
<code>org.eclipse.sirius.common</code>
</h4>
@@ -200,7 +218,7 @@
<code>org.eclipse.sirius.diagram.tools.api.command.ChangeLayerActivationCommand</code> has been added. This command was previously internal.
</li>
<li>Constant
- <code>org.eclipse.sirius.diagram.business.api.helper.SiriusDiagramUtil.DIAGRAM_ENVIRONMENT_RESOURCE_URI</code> declares &#171;environment:/diagram&#187; resource uri.
+ <code>org.eclipse.sirius.diagram.business.api.helper.SiriusDiagramUtil.DIAGRAM_ENVIRONMENT_RESOURCE_URI</code> declares &#8220;environment:/diagram&#8221; resource uri.
</li>
<li>The method
<code>org.eclipse.sirius.diagram.business.api.diagramtype.IDiagramDescriptionProvider.completeToolTipText(String, EObject, EStructuralFeature)</code> has been added to customize the tooltip displayed in the VSM editor by using the feature of the current object. The old method
@@ -327,15 +345,6 @@
<code>boolean</code> that is true when the property tab item is found, false otherwise.
</li>
</ul>
- <h4 id="Changesinorg.eclipse.sirius.ui.business.api">Changes in
- <code>org.eclipse.sirius.ui.business.api</code>
- </h4>
- <ul>
- <li>The method
- <code>org.eclipse.sirius.ui.business.api.dialect.DialectUIServices.completeToolTipText(String, EObject, EStructuralFeature)</code> has been added to customize the tooltip displayed in the VSM editor by using the feature of the current object. The old method
- <code>org.eclipse.sirius.ui.business.api.dialect.DialectUIServices.completeToolTipText(String, EObject)</code> has been deprecated.
- </li>
- </ul>
<h4 id="Changesinorg.eclipse.sirius.ext.swt">Changes in
<code>org.eclipse.sirius.ext.swt</code>
</h4>
@@ -363,13 +372,13 @@
<img border="0" src="images/containerResize-changedBehavior.gif"/>
</p>
<ul>
- <li>The &#171;snap to shapes&#187; is now enabled by default (see
+ <li>The &#8220;snap to shapes&#8221; is now enabled by default (see
<em>Sirius &gt; Sirius Diagram &gt; Rulers and Grid</em> preference page). This is true only for new diagrams. The existing diagrams are not impacted.
</li>
- <li>The &#171;Navigate&#187; top-level contextual menu entry with mixed actions for creating new representations and opening existing ones has been changed by two top-level menus:
+ <li>The &#8220;Navigate&#8221; top-level contextual menu entry with mixed actions for creating new representations and opening existing ones has been changed by two top-level menus:
<ul>
- <li>One named &#171;New&#187;, which lists only the available actions to create new representations on the selected element.</li>
- <li>One named &#171;Open&#187;, which lists only the existing representations on the selected element. </li>
+ <li>One named &#8220;New&#8221;, which lists only the available actions to create new representations on the selected element.</li>
+ <li>One named &#8220;Open&#8221;, which lists only the existing representations on the selected element. </li>
</ul>
</li>
<li>When a shape is resized (no matter the direction), the edge(s) connection location (toward or from this one) is kept. Before that, edges connections moved according to the ratio of the resizing.</li>
@@ -394,19 +403,19 @@
<li>Distribute centers vertically</li>
</ul>
</li>
- <li>The end user can now remove all bend-points between the two edge ends. This action is available on edge context menu &#171;Remove Bend-points&#187; or by using the shortcut &#171;Ctrl&#187; + &#171;Shift&#187; + &#171;-&#187;.</li>
+ <li>The end user can now remove all bend-points between the two edge ends. This action is available on edge context menu &#8220;Remove Bend-points&#8221; or by using the shortcut &#8220;Ctrl&#8221; + &#8220;Shift&#8221; + &#8220;-&#8221;.</li>
<li>Reconnection of an edge will only now move the minimum necessary bendpoints instead of reseting it to default.</li>
<li>A new action has been added to reset the diagram (or container) origin: the diagram (or container) bounds (the rectangle formed by the highest, the leftmost, the lowest and the rightmost children elements) can have a negative origin or can be shifted toward the bottom-right with a blank zone at the top-left. This action aims to move all diagram (or container) elements so that the it retrieves its origin while keeping elements layout.</li>
</ul>
<h3 id="SpecifierVisibleChanges2">Specifier-Visible Changes</h3>
<ul>
- <li>The specifier can now choose to hold the edge ends toward the center of the source, target or both. New fields within the &#171;advance&#187; tab of EdgeStyle description have been added to choose for which source or target mappings an edge should be centered. See
+ <li>The specifier can now choose to hold the edge ends toward the center of the source, target or both. New fields within the &#8220;advance&#8221; tab of EdgeStyle description have been added to choose for which source or target mappings an edge should be centered. See
<a href="specifier/diagrams/Diagrams.html#edges_styles">Edges Styles &gt; Edge Centering</a> in the specifier manual for more details.
</li>
<li>When creating a new Viewpoint Specification Project using the supplied wizard:
- <em>New &gt; Viewpoint Specification Project</em>, the VSM name is now given according to the project name. If the project name is suffixed with &#171;design&#187;, the VSM name is provided by the last word before this suffix. Otherwise, the VSM name is given by the last word of the project name.
+ <em>New &gt; Viewpoint Specification Project</em>, the VSM name is now given according to the project name. If the project name is suffixed with &#8220;design&#8221;, the VSM name is provided by the last word before this suffix. Otherwise, the VSM name is given by the last word of the project name.
</li>
- <li>&#171;Lozenge&#187; is replaced by &#171;Diamond&#187; in diagram style.</li>
+ <li>&#8220;Lozenge&#8221; is replaced by &#8220;Diamond&#8221; in diagram style.</li>
</ul>
<h3 id="APIChanges2">API Changes</h3>
<h4 id="Changesinorg.eclipse.sirius2">Changes in
@@ -479,7 +488,7 @@
<code>IInterpreterRegistry</code> for each evaluation of the tool filter expressions.
</li>
</ul>
- <h4 id="Changesinorg.eclipse.sirius.ui">Changes in
+ <h4 id="Changesinorg.eclipse.sirius.ui2">Changes in
<code>org.eclipse.sirius.ui</code>
</h4>
<ul>
@@ -834,7 +843,7 @@
<h3 id="SpecifierVisibleChanges4">Specifier-Visible Changes</h3>
<ul>
<li>The default value of the
- <em>Semantic Candidates Expression</em> for Tree Items has changed from an empty string (meaning &#171;any compatible element in the session&#187;) to
+ <em>Semantic Candidates Expression</em> for Tree Items has changed from an empty string (meaning &#8220;any compatible element in the session&#8221;) to
<code>feature:eAllContents</code> which only looks for compatible candidates inside the current element (recursively). The new behavior is more efficient on large models and consistent with what happens for diagrams. The change does not affect existing VSMs which continue to work as before whatever was the expression they used. Users who want the old behavior on specific mappings can simply remove the expression in the properties view.
</li>
<li>In the
@@ -867,7 +876,7 @@
<code>org.eclipse.diagram</code> again.
</p>
<p>Unlike, the
- <a href="#separationOfDiagramSpecificConcept-step1">Step1</a>, a simple &#171;Organize Imports&#187; operation is not enough. First, you will probably need to add dependencies to
+ <a href="#separationOfDiagramSpecificConcept-step1">Step1</a>, a simple &#8220;Organize Imports&#8221; operation is not enough. First, you will probably need to add dependencies to
<code>org.eclipse.sirius.diagram</code>,
<code>org.eclipse.sirius.diagram.ui</code> or
<code>org.eclipse.sirius.editor.diagram</code> in the MANIFEST.MF of your projects that depend on Sirius diagram classes. The dependencies to add depend on what you really use.
@@ -1278,7 +1287,7 @@
<code>org.eclipse.sirius.diagram.sequence.template.Transformer</code> interface instead, which is functionally equivalent.
</li>
</ul>
- <h4 id="Changesinorg.eclipse.sirius.ui2">Changes in
+ <h4 id="Changesinorg.eclipse.sirius.ui3">Changes in
<code>org.eclipse.sirius.ui</code>
</h4>
<ul>
@@ -1294,7 +1303,7 @@
<code>Multimap</code>.
</li>
<li>
- <code>org.eclipse.sirius.ui.tools.api.project.ModelingProjectManager.initializeAfterLoad()</code> method has been removed. There is no replacement for this method documented as &#171;Not intended to be used by client&#187;.
+ <code>org.eclipse.sirius.ui.tools.api.project.ModelingProjectManager.initializeAfterLoad()</code> method has been removed. There is no replacement for this method documented as &#8220;Not intended to be used by client&#8221;.
</li>
</ul>
<h4 id="Changesinorg.eclipse.sirius.ecore.extender3">Changes in
@@ -1494,7 +1503,7 @@ if (rootPackage != null &amp;&amp; rootPackage.getNsURI().equals(DiagramPackage.
<code>new org.eclipse.sirius.business.api.query.EObjectQuery(element).getParentDiagram()</code> instead.
</li>
</ul>
- <h4 id="Changesinorg.eclipse.sirius.ui3">Changes in
+ <h4 id="Changesinorg.eclipse.sirius.ui4">Changes in
<code>org.eclipse.sirius.ui</code>
</h4>
<ul>
@@ -1538,27 +1547,27 @@ if (rootPackage != null &amp;&amp; rootPackage.getNsURI().equals(DiagramPackage.
<h2 id="sirius1.0M5">Changes in Sirius 1.0.0M5 (from Sirius 1.0M4)</h2>
<h3 id="UserVisibleChanges3">User-Visible Changes</h3>
<ul>
- <li>The table csv export has been improved to handle cropped label. In some specific cases, the cell label is automatically cropped and &#8249;...&#8250; is concatenated to the resulting value. This cropped displayed label was previously exported, now the complete semantic value is exported.</li>
+ <li>The table csv export has been improved to handle cropped label. In some specific cases, the cell label is automatically cropped and &#8216;...&#8217; is concatenated to the resulting value. This cropped displayed label was previously exported, now the complete semantic value is exported.</li>
</ul>
<h3 id="APIChanges6">API Changes</h3>
<h4 id="LibraryExtensions">Library Extensions</h4>
- <p>This milestone (Sirius 1.0M5) introduces several new plug-ins, collectively called &#171;library extensions&#187;. They are all named
+ <p>This milestone (Sirius 1.0M5) introduces several new plug-ins, collectively called &#8220;library extensions&#8221;. They are all named
<code>org.eclipse.sirius.ext.LIB</code>, where
- <code>LIB</code> is the name of a library or component Sirius depends on. These plug-ins are used to isolate generic code which extends existing libraries with features and helpers needed for Sirius, but which do not depend on Sirius themselves. A relatively large part of the code in Sirius is of this kind: things that could/should be in EMF, GMF, Eclipse itself, etc. and which are not Sirius-specific but which make it easier to build Sirius itself. Sirius 1.0M5 introduces several of these library extensions and starts to fill them with existing classes which were &#171;hidden&#187; inside Sirius and are now exposed in library extensions. Most of the time, existing code which used the Sirius API will only need to:
+ <code>LIB</code> is the name of a library or component Sirius depends on. These plug-ins are used to isolate generic code which extends existing libraries with features and helpers needed for Sirius, but which do not depend on Sirius themselves. A relatively large part of the code in Sirius is of this kind: things that could/should be in EMF, GMF, Eclipse itself, etc. and which are not Sirius-specific but which make it easier to build Sirius itself. Sirius 1.0M5 introduces several of these library extensions and starts to fill them with existing classes which were &#8220;hidden&#8221; inside Sirius and are now exposed in library extensions. Most of the time, existing code which used the Sirius API will only need to:
</p>
<ol>
<li>Add the necessary
<code>Import-Package</code> (recommended) or
<code>Require-Bundle</code> to depend on the library extension(s) where the code they use now lives;
</li>
- <li>Perform a simple &#171;Organize Imports&#187; operation, which should find the classes and interfaces in their new locations.</li>
+ <li>Perform a simple &#8220;Organize Imports&#8221; operation, which should find the classes and interfaces in their new locations.</li>
</ol>
<h4 id="separationOfDiagramSpecificConcept-step1">Move diagram-specific EClasses into a separate EPackage</h4>
<p>For historical reasons, the core Sirius metamodels defined in viewpoint.ecore contain both generic (dialect-independant like Viewpoint, RepresentationDescription, DAnalysis...) concepts and diagram-specific ones (e.g. DNode, EdgeStyle, ContainerCreationDescription...). The table and tree metamodels are more cleanly separated.
<br/>This milestone (Sirius 1.0M5) includes the first step towards a full separation of the diagram-specific stuff out of the core of Sirius. So many EClasses have been moved.
</p>
- <p>Most of the time, existing code which used these Sirius EClasses will only need to perform a simple &#171;Organize Imports&#187; operation, which should find the classes and interfaces in their new locations.
- <br/>The &#171;Organize imports&#187; is not sufficient in case of imported classes existing several time in different packages (
+ <p>Most of the time, existing code which used these Sirius EClasses will only need to perform a simple &#8220;Organize Imports&#8221; operation, which should find the classes and interfaces in their new locations.
+ <br/>The &#8220;Organize imports&#8221; is not sufficient in case of imported classes existing several time in different packages (
<code>EFactory</code> classes for example with
<code>DescriptionFactory</code>, or
<code>EPackage</code> classes for example with
@@ -1662,7 +1671,7 @@ if (rootPackage != null &amp;&amp; rootPackage.getNsURI().equals(DiagramPackage.
<code>DCellQuery.getExportableLabel()</code> to compute the cell labels used in HTML export.
</li>
</ul>
- <h4 id="Changesinorg.eclipse.sirius.ui4">Changes in
+ <h4 id="Changesinorg.eclipse.sirius.ui5">Changes in
<code>org.eclipse.sirius.ui</code>
</h4>
<ul>
@@ -1912,7 +1921,7 @@ if (rootPackage != null &amp;&amp; rootPackage.getNsURI().equals(DiagramPackage.
<code>ECrossReferenceAdapter</code> can be null.
</li>
</ul>
- <h4 id="Changesinorg.eclipse.sirius.ui5">Changes in
+ <h4 id="Changesinorg.eclipse.sirius.ui6">Changes in
<code>org.eclipse.sirius.ui</code>
</h4>
<ul>
@@ -1973,7 +1982,7 @@ if (rootPackage != null &amp;&amp; rootPackage.getNsURI().equals(DiagramPackage.
</li>
</ul>
<h2 id="sirius0.9">Changes in Sirius 0.9.0</h2>
- <p>Version 0.9.0 is the first release under the Sirius name and under the Eclipse Foundation umbrella. Except for the few cases mentioned below (in the &#171;Other API Changes&#187;, &#171;Specifier-Visible Changes&#187; and &#171;User-Visible Changes&#187; sections), Sirius 0.9.0 is functionally equivalent to the latest version of Viewpoint (version 6.10), which was the name of the project before it was open sourced at Eclipse. See the rest of the documentation for the complete list of feature of the Sirius platform.</p>
+ <p>Version 0.9.0 is the first release under the Sirius name and under the Eclipse Foundation umbrella. Except for the few cases mentioned below (in the &#8220;Other API Changes&#8221;, &#8220;Specifier-Visible Changes&#8221; and &#8220;User-Visible Changes&#8221; sections), Sirius 0.9.0 is functionally equivalent to the latest version of Viewpoint (version 6.10), which was the name of the project before it was open sourced at Eclipse. See the rest of the documentation for the complete list of feature of the Sirius platform.</p>
<h3 id="MigratingfromObeoDesignerorViewpointtoSirius">Migrating from Obeo Designer or Viewpoint to Sirius</h3>
<p>If you have existing projects which used this technology before it became Eclipse Sirius and want to migrate to Sirius, you must:</p>
<ol>
@@ -1997,9 +2006,9 @@ if (rootPackage != null &amp;&amp; rootPackage.getNsURI().equals(DiagramPackage.
<code>org.eclipse.sirius.componentization</code> extension point id. The identifier changes for the other extension points follow the same rules as the name changes of the plug-ins they are defined in.
</li>
<li>The migration of your VSMs (
- <code>*.odesign</code> files) is automatic: simply open your files once in the VSM editor, perform some no-op change to make the editor &#171;dirty&#187; and save it. The saved version will have been migrated to Sirius.
+ <code>*.odesign</code> files) is automatic: simply open your files once in the VSM editor, perform some no-op change to make the editor &#8220;dirty&#8221; and save it. The saved version will have been migrated to Sirius.
</li>
- <li>If you had Java code which used the Viewpoint APIs, you will need to update it to use the Sirius APIs. A simple &#171;Source &gt; Organize Imports&#187; on your source folders should find most classes you used in their new namespace. The Viewpoint code base and APIs used the term &#171;Viewpoint&#187; both for the name of the product and for the name of the concept. When it refered to the name of the product, the names were changed to use &#171;Sirius&#187; instead, so you may need to adjust some names in your code beyond just updating the imports (for example,
+ <li>If you had Java code which used the Viewpoint APIs, you will need to update it to use the Sirius APIs. A simple &#8220;Source &gt; Organize Imports&#8221; on your source folders should find most classes you used in their new namespace. The Viewpoint code base and APIs used the term &#8220;Viewpoint&#8221; both for the name of the product and for the name of the concept. When it refered to the name of the product, the names were changed to use &#8220;Sirius&#8221; instead, so you may need to adjust some names in your code beyond just updating the imports (for example,
<code>ViewpointControlCommand</code> is now
<code>SiriusControlCommand</code>).
</li>
@@ -2014,7 +2023,7 @@ if (rootPackage != null &amp;&amp; rootPackage.getNsURI().equals(DiagramPackage.
<h4 id="MigratingModelingProjectsandRepresentationFiles">Migrating Modeling Projects and Representation Files</h4>
<ul>
<li>First migrate any modeler definitions used by your modeling projects and representation files (see the section above).</li>
- <li>Modeling projects created using Viewpoint will not be recognized directly by Sirius, because the nature identfier has changed. You must use the &#171;Configure/Convert to Modeling Project&#187; action in the project&#8217;s context menu to make it a Sirius-compatible modeling project (see the section below for the technical details of the change).</li>
+ <li>Modeling projects created using Viewpoint will not be recognized directly by Sirius, because the nature identfier has changed. You must use the &#8220;Configure/Convert to Modeling Project&#8221; action in the project&#8217;s context menu to make it a Sirius-compatible modeling project (see the section below for the technical details of the change).</li>
<li>The migration of you representation files (
<code>*.aird</code>) is performed automatically when they are loaded in memory. It will become permanent the first time you save it (you can force this by opening a representation, making some arbitrary change and saving the session).
</li>
@@ -2190,20 +2199,20 @@ if (rootPackage != null &amp;&amp; rootPackage.getNsURI().equals(DiagramPackage.
</tr>
</table>
<h4 id="JavaPackagesandClassesNames">Java Packages and Classes Names</h4>
- <p>The Java package names have changed to start with the identifier of the plug-in they are defined in (which has changed). A simple &#171;Source &gt; Organize Imports&#187; on your source folders should find most classes you used in their new namespace.</p>
- <p>The Viewpoint code base and APIs used the term &#171;Viewpoint&#187; both for the name of the product and for the name of the concept. When it refered to the name of the product, the names where changed to use &#171;Sirius&#187; instead (for example,
+ <p>The Java package names have changed to start with the identifier of the plug-in they are defined in (which has changed). A simple &#8220;Source &gt; Organize Imports&#8221; on your source folders should find most classes you used in their new namespace.</p>
+ <p>The Viewpoint code base and APIs used the term &#8220;Viewpoint&#8221; both for the name of the product and for the name of the concept. When it refered to the name of the product, the names where changed to use &#8220;Sirius&#8221; instead (for example,
<code>ViewpointControlCommand</code> is now
<code>SiriusControlCommand</code>).
</p>
<h4 id="ModelsnamespaceURIs">Models namespace URIs</h4>
- <p>All namespace URIs have also been changed from &#171;http://www.obeo.fr/dsl/viewpoint*&#187; to &#171;http://www.eclipse.org/sirius/&#187;.</p>
+ <p>All namespace URIs have also been changed from &#8220;http://www.obeo.fr/dsl/viewpoint*&#8221; to &#8220;http://www.eclipse.org/sirius/&#8221;.</p>
<p>If you have created VSM file (.odesign) or representations file (.aird) with Viewpoint, the changes of the namespace URIs will be automatically migrated during the loading of your VSM or your representations file. These new nsURIs will be stored physically in the file during the first save. If the file is not saved, the automatic migration will be replayed at the next opening.</p>
<h3 id="NatureID">Nature ID</h3>
<p>The modeling project has a specific nature (
<code>org.eclipse.sirius.nature.modelingproject</code>).
- <br/>If you have modeling project created with Viewpoint, you must launch the action &#171;Configure/Convert to Modeling Project&#187; to replace old nature id (
+ <br/>If you have modeling project created with Viewpoint, you must launch the action &#8220;Configure/Convert to Modeling Project&#8221; to replace old nature id (
<code>fr.obeo.dsl.viewpoint.nature.modelingproject</code>) by the new one.
- <br/>If you have many modeling projects to &#171;migrate&#187;, you can easily make a script to replace
+ <br/>If you have many modeling projects to &#8220;migrate&#8221;, you can easily make a script to replace
<code>fr.obeo.dsl.viewpoint.nature.modelingproject</code> by
<code>org.eclipse.sirius.nature.modelingproject</code> in all
<code>.project</code> file of each modeling projects.
diff --git a/plugins/org.eclipse.sirius.doc/doc/Release Notes.textile b/plugins/org.eclipse.sirius.doc/doc/Release Notes.textile
index 77f6526a3d..f1360d1f98 100644
--- a/plugins/org.eclipse.sirius.doc/doc/Release Notes.textile
+++ b/plugins/org.eclipse.sirius.doc/doc/Release Notes.textile
@@ -29,6 +29,12 @@ h4. Changes in @org.eclipse.sirius@
* The @isBbocked()@ and @setBlocked()@ methods on the @org.eclipse.sirius.viewpoint.DAnalysisSessionEObject@ EClass have been removed, as they were not actually used in the internal code.
* The @org.eclipse.sirius.business.api.session.Session.createSemanticResource()@ method has been removed. Use @Session.addSemanticResource()@ instead.
+h4. Changes in @org.eclipse.sirius.ui@
+
+* The method @org.eclipse.sirius.ui.business.api.dialect.DialectUIServices.completeToolTipText(String, EObject, EStructuralFeature)@ has been added to customize the tooltip displayed in the VSM editor by using the feature of the current object. The old method @org.eclipse.sirius.ui.business.api.dialect.DialectUIServices.completeToolTipText(String, EObject)@ has been deprecated.
+* The class @org.eclipse.sirius.ui.tools.api.properties.SiriusExtensiblePropertySource@ has been added. It allows developers to make their properties views CellEditor customizable by using the new extension point @org.eclipse.sirius.ui.siriuspropertiescelleditor@
+* The interface @org.eclipse.sirius.ext.emf.ui.ICellEditorProvider@ has been added to allow clients to provide their own @CellEditor@ - in the Sirius semantic properties views - through the new extension point @org.eclipse.sirius.ui.siriuspropertiescelleditor@.
+
h4. Changes in @org.eclipse.sirius.common@
* The @org.eclipse.sirius.common.tools.api.util.SiriusCrossReferenceAdapter@ interface and the @org.eclipse.sirius.common.tools.api.util.SiriusCrossReferenceAdapterImpl@ have been added to have the capability to disable the proxy resolution. This feature is typically used to prevent loading a resource during its unloading. *Warning* : _Every additional custom CrossReferenceAdapter_ should extend @SiriusCrossReferenceAdapterImpl@ or at least implement @SiriusCrossReferenceAdapter@ with the same implementation as @SiriusCrossReferenceAdapterImpl@.
@@ -97,10 +103,6 @@ h4. Changes in @org.eclipse.sirius.tests.swtbot.support@
* The methods @org.eclipse.sirius.tests.swtbot.support.api.editor.SWTBotSiriusHelper.selectPropertyTabItem(String)@ now returns a @boolean@ that is true when the property tab item is found, false otherwise.
-h4. Changes in @org.eclipse.sirius.ui.business.api@
-
-* The method @org.eclipse.sirius.ui.business.api.dialect.DialectUIServices.completeToolTipText(String, EObject, EStructuralFeature)@ has been added to customize the tooltip displayed in the VSM editor by using the feature of the current object. The old method @org.eclipse.sirius.ui.business.api.dialect.DialectUIServices.completeToolTipText(String, EObject)@ has been deprecated.
-
h4. Changes in @org.eclipse.sirius.ext.swt@
* The @org.eclipse.sirius.ext.swt.ImageFileFormat@ class has been moved in @org.eclipse.sirius.common.tools.api.resource@ (in the @org.eclipse.sirius.common@ plugin).
diff --git a/plugins/org.eclipse.sirius.doc/doc/developer/Sirius Developer Manual.html b/plugins/org.eclipse.sirius.doc/doc/developer/Sirius Developer Manual.html
index cd6e73ba14..13c1ac9878 100644
--- a/plugins/org.eclipse.sirius.doc/doc/developer/Sirius Developer Manual.html
+++ b/plugins/org.eclipse.sirius.doc/doc/developer/Sirius Developer Manual.html
@@ -70,6 +70,11 @@
<strong>Provide custom repair participant</strong>
</a>
</li>
+ <li>
+ <a href="extensions-provide_celleditor.html">
+ <strong>Provide custom cell editor</strong>
+ </a>
+ </li>
</ul>
</li>
<li>The Sirius platform publishs a set of API, and the next sections describe some which require particular attention:
@@ -83,4 +88,4 @@
</li>
</ul>
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/plugins/org.eclipse.sirius.doc/doc/developer/Sirius Developer Manual.textile b/plugins/org.eclipse.sirius.doc/doc/developer/Sirius Developer Manual.textile
index 786027df5c..f85b3a6cd6 100644
--- a/plugins/org.eclipse.sirius.doc/doc/developer/Sirius Developer Manual.textile
+++ b/plugins/org.eclipse.sirius.doc/doc/developer/Sirius Developer Manual.textile
@@ -13,5 +13,6 @@ This document gives an overview of the internals of the _Sirius_ platform, and d
** "*Provide tab-bar extensions*":extensions-provide_tabbar_extensions.html
** "*Provide custom representation files migration*":extensions-provide_migrate_contribution.html
** "*Provide custom repair participant*":extensions-provide_repair_contribution.html
+** "*Provide custom cell editor*":extensions-provide_celleditor.html
* The Sirius platform publishs a set of API, and the next sections describe some which require particular attention:
-** "*SiriusCrossReferenceAdapter*":siriusCrossReferenceAdapter.html \ No newline at end of file
+** "*SiriusCrossReferenceAdapter*":siriusCrossReferenceAdapter.html
diff --git a/plugins/org.eclipse.sirius.doc/doc/developer/extensions-provide_celleditor.html b/plugins/org.eclipse.sirius.doc/doc/developer/extensions-provide_celleditor.html
new file mode 100644
index 0000000000..36bd293cb6
--- /dev/null
+++ b/plugins/org.eclipse.sirius.doc/doc/developer/extensions-provide_celleditor.html
@@ -0,0 +1,27 @@
+<?xml version='1.0' encoding='utf-8' ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+ <title>extensions-provide_celleditor</title>
+ <link type="text/css" rel="stylesheet" href="../resources/bootstrap.css"/>
+ <link type="text/css" rel="stylesheet" href="../resources/custom.css"/>
+ </head>
+ <body>
+ <h1 id="SiriusProvideCustomCellEditors">Sirius &#8211; Provide Custom Cell Editors</h1>
+ <h2 id="SiriusSemanticPropertiesView">Sirius Semantic Properties View</h2>
+ <p>You can override the default CellEditors in the Sirius semantic properties views by implementing
+ <code>org.eclipse.sirius.ext.emf.ui.ICellEditorProvider</code> and provide it through the
+ <code>org.eclipse.sirius.ui.siriuspropertiescelleditor</code> extension point.
+ </p>
+ <p>
+ <img border="0" src="images/propertiesView.png"/>
+ <br/>
+ <em>The semantic properties view</em>
+ </p>
+ <h2 id="OtherEditorsPropertiesView">Other Editors Properties View</h2>
+ <p>This extension mechanism can also be used for other editors properties view. That can be done by providing the
+ <code>org.eclipse.sirius.ui.tools.api.properties.SiriusExtensiblePropertySource</code> instead of the default EMF one by replacing the
+ <code>propertySourceProvider</code> in the generated editor.
+ </p>
+ </body>
+</html> \ No newline at end of file
diff --git a/plugins/org.eclipse.sirius.doc/doc/developer/extensions-provide_celleditor.textile b/plugins/org.eclipse.sirius.doc/doc/developer/extensions-provide_celleditor.textile
new file mode 100644
index 0000000000..2679324cca
--- /dev/null
+++ b/plugins/org.eclipse.sirius.doc/doc/developer/extensions-provide_celleditor.textile
@@ -0,0 +1,12 @@
+h1. Sirius - Provide Custom Cell Editors
+
+h2. Sirius Semantic Properties View
+
+You can override the default CellEditors in the Sirius semantic properties views by implementing @org.eclipse.sirius.ext.emf.ui.ICellEditorProvider@ and provide it through the @org.eclipse.sirius.ui.siriuspropertiescelleditor@ extension point.
+
+!images/propertiesView.png!
+_The semantic properties view_
+
+h2. Other Editors Properties View
+
+This extension mechanism can also be used for other editors properties view. That can be done by providing the @org.eclipse.sirius.ui.tools.api.properties.SiriusExtensiblePropertySource@ instead of the default EMF one by replacing the @propertySourceProvider@ in the generated editor. \ No newline at end of file
diff --git a/plugins/org.eclipse.sirius.doc/doc/developer/images/propertiesView.png b/plugins/org.eclipse.sirius.doc/doc/developer/images/propertiesView.png
new file mode 100644
index 0000000000..322d87957c
--- /dev/null
+++ b/plugins/org.eclipse.sirius.doc/doc/developer/images/propertiesView.png
Binary files differ
diff --git a/plugins/org.eclipse.sirius.doc/doc/toc.xml b/plugins/org.eclipse.sirius.doc/doc/toc.xml
index 1ebe5bb64d..4eb97020f9 100644
--- a/plugins/org.eclipse.sirius.doc/doc/toc.xml
+++ b/plugins/org.eclipse.sirius.doc/doc/toc.xml
@@ -145,6 +145,7 @@
<topic href="doc/developer/extensions-provide_tabbar_extensions.html" label="Provide tab-bar extensions"/>
<topic href="doc/developer/extensions-provide_migrate_contribution.html" label="Provide custom representation files migration"/>
<topic href="doc/developer/extensions-provide_repair_contribution.html" label="Provide custom repair participant"/>
+ <topic href="doc/developer/extensions-provide_celleditor.html" label="Provide custom cell editor"/>
<anchor id="moreExtensionPointsRefs"/>
</topic>
<anchor id="moreDeveloperRefs"/>
diff --git a/plugins/org.eclipse.sirius.doc/specs/proposal/451364_cellEditors/451364.html b/plugins/org.eclipse.sirius.doc/specs/proposal/451364_cellEditors/451364.html
new file mode 100644
index 0000000000..e908d7069e
--- /dev/null
+++ b/plugins/org.eclipse.sirius.doc/specs/proposal/451364_cellEditors/451364.html
@@ -0,0 +1 @@
+<?xml version='1.0' encoding='utf-8' ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head><body><h1 id="SiriusEvolutionSpecificationHavethepossibilitytocustomizepropertycelleditorsinSirius">Sirius Evolution Specification: Have the possibility to customize property cell editors in Sirius</h1><h2 id="Preamble">Preamble</h2><p><em>Summary</em>: This enhancement aims to offer the possibility to customize the default cell editors of the semantic properties view.</p><table><tr><th>Version </th><th>Status </th><th>Date </th><th>Authors </th><th>Changes </th></tr><tr><td>v0.1 </td><td>DRAFT </td><td>2015-01-27 </td><td>fbarbin </td><td>Initial version. </td></tr></table><p><em>Relevant tickets</em>:</p><ul><li><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=451364">Bug 451364 &#8211; It should be possible to customize property cell editors in Sirius </a></li></ul><h2 id="Introduction">Introduction</h2><p>It should be possible to customize property cell editors in Sirius as it is possible with a standard EMF Tree Viewer. This could allow Sirius users to provide customized cell editors with syntax coloring, completion etc.</p><h2 id="DetailedSpecification">Detailed Specification</h2><p>Currently, the properties view cell editors cannot be customized. This enhancement will offer a new extension point to customize the cell editor for a specific feature or a specific type of feature. <br/>The extension point will take a cell editor provider that will indicate if it provides a cell editor for the given IItemPropertyDescriptor. That allows the client to define a cell editor for a specific feature or set of features.</p><p><img border="0" src="properties.png"/></p><p>The customization will be available on every Sirius editors (Diagram, Table and Tree).<br/>If several providers can override a same property cellEditor, we choose the first one we met.</p><h3 id="Technicaldetails">Technical details</h3><p>The extension point will be added in a new <code>SiriusPropertyDescriptor</code>, created by a new <code>SiriusPropertySource</code>. That means other editors properties view could also be extended if the developer choose to use the <code>SiriusPropertySource</code> instead of the default EMF one (<code>PropertySource</code>)</p><h2 id="BackwardCompatibilityandMigrationPaths">Backward Compatibility and Migration Paths</h2><p>There is no migration or any compatibility issues identified with this enhancement.</p><h3 id="MetamodelChanges">Metamodel Changes</h3><p>There is no meta-model changes.</p><h3 id="APIChanges">API Changes</h3><p>A new Interface that clients should implements to provide their own cell editors will be added.</p><h3 id="UserInterfaceChanges">User Interface Changes</h3><p>There is no user interfaces changes.</p><h3 id="DocumentationChanges">Documentation Changes</h3><p>The new extension point will be documented within the developer manual.</p><h2 id="TestsandNonregressionstrategy">Tests and Non-regression strategy</h2><p>A SWTBot test will be added to check that an example of cellEditor provider is properly installed.</p><h2 id="Implementationchoicesandtradeoffs">Implementation choices and tradeoffs</h2><p>A future enhancement of this feature could be to let the user customizing the label provider too. By proving a customized image or text.</p></body></html> \ No newline at end of file
diff --git a/plugins/org.eclipse.sirius.doc/specs/proposal/451364_cellEditors/451364.textile b/plugins/org.eclipse.sirius.doc/specs/proposal/451364_cellEditors/451364.textile
new file mode 100644
index 0000000000..ccfafb821a
--- /dev/null
+++ b/plugins/org.eclipse.sirius.doc/specs/proposal/451364_cellEditors/451364.textile
@@ -0,0 +1,58 @@
+h1. Sirius Evolution Specification: Have the possibility to customize property cell editors in Sirius
+
+h2. Preamble
+
+_Summary_: This enhancement aims to offer the possibility to customize the default cell editors of the semantic properties view.
+
+|_. Version |_. Status |_. Date |_. Authors |_. Changes |
+| v0.1 | DRAFT | 2015-01-27 | fbarbin | Initial version. |
+
+_Relevant tickets_:
+* "Bug 451364 - It should be possible to customize property cell editors in Sirius ":https://bugs.eclipse.org/bugs/show_bug.cgi?id=451364
+
+h2. Introduction
+
+It should be possible to customize property cell editors in Sirius as it is possible with a standard EMF Tree Viewer. This could allow Sirius users to provide customized cell editors with syntax coloring, completion etc.
+
+h2. Detailed Specification
+
+Currently, the properties view cell editors cannot be customized. This enhancement will offer the possibility for clients to provide their own @CellEditor@.
+A new extension point will be added:
+* It will take a cell editor provider that will indicate if it provides a @CellEditor@ for a given @EObject@ and @IItemPropertyDescriptor@.
+
+!properties.png!
+
+The customization will be available on every Sirius editors (Diagram, Table and Tree).
+If several providers override a same property, we choose the first one we met.
+
+h3. Technical details
+
+The extension point will be added in a new @SiriusPropertyDescriptor@, created by a new @SiriusPropertySource@. That means other editors properties view could also be extended if the developer choose to use the @SiriusPropertySource@ instead of the default EMF one (@PropertySource@)
+
+h2. Backward Compatibility and Migration Paths
+
+There is no migration or any compatibility issues identified with this enhancement.
+
+h3. Metamodel Changes
+
+There is no meta-model changes.
+
+h3. API Changes
+
+A new Interface that clients should implements to provide their own cell editors will be added.
+
+h3. User Interface Changes
+
+There is no user interfaces changes.
+
+h3. Documentation Changes
+
+The new extension point will be documented within the developer manual.
+
+h2. Tests and Non-regression strategy
+
+A SWTBot test will be added to check that an example of cellEditor provider is properly installed.
+
+h2. Implementation choices and tradeoffs
+
+A future enhancement of this feature could be to let the user customizing the label provider too. By proving a customized image or text.
diff --git a/plugins/org.eclipse.sirius.doc/specs/proposal/451364_cellEditors/properties.png b/plugins/org.eclipse.sirius.doc/specs/proposal/451364_cellEditors/properties.png
new file mode 100644
index 0000000000..8940cf7bc3
--- /dev/null
+++ b/plugins/org.eclipse.sirius.doc/specs/proposal/451364_cellEditors/properties.png
Binary files differ
diff --git a/plugins/org.eclipse.sirius.ext.emf.ui/.settings/org.eclipse.pde.core.prefs b/plugins/org.eclipse.sirius.ext.emf.ui/.settings/org.eclipse.pde.core.prefs
index e8ff8be0ba..d40b9600d0 100644
--- a/plugins/org.eclipse.sirius.ext.emf.ui/.settings/org.eclipse.pde.core.prefs
+++ b/plugins/org.eclipse.sirius.ext.emf.ui/.settings/org.eclipse.pde.core.prefs
@@ -1,4 +1,4 @@
eclipse.preferences.version=1
pluginProject.equinox=false
-pluginProject.extensions=false
+pluginProject.extensions=true
resolve.requirebundle=false
diff --git a/plugins/org.eclipse.sirius.ext.emf.ui/META-INF/MANIFEST.MF b/plugins/org.eclipse.sirius.ext.emf.ui/META-INF/MANIFEST.MF
index a6c93b9232..cd03a01370 100644
--- a/plugins/org.eclipse.sirius.ext.emf.ui/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.sirius.ext.emf.ui/META-INF/MANIFEST.MF
@@ -1,8 +1,11 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.sirius.ext.emf.ui
+Bundle-SymbolicName: org.eclipse.sirius.ext.emf.ui;singleton:=true
Bundle-Version: 3.0.0.qualifier
Bundle-Vendor: %providerName
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-Localization: plugin
+Require-Bundle: org.eclipse.emf.edit.ui;bundle-version="2.8.0"
+Export-Package: org.eclipse.sirius.ext.emf.ui,
+ org.eclipse.sirius.ext.emf.ui.properties
diff --git a/plugins/org.eclipse.sirius.ext.emf.ui/src/org/eclipse/sirius/ext/emf/ui/ICellEditorProvider.java b/plugins/org.eclipse.sirius.ext.emf.ui/src/org/eclipse/sirius/ext/emf/ui/ICellEditorProvider.java
new file mode 100644
index 0000000000..a9ae873dc6
--- /dev/null
+++ b/plugins/org.eclipse.sirius.ext.emf.ui/src/org/eclipse/sirius/ext/emf/ui/ICellEditorProvider.java
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * Copyright (c) 2015 Obeo.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.sirius.ext.emf.ui;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.jface.viewers.CellEditor;
+import org.eclipse.swt.widgets.Composite;
+
+/**
+ * Clients that want to provide their own <code>CellEditor</code> within the
+ * Sirius semantic properties views should implement this interface. Customized
+ * <code>CellEditor</code> can also be used in other editors properties view by
+ * using the <code>ExtensiblePropertySource</code> instead of the default EMF
+ * <code>PropertySource</code>.
+ *
+ * @author Florian Barbin
+ */
+public interface ICellEditorProvider {
+
+ /**
+ * Returns whether this provider overwrites the cellEditor for the given
+ * <code>IItemPropertyDescriptor</code> for the given eObject.
+ *
+ * @param eObject
+ * the semantic eObject.
+ * @param itemPropertyDescriptor
+ * the emf item property descriptor.
+ * @return true if it provides a CellEditor, false otherwise.
+ */
+ boolean provides(EObject eObject, IItemPropertyDescriptor itemPropertyDescriptor);
+
+ /**
+ * Provides the CellEditor for the corresponding Property Descriptor.
+ *
+ * @param eObject
+ * the semantic eObject for which the properties are displayed.
+ * @param propertyDescriptor
+ * the Item Property Descriptor.
+ * @param parent
+ * the parent composite.
+ * @return the cell editor.
+ */
+ CellEditor getCellEditor(EObject eObject, IItemPropertyDescriptor propertyDescriptor, Composite parent);
+
+}
diff --git a/plugins/org.eclipse.sirius.ext.emf.ui/src/org/eclipse/sirius/ext/emf/ui/properties/CellEditorProviderCollector.java b/plugins/org.eclipse.sirius.ext.emf.ui/src/org/eclipse/sirius/ext/emf/ui/properties/CellEditorProviderCollector.java
new file mode 100644
index 0000000000..cf9534ac0c
--- /dev/null
+++ b/plugins/org.eclipse.sirius.ext.emf.ui/src/org/eclipse/sirius/ext/emf/ui/properties/CellEditorProviderCollector.java
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Copyright (c) 2015 Obeo.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.sirius.ext.emf.ui.properties;
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.sirius.ext.emf.ui.ICellEditorProvider;
+
+/**
+ * A collector provides a list of {@link ICellEditorProvider}. This interface is
+ * used by the <code>ExtensiblePropertyDescriptor</code> to retrieves (lazily)
+ * the registered {@link ICellEditorProvider}.
+ *
+ * @author Florian Barbin
+ *
+ */
+public interface CellEditorProviderCollector {
+
+ /**
+ * Returns all registered {@link ICellEditorProvider} providing a CellEditor
+ * for the given {@link EObject} and {@link IItemPropertyDescriptor} couple.
+ *
+ * @param eObject
+ * the model element for which we override one of its property
+ * cell editor.
+ * @param itemPropertyDescriptor
+ * the item property descriptor.
+ * @return a list of {@link ICellEditorProvider} providing a cellEditor.
+ */
+ List<ICellEditorProvider> getCellEditorProviders(EObject eObject, IItemPropertyDescriptor itemPropertyDescriptor);
+
+}
diff --git a/plugins/org.eclipse.sirius.ext.emf.ui/src/org/eclipse/sirius/ext/emf/ui/properties/ExtensiblePropertyDescriptor.java b/plugins/org.eclipse.sirius.ext.emf.ui/src/org/eclipse/sirius/ext/emf/ui/properties/ExtensiblePropertyDescriptor.java
new file mode 100644
index 0000000000..79d76b95d8
--- /dev/null
+++ b/plugins/org.eclipse.sirius.ext.emf.ui/src/org/eclipse/sirius/ext/emf/ui/properties/ExtensiblePropertyDescriptor.java
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Copyright (c) 2015 Obeo.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.sirius.ext.emf.ui.properties;
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.ui.provider.PropertyDescriptor;
+import org.eclipse.jface.viewers.CellEditor;
+import org.eclipse.sirius.ext.emf.ui.ICellEditorProvider;
+import org.eclipse.swt.widgets.Composite;
+
+/**
+ * The Extensible Property Descriptor allows clients to provide their own
+ * CellEditor by providing a {@link CellEditorProviderCollector}.
+ *
+ * @author Florian Barbin
+ */
+public class ExtensiblePropertyDescriptor extends PropertyDescriptor {
+
+ private CellEditorProviderCollector collector;
+
+ /**
+ * Creates a new instance of this class.
+ *
+ * @param object
+ * the semantic object.
+ * @param itemPropertyDescriptor
+ * the emf itemPropertyDescriptor
+ * @param collector
+ * the CellEditorProviderCollector used to retrieve the
+ * ICellEditorProviders
+ */
+ public ExtensiblePropertyDescriptor(Object object, IItemPropertyDescriptor itemPropertyDescriptor, CellEditorProviderCollector collector) {
+ super(object, itemPropertyDescriptor);
+ this.collector = collector;
+ }
+
+ @Override
+ public CellEditor createPropertyEditor(final Composite parent) {
+ ICellEditorProvider cellEditorProvider = getFirstCellEditorProvider();
+ if (cellEditorProvider == null) {
+ return super.createPropertyEditor(parent);
+ } else {
+ return cellEditorProvider.getCellEditor((EObject) object, itemPropertyDescriptor, parent);
+ }
+ }
+
+ private ICellEditorProvider getFirstCellEditorProvider() {
+ List<ICellEditorProvider> cellEditorProviders = collector.getCellEditorProviders((EObject) object, itemPropertyDescriptor);
+ return !cellEditorProviders.isEmpty() ? cellEditorProviders.get(0) : null;
+ }
+}
diff --git a/plugins/org.eclipse.sirius.ext.emf.ui/src/org/eclipse/sirius/ext/emf/ui/properties/ExtensiblePropertySource.java b/plugins/org.eclipse.sirius.ext.emf.ui/src/org/eclipse/sirius/ext/emf/ui/properties/ExtensiblePropertySource.java
new file mode 100644
index 0000000000..d5db3cf4b3
--- /dev/null
+++ b/plugins/org.eclipse.sirius.ext.emf.ui/src/org/eclipse/sirius/ext/emf/ui/properties/ExtensiblePropertySource.java
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * Copyright (c) 2015 Obeo.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.sirius.ext.emf.ui.properties;
+
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.ui.provider.PropertySource;
+import org.eclipse.ui.views.properties.IPropertyDescriptor;
+
+/**
+ * An Extensible Property Source that creates a
+ * {@link ExtensiblePropertyDescriptor}. This property source, allows clients to
+ * customize <code>CellEditor</code> if it's used instead of the default
+ * {@link PropertySource}.
+ *
+ * @author Florian Barbin
+ *
+ */
+public class ExtensiblePropertySource extends PropertySource {
+
+ private CellEditorProviderCollector collector;
+
+ /**
+ * Default constructor.
+ *
+ * @param object
+ * a semantic eObject.
+ * @param itemPropertySource
+ * emf property source object.
+ * @param collector
+ * the collector that will provide the list of
+ * <code>ICellEditorProvider</code>.
+ */
+ public ExtensiblePropertySource(Object object, IItemPropertySource itemPropertySource, CellEditorProviderCollector collector) {
+ super(object, itemPropertySource);
+ this.collector = collector;
+ }
+
+ @Override
+ protected IPropertyDescriptor createPropertyDescriptor(IItemPropertyDescriptor itemPropertyDescriptor) {
+ return new ExtensiblePropertyDescriptor(object, itemPropertyDescriptor, collector);
+ }
+}
diff --git a/plugins/org.eclipse.sirius.table.ui/META-INF/MANIFEST.MF b/plugins/org.eclipse.sirius.table.ui/META-INF/MANIFEST.MF
index 1a3ff399a2..88bd95b5c8 100644
--- a/plugins/org.eclipse.sirius.table.ui/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.sirius.table.ui/META-INF/MANIFEST.MF
@@ -45,4 +45,5 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="3.8.0",
Eclipse-LazyStart: true
Bundle-ActivationPolicy: lazy
Import-Package: org.eclipse.sirius.ext.base;version="2.0.0",
+ org.eclipse.sirius.ext.emf.ui.properties,
org.eclipse.sirius.ext.swt;version="2.0.0"
diff --git a/plugins/org.eclipse.sirius.table.ui/src/org/eclipse/sirius/table/ui/tools/internal/properties/section/semantic/SemanticPropertySection.java b/plugins/org.eclipse.sirius.table.ui/src/org/eclipse/sirius/table/ui/tools/internal/properties/section/semantic/SemanticPropertySection.java
index 3893349e20..de860080a4 100644
--- a/plugins/org.eclipse.sirius.table.ui/src/org/eclipse/sirius/table/ui/tools/internal/properties/section/semantic/SemanticPropertySection.java
+++ b/plugins/org.eclipse.sirius.table.ui/src/org/eclipse/sirius/table/ui/tools/internal/properties/section/semantic/SemanticPropertySection.java
@@ -23,6 +23,7 @@ import org.eclipse.sirius.table.metamodel.table.DTableElement;
import org.eclipse.sirius.table.ui.tools.internal.properties.propertysource.TableCompositeEObjectPropertySource;
import org.eclipse.sirius.table.ui.tools.internal.properties.section.common.AbstractDTablePropertySection;
import org.eclipse.sirius.ui.tools.api.properties.AbstractCompositeEObjectPropertySource;
+import org.eclipse.sirius.ui.tools.api.properties.SiriusExtensiblePropertySource;
import org.eclipse.sirius.viewpoint.DSemanticDecorator;
import org.eclipse.sirius.viewpoint.SiriusPlugin;
import org.eclipse.ui.views.properties.IPropertySource;
@@ -120,7 +121,7 @@ public class SemanticPropertySection extends AbstractDTablePropertySection {
if (af != null) {
final IItemPropertySource ips = (IItemPropertySource) af.adapt(semanticElement, IItemPropertySource.class);
if (ips != null) {
- final IPropertySource targetPropertySource = new PropertySource(semanticElement, ips);
+ final IPropertySource targetPropertySource = new SiriusExtensiblePropertySource(semanticElement, ips);
propertySource.addPropertySource(semanticElement, targetPropertySource);
}
}
diff --git a/plugins/org.eclipse.sirius.tests.swtbot/META-INF/MANIFEST.MF b/plugins/org.eclipse.sirius.tests.swtbot/META-INF/MANIFEST.MF
index 8952aeeef9..cc965da9d3 100644
--- a/plugins/org.eclipse.sirius.tests.swtbot/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.sirius.tests.swtbot/META-INF/MANIFEST.MF
@@ -67,4 +67,5 @@ Export-Package: org.eclipse.sirius.tests.swtbot,
org.eclipse.sirius.tests.swtbot.uml
Import-Package: org.eclipse.sirius.ext.base;version="1.0.0",
org.eclipse.sirius.ext.draw2d.figure;version="1.0.0",
+ org.eclipse.sirius.ext.emf.ui,
org.eclipse.sirius.ext.gmf.runtime.editparts;version="1.0.0"
diff --git a/plugins/org.eclipse.sirius.tests.swtbot/data/unit/cellEditor/cellEditor.aird b/plugins/org.eclipse.sirius.tests.swtbot/data/unit/cellEditor/cellEditor.aird
new file mode 100644
index 0000000000..9372efcf5c
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.swtbot/data/unit/cellEditor/cellEditor.aird
@@ -0,0 +1,146 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<viewpoint:DAnalysis xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:description="http://www.eclipse.org/sirius/table/description/1.1.0" xmlns:description_1="http://www.eclipse.org/sirius/description/1.1.0" xmlns:description_2="http://www.eclipse.org/sirius/diagram/description/1.1.0" xmlns:description_3="http://www.eclipse.org/sirius/tree/description/1.0.0" xmlns:diagram="http://www.eclipse.org/sirius/diagram/1.1.0" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:style="http://www.eclipse.org/sirius/diagram/description/style/1.1.0" xmlns:table="http://www.eclipse.org/sirius/table/1.1.0" xmlns:tree="http://www.eclipse.org/sirius/tree/1.0.0" xmlns:viewpoint="http://www.eclipse.org/sirius/1.1.0" xsi:schemaLocation="http://www.eclipse.org/sirius/table/description/1.1.0 http://www.eclipse.org/sirius/table/1.1.0#//description http://www.eclipse.org/sirius/description/1.1.0 http://www.eclipse.org/sirius/1.1.0#//description http://www.eclipse.org/sirius/diagram/description/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description http://www.eclipse.org/sirius/tree/description/1.0.0 http://www.eclipse.org/sirius/tree/1.0.0#//description http://www.eclipse.org/sirius/diagram/description/style/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description/style" xmi:id="_ZyUjMKrkEeSgN9e5vHfJpw" selectedViews="_aTevgKrkEeSgN9e5vHfJpw" version="10.0.0.201412231738">
+ <models xmi:type="ecore:EPackage" href="cellEditor.ecore#/"/>
+ <ownedViews xmi:type="viewpoint:DRepresentationContainer" xmi:id="_aTevgKrkEeSgN9e5vHfJpw" initialized="true">
+ <ownedRepresentations xmi:type="table:DTable" xmi:id="_bMvSwKrkEeSgN9e5vHfJpw" name="new Table" headerColumnWidth="144">
+ <target xmi:type="ecore:EPackage" href="cellEditor.ecore#/"/>
+ <lines xmi:type="table:DLine" xmi:id="_bMvSwarkEeSgN9e5vHfJpw" label="NewEClass1">
+ <target xmi:type="ecore:EClass" href="cellEditor.ecore#//NewEClass1"/>
+ <semanticElements xmi:type="ecore:EClass" href="cellEditor.ecore#//NewEClass1"/>
+ <originMapping xmi:type="description:LineMapping" href="cellEditor.odesign#//@ownedViewpoints[name='cellEditor']/@ownedRepresentations[name='Table']/@ownedLineMappings[name='EClass']"/>
+ <cells xmi:type="table:DCell" xmi:id="_bMvSwqrkEeSgN9e5vHfJpw" label="NewEClass1" column="_bMvSx6rkEeSgN9e5vHfJpw">
+ <target xmi:type="ecore:EClass" href="cellEditor.ecore#//NewEClass1"/>
+ <semanticElements xmi:type="ecore:EClass" href="cellEditor.ecore#//NewEClass1"/>
+ </cells>
+ </lines>
+ <lines xmi:type="table:DLine" xmi:id="_bMvSw6rkEeSgN9e5vHfJpw" label="NewEClass2">
+ <target xmi:type="ecore:EClass" href="cellEditor.ecore#//NewEClass2"/>
+ <semanticElements xmi:type="ecore:EClass" href="cellEditor.ecore#//NewEClass2"/>
+ <originMapping xmi:type="description:LineMapping" href="cellEditor.odesign#//@ownedViewpoints[name='cellEditor']/@ownedRepresentations[name='Table']/@ownedLineMappings[name='EClass']"/>
+ <cells xmi:type="table:DCell" xmi:id="_bMvSxKrkEeSgN9e5vHfJpw" label="NewEClass2" column="_bMvSx6rkEeSgN9e5vHfJpw">
+ <target xmi:type="ecore:EClass" href="cellEditor.ecore#//NewEClass2"/>
+ <semanticElements xmi:type="ecore:EClass" href="cellEditor.ecore#//NewEClass2"/>
+ </cells>
+ </lines>
+ <lines xmi:type="table:DLine" xmi:id="_bMvSxarkEeSgN9e5vHfJpw" label="NewEClass3">
+ <target xmi:type="ecore:EClass" href="cellEditor.ecore#//NewEClass3"/>
+ <semanticElements xmi:type="ecore:EClass" href="cellEditor.ecore#//NewEClass3"/>
+ <originMapping xmi:type="description:LineMapping" href="cellEditor.odesign#//@ownedViewpoints[name='cellEditor']/@ownedRepresentations[name='Table']/@ownedLineMappings[name='EClass']"/>
+ <cells xmi:type="table:DCell" xmi:id="_bMvSxqrkEeSgN9e5vHfJpw" label="NewEClass3" column="_bMvSx6rkEeSgN9e5vHfJpw">
+ <target xmi:type="ecore:EClass" href="cellEditor.ecore#//NewEClass3"/>
+ <semanticElements xmi:type="ecore:EClass" href="cellEditor.ecore#//NewEClass3"/>
+ </cells>
+ </lines>
+ <columns xmi:type="table:DFeatureColumn" xmi:id="_bMvSx6rkEeSgN9e5vHfJpw" cells="_bMvSwqrkEeSgN9e5vHfJpw _bMvSxKrkEeSgN9e5vHfJpw _bMvSxqrkEeSgN9e5vHfJpw" featureName="name">
+ <originMapping xmi:type="description:FeatureColumnMapping" href="cellEditor.odesign#//@ownedViewpoints[name='cellEditor']/@ownedRepresentations[name='Table']/@ownedColumnMappings[name='name']"/>
+ </columns>
+ <description xmi:type="description:EditionTableDescription" href="cellEditor.odesign#//@ownedViewpoints[name='cellEditor']/@ownedRepresentations[name='Table']"/>
+ </ownedRepresentations>
+ <ownedRepresentations xmi:type="diagram:DSemanticDiagram" xmi:id="_jOY1AKrkEeSgN9e5vHfJpw" name="new Diagram">
+ <ownedAnnotationEntries xmi:type="description_1:AnnotationEntry" xmi:id="_jOaDIKrkEeSgN9e5vHfJpw" source="GMF_DIAGRAMS">
+ <data xmi:type="notation:Diagram" xmi:id="_jOaDIarkEeSgN9e5vHfJpw" type="Sirius" element="_jOY1AKrkEeSgN9e5vHfJpw" measurementUnit="Pixel">
+ <children xmi:type="notation:Node" xmi:id="_jOgJwKrkEeSgN9e5vHfJpw" type="2002" element="_jOY1AarkEeSgN9e5vHfJpw">
+ <children xmi:type="notation:Node" xmi:id="_jOhX4KrkEeSgN9e5vHfJpw" type="5006"/>
+ <children xmi:type="notation:Node" xmi:id="_jOimAKrkEeSgN9e5vHfJpw" type="7001">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_jOimAarkEeSgN9e5vHfJpw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_jOimAqrkEeSgN9e5vHfJpw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_jOgJwarkEeSgN9e5vHfJpw" fontName="Cantarell" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_jOgJwqrkEeSgN9e5vHfJpw"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_jOjNEKrkEeSgN9e5vHfJpw" type="2002" element="_jOY1B6rkEeSgN9e5vHfJpw">
+ <children xmi:type="notation:Node" xmi:id="_jOj0IKrkEeSgN9e5vHfJpw" type="5006"/>
+ <children xmi:type="notation:Node" xmi:id="_jOkbMKrkEeSgN9e5vHfJpw" type="7001">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_jOkbMarkEeSgN9e5vHfJpw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_jOkbMqrkEeSgN9e5vHfJpw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_jOjNEarkEeSgN9e5vHfJpw" fontName="Cantarell" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_jOjNEqrkEeSgN9e5vHfJpw" x="216"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_jOmQYKrkEeSgN9e5vHfJpw" type="2002" element="_jOY1DarkEeSgN9e5vHfJpw">
+ <children xmi:type="notation:Node" xmi:id="_jOnegKrkEeSgN9e5vHfJpw" type="5006"/>
+ <children xmi:type="notation:Node" xmi:id="_jOoFkKrkEeSgN9e5vHfJpw" type="7001">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_jOoFkarkEeSgN9e5vHfJpw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_jOoFkqrkEeSgN9e5vHfJpw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_jOmQYarkEeSgN9e5vHfJpw" fontName="Cantarell" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_jOmQYqrkEeSgN9e5vHfJpw" x="420"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_jOaDIqrkEeSgN9e5vHfJpw"/>
+ </data>
+ </ownedAnnotationEntries>
+ <ownedDiagramElements xmi:type="diagram:DNodeContainer" xmi:id="_jOY1AarkEeSgN9e5vHfJpw" name="NewEClass1">
+ <target xmi:type="ecore:EClass" href="cellEditor.ecore#//NewEClass1"/>
+ <semanticElements xmi:type="ecore:EClass" href="cellEditor.ecore#//NewEClass1"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="_jOY1AqrkEeSgN9e5vHfJpw">
+ <labelColor xmi:type="viewpoint:RGBValues" xmi:id="_jOY1A6rkEeSgN9e5vHfJpw"/>
+ <description xmi:type="style:FlatContainerStyleDescription" href="cellEditor.odesign#//@ownedViewpoints[name='cellEditor']/@ownedRepresentations[name='Diagram']/@defaultLayer/@containerMappings[name='EClass']/@style"/>
+ <borderColor xmi:type="viewpoint:RGBValues" xmi:id="_jOY1BKrkEeSgN9e5vHfJpw"/>
+ <backgroundColor xmi:type="viewpoint:RGBValues" xmi:id="_jOY1BarkEeSgN9e5vHfJpw" red="255" green="255" blue="255"/>
+ <foregroundColor xmi:type="viewpoint:RGBValues" xmi:id="_jOY1BqrkEeSgN9e5vHfJpw" red="209" green="209" blue="209"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_2:ContainerMapping" href="cellEditor.odesign#//@ownedViewpoints[name='cellEditor']/@ownedRepresentations[name='Diagram']/@defaultLayer/@containerMappings[name='EClass']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNodeContainer" xmi:id="_jOY1B6rkEeSgN9e5vHfJpw" name="NewEClass2">
+ <target xmi:type="ecore:EClass" href="cellEditor.ecore#//NewEClass2"/>
+ <semanticElements xmi:type="ecore:EClass" href="cellEditor.ecore#//NewEClass2"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="_jOY1CKrkEeSgN9e5vHfJpw">
+ <labelColor xmi:type="viewpoint:RGBValues" xmi:id="_jOY1CarkEeSgN9e5vHfJpw"/>
+ <description xmi:type="style:FlatContainerStyleDescription" href="cellEditor.odesign#//@ownedViewpoints[name='cellEditor']/@ownedRepresentations[name='Diagram']/@defaultLayer/@containerMappings[name='EClass']/@style"/>
+ <borderColor xmi:type="viewpoint:RGBValues" xmi:id="_jOY1CqrkEeSgN9e5vHfJpw"/>
+ <backgroundColor xmi:type="viewpoint:RGBValues" xmi:id="_jOY1C6rkEeSgN9e5vHfJpw" red="255" green="255" blue="255"/>
+ <foregroundColor xmi:type="viewpoint:RGBValues" xmi:id="_jOY1DKrkEeSgN9e5vHfJpw" red="209" green="209" blue="209"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_2:ContainerMapping" href="cellEditor.odesign#//@ownedViewpoints[name='cellEditor']/@ownedRepresentations[name='Diagram']/@defaultLayer/@containerMappings[name='EClass']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNodeContainer" xmi:id="_jOY1DarkEeSgN9e5vHfJpw" name="NewEClass3">
+ <target xmi:type="ecore:EClass" href="cellEditor.ecore#//NewEClass3"/>
+ <semanticElements xmi:type="ecore:EClass" href="cellEditor.ecore#//NewEClass3"/>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="_jOY1DqrkEeSgN9e5vHfJpw">
+ <labelColor xmi:type="viewpoint:RGBValues" xmi:id="_jOY1D6rkEeSgN9e5vHfJpw"/>
+ <description xmi:type="style:FlatContainerStyleDescription" href="cellEditor.odesign#//@ownedViewpoints[name='cellEditor']/@ownedRepresentations[name='Diagram']/@defaultLayer/@containerMappings[name='EClass']/@style"/>
+ <borderColor xmi:type="viewpoint:RGBValues" xmi:id="_jOY1EKrkEeSgN9e5vHfJpw"/>
+ <backgroundColor xmi:type="viewpoint:RGBValues" xmi:id="_jOY1EarkEeSgN9e5vHfJpw" red="255" green="255" blue="255"/>
+ <foregroundColor xmi:type="viewpoint:RGBValues" xmi:id="_jOY1EqrkEeSgN9e5vHfJpw" red="209" green="209" blue="209"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_2:ContainerMapping" href="cellEditor.odesign#//@ownedViewpoints[name='cellEditor']/@ownedRepresentations[name='Diagram']/@defaultLayer/@containerMappings[name='EClass']"/>
+ </ownedDiagramElements>
+ <description xmi:type="description_2:DiagramDescription" href="cellEditor.odesign#//@ownedViewpoints[name='cellEditor']/@ownedRepresentations[name='Diagram']"/>
+ <filterVariableHistory xmi:type="diagram:FilterVariableHistory" xmi:id="_jOY1E6rkEeSgN9e5vHfJpw"/>
+ <activatedLayers xmi:type="description_2:Layer" href="cellEditor.odesign#//@ownedViewpoints[name='cellEditor']/@ownedRepresentations[name='Diagram']/@defaultLayer"/>
+ <target xmi:type="ecore:EPackage" href="cellEditor.ecore#/"/>
+ </ownedRepresentations>
+ <ownedRepresentations xmi:type="tree:DTree" xmi:id="_ppsrkKrkEeSgN9e5vHfJpw" name="new Tree">
+ <target xmi:type="ecore:EPackage" href="cellEditor.ecore#/"/>
+ <ownedTreeItems xmi:type="tree:DTreeItem" xmi:id="_pptSoKrkEeSgN9e5vHfJpw" name="NewEClass1">
+ <target xmi:type="ecore:EClass" href="cellEditor.ecore#//NewEClass1"/>
+ <semanticElements xmi:type="ecore:EClass" href="cellEditor.ecore#//NewEClass1"/>
+ <ownedStyle xmi:type="tree:TreeItemStyle" xmi:id="_pptSoarkEeSgN9e5vHfJpw">
+ <labelColor xmi:type="viewpoint:RGBValues" xmi:id="_pptSoqrkEeSgN9e5vHfJpw"/>
+ <backgroundColor xmi:type="viewpoint:RGBValues" xmi:id="_pptSo6rkEeSgN9e5vHfJpw" red="255" green="255" blue="255"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_3:TreeItemMapping" href="cellEditor.odesign#//@ownedViewpoints[name='cellEditor']/@ownedRepresentations[name='Tree']/@subItemMappings[name='EClass']"/>
+ </ownedTreeItems>
+ <ownedTreeItems xmi:type="tree:DTreeItem" xmi:id="_pptSpKrkEeSgN9e5vHfJpw" name="NewEClass2">
+ <target xmi:type="ecore:EClass" href="cellEditor.ecore#//NewEClass2"/>
+ <semanticElements xmi:type="ecore:EClass" href="cellEditor.ecore#//NewEClass2"/>
+ <ownedStyle xmi:type="tree:TreeItemStyle" xmi:id="_pptSparkEeSgN9e5vHfJpw">
+ <labelColor xmi:type="viewpoint:RGBValues" xmi:id="_pptSpqrkEeSgN9e5vHfJpw"/>
+ <backgroundColor xmi:type="viewpoint:RGBValues" xmi:id="_pptSp6rkEeSgN9e5vHfJpw" red="255" green="255" blue="255"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_3:TreeItemMapping" href="cellEditor.odesign#//@ownedViewpoints[name='cellEditor']/@ownedRepresentations[name='Tree']/@subItemMappings[name='EClass']"/>
+ </ownedTreeItems>
+ <ownedTreeItems xmi:type="tree:DTreeItem" xmi:id="_pptSqKrkEeSgN9e5vHfJpw" name="NewEClass3">
+ <target xmi:type="ecore:EClass" href="cellEditor.ecore#//NewEClass3"/>
+ <semanticElements xmi:type="ecore:EClass" href="cellEditor.ecore#//NewEClass3"/>
+ <ownedStyle xmi:type="tree:TreeItemStyle" xmi:id="_pptSqarkEeSgN9e5vHfJpw">
+ <labelColor xmi:type="viewpoint:RGBValues" xmi:id="_pptSqqrkEeSgN9e5vHfJpw"/>
+ <backgroundColor xmi:type="viewpoint:RGBValues" xmi:id="_pptSq6rkEeSgN9e5vHfJpw" red="255" green="255" blue="255"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_3:TreeItemMapping" href="cellEditor.odesign#//@ownedViewpoints[name='cellEditor']/@ownedRepresentations[name='Tree']/@subItemMappings[name='EClass']"/>
+ </ownedTreeItems>
+ <description xmi:type="description_3:TreeDescription" href="cellEditor.odesign#//@ownedViewpoints[name='cellEditor']/@ownedRepresentations[name='Tree']"/>
+ </ownedRepresentations>
+ <viewpoint xmi:type="description_1:Viewpoint" href="cellEditor.odesign#//@ownedViewpoints[name='cellEditor']"/>
+ </ownedViews>
+</viewpoint:DAnalysis>
diff --git a/plugins/org.eclipse.sirius.tests.swtbot/data/unit/cellEditor/cellEditor.ecore b/plugins/org.eclipse.sirius.tests.swtbot/data/unit/cellEditor/cellEditor.ecore
new file mode 100644
index 0000000000..66f6a52643
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.swtbot/data/unit/cellEditor/cellEditor.ecore
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="" nsPrefix="">
+ <eClassifiers xsi:type="ecore:EClass" name="NewEClass1">
+ <eOperations name="newOperation1"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="newAttribute"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="NewEClass2">
+ <eOperations name="newOperation1"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="NewEClass3">
+ <eOperations name="newOperation1"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="newAttribute"/>
+ </eClassifiers>
+</ecore:EPackage>
diff --git a/plugins/org.eclipse.sirius.tests.swtbot/data/unit/cellEditor/cellEditor.odesign b/plugins/org.eclipse.sirius.tests.swtbot/data/unit/cellEditor/cellEditor.odesign
new file mode 100644
index 0000000000..19e71bf3a8
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.swtbot/data/unit/cellEditor/cellEditor.odesign
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<description:Group xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:description="http://www.eclipse.org/sirius/description/1.1.0" xmlns:description_1="http://www.eclipse.org/sirius/table/description/1.1.0" xmlns:description_2="http://www.eclipse.org/sirius/diagram/description/1.1.0" xmlns:description_3="http://www.eclipse.org/sirius/tree/description/1.0.0" xmlns:style="http://www.eclipse.org/sirius/diagram/description/style/1.1.0" name="cellEditor" version="10.0.0.201411061000">
+ <ownedViewpoints name="cellEditor">
+ <ownedRepresentations xsi:type="description_1:EditionTableDescription" name="Table" domainClass="EPackage">
+ <ownedLineMappings name="EClass" domainClass="EClass"/>
+ <ownedColumnMappings name="name" featureName="name"/>
+ </ownedRepresentations>
+ <ownedRepresentations xsi:type="description_2:DiagramDescription" name="Diagram" domainClass="EPackage">
+ <defaultLayer name="Default">
+ <containerMappings name="EClass" domainClass="EClass">
+ <style xsi:type="style:FlatContainerStyleDescription">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <backgroundColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='white']"/>
+ <foregroundColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='light_gray']"/>
+ </style>
+ </containerMappings>
+ </defaultLayer>
+ </ownedRepresentations>
+ <ownedRepresentations xsi:type="description_3:TreeDescription" name="Tree" domainClass="EPackage">
+ <subItemMappings name="EClass" domainClass="EClass" semanticCandidatesExpression="feature:eAllContents">
+ <defaultStyle>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <backgroundColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='white']"/>
+ </defaultStyle>
+ </subItemMappings>
+ </ownedRepresentations>
+ </ownedViewpoints>
+</description:Group>
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
new file mode 100644
index 0000000000..eea42c8cd2
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/celleditor/CellEditorExtensionTest.java
@@ -0,0 +1,156 @@
+/*******************************************************************************
+ * Copyright (c) 2015 Obeo.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.sirius.tests.swtbot.celleditor;
+
+import java.io.ByteArrayInputStream;
+
+import org.eclipse.core.internal.registry.ExtensionRegistry;
+import org.eclipse.core.runtime.ContributorFactoryOSGi;
+import org.eclipse.core.runtime.IContributor;
+import org.eclipse.core.runtime.IExtension;
+import org.eclipse.core.runtime.IExtensionRegistry;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.ui.edit.api.part.AbstractDiagramContainerEditPart;
+import org.eclipse.sirius.table.metamodel.table.DTable;
+import org.eclipse.sirius.tests.swtbot.Activator;
+import org.eclipse.sirius.tests.swtbot.support.api.AbstractSiriusSwtBotGefTestCase;
+import org.eclipse.sirius.tests.swtbot.support.api.business.UIResource;
+import org.eclipse.sirius.tests.swtbot.support.api.editor.SWTBotSiriusDiagramEditor;
+import org.eclipse.sirius.tests.swtbot.support.api.editor.SWTBotSiriusHelper;
+import org.eclipse.sirius.tests.swtbot.support.utils.SWTBotUtils;
+import org.eclipse.sirius.tree.DTree;
+import org.eclipse.sirius.ui.tools.internal.properties.SiriusCellEditorProviderCollector;
+import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEditor;
+import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;
+import org.eclipse.swtbot.eclipse.gef.finder.widgets.SWTBotGefEditPart;
+import org.eclipse.swtbot.swt.finder.SWTBot;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotText;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
+
+/**
+ * Test case to check properties CellEditor extensibility. See
+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=451364
+ *
+ * @author Florian Barbin
+ */
+public class CellEditorExtensionTest extends AbstractSiriusSwtBotGefTestCase {
+
+ private static final String PATH = "/data/unit/cellEditor/";
+
+ private static final String SEMANTIC_MODEL = "cellEditor.ecore";
+
+ private static final String REPRESENTATION_MODEL = "cellEditor.aird";
+
+ private static final String MODELER = "cellEditor.odesign";
+
+ private static final String REPRESENTATION_DESCRIPTION_DIAGRAM = "Diagram";
+
+ private static final String REPRESENTATION_DESCRIPTION_TREE = "Tree";
+
+ private static final String REPRESENTATION_DESCRIPTION_TABLE = "Table";
+
+ private static final String PROPERTIES = "Properties";
+
+ private SWTBotEditor table;
+
+ private SWTBotEditor tree;
+
+ private static final String PLUGIN_XML = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><?eclipse version=\"3.4\"?><plugin><extension id=\"customCellEditor\" point=\""
+ + SiriusCellEditorProviderCollector.EXTENSION_POINT_ID + "\"> <provider class=\"org.eclipse.sirius.tests.swtbot.celleditor.CustomCellEditor\"> </provider> </extension></plugin>";
+
+ @Override
+ protected void onSetUpBeforeClosingWelcomePage() throws Exception {
+ copyFileToTestProject(Activator.PLUGIN_ID, PATH, SEMANTIC_MODEL, REPRESENTATION_MODEL, MODELER);
+ }
+
+ @Override
+ protected void onSetUpAfterOpeningDesignerPerspective() throws Exception {
+ sessionAirdResource = new UIResource(designerProject, "/", REPRESENTATION_MODEL);
+ localSession = designerPerspective.openSessionFromFile(sessionAirdResource);
+ registerExtension();
+ }
+
+ /**
+ * Tests the semantic properties with diagram editor.
+ */
+ public void testCellEditorOnDiagram() {
+ editor = (SWTBotSiriusDiagramEditor) openRepresentation(localSession.getOpenedSession(), REPRESENTATION_DESCRIPTION_DIAGRAM, "new " + REPRESENTATION_DESCRIPTION_DIAGRAM, DDiagram.class);
+ SWTBotUtils.waitAllUiEvents();
+ SWTBotGefEditPart botGefEditPart = editor.getEditPart("NewEClass1", AbstractDiagramContainerEditPart.class);
+ botGefEditPart.click();
+ SWTBotUtils.waitAllUiEvents();
+ checkCellEditorValue();
+ }
+
+ /**
+ * Tests the semantic properties with tree editor.
+ */
+ public void testCellEditorOnTree() {
+ tree = openRepresentation(localSession.getOpenedSession(), REPRESENTATION_DESCRIPTION_TREE, "new " + REPRESENTATION_DESCRIPTION_TREE, DTree.class);
+ SWTBotUtils.waitAllUiEvents();
+ SWTBot swtBot = tree.bot();
+ swtBot.tree().getTreeItem("NewEClass1").select();
+ SWTBotUtils.waitAllUiEvents();
+ checkCellEditorValue();
+ }
+
+ /**
+ * Tests the semantic properties with table editor.
+ */
+ public void testCellEditorOnTable() {
+ table = openRepresentation(localSession.getOpenedSession(), REPRESENTATION_DESCRIPTION_TABLE, "new " + REPRESENTATION_DESCRIPTION_TABLE, DTable.class);
+ SWTBotUtils.waitAllUiEvents();
+ SWTBot swtBot = table.bot();
+ swtBot.tree().getTreeItem("NewEClass1").select();
+ SWTBotUtils.waitAllUiEvents();
+ checkCellEditorValue();
+ }
+
+ private void checkCellEditorValue() {
+ SWTBotView propertiesBot = bot.viewByTitle(PROPERTIES);
+ propertiesBot.setFocus();
+ SWTBotSiriusHelper.selectPropertyTabItem("Semantic");
+ SWTBotTree tree = propertiesBot.bot().tree();
+ tree.expandNode("NewEClass1").select().getNode("Name").click();
+ SWTBotText text = propertiesBot.bot().text();
+ String result = text.getText();
+ assertEquals("The class name field should be customized", "NewEClass1custom", result);
+ }
+
+ /**
+ * Installs dynamically an extension that adds "custom" at the end of the
+ * value of the "name" field CellEditor.
+ */
+ private void registerExtension() {
+ IExtensionRegistry extensionRegistry = Platform.getExtensionRegistry();
+ IContributor contributor = ContributorFactoryOSGi.createContributor(Activator.getDefault().getBundle());
+ extensionRegistry.addContribution(new ByteArrayInputStream(PLUGIN_XML.getBytes()), contributor, false, null, null, ((ExtensionRegistry) extensionRegistry).getTemporaryUserToken());
+ }
+
+ /**
+ * Remove the installed extension.
+ */
+ private void removeExtension() {
+ IExtensionRegistry extensionRegistry = Platform.getExtensionRegistry();
+ IExtension extension = extensionRegistry.getExtension(SiriusCellEditorProviderCollector.EXTENSION_POINT_ID, Activator.PLUGIN_ID + ".customCellEditor");
+ extensionRegistry.removeExtension(extension, ((ExtensionRegistry) extensionRegistry).getTemporaryUserToken());
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ tree = null;
+ table = null;
+ removeExtension();
+ super.tearDown();
+ }
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/celleditor/CustomCellEditor.java b/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/celleditor/CustomCellEditor.java
new file mode 100644
index 0000000000..bb4c3c89a3
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/celleditor/CustomCellEditor.java
@@ -0,0 +1,40 @@
+/**
+ *
+ */
+package org.eclipse.sirius.tests.swtbot.celleditor;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EcorePackage;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.jface.viewers.CellEditor;
+import org.eclipse.jface.viewers.TextCellEditor;
+import org.eclipse.sirius.ext.emf.ui.ICellEditorProvider;
+import org.eclipse.swt.widgets.Composite;
+
+/**
+ * ICellEditorProvider implementation for the SWTBot test.
+ *
+ * @author fbarbin
+ */
+public class CustomCellEditor implements ICellEditorProvider {
+
+ @Override
+ public boolean provides(EObject eObject, IItemPropertyDescriptor itemPropertyDescriptor) {
+ Object feature = itemPropertyDescriptor.getFeature(eObject);
+ if (feature == EcorePackage.eINSTANCE.getENamedElement_Name()) {
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ public CellEditor getCellEditor(EObject eObject, IItemPropertyDescriptor propertyDescriptor, Composite parent) {
+ TextCellEditor cellEditor = new TextCellEditor(parent) {
+ protected void doSetValue(Object value) {
+ super.doSetValue(value + "custom");
+ };
+ };
+ return cellEditor;
+ }
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/suite/AllTestSuite.java b/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/suite/AllTestSuite.java
index 828d729414..048f303d07 100644
--- a/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/suite/AllTestSuite.java
+++ b/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/suite/AllTestSuite.java
@@ -20,6 +20,7 @@ import org.eclipse.emf.common.util.WrappedException;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
import org.eclipse.sirius.tests.swtbot.*;
+import org.eclipse.sirius.tests.swtbot.celleditor.CellEditorExtensionTest;
import org.eclipse.sirius.tests.swtbot.clipboard.CustomClipboardSupportTest;
import org.eclipse.sirius.tests.swtbot.clipboard.DisabledSiriusClipboardSupportTest;
import org.eclipse.sirius.tests.swtbot.clipboard.GenericClipboardSupportTest;
@@ -128,6 +129,7 @@ public class AllTestSuite extends TestCase {
suite.addTestSuite(CustomClipboardSupportTest.class);
suite.addTestSuite(KeyboardDeletionFromLabelTests.class);
suite.addTestSuite(DragAndDropDifferentElementsTest.class);
+ suite.addTestSuite(CellEditorExtensionTest.class);
}
/**
diff --git a/plugins/org.eclipse.sirius.tree.ui/META-INF/MANIFEST.MF b/plugins/org.eclipse.sirius.tree.ui/META-INF/MANIFEST.MF
index d0b7447152..cb6b9c4de5 100644
--- a/plugins/org.eclipse.sirius.tree.ui/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.sirius.tree.ui/META-INF/MANIFEST.MF
@@ -40,4 +40,5 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="3.8.0",
org.eclipse.sirius.common.ui;bundle-version="2.0.0"
Eclipse-LazyStart: true
Bundle-ActivationPolicy: lazy
-Import-Package: org.eclipse.sirius.ext.base;version="2.0.0"
+Import-Package: org.eclipse.sirius.ext.base;version="2.0.0",
+ org.eclipse.sirius.ext.emf.ui.properties
diff --git a/plugins/org.eclipse.sirius.tree.ui/src/org/eclipse/sirius/tree/ui/properties/section/semantic/SemanticPropertySection.java b/plugins/org.eclipse.sirius.tree.ui/src/org/eclipse/sirius/tree/ui/properties/section/semantic/SemanticPropertySection.java
index 214719fe88..2cefd7fe3a 100644
--- a/plugins/org.eclipse.sirius.tree.ui/src/org/eclipse/sirius/tree/ui/properties/section/semantic/SemanticPropertySection.java
+++ b/plugins/org.eclipse.sirius.tree.ui/src/org/eclipse/sirius/tree/ui/properties/section/semantic/SemanticPropertySection.java
@@ -24,6 +24,7 @@ import org.eclipse.sirius.tree.ui.properties.propertysource.TreeCompositeEObject
import org.eclipse.sirius.tree.ui.properties.section.common.AbstractDTreePropertySection;
import org.eclipse.sirius.ui.tools.api.properties.AbstractCompositeEObjectPropertySource;
import org.eclipse.sirius.ui.tools.api.properties.AbstractEObjectPropertySource;
+import org.eclipse.sirius.ui.tools.api.properties.SiriusExtensiblePropertySource;
import org.eclipse.sirius.viewpoint.DSemanticDecorator;
import org.eclipse.sirius.viewpoint.SiriusPlugin;
import org.eclipse.ui.views.properties.IPropertySource;
@@ -119,7 +120,7 @@ public class SemanticPropertySection extends AbstractDTreePropertySection {
if (af != null) {
final IItemPropertySource ips = (IItemPropertySource) af.adapt(semanticElement, IItemPropertySource.class);
if (ips != null) {
- final IPropertySource targetPropertySource = new PropertySource(semanticElement, ips);
+ final IPropertySource targetPropertySource = new SiriusExtensiblePropertySource(semanticElement, ips);
propertySource.addPropertySource(semanticElement, targetPropertySource);
}
}
diff --git a/plugins/org.eclipse.sirius.ui/META-INF/MANIFEST.MF b/plugins/org.eclipse.sirius.ui/META-INF/MANIFEST.MF
index 17d7981ef3..62cd24993c 100644
--- a/plugins/org.eclipse.sirius.ui/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.sirius.ui/META-INF/MANIFEST.MF
@@ -67,6 +67,7 @@ Export-Package: org.eclipse.sirius.description.contribution.provider;version="2.
org.eclipse.sirius.ui.tools.internal.operations;x-internal:=true;version="2.0.3",
org.eclipse.sirius.ui.tools.internal.perspectives;x-internal:=true;version="2.0.3",
org.eclipse.sirius.ui.tools.internal.preference;x-internal:=true;version="2.0.3",
+ org.eclipse.sirius.ui.tools.internal.properties;x-internal:=true;version="2.0.3",
org.eclipse.sirius.ui.tools.internal.util;x-internal:=true;version="2.0.3",
org.eclipse.sirius.ui.tools.internal.views;x-internal:=true;version="2.0.3",
org.eclipse.sirius.ui.tools.internal.views.common;x-internal:=true;version="2.0.3",
@@ -117,4 +118,6 @@ Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
Import-Package: org.eclipse.sirius.ext.base;version="2.0.0",
org.eclipse.sirius.ext.base.relations;version="2.0.0",
+ org.eclipse.sirius.ext.emf.ui,
+ org.eclipse.sirius.ext.emf.ui.properties,
org.eclipse.sirius.ext.swt;version="2.0.0"
diff --git a/plugins/org.eclipse.sirius.ui/plugin.xml b/plugins/org.eclipse.sirius.ui/plugin.xml
index e942643550..e0b2489c3f 100644
--- a/plugins/org.eclipse.sirius.ui/plugin.xml
+++ b/plugins/org.eclipse.sirius.ui/plugin.xml
@@ -22,6 +22,7 @@
<extension-point id="uiSessionFactory" name="UI Session Factory" schema="schema/uiSessionFactory.exsd"/>
<extension-point id="newmodeldependencywizard" name="newmodeldependencywizard" schema="schema/newmodeldependencywizard.exsd"/>
<extension-point id="modelingprojectresourcelistener" name="org.eclipse.sirius.ui.resourcelistener" schema="schema/modelingprojectresourcelistener.exsd"/>
+ <extension-point id="siriuspropertiescelleditor" name="org.eclipse.sirius.ui.siriuspropertiescelleditor" schema="schema/siriuspropertiescelleditor.exsd"/>
<extension
point="org.eclipse.ui.views">
diff --git a/plugins/org.eclipse.sirius.ui/schema/siriuspropertiescelleditor.exsd b/plugins/org.eclipse.sirius.ui/schema/siriuspropertiescelleditor.exsd
new file mode 100644
index 0000000000..99c1a17f71
--- /dev/null
+++ b/plugins/org.eclipse.sirius.ui/schema/siriuspropertiescelleditor.exsd
@@ -0,0 +1,78 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.sirius.ui" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+ <appInfo>
+ <meta.schema plugin="org.eclipse.sirius.ui" id="siriuspropertiescelleditor" name="org.eclipse.sirius.ui.siriuspropertiescelleditor"/>
+ </appInfo>
+ <documentation>
+ This extension point allows clients to provide their own CellEditor for the Sirius semantic properties views.
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <annotation>
+ <appInfo>
+ <meta.element />
+ </appInfo>
+ </annotation>
+ <complexType>
+ <sequence minOccurs="1" maxOccurs="unbounded">
+ <element ref="provider"/>
+ </sequence>
+ <attribute name="point" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appInfo>
+ <meta.attribute translatable="true"/>
+ </appInfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="provider">
+ <complexType>
+ <attribute name="class" type="string">
+ <annotation>
+ <documentation>
+ The provider implementing the &lt;code&gt;org.eclipse.sirius.ext.emf.ui.ICellEditorProvider&lt;/code&gt; interface.
+ </documentation>
+ <appInfo>
+ <meta.attribute kind="java" basedOn=":org.eclipse.sirius.ext.emf.ui.ICellEditorProvider"/>
+ </appInfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="since"/>
+ </appInfo>
+ <documentation>
+ Since 3.0.0
+ </documentation>
+ </annotation>
+
+
+
+
+
+</schema>
diff --git a/plugins/org.eclipse.sirius.ui/src/org/eclipse/sirius/ui/tools/api/properties/AbstractCompositeEObjectPropertySource.java b/plugins/org.eclipse.sirius.ui/src/org/eclipse/sirius/ui/tools/api/properties/AbstractCompositeEObjectPropertySource.java
index 006e70bffd..9e242085f3 100644
--- a/plugins/org.eclipse.sirius.ui/src/org/eclipse/sirius/ui/tools/api/properties/AbstractCompositeEObjectPropertySource.java
+++ b/plugins/org.eclipse.sirius.ui/src/org/eclipse/sirius/ui/tools/api/properties/AbstractCompositeEObjectPropertySource.java
@@ -241,7 +241,7 @@ public abstract class AbstractCompositeEObjectPropertySource implements IPropert
}
/**
- * Decorates an {@link IPropertyDescriptor}. Adds the abality to test if the
+ * Decorates an {@link IPropertyDescriptor}. Adds the ability to test if the
* property is editable.
*
* @author ymortier
@@ -279,11 +279,11 @@ public abstract class AbstractCompositeEObjectPropertySource implements IPropert
* @see org.eclipse.ui.views.properties.IPropertyDescriptor#createPropertyEditor(org.eclipse.swt.widgets.Composite)
*/
public CellEditor createPropertyEditor(final Composite parent) {
- final CellEditor editor = decorated.createPropertyEditor(parent);
+ CellEditor cellEditor = null;
if (getPermissionAuthority().canEditInstance(identifier.getEObject())) {
- return editor;
+ cellEditor = decorated.createPropertyEditor(parent);
}
- return null;
+ return cellEditor;
}
private IPermissionAuthority getPermissionAuthority() {
diff --git a/plugins/org.eclipse.sirius.ui/src/org/eclipse/sirius/ui/tools/api/properties/SiriusExtensiblePropertySource.java b/plugins/org.eclipse.sirius.ui/src/org/eclipse/sirius/ui/tools/api/properties/SiriusExtensiblePropertySource.java
new file mode 100644
index 0000000000..df7e956963
--- /dev/null
+++ b/plugins/org.eclipse.sirius.ui/src/org/eclipse/sirius/ui/tools/api/properties/SiriusExtensiblePropertySource.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * Copyright (c) 2015 Obeo.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.sirius.ui.tools.api.properties;
+
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.sirius.ext.emf.ui.properties.ExtensiblePropertySource;
+import org.eclipse.sirius.ui.tools.internal.properties.SiriusCellEditorProviderCollector;
+
+/**
+ * Clients that want to provide custom cell editor through the extension point
+ * {@link SiriusExtensiblePropertySource#EXTENSION_POINT_ID} should use this
+ * PropertySource instead of the default PropertySource.
+ *
+ * @author Florian Barbin
+ *
+ */
+public class SiriusExtensiblePropertySource extends ExtensiblePropertySource {
+
+ /**
+ * Constructor.
+ *
+ * @param object
+ * a semantic eObject.
+ * @param itemPropertySource
+ * emf property source object.
+ */
+ public SiriusExtensiblePropertySource(Object object, IItemPropertySource itemPropertySource) {
+ super(object, itemPropertySource, SiriusCellEditorProviderCollector.getInstance());
+ }
+
+}
diff --git a/plugins/org.eclipse.sirius.ui/src/org/eclipse/sirius/ui/tools/internal/properties/SiriusCellEditorProviderCollector.java b/plugins/org.eclipse.sirius.ui/src/org/eclipse/sirius/ui/tools/internal/properties/SiriusCellEditorProviderCollector.java
new file mode 100644
index 0000000000..1ca2ef7291
--- /dev/null
+++ b/plugins/org.eclipse.sirius.ui/src/org/eclipse/sirius/ui/tools/internal/properties/SiriusCellEditorProviderCollector.java
@@ -0,0 +1,102 @@
+/*******************************************************************************
+ * Copyright (c) 2015 Obeo.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.sirius.ui.tools.internal.properties;
+
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.sirius.ext.emf.ui.ICellEditorProvider;
+import org.eclipse.sirius.ext.emf.ui.properties.CellEditorProviderCollector;
+import org.eclipse.sirius.viewpoint.SiriusPlugin;
+
+/**
+ * This collector lookups within the
+ * {@link SiriusCellEditorProviderCollector#EXTENSION_POINT_ID}.
+ *
+ * @author Florian Barbin
+ */
+public final class SiriusCellEditorProviderCollector implements CellEditorProviderCollector {
+
+ /**
+ * Extension point ID.
+ */
+ public static final String EXTENSION_POINT_ID = "org.eclipse.sirius.ui.siriuspropertiescelleditor";
+
+ /**
+ * Singleton.
+ */
+ private static SiriusCellEditorProviderCollector instance;
+
+ /**
+ * The cache to keep ICellEditorProviders once they have been loaded.
+ */
+ private Set<ICellEditorProvider> cache;
+
+ private SiriusCellEditorProviderCollector() {
+ }
+
+ /**
+ * Provides the unique instance of this class. To be lazy, the
+ * SiriusCellEditorProviderExtensionPoint is instantiate the first time we
+ * ask the instance.
+ *
+ * @return the SiriusCellEditorProviderExtensionPoint
+ */
+ public static SiriusCellEditorProviderCollector getInstance() {
+ if (instance == null) {
+ instance = new SiriusCellEditorProviderCollector();
+ }
+ return instance;
+ }
+
+ /**
+ * Retrieves all registered contributions and put them in the cache.
+ */
+ private void loadCache() {
+ cache = new HashSet<ICellEditorProvider>();
+ IConfigurationElement[] config = Platform.getExtensionRegistry().getConfigurationElementsFor(EXTENSION_POINT_ID);
+ for (IConfigurationElement configurationElement : config) {
+ try {
+ Object contribution = configurationElement.createExecutableExtension("class");
+ if (contribution instanceof ICellEditorProvider) {
+ cache.add((ICellEditorProvider) contribution);
+ }
+ } catch (CoreException e) {
+ SiriusPlugin.getDefault().getLog().log(new Status(Status.WARNING, SiriusPlugin.ID, "Cannot instantiate the Cell Editor Provider contributions", e));
+ }
+ }
+ }
+
+ @Override
+ public List<ICellEditorProvider> getCellEditorProviders(EObject eObject, IItemPropertyDescriptor itemPropertyDescriptor) {
+ if (cache == null) {
+ loadCache();
+ }
+ List<ICellEditorProvider> cellEditorProviders = new ArrayList<ICellEditorProvider>();
+ Iterator<ICellEditorProvider> iterator = cache.iterator();
+ while (iterator.hasNext()) {
+ ICellEditorProvider currentCellEditorProvider = iterator.next();
+ if (currentCellEditorProvider.provides(eObject, itemPropertyDescriptor)) {
+ cellEditorProviders.add(currentCellEditorProvider);
+ }
+ }
+ return cellEditorProviders;
+ }
+}

Back to the top