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. The plugin is bundled with IDEA.
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 in the hosted mode
- "Rename" refactoring is aware of GWT
- "Go To Declaration" action, "Find usage" action and completion for GWT specific references
- 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)
- integration with GWT internationalization support
- support for packaging files generated by GWT compiler into JavaEE application
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 including:
- 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 asynchronous 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 Test Case
Works under test sources roots. Creates new class derived from GWTTestCase.
New GWT UiBinder class and ui.xml file
Creates new *.ui.xml file with the corresponding Java class
References
"Go to declaration", "Find Usages", "Rename" actions, completion and highlighting works for GWT specific references in the following places:
- parameters of methods UIObject.setStyleName, addStyleName, removeStyleName
- parameter of RootPanel#get method
- @Key annotation
- <inherits> tag in .gwt.xml file
- the return statement in "getModuleName" method in classes derived from GWTTestCase
- parameter of ServiceDefTarget#setServiceEntryPoint method
- @RemoteServiceRelativePath annotation
- <meta> and <script> tags in GWT html file
- tags and attributes in ui.xml files
- @UiHandler annotation
Inspections
GWT Studio have inspections to report the following problems:
- RemoteService-derived interface is not synchronized with its asyncronous version
- Asynchronous version of RemoteService-derived interface is not synchronized with the original interface
- Type of parameter or return type of method in RemoteService-derived interface is not serializable
- GWT Remote service is not registered as a servlet in web.xml
- Classes not from JRE emulation library (and not from client code of inherited modules) are used in client code
- Class marked as serializable contains non-serializable fields
- Style name used as parameter of "addStyleName" or "setStyleName" is not presented in CSS file
- References to Java classes or methods from GWT JavaScript native methods cannot be resolved
- Localizable interface is not synchronized with the corresponding .properties file
- Interfaces derived from Constants contains methods with parameters
- Deprecated @gwt.key JavaDoc tag usages
- Deprecated @gwt.typeArgs JavaDoc tag usages
- AsyncCallback class is used without type parameters
- ServiceDefTarget.setServiceEntryPoint is used instead of @RemoteServiceRelativePath annotation
- Usages of event listeners classes deprecated in GWT 1.6
- Inconsistencies between fields with @UiField annotation and 'ui:field' attributes in ui.xml files
- Wrong signatures of @UiHandler methods
Each inspection suggest a quick-fix to resolve the corresponding problem.
Integration with I18n support
- navigation from method of interface to corresponding property (using icon on an editor gutter or "Go to implementation" action)
- inspection to report inconsistencies between interfaces 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
- "Internationalize" action in IDEA is aware of GWT and automatically creates corresponding methods in interfaces
See also http://blogs.jetbrains.com/idea/2006/10/internationalizing-gwt-applications-at-ease/.
Settings
GWT-related settings are available via GWT Facet (Project Structure | "Modules" item | A module node in the tree | "GWT" node)
Packaging into JavaEE application
An output of GWT compiler can be automatically copied to an artifact on make. Just include the GWT Compiler Output element in the artifact layout. An individual relative output path for each GWT module can be specified in GWT Facet settings as well.
Run/Debug GWT application in the hosted mode
Use "GWT configuration" to run/debug a GWT application in the hosted mode. Also "Run" action is available in the popup menu for GWT entry point classes and html files allowing to run a GWT application the hosted mode immediately. If AppEngine is used in the project GWT configuration allows to specify AppEngine Dev Server as a target server.
More information
GWT Studio comes bundled with IntelliJ IDEA starting from IDEA 6.0.
To report bug or request feature, visit http://youtrack.jetbrains.net/issues/IDEA
62 Comments
Anonymous
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
Anonymous
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
Alex Tkachman
With IntelliJ IDEA 6.0 in October. Or in our EAP
Anonymous
Hello, Alex.
Thanks for useful plugin. I hope new version will correctly support JSNI(accessing java fields from JavaScript, etc).
Anonymous
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
Nikolay Chashnikov
Support for GWT on Mac will be included in IDEA 6.0.2.
Anonymous
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.
Anonymous
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
Nikolay Chashnikov
Please try IDEA 6.0.5. The problem should be fixed in it.
Anonymous
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.
Anonymous
AFAIK the source of GWT is included in the Plug-in Development Kit Package.
Nikolay Chashnikov
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.
Anonymous
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
Anonymous
I should note that I'm using IntelliJ v6.02 on Mac OS X.
Brian
Nikolay Chashnikov
These problems should be fixed in IDEA 6.0.5.
Anonymous
How could I submit patch? Compiled GWT files must be copied into <gwt.module.Name> subdir of webapp exploded dir:
Andriy.
Anonymous
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.
Anonymous
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
Mark Volkmann
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?
Nikolay Chashnikov
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.
Anonymous
It is impossinble to use -noserver option in Run/Debug configurations.
Nikolay Chashnikov
This feature is planned for next IDEA version (see http://www.jetbrains.net/jira/browse/IDEADEV-11276).
Anonymous
Any idea if a GUI builder for GWT is coming anytime soon?
Nikolay Chashnikov
GUI builder for GWT isn't planned for IDEA 7.
Anonymous
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
Travis R
Any plans to update this to work with GWT 1.4?
Nikolay Chashnikov
http://www.jetbrains.net/jira/browse/IDEADEV-17576 will be fixed soon. Do you have any issues besides the mentioned in IDEADEV-17576?
Travis R
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'
Nikolay Chashnikov
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.
Anonymous
can we get the fix for (http://www.jetbrains.net/jira/browse/IDEADEV-9296) anywhere yet? This is killing us.
Dmitry Jemerov
http://www.jetbrains.net/confluence/display/IDEADEV/Selena+EAP
Anonymous
This one has been fixed, but there are a lot of other issues with GWT plugin that need fixing (i've posted a couple in the forum) such as underlining non GWT library things on the server side code, not including the history frame in the default generated html, underling Serializableclasses (gwt 1.4 can use Serializable), shows @gwt.typeArgs javadoc tags as invalid, etc.
Anonymous
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.
Nikolay Chashnikov
Are you sure that Web facet in specified in GWT facet settings?
Anonymous
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)
Nikolay Chashnikov
Fixed in IDEA 7.0 RC3.
Ilya Obshadko
The plugin is great. I have some suggestions, though:
Nikolay Chashnikov
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).
Ilya Obshadko
No, I'm still using 6.06. I'll try IDEA 7, thanks.
Shing Cheung
I'm already using v7 (build 7361) but I'm also getting inspection errors for java.lang.String and java.lang.StringBuffer. Please help!
Anonymous
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?
Shing Cheung
Same problem here...would be nice if JetBrains could post a flash demo on unit testing GWT project.
Anonymous
+1 flash demo on unit testing GWT projects.
Steve Appling
The plugin doesn't seem to work for me with GWT 1.5 RC1. It builds without errors, but doesn't seem to do anything. I get no GWT compiled files, only my static content. Anyone else have this working?
Corrected - it seems to be working fine now. I deleted the contents of my exploded web-app and making the project wouldn't run the GWT compile. After touching a source file under the client package, it built correctly.
Anonymous
Haven't tried RC1 yet, but I've pretty much stopped using this plugin since it makes GWT development way too slow with it recompiling the javascript every time. Instead I run the gwt shell as an Application in Intellij instead of running via the plugin.
Anonymous
about css parameters http://css-lessons.ucoz.com/css-parameters.htm
Anonymous
Does the gwt plugin work for linux and gwt 1.5? The server piece of a sample app is never deployed.
Anonymous
Excuse me in advance for my stupid question: I've downloaded idea 7 and the last preview of the version 8. I've watched the GWT demo. In both versions I've downloaded, there's no GWT Studio icon in the IDE settings window but the GWT Studio plugin is displayed in the bundled plugins list as installed plugin. (in both cases, it is a fresh install).
Did I missed something?
Anonymous
I was just wondering the same thing myself. I can create GWT projects in eclipse; the GWT utilities are symlinked into my PATH.
System specs: IntelliJ 7.0.4, IntelliJ 8.0M1, OS X 10.5.4, JavaForMac10.5Update1
Anonymous
same for me. The plugin is installed, but no GWT icon and no Google Web Toolkit item in the "New..." menu.
Anonymous
I have downloaded the 7.0.4 version (was using 7.0.3) and do not see the GWT icon on my project settings page. Is there a way to add it or turn it on?
Nikolay Chashnikov
The GWT demo is obsolete. We will update it soon.
In order to add GWT support you should add GWT facet to the module (open "Project Settings", select module node, click '+' icon and select 'GWT').
Anonymous
The GWT facet is not available in the drop down specified in your response, Nikolay. My external ant scripts are building the GWT project, but IDEA 7.0.4 doesn't seem to have a clue about GWT; no where to tell it what libs to use, etc. So for now, I've no longer got a "hosted" debug mode. My ant build scripts are getting quite a workout, however.
Jason Vincent
I'm using IntelliJ 7.0.4 and GWT 1.5.2. I need to get my JDBC DataSources registered in the JNDI context. The GWT hosted mode plugin isn't loading my context.xml definitions. Is there a way to do this within the plugin. Searches for suggestions reveal "munching" a tomcat installation, but I don't have a "tomcat" directory in my project directory. Any suggestions?
Jason
Daniel Moldovan
I'm facing the same issue as Jason. Is there a workaround for this.
Thanks,
Daniel
Nikolay Chashnikov
This feature is not implemented yet. You can watch http://jetbrains.net/jira/browse/IDEADEV-33232 for the progress.
Robert Light
What version of GWT Studio do I need to work properly with GWT1.6??
I'm using IntelliJ 7.0.5
Nikolay Chashnikov
GWT 1.6 support is included in the latest version of the plugin which is bundled with IDEA 9 "Maia" EAP build (http://www.jetbrains.net/confluence/display/IDEADEV/Maia+EAP).
Bozhidar Batsov
It would be good to see GWT 1.7 support in "Maia" since it's the current GWT version in production.
Nikolay Chashnikov
GWT 1.7 doesn't differ from GWT 1.6 from IDEA's point of view. So if you see any problems related to GWT 1.7 support in the latest Maia EAP builds feel free to create a Jira issues (http://jetbrains.net/jira/browse/IDEA).
Ian Atha
Are there plans to upgrade this plug-in to support the new UiBinder interface (available since GWT 2.0) similar to Google's Eclipse plugin?
Alternatively, are there plans to open-source this plug-in so the community can build on top of it?
Nikolay Chashnikov
Support for UiBinder is planned for one of minor updates of IDEA 9. You can watch http://youtrack.jetbrains.net/issue/IDEADEV-42022 to be notified about progress of this feature.
We don't have plans to open-source GWT plugin.