Eclipse/Using Eclipse

From Wikibooks, the open-content textbooks collection

Jump to: navigation, search

Contents

[edit] Purpose

The book is intended for Java Developers but other developers may also find some sections useful.

Goal of this book to make reader a better (Java) Programmer.

Intended Audience - (Java) developers, anyone interested in improving the way he/she programs.

Prerequisites - None

[edit] Acknowledgements

[edit] Getting Started

As described in Eclipse website, Eclipse is an IDE for everything and nothing in particular. Eclipse core is a universal IDE (a general purpose development environment).

[edit] Downloading Eclipse

Eclipse doesn't come with JRE. Its advisable that you download the latest JRE (Java Runtime Environment) from Javasoft web site first.

Then Eclipse IDE can be downloaded from Eclipse website.

[edit] Installing Eclipse

Installing Eclipse just involves unzipping the downloaded file into a directory. After unzipping the Eclipse IDE is ready to run.

[edit] Running Eclipse

Eclipse can be run by executing the file startup.jar. If Java Environment (JAVA_HOME) variables are defined then Eclipse IDE will automatically detect the JRE and start running.

[edit] Getting Help

Types of help available with eclipse:

  1. Online documentation
  2. Context sensitive help
  3. Hover help
  4. Active Help

Eclipse Help can be accessed using external browser http://localhost:<port>/<path_for_help_content> <port> - can be found in preferences.ini file. Eclipse uses a tomcat server for displaying help documentation.

[edit] Configuring Eclipse
  • Tuning your JRE

(Use different workspaces for different JREs otherwise due to autobuild wrong .class files will get generated)

[edit] Using Eclipse

[edit] Workspace

Resource (projects, folders, files)

.metadata folder contains information about the workspace.

Keep different workspaces for different development projects (or different customers)

Bookmarks - A bookmark acts as a link to a particular line in a file.

Tasks - A task is created against each java error. Tasks can also be created as an reminder for some activities to be performed. Task contains priority and completion status. Tasks can also work as bookmarks.

  • Running Multiple Instances of Eclipse at the same time

(See command line options)

[edit] Perspectives

You can create your own (customized) perspective using configurations.

[edit] Running Other Applications within Eclipse

  • File Association (External Programs)
  • Run (External Tools)

need a "how to"/tutorial for External Tools running a main class in one project while referencing a jar file elsewhere. ex. project DoesReallyNeatStuff creates output based on project SomeStuff. How does a project reference the other project using External Tools?

[edit] Java Development using Eclipse

  • Writing Code - generate, edit and navigate Java code.

syntax highlighting, code completion, code assist, tasks and views.

  • Debugging
  • Team Work
  • Improving Productivity - hooking into well defined plugin points
  • Using Eclipse Code

[edit] Debugging Java Programs

[edit] Working in a Team

[edit] Introduction

[edit] Introduction to Eclipse

Eclipse Project is made available under the Eclipse Public License.

About Eclipse contains information about what is eclipse.org?

Eclipse Platform Technical Overview

Eclipse Download

Eclipse Project FAQs

Eclipse Projects

Eclipse Wiki

Eclipse 3.0.1 Online Help

Eclipse Community

[edit] Java Development with Eclipse

Running Eclipse

Getting Started with the Eclipse Platform

Working the Eclipse Platform

Building and testing Java software with Eclipse

Eclipse Java tips

Eclipse contains full supports for both CVS and Apache Ant.

Using Eclipse Europa - A Tutorial

[edit] Eclipse Configuration Management

Preferences and Properties in the Eclipse Workbench UI

[edit] Eclipse Architecture

Eclipse Platform and Plug-Ins

Notes on the Eclipse Plug-in Architecture

[edit] Eclipse Plug-In Programming

[edit] Miscellaneous

Branding your application

  • Eclipse - tool integration platform - open source
  • Eclipse community - 1000s of developers - around 50 software companies
  • Eclipse vision - new paradigm for development tools - platform centric - not tool centric - towards Universal IDE
  • Eclipse Project - tools built independently - work together as integrated sets
  • Eclipse Plug-ins - seemless integration - your imagination is the limited - 100 active Open Source Projects and vendors.

[edit] Highlights

  • Eclipse 3-in-1 - a Java development environment, a tool integration platform, and an open source community.
  • Editor -anticipates your next move - code assist , think faster that you write use spell checker, refactoring - iterative process of improving your code Object Oriented approach, scrapbook - experiment with expressions, search tools,

debugger - breakpoints, display value of variable, hot code replace support - change your code while in debug mode, preference settings - tailor according to your needs yourself,

  • General purpose - For both programming and non-programming development tasks

Java doc comments templates

integrated support for Ant, JUnit

[edit] Basic Concepts

  • Developer's Toolset - (design) modelling tool, IDE, version control, word processor,
  • Artifacts - architecture diagrams, code and user documentation
  • Workspace is a directory where your projects are stored.
  • Workbench consists of views, perspectives and editors.
  • Views provide alternate way of navigation.
  • Editors are associated with the file types. External editors can also be used with editors. OLE based editors integrates well with Eclipse.
  • Perspectives are collection of views.

[edit] Eclipse Architecture

  • Eclipse Platform
  • SWT
  • JFace
  • Workspace
  • Workbench
  • Help
  • Team
  • Debug
  • Plug-In
  • Extension Points
  • Plug-In Development Environment (PDE)
  • Platform Runtime


[edit] Eclipse Plug-In Development

[edit] WorkBench Terminology

  • Menu bar
  • Tool bar
  • Perspective
  • Fast View bar
  • Resource Navigator
  • Properties View
  • Message Area
  • Text editor
  • Outline view
  • Bookmarks view
  • Editor status area
  • Tasks view -

predefined tags TODO, FIXME, XXX

  • Stacked view
  • Help View

[edit] Standard Widget Toolkit (SWT)

[edit] Related Projects

EMF - Eclipse Modelling Framework EMF is a modeling framework and code generation facility for building tools and other applications based on a structured data model

[edit] Appendix

[edit] Glossary

[edit] Accelerators(Key Board Shortcuts)

  1. Ctrl + F6 - switching between various editors.

[edit] How To's

  1. Creating Ant Build File.
    1. Create a simple project.
    2. Create a new file with .xml as extension
    3. Open Ant editor
    4. Write the Ant script
    5. Run As External Tools
  1. Creating a user defined Task Tag
    1. Select Tools > Preference
    2. Select Task Tag
    3. Add new Task Tag

[edit] Resources

  • Visit EclipseWiki for collection of resources such as

Faqs, Code snippets, Cheat sheets, Useful articles, Examples

  • The Java Developer's Guide to Eclipse by Sherry Shavor, Jim D'Anjou, Scott Fairbrother, Dan Kehn, John Kellerman, Pat McCarthy
Personal tools
In other languages