开发者

What benefits do GWT IDE plugins have considering that GWT is simply Java?

Seen that writing GWT code is basically writing Java code, what does a GWT for an IDE exactly do? For example there are GWT plugins for IDEA and for Eclipse (and maybe for NetBeans?) but do t开发者_JS百科hey do that I cannot do simply by using Eclipse or IDEA without the GWT plugin?


They add wizards, dialogs, editors, and other extensions to the IDE that help specifically with GWT tasks. For example, rather then creating a new GWT project from scratch using the command line, or creating an eclipse java project and then creating all the necessary files yourself, the plug-in adds a wizard that lets you type in the name of the project, and it creates all the necessary files for you.

Other additions can be large stuff like a local server, or minimal like a source code formatter. The sky is the limit with plug-ins.

I know the GWT adds a GUI editor to eclipse so you can drag and drop controls rather then manually entering them all.


I've only used the IDEA plugin myself. I definitely would not want to give it up. As others have said, you can create a GWT project and debug in hosted mode as easily as you would run any other application, but that's only the beginning.

IDEA also has several GWT-specific class creation options. You can create a new UiBinder file, which will generate both the .ui.xml file and the Java file, and will already have the plumbing in place for creating the UiBinder object. You can create a new GWT Remote Service, which will create the service interface, async interface, and implementation class for you.

The GWT plugin will also warn you about tons of probable errors right in the editor. It will warn you if your service interface doesn't have proper matching methods in the async interface, and has an intention for fixing the problem. It will warn if your service implementation class does not have an entry defined in the web.xml file (yep, with an intention available to automatically register it). It will warn you if you have fields in your UiBinder class that aren't defined in the .ui.xml file, again with an intention to help resolve the issue with just a couple keystrokes.

On top of that, the code completion is excellent for everything including CSS attributes, Javascript, HTML, and the various XML files.


Yes, you can, however using a plugin for a given IDE, helps you by not needing to swap from the IDE to another tool ( for testing for instance )

Here's the demo of IDEA

http://www.jetbrains.com/idea/training/demos/GWT.html

The same way you can also compile from the command line ( I do it sometimes ) or let the IDE help you by pressing a single button.


Doesn't the GWT Eclipse plugin provide the debugging capabilities? GWT debugging in eclipse is the most useful tool ever.


There also is a plug-in for MyEclipse that gives you a Matisse-like drag and drop Toolbox for GWT. For Netbeans we have the GWT4NB plug-in, which offers among other things good debugging and code completion which works also for .ui.xml files.


OK ...

  1. GWT RPC - With Google plugin, it does reduce the tedium verifying the interface RPC interface-async pair declaration.

  2. UiBinder. Each uibinder set is a pair of files: The ui template and the template bean. The plugin helps me verify the correspondence of uifields in the template and the template bean. Then there are @uifactory, @uifield(provided=true).

  3. You can declare another an "external" bean (a java code other than its template bean) using ui:with in the ui template. With that you pull in functions from the bean to provide values for your gwt widget attributes. The plugin provides me with auto-complete/verification of functions that are visible in ui:with bean.

  4. Of course, the plugin provides the compiler too, which compiles the java code into javascript.

  5. The debugger which works with the client-side. Imagine how the plugin works when we step the debugger on the client code which is compiled to javascript.

  6. The run config, which automatically fills in the blanks, the args and params. I would hate writing a gwt launch config by myself.

Without the plugin, GWT development would be rather tedious.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜