1.2. Starting with GWT

1.2.1. Creating an Eclipse Project

GWT comes with an eclipse project creator tool. The project will have the name Sudoku and will be created in the $HOME/workspace directory.

$ cd gwt-linux-1.0.21
$ ./projectCreator -eclipse Sudoku -out $HOME/workspace/sudoku
Created directory $HOME/workspace/sudoku/src
Created file $HOME/workspace/sudoku/.project
Created file $HOME/workspace/sudoku/.classpath

1.2.2. Adding a GWT Application to the Eclipse project

A GWT application needs to be added to the eclipse project. The name of the class to generate is given to the application creator tool.

Some files will be generated :

  • The Sudoku.gwt.xml file which describes the module with entry point. This file will be also used to add the mapping for the remote service using EasyBeans.

  • The Sudoku.html file which is a skeleton page which call the widget's examples.

  • The Sudoku.java file which is the class responsible to load widgets (which implements the EntryPoint interface).

  • Then, there are 3 scripts that allow to launch or compile files. Note that compile script will be replaced by an ant task in this HowTo.

$ ./applicationCreator -out $HOME/workspace/sudoku -eclipse -out org.objectweb.easybeans.demo.sudoku.web.client.Sudoku
Created directory $HOME/workspace/sudoku/src/org/objectweb/easybeans/demo/sudoku/web
Created directory $HOME/workspace/sudoku/src/org/objectweb/easybeans/demo/sudoku/web/client
Created directory $HOME/workspace/sudoku/src/org/objectweb/easybeans/demo/sudoku/web/public
Created file $HOME/workspace/sudoku/src/org/objectweb/easybeans/demo/sudoku/web/Sudoku.gwt.xml
Created file $HOME//workspace/sudoku/src/org/objectweb/easybeans/demo/sudoku/web/public/Sudoku.html
Created file $HOME//workspace/sudoku/src/org/objectweb/easybeans/demo/sudoku/web/client/Sudoku.java
Created file $HOME/workspace/sudoku/Sudoku.launch
Created file $HOME/workspace/sudoku/Sudoku-shell
Created file $HOME/workspace/sudoku/Sudoku-compile