Dashboard > IntelliJ IDEA > Home > GWT Studio plugin
IntelliJ IDEA Log In | Sign Up   View a printable version of the current page.
GWT Studio plugin
Added by Alex Tkachman, last edited by Nikolay Chashnikov on Oct 26, 2006  (view change)
Labels: 
(None)

GWT Studio plugin for IntelliJ IDEA

WATCH DEMO

What is GWT Studio?

GWT Studio plugin for IntelliJ IDEA simplifies development of Web applications using Google Web Toolkit.

GWT Studio provides the following features:

  • actions to create different elements of GWT application
  • GWT specific inspections and quick fixes
  • integration with GWT compiler
  • specific run configuration for starting and debugging GWT applications from IntelliJ IDEA
  • basic refactorings
  • "Go To Declaration" action and completion for references from Java code to html and CSS and for references to inherited modules from GWT module file
  • GWT native methods support: advanced coding assistance including syntax highlighting, code completion, etc. for editing JavaScript embedded into native GWT methods (see description of IntelliJ IDEA JavaScript editor)
  • new: integration with GWT internationalization (i18n) support (will be available in IDEA 6.0.2)

Current version of GWT Studio is 1.0. It is bundled with IntelliJ IDEA 6.0 (Demetra).

Actions

Actions are used to generate GWT elements such as entry points, remote services, etc. Each action suggests to configure GWT support if necessary and adds GWT libraries into module classpath.

New GWT Module

Creates GWT application template inluding:

  • directories
    • client
    • server
    • public
  • .gwt.xml module file
  • EntryPoint class
  • .html page
  • .css file

New GWT Entry Point

Creates GWT entry point template and performs the following operations:

  • generates a class derived from EntryPoint
  • adds a necessary <entry-point> element to the .gwt.xml module file

New GWT RemoteService

Creates GWT remote service template and performs the following operations:

  • generates an interface derived from RemoteService
  • creates an async version of  the interface
  • creates RemoteServiceServlet implementing the interface
  • adds necessary <servlet> element to the .gwt.xml module file

New GWT Serializable Class

Creates new class derived from IsSerializable with no-argument constructor

New GWT Sample Application

Creates sample application which send a text message to the server and display the responce. It can be used as simple starting point.

References

"Go to declaration", "Find Usages", "Rename" actions, completion and highlighting works for references from java-code to CSS (for parameter of methods UIObject.setStyleName, addStyleName, removeStyleName) and for references from java-code to html tags (for parameter of method RootPanel.get).

Inspections with quick-fixes

  • RemoteService-derived interface is not synchronized with its async version
  • Async version of RemoteService-derived interface is not synchronized with original interface
  • Parameter or return type of method in RemoteService-derived interface is not IsSerializable
  • Style name used as parameter of .addStyleName or .setStyleName is not presented in CSS file
  • Classes not from JRE emulation library (and not from client code of inherited modules) is used in client code
  • GWT Remote service is not registered as a servlet in web.xml

Integration with I18n support

This feature is available in Demetra EAP build 6068 .
It includes:

  • navigation from method of interface to corresponding property (using icon on an editor gutter or "Go to implementation" action)
  • inspection to report about inconsistency between interface and property files (with quickfixes to create missing property or method)
  • "Rename" refactoring for properties, methods and interfaces renames corresponding methods, properties and properties-files.

See also http://blogs.jetbrains.com/idea/2006/10/internationalizing-gwt-applications-at-ease/.

Run/Debug

Run/Debug GWT application in hosted mode

Use "GWT configuration" to run/debug GWT application in hosted mode

Run GWT application in Web mode

If GWT application is placed in a Web module IDEA will invoke GWT compiler and package a generated files to war/exploded directory on make. 

More information

GWT Studio comes bundled with IntelliJ IDEA starting from EAP build #5350.

To obtain EAP builds of  IntelliJ IDEA 6.0 (Demetra), visit IntelliJ IDEA 6.0.2 EAP

To report bug or request feature, visit http://www.jetbrains.net/jira/browse/IDEA

You can download the source files of the application created in the demo. In this case, configure GWT Studio as shown in the demo, create a new project, and then replace its source files with the files extracted from the downloaded archive using any file explorer.

Hi,

Thanks for this very useful plugin, at first.

When the next version of the plugin is relased? or is this final version?

thanks.....     

muzaffercoruh@hotmail.com 

Posted by Anonymous at Aug 31, 2006 16:56 | Permalink | Reply To This

Hi JetBrain Team....

  This very nice and usefull documents... for GWT developers..

When will release the Update version or final version? 

Thanks for your time..

arjunmkuc@gmail.com 

Posted by Anonymous at Sep 06, 2006 11:28 | Permalink | Reply To This

With IntelliJ IDEA 6.0 in October. Or in our EAP

Posted by Alex Tkachman at Sep 14, 2006 20:27 | Permalink | Reply To This

Hello, Alex.

Thanks for useful plugin. I hope new version will correctly support JSNI(accessing java fields from JavaScript, etc).

Posted by Anonymous at Nov 08, 2006 01:39 | Permalink | Reply To This

Google has recently published a mac os x version of GWT but it is not working with this plugin. Please add os x support ASAP

Cheers

Behrang Javaherian

http://www.behrang.info

Posted by Anonymous at Nov 08, 2006 01:48 | Permalink | Reply To This

Support for GWT on Mac will be included in IDEA 6.0.2.

Posted by Nikolay Chashnikov at Nov 08, 2006 10:45 | Permalink | Reply To This

I'm using 6.0.2 on Mac OSX with GWT 1.3.1 and am having issues building a WAR / exploded directory. Specifically, including the HTML files etc from the www directory. Running in hosted mode works fine.

Posted by Anonymous at Jan 04, 2007 07:20 | Permalink | Reply To This

I am completely frustrated by this plug-in.

i get "Error: unable to find 'myclass.gwt.xml' in your classpath..."

i have no idea what is producing this error, as there is now way to turn on verbose output

the file is indeed in my class path

Posted by Anonymous at Nov 11, 2006 19:41 | Permalink | Reply To This

Please try IDEA 6.0.5. The problem should be fixed in it.

Posted by Nikolay Chashnikov at Apr 18, 2007 10:14 | Permalink | Reply To This

What is happening with the development of this plug-in.  It has been months since it's release, and there have been no updates.  GWT is a great framework and this is a good tool to allow GWT to work with Intellij, but there are lots of bugs and it could use improvement.

 Is this going to become open source?  I would really like access to fix some bugs.

Posted by Anonymous at Dec 20, 2006 21:48 | Permalink | Reply To This

AFAIK the source of GWT is included in the Plug-in Development Kit Package.

Posted by Anonymous at Dec 20, 2006 22:02 | Permalink | Reply To This

GWT plugin comes bundled with IntelliJ IDEA starting from version 6.0. So its last version (with several new features and fixed bugs) is included in IDEA 6.0.2 which have been released last month and the next version will come with IDEA 6.0.3.

Posted by Nikolay Chashnikov at Dec 21, 2006 08:48 | Permalink | Reply To This

I too am still getting "Error: unable to find 'myclass.gwt.xml' in your classpath..." for every module I create. It might be working noting that I started with creating the GWT "sample app" from the menu, and then altered it. Perhaps I need to start from scratch? I have one high-level module directory, which contains other sibling modules (xml files and java source). Could this be an issue for the plug-in?

The plug-in also reports errors regarding the assignment of style classes to widgets. I know that the style definition is in the correct CSS file. As proof, when I deploy the application to Tomcat, I see the generated widgets styled correctly. However in the IDE, it's reported as an unknown CSS style.

Thanks for the plug-in. Once some of these bugs are worked out, I see it being a great time-saver for me!

Brian

Posted by Anonymous at Jan 05, 2007 21:55 | Permalink | Reply To This

I should note that I'm using IntelliJ v6.02 on Mac OS X.
Brian

Posted by Anonymous at Jan 05, 2007 21:56 | Permalink | Reply To This

These problems should be fixed in IDEA 6.0.5.

Posted by Nikolay Chashnikov at Apr 18, 2007 10:12 | Permalink | Reply To This

How could I submit patch? Compiled GWT files must be copied into <gwt.module.Name> subdir of webapp exploded dir:

--- GwtWebBuildParticipant.java
+++ GwtWebBuildParticipant.java.patched
@@ -42,11 +42,8 @@

   public void registerBuildInstructions(BuildRecipe buildRecipe, CompileContext context) {
     if (GwtConfiguration.getInstance().isValidConfiguration()) {
-      final GwtModule[] modules = GwtModulesManager.getInstance(myModule.getProject()).getGwtModules(myModule);
-      for (GwtModule module : modules) {
-        final File output = new File(GwtCompilerPaths.getOutputDirectory(myModule), module.getQualifiedName());
+        final File output = GwtCompilerPaths.getOutputDirectory(myModule);
         buildRecipe.addFileCopyInstruction(output, true, myModule, "/", null);
-      }
     }
   }

Andriy.

Posted by Anonymous at Jan 10, 2007 23:51 | Permalink | Reply To This

For whom it may concern, I copied GWTStudio to Google code and submitted my patch there, see http://exogwt.googlecode.com/svn/xtras/.

Note, I've added support for 'noserver' GWTShell option, also.

Andriy. 

Posted by Anonymous at Jan 19, 2007 02:47 | Permalink | Reply To This

Would it be difficult to fix the following issues :

1) Modules are always compiled, regardless whether the source was modified;
2) Editor displays errors about classes not being available in JRE emulation, however the source is present, it just lives in another module; (The GWT compiler does not complain);
3) On make, the GWT modules are always compiled; (the plugin setting 'do not compile on Make' does not work);

 Kind regards, Barry Lagerweij

Posted by Anonymous at Feb 05, 2007 17:24 | Permalink | Reply To This

When I click the "+" button in Run...Edit Configurations, nothing happens.

I decided to uninstall and reinstall the GWT Studio plugin. I was able to uninstall it, but there doesn't seem to be an option to reinstall it. I'm running IDEA 6.04 on a Mac. How can I reinstall it?

Posted by Mark Volkmann at Mar 23, 2007 00:52 | Permalink | Reply To This

GWT Studio plugin is bundled with IDEA. So in order to reinstall it you should reinstall IDEA itself. Please make sure that you had removed old version of GWT plugin from <idea.config.dir>/plugins.

Posted by Nikolay Chashnikov at Apr 18, 2007 10:08 | Permalink | Reply To This

It is impossinble to use -noserver option in Run/Debug configurations.

Posted by Anonymous at Mar 26, 2007 16:37 | Permalink | Reply To This

This feature is planned for next IDEA version (see http://www.jetbrains.net/jira/browse/IDEADEV-11276).

Posted by Nikolay Chashnikov at Apr 18, 2007 10:04 | Permalink | Reply To This

Any idea if a GUI builder for GWT is coming anytime soon?

Posted by Anonymous at May 11, 2007 12:59 | Permalink | Reply To This

GUI builder for GWT isn't planned for IDEA 7.

Posted by Nikolay Chashnikov at May 11, 2007 13:33 | Permalink | Reply To This

It would be nice to extend the demo to show

- How to debug the application

- how to write the junit test on this application.

 Regards,

Raja Nagendra Kumar,

www.tejasoft.com

Posted by Anonymous at Jun 11, 2007 18:30 | Permalink | Reply To This

Any plans to update this to work with GWT 1.4?

Posted by Travis R at Jul 16, 2007 21:59 | Permalink | Reply To This

http://www.jetbrains.net/jira/browse/IDEADEV-17576 will be fixed soon. Do you have any issues besides the mentioned in IDEADEV-17576?

Posted by Nikolay Chashnikov at Jul 17, 2007 11:22 | Permalink | Reply To This

A couple things:

1. When compiling GWT through Idea's Make, it always gives an OutOfMemory error and says to increase it. So have to do it through ant instead.

2. Red underlines almost all GWT components saying something along the lines of:

"... AsyncCallback is defined in module 'com.google.gwt....ClippedImage' which is not inherited in module 'xxx'

Posted by Travis R at Jul 21, 2007 02:28 | Permalink | Reply To This

1. Starting from Selena EAP build 7065 maximum heap size for GWT compiler may be increased in GWT facet settings (http://www.jetbrains.net/jira/browse/IDEADEV-9296).

2. Looks like you have several gwt-user.jar libraries in dependencies of your module.

Posted by Nikolay Chashnikov at Jul 23, 2007 08:46 | Permalink | Reply To This
View the rest of this thread. Most recent comment: Sep 09, 2007
3 more comments by: Anonymous, Dmitry Jemerov

It would seem that in 7.0 M2 the plugin doesn't merge the web.xml with stuff from the .gwt.xml. The servlets has to be moved manually. The maven plugin can do this, however.

Posted by Anonymous at Sep 26, 2007 14:26 | Permalink | Reply To This

Are you sure that Web facet in specified in GWT facet settings?

Posted by Nikolay Chashnikov at Sep 26, 2007 14:31 | Permalink | Reply To This

This doesn't work with Intellij 7.0 RC 2 on a mac

It gives he following error:

[ERROR] Failure to load module 'com.hydrodesk.fucker.MyApplication'
java.lang.NoSuchMethodError: org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.kind()I
    at com.google.gwt.dev.jdt.TypeOracleBuilder.isInterface(TypeOracleBuilder.java:481)
    at com.google.gwt.dev.jdt.TypeOracleBuilder.processType(TypeOracleBuilder.java:531)
    at com.google.gwt.dev.jdt.TypeOracleBuilder.access$000(TypeOracleBuilder.java:93)
    at com.google.gwt.dev.jdt.TypeOracleBuilder$2.visit(TypeOracleBuilder.java:410)
    at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.traverse(TypeDeclaration.java:1156)
    at org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.traverse(CompilationUnitDeclaration.java:481)
    at com.google.gwt.dev.jdt.TypeOracleBuilder.build(TypeOracleBuilder.java:395)
    at com.google.gwt.dev.cfg.ModuleDef.getTypeOracle(ModuleDef.java:294)
    at com.google.gwt.dev.cfg.ModuleDef.refresh(ModuleDef.java:359)
    at com.google.gwt.dev.cfg.ModuleDefLoader.loadFromClassPath(ModuleDefLoader.java:86)

Posted by Anonymous at Oct 10, 2007 17:10 | Permalink | Reply To This

Fixed in IDEA 7.0 RC3.

Posted by Nikolay Chashnikov at Oct 10, 2007 17:18 | Permalink | Reply To This

The plugin is great. I have some suggestions, though:

  • support for -noserver and other GWT shell command-line options would be more than useful
  • most of the time I use GWT shell to load application from server to debug JSON-RPC calls and other server-side-related stuff; so it would be very convenient to allow "Startup URL" instead of "Startup filename" (and automatically add this URL to whitelist of course)
  • JSNI constructs like @com.google.gwt.user.client.ClassName::doSomething(Ljava/lang/String(); still interpreted as errors; it doesn't affect compilation in any way, but just looks ugly
Posted by Ilya Obshadko at Oct 11, 2007 20:45 | Permalink | Reply To This

Are you using the latest of GWT Studio? First and third items are already implemented.

The latest version of GWT Studio is bundled with IDEA 7 RC (IDEA 7 EAP).

Posted by Nikolay Chashnikov at Oct 11, 2007 20:58 | Permalink | Reply To This

No, I'm still using 6.06. I'll try IDEA 7, thanks.

Posted by Ilya Obshadko at Oct 11, 2007 21:07 | Permalink | Reply To This

I'm already using v7 (build 7361) but I'm also getting inspection errors for java.lang.String and java.lang.StringBuffer. Please help!

Posted by Shing Cheung at Jan 30, 2008 04:53 | Permalink | Reply To This

The GWT Studio plugin doesn't seem to work with modules defined within test sources. It attempts to compile these modules, but then complains that they are not on the classpath. E.g., I have:

java/Foo.gwt.xml (Source: this works)
javatests/FooTest.gmt.xml (Test Source: this doesn't)

Error: Unable to find 'FooTest.gwt.xml' on your classpath; could be a typo or perhaps you forgot to include a classpath entry for source?

Posted by Anonymous at Jan 29, 2008 19:04 | Permalink | Reply To This

Same problem here...would be nice if JetBrains could post a flash demo on unit testing GWT project.

Posted by Shing Cheung at Jan 30, 2008 05:50 | Permalink | Reply To This

+1 flash demo on unit testing GWT projects.

Posted by Anonymous at Feb 26, 2008 02:05 | Permalink | Reply To This
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.2.6a Build:#522 Jul 12, 2006) - Bug/feature request - Contact Administrators