Bug 275204 - integrate discovery mechanism with tasks.ui
Summary: integrate discovery mechanism with tasks.ui
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 3.2   Edit
Assignee: David Green CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 275224
Blocks: 272621
  Show dependency tree
 
Reported: 2009-05-06 15:06 EDT by David Green CLA
Modified: 2009-05-11 23:23 EDT (History)
3 users (show)

See Also:


Attachments
candidate UI integration (7.09 KB, patch)
2009-05-08 13:30 EDT, David Green CLA
no flags Details | Diff
mylyn/context/zip (84.89 KB, application/octet-stream)
2009-05-08 13:30 EDT, David Green CLA
no flags Details
updated (9.73 KB, patch)
2009-05-08 21:35 EDT, David Green CLA
no flags Details | Diff
mylyn/context/zip (15.90 KB, application/octet-stream)
2009-05-08 21:35 EDT, David Green CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Green CLA 2009-05-06 15:06:54 EDT
Integrate the discovery mechanism by adding to the *Add Task Repository* wizard.

At this point how this is to appear is uncertain.  Likely to be either a hyperlink in the wizard UI, or an *Other...* kind added to the list of repository kinds available.
Comment 1 Steffen Pingel CLA 2009-05-06 15:35:18 EDT
In order to avoid a hard-coded dependency from tasks.ui to discovery.ui we could try adding a toolbar to the wizard that is populated through IMenuService:

		menuService = (IMenuService) getSite().getService(IMenuService.class);
		menuService.populateContributionManager((ContributionManager) toolBarManager, "toolbar:org.eclipse.tasks.ui.toolbar.addrepository");

If that's too much overhead a dependency would also be okay for now but we should move the plug-ins out of the sandbox prior to doing that.
Comment 2 David Green CLA 2009-05-06 15:38:21 EDT
What I had in mind was integration with ICommandService.  tasks.ui could look up a discovery ui command by its id, and the command could indicate if it's enabled.  That would allow for greater flexibility in the ui.
Agreed that we should try to avoid a plug-in dependency if possible.
Comment 3 Steffen Pingel CLA 2009-05-06 15:42:15 EDT
Sounds good. I find toolbars a fairly flexible mechanism that gives contributions control over the UI (e.g. through ControlContributions) but go for whatever works.
Comment 4 David Green CLA 2009-05-07 13:09:02 EDT
Hyperlink 'download more connectors...' to go in *Add Task Repository* wizard.
Comment 5 David Green CLA 2009-05-08 13:30:32 EDT
Created attachment 134992 [details]
candidate UI integration
Comment 6 David Green CLA 2009-05-08 13:30:35 EDT
Created attachment 134993 [details]
mylyn/context/zip
Comment 7 David Green CLA 2009-05-08 19:38:14 EDT
Steffen can you please review the patch?
Comment 8 David Green CLA 2009-05-08 21:35:17 EDT
Created attachment 135043 [details]
updated

recut the patch:

* avoid unnecessary activation of the discovery.ui bundle
* display the wizard page for connector kind selection even if only one kind is currently available so that the user is presented with the hyperlink
Comment 9 David Green CLA 2009-05-08 21:35:19 EDT
Created attachment 135044 [details]
mylyn/context/zip
Comment 10 Steffen Pingel CLA 2009-05-11 14:35:37 EDT
Thanks David. I have applied the patch. I have also made a similar change to the query wizard to not skip the repository selection page if only one connector is installed to support discovery of the install ui.
Comment 11 David Green CLA 2009-05-11 14:39:07 EDT
(In reply to comment #10)
> Thanks David. I have applied the patch. I have also made a similar change to the
> query wizard to not skip the repository selection page if only one connector is
> installed to support discovery of the install ui.

Steffen, that's great... btw, though it's now integrated noone will see the link until bug 275224 is completed.
Comment 12 Steffen Pingel CLA 2009-05-11 16:21:19 EDT
The setEnabled() method is not available in Eclipse 3.3: discoveryWizardCommand.setEnabled(createEvaluationContext(handlerService));
Comment 13 Steffen Pingel CLA 2009-05-11 21:38:55 EDT
I have commented out the line that was breaking the build. David, please go ahead and commit a proper fix if you have one.
Comment 14 David Green CLA 2009-05-11 23:23:42 EDT
Thanks, fix in CVS