Bug 509606 - [Model Fragment Editor] should provide content assist in feature field name
Summary: [Model Fragment Editor] should provide content assist in feature field name
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.7   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Patrik Suzzi CLA
QA Contact:
URL:
Whiteboard:
Keywords: noteworthy
Depends on:
Blocks:
 
Reported: 2016-12-21 13:22 EST by Olivier Prouvost CLA
Modified: 2017-01-02 12:45 EST (History)
0 users

See Also:


Attachments
anim gif: with the proposed change we added content assist (616.14 KB, image/gif)
2016-12-22 04:47 EST, Patrik Suzzi CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Prouvost CLA 2016-12-21 13:22:36 EST
It must be done in the StringModelFragment there is a text field for the Feature name, and the selectedContainer is the class that has been selected...

On the org.eclipse.e4.tools.emf.ui.common.Util class the method canBeExtendedInAFragment(EClass ) and referenceIsModelFragmentCompliant(EReference) are used by the contentProvider of the tree viewer in the FeatureSelectionDialog to select only the possible references... 

The code should inspired of it...
Comment 1 Olivier Prouvost CLA 2016-12-21 13:22:59 EST
Thank you patrik
Comment 2 Patrik Suzzi CLA 2016-12-21 13:32:14 EST
I'll add a ContentProposalAdapter privinding a  list of results, as suggested here: http://www.vogella.com/tutorials/EclipseJFace/article.html#user-input-help-with-field-assistance
Comment 3 Patrik Suzzi CLA 2016-12-22 04:47:36 EST
Created attachment 266022 [details]
anim gif: with the proposed change we added content assist

As you can see in the attached image, we added content assist for the Feature Name, in the Model Fragment editor.
The content assist works only if an Extended Element ID is defined
Comment 4 Eclipse Genie CLA 2016-12-22 04:50:27 EST
New Gerrit change created: https://git.eclipse.org/r/87608
Comment 6 Olivier Prouvost CLA 2016-12-22 09:07:03 EST
Thank you Patrik
Comment 7 Eclipse Genie CLA 2017-01-02 12:38:15 EST
New Gerrit change created: https://git.eclipse.org/r/87902