Welcome to NavWin!
  

Introduction

Suppose you have built your client environment and now you want to start to protect your work using SVN. In the discussion below, we assuming you are using Google Web Toolkit version 1.6 and you are using Tortoise SVN 1.6. We also assume that your ‘war’ folder is configured as both an input and an output (i..e the default configuration).

It seems that Google Web Toolkits is rather SVN unfriendly and you need to work out carefully what must be stored in SVN and what can be rebuilt automatically using Eclipse.

Before describing what you need to store, the steps below describe what you should do, should the worst happen and you find you need to restore the entire project

Restoring From SVN

Install Eclipse and Google Web Toolkit Add-Ons

Re-install your programming environment (assuming this was lost). This means install Eclipse and then install Google web Toolkit components (as described on the website http://code.google.com/webtoolkit/download.html). At a minimum you should install the Plugin & SDK that is delivered using a single button. After you have done all this you will end up with a folder called .metadata folder in your chosen working folder.

Get the Source Code

Now, using Windows explorer, navigate to your Eclipse working directory and create your project folder (as it was originally called). Then do an SVN checkout. My project was called NavWinClient. You might have more than one project.

 

Using Eclipse ‘Refresh’

Start Eclipse. The first thing you will need to do, once the workspace has loaded, is ‘refresh’ the project. Highlight the project (as in the screenshot’) and press F5.

Using Eclipse ‘Clean’

Now, before the project will run again you need to rebuild the Google ‘hosted’ components. You do this using the ‘Clean’ option.

Selection the option below and let it finish

 

 

Google Web Toolkit in Eclipse

The following is a breakdown of the directories

Folder

Add To SVN

Description

.metadata

No

This will be recreated if you reinstall Eclipse and run the Google installation. If you start one level above then you can add this to svn:ignore instead.

MyProjectFolder

Yes, top level project

Each project has its own project folder, add each individually to an SVN repository

MyProjectFolder\war\MyProjectFolder

 

Add to ignore list

This folder is recreated on each full build e.g.

NavWinClient\war\navwinclient

MyProjectFolder\war\WEB-INF\

Com\YourWebRootName\MyProjectFolder\

Client

 

Add to ignore list

This folder is regenerated automatically

 

An example of the final state

Add JAR library to GWT

At one point I wanted to add a JAV file to support the Charts. You do this as follows. Copy the JAR file somewhere underneath your main project e.g. in a folder called lib or ‘Charts’ in this case. Right click on the JAR file you want and select

Build Path à Add To Build Path

 

Upgrading a project (e.g. from GWT 2.2 to GWT2.4)

I do not have previous information about this currently.

When I did this I also completely upgraded by Eclipse system.

So I started with a new version of Eclipse (3.6 upgrade to 3.7) and a new version of GWT (2.2 upgraded to 2.4)).

I then used SVN to get a local copy of my project. I then imported the project (Project è Import).

Then I went through the SVN refresh and clean-up process mentioned above. I had to fix the JAR library reference to Google Charts manually.