Se nesta altura está a pensar o que será o FlashDevelop, aconselho a leitura de um post anterior (Flash em ambiente Open Source).
A utilização de templates pode aumentar bastante a produtividade ganhando tempo em tarefas repetitivas, e.g. ao utilizar uma framework regularmente.
Ao criar um projecto já existem alguns disponíveis (Class, Event, MXML, etc) que servem a maioria dos propósitos, mas podemos adaptar/criar templates às nossas preferências pessoais (ou equipa) e assim uniformizar o código.
Exemplo
Criar o um interface com um bloco de comentário com uma licença (MIT neste caso).
- "Tools->Custom Arguments" inserir um par de valores, sendo assim possível adicionar qualquer argumento não disponível.
- "Tools->Applications Files" abre a pasta onde estão os ficheiros que permitem personalizar a aplicação. Crie um ficheiro "Interface.as.fdt" na pasta "./Templates/ProjectFiles/AS3Project/" com o seguinte:
package $(Package)$(CSLB) {
public interface $(FileName)$(CSLB) {
$(EntryPoint)
}
}
Agora está disponível para adicionar a qualquer projecto AS3.

O código gerado:
Copyright (c) 2008 Nuno Rosa, http://www.nunorosa.com
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
*/
package com.nunorosa.sample
{
public interface SampleInterface
{
}
}
Simples e eficaz, mais informações disponíveis na documentação do FlashDevelop.
Categorias : AS3, Actionscript, Open Source



