3 Replies Latest reply on Jun 29, 2006 3:02 PM by David Zuckerman (Adobe)

    FB2b3 Autogenerates different code than b2 did.


      When you make a new class with FB2 b3 standalone, it autogenerates code with braces in the style of:

      public function dostuff():void
      {

      }

      I hate that style. I prefer:

      public function dostuff():void {

      }


      This may seem like a small thing but I spend a lot of time cursing at my monitor while I go through and delete those 10 or 15 extra newlines everytime I make a class. FB2 b2 generated code the way I liked it. Is there somewhere in the preferences I can fix it?

        • 1. Re: FB2b3 Autogenerates different code than b2 did.
          Level 7
          Yep, we changed the code generation defaults to match the standards set
          up by the Flex framework. Personally, I'm not a big fan of this coding
          standard, but we wanted to stay consistent.

          That being said, the release version of Flex Builder 2 will provide a
          way for third-parties to add content formatting capabilities to Flex
          Builder 2. Perhaps someone will write one that formats braces in a way
          that better matches your coding style.

          Hope that helps

          -david

          --
          David Zuckerman
          Software Engineer, Flex Builder 2
          http://www.davidzuckerman.com/adobe/

          TankMan89 wrote:
          > When you make a new class with FB2 b3 standalone, it autogenerates code with
          > braces in the style of:
          >
          > public function dostuff():void
          > {
          >
          > }
          >
          > I hate that style. I prefer:
          >
          > public function dostuff():void {
          >
          > }
          >
          >
          > This may seem like a small thing but I spend a lot of time cursing at my
          > monitor while I go through and delete those 10 or 15 extra newlines everytime I
          > make a class. FB2 b2 generated code the way I liked it. Is there somewhere in
          > the preferences I can fix it?
          >
          >
          >
          • 2. Re: FB2b3 Autogenerates different code than b2 did.
            Bump. Now that Flex 2 is released, could you point me at the documentation for mechanism in f2 that will allow me to do this?
            • 3. Re: FB2b3 Autogenerates different code than b2 did.
              David Zuckerman (Adobe) Level 1
              Well, there isn't official documentation but if you look at the extension points for the MXML and ActionScript plugins, you'll find the extension point for content formatting. There is no guarentee that these extension points will exist in the future, so use at your own risk. In the next few weeks, I'll start blogging about how to extend Flex Builder. Until then, I wish you the best of luck
              1 person found this helpful