I’ve recently upgraded to MyEclipseIDE 2.6.4 (using Eclipse 2.1.1) and I’ve noticed the following problem in the JSP Editor:
When selecting multiple lines of jsp code and pressing the TAB key to indent the code, more lines than the selected number of lines get indented.
Some kind of intelligent indenting seems to be occurring. This appears to only happen between angle bracket code tags < and >.
This includes jsp tags:
e.g. Assume the following code is formatted as follows:
<%
String indent = "twice";
String indent2 = "once";
String indent3 = "once";
%>
Then select the 2 lines with the single indent, excluding the double indented line as well as the start and end jsp tags.
Now press the Tab key. The following results:
<%
String indent = "twice";
String indent2 = "once";
String indent3 = "once";
%>
instead of the expected:
<%
String indent = "twice";
String indent2 = "once";
String indent3 = "once";
%>
This doesn’t happen with just jsp code tags, but any tag beginning with < ending with > and spanning multiple lines.
This includes HTML comment tags: <!– and –>, and even simple HTML tags that span multiple lines (although this is not common practice, I tested it to try an isolate the problem).
This doesn’t happen in the Java Editor of version 2.6.4 and it never used to happen in the JSP Editor of version 2.6.3.