- This topic has 7 replies, 2 voices, and was last updated 19 years, 9 months ago by
David Beckedorff.
-
AuthorPosts
-
David BeckedorffMemberWhat if I want 4 spaces tabs in Java and 2 spaces tabs in JSP’s. How do I set that preference?
I see how to downcase tags in the HTML editor. How do I do it in the JSP editor.
I’m using ME 3.8.4 for development and ME 4.0M2 for amusement.
-David
Riyad KallaMemberWhat if I want 4 spaces tabs in Java and 2 spaces tabs in JSP’s. How do I set that preference?
Window > Prefs > MyEclipse > Editors > Common Editor Preferences > “Displayed tab width”
I see how to downcase tags in the HTML editor. How do I do it in the JSP editor.
Both the HTML and JSP editor key off of the HTML editor settings w.r.t. to tag case, just change this in your HTML editor, and the JSP editor will follow suit.
David BeckedorffMemberHi Riyad,
Re question #1 above, the tab width, I understand that I can do:
Window > Prefs > MyEclipse > Editors > Common Editor Preferences > “Displayed tab width”
But this forces both Java and JSP Editor to 4 spaces, or both to 2. I would like to be able to configure these two tab widths independently, or at least to override the Common Editor Preference within the context of a specific editor, like the JSP Editor. JSP’s tend to have many more levels of indentation than Java source files do.
WRT question #2,
OK, I set the HTML editor to downcase tags and attributes.
Then I do Source > Format > Document on the following JSP:
<%@ page import=”mil.navy.fvmadmin.resources.Constants”%>
<%@ taglib uri=”http://java.sun.com/jstl/core” prefix=”c”%>
<%@ taglib uri=”/WEB-INF/tlds/fvmadmin” prefix=”fvmadmin”%><table width=”578″ border=”0″ align=”center” cellpadding=”0″
cellspacing=”0″>
<tr>
<td width=”578″>
<table border=”0″ cellpadding=”5″ cellspacing=”0″>
<tr>
<td class=”Page-Title-Gray”> </td>
<td class=”Page-Sub-Title”>Dashboard Menu</td>
</tr>
</table>
<table border=”1″ cellpadding=”0″ cellspacing=”0″
bordercolor=”#DBDBDB”>
<tr>
<td width=”574″><fvmadmin:permission
name=”<%= Constants.FVMADMIN_DASHBOARD %>”>
<TABLE border=0 cellPadding=0 cellSpacing=5>
<TBODY>
<TR>
<TD vAlign=”top”><a href=”presentDashboardPage.do”><img
src=”images/linkicon.jpg” border=”0″></a></TD>
<TD valign=”top”>
<p><a href=”presentDashboardPage.do”>5VM Dashboard <br>
</a>Check on the recent availability of 5VM databases.</p>
<p> </p>
</TD>
</TR>
</table>
</fvmadmin:permission><fvmadmin:permission
name=”<%= Constants.FVMADMIN_REALTIME_DASHBOARD %>”>
<table border=”0″ cellpadding=”0″ cellspacing=”5″>
<TR>
<TD vAlign=”top”><a href=”needURL”><img
src=”images/linkicon.jpg” border=”0″></a></TD>
<TD valign=”top”>
<p><a href=”needURL”>Realtime Dashboard <br>
</a>Check on the current availability of 5VM databases.</p>
<p> </p>
</TD>
</TR>
<c:if test=”${applicationScope.JSP_DEBUG == ‘true’}”>
</c:if>
<c:if test=”${false}”>
</c:if></TABLE>
</fvmadmin:permission> <br>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>As you can see, the internal table, tr, and td tags are not downcased. This happens in both ME 3.8.4 and ME 4.0M2.
-David
David BeckedorffMemberAs a further test, I copied my JSP code to an .html file of the same name. I then double-checked to make sure that my HTML Editor preferences were set to force lowercase tags. Then I highlighted the following snippet:
<TABLE border=0 cellPadding=0 cellSpacing=5>
<TBODY>
<TR>
<TD vAlign=”top”><a href=”presentDashboardPage.do”><img
src=”images/linkicon.jpg” border=”0″></a></TD>
<TD valign=”top”>
<p><a href=”presentDashboardPage.do”>5VM Dashboard <br>
</a>Check on the recent availability of 5VM databases.</p>
<p> </p>
</TD>
</TR>
</table>and keyed in Ctrl+Shift+F. No tags were changed to lowercase.
So maybe there is a bug in the HTML Ediotr’s tag case-change feature?
-David
Riyad KallaMemberI am looking into this, it does seem like there is a bug. Thank you for bringing this to our attention David.
David BeckedorffMemberAny chance of allowing the JSP editor to set a tab preference overriding the common editor setting?
-David
Riyad KallaMemberDavid,
This is a 5.0+ item, we hope to do a full once over of all editors for 5.0 and later, until then I’m sorry I don’t have a workaround for you, I know inconsistent formatting can really be maddening at times.
David BeckedorffMemberOK, I do understand. Resource constraints and orderly scheduling.
Meanwhile, I can set the tabs at 2, edit a bunch of JSP’s, then reset tabs back to 4 for other files, etc.
-David
-
AuthorPosts