Configuring Eclipse IDE for PHP development - Understanding the interface
Understanding the interface
The Eclipse IDE is not just a editor. It is a platform and can be used to do many things. It employs a very flexible philosophy to denominate and describe the way it displays and organizes the information. The most relevant parts of Eclipse interface are:
- The tool bar is at the top of the window just like any other common application.
- The tool bar with buttons is right under the tool bar. It contains several buttons. Most of them change according the current context, view or perspective. You can drag and drop that some of it buttons to arrange them the way you want.
- The views are sections that divide the windows content and display different kind of information. You can arrange the views in almost any way. For example, columns, rows, complex combinations of columns and rows and so forth.
- The perspectives are just an arrangement of views arranged in a certain configuration and normally sharing a relationship among them.
It is important to understand how this perspective philosophy works. For example The "PHP perspective" is used to edit PHP code so is coherent to display views related to the PHP code edition, views to manage the project files and views to navigate through the code. The following is a typical "PHP perspective":
- Docked at the left with several tabs are the "PHP explorer" view and the "Type Hierarchy explorer" view.
- In the middle is a wide view which is the "editor area". There will be as many tabs as many files as you are editing.
- Docked at the right with several tabs are the "Search" view and the "outline" view. They will assist you in finding a chunk of code or to navigate through the parts, variables and object of your current work file.
- Docked at the bottom are with several tabs are the "Problems" view, "Task" view, "Console" view and "Progress" view. There you will see things like unsolved problems like syntax errors, uncompleted TODO tasks, and see the progress of build or update operations.
On the other hand, the "Debug Perspective" shares some views with the "PHP perspective" but has a different arrangement of views and more views related to the code debugging operations such as:
- Debug view: Display the call stack of the current breakpoint.
- Servers view: Display a list of the configured servers.
- Variables view: This view shows a tree that is a complete dump of all the variables and object of the current session at the current breakpoint.
- Breakpoints view: Displays a list of all the breakpoints set in your project. You can double click on one of the item of that list to jump in that exact line of code.
- Expressions views: Here you can create expressions on the fly to evaluate them without the need to modify the code.
You can switch among perspectives by selecting them at "Tool bar --> Window --> Open perspective" or you can click in the perspective buttons located at the far right of the "The tool bar with buttons".
If you aren't satisfied with any of these perspective configurations and how their views are arranged, you can create your very own perspectives and add as many views as you want and arrange them the way that makes you feel good.
- Modify the current perspective. (Any one. It doesn't matter.)
- Add the views you want and remove the others you don't.
- Arrange the views the way you like and make you feel comfortable.
- Go to "Tool bar --> Window --> Save perspective as" and set a name for your custom perspective, ex: "pimp-My-IDE" and save it. You can also overwrite an existing view name.
So far you should be able to play with Eclipse IDE and understand its interface philosophy. If you want to see a video demonstration about Eclipse IDE to get a preview and taste some of its powers, check this out Webinar: Using Eclipse for Joomla! Development.