facebook

Refactor actions on any Java class do not find any JSPs

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #259644 Reply

    smolloy
    Member

    When I choose to refactor a method in a java class, the refactor dialog does not find any of the JSP usages to update. All my classes and JSPs are in a single project that is MyEclipse-web-enabled.

    #259682 Reply

    henk
    Member

    I figure this was done on purpose 😉 You shouldn’t use Java code in JSP pages. Sun and about the whole Java community have been advocating against doing this for years now.

    Nevertheless, I would be a nice extra feature to have. Most (older) projects have some JSP pages in them where some programmer felt it was necesarry to use Java on it.

    #259720 Reply

    Riyad Kalla
    Member

    smolloy,
    I cannot reproduce this problem either using the same test project I sent you earlier to try. Could you try it in my test project, selecting all the check boxes in the refactor menu and see if it works?

    Attachments:
    You must be logged in to view attached files.
    #265299 Reply

    smolloy
    Member

    I found that if you “Close” (context menu option) the project in the “Navigator” tab, then “Open Project”, that the JSP references are rebuilt and from then forward it seems to work fine. This fix also works to restore the “Find References…” not searching JSPs. Something about the JSP index of usages gets rebuild when you close/open the project in the workspace.

    #265302 Reply

    Riyad Kalla
    Member

    smolloy,
    Thanks for the heads up, we’ll look into this.

    #289598 Reply

    gau168
    Member

    yes, I have the same problem. so I try use the solution.
    1. close project.
    2. ope project.

    #289608 Reply

    henk
    Member

    A couple of times the refactoring created rubbish in my JSP files. Formatting was destroyed, but much worse imports were ruined. Instead of being replaced fully with a new package name, the package name in the JSP after refactoring ended up being some mix of the old and new name. E.g. suppose the old name was com.java.foo and the new was com.java.bar, the name in the imports would be com.java.fobaro or something like that.

    The last time I tried this was with MyEclipse 6.0, so maybe its better now.

Viewing 7 posts - 1 through 7 (of 7 total)
Reply To: Refactor actions on any Java class do not find any JSPs

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