aboutsummaryrefslogtreecommitdiff
path: root/website/templates/setup/gwt.html
blob: ac6659a5e87998c748d8d3f03d586a3373eba585 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<#import "_setup.html" as s>

<@s.scaffold title="GWT">
	<@s.introduction>
		<p>
			<a href="http://www.gwtproject.org/">GWT (Google Web Toolkit)</a> is compatible with lombok.
		</p><p>
			Edit your <code>proj-debug</code> and <code>proj-compile</code> batch scripts to add the following VM arguments:
<pre>
java <strong>-javaagent:lombok.jar=ECJ</strong> <em>(rest of arguments)</em>
</pre>
		</p><p>
			Thanks to Stephen Haberman for figuring this out.
		</p>
	</@s.introduction>
	
	<@s.section title="GWT plugin in Eclipse">
		<p>
			To use the GWT plugin in eclipse together with Lombok:<br />
			Install lombok into eclipse as normal (start <code>lombok.jar</code> as an application).<br />
			Download the JDT variant that GWT uses. This is the most recent org.eclipse.jdt.core_VERSION-CUSTOM-GWT jar found on the <a href="https://github.com/gwtproject/tools/tree/master/lib/eclipse">lib/eclipse section GWT's github page</a>. As of October 2018, that would be <a href="https://github.com/gwtproject/tools/raw/master/lib/eclipse/org.eclipse.jdt.core_3.13.50-CUSTOM-GWT-20171215.jar">org.eclipse.jdt.core_3.13.50-CUSTOM-GWT-20171215.jar</a>.<br />
			Configure the 'GWT/Compile' option in the eclipse GWT plugin; in the advanced section, add the following VM arguments:<br />
<pre>-javaagent:/path/to/lombok.jar=ECJ
-Xbootclasspath/p:/path/to/lombok.jar:/path/to/org.eclipse.jdt.core_fromPreviousStep.jar</pre>
Where the colon should be replaced with a semicolon on windows.<br />
			GWT Dev Mode needs a similar configuration: In the VM arguments section ('Arguments' tab), add:
<pre>-javaagent:/path/to/lombok.jar=ECJ</pre>
			and in the 'Classpath' tab, add both lombok.jar and the org.eclipse.jdt.core file you downloaded.
		</p>
		<p>
			The above instructions are contributed by Stas via the forum. Let us know if they work, or if you run into issues. Thanks and have fun!
		</p>
	</@s.section>
</@s.scaffold>