Develop your first Eclipse RCP application

Source: Internet
Author: User
Tags range require resource

Before you start

This tutorial applies to developers who want to learn how to use Eclipse Rich-Client Platform (RCP). Eclipse has developed into a platform with a wide range of applications, serving a broad range of end users. As an integrated platform, RCP has the same original functionality as Eclipse, but the overall memory footprint is smaller and the user interface is more flexible. RCP makes it possible to write desktop applications in the Java™ programming language.

About this tutorial

This tutorial uses Eclipse RCP to build an application. The sample application is divided into four parts, each of which is built on top of the previous one. Start by creating a basic RCP application with the help of the RCP templates provided by Eclipse. Then, add some actions, preference pages, views, and help to the basic RCP application. Next is the branding and transformation of the basic RCP application into a product. Finally, you package and deploy the RCP products outside of Eclipse.

Prerequisite conditions

This tutorial assumes that you understand basic programming knowledge. Understanding the Java programming language and Eclipse is better, but not required.

System Requirements

The following tools are required:

Eclipse Eclipse is the platform on which RCP resides. Download Eclipse v3.1.x from eclipse.org. Java Technology Eclipse and all of its plug-ins require Java technology. Download Java technology from Sun Microsystems or IBM.

Make sure to read the installation section for useful step-by-step instructions.

What is Rich-Client Platform?

Initially, the Eclipse platform was designed as an open tools platform. However, starting with Eclipse V3.0, it has been rebuilt so that its components can be used to build almost any client application. The minimum set of plug-ins required to build a rich client application is collectively known as rich-client Platform (RCP). These rich applications are still based on the dynamic plug-in model, and the graphical user interface is built using the same toolbox and extension points. The key difference, however, is that the RCP application's workbench is under fine-grained control by the plug-in developer. Note that the Eclipse IDE itself is an RCP application.

RCP Requirements

To build an RCP application with a graphical user interface, the following plug-ins and their prerequisites are required: Org.eclipse.ui and Org.eclipse.core.runtime. The overall disk demand to Eclipse V3.1.1,RCP is approximately 6.6 MB, which includes the above Plug-ins, Startup.jar, and Eclipse.exe executables. Today, RCP applications are free to use any of the necessary APIs and can require any plug-ins, such as Help UI and Update Manager, on top of the minimum requirements.

The workspace resource model provided by the Org.eclipse.core.resources plug-in is not considered part of the RCP. Although it is the underlying data model for the Eclipse IDE, RCP does not guarantee applications built using the underlying data model. The data model can be a local file system, a remote database, or a file elsewhere. If it makes sense to the application, Org.eclipse.core.resources can be included and used as the data model for the application, but this is not required.

The Org.eclipse.ui.ide plug-in is located on the upper level of the common table of work (Org.eclipse.ui) and defines the application for the Eclipse IDE, and other IDE components on top of the Eclipse IDE, such as the Java Development Too LS (JDT), Plug-in Development Environment (PDE), Debugger, and team support. The IDE instantiates the Universal Workbench, configures the IDE-specific menu and toolbar entries, and adds IDE-specific views, preference pages, and other extensions. The IDE uses the workspace resource model as its underlying data model. Org.eclipse.ui.ide plug-ins and extensions defined within the IDE are not designed to be reused in other RCP applications.

The Eclipse runtime defines the plug-ins that other plug-ins rely on (Org.eclipse.osgi and Org.eclipse.core.runtime). The Open Services Gateway Initiative (OSGI) framework calls a plug-in a package (bundle). The package, together with OSGi, specifies and performs processes such as Java class loading, prerequisite management, and the lifecycle of packages. The eclipse Core runtime is responsible for discovering and running the primary Eclipse application and maintaining the registration of Plug-ins and their extensions and extension points. In addition, the runtime provides a class of tools such as logging, debug trace options, preference storage, and concurrent infrastructure.

Basis

Step 1: Create the smallest Hello world RCP application

Click CTRL + N to open the New Wizard.

Select Plug-in Project and click Next.

Enter Com.ibm.plte in the Project Name text field, and then click Next.

Select Yes for "Would to create a rich client application" and click Next.

Select the Hello RCP template and click Finish.

The Open Associated Perspective dialog box will pop up. Click Yes.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.