Vojtech Szocs has submitted this change and it was merged.
Change subject: webadmin,userportal: Add support for GWT Super Dev Mode
......................................................................
webadmin,userportal: Add support for GWT Super Dev Mode
This patch makes it possible to use Super Dev Mode to
debug oVirt GWT applications (WebAdmin, UserPortal):
http://www.gwtproject.org/articles/superdevmode.html
For oVirt GWT applications currently based on GWT 2.6,
Super Dev Mode is meant as alternative to the existing
GWT debug mechanism, Classic Dev Mode a.k.a OOPHM (Out
of Process Hosted Mode) based on NPAPI browser plugin:
http://www.gwtproject.org/doc/latest/
DevGuideCompilingAndDebugging.html#dev_mode
Key differences between Classic and Super Dev Mode:
* SDM doesn't require any browser plugin
* SDM uses Source Maps to map compiled JavaScript
code to source Java code
* with SDM, debugging hapens **in the browser**
by stepping over the mapped code
* SDM gives developers explicit control over when
the GWT application is re-compiled -- combined
with incremental compiles that take less time,
this saves developer's time
In general, SDM is good for "iterative" development
when one changes UI code and wants to see the change
reflected in the browser much more quickly (compared
to CDM). On the other hand, SDM does NOT allow using
Java IDE to debug UI code, so one has to rely on the
browser's JavaScript developer tools.
To use Super Dev Mode:
1, build Engine for development as following:
$ make install-dev PREFIX="$HOME/ovirt-engine" \
DEV_BUILD_GWT_SUPER_DEV_MODE=1
2, setup & start Engine
3, start GWT code server which re-compiles the GWT
application on-demand and serves its resources:
$ make gwt-debug DEBUG_MODULE=webadmin \
DEV_BUILD_GWT_SUPER_DEV_MODE=1
note: upon starting, the code server compiles
an initial "Chrome/English" permutation (this
is SDM's default behavior)
4, visit
http://127.0.0.1:9876/ and save "Dev Mode
On & Off" bookmarklets in your browser
5, visit oVirt GWT application in your browser,
click "Dev Mode On", then click "Compile"
http://127.0.0.1:8080/ovirt-engine/webadmin/WebAdmin.html
6, open browser's developer tools (Ctrl-Shift-I),
navigate to sources and put breakpoints into
the mapped code
7, after making UI code changes, click "Dev Mode
On" and "Compile" again to see changes applied
IMPORTANT NOTE: This patch modifies the primary linker
of oVirt GWT applications from 'std' to 'xsiframe':
http://www.gwtproject.org/doc/latest/DevGuideLinkers.html
see gwt-user-2.6.1/com/google/gwt/core/Core.gwt.xml
While this change should not impact the functionality
of oVirt GWT applications, it's suggested to merge the
patch **only** after running UI functional tests, just
to be on safe side.
Change-Id: I6e03534e8af4f9c61d93bb715b80b433127cc4e8
Signed-off-by: Vojtech Szocs <vszocs(a)redhat.com>
---
M Makefile
M README.developer
M frontend/webadmin/modules/frontend/pom.xml
M
frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/server/gwt/AbstractXsrfProtectedRpcServlet.java
A
frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/server/gwt/RpcRemoteOracleServlet.java
A frontend/webadmin/modules/frontend/src/main/resources/META-INF/gwt-super-dev.properties
M
frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/GwtCommon.gwt.xml
M frontend/webadmin/modules/pom.xml
M frontend/webadmin/modules/userportal-gwtp/pom.xml
M frontend/webadmin/modules/webadmin/pom.xml
10 files changed, 251 insertions(+), 6 deletions(-)
Approvals:
Alexander Wels: Looks good to me, approved
Jenkins CI: Passed CI tests
Vojtech Szocs: Verified
Scott Dickerson: Looks good to me, but someone else must approve
--
To view, visit
https://gerrit.ovirt.org/50742
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I6e03534e8af4f9c61d93bb715b80b433127cc4e8
Gerrit-PatchSet: 10
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Alexander Wels <awels(a)redhat.com>
Gerrit-Reviewer: Alexander Wels <awels(a)redhat.com>
Gerrit-Reviewer: Daniel Erez <derez(a)redhat.com>
Gerrit-Reviewer: Gilad Chaplik <gchaplik(a)redhat.com>
Gerrit-Reviewer: Greg Sheremeta <gshereme(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Oved Ourfali <oourfali(a)redhat.com>
Gerrit-Reviewer: Scott Dickerson <sdickers(a)redhat.com>
Gerrit-Reviewer: Tomas Jelinek <tjelinek(a)redhat.com>
Gerrit-Reviewer: Vojtech Szocs <vszocs(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>