8

Is there a way in flex (Flash Builder 4) to make regions like in c#, to group a part of the code allowing us to collapse it and see through our project more easily?

In c# it's like:

#region example

// my functions I want to group

#endregion
BenMorel
  • 34,448
  • 50
  • 182
  • 322
Biroka
  • 609
  • 10
  • 23

3 Answers3

3

Not that I have seen. I have only found comment and function collapsing.

Jason
  • 2,503
  • 3
  • 38
  • 46
1

No, you basically have to use comments. I generally do something like

// *********************** THIS REGION IS FOR ... *************************
Matt Dell
  • 9,205
  • 11
  • 41
  • 58
  • the only thing I want to use regions for collapsing, not for better understanding of the code – Biroka Apr 08 '10 at 12:13
1

Actually, there is a way you can do this, at least in Flex Builder 4.5. I've had success using multiple <fx:Script> tags. You can add a <!--Region Title--> comment above the tag, and just collapse the entire tag. Not exactly as good as proper code regions, but it works pretty well.

Jeremy
  • 23
  • 6
  • This only works inside mxml files. Large project most often do not have actionscript in script tags in mxml. So this isn't a great solution. – keyle Jan 23 '12 at 01:39