Victor has posted 2 posts at DZone. View Full User Profile

GWT Development With IntelliJ IDEA Community Edition

01.21.2010
| 29030 views |
  • submit to reddit

As you know recently JetBrains released open source version of IntelliJ IDEA. If you look at comparison matrix it is shipped with a small number of core plugins such as Ant/Maven integration, supports several CVSs such as Subversion, Git and CVS. But event with such limited functionality it can be competitive with other open source IDEs such as Eclipse or NetBeans, because, it is my opinion, IntelliJ IDEA is the best Java IDE that I have ever used. I am using it last four or five years, several times I tried to use Eclipse or NetBeans, but finally I always came back to IntelliJ IDEA. I will use

  • IntelliJ IDEA Community Edition
  • GWT 2.0

First what I need is a new project with single Java module


Then I create a new GWT project. For this purpose I will use webAppCreator.cmd and create new IntelliJ IDEA External Tool (File -> Settings -> External Tools)


The most important thing in that dialog is parameters for webAppCreator.cmd

  • $ModuleFileDir$ is the directory of the module file. Since webAppCreator uses src folder for source files you have to use the folder same name in IntelliJ IDEA module
  • $Prompt$ displays an input dialog where you can define module name for webAppCreator.cmd

Now I am ready to create new GWT project. External too that was created on previous step is available in Tools -> GWT -> Create Project. In prompt dialog I am typing GWT module name, e.g. “gwt.GwtTest”. New GWT module is created, let’s try to compile it and launch. I have to append additional libraries from GWT and several project folders into classpath. Select tab “Dependencies” for your java module (File -> Project Structure) and append

  • gwt-user.jar
  • gwt-dev.jar
  • PROJECT_FOLDER/src folder
  • PROJECT_FOLDER/war/WEB-INF/classes folder. It is not create by webAppCreator.cmd so you have to create it manually.

Now I am ready to compile and launch application. Select “Edit Configuration” from Run menu and create new configuration


We are ready to launch application. To run or debug application, select corresponding mode from Run menu. When you look at Jetty logs you can see a warning about missed gwt.server.GreetingServiceImpl, it happened because we did not set up compiler output properly. Open tab “Paths” in Project Structure dialog and change Output path to PROJECT_FOLDER/war/WEB-INF/classes


Voilà, several simple steps and IntelliJ IDEA Community Edition is ready for enterprise development.

AttachmentSize
pic2.png15.22 KB
pic3.png30.43 KB
pic4.png12.23 KB
pic1.png10.99 KB
5
Your rating: None Average: 5 (1 vote)
Published at DZone with permission of its author, Victor Tsoukanov.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)

Comments

Wal Rus replied on Thu, 2010/01/21 - 2:06pm

Yeay! Cool post. Thanks for getting this out, Victor!

Eddy White replied on Sun, 2010/08/01 - 6:18pm

Cool thanks for getting this one out victor

 

Cheat Codes

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.