53
Presented by IBM developerWorks ibm.com/developerworks/ 2006 January – April © 2006 IBM Corporation. Making the most of Making the most of Installing and running Eclipse Installing and running Eclipse

Installing and running Eclipse

  • Upload
    della

  • View
    69

  • Download
    2

Embed Size (px)

DESCRIPTION

Installing and running Eclipse. What we'll cover. Installing Eclipse Running Eclipse Eclipse terms and concepts: Perspectives, views, editors and other useful things Other editing functions. Installing Eclipse. Installing Eclipse. - PowerPoint PPT Presentation

Citation preview

Page 1: Installing and running Eclipse

Presented by IBM developerWorksibm.com/developerworks/2006 January – April

© 2006 IBM Corporation.Making the most of Making the most of

Installing and running EclipseInstalling and running Eclipse

Page 2: Installing and running Eclipse

2-2 Making the most of © 2006 IBM Corporation.

Presented by IBM developerWorks

What we'll coverWhat we'll cover Installing Eclipse Running Eclipse Eclipse terms and concepts: Perspectives, views, editors

and other useful things Other editing functions

Page 3: Installing and running Eclipse

Presented by IBM developerWorksibm.com/developerworks/2006 January – April

© 2006 IBM Corporation.Making the most of Making the most of

Installing EclipseInstalling Eclipse

Page 4: Installing and running Eclipse

2-4 Making the most of © 2006 IBM Corporation.

Presented by IBM developerWorks

Installing EclipseInstalling Eclipse

To get started, go to eclipse.org and click the downloads link.

Page 5: Installing and running Eclipse

2-5 Making the most of © 2006 IBM Corporation.

Presented by IBM developerWorks

Installing EclipseInstalling Eclipse Download the Eclipse SDK.

Currently the file name is eclipse-SDK-3.1.2-win32.zip (for Windows)

This file contains everything from Eclipse, including the Eclipse platform and the SDK.

Download the file (use a mirror if you can) and unzip it. You're done!You're done!

There are instructions on the Eclipse download page if you need them.

Page 6: Installing and running Eclipse

2-6 Making the most of © 2006 IBM Corporation.

Presented by IBM developerWorks

Other things at EclipseOther things at Eclipse The Eclipse SDK download gives you everything you'll

need to get started. There are other basic packages you might want to look at, though:Plug-in development environment (PDE)Rich Client Platform runtime and SDKFTP and WebDAV support

Page 7: Installing and running Eclipse

2-7 Making the most of © 2006 IBM Corporation.

Presented by IBM developerWorks

The Java Runtime EnvironmentThe Java Runtime Environment Because Eclipse is written in Java, you have to have a

Java Runtime Environment (JRE) on your machine. A JRE isn't included with Eclipse itself.

eclipse.org lists sites with JREs available if you need one. The Eclipse Foundation wisely doesn't recommend any particular

JRE.

JRE 1.5.0_02 works well, although you can have multiple JREs/JDKs installed on your machine and switch between them in Eclipse.

Page 8: Installing and running Eclipse

Presented by IBM developerWorksibm.com/developerworks/2006 January – April

© 2006 IBM Corporation.Making the most of Making the most of

Running EclipseRunning Eclipse

Page 9: Installing and running Eclipse

2-9 Making the most of © 2006 IBM Corporation.

Presented by IBM developerWorks

Running EclipseRunning Eclipse Now that you've installed Eclipse, use the eclipse

command to run it:

Page 10: Installing and running Eclipse

2-10 Making the most of © 2006 IBM Corporation.

Presented by IBM developerWorks

WorkspaceWorkspace The workspace is a physical location on your machine.

It contains projects, folders, and files.A project is a collection of folders and files for a particular task. A folder is a subdirectory; it can contain folders and other files. A file is just a file.

In other words, a workspace is just a directory.

Page 11: Installing and running Eclipse

2-11 Making the most of © 2006 IBM Corporation.

Presented by IBM developerWorks

Choosing a workspaceChoosing a workspace

The first time you run Eclipse, you'll be asked to choose a workspace.

You can also create different workspaces if you want. Each workspace is a different directory that contains a set of projects. To open Eclipse in a particular workspace, type eclipse –data c:\workspace.

Page 12: Installing and running Eclipse

2-12 Making the most of © 2006 IBM Corporation.

Presented by IBM developerWorks

Using different workspacesUsing different workspaces

You can create different shortcuts for different workspaces if you want:

Page 13: Installing and running Eclipse

2-13 Making the most of © 2006 IBM Corporation.

Presented by IBM developerWorks

Switching workspacesSwitching workspaces

You can use the Switch Workspace… item on the File menu to change workspaces.

You can change to another workspace without restarting Eclipse.

Page 14: Installing and running Eclipse

2-14 Making the most of © 2006 IBM Corporation.

Presented by IBM developerWorks

Performance tipPerformance tip If Eclipse runs slowly, try adding this switch to the

command line or shortcut: eclipse –vmargs –Xms256M

This starts the Java virtual machine with 256MB of RAM. Eclipse loads plug-ins only when you need them, but it

can start to slow down if you use lots of tools.This tip is particularly helpful on Windows platforms.

Page 15: Installing and running Eclipse

Presented by IBM developerWorksibm.com/developerworks/2006 January – April

© 2006 IBM Corporation.Making the most of Making the most of

Eclipse terms and conceptsEclipse terms and concepts

Page 16: Installing and running Eclipse

2-16 Making the most of © 2006 IBM Corporation.

Presented by IBM developerWorks

WorkbenchWorkbench The workbench is the Eclipse environment.

When you open Eclipse, you see a workbench that displays the resources in a particular workspace.

A workbench contains perspectives, views, and editors.

Page 17: Installing and running Eclipse

2-17 Making the most of © 2006 IBM Corporation.

Presented by IBM developerWorks

The workbenchThe workbench

Page 18: Installing and running Eclipse

2-18 Making the most of © 2006 IBM Corporation.

Presented by IBM developerWorks

PerspectivesPerspectives A perspective is a set of views organized for a particular task.

If you're writing Java code, certain views are useful. If you're debugging Java code, other views are useful. If you're modeling business processes, etcetera, etcetera… A perspective lets you arrange the views you need.

Eclipse comes with several perspectives installed.

Page 19: Installing and running Eclipse

2-19 Making the most of © 2006 IBM Corporation.

Presented by IBM developerWorks

PerspectivesPerspectives

As you install plug-ins for various tasks, other perspectives may appear. The dialog on the left lists the perspectives shipped with the basic

Eclipse SDK. The dialog on the right is from IBM's WebSphere Business Integration

Modeler, an Eclipse-based product with many advanced features.

Page 20: Installing and running Eclipse

2-20 Making the most of © 2006 IBM Corporation.

Presented by IBM developerWorks

Customizing perspectivesCustomizing perspectives You can customize a

perspective in many ways: You can change the views that

are part of a perspective You can change how those

views are arranged on the screen

If you use the Customize Perspective… menu item, you can define which menu items and toolbar buttons are available for a given perspective.

Page 21: Installing and running Eclipse

2-21 Making the most of © 2006 IBM Corporation.

Presented by IBM developerWorks

Customizing perspectivesCustomizing perspectives

Page 22: Installing and running Eclipse

2-22 Making the most of © 2006 IBM Corporation.

Presented by IBM developerWorks

Saving perspectivesSaving perspectives When you have the views and

toolbars and everything else arranged the way you want, you can save that as your own perspective.

You can overwrite existing perspectives if you want.

Page 23: Installing and running Eclipse

2-23 Making the most of © 2006 IBM Corporation.

Presented by IBM developerWorks

ViewsViews A view is a window on some resources in your

workspace. One view might list all the files in your workspaceAnother view might list all the Java classes in a JAR file.

You can open and close and arrange views any way you like.

Two views might display the same thing in different ways.

Page 24: Installing and running Eclipse

2-24 Making the most of © 2006 IBM Corporation.

Presented by IBM developerWorks

Two views of the same fileTwo views of the same file

Page 25: Installing and running Eclipse

2-25 Making the most of © 2006 IBM Corporation.

Presented by IBM developerWorks

Opening viewsOpening views The Window Show View

menu lets you open a view at any time.

Click the Other… item to see a complete list of views.

Page 26: Installing and running Eclipse

2-26 Making the most of © 2006 IBM Corporation.

Presented by IBM developerWorks

Moving and stacking viewsMoving and stacking views

To move a view, click and drag its tab. If more than one view is in the same space, they'll be stacked.

The Problems, Javadoc, Declaration and Console views are stacked here.

Page 27: Installing and running Eclipse

2-27 Making the most of © 2006 IBM Corporation.

Presented by IBM developerWorks

Fast viewsFast views

A fast view has an icon; you can click on that icon to go directly to the view.

To create one, choose Fast View from the view's menu.

Page 28: Installing and running Eclipse

2-28 Making the most of © 2006 IBM Corporation.

Presented by IBM developerWorks

PreferencesPreferences Eclipse has a number of preferences you can set. Whenever you install a plug-in, that plug-in can have

preferences also.As a result, your Eclipse installation can have literally hundreds of

settings.

Choose WindowPreferences to get to the Preferences dialog.

You can change just about everything.

Page 29: Installing and running Eclipse

2-29 Making the most of © 2006 IBM Corporation.

Presented by IBM developerWorks

PreferencesPreferences

Page 30: Installing and running Eclipse

2-30 Making the most of © 2006 IBM Corporation.

Presented by IBM developerWorks

PreferencesPreferences

If you have more than one Java Runtime Environment installed on your machine, you can tell Eclipse which one to use.

You can add new environments or change the default any time you want.

Page 31: Installing and running Eclipse

2-31 Making the most of © 2006 IBM Corporation.

Presented by IBM developerWorks

EditorsEditors

An editor allows you to modify a resource. There are different kinds of editors for different kinds of resources, as you'd expect.

Many plug-ins add their own editors, specialized for editing a particular type of document.

Like all views, editors can be stacked. The asterisk next to the file name above means that HelloWorld.java has been changed.

Page 32: Installing and running Eclipse

2-32 Making the most of © 2006 IBM Corporation.

Presented by IBM developerWorks

The Java editorThe Java editor

Page 33: Installing and running Eclipse

2-33 Making the most of © 2006 IBM Corporation.

Presented by IBM developerWorks

External editorsExternal editors You can associate file types

with external editors if you want. The underlying operating

system may have editors assigned to different file types already.

To associate file types with editors, go to Window PreferencesEditorsFile Associations. In this example, we're

associating the .ecore file type with the Ecore Model Editor.

Page 34: Installing and running Eclipse

Presented by IBM developerWorksibm.com/developerworks/2006 January – April

© 2006 IBM Corporation.Making the most of Making the most of

Other editing functionsOther editing functions

Page 35: Installing and running Eclipse

2-35 Making the most of © 2006 IBM Corporation.

Presented by IBM developerWorks

Other editing functionsOther editing functions In addition to the editors themselves, Eclipse has several

useful features for working with files.SearchingBookmarkingTasksLocal historyFile comparison (think "visual diff") Import/export

Page 36: Installing and running Eclipse

2-36 Making the most of © 2006 IBM Corporation.

Presented by IBM developerWorks

SearchingSearching Eclipse has a very sophisticated search facility. You can search through:

FilesThe help systemJava sourcePlug-ins

There are special search options for each kind of search.

Page 37: Installing and running Eclipse

2-37 Making the most of © 2006 IBM Corporation.

Presented by IBM developerWorks

SearchingSearching

Page 38: Installing and running Eclipse

2-38 Making the most of © 2006 IBM Corporation.

Presented by IBM developerWorks

SearchingSearching

The results of the search show up in the Search view. You can double-click on a match and go directly to that file.

There are toolbar buttons in the Search view; these let you move through the search results. There will be different buttons depending on the kind of search.

Page 39: Installing and running Eclipse

2-39 Making the most of © 2006 IBM Corporation.

Presented by IBM developerWorks

BookmarkingBookmarking

You can create a bookmark in a file and go directly to that spot whenever you want.

To create a bookmark, right-click in the gray area on the left-hand side of the editor. You'll be asked to give the bookmark a name; that's what

Page 40: Installing and running Eclipse

2-40 Making the most of © 2006 IBM Corporation.

Presented by IBM developerWorks

BookmarkingBookmarking

All your bookmarks are listed in the Bookmarks view. Notice that the bookmarks here are in different projects, and that not

all of them are in Java files. You can set a bookmark wherever you want.

Page 41: Installing and running Eclipse

2-41 Making the most of © 2006 IBM Corporation.

Presented by IBM developerWorks

TasksTasks

You can create tasks throughout your project. It's a way of building a to-do list.

You can associate a task with a line in a file ("add better error checking here") or create a more general task ("set up an Ant script to automatically regenerate the Javadoc")

Page 42: Installing and running Eclipse

2-42 Making the most of © 2006 IBM Corporation.

Presented by IBM developerWorks

TasksTasks

The first task here is a generic task that applies to the workspace. The second is a specific task that applies to a particular line in a

particular file. As with bookmarks, you can create a task for any line in any file.

Page 43: Installing and running Eclipse

2-43 Making the most of © 2006 IBM Corporation.

Presented by IBM developerWorks

Local historyLocal history Only applicable to files Each Save creates a new

version You can compare versions There is a similar local history

function for Java elements…

Page 44: Installing and running Eclipse

2-44 Making the most of © 2006 IBM Corporation.

Presented by IBM developerWorks

Comparing FilesComparing Files Highlight any two files and

select Compare With Each Other from the context menu

Differences are shown visually Move information from one file

to another: Entire file Current change

Select next or previous change

Page 45: Installing and running Eclipse

2-45 Making the most of © 2006 IBM Corporation.

Presented by IBM developerWorks

Import/ExportImport/Export Eclipse supports many different ways to import and

export resources.You can import an existing project from another workspaceYou can import or export a zip file, a JAR archive, an EAR file, etc.

You can also drag and drop files from the operating system into the Eclipse environment.Dragging and dropping files from Eclipse into operating system

containers (Windows Explorer, for example) also works.

Page 46: Installing and running Eclipse

2-46 Making the most of © 2006 IBM Corporation.

Presented by IBM developerWorks

Navigating resourcesNavigating resources The Navigate menu has many

ways to find and view your resources.Go Into

Also available from context menu

Go backwards and forwards using the arrow icons

At lower levels the view includes the name of a folder or file

GoTo Start typing the name of the

resource to limit the choice All other resources are hidden

Page 47: Installing and running Eclipse

2-47 Making the most of © 2006 IBM Corporation.

Presented by IBM developerWorks

Copying, moving, renamingCopying, moving, renaming Copying and moving resources:

Use the command from the context menu, orDrag and drop the resource

Copy by holding the Ctrl key as you dragThe Ctrl+X, Ctrl+C and Ctrl+V combinations work most of the time

as well (depends on the view)

Renaming is part of Eclipse's refactoring support.

Page 48: Installing and running Eclipse

2-48 Making the most of © 2006 IBM Corporation.

Presented by IBM developerWorks

PropertiesProperties All resources have properties

The Properties view gives basic information on the resource

The Properties dialog (right-click the resource and select Properties) gives much more detailed info

Some resources have more properties than others.

Page 49: Installing and running Eclipse

2-49 Making the most of © 2006 IBM Corporation.

Presented by IBM developerWorks

Team functionsTeam functions Eclipse has built-in support for versioning, configuration

management and interacting with code repositories such as CVS.

Eclipse also supports FTP and WebDAV. As with everything in the world of Eclipse, many groups

(including IBM) have taken these basic functions and extended them.

Page 50: Installing and running Eclipse

2-50 Making the most of © 2006 IBM Corporation.

Presented by IBM developerWorks

Help is on the wayHelp is on the way Eclipse's help system is very sophisticated. Choose

HelpHelp Contents to see it. You can view help topics from a list, or you can search for

what you need. When you install a plug-in, its help information is

integrated with everything else in the platform. You can create a plug-in that does nothing more than add

information to the help system.

Page 51: Installing and running Eclipse

2-51 Making the most of © 2006 IBM Corporation.

Presented by IBM developerWorks

HelpHelp

Page 52: Installing and running Eclipse

Presented by IBM developerWorksibm.com/developerworks/2006 January – April

© 2006 IBM Corporation.Making the most of Making the most of

SummarySummary

Page 53: Installing and running Eclipse

2-53 Making the most of © 2006 IBM Corporation.

Presented by IBM developerWorks

SummarySummary We've looked at the basics of installing and running

Eclipse.We also discussed the basic terminology of Eclipse, such as

perspectives, views, editors and so forth.

Eclipse is extremely customizable, so you can make the tool work however you think best.

Eclipse also gives you very powerful editing tools to help you manage your code and documents.