StephanPartzsch / FDT-code-templates

Code templates are code snippets that ease the process of coding ActionScript 3

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FDT Code Templates

This repository contains packages (in this case XML files) of some helpful code templates which can be used in FDT. The purpose is to have shortcuts for some code snippets that ease the process of coding ActionScript 3 and make it also faster.

Packages

  • General Templates - Some general templates that can be handy

    • i.e. creating a text field with a text format
  • Parsley Templates - Templates to shorten the work with Parsley. These templates were created for Parsley version 2.4

    • Template for Inject metadata tag
    • Template for MessageDispatcher metadata tag
    • Method stub for Init metadata tag
    • Method stub for CommandComplete metadata tag
    • Method stub for CommandResult metadata tag
    • Method stub for CommandError metadata tag
    • Method stub for MessageHandler metadata tag
  • Logging Templates - Templates to shorten the work with Spicelib Logging. These templates were created for Spicelib version 2.4

    • Template for adding a logger instance as a field
    • Templates for adding all log level statements (e.g. DEBUG, INFO, ...)
    • Template for adding info statement with enclosing method name
  • Unit Test Templates - Templates for writing unit tests with flex unit. These templates were created for FlexUnit version 4.1

    • Method stub for Before metadata tag
    • Method stub for After metadata tag
    • Method stub for Test metadata tag
  • Mock Templates - Templates for writing mocks with mockito-flex.

    • Template for Rule metadata tag
    • Template for Mock metadata tag

Import

Just open preferences in FDT (CMD+,) and go to FDT -> Editor -> Templates. Then click on the right side Import... and choose one of the downloaded XML files.

Usage

Each template comes with a certain name. Type one of the name while coding and FDT shows you all appropriate templates. Choose one and hit the ENTER key. If the template contains some customizable variables, you can put through with the TAB key.

Further Information

See the FDT tutorial about Creating Code Templates

About

Code templates are code snippets that ease the process of coding ActionScript 3