Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

EDT:New Project Wizard

Revision as of 02:47, 31 December 2011 by Hjiyong.cn.ibm.com (Talk | contribs)

Introduction

In order to start EGL programming, the first thing is to create a new EGL project. The EGL new project wizard looks very much the same as other eclipse new project wizards. If you're familiar with eclipse, it will be very easy to handle and create a new project in EDT. In this page, we will introduce EGL project type, how to create each kind of project and finally how to extend EGL project wizard to create your own project type.

EGL Project Type

There are 4 types of project templates in the EDT released.

  1. Basic project: It is used for developing EGL programs, services, and libraries. The project can be configured to generate to multiple target languages.
    Typical usages:Batch (command line) programs, Common libraries and records, Web services, Data access services and librarie
  2. Web 2.0 client application project:It is used for developing rich web applications that utilize existing web services. EGL Rich UI code is generated to JavaScript and HTML. Applications are deployed to web application servers, such as Apache Tomcat.
    Typical usages: Web client for existing services, Mashup applications,
    Target languages: JavaScript
  3. Web 2.0 client with services application project: Creates a project for developing rich web applications and related services accessible from standard web browsers. Service code is generated to Java and EGL Rich UI code is generated to JavaScript™ and HTML. Applications are deployed to web application servers, such as Apache Tomcat.
    Typical usages: End-to-end client/server application
    Target languages: Java, JavaScript
  4. Hello world project: This is a simple example application that demonstrates an EGL Rich UI web application calling an EGL service.

Notice that, besides the 4 built-in project types, developers can extend the project wizard to add their own project types. In a new project type, developers can add a bunch of setting parameter, add new default packages and handlers and include default copyright statements etc. The hello world project is also an example to demonstrate the extensibility.

Create a New EGL Project

Open New Project Wizard

  1. From the menu bar in the EGL perspective, click File > New > EGL Project. The EGL Project window opens.
  2. The EGL Project window is as shown in the following snapshot.  
    • Project name: This field is required. Developers must specify a name for the new project.
    • If you want the project to be created in your Eclipse workspace, leave the Use the default location for the project check box selected.
    • Select the template you want to use. An introduction will be shown in the right pane when a template is selected. The selected template will be remembered. When you create a new project, the template being used last time will be selected by default.
      New Project Window
  3. Select the template you want and click next to go to the next setting page.

Create a Basic Project

  1. Open new project wizard as described in the last section, select "Basic" and click Next
  2. The EGL Setting Page will display as following snapshot. You can specify the compiler and generator setting for the new project. Notice that, you can change these setting after project created.
    • Compiler Selection: You can specify the compiler used in the new project. The default and compiler is EDT compiler. Developers can extend or implement their own compilers to be shown here.
    • The default new project generator setting complies to the workspace setting. You can set the project specific generator setting by check the "override the generation settings from workspace preference". It is good practice to save the most frequently generator setting by configuring the workspace generator preference.
    • If the checkbox is checked, you can specify a set of generators by select or deselect the appropriate generator name. Notice that, developer can also extend their own generators to be shown here.
    • If you want to change the name of the default generation folder for the selected generator, type the desired folder name in the Default generation folder field on the tab of the selected generator.
    • Click Next, the EGL Build Path page is displayed.
      Basic Project Setting page
  3. On the EGL Build Path Page, you can specify the dependent EGL projects for the new project. Notice that, you can change these setting after project created.
    • On the Projects tab, select any other projects in your workspace to be added to the build path of the new project.
      EGL Build Path
    • On the Order and Export tab, optionally reorder the names of the projects that will be available to projects that reference the current project.
      Order and Export
  4. Click Finish, a new project is created in the workspace. The project in the project Explorer looks like the picture. EGLSource folder and a egldd file is created in the project.
    Basic Project

Create a Web 2.0 Client Project

  1. Open new project wizard as described in the last section, select "Web 2.0 client application" and click Next
  2. Web 2.0 setting page is displayed as the following image.
    • Base Package is an optional field. The Web 2.0 project includes a default package "client". If the base package field is specified, the default package name will be #basePackageName#.client. For example, base package name is sample, the created project will have a default package sample.client.
    • Widget Library Selection: EDT Web 2.0 project can use web 2.0 widget in the project. There are already 2 built-in widget projects which includes dozens of widgets. Developer can also extend new widget project or new version of widget project. All the widget projects will be listed in this page. Users can select the widget they want to use in the project.
      Web .0 client application project
      • The standard widgets and utilities is selected by default and can not be deselected.
      • When clicking at the widget project line, the description is shown in the bottom
      • User can switch version by click in the version field. For example, Dojo widgets have local version and remote version.
        Switch widget project version
    • Click Next to the EGL Build Path Page
  3. EGL Build Path Page is the same as Basic project.
  4. Click Finish, several new projects are created in the workspace. The projects include the newly created egl project and the selected widget projects. The Web 2.0 client project should have EGLSource folder and WebContent folder; A default package samples.client is also created in the EGLSource folder.
    Web 2.0 client project

Create a Web 2.0 Client with Services Project

Add New Project Type

Create Extension Point

Create Operations

Use New Project Type

Back to the top