Adobe Flex 3 Help

Working with editors and views

Most perspectives in the workbench are composed of an editor and one or more views. An editor is a visual component in the workbench that is typically used to edit or browse a resource. Views are also visual components in the workspace that support editors, provide alternative presentations for selected items in the editor, and let you navigate the information in the workbench.

For an overview of editors and views, see About the workbench.

Opening views

Perspectives contain predefined combinations of views and editors. You can also open views that the current perspective might not contain.

 Select Window and choose a Flex Builder view or select Window > Other Views to choose other Eclipse workbench views. (In the plug-in configuration of Flex Builder, select Window > Show View.)

After you add a view to the current perspective, you might want to save that view as part of the perspective. For more information, see Customizing a perspective.

You can also create fast views to provide quick access to views that you use often. For more information, see Creating and working with fast views.

Moving and docking views

You can move views to different locations in the workbench, docking or undocking them as needed.

  1. Drag the view by its title bar to the desired location.

    As you move the view around the workbench, the pointer changes to a drop cursor. The drop cursor indicates where you'll dock the view when you release the mouse button.

    Y ou can drag a group of stacked views by dragging from the empty space to the right of the view tabs.

    You can also move a view by using the view's context menu. Right-click (Control-click on Macintosh) on the view tab, select Move > View, move the view to the desired location, and click the mouse button again.

  2. (Optional) Save your changes by selecting Window > Perspectives > Save Perspective As (Window > Save Perspective As in the plug-in configuration of Flex Builder).

Rearranging tabbed views

In addition to docking views at different locations in the workbench, you can rearrange the order of views in a tabbed group of views.

 Click the tab of the view to move, drag the view to the desired location, and release the mouse button. A stack symbol appears as you drag the view across other view tabs.

Switching between views

You can switch between views to work in a different view.

 Click the tab of the view to switch to.

You can also press Control+F7 (Command+F7 on Macintosh), use the F7 key to select the view to switch to, and then release the Control key.

Creating and working with fast views

Fast views are hidden views that you can quickly open and close. They work like other views, but do not take up space in the workbench while you work.

Whenever you click the fast view icon in the shortcut bar, the view opens. Whenever you click anywhere outside the fast view (or click Minimize in the fast view toolbar), the view becomes hidden again.

Note: If you convert the Flex Navigator view to a fast view, and then open a file from the Flex Navigator fast view, the fast view automatically is hidden to allow you to work with that file.

Create a fast view

 Drag the view you want to turn into a fast view to the shortcut bar located in the lower-left corner of the workbench window.

The icon for the view that you dragged appears on the shortcut bar. You can open the view by clicking its icon on the shortcut bar. As soon as you click outside the view, the view is hidden again.

Restore a fast view to normal view

  1. Right-click (Control-click on Macintosh) the view's tab to open the view's context menu.
  2. Deselect Fast View.

Filtering the Tasks and Problems views

You can filter the tasks or problems that are displayed in the Tasks or Problems views. For example, you might want to see only problems that the workbench has logged, or tasks that you logged as reminders to yourself. You can filter items according to which resource or group of resources they are associated with, by text string in the Description field, by problem severity, by task priority, or by task status.

  1. In Tasks or Problems view taskbar, click Filter.
  2. Complete the Filters dialog box and click OK.

For more information about views, see Flex Builder Workbench Basics.

Creating working sets

If your workspace contains many projects, you can create a working set to group selected projects together. You can then view separate working sets in the Flex Navigator and Task views and also search working sets rather than searching everything in the workspace.

Create a working set

  1. In the Flex Navigator view, open the toolbar menu and select Select Working Set.

  2. Select New.

    Flex Builder provides two set types: breakpoints (used in debugging) and resources.

  3. Select the resources type and click Next.
  4. Enter the working set name and then choose the projects in the workspace that you want to include in the working set.
  5. Click Finish.

The working set is immediately applied to the Flex Navigator view and only those projects and resources contained in the set are displayed.

Display all projects in the workspace

 In the Flex Navigator view, open the toolbar menu and choose Deselect Working Set.

Opening files for editing

When you open a file, you launch an editor so that you can edit the file.

 Do one of the following:

  • Right-click (Control-click on Macintosh) the file in one of the navigation views and select Open from the context menu.
  • Double-click the file in one of the navigation views.
  • Double-click the bookmark associated with the file in the Bookmarks view.
  • Double-click an error warning or task record associated with the file in the Problems view.

This opens the file with the default editor for that particular type of file. To open the file in a different editor, right-click (Control-click on Macintosh) the file, select Open With from the context menu, and select the editor to use.

Associating editors with file types

You can associate editors with various file types in the workbench.

  1. Select Window > Preferences.
  2. Click the plus button to expand the General category.
  3. Click the plus button to expand the Editors category, and then select File Associations.
  4. Select a file type from the File Types list.

    To add a file type to the list, click Add, enter the new file type in the New File Type dialog box, and then click OK.

  5. In the Associated Editors list, select the editor to associate with that file type.

    To add an internal or external editor to the list, click Add and complete the dialog box.

  6. Click OK.

    You can override the default editor preferences by right-clicking (Control-clicking on Macintosh) any resource in one of the navigation views and selecting Open With from the context menu.

Editing files outside the workbench

You can edit an MXML or ActionScript file in an external editor and then use it in Flex Builder. The workbench performs any necessary build or update operations to process the changes that you made to the file outside the workbench.

Refresh an MXML or ActionScript file edited outside the workbench

  1. Edit the MXML or ActionScript file in the external editor of your choice.
  2. Save and close the file.
  3. Start Flex Builder.
  4. In the workbench, right-click (Control-click on Macintosh) the file you edited in one of the navigation views and select Refresh from the context menu.

    If you work with external editors regularly, you might want to enable auto-refresh. To do this, select Window > Preferences, expand the General category, select Workspace, and check Refresh Automatically. When you enable this option, the workbench records any external changes to the file. The speed with which this happens depends on your platform.

Tiling editors

The workbench lets you open multiple files in multiple editors. But unlike views, editors cannot be dragged outside the workbench to create new windows. You can, however, tile editors in the editor area, so that you can view source files side by side.

  1. Open two or more files in the editor area.
  2. Select one of the editor tabs.
  3. Drag the editor over the left, right, upper, or lower border of the editor area.

    The pointer changes to a drop cursor, indicating where the editor will appear when you release the mouse button.

  4. (Optional) Drag the borders of the editor area of each editor to resize the editors as desired.

Maximizing a view or editor

You can temporarily maximize a view or editor so that it fills the workbench window.

Maximize a view or editor

 Right-click (Control-click on Macintosh) the view or editor's title bar and select Maximize.

Restore a view or editor to its previous position and size

 Right-click (Control-click on Macintosh) the view or editor's title bar and select Restore.

You can also maximize or restore a view or editor by double-clicking the title bar or by clicking the Maximize/Restore icons in the upper-right corner.