hudson.model.AutoCompletionCandidates Java Examples
The following examples show how to use
hudson.model.AutoCompletionCandidates.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: RequiredResourcesProperty.java From lockable-resources-plugin with MIT License | 6 votes |
public static AutoCompletionCandidates doAutoCompleteResourceNames( @QueryParameter String value) { AutoCompletionCandidates c = new AutoCompletionCandidates(); value = Util.fixEmptyAndTrim(value); if (value != null) { for (LockableResource r : LockableResourcesManager.get() .getResources()) { if (r.getName().startsWith(value)) c.add(r.getName()); } } return c; }
Example #2
Source File: ProjectLabelsProvider.java From gitlab-plugin with GNU General Public License v2.0 | 5 votes |
public AutoCompletionCandidates doAutoCompleteLabels(Job<?, ?> job, String query) { AutoCompletionCandidates result = new AutoCompletionCandidates(); // show all suggestions for short strings if (query.length() < 2) { result.add(getProjectLabelsAsArray(job)); } else { for (String branch : getProjectLabelsAsArray(job)) { if (branch.toLowerCase().contains(query.toLowerCase())) { result.add(branch); } } } return result; }
Example #3
Source File: ProjectBranchesProvider.java From gitlab-plugin with GNU General Public License v2.0 | 5 votes |
public AutoCompletionCandidates doAutoCompleteBranchesSpec(Job<?, ?> job, String query) { AutoCompletionCandidates result = new AutoCompletionCandidates(); // show all suggestions for short strings if (query.length() < 2) { result.add(getProjectBranchesAsArray(job)); } else { for (String branch : getProjectBranchesAsArray(job)) { if (branch.toLowerCase().contains(query.toLowerCase())) { result.add(branch); } } } return result; }
Example #4
Source File: RequiredResourcesProperty.java From lockable-resources-plugin with MIT License | 5 votes |
public AutoCompletionCandidates doAutoCompleteLabelName( @QueryParameter String value) { AutoCompletionCandidates c = new AutoCompletionCandidates(); value = Util.fixEmptyAndTrim(value); for (String l : LockableResourcesManager.get().getAllLabels()) if (value != null && l.startsWith(value)) c.add(l); return c; }
Example #5
Source File: AggregatedTestResultPublisher.java From junit-plugin with MIT License | 4 votes |
public AutoCompletionCandidates doAutoCompleteJobs(@QueryParameter String value, @AncestorInPath Item self, @AncestorInPath ItemGroup container) { // Item.READ checked inside return AutoCompletionCandidates.ofJobNames(Job.class,value,self,container); }
Example #6
Source File: GitLabPushTrigger.java From gitlab-plugin with GNU General Public License v2.0 | 4 votes |
public AutoCompletionCandidates doAutoCompleteIncludeBranchesSpec(@AncestorInPath final Job<?, ?> job, @QueryParameter final String value) { return ProjectBranchesProvider.instance().doAutoCompleteBranchesSpec(job, value); }
Example #7
Source File: GitLabPushTrigger.java From gitlab-plugin with GNU General Public License v2.0 | 4 votes |
public AutoCompletionCandidates doAutoCompleteExcludeBranchesSpec(@AncestorInPath final Job<?, ?> job, @QueryParameter final String value) { return ProjectBranchesProvider.instance().doAutoCompleteBranchesSpec(job, value); }
Example #8
Source File: GitLabPushTrigger.java From gitlab-plugin with GNU General Public License v2.0 | 4 votes |
public AutoCompletionCandidates doAutoCompleteIncludeMergeRequestLabels(@AncestorInPath final Job<?, ?> job, @QueryParameter final String value) { return ProjectLabelsProvider.instance().doAutoCompleteLabels(job, value); }
Example #9
Source File: GitLabPushTrigger.java From gitlab-plugin with GNU General Public License v2.0 | 4 votes |
public AutoCompletionCandidates doAutoCompleteExcludeMergeRequestLabels(@AncestorInPath final Job<?, ?> job, @QueryParameter final String value) { return ProjectLabelsProvider.instance().doAutoCompleteLabels(job, value); }
Example #10
Source File: LockStep.java From lockable-resources-plugin with MIT License | 4 votes |
public AutoCompletionCandidates doAutoCompleteResource(@QueryParameter String value) { return RequiredResourcesProperty.DescriptorImpl.doAutoCompleteResourceNames(value); }
Example #11
Source File: LockStepResource.java From lockable-resources-plugin with MIT License | 4 votes |
public AutoCompletionCandidates doAutoCompleteResource(@QueryParameter String value) { return RequiredResourcesProperty.DescriptorImpl.doAutoCompleteResourceNames(value); }
Example #12
Source File: SelectJobsBallColorFolderIcon.java From multi-branch-project-plugin with MIT License | 2 votes |
/** * Auto completion for jobs. * * @param value the user-entered value * @param container the folder being configured * @return candidates inside container based on value */ public AutoCompletionCandidates doAutoCompleteJobs(@QueryParameter String value, @AncestorInPath ItemGroup container) { return AutoCompletionCandidates.ofJobNames(Job.class, value, container); }