Copy link to clipboard
Copied
This question was posted in response to the following article: http://help.adobe.com/en_US/flashbuilder/using/WSe4e4b720da9dedb5344c6f711358acdda1d-7fff.html
Copy link to clipboard
Copied
Are there plans to support adding New File Templates in FB 4.6? It seems impossible currently to add a New File Template to FD. Even if you export a simple 'ActionScript Class' template to XML, changing the 'id', 'context' in the XML and import the file you don't get a new File Template in Flash Builder. The documentation has the word 'Add Template', but right now only altering existing File Templates exist.
Copy link to clipboard
Copied
As mentioned in the documentation, 'Add Template' is available only for Code Templates.
When it comes to file templates, they can only be edited. Same can then be exported as xml.
When you create a new ActionScript class, the template is picked up from here. However, if you have 2 templates for the same, which template would you want your newly created file to have?
Can you please mention the usecase you need this for? Thanks.
Copy link to clipboard
Copied
Ideally the ability to Add and Remove File templates is the functionality I'd like to see. I guess it's a feature request and not a bug.
As far as a use case, often you want to create a specific Action Script class that has certain pre determined code. IE a Singleton class is just a class but it has a GetInstance method and static variable. Or a RobotLegs command is just a class with an execute method. Right now I could just create a new class and use a Code Template, however, custom file templates would speed up the process and minimize clicks. With a framework like RobotLegs you might be adding 6 or 7 commands at a time. File Templates would minimize risk of human error when setting up the classes.
Over all it's a feature I have enjoyed inFlashDevelop that is very useful and I was surprised that it wasn't included in Flash Builder 4.5 considering how strong the Code Templates are.
Cheers,
-Hays
Copy link to clipboard
Copied
This indeed looks like a Feature Request
Kindly raise one at https://bugs.adobe.com/jira and the team would look into this.
Copy link to clipboard
Copied
The doc for $ says that it "Resolves to the namespace definition, based on the project's Flex SDK type and the namespace prefix defined in Preferences."
I can't find any preference items that allow to customize namespace prefixes (e.g. adding my own).