commit 9b600c4ccd1cae98f90d4b34a33db1e38e74c10e
Author: Chris Bush <christopher.bush@telvent.com>
Date:   Fri May 24 17:53:53 2013 -0400

    Added support for custom workspace checkbox on job generator configuration page

diff --git a/src/main/java/org/jenkinsci/plugins/jobgenerator/JobGenerator.java b/src/main/java/org/jenkinsci/plugins/jobgenerator/JobGenerator.java
index 17aab18..221be9f 100755
--- a/src/main/java/org/jenkinsci/plugins/jobgenerator/JobGenerator.java
+++ b/src/main/java/org/jenkinsci/plugins/jobgenerator/JobGenerator.java
@@ -29,13 +29,10 @@ import hudson.Launcher;
 import hudson.model.*;
 import hudson.model.Descriptor.FormException;
 import hudson.model.ParameterDefinition;
-import hudson.model.ParameterDefinition.ParameterDescriptor;
 import hudson.model.ParametersDefinitionProperty;
 import hudson.model.Queue.FlyweightTask;
 import hudson.model.labels.LabelAtom;
 import hudson.scm.PollingResult;
-import hudson.scm.NullSCM;
-import hudson.scm.SCM;
 import hudson.triggers.SCMTrigger.SCMTriggerCause;
 import hudson.triggers.TimerTrigger.TimerTriggerCause;
 import hudson.util.AlternativeUiTextProvider;
@@ -43,14 +40,10 @@ import hudson.util.FormValidation;
 
 import java.io.File;
 import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashSet;
 import java.util.List;
-import java.util.Set;
 
 import javax.servlet.ServletException;
 
-import jenkins.model.Jenkins;
 import jenkins.util.TimeDuration;
 
 import net.sf.json.JSONObject;
@@ -83,6 +76,7 @@ public class JobGenerator extends Project<JobGenerator, GeneratorRun>
         super(parent, name);
     }
 
+    @Override
     public void doBuild(StaplerRequest req,
                         StaplerResponse rsp,
                         TimeDuration delay) throws IOException ,
@@ -91,6 +85,22 @@ public class JobGenerator extends Project<JobGenerator, GeneratorRun>
         super.doBuild(req, rsp, delay);
     }
 
+
+    /**
+     * See {@link #setCustomWorkspace(String)}.
+     */
+    private String customWorkspace;
+
+    @Override
+    public String getCustomWorkspace() {
+        return customWorkspace;
+    }
+
+    @Override
+    public void setCustomWorkspace(String customWorkspace) {
+        this.customWorkspace = customWorkspace;
+    } 
+
     @Override
     public boolean isParameterized() {
         // not working for now since doBuild method of jenkins core does not
@@ -191,6 +201,8 @@ public class JobGenerator extends Project<JobGenerator, GeneratorRun>
             if(o.has(k)){ this.generatedJobName = o.getString(k); }
             k = "generatedDisplayJobName";
             if(o.has(k)){ this.generatedDisplayJobName = o.getString(k); }
+            k = "customWorkspace";
+            if(o.has(k)) {this.customWorkspace = o.getString(k);}
         }
     }
 
diff --git a/src/main/resources/org/jenkinsci/plugins/jobgenerator/JobGenerator/configure-advanced.jelly b/src/main/resources/org/jenkinsci/plugins/jobgenerator/JobGenerator/configure-advanced.jelly
new file mode 100644
index 0000000..cc9a141
--- /dev/null
+++ b/src/main/resources/org/jenkinsci/plugins/jobgenerator/JobGenerator/configure-advanced.jelly
@@ -0,0 +1,8 @@
+<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form" xmlns:p="/lib/hudson/project">
+  <f:optionalBlock name="customWorkspace" title="${%Use custom workspace}" checked="${it.customWorkspace!=null}"
+      help="/help/project-config/custom-workspace.html">
+    <f:entry title="${%Directory}">
+      <f:textbox name="customWorkspace.directory" value="${it.customWorkspace}" />
+    </f:entry>
+  </f:optionalBlock>
+</j:jelly>
\ No newline at end of file
