Bug 545460 - Generalize copy/paste support in master-detail tree editors
Summary: Generalize copy/paste support in master-detail tree editors
Status: CLOSED FIXED
Alias: None
Product: ECP
Classification: Modeling
Component: EMF Forms (show other bugs)
Version: 1.20.0   Edit
Hardware: All All
: P2 enhancement (vote)
Target Milestone: 1.21.0   Edit
Assignee: Christian Damus CLA
QA Contact: Eugen Neufeld CLA
URL:
Whiteboard:
Keywords: test
Depends on:
Blocks:
 
Reported: 2019-03-15 14:17 EDT by Christian Damus CLA
Modified: 2019-03-29 07:33 EDT (History)
1 user (show)

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-03-15 14:17:20 EDT
Bug 544880 fixed a problem in which the View Editor's model tree cut/copy/paste actions were invoked when attempting to cut/copy/paste in text fields in the detail panel of the master-detail form.  This was fixed locally in that editor's action-bar contributor.

Any other form-based editor that uses a master-detail tree view will need a similar treatment, so the fix employed in this editor should be factored out into something more generally applied.  Preferable would be to implement that behaviour once in each of

  - TreeMasterDetailComposite (used by GenericEditor)
  - TreeMasterDetailSWTRenderer (used by ViewEditorPart and others)

and not in the action-bar contributors.
Comment 1 Christian Damus CLA 2019-03-15 14:22:04 EDT
Also, the JUnit tests implemented for bug 544880 do not work on Mac (Cocoa) platform.
Comment 2 Eclipse Genie CLA 2019-03-15 16:16:51 EDT
New Gerrit change created: https://git.eclipse.org/r/138860
Comment 4 Christian Damus CLA 2019-03-19 15:50:48 EDT
(In reply to Eclipse Genie from comment #3)
> Gerrit change https://git.eclipse.org/r/138860 was merged to [develop].
Comment 5 Christian Damus CLA 2019-03-26 07:44:43 EDT
Released in the milestone/special build.
Comment 6 Jonas Helming CLA 2019-03-28 11:29:16 EDT
Should this get the "testing" tag due to possible regressions?
Comment 7 Jonas Helming CLA 2019-03-29 04:42:56 EDT
Please provide testing information
Comment 8 Christian Damus CLA 2019-03-29 07:33:00 EDT
Regression testing of the View Model Editor is covered by the JUnit tests.

To test any other form editor that uses a tree master-detail as its main view, you would first have to register the EMF EditingDomainActionBarContributor class as its action-bar contributor.  And if it is not a subclass of the GenericEditor, then also register the tree's selection provider as the editor site's selection provider. Then test that

- when the input focus is in the tree, cut/copy/paste/delete key bindings operate on nodes of the tree as expected
- when the input focus is on a text widget in the detail pane for some object in the the tree, cut/copy/paste/delete key bindings operate on the text in that widget
- when the input focus is on a table or other complex widget in the detail pane, if that table provides any cut/copy/paste/delete actions on the standard key bindings, then they work as expected in that context
- try switching the focus back and forth between tree and details in the editor and across multiple instances of the editor to verify that the correct actions are invoked by the keyboard bindings (and/or Edit menu actions)