This page explains what the References View is and how to display it.
Contents |
Introduction
Use the References View to manage the libraries that you use for your projects. The documentation for a library will not be available to you in Code Assist unless you add that library to the References View. When you code against a library in your References View, you should receive the available Code Assist for that library.
Instructions
Displaying the View
The References View should be displayed as part of the default Aptana Perspective. If it is not, or if you closed it and need to re-open it, you can access the View from the Window menu:
To display the References View:
- From the Window menu, select Show View > Other... to open a Show Views pop-up window.
- On the Show Views pop-up window, expand the Aptana Views folder.
- Select the References view and click OK.
Aptana displays the References View, as shown in the image below.
Adding a file to the References View
Before you can access Code Assist for a JavaScript or other file, you need to add the file to References View. You can add a file to this view two ways:
- Drag the documented file from the File View into the References View.
- Click the Add File button and browse to the file location.
- If the profile is an auto-created one (denoted by a star in the upper corner of the profile), you will be prompted to "make it static". A static profile is persisted even if the editor closes.
Changing the current profile
If you have created a profile that you frequently like to code against (e.g. a JavaScript library that several of your projects reference), you can set that profile as your current profile, rather than using the auto-generated profile that Aptana creates.
To change the current profile:
- Open the HTML file that you will be working on.
- In the References View, toggle the Link With Editor button button off to deactivate the auto-generated profile.
- Right-click the profile that you would like to make the current profile, and select Make Current Profile from the context menu.
Aptana designates the profile that you chose as the current profile for your open HTML file.
Managing your active libraries
Use the Move Up and Move Down buttons to change the order of the library files in the References View. The order of the libraries in the References View sets the order of precedence in Code Assist, with the bottom library having highest precedence. For example, if you had three libraries with documented function named "foo," the bottom-most library in the View would have the highest precedence in Code Assist.
Note: Any file currently open in an Editor will take precedence over any libraries in the References Profiles View.
Managing Global References
By default, your workspace will code against HTML DOM 0, HTML DOM 1, and HTML 2 for your JavaScript code assist. However, you can use the Global References tab to code against other frameworks, such as Adobe AIR or EXT.
To always code against these frameworks in your workspace, click the Global References tab at the bottom of the References View, and check the boxes next to the frameworks that you want to code against.
You can add new items to the Global References by pressing the little "+" button at the top of the Global References section. These can be .js, .sdoc or ScriptDoc XML files.