Adding a mechanism for plugins to contribute to the global configuration page directly.

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@10642 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
kohsuke committed 2008-07-04 21:57:22 +00:00
1 parent 3cfc2e4e45
commit 2764d166a3
5 files changed
+75 -2

No files matched your search

+6
View File
@@ -758,6 +758,12 @@ public class Functions {
return buf.toString();
}
public static boolean hasView(Object it, String path) {
if(it==null) return false;
return it.getClass().getClassLoader().getResource(
it.getClass().getName().replace('.','/').replace('$','/')+'/'+path)!=null;
}
/**
* Can be used to check a checkbox by default.
* Used from views like {@code h.defaultToTrue(scm.useUpdate)}.