Bug 241623 - Expose connection preferences in headless mode
Summary: Expose connection preferences in headless mode
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Buckminster (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Thomas Hallgren CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2008-07-22 04:18 EDT by Achim Demelt CLA
Modified: 2019-02-25 14:39 EST (History)
1 user (show)

See Also:


Attachments
Proposed patch exposing the connection preferences in headless mode (17.52 KB, patch)
2008-07-22 05:34 EDT, Achim Demelt CLA
thomas: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Achim Demelt CLA 2008-07-22 04:18:38 EDT
The new preference settings from Bug #241048 (connectionRetryCount and connectionRetryDelay) cannot be set in headless mode using the setpref command.

I investigated a bit and it seems that the appropriate prefmappings extensions are not registered. I would be willing to provide a patch for org.eclipse.buckmister.download, but encountered the following problem:

The prefmappings extension point declares the handler class to extend BasicPreferenceHandler. The extension point is defined in org.eclipse.buckminster.cmdline, the BasicPreferenceHandler class, however, is defined in org.eclipse.buckminster.core. Introducing a dependency from org.eclipse.buckmister.download to org.eclipse.buckminster.core is not possible, since this would result in a circular dependency. So, I cannot declare the prefmapping extension in org.eclipse.buckmister.download because I cannot extend the BasicPreferenceHandler class.

So, from my first glance at the buckminster code ;-) , I would say we'd have to move the BasicPreferenceHandler class to org.eclipse.buckminster.cmdline and change the extension point accordingly. For backwards compatibility we would have to let the existing BasicPreferenceHandler (from org.eclipse.buckminster.core) extend the new one (from org.eclipse.buckminster.cmdline).

Does that sound ok? If so, just say the word and, yes, I'd still be willing to provide a patch :-)
Comment 1 Thomas Hallgren CLA 2008-07-22 04:53:28 EDT
yes :-)
Comment 2 Achim Demelt CLA 2008-07-22 05:34:34 EDT
Created attachment 108042 [details]
Proposed patch exposing the connection preferences in headless mode

Here's the patch. Includes both the refactoring of the BasicPreferenceHandler class and the extensions for the connection preferences. Some notes:

* I put the new BasicPreferenceHandler class into the org.eclipse.buckminster.cmdline package. You might want to move it into a "prefs" subpackage, although it may be a little empty, containing only this one class...
* I used a [1.0.0,2.0.0) dependency range in the MANIFEST.MF, although the existing dependencies are all explicit versions. I personally prefer ranges within the compatibility bounds. Feel free to change that, of course.
* The new files have no copyright header. I don't know enough about the foundation's IP regulations, so I thought I better leave this to you ;-)

HTH,
 Achim
Comment 3 Thomas Hallgren CLA 2008-07-22 11:06:10 EDT
I'll review the patch later today. If all is well, I hope to get it into a release this week.
Comment 4 Thomas Hallgren CLA 2008-07-24 08:39:53 EDT
Patch applied. Thanks.
Comment 5 Achim Demelt CLA 2008-07-25 00:55:41 EDT
You're very welcome. Regarding the patch:

I hereby declare that I have authored the code, that I have the rights to
donate the code to Eclipse, and that I am submitting the code for 
inclusion in future Eclipse releases under the Eclipse Public License.