For Developers, By Developers
Cypal Studio for GWT requires Eclipse IDE for JEE Developers. The minimum requirement is Eclipse Europa version (3.3), which can be downloaded from here. But we highly recommend using the latest version from here. You need to download and install Google Web Toolkit separately.
Download the required version from here and unzip it into your eclipse/plugins folder. Open Eclipse (remember to run Eclipse on a Java 1.5 VM!). Select Window->Preferences->Cypal Studio and set GWT home to the directory where you have installed the Google Web Toolkit.
Cypal Studio for GWT is implemented as a WTP Facet. When creating a new Dynamic Web Project, select the configuration 'Cypal Studio for GWT' in the first page of the Wizard. (Select 'Cypal Studio for GWT (1.4 or earlier)' if you are using GWT 1.4 or earlier versions) If you already have a Dynamic Web Project, you can add the facet by selecting Project->Properties->Project Facets->Modify Project and check the Cypal's GWT Facet (Please make sure you don't have gwt-user.jar in your classpath).
GWT ships with a few samples that you can play around with. Importing those samples is just a Wizard away. Click File->New->Examples->GWT->Samples. In the Wizard, select the sample and the project into which you want to import the sample into. Click Finish. The samples will be imported into your project in a separate source folder.
To run the imported sample, please refer to the "Running/Debugging a GWT Application" section
Once you have a Dynamic Web Project with Cypal Studio for GWT facet, you can add a new module by selecting File->New->Other->Cypal Studio-> Module. Type the name of the module and select(or type) the package where you want it to be created. Click Finish, you will have all the artifacts for the module generated.
Note: The theme selection should be done only if you are using GWT 1.5 or later) If you are using GWT 1.4 or earlier, please unselect all the themes.
Select Run->Open Run Dialog/Open Debug Dialog to activate the Launch configuration dialog box. Double Click "Gwt Hosted Mode Application". In the main page, you can select the Project & Module you want to run. In the parameters page you can select the parameters such as port and log level for the hosted mode GWTShell to use. Click Run to execute the GwtShell and bring up your application. The launcher will add the jar files and all the source folders in the project to your application.
Alternatively, you can right click on a module file and select Run As -> GWT Hosted Mode Application, to run the module.
GWT Compiler will be automatically invoked when you do a Clean build (Project->Clean) or when you deploy to an external server (explained below). The files generated by GWT Compiler will be in the <Project root>/build/gwtOutput. This location can be controlled from the preference page. The command output of the GWT Compiler will be shown in the Console view.
You can select File->New->Other->Cypal Studio -> Remote Service. Select the module to which you want to add the RemoteService. Type the name and uri for the service and click Finish. Now the artifacts for the remote service will be generated. Entries will be added to web.xml and gwt.xml
You can open the RemoteService interface and add/change/delete methods in it. You need to provide the implementation of those methods in RemoteServiceImpl class. But thanks to Cypal Studio for GWT, you don't have to do anything in RemoteServiceAsync. Cypal Studio for GWT will automatically update the corresponding Async file whenever a RemoteService interface is changed.
The utility class in the Remote service should help you in making the remote call.
MyRemoteServiceAsync async = MyRemoteService.Util.getInstance(); async.makeRemoteCall(param1, param2, callback);
You can add the project to any external server (JBoss, Weblogic, Websphere, ...) configured in the Server's view, just as the way you used to deploy a normal Dynamic Web Application. Cypal Studio for GWT will take care of calling the GWT compiler whenever you are doing a publish on that server.
Select File->Export->Export as war. The WAR will be created with the files that are generated by the GWT compiler in the location <Project root>/build/gwtOutput (or a location specified by you in the Preference Page)
You have to do a clean build on the Project before exporting as WAR file. Project->Clean and select the project for which you want to create the WAR file.
You can do the same through in the command line by running the following command
java -jar org.eclipse.equinox.launcher_<version>.jar -application in.cypal.studio.gwt.core.ExportWar -data <workspace> -project <project name> -dest <destination file>
Starting from 1.5 version, GWT Compiler supports Java 1.5. So you can make use of all the language features like annotation, generics, auto boxing, in your client code. To take advantage of these features, right click your Project->Properties->Project Facets->Modify Project. In that dialog, change Java from 1.4 to 5.0 and Cypals GWT Facet from 1.0 to 1.5
(You would need RC 6 or later version of Cypal Studio for GWT)
Ganymede's P2 has changed the way plugins are installed. If you are using Ganymede, do not unzip the files into the plugins directory. Rather unzip the plugin jars into <Eclipse home>/dropins/Cypal/plugins You have to manually create the Cypal and plugins directories.
This project is Apache licensed and the source is available @ Google Code: http://code.google.com/p/cypal-studio/source
Drop a mail to firstname.lastname@example.org in case of questions or suggestions.
Bugs can be raised here: http://code.google.com/p/cypal-studio/issues/list
© 2006-2010 Cypal Solutions. Site designed and developed by m*spark Solutions.