JMU JMU - Department of Computer Science
Help Tools
Aptana Studio Tips and Tricks


1 Getting Started

When you start the program you will be asked to select a workspace. All of your projects will be stored in this workspace so you should make a note of the directory/folder you choose so that you can find files later.

2 Look and Feel

You can control the look and feel from the Preferences menu. This menu is accessed in different ways on different operating systems. On MS-Windows it is accessed from the Window menu. On OS X it is accessed from the Aptana menu (i.e., the main menu for the program).

2.1 Color Themes

To change the color theme/scheme, click on Preferences-Aptana Studio-Themes. Then, select a theme (Aptana Studio is light-on-black, Aptana Studio 2.x is dark-on-white) and click on OK.

2.2 Indentation

To change the automatic indentation, click on Preferences-Aptana Studio-Formatter and then choose a particular formatter (e.g., CSS, HTML, or JavaScript). Then, click on the pencil icon (to edit), click on Indentation, change the "Tab policy" to Mixed, change the "Indentation size" and "Tab size" to whatever value you want, and click on OK.

3 Working with CSS

If you hover the mouse over an element in a selector you will be given information about that element.

If you click on a property name (in a declaration) and then click on Commands-CSS- Documentation for Property you will be given help about that property.

If you select one or more rules and then click on Commands-CSS- Validate Selected CSS Documentation for Property, the selection will be verified.

4 Working with HTML

If you hover the mouse over an element you will be given information about that element.

If you click on an element and then click on Commands-HTML- Documentation for Tag, you will be given detailed information about that element.

If you click on Commands-HTML- Validate Syntax, the file will be verified.

5 Changing the Default Browser

You can change the browser that Aptana Studio uses when running and/or debugging. To do so click on Run and pull down to either Run Configurations... or Debug Configurations....

6 Deployment/Publishing/File Transfer

Aptana Studio can deploy/publish (i.e., transfer files to) HTTP servers in a variety of different ways. Hence, before anything can be deployed/published, Aptana Studio needs to be configured.

6.1 Setup for educ.jmu.edu

educ.jmu.edu uses SFTP to upload/download files. While you can, if you would like, use a standalone SFTP client, you can also use Aptana Studio.

To get started, select the "Project Explorer", right-click on the project, and pull down to Publish-Run deployment wizard. Then, select "FTP/SFTP/FTPS" and click on Next.

Next, change the "Site Name" to educ.jmu.edu, the "Protocol" to SFTP, the "Server" to educ.jmu.edu, enter your "Username" (and "Password" if you would like), and change the "Remote Path" to /home1/eid/WWW (where eid is your JMU electronic ID).

Your pages will available to the public under educ.jmu.edu/~eid/ (where eid is your JMU electronic ID).

6.2 Setting Permissions

In general, WWW servers will only respond to requests for files that have the appropriate permissions (e.g., world readable). To change the way permissions are set on files that are uploaded (and downloaded) using FTP/SFTP click on Preferences-Aptana Studio, expand Publishing, and select FTP. Then set the permissions as appropriate and click on OK.

6.3 Uploading Files

To upload/publish/deploy files, select the "Project Explorer", click on the project, expand "Connections", and double-click on the connection (e.g., educ.jmu.edu). After the connection is established, right-click on it and pull down to Transfer Files.

Then, select the files you want to upload from the left pane and click on the right-arrow icon between the panes (to upload).

When you are done, right-click on the connection again and pull down to Disconnect to end the connection.

7 Installing the Subversive Plugin

First, make sure your version of Apatan Studio 3 is up to date by clicking on Help-Check for Updates (and re-starting if any updates were performed).

Next, install Subversive as follows.

  1. Click on Help-Install New Software....
  2. Click on Add... (to the right of the "Work with" field).
  3. Enter Subversive into the "Name:" field and http://download.eclipse.org/technology/subversive/2.0/update-site/ into the "Location:" field and click OK.
  4. Select the "Subversive Integration Plug-in's" and the "Subversive SVN Team Provider Plugin".
  5. Click on Next.
  6. If a "Remediation Page" pops-up, click on Next.
  7. On the "Installation Details" page, click on Next.
  8. On the "Review Licenses" page, accept the terms of the license agreement and click on Finish.
  9. If asked, re-start Aptana Studio 3.

Next, enable SVN repository exploration as follows.

  1. Click on Window-Open Perspective, select "SVN Repository Exploring", and click on OK. (Note: You may have to select "Other" find "SVN Repository Exploring".)
  2. Select "SVN Kit 1.8.x" and "Native JavaHL 1.8.x"/"Java HL 1.8.x".
  3. Click on Finish.
  4. On the "Install Page", click on Next.
  5. On the "Installation Details" page, click on Next.
  6. On the "Review Licenses" page, accept the terms of the license agreement and click on Finish.
  7. If asked, re-start Aptana Studio 3.

If you are not asked to install the "SVN Kit" then you may need to install it manually. To do so, click on Help-Install New Software..., add http://community.polarion.com/projects/subversive/download/eclipse/4.0/update-site/ and install the Subversive SVN Connectors.

You should now be ready to use SVN.

8 Connecting to a Subversion Repository on Dropbox

Once you have installed the Subversive plugin you can work with SVN from inside Aptana Studio. "Connecting" Aptana Studio to a Subversion repository involves two steps. When using Dropbox as the host they are:
  1. One member of the team must setup a Subversion repository.
  2. Every other member of the team must add a repository location.

Note: Before starting, each person must create a Dropbox account (if she/he doesn't already have one) and install the Dropbox client (if it is not already installed).

When using Subversion on Dropbox you may sometimes get "post-commit" errors related to the deletion of files (e.g., in the transactions folder). This is because of the delay inherent in the Dropbox synchronization process. It should not cause any problems (though it is one reason that dedicated Subversion servers are preferred to file sharing servers).

9 Using the Subversive Plugin

The Subversive plugin enables you to execute SVN commands from within Aptana Studio 3.

In general, you should use the WWW Perspective when working on a project. The SVN Repository Exploring Perspective and Team Synchronizing Perspective, while useful, can be confusing because they provide information about the repository not about the (local copy of the) project which is your real concern.

Also, remember that adding a file to a project does not necessarily add the file to version control. That is, you sometimes want to add files to a project and not put them in the repository. Hence, when you add a file to a project, if you want it to be under version control you will need to manually add it to version control (see below). The WWW Perspective will put a ? icon on files that aren't under version control and a cylinder icon on files that are. (A file that has been changed but not committed will have a > character to the left of its name.)

9.1 Check-Out

To check-out a repository for the first time and create a local/working copy:
  1. If you are not already, use the SVN perspective by clicking on Window-Open Perspective, selecting "SVN Repository Exploring", and clicking on OK.
  2. Right-click on the appropriate repository.
  3. Pull down to "Find/Check Out As...".
  4. Check "Check out as a project configured using the New Project Wizard" and create the approrpiate kind of project.

9.2 Add a File to Version Control

To add a file to a project (and add it to version control):
  1. Right-click on the appropriate folder.
  2. Pull down to "New", over to "File", enter a file name, and click on Finish.
  3. Right-click on the newly created file, pull down to "Team", over to "Add to Version Control" and click OK.

9.3 Commit

To commit changes (to the repository):
  1. Right-click on the appropriate folder/file.
  2. Pull down to "Team" and then to "Commit".
  3. In the "Commit" window, Enter a descriptive comment and click OK.

9.4 Other SVN Commands

To execute other SVN commands:
  1. Right-click on the appropriate folder/file.
  2. Pull down "Team" and then to the command of interest.

9.5 Compare Versions of a File (i.e., diff)

To compare different versions of the same file:
  1. Right-click on the appropriate file.
  2. Pull down to "Compare with..." and over to the appropriate version.

For example, to see if anybody else has committed changes to a file you are working on choose "Latest from repository". (Note, however, that the correct process to follow before making a commit is to perform an update and then choose "Base from Working Copy" which will compare the most recently updated version with the version you are editing.)

You can then use the toolbar above the diff window (which looks like eclipse_diff-toolbar.gif to "Copy All from Left to Right", "Copy All Non-Conflicting Changes from Right to Left", "Copy Current Change from Left to Right", "Copy Current Change from Right to Left", and move between differences and changes.

9.6 Overwriting a Previously Committed Change

Sometimes two people have made conflicting changes to the same file and the second person to commit needs to overwrite changes that were made by the first person to commit. Obviously, the second person should carefully compare the two versions before taking this action, but if it is necessary, the second person can:
  1. Right-click on the appropriate folder/file.
  2. Pull down to "Team" and then to "Mark as Merged".

and then commit the folder/file.

9.7 The Synchronize Perspective

In addition to the other perspectives, Aptana Studio has a Synchronize Team Perspective that allows you to highlight and work with the files that have been changed since your last update. To access it click on Window-Open Perspective and then find the Team Synchronizing perspective (which may be under Other....

Right-clicking on a folder/file in this perspective will give you access to many common SVN commands.

10 Using the Debugger

The built-in JavaScript debugger that works with Firefox requires the Aptana Debugger extension v1.7.2. This extension, in turn, requires the Firebug extension v1.2-v1.8; it does not work with the most recent version of Firebug.

You are probably better off using the most recent version of Firebug (and not using the debugger in Aptana) though you should feel free to install an older version of Firebug.

11 Using QUnit

Since QUnit is packaged as a .js file and a .css file it is very easy to use it from within Aptana Studio. To do so, simply copy the two files into your project.

There are two things to keep in mind. First, you may not want to includes these two files in your repository. Second, you may want to put them in a directory/folder within the project (e.g., named qunit).

12 Using JSLint and Other Static Analysis Tools

JSLint is packaged with Aptana Studio. To activate it, click on Preferences-Aptana Studio-Validation and scroll down to JSLint Validator and select both "Build" and "Reconcile".

Note that if there are errors and warnings that you prefer not to be told about, you can add a "Filter".

  1. To eliminate warnings about the increment-after operator: Preferences-Aptana Studio-Validation, click on "JSLint Validator" and click on the plus sign to add a filter. Then, add the filter: Unexpected '.+.+'\.
  2. To eliminate the warning about trimming empty elements: Preferences-Aptana Studio-Validation, click on "HTML Tidy Validator", and expand "Elements". Near the bottom of the list is " Trim Empty Elements". Change the value to "Ignore".
  3. To change the severity of mesages about elements that are not recognized (which may be necessary if you use MathML, for example): Preferences-Aptana Studio-Validation, click on "HTML Tidy Validator", and expand "Elements". Near the middle of the list is "Unrecognized elements". Change the value to "Info".

Copyright 2019