My INSURER PTE LTD - Insurtech Innovation Award 2024
3 more abouteclipse
1. More Eclipse!
COM S 207
Simanta Mitra, Ph.D.
Department of Computer Science
Iowa state University
1
2. Objectives for this lesson
At the end of this lesson, you should be familiar
with the following Eclipse terminology
1. workspace
2. project
3. view
4. Console view
5. Package Explorer view
6. Navigator view
7. Editor view
Also you will know a bit about the Eclipse Menu
2
3. Workspace
The Eclipse WORKSPACE is a directory or a folder where
eclipse stores your code for all your projects. Any time you
create an Eclipse project or file – it gets stored in this folder.
You should NEVER modify files in the workspace directly
from outside the Eclipse environment.
You can use ONE workspace for all of your coms207 work.
You can create more than one workspace – maybe for
outside class work.
3
4. Project
An Eclipse project is basically a folder where all code
for a single application is stored. This single application
can have many Java programs in it.
You create Eclipse projects INSIDE the workspace.
You may be working on several projects – say, a Maze
project and a TicTacToe project. You will put all of them
in the same workspace.
Important:
Note that Eclipse allows you to create many types of
projects: for example: ordinary projects, web projects,
java projects, etc .
You will be creating only JAVA projects. When you do
that, Eclipse will know what settings to use to compile
and run your programs.
4
5. View
When you open Eclipse, it has several different parts
each of which show different information or in a
different way. Each such part is called an Eclipse view.
There are many many views available and you can
select which views you want to open.
You can close by clicking on x next to the name of the
view.
Some of the more useful views are the:
console view,
package explorer view,
navigator view, and
editor view.
5
6. Console view
This is a view – that shows your program output.
Eclipse also shows errors and warnings here. It
looks as shown below…
6
7. Navigator View
This is a view - that
shows the folder structure
in your project. If you
opened the folder using
WINDOWS EXPLORER
(or Mac Finder), you
would see the exact
same folder structure.
If you double click on a
file, it opens it in a editor.
7
8. Package Explorer View
This is a view that shows
Java programs in your
workspace in a JAVA-like
manner (we will discuss
later).
It does NOT show all the
folders. Instead, it shows
the classes and
packages in your project.
If you double-click on a
class – it opens it in the
editor.
8
9. Editor view
This view allows you to enter and make changes to
your Java programs. You can click on a tab to bring a
particular file to the forefront. 9
10. Eclipse Menu
The Eclipse menu allows you to control all
operations in Eclipse. Here is a brief description of
the main menus.
File menu – create new projects, save projects etc.
Edit and Source menus – helps in editing a program.
Run menu - offers you ways to execute a program.
Window menu – allows customization
Project menu – set project settings.
10
11. Summary
all projects are stored in WORKSPACE.
all code for an application is stored in a PROJECT.
a VIEW is just a part of the entire Eclipse window.
the program output is shown in CONSOLE view
folders and files are shown in NAVIGATOR view
code to be edited is shown in EDITOR view
folders/files shown in Java-like manner in Package
Explorer view
Eclipse Menu allows you to control all operations.
11