Community
Participate
Working Groups
Task editor pages are currently extensible through inheritance only (bug 232853). It would be nice if editor parts could be contributed through an extension point.
Shawn, maybe we can make that work for repository tasks as well as for local tasks with the same extension point.
Steffen, first thoughts at making this work for just repository tasks: * create a new extension point that supplies a TaskEditorPartDescriptor and a path * in the AbstractTaskEditorPage.createParts, lookup the additional TaskEditorPartDescriptor's to use for that path and create them This will add it to all repository tasks, so we will probably need to add: * ability to include/exclude a connector kind or page id Since the local task editor is so different from the repository task editor, I think that it may need a different extension since the parts will be different as well. One quick thought is to make a TaskEditorContributiontDescriptor that has a canCreatePartFor(TaskEditorInput) and has a getTaskEditorPartDescriptor(TaskEditorInput) and getPath(TaskEditorInput) that would return the descriptor. The only question is if we need to have some other type other than a TaskEditorPartDescriptor to support the local task editor or not and what kind of paths we want to support in the local task editor.
I think for the first pass we can avoid the extra layer of indirection and just specify all properties of the descriptor in the extension. Then clients would only need to provide an implementation of AbstractTaskEditorPart. We probably need something separate for the local task editor since the data model is very different.
Created attachment 136748 [details] first iteration Here is the first iteration on the patch. This only works for repository task editors and we will probably need another extension to support local editors until the editors are unified.
Created attachment 136749 [details] first iteration Here is the first iteration on the patch. This only works for repository task editors and we will probably need another extension to support local editors until the editors are unified.
Created attachment 136750 [details] mylyn/context/zip
Created attachment 136858 [details] final patch Here is my final proposal. I think that we shouldn't do the contributions to the local task editor until it is part of the same framework as the repository task editors since the planning page is complicated and follows a different model than the AbstractTaskEditorPage. Steffen, let me know what you think before i commit this.
I think it would make sense to add the list of extension contributions to the list of descriptors in createPartDescriptors() but other than that the patch looks great.
Thanks for the feedback. I have changed this as suggested and have committed this patch. I will work on adding an extension for local task editors next.
Created attachment 137418 [details] patch for the local task editor Here is a patch that allows contributions to the local task editor. I agree that this approach isn't as extensible, but I think that we need to fully merge the local and repository task editors (not just the UI bits, but the model too) so that there is the same extensibility in both. Steffen, let me know if you think that this is acceptable or not.
Created attachment 137419 [details] mylyn/context/zip
I have committed this patch with minor modifications. I have also updated the extension point to have shorter names. I think we are done here. Steffen, is there anything else we should consider before closing this?
Created attachment 137426 [details] mylyn/context/zip
Cool!
This is now complete.