Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Muskalla2010-06-08 11:34:55 +0000
committerBenjamin Muskalla2010-06-08 11:34:55 +0000
commit1a0dda291c34f189c6ffb64927074a77db318e60 (patch)
treeab44c49212037eca3b06ef9b3cf48afbb288ec41 /bundles/org.eclipse.rap.ui/schema
parenta5e771ec507c571863d742cb7c7b5d34cd9ce56c (diff)
downloadorg.eclipse.rap-1a0dda291c34f189c6ffb64927074a77db318e60.tar.gz
org.eclipse.rap-1a0dda291c34f189c6ffb64927074a77db318e60.tar.xz
org.eclipse.rap-1a0dda291c34f189c6ffb64927074a77db318e60.zip
fixed bug 288707: Extension point description for PhaseListener is incomplete
Diffstat (limited to 'bundles/org.eclipse.rap.ui/schema')
-rw-r--r--bundles/org.eclipse.rap.ui/schema/rap/entrypoint.exsd22
-rw-r--r--bundles/org.eclipse.rap.ui/schema/rap/phaselistener.exsd61
2 files changed, 54 insertions, 29 deletions
diff --git a/bundles/org.eclipse.rap.ui/schema/rap/entrypoint.exsd b/bundles/org.eclipse.rap.ui/schema/rap/entrypoint.exsd
index f995b72552..c5c3f8a9b1 100644
--- a/bundles/org.eclipse.rap.ui/schema/rap/entrypoint.exsd
+++ b/bundles/org.eclipse.rap.ui/schema/rap/entrypoint.exsd
@@ -6,7 +6,7 @@
<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;.
+ 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;.
</documentation>
</annotation>
@@ -95,7 +95,7 @@
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;
+ id=&quot;org.eclipse.rap.demo.entrypoint&quot;
class=&quot;org.eclipse.rap.demo.MyAppEntrypoint&quot;
parameter=&quot;myapp&quot;/&gt;
&lt;/extension&gt;
@@ -113,24 +113,16 @@
&lt;pre&gt;
public class MyAppEntrypoint implements IEntryPoint {
- public Display createUI() {
- Display display = PlatformUI.createDisplay();
- PlatformUI.createAndRunWorkbench( display, new ApplicationWorkbenchAdvisor() );
- return display;
- }
+ public Display createUI() {
+ Display display = PlatformUI.createDisplay();
+ PlatformUI.createAndRunWorkbench( display, new ApplicationWorkbenchAdvisor() );
+ return display;
+ }
}
&lt;/pre&gt;
</documentation>
</annotation>
- <annotation>
- <appInfo>
- <meta.section type="implementation"/>
- </appInfo>
- <documentation>
-
- </documentation>
- </annotation>
<annotation>
<appInfo>
diff --git a/bundles/org.eclipse.rap.ui/schema/rap/phaselistener.exsd b/bundles/org.eclipse.rap.ui/schema/rap/phaselistener.exsd
index ead379951a..435d95588b 100644
--- a/bundles/org.eclipse.rap.ui/schema/rap/phaselistener.exsd
+++ b/bundles/org.eclipse.rap.ui/schema/rap/phaselistener.exsd
@@ -1,16 +1,21 @@
<?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="phaselistener" name="PhaseListener"/>
</appInfo>
<documentation>
- [Enter description of this extension point.]
+ The extension point is used to register an &lt;code&gt;PhaseListener&lt;/code&gt; implementation. PhaseListeners are objects that wish to be notified at the beginning and ending of processing for each standard phase of the request processing lifecycle (see &lt;code&gt;ILifeCycle&lt;/code&gt;). The extension should provide a class that implements &lt;code&gt;org.eclipse.rwt.lifecycle.PhaseListener&lt;/code&gt;.
</documentation>
</annotation>
<element name="extension">
+ <annotation>
+ <appInfo>
+ <meta.element />
+ </appInfo>
+ </annotation>
<complexType>
<sequence>
<element ref="listener" minOccurs="1" maxOccurs="unbounded"/>
@@ -62,7 +67,7 @@
<meta.section type="since"/>
</appInfo>
<documentation>
- [Enter the first release in which this extension point appears.]
+ RAP 1.0
</documentation>
</annotation>
@@ -71,7 +76,15 @@
<meta.section type="examples"/>
</appInfo>
<documentation>
- [Enter extension point usage example here.]
+ &lt;pre&gt;
+&lt;extension
+ id=&quot;org.eclipse.rap.demo.phaselistenerextension&quot;
+ point=&quot;org.eclipse.rap.ui.phaselistener&quot;&gt;
+ &lt;entrypoint
+ id=&quot;org.eclipse.rap.demo.phaselistener&quot;
+ class=&quot;org.eclipse.rap.demo.DemoPhaseListener&quot; /&gt;
+ &lt;/extension&gt;
+&lt;/pre&gt;
</documentation>
</annotation>
@@ -80,25 +93,45 @@
<meta.section type="apiInfo"/>
</appInfo>
<documentation>
- [Enter API information here.]
- </documentation>
- </annotation>
+ RWT divides the life cycle of an HTTP request into different phases that are executed sequentially. Each phase has its special purpose and creates the prerequisites needed by the following phases for proper execution. Each PhaseListener has to implement the &lt;code&gt;org.eclipse.rwt.lifecycle.PhaseListener&lt;/code&gt; interface.
- <annotation>
- <appInfo>
- <meta.section type="implementation"/>
- </appInfo>
- <documentation>
- [Enter information about supplied implementation of this extension point.]
+&lt;pre&gt;
+import org.eclipse.rwt.lifecycle.*;
+
+public class DemoPhaseListener implements PhaseListener {
+
+ public void beforePhase( final PhaseEvent event ) {
+ // ...
+ RWT.getLifeCycle().removePhaseListener( this );
+ }
+
+ public void afterPhase( final PhaseEvent event ) {
+ // ...
+ }
+
+ public PhaseId getPhaseId() {
+ return RENDER;
+ }
+}
+&lt;/pre&gt;
+
+As &lt;code&gt;PhaseListener&lt;/code&gt;s are attached to the RWT lifecycle and thus available globally, you need to make sure to remove them properly if you do not need them anymore (see &lt;code&gt;RWT.getLifeCycle().removePhaseListener&lt;/code&gt;.
+
+The the case that the PhaseListener needs to touch any UI-related objects (eg. widgets), you have to make sure that you compare the current display with the one attached to the current session.
</documentation>
</annotation>
+
<annotation>
<appInfo>
<meta.section type="copyright"/>
</appInfo>
<documentation>
-
+ Copyright (c) 2007, 2010 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