facebook

3.8.0 Beta1: Renaming class doesn’t affect the web.xml file

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #208299 Reply

    Hi,

    I’m wondering if this is new behaviour because of the new version of Eclipse or if it’s a bug. When I was using M8 and 3.7.2, if I renamed a class and asked to check non-java files, Eclipse would go through all my files including the web.xml file and ask me if I wanted to modify it. Now I’m using 3.8.0 Beta1 and Eclipse 3.0M9 but when I rename, the web.xml file is not updated, nor does it show in the list of actions that will be undertaken.

    Any ideas?

    L

    #208307 Reply

    Scott Anderson
    Participant

    L,

    Actually, IIRC refactoring never went outside the java files, except in plug-in development projects where the PDE adds ‘Update fully qualified names in non-Java files’. Could this be the confusion?

    #208310 Reply

    No, I don’t do plugin development and I remember that it did the changes in the previous version. My servlets are named after the class names for consistency. When I was using M8, renaming a servlet class would change the fully qualified name in the web.xml file but it wouldn’t change the name of the servlet itself, I had to do that manyally.

    Now, nothing is changed at all.

    Actually, this brings up an idea for an interesting refactoring feature: “Rename servlet” which would change the servlet class name, the servlet name and its mapping in the web.xml file. It would have to be specific to ME because Eclipse itself doesn’t keep track of this.

    L

    #208313 Reply

    Riyad Kalla
    Member

    L,
    I do know what you are talking about since I used to use it quite a bit when refactoring my Action or Form classes for my Struts projects (and it would update the names in the struts-config.xml file). I’m not sure why its not in Eclipse 3.0 anymore, but that pretty much pisses me off if its not in there… I use this as my only workaround for Refactoring not being a global operation.

    #208320 Reply

    Scott Anderson
    Participant

    Acutally guys, I’m showing this as working. I have a servlet java file upon which I invoke Refactor > Rename. In the refactoring dialog I give it a new name and also check the box that says “Update fully qualified name in non-Java files (forces preview)” and add a pattern of * to the text box. When I hit preview under a heading “Textual qualified name contributions” I can see a proposed web.xml change. Seems to work fine. Can you not replicate these steps? What are you seeing? By the way, the confusion with my earlier post was that I tried to rename a class in the default package, thus making the the ‘fully qualified name’ option unavailable.

    #208322 Reply

    Riyad Kalla
    Member

    Ahh ok then I am happy again, thanks for the clarification (still haven’t taken the 3.0 dive yet)

    #208332 Reply

    Doesn’t work for me. I did what you said and it took Eclipse more than 5 minutes to check my 1300+ files. Then, it came back with the same refactorings as what I got before. There was an added entry for “Textual qualified name contributions”, but the only elements I saw there were for renaming .class files in my WEB-INF/classes directory. The web.xml file never showed up in the list. Maybe it’s something with my setup (yet again).

    L

    #208338 Reply

    Scott Anderson
    Participant

    To be clear, your java file is not in the default package and it is explicitly referenced as a fully-qualified classname in your web.xml file?

    #208384 Reply

    That is correct. It’s weird because when I do a clean build of my system, it takes so long that I get out of memory errors. Eclipse goes through my Javadoc output file and checks each and every HTML file in there. Then it dies. Really weird.

    #208400 Reply

    Greg
    Member

    L,

    There is an automatic html validation that is tied into the build cycle of a MyEclipse Web Project. So if you rebuild the web project, it will run all the html in the proejct through a html validator. I tested this on a large group of html files (jdk1.5.0 api 9,000+ files) and found that there is a memory consumption problem. I was able to reproduce OutOfMemory errors using the standard memory limit of the jvm very quickly. We will address this memory consumption problem in the next release. I will report this in the PR system. Also, this builder should be user configurable so you can turn this html validator off in the automatic build. Similar to turning off jsp compiling feature that is currently available.

    Until then, here are two possible workarounds:

    1) Increase the memory size of the jvm by modifying the command line parameters that launch MyEclpise by passing the following args to eclipse:

    -vmargs -Xmx256M -Xms128M

    If your RAM size is larger you could increase these numbers accordingly. This should allow the process to finish depending on how many html files you have.

    2) Since these files are javadocs, most likely you don’t care for them being validated at all. Until the capability to turn off this automatic html validation is available, a current option is to modify the File Filter (Regular Expression) on the main HTML Formatting and Validation preference page unde the JSP editor. You can set this field to something that wont match html files. So when you rebuild the project, the html validator wont match any html files.

    Thank you for being patient as we continually improve our product. Your feedback is appreciated.

    #209814 Reply

    Riyad Kalla
    Member

    Fixed in 3.8Beta2.

Viewing 11 posts - 1 through 11 (of 11 total)
Reply To: 3.8.0 Beta1: Renaming class doesn’t affect the web.xml file

You must be logged in to post in the forum log in