New with FDT 4 is the [[Type Dependencies]] view and [[Package Dependencies]] view. Access these views by going to the ''Show View'' window [http://fdt.powerflasher.com/docs/File:06_042.gif] and going to ''FDT>Package Dependencies'' [http://fdt.powerflasher.com/docs/File:06_041.gif] or ''FDT>Type Dependencies'' [http://fdt.powerflasher.com/docs/File:06_043.gif]

+

New with FDT 4 is the [[Type Dependencies]] view and [[Package Dependencies]] view. Access these views by going to the ''Show View'' window [[File:Img_preview.png | link=http://fdt.powerflasher.com/docs/File:06_042.gif]] and going to ''FDT>Package Dependencies'' [[File:Img_preview.png | link=http://fdt.powerflasher.com/docs/File:06_041.gif]] or ''FDT>Type Dependencies'' [[File:Img_preview.png | link=http://fdt.powerflasher.com/docs/File:06_043.gif]].

== Type Dependency ==

== Type Dependency ==

-

This visualizer will display Classes (Objects) associated with the currently selected Class as well as their relationships. After opening the Type Dependencies view [http://fdt.powerflasher.com/docs/File:06_044.gif] either double click on a Class within the Flash Explorer or activate a Class within the Editor. After doing so, the Type Dependencies view will analyze the selected Class and build a visualization - showing the currently selected Class in yellow [http://fdt.powerflasher.com/docs/File:06_045.gif].

+

This visualizer will display Classes (Objects) associated with the currently selected Class as well as their relationships. After opening the Type Dependencies view [[File:Img_preview.png | link=http://fdt.powerflasher.com/docs/File:06_044.gif]] either double click on a Class within the Flash Explorer or activate a Class within the Editor. After doing so, the Type Dependencies view will analyze the selected Class and build a visualization - showing the currently selected Class in yellow [[File:Img_preview.png | link=http://fdt.powerflasher.com/docs/File:06_045.gif]].

-

Some Classes will have many dependencies and this can mean that the view can be come very cluttered. To help with this, the Type Dependency view is also interactive, allowing you to click and drag the icons around the screen. Here the icons have been arranged to show superclasses on the left and Classes that are used or referenced are on the right [http://fdt.powerflasher.com/docs/File:06_046.gif].

+

Some Classes will have many dependencies and this can mean that the view can be come very cluttered. To help with this, the Type Dependency view is also interactive, allowing you to click and drag the icons around the screen. Here the icons have been arranged to show superclasses on the left and Classes that are used or referenced are on the right [[File:Img_preview.png | link=http://fdt.powerflasher.com/docs/File:06_046.gif]].

-

This can be taken even further by selecting one of the icons [http://fdt.powerflasher.com/docs/File:06_047.png] and then double clicking on it to jump to that Class [http://fdt.powerflasher.com/docs/File:06_048.gif].

+

This can be taken even further by selecting one of the icons[[File:Img_preview.png | link=http://fdt.powerflasher.com/docs/File:06_047.png]] and then double clicking on it to jump to that Class [[File:Img_preview.png | link=http://fdt.powerflasher.com/docs/File:06_048.gif]].

-

Clicking on the ''Back'' button will return you to the Class you just came from [http://fdt.powerflasher.com/docs/File:06_049.png].

+

Clicking on the ''Back'' button will return you to the Class you just came from [[File:Img_preview.png | link=http://fdt.powerflasher.com/docs/File:06_049.png]].

-

Lastly, you can have an alternative view of dependencies by togging the ''Show ancestors'' option [http://fdt.powerflasher.com/docs/File:06_050.gif]. This will reorganize the view to include referenced .SWCs, packages and projects [http://fdt.powerflasher.com/docs/File:06_051.gif].

+

Lastly, you can have an alternative view of dependencies by togging the ''Show ancestors'' option [[File:Img_preview.png | link=http://fdt.powerflasher.com/docs/File:06_050.gif]]. This will reorganize the view to include referenced .SWCs, packages and projects [[File:Img_preview.png | link=http://fdt.powerflasher.com/docs/File:06_051.gif]].

== Package Dependency ==

== Package Dependency ==

-

Similar to the Type Dependency view, Package Dependencies will visualize referenced packages [http://fdt.powerflasher.com/docs/File:06_052.gif]. To active click on a package within the Flash Explorer.

+

Similar to the Type Dependency view, Package Dependencies will visualize referenced packages [[File:Img_preview.png | link=http://fdt.powerflasher.com/docs/File:06_052.gif]]. To active click on a package within the Flash Explorer.

-

In this example the ''demo.powerflasher'' package contains a reference to the ''objects.display'' package [http://fdt.powerflasher.com/docs/File:06_052.gif]. Contrast that to the ''demo.powerflasher'' package which does not have a reference to any other packages [http://fdt.powerflasher.com/docs/File:06_053.gif].

+

In this example the ''demo.powerflasher'' package contains a reference to the ''objects.display'' package [[File:Img_preview.png | link=http://fdt.powerflasher.com/docs/File:06_052.gif]]. Contrast that to the ''demo.powerflasher'' package which does not have a reference to any other packages [[File:Img_preview.png | link=http://fdt.powerflasher.com/docs/File:06_053.gif]].

Revision as of 00:26, 5 October 2010

With all the ins and outs of an IDE like FDT, a developer can get lost in seemingly endless windows and views. It's important to know how to get around the application and make sure you stay in control of what you're looking at.

This walk through will demonstrate working with views and perspectives, then show off some of FDT's code navigation features.

There are numerous options, windows and keystrokes to remember. In case you forget a particular key binding, right click within the Editor and a popup will appear that will display the available navigation options as well as their keybinding .

Perspectives

When working with Eclipse, the platform FDT is built upon, you develop in something called Perspectives. The perspective you are currently working in will determine which tools are available to you. As a Flash developer, you'll be primarily working within the Flash FDT Perspective. If you have purchased the Max version of FDT, which is highly recommended, you will also have access to the Debug Perspective.

To view all available Perspectives, go to Window>Open Perspective>Other.... The Open Perspective window will appear and you'll see FDT in about the middle .

Another way to browse Perspectives is to click on the Open Perspective icon located at the top right of the window .

Right clicking on the perpective icon will provide a popup where you can customize the perspective as well as how the icons appear - e.g. showing the name of the perspective or not - and clicking on the icon perspective itself will switch to the selected perspective .

Flash FDT

The Flash FDT Perspective is where you will spend most of your time. It's the default perspective and where you will be writing your code .

Debug

Open the Debug Perspective by selecting it within the Open Perspective window . FDT will update the view with a new window layout, that you can change and save, as well as add the Debug icon to the list of perspectives on the top right . Check out Using FDT's Debugger for more information on how to use FDT's debugger.

Profiler

FDT now includes a Profiler. The Profiler Perspective is where developers can get detailed information about a .SWF that is currently running . Just like all other perspectives, windows can be dragged around and adjusted to your liking. Learn more about the profiler in the Intro To Profiling Applications tutorial.

Views

Views in FDT are panels that display some type of information. In this example , the views that are open are:

Opening, Closing and Minimizing Views

If you need to open a particular View, just go to Window>Show View. Views can also be closed or minimized . A view that has been minimized can be restored by clicking on the Restore button .

Organizing Views

Views can also be dragged and dropped. This allows you to customize the display of the currently active perspective. Grab the tab of a particular view and drag it around as you see fit. Here I'm dragging the FDT Welcome Screen to make a new Editor appear .

Editor

The Editor is not really a view, it's more like a text editor that will activate when a file is opened. Opening up the Main.as file and it will appear within the Editor .

An important note with the Editor is, it will only give you ActionScript error checking and other Smart Editor features when the file it has open is located within a Source Folder. If you were to disable the src folder in this example , the Editor will no longer have features such as code hinting .

Navigating Code

There are numerous FDT features that make moving around your code much easier and intuitive. Let's look at a few of them.

Quick Outline

With a file is active within the Editor, hit Cmd+O (OSX) or Ctrl+O (Win) to call up FDT's Quick Outline . The Quick Outline is a great way to navigate the currently active Class. When activated, begin typing the name of the method or property you'd like to jump to , and then use the arrow keys or mouse to select it , then hit enter to have FDT open it for you .

Open Type

Move the cursor over a variable and hit F4 and FDT will open the Class that the variable is associated with .

Type Hierarchy

Similar to the Quick Outline, the Type Hierarchy, Cmd+T (OSX) or Ctrl+T (Win), allows you to browse and select superclasses associated with the Class that is active in the Editor . Just like the Quick Outline, you can filter the results by typing with the text input at the top .

Show In Explorer

When you have a Class active in the Editor , hit F2 to have FDT locate and highlight the class for you within the Flash Explorer .

Type Dependency Outline

The Type Dependency Outline is works just like the Quick Outline and Type Hierarchy. Just hit Cmd+U (OSX) or Ctrl+U (Win) to bring it up .

Dependency Views

New with FDT 4 is the Type Dependencies view and Package Dependencies view. Access these views by going to the Show View window and going to FDT>Package Dependencies or FDT>Type Dependencies.

Type Dependency

This visualizer will display Classes (Objects) associated with the currently selected Class as well as their relationships. After opening the Type Dependencies view either double click on a Class within the Flash Explorer or activate a Class within the Editor. After doing so, the Type Dependencies view will analyze the selected Class and build a visualization - showing the currently selected Class in yellow .

Some Classes will have many dependencies and this can mean that the view can be come very cluttered. To help with this, the Type Dependency view is also interactive, allowing you to click and drag the icons around the screen. Here the icons have been arranged to show superclasses on the left and Classes that are used or referenced are on the right .

This can be taken even further by selecting one of the icons and then double clicking on it to jump to that Class .

Clicking on the Back button will return you to the Class you just came from .

Lastly, you can have an alternative view of dependencies by togging the Show ancestors option . This will reorganize the view to include referenced .SWCs, packages and projects .

Package Dependency

Similar to the Type Dependency view, Package Dependencies will visualize referenced packages . To active click on a package within the Flash Explorer.

In this example the demo.powerflasher package contains a reference to the objects.display package . Contrast that to the demo.powerflasher package which does not have a reference to any other packages .