チェンジセット 906
- コミット日時:
- 2008/07/29 18:35:38 (4 年前)
- ファイル:
-
- as3/GeniusFramework/trunk/app-template/script/generate (更新) (6 diffs)
- as3/GeniusFramework/trunk/app-template/script/templates/Filter.as (追加)
- as3/GeniusFramework/trunk/app-template/script/templates/Model.as (更新) (1 diff)
- as3/GeniusFramework/trunk/app-template/script/templates/Renderer.mxml (更新) (1 diff)
- as3/GeniusFramework/trunk/app-template/script/templates/RendererBase.as (更新) (1 diff)
- as3/GeniusFramework/trunk/app-template/script/templates/Thread.as (更新) (1 diff)
- as3/GeniusFramework/trunk/app-template/script/templates/URLLoaderServiceThread.as (更新) (1 diff)
- as3/GeniusFramework/trunk/app-template/script/templates/View.mxml (更新) (1 diff)
- as3/GeniusFramework/trunk/app-template/script/templates/ViewBase.as (更新) (1 diff)
凡例:
- 変更無し
- 追加
- 削除
- 更新
- コピー
- 移動
as3/GeniusFramework/trunk/app-template/script/generate
r896 r906 5 5 type= 6 6 output= 7 subpackage= 7 8 8 9 9 10 # オプションをハンドリング 10 while getopts n:p:t:o: h opt11 while getopts n:p:t:o:s:h opt 11 12 do 12 13 case $opt in … … 19 20 o ) output=$OPTARG 20 21 ;; 22 s ) subpackage=$OPTARG 23 ;; 21 24 h ) echo '使用方法: generate [<オプション>] [名前] 22 バージョン 1.0. 125 バージョン 1.0.2 23 26 24 27 利用可能なオプション: 25 28 -n クラスの名前 26 29 -p クラスのパッケージ(デフォルトは"application"です。) 30 -s クラスのサブパッケージ 27 31 -t クラスのタイプ("View", "Model", "Thread" を指定することが出来ます。デフォルトは "View") 28 32 -o 出力先(指定しない場合は、パッケージとタイプから出力先を決めます) … … 68 72 then 69 73 type=Model 74 elif [ ${name%*Filter} != $name ] 75 then 76 type=Filter 70 77 elif [ ${name%*Thread} != $name ] 71 78 then … … 77 84 type=View 78 85 fi 86 fi 87 88 # パッケージの調整 89 if [ $type = Model ] 90 then 91 package=${package}.models 92 93 elif [ $type = Filter ] 94 then 95 package=${package}.models 96 97 elif [ $type = View ] 98 then 99 package=${package}.views 100 101 elif [ $type = Renderer ] 102 then 103 package=${package}.views 104 105 elif [ $type = Thread ] 106 then 107 package=${package}.threads 108 109 elif [ $type = URLLoaderServiceThread ] 110 then 111 package=${package}.threads 112 79 113 else 80 if [ $type != Model ] 81 then 82 if [ $type != View ] 83 then 84 if [ $type != Renderer ] 85 then 86 if [ $type != Thread ] 87 then 88 if [ $type != URLLoaderServiceThread ] 89 then 90 echo 'Error: type must be "Model" or "View" or "Thread"' 91 exit 92 fi 93 fi 94 fi 95 fi 96 fi 114 echo 'Error: type must be "Model" or "View" or "Thread"' 115 exit 116 fi 117 118 # サブディレクトリの調整 119 if [ ${subpackage:-0} != 0 ] 120 then 121 package=${package}.${subpackage} 97 122 fi 98 123 … … 103 128 then 104 129 output=${path}/../src/${package_path} 105 106 if [ $type = View ]107 then108 output=$output/views109 elif [ $type = Renderer ]110 then111 output=$output/views112 elif [ $type = Model ]113 then114 output=$output/models115 elif [ $type = Thread ]116 then117 output=$output/threads118 elif [ $type = URLLoaderServiceThread ]119 then120 output=$output/threads121 fi122 130 fi 123 131 … … 157 165 158 166 echo created ${output}/${name}.as 167 168 elif [ $type = Filter ] 169 then 170 sed -e "s/\[% name %]/$name/g" ${template}/Filter.as | 171 sed -e "s/\[% package %]/$package/g" > genius-tmp 172 mv genius-tmp ${output}/${name}.as 173 174 echo created ${output}/${name}.as 159 175 160 176 elif [ $type = Thread ] as3/GeniusFramework/trunk/app-template/script/templates/Model.as
r849 r906 1 package [% package %] .models1 package [% package %] 2 2 { 3 3 import jp.seagirl.genius.models.Model; as3/GeniusFramework/trunk/app-template/script/templates/Renderer.mxml
r896 r906 1 1 <?xml version="1.0" encoding="utf-8"?> 2 2 <[% name %]Base 3 xmlns="[% package %]. views.*"3 xmlns="[% package %].*" 4 4 xmlns:mx="http://www.adobe.com/2006/mxml" 5 5 xmlns:genius="http://seagirl.jp/genius"> as3/GeniusFramework/trunk/app-template/script/templates/RendererBase.as
r896 r906 1 package [% package %] .views1 package [% package %] 2 2 { 3 3 import jp.seagirl.genius.views.ItemRenderer; as3/GeniusFramework/trunk/app-template/script/templates/Thread.as
r849 r906 1 package [% package %] .threads1 package [% package %] 2 2 { 3 3 import jp.seagirl.genius.threads.GeniusThread; as3/GeniusFramework/trunk/app-template/script/templates/URLLoaderServiceThread.as
r870 r906 1 package [% package %] .threads.event1 package [% package %] 2 2 { 3 3 import flash.errors.IOError; as3/GeniusFramework/trunk/app-template/script/templates/View.mxml
r849 r906 1 1 <?xml version="1.0" encoding="utf-8"?> 2 2 <[% name %]Base 3 xmlns="[% package %]. views.*"3 xmlns="[% package %].*" 4 4 xmlns:mx="http://www.adobe.com/2006/mxml" 5 5 xmlns:genius="http://seagirl.jp/genius"> as3/GeniusFramework/trunk/app-template/script/templates/ViewBase.as
r849 r906 1 package [% package %] .views1 package [% package %] 2 2 { 3 3 import jp.seagirl.genius.views.ViewBase;

