home.md
... ...
@@ -44,6 +44,7 @@ SAP is at the center of today’s technology revolution, developing innovations
44 44
* [[Development Environment|wiki/development-environment]]
45 45
* [[Working with GWT UI Binder|wiki/gwt-ui-binder]]
46 46
* [[Working with GWT Locally|wiki/local-gwt]]
47
+ * [[Working with GWT Super Dev Mode|wiki/super-dev-mode]]
47 48
* [[Mobile Development|wiki/mobile-development]]
48 49
* [[Security|wiki/security]]
49 50
* [[Java De(Serialization) and Circular Dependencies|wiki/java-de-serialization-and-circular-dependencies]]
wiki/onboarding.md
... ...
@@ -10,13 +10,15 @@ First of all, make sure you've looked at http://www.amazon.de/Patterns-Elements-
10 10
11 11
1. Eclipse (e.g. Eclipse Luna for Eclipse Committers), http://www.eclipse.org
12 12
2. Eclipse Extensions
13
- * Install Eclipse GWT should be version 2.6.1 (https://developers.google.com/eclipse/docs/download)
13
+ * Install Google plugin for Eclipse (https://developers.google.com/eclipse/docs/download)
14
+ * Install Eclipse debugger for GWT SuperDevMode (master version: http://p2.sapsailing.com/p2/sdbg; public release: http://sdbg.github.io/p2)
14 15
3. Git (e.g. msysGit for Windows v1.7.10), http://git-scm.com
15 16
4. MongoDB (e.g. Production Release 2.0.4), download: http://www.mongodb.org/
16 17
5. RabbitMQ, download from http://www.rabbitmq.com/. Requires Erlang to be installed. RabbitMQ installer will assist in installing Erlang.
17 18
6. JDK 1.7 (Java SE 7), http://jdk7.java.net
18 19
7. JDK 1.8 (Java SE 8), http://jdk8.java.net
19 20
8. Maven 3.1.1 (or higher), http://maven.apache.org
21
+9. GWT SDK 2.7.0 (http://www.gwtproject.org/download.html)
20 22
21 23
#### Further optional but recommended installations
22 24
... ...
@@ -49,8 +51,10 @@ First of all, make sure you've looked at http://www.amazon.de/Patterns-Elements-
49 51
2. Check out the 'master' branch from the git repository. The 'master' branch is the main development branch. Please check that you start your work on this branch.
50 52
3. Setup and configure Eclipse
51 53
* Make absolutely sure to import CodeFormatter.xml (from $GIT_HOME/java) into your Eclipse preferences (Preferences->Java->Code Style->Fortmatter)
52
- * Install the Eclipse GWT-Plugin (now called Google Plugin for Eclipse, you need the Google WebToolkit SDK from the same update site, too)
54
+ * Install the Eclipse GWT-Plugin (now called Google Plugin for Eclipse)
53 55
* Install the Google Android SDK from the same Google Plugin for Eclipse update site
56
+ * Install GWT SDK and add the SDK in Eclipse (Preferences -> Google -> Web Toolkit -> Add...)
57
+ * Install Eclipse debugger for GWT SuperDevMode
54 58
* Install Eclipse eGit (optional)
55 59
* Check that JDK 1.8 is available and has been set for compilation in Eclipse
56 60
* Check that the both JDKs are available (Windows->Preferences->Java->Installed JREs)
wiki/super-dev-mode.md
... ...
@@ -0,0 +1,59 @@
1
+# Super Dev Mode
2
+
3
+## What is Super Dev Mode?
4
+
5
+Modern browsers (Current versions of Chrome/FireFox and IE11+) support so called source maps.
6
+Source maps are used to map generated JavaScript code back to it's original source.
7
+For GWT this means, the JavaScript output of the GWT compiler is mapped back to the original Java Source code.
8
+This enables the browser to run JavaSript while showing Java code in the developer tools/debugger.
9
+This is implemented by GWT as Super Dev Mode (SDM).
10
+
11
+## How to use Super Dev Mode?
12
+
13
+Super Dev Mode is the default when using GWT 2.7. The project has a committed launch configuration "SailingGWT sdm.launch" that starts Super Dev Mode instead of Dev Mode (launch configuration "SailingGWT.launch").
14
+When starting this configuration it will take much more time that the startup of classic Dev Mode but it will have much better performance later.
15
+When opening an entry point page you will see a popup while the Java code is compiled to JavaScript on the fly. This will also take some time.
16
+When changing some frontend code the compile will be much faster on refresh, as Super Dev Mode incrementally compiles only what changed.
17
+
18
+You can add "GWT.debugger();" statements to your Java code.
19
+his will force the JavaScript debugger to stop at this statement.
20
+So you don't have to manually open the file in the dev tools and set a break point.
21
+
22
+## Using Eclipse debugger for GWT SuperDevMode
23
+
24
+Debugging Java Code in the browser is very inconvenient (e.g. you have to manually open the files you already opened in Eclipse).
25
+Using Using Eclipse debugger for GWT SuperDevMode [[SDBG|http://sdbg.github.io/]] you can use Eclipse to debug SDM code running in Chrome.
26
+
27
+### Starting a SDM debug session in Eclipse
28
+
29
+To start SDM debugging in Eclipse, do the following:
30
+
31
+* Start the backend as you would always do.
32
+* Start GWT Super Dev Mode by launching "SailingGWT sdm.launch".
33
+* Do not Click on the URLs provided in "Development view"!
34
+* Copy one of the URLs instead
35
+* Go to Run -> Run Configurations ...
36
+* Create a new configuration of type "Launch Chrome"
37
+* Paste the URL and select the UI project you launched SDM for
38
+* Save and run => A new instance of Chrome is started and you will see a debug session running in Eclipse
39
+* Your Eclipse break points will now work in the running debug session.
40
+
41
+The created and save run configuration can be used for subsequent launches.
42
+
43
+### Noteworthy information & Troubleshooting
44
+
45
+If you are faced with an error stating that your Chrome installation isn't found, do the following:
46
+
47
+* Edit your "eclipse.ini" file
48
+* Add a new line: -Dchrome.location=<PATH/TO/CHROME/BINARY>
49
+ * This line must be added after "-vmargs"
50
+ * There must not be any quotation marks around the path (even if there are whitespaces in the path)
51
+* Save the file and restart Eclipse
52
+
53
+Be aware that some of the Eclipse debugger features do NOT work with this kind of debug session or work differently:
54
+
55
+* Logical views of certain data structures (e.g. Collections) aren't supported
56
+* Exception break points do not work (use a break point in the specific Exception constructor instead)
57
+* Variable naming is not 1:1 what you expect in the Java world
58
+* Stacks look different but clicking on Stack elements should
59
+* [[Stack Traces logged in Chrome do not use source maps|https://code.google.com/p/chromium/issues/detail?id=357958]], so you see the JavaScript Stack Trace instead.