Introduction to Eclipse
Download
Report
Transcript Introduction to Eclipse
Development with Eclipse
Software Engineering
Prof. Werner Krandick
The Basics
Eclipse at first glance looks like most
other development environments (Visual
Studio, JBuilder, etc.)
The Basics
Basic features
Project-based file system
Class-oriented browser
Actual files become secondary, as Eclipse
views the project at the Class (object) level
and does file management for you.
Organized error viewing and running
Why Eclipse?
Powerful
Versatile
Extensible
works with Java, C, C++, PHP
The whole platform is plug-in based, so
new plug-ins are available for many tasks.
Free! and Open-source
Free download at www.eclipse.org
The Eclipse Environment
The Eclipse visual environment’s organization is
based on Perspectives (under the Window menu).
Each perspective is a collection of Views, or
internal windows (also under the Window menu).
Organized for a particular task.
Views can be moved, stacked (tabbed), removed
or added. All by drag-drop or the options in the
Window menu.
The Eclipse Environment
Built in perspectives
Java development
Debugging
CVS
File navigation
You also modify or create perspectives
(again, Window menu)
The Java Perspective
The Debugging Perspective
The CVS Perspective
Cool Features
Automatic Error Detection
Code generation
Errors are detected as you type, and every time you
save
Constructors
Inherited abstract methods
Getters/Setters
Import statements
Javadoc facilities
Note: the features covered here focus on java, not all
these features will necessarily be available for C, C++
or other languages.
Automatic Error Detection
Errors are shown much like spelling errors in word.
Double click any listed tasks to jump to that file/line.
Code Generation
Creating a class
-
-
Browse for superclass
Browse for interfaces
Add constructors from
superclass
Code Generation
Getters/Setters
-
-
-
Create data member
Use “Generate getter
and setter” under
Source menu
Functions and javadoc
are auto-generated!
Code Generation
Import Organization
-
-
-
Write as if you had
already done imports
Use “Organize
Imports” (source
menu) [Ctrl+Shft+O]
Imports are added for
you!
Javadoc Facilities
Need javadoc comments for a function?
Use “Add Javadoc Comment” under the
source menu!
Javadoc comment template will be
created for you to fill out with the
appropriate information
Javadoc for functions from an abstract
class or interface will automatically refer
to the parent function.
Debugging Facilities
Eclipse offers various features to make
debugging easier
Double click on error output to jump to
that file/line
Keep track of breakpoints
Keep track of variables (including
variables hidden in objects)
CVS integration
Eclipse can associate a project with a CVS
repository location.
Synchronization with CVS repository is then
done by right clicking the project (or folder
in the project) and selecting “Synchronize”
from the “Team” menu.
CVS integration
Synchronization is also done visually!
Continuing with Eclipse
Visit www.eclipse.org to download a
copy for your home computer
Get Release version 3.0 (or latest)
Run ‘eclipse’ on any of the machines in
the CS Lab
This is currently an older version, but
much of the functionality is the same