#native_company# #native_desc#

Eclipse for the PHP Developer Page 3

By Shu-Wai Chow
on September 21, 2004

The Eclipse Interface
When Eclipse launches, it will ask you where you would like to place your Workspace. Your Workspace
is where all the files in your application go. Traditionally, this is placed in your individual user
directory or a separate workspace directory under the eclipse application directory. If you do
primarily web development, you may consider placing this in the DocumentRoot directory of your web server.
After Eclipse finishes startup (yes, it may take a while), you’ll be presented with the main Eclipse
interface. The overall GUI is called the Workbench. In Eclipse, each tab is called a view. The arrangement
of views is a perspective. Each perspective is geared towards a certain task. Debugging has a perspective.
Java development, PHP development, and CVS integration are examples of other perspectives. By default, you
should see the Resource Perspective, which is a general-purpose default perspective.
main Eclipse interface
Across the top, there is the Navigator View, which shows file system resources and the file
structure of each project. Next to that is the Editor. The Editor is used to edit code. In the far right
is the Outline view. The Outline is used to display the hierarchy of something, depending on what
perspective is using the Outline. In Java and PHPEclipse Perspectives, the Outline shows classes
and their methods. The pane below is a miscellaneous pane that displays views dependent on the
perspective. PHPEclipse Perspective puts web browser and system console panes here by default.
To change perspectives, go to the Window -> Open Perspective, or use the Shortcut Toolbar
in the upper right corner. Several other options in the Window menu allow you to customize
perspectives. To open views, go to Window -> Show View. For both these submenus, certain
views and perspectives may be hidden. Select the “Other…” option to view everything available.
Eclipse manages applications and websites by projects. To create a new project go to File ->
New -> Project… For PHP projects, select the PHP Project option. This will lead you through a
wizard and the end project will appear in the Navigation view. To add pages or files, select File
-> New -> PHP File. You can also add subdirectories and create your whole site hierarchy from
here. Each item appears in the tree structure of the Navigation view. When you click on a PHP file,
it will open in the Editor for editing.