Free tutorials for Java, Eclipse and Web programming



Eclipse Rich Ajax Platform (RAP) - Tutorial with Eclipse 3.5 (Galileo)

Lars Vogel

Version 0.7

19.12.2009

Revision History
Revision 0.1- 0.2 03.03.2008Lars Vogel
Created
Revision 0.3 31.05.2009Lars Vogel
Updated to Eclipse 3.5
Revision 0.4 01.06.2009Lars Vogel
Example updated, added theming based on the CSS style
Revision 0.5 01.06.2009Lars Vogel
Added missing themes file, build.properties, hint to Bug 278416
Revision 0.6 12.06.2009Lars Vogel
Single Sourcing
Revision 0.7 17.06.2009Lars Vogel
Update due to solved bug 278416
Revision 0.8 19.12.2009Lars Vogel
Fixed syntax error in View.java

Eclipse RAP

This article describes the basic steps to create Eclipse RAP applications and how to use the CSS theming to modify their look. Eclipse RAP aims to enable developers to build rich, Ajax-enabled web applications by using the Eclipse development model.

This article assumes that you are already familiar with using the Eclipse IDE. This tutorial is based on Eclipse 3.5 (Galileo).


Table of Contents

1. Overview
1.1. Introduction
1.2. Differences to Eclipse RCP
2. Eclipse RAP installation
2.1. Workspace
2.2. Install Eclipse RAP
2.3. Install Target Platform
3. Your first Eclipse RAP application
3.1. Create Project
3.2. Run
3.3. Entrypoint
3.4. Extending your UI
4. Theming
4.1. Overview
4.2. Example
5. Single Sourcing
6. Thank you
7. Questions and Discussion
8. Links and Literature
8.1. Source Code
8.2. Other Resources
8.3. Eclipse RAP

1. Overview

1.1. Introduction

Eclipse RAP is a Eclipse based platform for Ajax web applications which provides part of the API of Eclipse RCP . Eclipse RAP allows to use Eclipse RCP paradigm for developing Ajax web-applications.

RAP is based on the OSGi implementation Equinox . It is possible to run Eclipse RAP applications via the OSGi servlet bridge in a servlet container, e.g. Apache Tomcat or Jetty.

Eclipse RAP supports extension points, views, perspectives, selection service, commands, handlers, editors and databinding.

Eclipse archives this by providing its own implementations for SWT, JFace and the Workbench. Eclipse RAP replaces SWT with RWT (RAP widget toolkit) layer. This toolkit is based on the qooxdoo Ajax library. RWT is a distributed system; every RWT widget has a client and a server part. These part communicate via Ajax.

During development Eclipse RAP applications run in the embedded webserver Jetty.

1.2. Differences to Eclipse RCP

Eclipse RAP does not provide all the possibilities Eclipse RCP (or the underlying plugins provide. For example Eclipse RAP has no Graphics Context which can be used in SWT to draw directly onto the SWT widgets.

Each Eclipse RAP releases provides more functionality so that the differences between Eclipse RCP and Eclipse RAP are getting smaller every day.