Skip to content

Eclipse Workspace

An Eclipse workspace is a folder which is used to store a project.

Procedure to create a workspace in Eclipse:

  1. While in the workspace “/var/www” select File + Switch Workspace + Other from the main menu
  2. Enter full pathname to the workspace folder
    (e.g.  /var/www/<folder-name>
    This will create a new folder in /var/www.  Eclipse will close and reopen that workspace.
  3. Create a new project in the workspace
    1. File + New + Project (php webspace) . . .
    2. Enter name of the Project for this workspace
    3. Click Finish.
  4. Add content
    1. Select File + Import from the main menu
    2. In the Import dialog box, select General + File System then click Next
    3. Browse to the folder that contains existing code
    4. Click OK
    5. If necessary, Browse to “Into Folder”
    6. Click Finish
  5. Configure the workspace with Window + Preferences
    1. General + Content Types + PHP Conten Types
      (add .module, etc for Drupal sites)
    2. PHP + Code Style + Formatter
      (use spaces for tab policy with indentation equal 2)
  6. Configure Debugger
    1. PHP Web Page
    2. Use XDebug
    3. Use Default PHP Web Server
    4. In the URL section, uncheck “Auto Generate” and enter full path to start file
      (include the new Workspace folder name) – e.g. http://localhost/<workspace>/<project root>/index.php