2

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.

Gama11
  • 31,714
  • 9
  • 78
  • 100
Riunix
  • 53
  • 6
  • Not much. Most of what I can find through Google talks about project templates, but nothing for a single file. I attempted the FlashDevelop site, but it seemed to be down, or possibly just something wrong with my internet connection at the time. – Riunix Jul 26 '13 at 23:53
  • Why do you need a template for a single file? – Slater Victoroff Jul 28 '13 at 03:00
  • It's more so for efficiency. Being able to 'Right Click > Add > New HaXe File...' to come out with a simple HaXe file would save more time over the course of creating multiple files (i.e. having to modify new file's extension from '.txt' to '.hx', adding in package name, etc.) Currently fiddling around with a *.fdt file, based on answer from Philippe – Riunix Jul 29 '13 at 17:03

1 Answers1

1

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

Gama11
  • 31,714
  • 9
  • 78
  • 100
Philippe
  • 2,621
  • 1
  • 19
  • 20