EntryPoint
.
An application can register several entrypoints, each at a different URL path. To access an entry point, the path that it is registered at must be appended to the context path of the application.
As an alternative to registering an entrypoint, Eclipse applications can also use the interface IApplication
.
<!ELEMENT extension (entrypoint+)>
<!ATTLIST extension
point CDATA #REQUIRED
id CDATA #IMPLIED
name CDATA #IMPLIED>
<!ELEMENT entrypoint EMPTY>
<!ATTLIST entrypoint
id CDATA #REQUIRED
path CDATA #REQUIRED
class CDATA #IMPLIED
applicationId IDREF #IMPLIED
brandingId IDREF #IMPLIED
csp CDATA #IMPLIED>
EntryPoint
which starts the application. Either this attribute or applicationId must be specified.<extension id="org.eclipse.rap.demo.demoentrypoint" point="org.eclipse.rap.ui.entrypoint"> <entrypoint id="example.entrypoint" class="example.MyEntrypoint" path="/myapp"/> </extension>
EntryPoint
.
In the createUI() method, the user interface of the application is created.
An entrypoint for a simple RAP application could look like this:
public class MyEntryPoint implements EntryPoint {
public int createUI() {
Display display = new Display();
Shell shell = new Shell( display );
shell.setLayout( new GridLayout() );
Label label = new Label( shell, SWT.NONE );
label.setText( "Hello World!" );
shell.layout();
shell.open();
return 0;
}
}
Copyright (c) 2007, 2015 EclipseSource 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