代码改变世界

FD2 模的 置

2010-04-10 15:01  宝宝合凤凰  阅读(379)  评论(0编辑  收藏  举报

http://blog.sina.com.cn/s/blog_65f69f4d0100hcqt.html一些配置

C:\Documents and Settings\Administrator\Local Settings\Application Data\FlashDevelop\Templates\ProjectFiles\AS3Project

自建的目录

C:\Documents and Settings\Administrator\Local Settings\Application Data\FlashDevelop\Templates\ProjectFiles\AS3Project\Owner

---------------------------------

打开菜单Tools->Custom Arguments…  单击左下角的Add按钮,在弹出的窗口右侧设置它们的默认值( 其中Key对应的是变量,Value是可设置的默认值)

==================

package $(CSLB){
 /**<< 版 本 注 释 >>
 $(CBI)****************************************
 $(CBI)* 项 目 名:   $(ProjectName)    (.fla)
 $(CBI)* 文 件 名:   $(FileName)    (.as)
    $(CBI)* Copyright(c):$(Copyright)
    $(CBI)* CLR 版本:  $(CLR)
    $(CBI)* 文件编号:  $(EntryPoint)
    $(CBI)* 创 建 人 :  $(DefaultUser)
    $(CBI)* 创建日期:  $(Timestamp)
 $(CBI)* 创建日期:  $$(#DateTime#=MM/dd/yyyy)  date created
 
 ***********************************************
 ***********************************************
 $(CBI)* 修 改 人:
    $(CBI)* 修改日期:
    $(CBI)* 备注描述:
 $(CBI)*
 $(CBI)*
 $(CBI)*
 ***********************************************/
 public class $(FileName)
 {
  import$(CSLB)
  
  public function $(FileName)( )
  {
   
  }
 }
 
}

 

======================

 

General variables:

rn$(SelText) — selected text
$(CurWord) — word at cursor position
$(Clipboard) — clipboard content rn$(Timestamp) — system time

$(CurFile) — current file
$(CurFilename) — current file’’s name
$(CurDir) — current file’’s directory

$(OpenFile) — show Open.. file dialog
$(SaveFile) — show Save As… file dialog
$(OpenDir) — show dialog to select a directory

$(DesktopDir) — user desktop directory
$(SystemDir) — Windows system directory
$(ProgramsDir) — Program Files directory
$(PersonalDir) — user directory
$(WorkingDir) — current working directory
$(AppDir) — FlashDevelop program directory
$(BaseDir) — FlashDevelop files
$(UserAppDir) — FlashDevelop user directory

Project related:
$(ToolsDir) — user Tools directory
$(OutputDir) — output file direcory
$(OutputName) — output file name
$(ProjectName) — project name
$(ProjectDir) — project directory
$(ProjectPath) — project file path

Hopefully, this has been enough information to get you started on making and editing your own custom templates. If you still have questions, I”d highly recommend the FlashDevelop forums

 

$(ProjectName) becomes @PROJECTNAME

 

保存该文件。 Now, when you add a new file to your project, “Singleton” should be an option.现在,当你添加一个新的文件到项目中,“单身”应该是一种选择。 All of the above code automatically gets put into the new file, and the special tags “$(tag)” are replaced with the appropriate data.上面的代码全部投入自动获取新的文件,特殊标记“$(标签)”,均与相应的数据所取代。

There are several special tags that can be used within the Template.有几个能在模板中使用的特殊标记。 I have not used them all, but here is a list that was posted by Philippe on the FlashDevelop forums :rnrn Snippets & templates variables:我没有使用过他们,但这里是一个名单,通过菲利普被张贴在全集论坛 :rnrn 片段及模板变量:
$(EntryPoint) — cursor position $(入口点) - 光标位置
$(CSLB) (“Coding Style Line Break”) — when generating code, tells where to insert a linebreak if the “Coding Style Type” option (program setting) is set to “Brace After Line”. $(CSLB)(“编码风格的行分隔符”) - 生成代码时,告诉在哪里,如果插入断行“编码风格类型”选项(程序设置)设置为“支撑后线”。

General variables: rn$(SelText) — selected text 一般变量:氡$(SelText) -选定的文本
$(CurWord) — word at cursor position $(CurWord) - 词的光标位置
$(Clipboard) — clipboard content rn$(Timestamp) — system time $(剪贴板) - 剪贴板的内容氡$(时间戳) - 系统时间

$(CurFile) — current file $(CurFile) - 当前文件
$(CurFilename) — current file''s name $(CurFilename) - 当前file'的名字
$(CurDir) — current file''s directory $(curdir的) - 当前file'的目录

$(OpenFile) — show Open.. $(OpenFile) - 显示打开.. file dialog文件对话框
$(SaveFile) — show Save As… file dialog $(打开文件) - 显示文件对话框另存为...
$(OpenDir) — show dialog to select a directory $(OpenDir) - 显示对话框,选择一个目录

$(DesktopDir) — user desktop directory $(DesktopDir) - 用户的桌面目录
$(SystemDir) — Windows system directory $(SystemDir) - Windows系统目录
$(ProgramsDir) — Program Files directory $(ProgramsDir) - Program Files目录
$(PersonalDir) — user directory $(PersonalDir) - 用户目录
$(WorkingDir) — current working directory $(WorkingDir) - 当前工作目录
$(AppDir) — FlashDevelop program directory $(AppDir) - 全集程序目录
$(BaseDir) — FlashDevelop files $(BaseDir) - 全集文件
$(UserAppDir) — FlashDevelop user directory $(UserAppDir) - 全集用户目录

Project related: 项目相关:
$(ToolsDir) — user Tools directory $(ToolsDir) - 用户工具目录
$(OutputDir) — output file direcory $(OutputDir) - 输出文件direcory
$(OutputName) — output file name $(OutputName) - 输出文件的名称
$(ProjectName) — project name $(项目名称) - 项目名称
$(ProjectDir) — project directory $(ProjectDir) - 项目目录
$(ProjectPath) — project file path $(ProjectPath) - 项目文件路径

Hopefully, this has been enough information to get you started on making and editing your own custom templates.但愿,这是足够的信息让你开始制作和编辑您自己的自定义模板。 If you still have questions, I”d highly recommend the FlashDevelop forums .如果你仍然有问题,我的“D高度推荐全集论坛