Bug 297254

Summary: [api] allow disabling of repository creation for a connector
Product: z_Archived Reporter: Thomas Ehrnhoefer <thomas.ehrnhoefer>
Component: MylynAssignee: Thomas Ehrnhoefer <thomas.ehrnhoefer>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P2 CC: steffen.pingel, thomas.ehrnhoefer
Version: unspecifiedKeywords: contributed, noteworthy
Target Milestone: 3.4   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
mylyn/context/zip
none
patch v1
none
mylyn/context/zip
none
patch v2
thomas.ehrnhoefer: review?
mylyn/context/zip none

Description Thomas Ehrnhoefer CLA 2009-12-08 14:08:46 EST
Sometimes a connector has a reason to prohibit the user from creating a task repository by itself (e.g. the connector manages it's task repositories some other way).
Comment 1 Steffen Pingel CLA 2009-12-08 14:18:51 EST
Thomas, would you be interested in providing a patch? I think it should be as simple as adding a AbstractRepositoryConnector.canCreateRepository() method that is checked in the relevant places (see context).
Comment 2 Steffen Pingel CLA 2009-12-08 14:18:55 EST
Created attachment 154046 [details]
mylyn/context/zip
Comment 3 Thomas Ehrnhoefer CLA 2009-12-08 14:56:23 EST
Created attachment 154051 [details]
patch v1

This might do the trick (works in my test scenario). Hope I did not forget another entry point for adding a repository...
Comment 4 Thomas Ehrnhoefer CLA 2009-12-08 14:56:27 EST
Created attachment 154052 [details]
mylyn/context/zip
Comment 5 Steffen Pingel CLA 2009-12-08 15:51:40 EST
Please take a look at TaskRepositoryParameterValues. I believe it may need a filter as well or the command contribution for adding a task repository needs to be modified.
Comment 6 Thomas Ehrnhoefer CLA 2009-12-08 16:11:38 EST
Created attachment 154058 [details]
patch v2

Do you mean something like that?
Comment 7 Thomas Ehrnhoefer CLA 2009-12-08 16:11:45 EST
Created attachment 154059 [details]
mylyn/context/zip
Comment 8 Steffen Pingel CLA 2009-12-08 16:38:03 EST
Yes, that looks good. I'll merge this once we are increasing version numbers to 3.4.
Comment 9 Thomas Ehrnhoefer CLA 2009-12-08 16:49:46 EST
great, thanks.
Comment 10 Steffen Pingel CLA 2010-02-03 14:14:18 EST
Patch applied to head. Thanks Thomas!