Professional Documents
Culture Documents
Set Up Eclipse 3
Set Up Eclipse 3
Set Up Eclipse 3
c. After completing the update restart your eclipse, in order to enable the newly installed plugins.
2. Offline zipped file: In some cases Eclipse cannot access the update site, due to some corporate restriction or firewalls, Google allows us to download the plug-ins manually and install them to Eclipse, This step requires from you to download both the plug-in and its compatible GWT distribution from Google web site a. Download eclipse plug-in here b. The compressed file contains two directories, features and plugins, copy each of them to the corresponding folder name under the Eclipse installation directory c. It is time to download GWT SDK distribution Here. d. Un-zip GWT SDK to any directory of your choice.
At this level we have a GWT Enabled version of eclipse, if you use the offline version of installation then we have a single step left, which is setting the path to the downloaded GWT SDK, this can be done by going to, Windowpreferences, then expand Google from the tree nodes, and select Web Toolkit, here we can add the SDK by clicking add button and browsing to the directory we have extract the GWT SDK to.
1. Select a. filenew Web Application project or b. you can also create a GWT application by clicking the icon in Eclipse as follows
2. New web application wizard open, fill in the required field and un-check the (use Google App Engine), see below figure
3. Click finish, a new project gets created into your workspace with the specified name (not another one), see below the package hierarchy.
4. Inside the new created application we have an XML file located on the root of the packages, with the name of the project, it defines any dependency to other modules, and also it may contain application entry point. 5. The project gets created with a greeting sample, so you can run it and preview result. 6. The package consists of the following a. Client: all the code that will be translated into JS code, a list of java permitted classes is listed here. in order to call another class from another client module we have to import it on the module XML files b. Server: anything you want to write is permitted here, and you can use objects from client. c. Shared: classes that can be used in both packages 7. The above packages are required in order for the compiler to resolve dependencies and linking produced files.
1. Extract the Ext-GWT 2. Create a new GWT project into eclipse (gxt-app). 3. Copy the gxt.jar library into gxt-app\war\WEB-INF\ and add it to class path 4. Open sample folder and copy source code from the following folders into your gxt-app source code (examples, explorer, mail, resources, webdesktop). 5. Extract the examples.war file and copy these file (code, data, gxt, pages, samples, shared) into gxt-app\war\ folder, also copy the html files (host files) inside the war. 6. Finally copy the web.xml inside the WEB-INF to your gxt-app\war\WEBINF\ 7. You will notice that this servlet (feedservice) does not have a code into your workspace. 8. Your work space will look like the following figure
9. In order to launch the sample application select Run configuration in order to create new run configuration for our application
10.In the wizard right click on Web application, and select New
12.Notice that we use the (com.google.gwt.dev.DevMode) package as the main class, this class is used only when we are on the development mode to facilitate debugging of the source. 13.Notice that GWT plugins install an embedded web server (jetty ) in order to run gxt application, you can see server configuration beside the Main tab. 14.The arguments tab also is important to pass parameters to the server, we will return again to talk about some needed configuration. 15.After creating a run configuration select Run and from it select your created configuration (gxtConf ), a list of available module is listed in a development mode tab, you can then select any module to run.
16.To select desktop sample module right click the record and select copy to copy the URl, and use it into your preferred browser to open it.
17.The first time you run the application in development mode the browser will ask you to download a plug-in, you have to download this plug-in in order to view the application, note that this plug-in is not needed in the deployment mode, and see below the desktop sample page.
Attachments