This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 298589 - make xwt runnable on rap
Summary: make xwt runnable on rap
Status: CLOSED FIXED
Alias: None
Product: XWT
Classification: Technology
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows Server 2003
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 321667 (view as bug list)
Depends on:
Blocks: 297501
  Show dependency tree
 
Reported: 2009-12-28 17:56 EST by Erdal Karaca CLA
Modified: 2013-01-24 15:31 EST (History)
6 users (show)

See Also:


Attachments
Patched XWT to run on rap (36.30 KB, patch)
2010-01-04 16:47 EST, Erdal Karaca CLA
yves.yang: iplog+
Details | Diff
screenshot of an rcp app (66.25 KB, image/png)
2010-01-04 16:50 EST, Erdal Karaca CLA
no flags Details
screenshot of the rap version (130.75 KB, image/png)
2010-01-04 16:50 EST, Erdal Karaca CLA
no flags Details
The patch described in Comment #10 (36.23 KB, patch)
2010-09-04 21:56 EDT, Alexey Moshchenikov CLA
yves.yang: iplog+
Details | Diff
The sample RAP application to run XWT test snippets (307.43 KB, application/x-gzip)
2010-09-04 21:59 EDT, Alexey Moshchenikov CLA
no flags Details
Extract form rap-enablement patch for org.eclipse.e4.xwt.tests (12.08 KB, patch)
2010-09-06 04:47 EDT, Alexey Moshchenikov CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Erdal Karaca CLA 2009-12-28 17:56:53 EST
Currently, xwt is not ready to run on rap.
Work needed to enable this:
- extract non-working code
- apply 'single-sourcing' techniques
Comment 1 Erdal Karaca CLA 2010-01-04 16:46:02 EST
So far, I have extracted non-working code in rap and transfered to a single container class.
Patchs and screenshots of an example will follow.
Comment 2 Erdal Karaca CLA 2010-01-04 16:47:27 EST
Created attachment 155285 [details]
Patched XWT to run on rap
Comment 3 Erdal Karaca CLA 2010-01-04 16:50:19 EST
Created attachment 155286 [details]
screenshot of an rcp app

See bug 297501.
Comment 4 Erdal Karaca CLA 2010-01-04 16:50:47 EST
Created attachment 155287 [details]
screenshot of the rap version

See bug 297501.
Comment 5 Benjamin Muskalla CLA 2010-01-11 10:07:18 EST
Great work Erdal. In case you need a helping hand, please ping me.
Comment 6 Yves YANG CLA 2010-01-11 10:24:05 EST
(In reply to comment #5)
> Great work Erdal. In case you need a helping hand, please ping me.

Yes, indeed. We need to find a way to distribute the build somewhere.
Comment 7 Benjamin Muskalla CLA 2010-01-13 06:14:40 EST
As suggested on the RAP mailing list, when there is a ready-to-deploy .war file we would be happy to put it on the EclipseSource server where we host all the other demos. For build it, we could use the Eclipse Build server + CBI.
Comment 8 Yves YANG CLA 2010-01-13 09:05:08 EST
(In reply to comment #7)
> As suggested on the RAP mailing list, when there is a ready-to-deploy .war file
> we would be happy to put it on the EclipseSource server where we host all the
> other demos. For build it, we could use the Eclipse Build server + CBI.

Erdal, I appreciate if you can take over this action. I can add a link in the XWT wiki page.
Comment 9 Yves YANG CLA 2010-08-05 05:27:16 EDT
*** Bug 321667 has been marked as a duplicate of this bug. ***
Comment 10 Alexey Moshchenikov CLA 2010-09-04 21:54:54 EDT
I am heavily using XWT in my RAP applications. In order to have XWT running on RAP the patch proposed in comment #2 is not enough. Therefore I would like to propose another patch which is currently used in my RAP applications.

1. There is no obvious need to deal with absent classes from RAP implementation of SWT.
  - In order to be able to use org.eclipse.swt, org.eclipse.ui. org.eclipse.ui.forms, org.eclipse.jface and org.eclipse.jface.databinding implementations of RAP, the proxy bundles has to be created to satisfy manifest dependencies. Those bundles reexport packages from the dependencies of RAP bundles. In the org.eclipse.swt the proxy bundle can provide mock implementations of the classes required by XWTLoader and others.

2. Although we can provide mocks for the absent classes it does not look reasonable to copy&paste the implementation of SWT and Display classes from RAP in order to implement absent constants and methods. The patch provided along with the next comment contains required modifications to org.eclipse.e4.xwt and org.eclipse.e4.xwt.tests which allow to use original RAP implementations of SWT and Display classes.

3. RAP is session based and Display and Realm are not singletones for the whole application but exist for every established user session. The proposed patch also contains required modifications to support session based nature of RAP.

The patch is followed by another attachment which is an archive with the projects required to run XWT tests under RAP. There are rap.target and the launcher in org.eclipse.e4.xwt.rap.test. After patch is applied to org.eclipse.e4.xwt and org.eclipse.e4.xwt.tests the XWT test snippets can be checked with the sample rap application. Note that RAP tooling has to be installed in order to launch the app. The application launcher is org.eclipse.e4xwt.rap.tests (RAP). After the application is launched XWT test snippets can be started via browser location box. The example URLS are like following: http://127.0.0.1:10080/rap?test=jface.tableviewer.editors.TableViewer_Test, http://127.0.0.1:10080/rap?test=controls.ctabfolder.CTabFolder_Styles.

The patch has been also tested with the regular RCP target environment and all the tests from XWTTestSuite ran green.

Can the patch be applied to the existing sources so that in further XWT use on RAP the code base will be in sync with XWT head version?
Comment 11 Alexey Moshchenikov CLA 2010-09-04 21:56:56 EDT
Created attachment 178220 [details]
The patch described in Comment #10

The patch described in Comment #10
Comment 12 Alexey Moshchenikov CLA 2010-09-04 21:59:56 EDT
Created attachment 178221 [details]
The sample RAP application to run XWT test snippets

The sample RAP application to run XWT test snippets and required proxy bundles to satisfy org.eclipse.e4.xwt manifest. See Comment #10.
Comment 13 Yves YANG CLA 2010-09-05 11:37:49 EDT
Thanks for your contributions. The patch is integrated in source base 20100905.
Comment 14 Alexey Moshchenikov CLA 2010-09-05 18:45:41 EDT
I have checked the sources and figured out that somehow only parts of the patch has been applied. Unfortunately XWTMaps, AbstractMetaclass and the whole org.eclipse.e4.xwt.test bundle happened to remain unchanged. Yves, can you please check and fix this? Without XWTMaps and AbstractMetaclass  changes the XWT is still unusable over RAP and without changes to tests bundle it is not possible to demonstrate test snippets of XWT running in RAP.
Comment 15 Yves YANG CLA 2010-09-05 20:08:21 EDT
(In reply to comment #14)
> I have checked the sources and figured out that somehow only parts of the patch
> has been applied. Unfortunately XWTMaps, AbstractMetaclass and the whole
> org.eclipse.e4.xwt.test bundle happened to remain unchanged. Yves, can you
> please check and fix this? Without XWTMaps and AbstractMetaclass  changes the
> XWT is still unusable over RAP and without changes to tests bundle it is not
> possible to demonstrate test snippets of XWT running in RAP.

Sorry, I don't know why they are left out. It is done. Please check it again.
Comment 16 Alexey Moshchenikov CLA 2010-09-06 04:47:15 EDT
Created attachment 178249 [details]
Extract form rap-enablement patch for org.eclipse.e4.xwt.tests

Thanks Yves. Now org.eclipse.e4.xwt is completely OK, but the org.eclipse.e4.xwt.tests bundle with snippets is still unusable in RAP target environment. I have extracted part of the patch related to org.eclipse.e4.xwt.tests. Can it also be applied?
Comment 17 Yves YANG CLA 2010-09-06 20:56:41 EDT
(In reply to comment #16)
> Created an attachment (id=178249) [details]
> Extract form rap-enablement patch for org.eclipse.e4.xwt.tests
> 
> Thanks Yves. Now org.eclipse.e4.xwt is completely OK, but the
> org.eclipse.e4.xwt.tests bundle with snippets is still unusable in RAP target
> environment. I have extracted part of the patch related to
> org.eclipse.e4.xwt.tests. Can it also be applied?
Sure, it is done.
Comment 18 Alexey Moshchenikov CLA 2010-09-07 02:42:51 EDT
Everything works now. Thanks