To upgrade the Eclipse Plugin to GWT 2, is an easy process. Unfortunately GWT is installed with the default name,
GWT (2) and so on, for any different release. Ideally, the name used is a meaning full one, such as
GWT 1.7.1 and
In this short article we discuss who to rename an existing GWT Eclipse Plugin and install GWT 2
Rename the existing GWT Eclipse Plugin
This step is optional.
By default, the GWT Eclipse plugin is installed with the name
GWT as shown in the following figure. This can be misleading especially if you have multiple versions installed. Unfortunately, the name cannot be changed once installed. The only way to rename it is to remove it and then add it again with the proper name.
To rename the GWT Eclipse Plugin, please follow the steps below:
- From the menu, open Window > Preferences
- Expand the Google node and select the Web Toolkit
- Select it and click the Remove button
- Once removed, click the Add button
- A dialog will open. Click the Browse button to locate the current GWT Eclipse plugin
- Browse to the GWT Eclipse plugin folder. This is usually found at:
Note that the version numbers may be different depending on the version you have installed.
- Set the display name to correspond to the version,
GWT X.X.X, and press OK
- Press OK to complete the process
This complete the renaming process.
Install the GWT 2 Eclipse plugin
This is installed as any other new Eclipse plugin.
- From the menu, open Help > Install New Software.... Make sure to select the Install New Software... and NOT Check for Updates
- Select the Google Eclipse URL:
http://dl.google.com/eclipse/plugin/3.5(for Eclipse 3.5), check both the Plugin and SDK options and press Next as shown in the image below.
- Next, Next, ..., Next through the installation. Once ready, restart Eclipse.
The GWT 2 Eclipse plugin is installed, with the name GWT. It is recommended to rename it to GWT 2.0.0 following the steps above discussed.
One of the new features available in GWT2 is the draft compile, which is ideal for development as it skips the optimisation processes carried out by the compiler reducing the compile time. This is a great feature for development, but the production code SHOULD NOT be compiled in this mode.
To make use of this feature, simple add the
-draftCompile to the advance compiler options as illustrated below.