Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEd Merks2018-02-07 09:13:15 -0500
committerEd Merks2018-02-07 09:13:15 -0500
commit3a5a71cf07e6d3f12e3fe1801e2bca178b97db1e (patch)
treee72419c99eed4a36b1b02d9f3c7b46f9736915b9 /releng/org.eclipse.emf.parent
parentb8fb2398ceeabd0df2376a451f19ae986bba49f8 (diff)
downloadorg.eclipse.emf-3a5a71cf07e6d3f12e3fe1801e2bca178b97db1e.tar.gz
org.eclipse.emf-3a5a71cf07e6d3f12e3fe1801e2bca178b97db1e.tar.xz
org.eclipse.emf-3a5a71cf07e6d3f12e3fe1801e2bca178b97db1e.zip
[438123] Provide for extensible cell editor support
GenDataType and GenFeature both support propertyEditorFactory. These properties are implemented to read directly from GenModel annotations, in which case they don't serialize into the *.genmodel. The GenFeature.propertyEditorFactory, when not specifically set or present as an annotation, derives its value from the value of this property on the GenDataType. Validation is supported. The value must correspond to a registered IPropertyEditorFactory. An IPropertyEditorFactory supports creating cell editors, but it's a generic API. The two primary IItemPropertyDescriptor implementation classes implement IPropertyEditorFactory.Provider and have new constructors for the additional argument; the templates generate the right call when the property is present. The provider can return a URI for a registered factory (there is of course a new extension point to register them) or can return a factory instance. PropertyDescriptor tests for this interface and delegates to the item property descriptor to get the factory; if one is provided, the factory is used. If that actually creates a cell editor, that is of course used. Otherwise the default behavior kicks in to create the cell editor. IPropertyEditorFactory also support specializing the labels used for the values, and supports validation that the URI is well formed. Factory lookup is done by trimming the query, fragment, and successive segments of the URI, so the URI can be used to pass additional arguments to the factory. Reflective item providers look up the annotations so they also support specialized property editors. IPropertyEditorFactory cannot be implemented directly. One of the provided classes must be extended. The implementation classes support suggesting choices of URI values appropriate for the context, or even being omitted because the context doesn't support that type of cell editor. To test out these concepts and the design, a DateConversionDelegate is implemented. It goes the whole nine yards to support annotation validation and specialized property descriptors to suggest formatting choices. It basically supports specialized serialization conversion for long, Long, Date, java.sql.Date, Calendar, GregorianCalendar, and XMLGregorianCalendar. With properly serialized Date types available, NebulaDatePropertyEditorFactory is implemented to demonstrate the concepts. It supports using a Nebula CDateTime cell editor on features or data types with an instance type convertible to a Date, i.e., the ones listed previously as also supported by the date conversion delegate. This implementation used reflection to avoid a hard dependency on Nebula; it's an optional greedy dependency. The implementation illustrates how the propertyEditorFactory URI can be used to specialize the cell editor that's produced and a IPropertyEditorFactory can be used to specialize labels, i.e, although the type in the model might be long, the label that's shown for it can display a date, formatted in any way you like. While working on the validation it became clear that many things being validated rely on what's in the target platform but instead are validating against what's registered the running IDE. CommonPlugin now provides basic support for reading information from the target platform and provides a base registry implementation that can easily be extended to make use of this. EcorePlugin is changed to reuse this new basic implementation to avoid having it's own large PDEHelper class. All this is of course done reflectively so no PDE need be installed, in which case, the behavior is to return what's in the running IDE. Several problems in the auto resizing of columns and the auto expansion of property in the properties view are fixed. EFactoryImpl is changed to use a registered conversion delegate first before trying other approaches. This makes it more efficient to use conversion delegates and is more in keeping with the intent that such a declaration always specialize the behavior of conversion.
Diffstat (limited to 'releng/org.eclipse.emf.parent')
-rw-r--r--releng/org.eclipse.emf.parent/tp/helios.target4
-rw-r--r--releng/org.eclipse.emf.parent/tp/indigo.target4
-rw-r--r--releng/org.eclipse.emf.parent/tp/juno.target4
-rw-r--r--releng/org.eclipse.emf.parent/tp/kepler.target4
-rw-r--r--releng/org.eclipse.emf.parent/tp/luna.target4
-rw-r--r--releng/org.eclipse.emf.parent/tp/mars.target4
-rw-r--r--releng/org.eclipse.emf.parent/tp/neon.target4
-rw-r--r--releng/org.eclipse.emf.parent/tp/oxygen.target4
-rw-r--r--releng/org.eclipse.emf.parent/tp/photon.target4
9 files changed, 36 insertions, 0 deletions
diff --git a/releng/org.eclipse.emf.parent/tp/helios.target b/releng/org.eclipse.emf.parent/tp/helios.target
index 083861d71..0c2b01ce5 100644
--- a/releng/org.eclipse.emf.parent/tp/helios.target
+++ b/releng/org.eclipse.emf.parent/tp/helios.target
@@ -15,6 +15,8 @@
<unit id="org.eclipse.xtext.sdk.feature.group" version="0.0.0"/>
+ <unit id="org.eclipse.nebula.widgets.cdatetime" version="0.0.0"/>
+
<repository location="http://download.eclipse.org/releases/helios/201102250900"/>
<repository location="http://download.eclipse.org/tools/orbit/downloads/latest-R"/>
@@ -28,6 +30,8 @@
<repository location="http://download.eclipse.org/modeling/emft/mwe/updates/releases/2.9.1"/>
<repository location="http://download.eclipse.org/modeling/emf/emf/builds/milestone/latest"/>
+ <repository location="http://download.eclipse.org/nebula/releases/1.0.0"/>
+
</location>
</locations>
</target>
diff --git a/releng/org.eclipse.emf.parent/tp/indigo.target b/releng/org.eclipse.emf.parent/tp/indigo.target
index 15aeb5a0a..cf9371078 100644
--- a/releng/org.eclipse.emf.parent/tp/indigo.target
+++ b/releng/org.eclipse.emf.parent/tp/indigo.target
@@ -15,6 +15,8 @@
<unit id="org.eclipse.xtext.sdk.feature.group" version="0.0.0"/>
+ <unit id="org.eclipse.nebula.widgets.cdatetime" version="0.0.0"/>
+
<repository location="http://download.eclipse.org/releases/indigo/201202240900"/>
<repository location="http://download.eclipse.org/tools/orbit/downloads/latest-R"/>
@@ -28,6 +30,8 @@
<repository location="http://download.eclipse.org/modeling/emft/mwe/updates/releases/2.9.1"/>
<repository location="http://download.eclipse.org/modeling/emf/emf/builds/milestone/latest"/>
+ <repository location="http://download.eclipse.org/nebula/releases/1.0.0"/>
+
</location>
</locations>
</target>
diff --git a/releng/org.eclipse.emf.parent/tp/juno.target b/releng/org.eclipse.emf.parent/tp/juno.target
index f5d3775a3..6fe157423 100644
--- a/releng/org.eclipse.emf.parent/tp/juno.target
+++ b/releng/org.eclipse.emf.parent/tp/juno.target
@@ -15,6 +15,8 @@
<unit id="org.eclipse.xtext.sdk.feature.group" version="0.0.0"/>
+ <unit id="org.eclipse.nebula.widgets.cdatetime" version="0.0.0"/>
+
<repository location="http://download.eclipse.org/releases/juno/201303010900"/>
<repository location="http://download.eclipse.org/tools/orbit/downloads/latest-R"/>
@@ -28,6 +30,8 @@
<repository location="http://download.eclipse.org/modeling/emft/mwe/updates/releases/2.9.1"/>
<repository location="http://download.eclipse.org/modeling/emf/emf/builds/milestone/latest"/>
+ <repository location="http://download.eclipse.org/nebula/releases/1.0.0"/>
+
</location>
</locations>
</target>
diff --git a/releng/org.eclipse.emf.parent/tp/kepler.target b/releng/org.eclipse.emf.parent/tp/kepler.target
index 39ea876ff..d8b6c74ca 100644
--- a/releng/org.eclipse.emf.parent/tp/kepler.target
+++ b/releng/org.eclipse.emf.parent/tp/kepler.target
@@ -15,6 +15,8 @@
<unit id="org.eclipse.xtext.sdk.feature.group" version="0.0.0"/>
+ <unit id="org.eclipse.nebula.widgets.cdatetime" version="0.0.0"/>
+
<repository location="http://download.eclipse.org/releases/kepler/201402280900"/>
<repository location="http://download.eclipse.org/tools/orbit/downloads/latest-R"/>
@@ -28,6 +30,8 @@
<repository location="http://download.eclipse.org/modeling/emft/mwe/updates/releases/2.9.1"/>
<repository location="http://download.eclipse.org/modeling/emf/emf/builds/milestone/latest"/>
+ <repository location="http://download.eclipse.org/nebula/releases/1.0.0"/>
+
</location>
</locations>
</target>
diff --git a/releng/org.eclipse.emf.parent/tp/luna.target b/releng/org.eclipse.emf.parent/tp/luna.target
index 0aeb5a008..4c2d8fc37 100644
--- a/releng/org.eclipse.emf.parent/tp/luna.target
+++ b/releng/org.eclipse.emf.parent/tp/luna.target
@@ -15,6 +15,8 @@
<unit id="org.eclipse.xtext.sdk.feature.group" version="0.0.0"/>
+ <unit id="org.eclipse.nebula.widgets.cdatetime" version="0.0.0"/>
+
<repository location="http://download.eclipse.org/releases/luna/201502271000"/>
<repository location="http://download.eclipse.org/tools/orbit/downloads/latest-R"/>
@@ -28,6 +30,8 @@
<repository location="http://download.eclipse.org/modeling/emft/mwe/updates/releases/2.9.1"/>
<repository location="http://download.eclipse.org/modeling/emf/emf/builds/milestone/latest"/>
+ <repository location="http://download.eclipse.org/nebula/releases/1.0.0"/>
+
</location>
</locations>
</target>
diff --git a/releng/org.eclipse.emf.parent/tp/mars.target b/releng/org.eclipse.emf.parent/tp/mars.target
index 8feb8277e..4744f6032 100644
--- a/releng/org.eclipse.emf.parent/tp/mars.target
+++ b/releng/org.eclipse.emf.parent/tp/mars.target
@@ -15,6 +15,8 @@
<unit id="org.eclipse.xtext.sdk.feature.group" version="0.0.0"/>
+ <unit id="org.eclipse.nebula.widgets.cdatetime" version="0.0.0"/>
+
<repository location="http://download.eclipse.org/releases/mars/201602261000"/>
<repository location="http://download.eclipse.org/tools/orbit/downloads/latest-R"/>
@@ -28,6 +30,8 @@
<repository location="http://download.eclipse.org/modeling/emft/mwe/updates/releases/2.9.1"/>
<repository location="http://download.eclipse.org/modeling/emf/emf/builds/milestone/latest"/>
+ <repository location="http://download.eclipse.org/nebula/releases/1.0.0"/>
+
</location>
</locations>
</target>
diff --git a/releng/org.eclipse.emf.parent/tp/neon.target b/releng/org.eclipse.emf.parent/tp/neon.target
index 787d5afce..c41717d45 100644
--- a/releng/org.eclipse.emf.parent/tp/neon.target
+++ b/releng/org.eclipse.emf.parent/tp/neon.target
@@ -15,6 +15,8 @@
<unit id="org.eclipse.xtext.sdk.feature.group" version="0.0.0"/>
+ <unit id="org.eclipse.nebula.widgets.cdatetime" version="0.0.0"/>
+
<repository location="http://download.eclipse.org/releases/neon/201705151400"/>
<repository location="http://download.eclipse.org/tools/orbit/downloads/latest-R"/>
@@ -28,6 +30,8 @@
<repository location="http://download.eclipse.org/modeling/emft/mwe/updates/releases/2.9.1"/>
<repository location="http://download.eclipse.org/modeling/emf/emf/builds/milestone/latest"/>
+ <repository location="http://download.eclipse.org/nebula/releases/1.0.0"/>
+
</location>
</locations>
</target>
diff --git a/releng/org.eclipse.emf.parent/tp/oxygen.target b/releng/org.eclipse.emf.parent/tp/oxygen.target
index 70fac4006..d08291cc4 100644
--- a/releng/org.eclipse.emf.parent/tp/oxygen.target
+++ b/releng/org.eclipse.emf.parent/tp/oxygen.target
@@ -15,6 +15,8 @@
<unit id="org.eclipse.xtext.sdk.feature.group" version="0.0.0"/>
+ <unit id="org.eclipse.nebula.widgets.cdatetime" version="0.0.0"/>
+
<repository location="http://download.eclipse.org/releases/oxygen"/>
<repository location="http://download.eclipse.org/tools/orbit/downloads/latest-R"/>
@@ -28,6 +30,8 @@
<repository location="http://download.eclipse.org/modeling/emft/mwe/updates/releases/2.9.1"/>
<repository location="http://download.eclipse.org/modeling/emf/emf/builds/milestone/latest"/>
+ <repository location="http://download.eclipse.org/nebula/releases/1.0.0"/>
+
</location>
</locations>
</target>
diff --git a/releng/org.eclipse.emf.parent/tp/photon.target b/releng/org.eclipse.emf.parent/tp/photon.target
index 16ebeccfa..eb410f593 100644
--- a/releng/org.eclipse.emf.parent/tp/photon.target
+++ b/releng/org.eclipse.emf.parent/tp/photon.target
@@ -15,6 +15,8 @@
<unit id="org.eclipse.xtext.sdk.feature.group" version="0.0.0"/>
+ <unit id="org.eclipse.nebula.widgets.cdatetime" version="0.0.0"/>
+
<repository location="http://download.eclipse.org/releases/photon"/>
<repository location="http://download.eclipse.org/tools/orbit/downloads/latest-R"/>
@@ -28,6 +30,8 @@
<repository location="http://download.eclipse.org/modeling/emft/mwe/updates/releases/2.9.1"/>
<repository location="http://download.eclipse.org/modeling/emf/emf/builds/milestone/latest"/>
+ <repository location="http://download.eclipse.org/nebula/releases/1.0.0"/>
+
</location>
</locations>
</target>

Back to the top