200 likes | 418 Views
COC 风味的 Flash Builder 代码生成脚本 Yi’s Eclipse Monkey Scripts for Flash Builder. Convention Generator By Yi Tan yi2004@gmail.com. 安装 Eclipse Monkey: Installing Eclipse Monkey: http://download.eclipse.org/technology/dash/update/. 1. 2. 3. 安装 Convention Generator 脚本
E N D
COC风味的 Flash Builder 代码生成脚本Yi’s Eclipse Monkey Scripts for Flash Builder Convention Generator By Yi Tan yi2004@gmail.com
安装 Eclipse Monkey: Installing Eclipse Monkey: http://download.eclipse.org/technology/dash/update/
1 2 3 安装 Convention Generator 脚本 Installing Convention Generator script SVN checkout from http://code.google.com/p/yis-eclipse-monkey-scripts-for-flash-builder/ 然后菜单条中即会出现此命令 Then the command should be available in the menu 将.js文件放置到“scripts” 子目录中 Put .js file to “scripts” sub folder
你输入 you type: propertyName:Number 快捷键: Alt + 1 Shortcut Key: Alt+1
会变成 it becomes: publicvarpropertyName:Number;
你输入 you type: propertyName:n 使用数据类型缩写更方便 Use abbreviation for data type declaration o : Object s : String b : Boolean a : Array n : Number i : int u : uint v : Vector x : XML
会变成 it becomes: publicvarpropertyName:Number;
你输入 you type: -propertyName:n 访问控制器用符号表示 Handy marks for access control +: public -: private *: protected
会变成 it becomes: privatevarpropertyName:Number;
你输入 you type: -propertyName:n= 会根据数据类型自动添加默认值 Automatically adds default values
会变成 it becomes: privatevar propertyName:Number= 0;
你输入 you type: *$classMember:a= $表明是类的属性 $ for class property
会变成 it becomes: protectedstaticvar classMember:Array= [];
你输入 you type: $$constantMember:s= $$表明是常量 根据习惯常量的名字统统大写 $$ for constant property Constant members always have upper case names
会变成 it becomes: publicstaticconst CONSTANT_MEMBER:String="";
你输入 you type: _internalProperty:i 下划线表明是内部属性,于是自动创建getter和setter读写器 Underscore is the core of getter and setters
会变成 it becomes: privatevar _internalProperty:int; publicfunctionget internalProperty():int { return _internalProperty; } publicfunctionset internalProperty(value:int):void { }
你输入 you type: -methodName():b () 是方法的好朋友 () is a method
会变成 it becomes: privatefunction methodName():Boolean { }
Want more magic? Fine, let me know Email: yi2004@gmail.com