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

Bug 232853

Summary: [api] allow connectors to customize editor parts
Product: z_Archived Reporter: Steffen Pingel <steffen.pingel>
Component: MylynAssignee: Steffen Pingel <steffen.pingel>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: robert.elves, shawn.minto
Version: unspecified   
Target Milestone: 3.0   
Hardware: PC   
OS: All   
Whiteboard:
Attachments:
Description Flags
mylyn/context/zip none

Description Steffen Pingel CLA 2008-05-19 15:35:58 EDT
The only extensibility offered by the task editor is currently through page contributions. It is not possible to contribute contents to a task editor page, e.g. a section that lists the commits associated with a task. It would be nice if task editor pages had an extension point for contributing additional sections (i.e. classes extending AbstractTaskEditorPart).
Comment 1 Steffen Pingel CLA 2008-05-20 17:33:23 EDT
As a first pass AbstractTaskEditorPage should support replacing pre-defined sections/parts with custom implementations. The current implementation that hard-codes the editor layout into the abstract class by using protected methods, e.g. createCommentSection() is not very flexible and only extensible through inheritance. To address that I propose that each editor part should get a descriptor with a unique id:

TaskEditorPartDescriptor {
 // unique id
 String id;

 // the location within the editor, e.g. "header"
 String path;
 
 // the implementation
 AbstractTaskEditorPart part;
}

AbstractTaskEditorPage would provide a set of default descriptors that could be replaced/extended programmatically before the editor controls are constructed. In the future part contributions could be supported through an extension point as well.
Comment 2 Steffen Pingel CLA 2008-05-21 03:59:51 EDT
A new protected method createPartDescriptors() has been added to AbstractTaskEditorPage. The default implementation returns a set of TaskEditorPartDescriptor objects that describe the default editor layout. Connector implementors may override this method to customize the layout by replacing or adding descriptors. 
Comment 3 Steffen Pingel CLA 2008-05-21 03:59:54 EDT
Created attachment 101197 [details]
mylyn/context/zip
Comment 4 Steffen Pingel CLA 2008-05-21 04:00:33 EDT
Created bug 233158 to provide extensibility through an extension point as well.