diff --git a/.buckconfig b/.buckconfig index 43bfa5e8a7..211e878459 100644 --- a/.buckconfig +++ b/.buckconfig @@ -12,6 +12,7 @@ release = //:release safari = //:safari withdocs = //:withdocs + codeserver = //lib/gwt:codeserver [buildfile] includes = //tools/default.defs diff --git a/Documentation/dev-eclipse.txt b/Documentation/dev-eclipse.txt index 384bb74f41..d8db555909 100644 --- a/Documentation/dev-eclipse.txt +++ b/Documentation/dev-eclipse.txt @@ -67,6 +67,53 @@ Duplicate the existing launch configuration: * Close the Debug Configurations dialog and save the changes when prompted. +=== Running Super Dev Mode + +Install dependencies: + +---- + buck build codeserver +---- + +Due to codeserver not correctly identifying user agent problem, that was +already fixed upstream but not released yet, the used user agent must be +explicitly set in `GerritGwtUI.gwt.xml` for SDM to work: + +[source,xml] +---- + +---- + +or + +[source,xml] +---- + +---- + +* Select in Eclipse Run -> Debug Configurations `gerrit_gwt_codeserver.launch` +* Select in Eclipse Run -> Debug Configurations `gerrit_daemon.launch` +* Only once: add bookmarks for `Dev Mode On/Off` from codeserver URL: +`http://localhost:9876/` to your bookmark bar +* Make sure to activate source maps feature in your browser +* Load Gerrit page `http://localhost:8080` +* Open developer tools, source tab +* Click on `Dev Mode On` bookmark +* Select `gerrit_ui` module to compile (the `Compile` button can also be used +as a bookmarklet). +* Navigate on the left to: sourcemaps/gerrit_ui folder (`Ctrl+O` key shortcut +can be used) +* Select a file, for example com.google.gerrit.client.change.ChangeScreen2 +and put a breakpoint +* Navigate in application in change screen and confirm hitting the breakpoint +* Select `Dev Mode Off` when the debugging session is finished + +After changing the client side code: +* click `Dev Mode On` then `Compile` to reflect your changes in debug session +* Hitting `F5` in the browser will just load the last compile output, without +recompiling + + [[known-problems]] == Known problems diff --git a/lib/gwt/BUCK b/lib/gwt/BUCK index 8d2b7184d1..3bf514d346 100644 --- a/lib/gwt/BUCK +++ b/lib/gwt/BUCK @@ -18,11 +18,32 @@ maven_jar( deps = [ ':javax-validation', ':javax-validation_src', + ':json', ], attach_source = False, exclude = ['org/eclipse/jetty/*'], ) +maven_jar( + name = 'codeserver', + id = 'com.google.gwt:gwt-codeserver:' + VERSION, + sha1 = '940edc715cc31b1957e18f617f75a068f251346a', + license = 'Apache2.0', + deps = [ + ':dev', + ':legacy-jetty-servlet-aggregate', + ], + attach_source = False, +) + +maven_jar( + name = 'json', + id = 'org.json:json:20140107', + sha1 = 'd1ffca6e2482b002702c6a576166fd685e3370e3', + license = 'DO_NOT_DISTRIBUTE', + attach_source = False, +) + maven_jar( name = 'javax-validation', id = 'javax.validation:validation-api:1.0.0.GA', @@ -52,3 +73,21 @@ maven_jar( visibility = [], ) +maven_jar( + name = 'legacy-jetty-servlet-aggregate', + id = 'org.eclipse.jetty.aggregate:jetty-servlet:8.1.12.v20130726', + sha1 = '4d0f0cb6e5a54de01be46717a7ab48d0b45dcadd', + license = 'Apache2.0', + attach_source = False, + deps = [':legacy-jetty-servlets'], + visibility = [], +) + +maven_jar( + name = 'legacy-jetty-servlets', + id = 'org.eclipse.jetty:jetty-servlets:8.1.12.v20130726', + sha1 = '4ebc6894b899fee0c3597697d11f255ce9214bbf', + license = 'Apache2.0', + attach_source = False, + visibility = [], +) diff --git a/tools/eclipse/gerrit_gwt_codeserver.launch b/tools/eclipse/gerrit_gwt_codeserver.launch new file mode 100644 index 0000000000..e7f5206eef --- /dev/null +++ b/tools/eclipse/gerrit_gwt_codeserver.launch @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + +