5 Replies Latest reply on May 8, 2013 4:29 AM by cosmacol

    Advanced code editing

    community help Level 1
        • 1. Re:  Advanced code editing

          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.

          • 2. Re:  Advanced code editing
            Guriya Kalyani

            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.

            • 3. Re:  Advanced code editing
              Omita Level 1

              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.




              • 4. Re:  Advanced code editing
                Guriya Kalyani Level 1

                This indeed looks like a Feature Request

                Kindly raise one at https://bugs.adobe.com/jira and the team would look into this.


                • 5. Re:  Advanced code editing
                  cosmacol Level 1

                  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).