⬆️ ⬇️

Customize Eclipse to work with Ext - GWT

Google Web Toolkit (GWT) is a set of AJAX components for developing user interfaces for web 2.0 applications. This library should be familiar to us from GMail, Google Reader and many other projects. A distinctive feature of this framework is that programs can be written in Java. Ext-GWT (or GXT) is an extension of GWT using the popular ExtJS web UI library.



Attention

GXT beta 2 requires GWT 1.5 milestone 2, which supports J2SE 6.0. Download links in the Resources section.



Setting the variable GWT_HOME



It is done for each of the developers once:

')

1. In the Eclipse main menu, we find the management of the Classpath Variables. To do this, go to: Menu - Window - Preferences - Java - Build Path - Classpath Variables;

2. Create a variable GWT_HOME. New button:

* specify the name. Name: GWT_HOME;

* Specify your path to the GWT root folder, for example “D: \ Projects \ gwt-windows-1.4.62 \” like mine.



Creating a new project on GWT



1. We use standard utilities to create a project:

* projectCreator -eclipse NewApplication -out d: \ Projects \ NewApp

* applicationCreator -eclipse NewApplication-out d: \ Projects \ NewApp com.brainitup.client.NewApplication

2. Import the created project in Eclipse. To do this, go to Menu - File - Import - Existing Projects into Workspace. Specify where the project is, for example “d: \ Projects \ NewApp”

3. Configure the gwt-user library via GWT_HOME:

* right click on project root - Properties - Java Build Path - Libraries

* delete gwt-user.jar

* Add Variable - GWT_HOME - Extend - gwt_user.jar - Ok

4. Configure the gwt-dev-windows.jar library via GWT_HOME:

* Run - Java Application - NewApplication (your name) - Classpath

* gwt-dev-windows.jar - Remove

* Advanced - Add Classpath Variables - GWT_HOME - Extend - gwt-dev-windows.jar - Ok



Cyrillic characters support



1. Project Properties -> Resources -> Text File encoding install UTF-8

2. In the Package Explorer, we find the file NewApplication-> src-> com.brainitup-> public-> NewApp.html and we prescribe the tag meta tag

/>



Add Ext - GWT



1. Set up the GXT_HOME variable in the same way as with GWT_HOME

2. Set up the gxt library through the GXT_HOME variable (similar to the one described above) and also do not forget to add it as a library for launching (similar to section 4 of the section “Creating a project on GWT”)

3. Add the following line to the project xml module

/>



4. Add a style file to your host page.

/>



Resources



1. Eclipse SDK

2. Google Web Toolkit

3. GXT Library

4. Team Development on GWT in Eclipse

5. Download GWT 1.5 milestone 2



Crosspost in my blog

Source: https://habr.com/ru/post/25262/



All Articles