Java Reference
In-Depth Information
FIGURE 17.7
Set a breakpoint.
R EFACTORING WITH E CLIPSE
Eclipse improves the productivity of developers in many ways. One important fea-
ture is the ability to reorganize, or refactor your Java code. Often during a Java de-
velopment project, you will want to reorganize your class names or decide that an
alternative packaging plan is an important improvement.
If you were to make these changes by hand, you would need to find, edit, and
compile each Java file that was impacted by the change. If part of your changes in-
cluded repackaging, then you would need to create new directories, and move files
into the proper directory. Eclipse can make all of these changes automatically for you.
Let's start by importing the exercises from Chapter 2. These exercises are rela-
tively simple, but actually contained an interesting challenge in the package defin-
ition of the classes.
Switch back to the Java perspective, by selecting the Java perspective icon at the
top right of the screen. Create a new Java project in Eclipse and call it “Chapter2.”
You should see your new project listed in the Package Explorer Window.
Search WWH ::




Custom Search