mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-17 22:12:25 +00:00
added filtering support
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@16420 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
1 parent
3eba2c66df
commit
922d3ca090
1 file changed
+6
@@ -25,6 +25,8 @@ package hudson.tasks;
|
||||
|
||||
import hudson.model.AbstractProject;
|
||||
import hudson.model.Descriptor;
|
||||
import hudson.model.Hudson;
|
||||
import hudson.model.AbstractProject.AbstractProjectDescriptor;
|
||||
import hudson.Extension;
|
||||
import hudson.util.DescriptorList;
|
||||
import hudson.maven.MavenReporter;
|
||||
@@ -54,7 +56,11 @@ public class BuildWrappers {
|
||||
*/
|
||||
public static List<Descriptor<BuildWrapper>> getFor(AbstractProject<?, ?> project) {
|
||||
List<Descriptor<BuildWrapper>> result = new ArrayList<Descriptor<BuildWrapper>>();
|
||||
Descriptor pd = Hudson.getInstance().getDescriptor((Class)project.getClass());
|
||||
|
||||
for (Descriptor<BuildWrapper> w : BuildWrapper.all()) {
|
||||
if (pd instanceof AbstractProjectDescriptor && !((AbstractProjectDescriptor)pd).isApplicable(w))
|
||||
continue;
|
||||
if (w instanceof BuildWrapperDescriptor) {
|
||||
BuildWrapperDescriptor bwd = (BuildWrapperDescriptor) w;
|
||||
if(bwd.isApplicable(project))
|
||||
|
||||
Reference in new issue
Block a user