Changeset 7733
- Timestamp:
- 03/10/08 02:17:07 (5 years ago)
- Location:
- lang/java/utiljs/trunk
- Files:
-
- 6 modified
-
src/org/coderepos/utiljs/Arguments.java (modified) (2 diffs)
-
src/org/coderepos/utiljs/shell/Main.java (modified) (1 diff)
-
src/org/coderepos/utiljs/taskdefs/JSCompress.java (modified) (4 diffs)
-
src/org/coderepos/utiljs/taskdefs/JsDocToolkit.java (modified) (1 diff)
-
src/org/coderepos/utiljs/taskdefs/Yuic.java (modified) (2 diffs)
-
test/testcase.xml (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
lang/java/utiljs/trunk/src/org/coderepos/utiljs/Arguments.java
r6802 r7733 5 5 import java.util.*; 6 6 7 /** 8 * 可変長引数を作成するためのクラス 9 * @author shogo4405 10 * @since 0.0.2 11 */ 7 12 public class Arguments extends ArrayList<String> 8 13 { 9 14 private static final long serialVersionUID = -8908989881175550220L; 10 15 16 /** 17 * 第一引数がtrueのときに、第二引数以降の文字列を追加します。 18 * @param b 文字列の追加を許可するか否かのフラグ 19 * @param strs 可変長文字列 20 */ 11 21 public void addIf(boolean b, String... strs) 12 22 { … … 17 27 }; 18 28 29 /** 30 * 引数リストを文字列型の配列に変換します。 31 * @return 引数リスト 32 */ 19 33 public String[] toArray() 20 34 { -
lang/java/utiljs/trunk/src/org/coderepos/utiljs/shell/Main.java
r6802 r7733 6 6 public class Main 7 7 { 8 8 public static void main(String[] args) 9 { 10 11 }; 9 12 }; -
lang/java/utiljs/trunk/src/org/coderepos/utiljs/taskdefs/JSCompress.java
r6802 r7733 15 15 */ 16 16 protected Pattern defaultType = Pattern.compile(".*\\.js$"); 17 18 /**19 * 圧縮対象外のファイルもコピーするかのフラグ20 */21 private boolean copy = false;22 17 23 18 /** … … 63 58 * 単一ファイルの操作 64 59 */ 60 65 61 protected abstract void doFileOperation(File srcFile, File destFile); 66 62 … … 88 84 protected void doFileOperations(String srcDir, String destDir){ 89 85 doFileOperations(new File(srcDir), new File(destDir)); 90 };91 92 /**93 * ファイルコピー操作94 */95 protected void doCopyOperation(File srcFile, File destFile)96 {97 Copy copy = new Copy();98 copy.setFile(srcFile);99 copy.setTofile(destFile);100 copy.execute();101 86 }; 102 87 … … 130 115 131 116 /** 132 * 圧縮対象外もコピーする必要があるか。133 * @return134 */135 protected boolean isPermitedCopyOperation(){136 return copy;137 };138 139 /**140 * copy用のセッタ141 */142 public void setCopy(boolean b){143 copy = b;144 };145 146 /**147 * copy用のゲッタ148 */149 public boolean getCopy(){150 return copy;151 };152 153 /**154 117 * srcDir用のセッタ 155 118 */ 156 119 public void setSrcDir(File d){ 157 120 srcDir = d; 158 } 121 }; 159 122 160 123 /** -
lang/java/utiljs/trunk/src/org/coderepos/utiljs/taskdefs/JsDocToolkit.java
r6802 r7733 1 1 package org.coderepos.utiljs.taskdefs; 2 2 3 public class JsDocToolkit 3 // import 4 import java.io.*; 5 import org.coderepos.utiljs.Arguments; 6 7 /** 8 * JSDoocToolkitをAntから利用する為のクラスです。 9 * @author shogo4405 10 */ 11 public class JSDocToolkit 4 12 { 13 /** 14 * Documentationテンプレート 15 */ 16 private String template = new String("sunny"); 5 17 6 } 18 /** 19 * 処理内容メッセージ 20 */ 21 private boolean verbose = false; 22 23 /** 24 * JSDoc出力先ディレクト 25 */ 26 private File destDir = null; 27 28 /** 29 * 文字コード 30 */ 31 private String encoding = null; 32 33 /** 34 * 許可する拡張子 35 */ 36 private String extention = null; 37 38 public void execute() 39 { 40 41 }; 42 43 /** 44 * verboseのセッタ 45 */ 46 public void setVerbose(boolean b){ 47 verbose = b; 48 }; 49 50 /** 51 * verboseのゲッタ 52 */ 53 public boolean getVerbose(){ 54 return verbose; 55 }; 56 57 /** 58 * encodingのセッタ 59 */ 60 public void setEncoding(String s){ 61 encoding = s; 62 }; 63 64 /** 65 * encodingのゲッタ 66 */ 67 public String getEncoding(){ 68 return encoding; 69 }; 70 71 /** 72 * destDirのセッタ 73 */ 74 public void setDestDir(File d){ 75 destDir = d; 76 }; 77 78 /** 79 * destDirのゲッタ 80 */ 81 public File getDestDir(){ 82 return destDir; 83 }; 84 }; -
lang/java/utiljs/trunk/src/org/coderepos/utiljs/taskdefs/Yuic.java
r6802 r7733 21 21 22 22 /** メッセージ処理をさせるか? **/ 23 private boolean verbose = false;23 private boolean verbose = true; 24 24 25 25 /** 1行の文字数 **/ … … 57 57 protected void doFileOperation(File srcFile, File destFile) 58 58 { 59 if(!isSuitableFileOperation(srcFile)) 60 { 61 if(isPermitedCopyOperation()) 62 { 63 createDirectories(destFile); 64 doCopyOperation(srcFile, destFile); 65 }; 59 if(!isSuitableFileOperation(srcFile)){ 66 60 return; 67 61 }; -
lang/java/utiljs/trunk/test/testcase.xml
r6555 r7733 9 9 </target> 10 10 11 <target name="yuic2"> 12 <yuic srcDir="test/sample" destDir="result/yuic2" copy="true" /> 13 </target> 14 11 15 <!-- All --> 12 <target name="all" depends="yuic " />16 <target name="all" depends="yuic,yuic2" /> 13 17 14 18 </project>
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)