continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From och...@apache.org
Subject svn commit: r946094 - in /continuum/branches/continuum-flat-multi-module-updated/continuum-webapp/src/main: java/org/apache/maven/continuum/web/action/ resources/localization/ webapp/WEB-INF/jsp/
Date Wed, 19 May 2010 09:22:07 GMT
Author: oching
Date: Wed May 19 09:22:06 2010
New Revision: 946094

URL: http://svn.apache.org/viewvc?rev=946094&view=rev
Log:
replace checkboxes for checkout options when adding m2 projects with radio boxes

Modified:
    continuum/branches/continuum-flat-multi-module-updated/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddMavenTwoProjectAction.java
    continuum/branches/continuum-flat-multi-module-updated/continuum-webapp/src/main/resources/localization/Continuum.properties
    continuum/branches/continuum-flat-multi-module-updated/continuum-webapp/src/main/webapp/WEB-INF/jsp/addMavenTwoProject.jsp

Modified: continuum/branches/continuum-flat-multi-module-updated/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddMavenTwoProjectAction.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-flat-multi-module-updated/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddMavenTwoProjectAction.java?rev=946094&r1=946093&r2=946094&view=diff
==============================================================================
--- continuum/branches/continuum-flat-multi-module-updated/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddMavenTwoProjectAction.java
(original)
+++ continuum/branches/continuum-flat-multi-module-updated/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddMavenTwoProjectAction.java
Wed May 19 09:22:06 2010
@@ -51,10 +51,8 @@ public class AddMavenTwoProjectAction
     public static final String ERROR_READING_POM_EXCEPTION_MESSAGE = "Error reading POM";
 
     public static final String FILE_SCHEME = "file:/";
-
-    private boolean nonRecursiveProject;
     
-    private boolean checkoutInSingleDirectory;
+    private String checkoutOption;
 
     protected ContinuumProjectBuildingResult doExecute( String pomUrl, int selectedProjectGroup,
boolean checkProtocol,
                                                         boolean scmUseCache )
@@ -105,19 +103,32 @@ public class AddMavenTwoProjectAction
                 throw new ContinuumException( ERROR_READING_POM_EXCEPTION_MESSAGE, e );
             }
         }
-
-     // force set checkoutInCingleDirectory to false if adding the project as non-recursive
-        if( this.isNonRecursiveProject() )
+        
+        boolean nonRecursiveProject;
+        boolean checkoutInSingleDirectory;
+        
+        if( "checkoutInSingleDirectory".equals( checkoutOption ) )
         {
-            this.setCheckoutInSingleDirectory( false );
+            checkoutInSingleDirectory = true;
+            nonRecursiveProject = false;
         }
-        
+        else if( "nonRecursiveProject".equals( checkoutOption ) )
+        {
+            checkoutInSingleDirectory = false;
+            nonRecursiveProject = true;
+        }
+        else
+        {
+            checkoutInSingleDirectory = false;
+            nonRecursiveProject = false;
+        }
+
         if ( result == null )
         {
             result = getContinuum().addMavenTwoProject( pomUrl, selectedProjectGroup, checkProtocol,
scmUseCache,
-                                                        !this.isNonRecursiveProject(),
+                                                        !nonRecursiveProject,
                                                         this.getBuildDefinitionTemplateId(),
-                                                        this.isCheckoutInSingleDirectory()
);
+                                                        checkoutInSingleDirectory );
         }
 
         AuditLog event = new AuditLog( hidePasswordInUrl( pomUrl ), AuditLogConstants.ADD_M2_PROJECT
);
@@ -132,7 +143,7 @@ public class AddMavenTwoProjectAction
         event.log();
         return result;
     }
-
+    
     /**
      * @deprecated Use {@link #getPomFile()} instead
      */
@@ -164,24 +175,14 @@ public class AddMavenTwoProjectAction
     {
         setPomUrl( pomUrl );
     }
-
-    public boolean isNonRecursiveProject()
-    {
-        return nonRecursiveProject;
-    }
-
-    public void setNonRecursiveProject( boolean nonRecursiveProject )
-    {
-        this.nonRecursiveProject = nonRecursiveProject;
-    }
     
-    public boolean isCheckoutInSingleDirectory()
+    public String getCheckoutOption()
     {
-        return checkoutInSingleDirectory;
+        return checkoutOption;
     }
 
-    public void setCheckoutInSingleDirectory( boolean checkoutInSingleDirectory )
+    public void setCheckoutOption( String checkoutOption )
     {
-        this.checkoutInSingleDirectory = checkoutInSingleDirectory;
+        this.checkoutOption = checkoutOption;
     }
 }

Modified: continuum/branches/continuum-flat-multi-module-updated/continuum-webapp/src/main/resources/localization/Continuum.properties
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-flat-multi-module-updated/continuum-webapp/src/main/resources/localization/Continuum.properties?rev=946094&r1=946093&r2=946094&view=diff
==============================================================================
--- continuum/branches/continuum-flat-multi-module-updated/continuum-webapp/src/main/resources/localization/Continuum.properties
(original)
+++ continuum/branches/continuum-flat-multi-module-updated/continuum-webapp/src/main/resources/localization/Continuum.properties
Wed May 19 09:22:06 2010
@@ -340,6 +340,7 @@ add.m2.project.nonRecursiveProject = For
 add.m2.project.buildDefinitionTemplate = Build Definition Template
 add.m2.project.defaultBuildDefinition = Default
 add.m2.project.checkoutInSingleDirectory = Checkout multi-module project in single directory
+add.m2.project.checkoutInSeparateDirectories = Checkout multi-module project in separate
directories 
 
 # ----------------------------------------------------------------------
 # Page: AddProject (ant or shell)

Modified: continuum/branches/continuum-flat-multi-module-updated/continuum-webapp/src/main/webapp/WEB-INF/jsp/addMavenTwoProject.jsp
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-flat-multi-module-updated/continuum-webapp/src/main/webapp/WEB-INF/jsp/addMavenTwoProject.jsp?rev=946094&r1=946093&r2=946094&view=diff
==============================================================================
--- continuum/branches/continuum-flat-multi-module-updated/continuum-webapp/src/main/webapp/WEB-INF/jsp/addMavenTwoProject.jsp
(original)
+++ continuum/branches/continuum-flat-multi-module-updated/continuum-webapp/src/main/webapp/WEB-INF/jsp/addMavenTwoProject.jsp
Wed May 19 09:22:06 2010
@@ -81,8 +81,28 @@
                                          list="projectGroups" listKey="id" listValue="name"/>
                             </c:otherwise>
                             </c:choose>
-                            <s:checkbox label="%{getText('add.m2.project.nonRecursiveProject')}"
name="nonRecursiveProject" />
-                            <s:checkbox label="%{getText('add.m2.project.checkoutInSingleDirectory')}"
name="checkoutInSingleDirectory" />
+                            
+                            <s:label>
+                              <s:param name="desc">
+                                <table cellspacing="0" cellpadding="0">
+	                              <tbody>
+	                                <tr>
+	                                  <td><input name="checkoutOption" type="radio"
value="checkoutInSeparateDirectories" checked /></td>
+                                      <td><s:text name="add.m2.project.checkoutInSeparateDirectories"/></td>
+	                                </tr>
+	                                <tr>
+	                                  <td><input name="checkoutOption" type="radio"
value="checkoutInSingleDirectory"/></td>
+                                      <td><s:text name="add.m2.project.checkoutInSingleDirectory"/></td>
+	                                </tr>
+	                                <tr>
+	                                  <td><input name="checkoutOption" type="radio"
value="nonRecursiveProject"/></td>
+                                      <td><s:text name="add.m2.project.nonRecursiveProject"/></td>
+	                                </tr>
+	                              </tbody>
+	                            </table>
+                              </s:param>
+                            </s:label>	 
+                            
                             <s:select label="%{getText('add.m2.project.buildDefinitionTemplate')}"
name="buildDefinitionTemplateId"
                                        list="buildDefinitionTemplates" listKey="id" listValue="name"
headerKey="-1" 
                                        headerValue="%{getText('add.m2.project.defaultBuildDefinition')}"/>




Mime
View raw message