PageRenderTime 59ms CodeModel.GetById 20ms RepoModel.GetById 0ms app.codeStats 0ms

/www/tags/NOV_07_2009/htdocs/api/org/gjt/sp/jedit/indent/WhitespaceRule.html

#
HTML | 270 lines | 223 code | 35 blank | 12 comment | 0 complexity | 5d96e74bafd169b7952502a07a24011f MD5 | raw file
Possible License(s): BSD-3-Clause, AGPL-1.0, Apache-2.0, LGPL-2.0, LGPL-3.0, GPL-2.0, CC-BY-SA-3.0, LGPL-2.1, GPL-3.0, MPL-2.0-no-copyleft-exception, IPL-1.0
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <!--NewPage-->
  3. <HTML>
  4. <HEAD>
  5. <!-- Generated by javadoc (build 1.5.0_14) on Tue Jul 22 07:14:02 GMT-08:00 2008 -->
  6. <TITLE>
  7. WhitespaceRule (jEdit API)
  8. </TITLE>
  9. <META NAME="keywords" CONTENT="org.gjt.sp.jedit.indent.WhitespaceRule class">
  10. <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">
  11. <NOSCRIPT>
  12. </NOSCRIPT>
  13. </HEAD>
  14. <BODY BGCOLOR="white" >
  15. <!-- ========= START OF TOP NAVBAR ======= -->
  16. <A NAME="navbar_top"><!-- --></A>
  17. <A HREF="#skip-navbar_top" title="Skip navigation links"></A>
  18. <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
  19. <TR>
  20. <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
  21. <A NAME="navbar_top_firstrow"><!-- --></A>
  22. <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  23. <TR ALIGN="center" VALIGN="top">
  24. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  25. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  26. <TD BGCOLOR="#00008B" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  27. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/WhitespaceRule.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  28. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  29. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  30. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  31. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  32. </TR>
  33. </TABLE>
  34. </TD>
  35. <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
  36. </EM>
  37. </TD>
  38. </TR>
  39. <TR>
  40. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  41. &nbsp;<A HREF="../../../../../org/gjt/sp/jedit/indent/RegexpIndentRule.html" title="class in org.gjt.sp.jedit.indent"><B>PREV CLASS</B></A>&nbsp;
  42. &nbsp;NEXT CLASS</FONT></TD>
  43. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  44. <A HREF="../../../../../index.html?org/gjt/sp/jedit/indent/WhitespaceRule.html" target="_top"><B>FRAMES</B></A> &nbsp;
  45. &nbsp;<A HREF="WhitespaceRule.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
  46. &nbsp;
  47. <NOSCRIPT>
  48. <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
  49. </NOSCRIPT>
  50. </FONT></TD>
  51. </TR>
  52. <TR>
  53. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  54. SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
  55. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  56. DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
  57. </TR>
  58. </TABLE>
  59. <A NAME="skip-navbar_top"></A>
  60. <!-- ========= END OF TOP NAVBAR ========= -->
  61. <HR>
  62. <!-- ======== START OF CLASS DATA ======== -->
  63. <H2>
  64. <FONT SIZE="-1">
  65. org.gjt.sp.jedit.indent</FONT>
  66. <BR>
  67. Class WhitespaceRule</H2>
  68. <PRE>
  69. java.lang.Object
  70. <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.gjt.sp.jedit.indent.WhitespaceRule</B>
  71. </PRE>
  72. <DL>
  73. <DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../../../org/gjt/sp/jedit/indent/IndentRule.html" title="interface in org.gjt.sp.jedit.indent">IndentRule</A></DD>
  74. </DL>
  75. <HR>
  76. <DL>
  77. <DT><PRE>public class <B>WhitespaceRule</B><DT>extends java.lang.Object<DT>implements <A HREF="../../../../../org/gjt/sp/jedit/indent/IndentRule.html" title="interface in org.gjt.sp.jedit.indent">IndentRule</A></DL>
  78. </PRE>
  79. <P>
  80. Whitespace rule. This rule cancels all indent actions in the
  81. following case:
  82. <ul>
  83. <li>The previous line is all whitespace</li>
  84. <li>The current line is not empty</li>
  85. </ul>
  86. <p>The result is that this rule won't allow the indentation to be
  87. increased, only decreased (by rules triggered by unindentThisLine).
  88. If the requirements above do not apply, this rule does nothing.</p>
  89. <P>
  90. <P>
  91. <DL>
  92. <DT><B>Since:</B></DT>
  93. <DD>jEdit 4.3pre10</DD>
  94. </DL>
  95. <HR>
  96. <P>
  97. <!-- ======== CONSTRUCTOR SUMMARY ======== -->
  98. <A NAME="constructor_summary"><!-- --></A>
  99. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  100. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  101. <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
  102. <B>Constructor Summary</B></FONT></TH>
  103. </TR>
  104. <TR BGCOLOR="white" CLASS="TableRowColor">
  105. <TD><CODE><B><A HREF="../../../../../org/gjt/sp/jedit/indent/WhitespaceRule.html#WhitespaceRule()">WhitespaceRule</A></B>()</CODE>
  106. <BR>
  107. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
  108. </TR>
  109. </TABLE>
  110. &nbsp;
  111. <!-- ========== METHOD SUMMARY =========== -->
  112. <A NAME="method_summary"><!-- --></A>
  113. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  114. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  115. <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
  116. <B>Method Summary</B></FONT></TH>
  117. </TR>
  118. <TR BGCOLOR="white" CLASS="TableRowColor">
  119. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  120. <CODE>&nbsp;void</CODE></FONT></TD>
  121. <TD><CODE><B><A HREF="../../../../../org/gjt/sp/jedit/indent/WhitespaceRule.html#apply(org.gjt.sp.jedit.buffer.JEditBuffer, int, int, int, java.util.List)">apply</A></B>(<A HREF="../../../../../org/gjt/sp/jedit/buffer/JEditBuffer.html" title="class in org.gjt.sp.jedit.buffer">JEditBuffer</A>&nbsp;buffer,
  122. int&nbsp;thisLineIndex,
  123. int&nbsp;prevLineIndex,
  124. int&nbsp;prevPrevLineIndex,
  125. java.util.List&lt;<A HREF="../../../../../org/gjt/sp/jedit/indent/IndentAction.html" title="interface in org.gjt.sp.jedit.indent">IndentAction</A>&gt;&nbsp;indentActions)</CODE>
  126. <BR>
  127. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Apply the indent rule to this line, and return an indent action.</TD>
  128. </TR>
  129. </TABLE>
  130. &nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
  131. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  132. <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
  133. <TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
  134. </TR>
  135. <TR BGCOLOR="white" CLASS="TableRowColor">
  136. <TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
  137. </TR>
  138. </TABLE>
  139. &nbsp;
  140. <P>
  141. <!-- ========= CONSTRUCTOR DETAIL ======== -->
  142. <A NAME="constructor_detail"><!-- --></A>
  143. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  144. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  145. <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
  146. <B>Constructor Detail</B></FONT></TH>
  147. </TR>
  148. </TABLE>
  149. <A NAME="WhitespaceRule()"><!-- --></A><H3>
  150. WhitespaceRule</H3>
  151. <PRE>
  152. public <B>WhitespaceRule</B>()</PRE>
  153. <DL>
  154. </DL>
  155. <!-- ============ METHOD DETAIL ========== -->
  156. <A NAME="method_detail"><!-- --></A>
  157. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  158. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  159. <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
  160. <B>Method Detail</B></FONT></TH>
  161. </TR>
  162. </TABLE>
  163. <A NAME="apply(org.gjt.sp.jedit.buffer.JEditBuffer, int, int, int, java.util.List)"><!-- --></A><H3>
  164. apply</H3>
  165. <PRE>
  166. public void <B>apply</B>(<A HREF="../../../../../org/gjt/sp/jedit/buffer/JEditBuffer.html" title="class in org.gjt.sp.jedit.buffer">JEditBuffer</A>&nbsp;buffer,
  167. int&nbsp;thisLineIndex,
  168. int&nbsp;prevLineIndex,
  169. int&nbsp;prevPrevLineIndex,
  170. java.util.List&lt;<A HREF="../../../../../org/gjt/sp/jedit/indent/IndentAction.html" title="interface in org.gjt.sp.jedit.indent">IndentAction</A>&gt;&nbsp;indentActions)</PRE>
  171. <DL>
  172. <DD><B>Description copied from interface: <CODE><A HREF="../../../../../org/gjt/sp/jedit/indent/IndentRule.html#apply(org.gjt.sp.jedit.buffer.JEditBuffer, int, int, int, java.util.List)">IndentRule</A></CODE></B></DD>
  173. <DD>Apply the indent rule to this line, and return an indent action.
  174. <P>
  175. <DD><DL>
  176. <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/gjt/sp/jedit/indent/IndentRule.html#apply(org.gjt.sp.jedit.buffer.JEditBuffer, int, int, int, java.util.List)">apply</A></CODE> in interface <CODE><A HREF="../../../../../org/gjt/sp/jedit/indent/IndentRule.html" title="interface in org.gjt.sp.jedit.indent">IndentRule</A></CODE></DL>
  177. </DD>
  178. <DD><DL>
  179. <DT><B>Parameters:</B><DD><CODE>buffer</CODE> - the buffer<DD><CODE>thisLineIndex</CODE> - the line index<DD><CODE>prevLineIndex</CODE> - the prior non empty line index
  180. (or -1 if there is no prior non empty line)<DD><CODE>prevPrevLineIndex</CODE> - the prior non empty line index before the prevLineIndex
  181. (or -1 if there is no prior non empty line)<DD><CODE>indentActions</CODE> - the indent actions list. The rule can add an action in it if
  182. it is necessary</DL>
  183. </DD>
  184. </DL>
  185. <!-- ========= END OF CLASS DATA ========= -->
  186. <HR>
  187. <!-- ======= START OF BOTTOM NAVBAR ====== -->
  188. <A NAME="navbar_bottom"><!-- --></A>
  189. <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
  190. <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
  191. <TR>
  192. <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
  193. <A NAME="navbar_bottom_firstrow"><!-- --></A>
  194. <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  195. <TR ALIGN="center" VALIGN="top">
  196. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  197. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  198. <TD BGCOLOR="#00008B" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  199. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/WhitespaceRule.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  200. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  201. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  202. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  203. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  204. </TR>
  205. </TABLE>
  206. </TD>
  207. <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
  208. </EM>
  209. </TD>
  210. </TR>
  211. <TR>
  212. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  213. &nbsp;<A HREF="../../../../../org/gjt/sp/jedit/indent/RegexpIndentRule.html" title="class in org.gjt.sp.jedit.indent"><B>PREV CLASS</B></A>&nbsp;
  214. &nbsp;NEXT CLASS</FONT></TD>
  215. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  216. <A HREF="../../../../../index.html?org/gjt/sp/jedit/indent/WhitespaceRule.html" target="_top"><B>FRAMES</B></A> &nbsp;
  217. &nbsp;<A HREF="WhitespaceRule.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
  218. &nbsp;
  219. <NOSCRIPT>
  220. <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
  221. </NOSCRIPT>
  222. </FONT></TD>
  223. </TR>
  224. <TR>
  225. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  226. SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
  227. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  228. DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
  229. </TR>
  230. </TABLE>
  231. <A NAME="skip-navbar_bottom"></A>
  232. <!-- ======== END OF BOTTOM NAVBAR ======= -->
  233. <HR>
  234. </BODY>
  235. </HTML>