Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 318396

Summary: support configurable sorting of attribute editors in TaskEditorAttributePart
Product: z_Archived Reporter: Kevin Sawicki <ksawicki>
Component: MylynAssignee: Kevin Sawicki <ksawicki>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 Keywords: contributed
Version: unspecified   
Target Milestone: 3.5   
Hardware: Macintosh   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:
Attachments:
Description Flags
Patch that creates a protected method to generate the attribute editor sorter steffen.pingel: iplog+

Description Kevin Sawicki CLA 2010-06-29 19:25:18 EDT
Allow sorting of attribute editors in TaskEditorAttributePart to be configurable.

Currently only sorting by layout hint is possible since initialize() is private and the
attribute editors list is private.

The order of attribute editors should be configurable by task connectors so they
can support user-defined ordering and location of attribute editors.

Suggestion is either to make the list of attribute editors protected or to expose
a hook during initialize for subclasses to do their desired sorting.
Comment 1 Kevin Sawicki CLA 2010-06-30 11:43:01 EDT
Created attachment 173113 [details]
Patch that creates a protected method to generate the attribute editor sorter
Comment 2 Kevin Sawicki CLA 2010-06-30 11:47:37 EDT
The patch provided introduces a protected method that creates an attribute editor comparator used to sort the abstract attribute editors.  This new method is called by initialize and by default returns the current comparator implementation which sorts by layout hint priority.  Sub-classes can now override this method and provide their own sorter to control attribute editor placement.
Comment 3 Steffen Pingel CLA 2010-07-02 14:24:22 EDT
Thanks Kevin! I have applied the patch to head.