Community
Participate
Working Groups
Build Identifier: 20110218-0911 After making some refactoring in Java bean code which is included in JSP with "include" directive that JSP is made unusable. Moreover, JSP file gets reformatted and loses its original state, what makes it very difficult to compare with its previous version in any VCS. Eclipse is latest distribution, Helios SR2. I'll attach Eclipse project zip file and couple of screenshots soon. Reproducible: Always Steps to Reproduce: 1. Create Java bean class (simple class with accessors/mutators), JSP file. 2. Link Java bean to JSP by means of "include" directive. 3. Use any accessors methods of bean class in JSP. 4. Refactor any of that accessors methods' names. 5. That methods in JSP file are erased. JSP file is reformatted.
Created attachment 193480 [details] Simple project as an example
Created attachment 193483 [details] Screenshot with before/after view
Additional info. If I rename the method getStr() to getStr1(), it just disappears from JSP source code, making it unusable. You can see that on screenshot I attached. This behaviour is also seen in EclipseTest.inc file which is in project also. If I rename the method isBool() to isBool1(), the JSP file *fragment* is reformatted where jb.isBool() is mentioned, like this: Before rename: <% if (jb.isBool1()) { %> <p>Bool set!</p> <% } %> After rename: <% if (jb.isBool1()) { %> <p>Bool set!</p> <% } %> It makes JSP source hard to compare with VCS diff tools: the code remains the same, but suddenly went through unexpected visual change.
I've reproduced in 3.2.3 but I have yet to reproduce in 3.3.
Very interesting if it's only happening in 3.2.x...
Nick, if also not reproducible on 3.4, we should just resolve it.
I also can't reproduce it now on latest Eclipse Indigo SR2, nevertheless I'm leaving final decision to you fellows. PART OF JSP file is still reformatted during re-factoring and this is bad for various version control systems, but that's another "bug".
As mentioned, this no longer seems to be reproducible. So I'm resolving the defect. If the formatting is still an issue for you, please feel free to open a new defect so that we can track that issue separately. Thanks!