Exotic Flash Builder 4 Tips and Tricks

The Flash Builder is built on Eclipse, you know, hence many of Eclipse stuff will naturally comply, also, these tips will mostly work the same in Flex Builder 3 and Eclipse.

-> Browse to any file or directory

It’s essential to be able to easily browse to the resource you’re currently looking at. There should have been a built in way to do this.

  1. Click on, Run –> External Tools -> External Tools Configuration (Alternatively, click on the Favorites icon and select "External Tools Configuration")

image

  1. Inside the "External Tools Dialog" -> Select "Program" -> click on the "New Launch Configuration" icon.

image

  1. Inside the "Main" tab (Default) set:

  2. Name: Explorer

  3. Location: c:windowsexplorer.exe
  4. Working Directory: c:windows
  5. Arguments: /select,"${resource_loc}"

image

  1. Go to the "Build" tab and uncheck "Build before launch"

image

  1. Go to the "Common" tab, look for "Display in favorites menu" and check "External Tools"

image

You can now select any file or directory from the “Package Explorer” and browse straight to it’s location in windows explorer.

image

-> Extending with batch files – kill all IE processes

Flash Builder 4 can be extended using batch files (Shell Scripts on the Mac). This example uses a batch file to kill all opened IE processes before launching a new debug session.

There are a few reasons to debug a Flex app in IE. Firstly, some users still use it, and secondly I don’t want the precious tabs that are opened on my other useful browsers to be bothered. Occasionally, IE processes are left running in the background even though debug session was ended. Sometimes I simply didn’t closed the browser before running a new session. Both of these cases lead to the consuming of needed memory and slows down the system.

A batch file is merely a text file with a .bat extension.

  1. Create a new text file.
  2. Edit this file with any text editor –> Copy paste this line into it: taskkill /F /IM "iexplore.exe"  -> Save this file as kill_iexplore.bat (Double clicking on this file will kill all IE processes)
  3. Click on, Run –> External Tools -> External Tools Configuration
  4. Inside the "External Tools Dialog" -> Select "Program" -> click on the "New Launch Configuration" icon.
  5. Inside the "Main" tab (Default) set:
    Name: Kill Internet Explorer
    Location: c:kill_iexplore.bat
    (depending on were the file is saved)
  6. Go to the "Build" tab and uncheck "Build before launch"
  7. Go to the "Common" tab, look for "Display in favorites menu" and check "External Tools"

— In Order to kill all IE processes before launching a new debug session

  1. Right-Click on the flex project –> Select “Properties
  2. In the properties dialog select “Builders” –> Click on “Import” and select “Kill Internet Explorer” from the list.

image

-> Link with Editor

This one is very helpful but easily overlooked, it’ll make the Package Explorer and the editor view synchronized.

Click on this icon to make your life better.

image

-> Some Important shortcuts (For Mac CTRL CMD, ALT Option)

Ctrl+Shift+TFind any class SDK included
*Ctrl+Shift+RFind any resource/file (wont find SDK classes)
*Ctrl*+3Finds everything, literally everything – files, commands, views (Amazing, try it, use it)
Ctrl+Alt+Up/DownDuplicate a line or a block of code
Alt+Up/DownReorder a line or a block of code
Ctrl+DDelete a line or a block of code
Ctrl+Shift*+L+LOpen Configuration
Ctrl+KFind next (like F3)
Less important shortcuts

Ctrl+OCurrent class outline
*Ctrl+Shift+GFinds all references in the workspace
Ctrl+Shift+LShows all shortcuts (key binding)
Ctrl+MMaximize the selected view
Ctrl+JQuick Search without the search dialog (click ESC when done)
Ctrl+Shift+XTo upper case
Ctrl+Shift+YTo lower case
Ctrl*+IAuto indent selected code
 

P.S. Why exotic?! It made you look didn’t it. And beside, it is somewhat exotic.

P.S.S. At first I thought about writing a short post with only the first tip, but, thinking about it, I think I’ll make this an ever updating page. So if you have any other tip you like to share please write about it in the comments.

Guy A

Read more posts by this author.