Roughian Examples Site Map - Examples Tutorials Widgets HowTos

Project - Quick Ref

Name Changes

The GWT project and application creators are great things. But they do tend to name everything the same as the project name. That makes things easy (easier, anyway) when you are writing the commands that create your project, but it doesn't make it easy to understand how the parts of the project fot together.

You might not want the HTML file to be called MyProject.html - the chances are, you will need it to be called 'index.htm', but if you change it, what else do you have to change? You can't change 'MyProject' to 'index' everywhere, but what do you do?

The Project Name

You want to rename 'MyProject' to 'MyProject-1.1' or you want to copy the project and you need to correct the entries.

The first time you do this, you'll have to go through manually and change these entries. Once you have changed the project name (assuming you pich a unique name) you can just do a "Replace All".

Where you see '"', that is what is in the file - it's not a coding error in this file that should really be ' " '.

Change Where From Change To Notes
Project launch file name Project root MyProject.launch MyProject-1.1.launch
"<listEntry value" entries MyProject.launch file <listEntry value="MyProject <listEntry value="MyProject-1.1 Details may vary
"<listEntry value" entries MyProject.launch file javaProject=&quot;MyProject&quot; javaProject=&quot;MyProject-1.1&quot; Details may vary
"<listEntry value" entries MyProject.launch file internalArchive=&quot;MyProject&quot; internalArchive=&quot;MyProject-1.1&quot; Details may vary
"<listEntry value" entries MyProject.launch file project=&quot;MyProject&quot; project=&quot;MyProject-1.1&quot; Details may vary

The Index File

You will have a file - MyProject.html - in the /public/ directory. You want to change it to 'index.htm'.

Change Where From Change To Notes
File name /public/ directory MyProject.html index.htm
PROGRAM_ARGUMENTS line MyProject.launch file MyProject.html index.htm Leave the rest of the line as-is.

The Package Name

You will have a package - 'my.original.name'. You want to change it to 'com.domain.subdom'.

Change Where From Change To Notes
Package name Eclipse Package Explorer my.original.name com.domain.subdom Select 'Rename subpackages'
entry-point tag MyProject.gwt.xml my.original.name com.domain.subdom
PROGRAM_ARGUMENTS line MyProject.launch file my.original.name com.domain.subdom

The Module File

You've got a module file - MyProject.gwt.xml - and you want to change it to 'MyModule.gwt.xml'

Change Where From Change To Notes
File name Eclipse Package Explorer MyProject.gwt.xml MyModule.gwt.xml
GWT script tag MyProject.html file src="MyProject.nocache.js" src="MyModule.nocache.js"
PROGRAM_ARGUMENTS line MyProject.launch file MyProject/MyProject.html MyModule/MyProject.html Don't change the HTML file name