Just ran into this.
For validation, there is a static method available; that might need further generalization, but my use is outside a job context anyway (label expression for a tool installer).
But there is no equivalent for auto-completion. The code is non-trivial enough no to just duplicate it (even leaving out that duplication is bad), and because I don't need it in a project context, I can't use @AncestorInPath to get at the descriptor instance either. So for now I seem to be stuck with
@SuppressWarnings("unused")
public AutoCompletionCandidates doAutoCompleteLabel(@QueryParameter String value) {
return new FreeStyleProject.DescriptorImpl().doAutoCompleteLabel(value);
}
which is... suboptimal to say the least.
I'll look into a PR with an API proposal (initially low-ambition, so not attempting to generalize for Job yet).
Just ran into this.
For validation, there is a static method available; that might need further generalization, but my use is outside a job context anyway (label expression for a tool installer).
But there is no equivalent for auto-completion. The code is non-trivial enough no to just duplicate it (even leaving out that duplication is bad), and because I don't need it in a project context, I can't use @AncestorInPath to get at the descriptor instance either. So for now I seem to be stuck with
which is... suboptimal to say the least.
I'll look into a PR with an API proposal (initially low-ambition, so not attempting to generalize for Job yet).