Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 148378 - refactor AbstractRepositorySettingsPage for more flexibility
Summary: refactor AbstractRepositorySettingsPage for more flexibility
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: 0.7   Edit
Assignee: Steffen Pingel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-23 08:32 EDT by Steffen Pingel CLA
Modified: 2006-07-05 23:10 EDT (History)
2 users (show)

See Also:


Attachments
Adds boolean flags to enable/disable anonymous login, timezone and encoding (12.14 KB, patch)
2006-06-23 09:29 EDT, Steffen Pingel CLA
no flags Details | Diff
Test case and fix for anonymous login mode (7.71 KB, patch)
2006-07-01 19:20 EDT, Steffen Pingel CLA
no flags Details | Diff
mylar/context/zip (11.34 KB, application/octet-stream)
2006-07-01 19:20 EDT, Steffen Pingel CLA
no flags Details
Test case and fix (10.64 KB, patch)
2006-07-05 07:49 EDT, Steffen Pingel CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Steffen Pingel CLA 2006-06-23 08:32:33 EDT
Since TaskRepository is now extensible (bug 146396) and task repositories require different kinds of settings, AbstractRepositorySettingsPage should be made more flexible. Part of this has been discussed in bug 145123 (comment #12) and bug 146334 (comment #7).

For Trac the following settings are required:
 
 * Repostitory URL
 * Optional anonymous login, otherwise username and password
 * No selection of timezome and encoding
Comment 1 Steffen Pingel CLA 2006-06-23 09:29:06 EDT
Created attachment 45170 [details]
Adds boolean flags to enable/disable anonymous login, timezone and encoding

The patch adds boolean flags to AbstractRepositorySettingsPage to enable or disable controls. Let me know if this makes any sense and I'll provide a test case.
Comment 2 Eugene Kuleshov CLA 2006-06-23 09:45:44 EDT
Web based repository would need the following settings:

* Repository URL; This one is not really needed anywhere in connector but forced by API)
* URL for creating new tasks
* Task prefix URL; This one is probably not needed, except for getRepositoryUrlFromTaskUrl() method, and it can be acually overriden in the query, because some repositories have different task prefixes for categories, e.g. GFoerge and SourceForge require project and group (bug, feature, etc) in the task url.

Oh, and by the way, it is really time to introduce repository description. Every time I open new issue wizard I spend few seconds searching trough registered repositories. Well, you can gurss that  http://opensource.atlassian.com/projects/spring/ is Jira for spring framework, but it would be easier if it just say that in the repository label.

So, I think it would be the best to allow to specify custom settings page and abstract one should use GridLayout and not have any controls (maybe except description and repository URL). Besides, visual editors does not work very well with such abstract classes when controls are defined somehere.

Another thing, it is probably worth to move all repository auth info away from the settings page and request it on demand (like CVS does).
Comment 3 Mik Kersten CLA 2006-06-28 21:58:00 EDT
Patch applied.  This isn't yet ideal in part for the reasons Eugene mentions and we need more flexibility.  But while it should be easy for connectors to add custom properties I would like to have clients avoid having to creat all their own UI or manually turn on/off the visibility of the properties.  This is because here is an overlap with capabilities (e.g. timezone information is relevant if a connector has an IOfflineHandler). But for now we can use the generic web connector to drive the flexibility
Comment 4 Steffen Pingel CLA 2006-07-01 19:20:24 EDT
Created attachment 45640 [details]
Test case and fix for anonymous login mode

The patch fixes a NullPointerException when setNeedAnonymousLogin(true) has been invoked.

Having a check box for anonymous login that disables components when selected seems a bit counter intuitive. Maybe radio buttons like the ones used for the encoding setting would be better.
Comment 5 Steffen Pingel CLA 2006-07-01 19:20:54 EDT
Created attachment 45641 [details]
mylar/context/zip
Comment 6 Mik Kersten CLA 2006-07-05 02:13:43 EDT
Patch only contains the test case and not the changes to tasklist.ui.wizards, so I could not apply.

I think that disabling the login by specifying anonymous is reasonable for now, and very similar to what the radio button would do anyway.  But yes, the latter is probably better and once we start playing with the Trac connector we can finesse the UI.
Comment 7 Steffen Pingel CLA 2006-07-05 07:49:36 EDT
Created attachment 45745 [details]
Test case and fix

This time the patch should include the fix.
Comment 8 Mik Kersten CLA 2006-07-05 23:09:22 EDT
Patch applied.  Excellent on the test coverage!
Comment 9 Mik Kersten CLA 2006-07-05 23:10:20 EDT
Done.