Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRalf Sternberg2012-02-18 19:48:46 +0000
committerRalf Sternberg2012-02-18 19:48:46 +0000
commitd7e93472d634b1e42cedc8b63354e68de19874aa (patch)
treefb8ffc5afdbcfe834187f68252cc3e9b9b3b5713 /bundles/org.eclipse.rap.ui/schema
parent0551a3e93dbc9fb4f5e6cd83ec9ad3cd70ab80a7 (diff)
downloadorg.eclipse.rap-d7e93472d634b1e42cedc8b63354e68de19874aa.tar.gz
org.eclipse.rap-d7e93472d634b1e42cedc8b63354e68de19874aa.tar.xz
org.eclipse.rap-d7e93472d634b1e42cedc8b63354e68de19874aa.zip
Added path parameter to entry point extension point, deprecated parameter attribute - bug 365633: Register entrypoints by path instead of name
https://bugs.eclipse.org/bugs/show_bug.cgi?id=365633
Diffstat (limited to 'bundles/org.eclipse.rap.ui/schema')
-rw-r--r--bundles/org.eclipse.rap.ui/schema/rap/entrypoint.exsd95
1 files changed, 63 insertions, 32 deletions
diff --git a/bundles/org.eclipse.rap.ui/schema/rap/entrypoint.exsd b/bundles/org.eclipse.rap.ui/schema/rap/entrypoint.exsd
index c5c3f8a9b1..8837f5b7af 100644
--- a/bundles/org.eclipse.rap.ui/schema/rap/entrypoint.exsd
+++ b/bundles/org.eclipse.rap.ui/schema/rap/entrypoint.exsd
@@ -1,16 +1,28 @@
<?xml version='1.0' encoding='UTF-8'?>
<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.rap.ui">
+<schema targetNamespace="org.eclipse.rap.ui" xmlns="http://www.w3.org/2001/XMLSchema">
<annotation>
<appInfo>
<meta.schema plugin="org.eclipse.rap.ui" id="entrypoint" name="EntryPoint"/>
</appInfo>
<documentation>
- A major difference between RCP and RAP is the way an application is started. With regular SWT applications you would use the &lt;code&gt;main(String[] args)&lt;/code&gt; method, in RCP an implementation of &lt;code&gt;IApplication&lt;/code&gt;. As RAP uses a life cycle to control the application startup the application needs an &lt;code&gt;IEntrypoint&lt;/code&gt; implementation which does mostly the same as &lt;code&gt;IApplication&lt;/code&gt;. The difference is that we need to do not dispose the display but return it to RAP in the &lt;code&gt;createUI&lt;/code&gt; method. There can be several entrypoints for the same application which are distinguished by a paramter in the URI for this application like &lt;code&gt;&amp;lt;host&amp;gt;:&amp;lt;port&amp;gt;/rap?startup=&amp;lt;entrypointname&amp;gt;&lt;/code&gt;.
+ For every RAP application, an entry point class must be registered with the framework. The framework will create a separate instance of this entry point for every user session. Entry points must implement the interface &lt;code&gt;IEntryPoint&lt;/code&gt;.
+&lt;p&gt;
+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.
+&lt;/p&gt;
+&lt;p&gt;
+As an alternative to registering an entrypoint, Eclipse applications can also use the interface &lt;code&gt;IApplication&lt;/code&gt;.
+&lt;/p&gt;
+
</documentation>
</annotation>
<element name="extension">
+ <annotation>
+ <appInfo>
+ <meta.element />
+ </appInfo>
+ </annotation>
<complexType>
<sequence>
<element ref="entrypoint" minOccurs="1" maxOccurs="unbounded"/>
@@ -66,11 +78,21 @@
</appInfo>
</annotation>
</attribute>
- <attribute name="parameter" type="string" use="required">
+ <attribute name="path" type="string">
+ <annotation>
+ <documentation>
+ The URL path to register the entry point at.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="parameter" type="string">
<annotation>
<documentation>
- The name which should be used from outside in the URI.
+ A URL parameter name to access the entry point. Deprecated, use the path attribute instead.
</documentation>
+ <appInfo>
+ <meta.attribute deprecated="true"/>
+ </appInfo>
</annotation>
</attribute>
</complexType>
@@ -78,6 +100,35 @@
<annotation>
<appInfo>
+ <meta.section type="apiInfo"/>
+ </appInfo>
+ <documentation>
+ Each entrypoint has to implement the &lt;code&gt;IEntryPoint&lt;/code&gt; interface.
+In the createUI() method the user interface of the application is created.
+An entrypoint for a simple RAP application could look like this:
+
+&lt;pre&gt;
+public class MyEntryPoint implements IEntryPoint {
+
+ 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( &quot;Hello World!&quot; );
+
+ shell.layout();
+ shell.open();
+ return 0;
+ }
+}
+&lt;/pre&gt;
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
<meta.section type="since"/>
</appInfo>
<documentation>
@@ -95,45 +146,25 @@
id=&quot;org.eclipse.rap.demo.demoentrypoint&quot;
point=&quot;org.eclipse.rap.ui.entrypoint&quot;&gt;
&lt;entrypoint
- id=&quot;org.eclipse.rap.demo.entrypoint&quot;
- class=&quot;org.eclipse.rap.demo.MyAppEntrypoint&quot;
- parameter=&quot;myapp&quot;/&gt;
+ id=&quot;org.eclipse.rap.demo.entrypoint&quot;
+ class=&quot;org.eclipse.rap.demo.MyEntrypoint&quot;
+ path=&quot;/myapp&quot;/&gt;
&lt;/extension&gt;
&lt;/pre&gt;
</documentation>
</annotation>
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
- Each entrypoint has to implement the &lt;code&gt;IEntryPoint&lt;/code&gt; interface. There is no API to register entrypoints on the fly. An entrypoint for a regular RCP application could look like this:
-
-&lt;pre&gt;
-public class MyAppEntrypoint implements IEntryPoint {
-
- public Display createUI() {
- Display display = PlatformUI.createDisplay();
- PlatformUI.createAndRunWorkbench( display, new ApplicationWorkbenchAdvisor() );
- return display;
- }
-}
-&lt;/pre&gt;
- </documentation>
- </annotation>
-
<annotation>
<appInfo>
<meta.section type="copyright"/>
</appInfo>
<documentation>
- Copyright (c) 2007 Innoopract Informationssysteme GmbH and others.&lt;br&gt;
-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 &lt;a
-href=&quot;http://www.eclipse.org/legal/epl-v10.html&quot;&gt;http://www.eclipse.org/legal/epl-v10.html&lt;/a&gt;
+ Copyright (c) 2007, 2012 Innoopract Informationssysteme GmbH and others.&lt;br&gt;
+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
+&lt;a href=&quot;http://www.eclipse.org/legal/epl-v10.html&quot;&gt;http://www.eclipse.org/legal/epl-v10.html&lt;/a&gt;
</documentation>
</annotation>

Back to the top