user1226162
user1226162

Reputation: 2032

GWT:how can i rename my module

I want to rename my module name below from test to testing but when i change it from refactor to testing , it says

           unable to find test.gwt.xml

its still looking for the previous module name ..

how can i resolve this

thanks9+

               <?xml version="1.0" encoding="UTF-8"?>
               <module rename-to='test'>

              <!-- Inherit the core Web Toolkit stuff.                        -->
               <inherits name='com.google.gwt.user.User'/>

Upvotes: 4

Views: 2538

Answers (3)

Vijay Sarin
Vijay Sarin

Reputation: 1336

You can refer to the following Video.

http://www.youtube.com/watch?v=UW4WSYs1bKE

To rename

  1. Right Click on the project.
  2. Select Run As ---> Run Configurations.
  3. In the Arguments Tab, change the Old Module Names in Program Arguments.
  4. Also Make sure, in GWT Tab, Selected module name is correct.

UPDATE

Given Video is not available now in YouTube. It might be removed by the owner.

Upvotes: 5

LINEMAN78
LINEMAN78

Reputation: 2562

The issue that you are most likely happening is that you haven't changed the run configuration in eclipse. As long as the package name isn't changed it isn't necessary to edit the .gwt.xml file other than renaming it. Changing the rename-to and entry point module names are not required as it is not necessary that they match the module name. The rename-to line changes the name of the folder and javascript files that are generated, so if you change it you have to remember to change your script tag in your html file.

Upvotes: 2

Deanna
Deanna

Reputation: 696

There are a few steps here. The module is controlled by the modulename.gwt.xml file. First rename that file. I'm not sure but I think you also need to change the java path package name to the new name. Then edit the gwt.xml file and change the entry point and the 'rename' lines. If the module is the first module to launch when running your app you need to change the project run configurations to know the new entry point. That's off the top of my head, I hope I got all the places.

Upvotes: 4

Related Questions