Bug 543461 - [Data Template] Blank template provider misses classes
Summary: [Data Template] Blank template provider misses classes
Status: CLOSED FIXED
Alias: None
Product: ECP
Classification: Modeling
Component: EMF Forms (show other bugs)
Version: 1.19.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 1.20.0   Edit
Assignee: Christian Damus CLA
QA Contact: Eugen Neufeld CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-01-15 10:03 EST by Christian Damus CLA
Modified: 2019-01-17 16:38 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Damus CLA 2019-01-15 10:03:10 EST
The Blank Template Provider will not create template instances for EClasses that conform to the reference type but for which the generated EMF.Edit providers do not supply new-child descriptors, in the case that some descriptors are provided for a subset of types that are instantiable in the reference.  The consequence is that the user will be presented in the dialog EClasses that, upon choosing them, result in nothing being added to the table in the editor.

For example, in a table of Fruit, if the generated edit providers offer a blank Apple and a blank Orange, but the model also has subtypes NavelOrange and BloodOrange, the latter two classes will be presented in the dialog when the user hits the green '+' button to add a new fruit but then nothing will happen when the user hits the 'Finish' button.
Comment 1 Christian Damus CLA 2019-01-15 13:08:34 EST
It seems to me that the problem is no so much that the blank template provider is not providing template wrappers for the new-child descriptors that are not provided by EMF.Edit, but that the dialog shows those classes for the user to select.  The blank template provider is driven by the EMF.Edit supplied new-child descriptors, so it should respect the decision of the item providers not to provide some descriptors, and therefore not to invent blank templates for them.  That much I think is correct.  It's in the TemplateCreateNewModelElementStrategyProvider that the wizard dialog is showing EClasses that the EMF.Edit item providers are trying to say should not be available for the EReference in question.
Comment 2 Eclipse Genie CLA 2019-01-15 15:13:23 EST
New Gerrit change created: https://git.eclipse.org/r/135126
Comment 3 Eclipse Genie CLA 2019-01-15 15:15:17 EST
New Gerrit change created: https://git.eclipse.org/r/135127
Comment 5 Christian Damus CLA 2019-01-17 16:38:05 EST
(In reply to Eclipse Genie from comment #4)
> Gerrit change https://git.eclipse.org/r/135127 was merged to [develop].