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?
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="MyProject" | javaProject="MyProject-1.1" | Details may vary |
| "<listEntry value" entries | MyProject.launch file | internalArchive="MyProject" | internalArchive="MyProject-1.1" | Details may vary |
| "<listEntry value" entries | MyProject.launch file | project="MyProject" | project="MyProject-1.1" | Details may vary |
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. |
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 |
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 |