Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 233158 - [api] allow contribution of task editor parts through extension point
Summary: [api] allow contribution of task editor parts through extension point
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P1 enhancement (vote)
Target Milestone: 3.2   Edit
Assignee: Shawn Minto CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-21 03:59 EDT by Steffen Pingel CLA
Modified: 2009-05-28 16:13 EDT (History)
4 users (show)

See Also:


Attachments
first iteration (11.27 KB, patch)
2009-05-21 21:50 EDT, Shawn Minto CLA
no flags Details | Diff
first iteration (11.27 KB, patch)
2009-05-21 21:52 EDT, Shawn Minto CLA
no flags Details | Diff
mylyn/context/zip (2.60 KB, application/octet-stream)
2009-05-21 21:52 EDT, Shawn Minto CLA
no flags Details
final patch (11.30 KB, patch)
2009-05-22 17:54 EDT, Shawn Minto CLA
no flags Details | Diff
patch for the local task editor (26.98 KB, patch)
2009-05-27 17:06 EDT, Shawn Minto CLA
no flags Details | Diff
mylyn/context/zip (16.71 KB, application/octet-stream)
2009-05-27 17:06 EDT, Shawn Minto CLA
no flags Details
mylyn/context/zip (4.15 KB, application/octet-stream)
2009-05-27 18:02 EDT, Shawn Minto CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Steffen Pingel CLA 2008-05-21 03:59:18 EDT
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.
Comment 1 Steffen Pingel CLA 2009-05-20 22:52:29 EDT
Shawn, maybe we can make that work for repository tasks as well as for local tasks with the same extension point.
Comment 2 Shawn Minto CLA 2009-05-21 19:51:45 EDT
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.
Comment 3 Steffen Pingel CLA 2009-05-21 20:15:09 EDT
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.
Comment 4 Shawn Minto CLA 2009-05-21 21:50:47 EDT
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.
Comment 5 Shawn Minto CLA 2009-05-21 21:52:11 EDT
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.
Comment 6 Shawn Minto CLA 2009-05-21 21:52:13 EDT
Created attachment 136750 [details]
mylyn/context/zip
Comment 7 Shawn Minto CLA 2009-05-22 17:54:31 EDT
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.
Comment 8 Steffen Pingel CLA 2009-05-27 03:38:38 EDT
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.
Comment 9 Shawn Minto CLA 2009-05-27 09:34:17 EDT
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.
Comment 10 Shawn Minto CLA 2009-05-27 17:06:19 EDT
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.
Comment 11 Shawn Minto CLA 2009-05-27 17:06:28 EDT
Created attachment 137419 [details]
mylyn/context/zip
Comment 12 Shawn Minto CLA 2009-05-27 18:02:44 EDT
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?
Comment 13 Shawn Minto CLA 2009-05-27 18:02:48 EDT
Created attachment 137426 [details]
mylyn/context/zip
Comment 14 Steffen Pingel CLA 2009-05-28 00:26:23 EDT
Cool!
Comment 15 Shawn Minto CLA 2009-05-28 16:13:08 EDT
This is now complete.