Community
Participate
Working Groups
It would be nice to have the support for automatic repository creation so that a repository that only has 1 instance (e.g. local tasks) could be created automatically on startup. Currently, this can't be done since the repositories are read after the connectors are loaded. This means that if the plug-in that wants the automatically created repository attempts to do this, it will always create a new repository since there are no repositories of that kind on startup.
I think that this should be supported through part of the org.eclipse.mylar.tasks.ui.repositories extension point. To support this, I would add an optional element called automaticCreation. This would have attributes that specify the details for the automatically created repository such as the name, url, etc that are necessary to create the repository. After the repositories are read, the TasksUiPlugin would check the list of automatically created repositories and if they do not already exist, create them. It would also be beneficial to have an attribute that specifies whether the user can create the repository. If this is true, the repository wizard will be unchanged, but if it is false and the user is not allowed to create the repository, the repository type is left out of the list.
The design you propose sounds very good. I think we can just go with "autoCreate=true" for an automatically created repository, and that will behave as you specified. Then we also add the ability to specify "autoManage=true", which means that the user can not manage the repository (can not delete, does not show up in creation wizard).
I wonder if we should allow to import/export repository templates (in addition to specifying them in the extension point)
It turns out that there was already an addAutomatic boolean in the template extension point that we could use. It turns out that this functionality was never implemented. To have this work, I had to add a loop over all of the templates in the start method of TasksUiPlugin to ensure that these repositories are created on startup. As for userManaged, I added an attribute to the RepositoryConnector extension. If this is set to false, then the user is unable to modify the task repository in any way. This was done by disabling the actions on in the TaskRepositoriesView if userManaged = false on the connector.
Created attachment 59520 [details] userManaged repositories
Created attachment 59521 [details] mylar/context/zip
We also need to make it easier to create new repositories when linked trough org.eclipse.mylar.tasks.ui.projectLinkProviders extension point. See http://wiki.eclipse.org/index.php/Mylar_Integrator_Reference#Mapping_from_projects_to_Task_Repositories It seems like AbstractTaskRepositoryLinkProvider should have some API for creating new repositories. Probably should just return repository template instance. That could be used from [Add Repository] action in Project preferences. Then TaskUI could iterate trough all workbench projects on startup and ask link providers for these repository templates.
Looks great Shawn, patch applied. I'll leave this open for now because we may want to add some additional UI (e.g. have a disabled/gray icon on the repositories that are automatically added). Eugene: that sounds like it could be a good idea, but it should probably go on a separate bug report? I also have a bit of concern about the performance of iterating through every project on startup, even if this is done asynchrnously, so maybe as a first pass it could be user initiated via a wizard. But then there's the risk of nobody using that wizard.
bug 175064
Created attachment 59532 [details] Double Click Patch Thanks for applying the patch. I just realized that I missed the double click case. Here is a very small patch to fix that.
Is bug#152212 a duplicate?
*** Bug 152212 has been marked as a duplicate of this bug. ***
Patch applied and verified, nice work.
We still need that lazy creation
I will agree that prompting the user for credentials would be nice for this facility, but I don't think that it is required as part of the solution to this bug. However, when the facility for prompting users for credentials is added, the case of automatic repository creation might require special attention.
Created bug 175205 for credentials prompt. Anything left here?