Projects consist of resources (folders and files) that you can manage from the Flex Navigator view. Projects are contained within a workspace, which is a reflection of the file system. The Flex Navigator view is refreshed each time you add, delete, or modify a resource.
You can also edit project resources outside Flex Builder and the Flex Navigator view, directly in the file system.
You can add folders and files to your project as needed. For example, you might create a folder to store all of your data models or to organize all the assets that make up the visual design of your application, as the following example shows:
If you create the new folder in the source path folder, it is treated like a package name and you can place source files inside that will be recognized by the compiler.
If you create the folder outside of the source path folder, you can later make it the root of a package structure by adding it to your source path. After you complete this procedure, select Project > Properties and then select Flex Build Path. Click Add Folder and navigate to the newly created folder.
You can also add folders and files that are located outside the current project; for more information, see Linking to resources outside the project workspace.
Deleting folders and files from your project removes them from the workspace and, therefore, from the file system.
The resource is deleted from the file system.
When you work with multiple projects in a workspace, you can move resources from one project to another.
You can also edit resources outside Flex Builder, directly in the file system. These changes are visible only inside Flex Builder after you refresh the workspace.
By default, in the stand-alone configuration of Flex Builder, the workspace is refreshed automatically. This option is available in the Flex Builder preferences dialog box, which you can access by selecting Window > Preferences > General > Workspace. You can also change the Flex Builder default behavior so that it never refreshes the workspace automatically.
Manually refresh the workspace
In the Flex Navigator view, right-click (Control-click on Macintosh) and select Refresh from the context menu. All project resources in the workspace are refreshed.
Turn off the automatic refresh preference
You can create links to resources outside the project and workspace location. You can link to folders and files anywhere on the file system. This option is useful when you have resources that are shared between your projects. For example, you can share a library of custom Flex components or ActionScript files among many different Flex projects.
Folders that contain linked resources are marked in the Flex Navigator view (as the following example shows), so that you can distinguish between normal and linked resources.
Other examples for linking resources include a folder of image file assets, or situations when the output folder is not in the project root folder.
When you work with shared resources, the changes you make to the source folders and files affect all of the projects that are linked to them. Be cautious when you delete linked resources from your projects; in some cases you merely delete the link reference, and in others you delete the source itself. For more information, see Deleting folders and files.
Link to resources outside the project workspace
Rather than linking to resources by entering the full path to the local or network folder where you store your files, you can define path variables. For more information, see Creating a path variable.
Path variables can also be used in certain project settings, such as the library path and source path.If you selected a defined path variable, skip to step 9. If you clicked New, you'll see the New Variable dialog box.
Click OK to create the path variable.
You can also define and manage path variables by using the Flex Builder workbench preferences (Open the Preferences dialog and select Preferences > General > Workspace > Linked Resources).To share resources between projects, place all shared resources into folders that can then be linked to each project by using the project's source path. This is the best method for using shared resources such as classes, MXML components, and images. Updates to these resources are immediately available to all projects that use them. When your projects are compiled, the shared resources are added to the SWC file.
Add an external resource folder to the source path
The folder is added to the source path.
You can also use the Source Path properties tab to edit, delete, or reorder items in the source path.
Folders that are added to the source path are marked in the Flex Navigator view.
Project references can impact build order, so Flex Builder provides alternatives to using project references.
Flex Library projects The preferred way to create a reusable library. Flex Builder creates a project reference to ensure that the SWC project is built before the main project that includes it on the library path. Also, because Flex Builder adds it to the library path, code hints appear in the main project for the classes in the SWC project.
Source path The recommended way to include code in your project that is not under the same folder structure. This enables code hints in the project files and classes in related files, and the compiler knows where to find the source code. You can add any number of source paths to your project and they are displayed as linked folders in the Flex Navigator view.
When you work in the Flex Navigator view, you can select a resource and view its properties.