Search code examples
flashdevelophaxe

How do I add a new file template in FlashDevelop


I am looking to make a Haxe file template for FlashDevelop (or find an existing one) so that I can right click > Add > New Haxe File...

How do I do this?

Edit: Was able to get a file, however the package name does not load (i.e. start of the file may be:

package scenes;

However, all I am getting is:

package ;

This is the *.fdt file I am using:

package $(Package);

/**
$(CBI)* ...
$(CBI)* @author $(DefaultUser)
$(CBI)*/
class $(FileName) $(CSLB){

    public function new() $(CSLB){
        $(EntryPoint)
    }
}

Edit2: Had to change:

package $(Package);

to

package $(TypPkg);

then right click the folder that is the package and click 'Add Source Path'.

Thanks to @Philippe for pointing me on the right path and giving the answer to the bulk of the question.


Solution

  • You can add new file templates in your FD Templates directory (Tools > User Config Files...)

    • /Templates/*: templates shared between all languages
    • /Templates/ProjectFiles/{lang}/*: templates for a specific project language

    http://www.flashdevelop.org/wikidocs/index.php?title=Configuration