Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 225983 - New abstract property section for collections
Summary: New abstract property section for collections
Status: RESOLVED FIXED
Alias: None
Product: Ecoretools
Classification: Modeling
Component: General (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P1 enhancement
Target Milestone: M4   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-04-07 11:27 EDT by Mario Cervera CLA
Modified: 2009-02-02 11:34 EST (History)
2 users (show)

See Also:


Attachments
patch for plug-in org.eclipse.emf.tabbedproperties (15.62 KB, patch)
2008-04-07 11:27 EDT, Mario Cervera CLA
no flags Details | Diff
Patch for plug-in org.eclipse.emf.tabbedproperties (15.35 KB, patch)
2008-04-25 06:47 EDT, Mario Cervera CLA
jlescot: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mario Cervera CLA 2008-04-07 11:27:07 EDT
Created attachment 95068 [details]
patch for plug-in org.eclipse.emf.tabbedproperties

A new property section for the plug-in org.eclipse.emf.tabbedproperties might be desirable.

The functionality of this section would be to modify the elements of a feature of type List of any EObject. The appearance of the section would be two Lists (one with the candidates to be part of the list and the other with the members of the list) and four buttons Add, Remove, Up and Down.

I am attaching to this feature request a possible implementation of this section.
Comment 1 Jacques LESCOT CLA 2008-04-25 05:27:37 EDT
Really interesting patch ! I remember having implementing a similar one for the Topcased UML editor to manage Profiles and Stereotypes, but I did not provide a generic section, and that's what you are proposing :-)

I just have a remark on the use of this section with big lists : I tried to apply this on the "References"  property of an EAnnotation from which it should be possible to references many EObject elements. The problem is that the initial list (on the left is very long) and it is quite unusable because I need to scroll both horizontally and vertically to find buttons used to Add/Remove elements. A solution would consist in limiting the TableViewer size and addind scrollbars.

Can you perform these changes ?
Comment 2 Mario Cervera CLA 2008-04-25 06:47:31 EDT
Created attachment 97591 [details]
Patch for plug-in org.eclipse.emf.tabbedproperties

This attachment solves a problem that the previous attachment had with big lists
Comment 3 Mario Cervera CLA 2008-04-25 06:50:56 EDT
(In reply to comment #1)
> Really interesting patch ! I remember having implementing a similar one for the
> Topcased UML editor to manage Profiles and Stereotypes, but I did not provide a
> generic section, and that's what you are proposing :-)
> 
> I just have a remark on the use of this section with big lists : I tried to
> apply this on the "References"  property of an EAnnotation from which it should
> be possible to references many EObject elements. The problem is that the
> initial list (on the left is very long) and it is quite unusable because I need
> to scroll both horizontally and vertically to find buttons used to Add/Remove
> elements. A solution would consist in limiting the TableViewer size and addind
> scrollbars.
> 
> Can you perform these changes ?
>

I did it. I just had to add a "heightHint" to the GridData assigned to te composites containing the lists. I hadn't realized in the begining that there was a problem when the list are big. 

Comment 4 Jacques LESCOT CLA 2008-04-25 07:46:44 EDT
(In reply to comment #3)
> I did it. I just had to add a "heightHint" to the GridData assigned to te
> composites containing the lists. I hadn't realized in the begining that there
> was a problem when the list are big. 
Great ! Adding a "widthHint" to the GridData also would prevent bad issues when List items are too wide. I will review the code in the next days and integrate it.
Thanks again for your contribution.

Comment 5 David Sciamma CLA 2008-06-04 13:34:30 EDT
To late for 0.8, postpone for 0.9
Comment 6 Jacques LESCOT CLA 2008-12-23 11:51:55 EST
Patch applied and implemented in HEAD. Available for the next 0.9M4 version.
Comment 7 Jacques LESCOT CLA 2008-12-23 12:11:18 EST
Applied patch has been reworked a little to match with code formatter and specifically to be applied on the org.eclipse.emf.ecoretools.tabbedproperties plugin.