|
Re: How to enable a publisher by default?: msg#00105java.hudson.user
One approach that I can think of is not to implement it as a Publisher but rather use a listener (we don't have BuildListener right now, but we can add one.) You won't get any per-job configuration, nor jobs don't get opportunity to disable something, but depending on what you are trying to do, this might be a good trade-off (like, say, producing a log.) The other approach I can think of is to allow Publishers to nominate themselves as "enabled by default", presumably because they are important enough. The part that's not clear to me is how Publishers know that they should be enabled by default. We already have perhaps 10 or so publishers, yet I've never encountered a case where I thought it should be enabled by default. So I'm wondering what is so different with your publisher that makes it special. Perhaps another approach could be to let publishers fill in form fields even if it's disabled --- in this way, the only thing the user needs to do is to click the checkbox, and he gets everything else pre-configured. This might be less intrusive, as the user still retains the perception of the control. Finally, your hack of calling addPublisher should also work. You just need to call save() after that to persist that setting. Eric Crahen wrote: For some of the plugins I'm writing, I'm creating a global config. I'd like -- Kohsuke Kawaguchi Sun Microsystems kohsuke.kawaguchi@xxxxxxx
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Dependency between Publishers?, Eric Crahen |
|---|---|
| Next by Date: | Re: Dependency between Publishers?, Kohsuke Kawaguchi |
| Previous by Thread: | Re: How to enable a publisher by default?, Eric Crahen |
| Next by Thread: | Re: How to enable a publisher by default?, Eric Crahen |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |