Bug 547787 - [ReferenceService] Object details in element selection dialog
Summary: [ReferenceService] Object details in element selection dialog
Status: CLOSED FIXED
Alias: None
Product: ECP
Classification: Modeling
Component: EMF Forms (show other bugs)
Version: 1.21.0   Edit
Hardware: All All
: P2 enhancement (vote)
Target Milestone: 1.22.0   Edit
Assignee: Christian Damus CLA
QA Contact: Eugen Neufeld CLA
URL:
Whiteboard:
Keywords: noteworthy, test, ui
Depends on:
Blocks:
 
Reported: 2019-05-30 11:10 EDT by Christian Damus CLA
Modified: 2019-06-18 12:01 EDT (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-05-30 11:10:03 EDT
For selection of elements to add to or set in a reference, the DefaultReferenceService presents a dialog that shows the user a (highly configurable) list of available objects to choose from.  One aspect of this dialog that is not configurable is the table in which the user makes this  selection. The labels for objects are configurable by the standard mechanisms, but for some models these labels are not so helpful and in order to help the user make the correct selection, it would be useful to call out individual features or related objects in the table in columns.

So, the DefaultReferenceService should provide a mechanism by which to customize the presentation of this table to show additional columns beyond just the object label.
Comment 1 Eclipse Genie CLA 2019-05-30 14:08:57 EDT
New Gerrit change created: https://git.eclipse.org/r/143077
Comment 3 Christian Damus CLA 2019-06-05 15:49:16 EDT
(In reply to Eclipse Genie from comment #2)
> Gerrit change https://git.eclipse.org/r/143077 was merged to [develop].

## TESTING INFORMATION
### Summary of the critical part of the change

The DefaultReferenceService now supports pluggable strategies for provision of the selection composite to instantiate in the dialog for selecting objects to add to a reference feature (SelectionCompositeStrategy).

The EMFForms SWT Table feature provides a new bundle that implements a SelectionCompositeStrategy that looks for a view model specifying a table to present in the selection dialog. This view model must

 - contain a VTableControl in which the DMR resolves to the reference being edited by the DefaultReferenceService
 - be registered with a filter key 'selectionTableComposite' with the value being the name of the EReference being edited by the DefaultReferenceService

A view model that is not thus filtered will not be used, avoiding accidentally picking up unintended table specifications in this dialog.  The requirement of this filter match is implemented by a new specialization of the EMFFormsViewService protocol, the EMFFormsFilteredViewService that delegates to IFilteredViewProviders.  The ExtensionXMIViewModelProvider for the commonly used extension point with filters implements this new provider protocol to enforce matching of filters keys that the client specifies as required.

### Potential regressions

Accidental presentation of tables in the selection dialog that are unwanted by the application and inappropriate for that context.  Highly unlikely given the new required filter keys capability.

### Affected areas / use cases

DefaultReferenceService presentation of dialog to select objects to add to a reference (as in the LinkControlSWTRenderer and MultiReferenceSWTRenderer).

View providers with filtering on the org.eclipse.emf.ecp.view.model.provider.xmi.file extension point.

### Things that shall be tested

Adding objects to single- and multi-valued references using the default renderers for VControl, both the legacy simple list implementation (in reality single-column table) and using the new support for multi-column tables via the SelectionTableCompositeStrategyProvider.
Comment 4 Eclipse Genie CLA 2019-06-18 05:14:11 EDT
New Gerrit change created: https://git.eclipse.org/r/144326
Comment 5 Christian Damus CLA 2019-06-18 10:11:12 EDT
The fix is published in 1.22 M1a.