| Summary: | [api] allow connectors to customize editor parts | ||||||
|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Steffen Pingel <steffen.pingel> | ||||
| Component: | Mylyn | Assignee: | 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
Steffen Pingel
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.
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. Created attachment 101197 [details]
mylyn/context/zip
Created bug 233158 to provide extensibility through an extension point as well. |