Welcome to my blog, hope you enjoy reading
RSS

Thursday 3 July 2014

Running GWT's Super Dev Mode

Super dev mode is one of the feature given in GWT after 2.5 version.


Follow these steps.
  • Download the GWT 2.5 RC2, and put it somewhere...I put it in my eclipse/plugins directory. link
  • In Eclipse, add GWT 2.5 to the Project -> Properties -> Google -> Web Toolkit -> Configure SDKs screen, and select the 2.5 version that you have added to the directory in the step above.


  • Create the gwt project
add following code in .gwt.xml file
<!-- Changing the linker is only necessary if you want to try out SuperDevMode -->
    <add-linker name="xsiframe"/>
    <set-configuration-property name="devModeRedirectEnabled" value="true"/>

  • Right click on the project in Eclipse, go to its Run Configurations window, and create a new "Java Application", name it something like "SDM".

While in the Run Configurations window, do the following:


  • Set the project based on your project name, and type in the main class as com.google.gwt.dev.codeserver.CodeServer


On the Classpath tab, click user Entries, then click Add External JARs, navigate to the GWT 2.5 directory, and find the gwt-codeserver.jar, and click "Open" (and other external libraries).



  • In the Arguments tab, add -src src/ *SOURCE PATH OF YOUR PROJECT* to Program arguments, and add optional -Xmx1024m to VM arguments.



  • Click Apply, then go ahead and Run the project.
  •  After this you will get a URL like, localhost:9876/



  • Goto that URL, and bookmark, Dev Mode ON and Dev MOde Off then run your code by drag the bookmarks to browsers bookmars bar.



  • Right click on project and runas-->Webapplication.
  • Take the url from the devmod and remove ?gwt.codesvr=127.0.0.1:9997.
  • Then run bookmark from same url of project.
  • If u have any change in serverside code then click refresh in devmod
  • If u have any change in client side code then run devmodon bookmark again.

0 comments: