EntryPoint

Identifier:
org.eclipse.rap.ui.entrypoint

Since:
RAP 1.0

Description:
A major difference between RCP and RAP is the way an application is started. With regular SWT applications you would use the main(String[] args) method, in RCP an implementation of IApplication. As RAP uses a life cycle to control the application startup the application needs an IEntrypoint implementation which does mostly the same as IApplication. The difference is that we need to do not dispose the display but return it to RAP in the createUI method. There can be several entrypoints for the same application which are distinguished by a paramter in the URI for this application like <host>:<port>/rap?startup=<entrypointname>.

Configuration Markup:

<!ELEMENT extension (entrypoint+)>

<!ATTLIST extension

point CDATA #REQUIRED

id    CDATA #IMPLIED

name  CDATA #IMPLIED

>


<!ELEMENT entrypoint EMPTY>

<!ATTLIST entrypoint

id        CDATA #REQUIRED

class     CDATA #REQUIRED

parameter CDATA #REQUIRED

>


Examples:

<extension
    id="org.eclipse.rap.demo.demoentrypoint"
    point="org.eclipse.rap.ui.entrypoint">
  <entrypoint
     id="org.eclipse.rap.demo.entrypoint"
        class="org.eclipse.rap.demo.MyAppEntrypoint"
        parameter="myapp"/>
  </extension>

API Information:
Each entrypoint has to implement the IEntryPoint interface. There is no API to register entrypoints on the fly. An entrypoint for a regular RCP application could look like this:

public class MyAppEntrypoint implements IEntryPoint {

 public Display createUI() {
  Display display = PlatformUI.createDisplay();
  PlatformUI.createAndRunWorkbench( display, new ApplicationWorkbenchAdvisor() );
  return display;
 }
}


Copyright (c) 2007 Innoopract Informationssysteme GmbH and others.
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html