Community
Participate
Working Groups
Currently, xwt is not ready to run on rap. Work needed to enable this: - extract non-working code - apply 'single-sourcing' techniques
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.
Created attachment 155285 [details] Patched XWT to run on rap
Created attachment 155286 [details] screenshot of an rcp app See bug 297501.
Created attachment 155287 [details] screenshot of the rap version See bug 297501.
Great work Erdal. In case you need a helping hand, please ping me.
(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.
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.
(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.
*** Bug 321667 has been marked as a duplicate of this bug. ***
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?
Created attachment 178220 [details] The patch described in Comment #10 The patch described in Comment #10
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.
Thanks for your contributions. The patch is integrated in source base 20100905.
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.
(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.
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?
(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.
Everything works now. Thanks