PageRenderTime 40ms CodeModel.GetById 14ms RepoModel.GetById 0ms app.codeStats 0ms

/www/tags/NOV_07_2009/htdocs/api/org/gjt/sp/jedit/syntax/TokenHandler.html

#
HTML | 239 lines | 199 code | 30 blank | 10 comment | 0 complexity | 72e23ed7cb22f673f5bce0fd3fcff327 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:13 GMT-08:00 2008 -->
  6. <TITLE>
  7. TokenHandler (jEdit API)
  8. </TITLE>
  9. <META NAME="keywords" CONTENT="org.gjt.sp.jedit.syntax.TokenHandler interface">
  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/TokenHandler.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/syntax/Token.html" title="class in org.gjt.sp.jedit.syntax"><B>PREV CLASS</B></A>&nbsp;
  42. &nbsp;<A HREF="../../../../../org/gjt/sp/jedit/syntax/TokenMarker.html" title="class in org.gjt.sp.jedit.syntax"><B>NEXT CLASS</B></A></FONT></TD>
  43. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  44. <A HREF="../../../../../index.html?org/gjt/sp/jedit/syntax/TokenHandler.html" target="_top"><B>FRAMES</B></A> &nbsp;
  45. &nbsp;<A HREF="TokenHandler.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;CONSTR&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;CONSTR&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.syntax</FONT>
  66. <BR>
  67. Interface TokenHandler</H2>
  68. <DL>
  69. <DT><B>All Known Implementing Classes:</B> <DD><A HREF="../../../../../org/gjt/sp/jedit/Buffer.TokenList.html" title="class in org.gjt.sp.jedit">Buffer.TokenList</A>, <A HREF="../../../../../org/gjt/sp/jedit/syntax/DefaultTokenHandler.html" title="class in org.gjt.sp.jedit.syntax">DefaultTokenHandler</A>, <A HREF="../../../../../org/gjt/sp/jedit/syntax/DisplayTokenHandler.html" title="class in org.gjt.sp.jedit.syntax">DisplayTokenHandler</A>, <A HREF="../../../../../org/gjt/sp/jedit/syntax/DummyTokenHandler.html" title="class in org.gjt.sp.jedit.syntax">DummyTokenHandler</A></DD>
  70. </DL>
  71. <HR>
  72. <DL>
  73. <DT><PRE>public interface <B>TokenHandler</B></DL>
  74. </PRE>
  75. <P>
  76. Token markers send tokens to implementations of this interface.
  77. <P>
  78. <P>
  79. <DL>
  80. <DT><B>Since:</B></DT>
  81. <DD>jEdit 4.1pre1</DD>
  82. </DL>
  83. <HR>
  84. <P>
  85. <!-- ========== METHOD SUMMARY =========== -->
  86. <A NAME="method_summary"><!-- --></A>
  87. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  88. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  89. <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
  90. <B>Method Summary</B></FONT></TH>
  91. </TR>
  92. <TR BGCOLOR="white" CLASS="TableRowColor">
  93. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  94. <CODE>&nbsp;void</CODE></FONT></TD>
  95. <TD><CODE><B><A HREF="../../../../../org/gjt/sp/jedit/syntax/TokenHandler.html#handleToken(javax.swing.text.Segment, byte, int, int, org.gjt.sp.jedit.syntax.TokenMarker.LineContext)">handleToken</A></B>(javax.swing.text.Segment&nbsp;seg,
  96. byte&nbsp;id,
  97. int&nbsp;offset,
  98. int&nbsp;length,
  99. <A HREF="../../../../../org/gjt/sp/jedit/syntax/TokenMarker.LineContext.html" title="class in org.gjt.sp.jedit.syntax">TokenMarker.LineContext</A>&nbsp;context)</CODE>
  100. <BR>
  101. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Called by the token marker when a syntax token has been parsed.</TD>
  102. </TR>
  103. <TR BGCOLOR="white" CLASS="TableRowColor">
  104. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  105. <CODE>&nbsp;void</CODE></FONT></TD>
  106. <TD><CODE><B><A HREF="../../../../../org/gjt/sp/jedit/syntax/TokenHandler.html#setLineContext(org.gjt.sp.jedit.syntax.TokenMarker.LineContext)">setLineContext</A></B>(<A HREF="../../../../../org/gjt/sp/jedit/syntax/TokenMarker.LineContext.html" title="class in org.gjt.sp.jedit.syntax">TokenMarker.LineContext</A>&nbsp;lineContext)</CODE>
  107. <BR>
  108. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The token handler can compare this object with the object
  109. previously given for this line to see if the token type at the end
  110. of the line has changed (meaning subsequent lines might need to be
  111. retokenized).</TD>
  112. </TR>
  113. </TABLE>
  114. &nbsp;
  115. <P>
  116. <!-- ============ METHOD DETAIL ========== -->
  117. <A NAME="method_detail"><!-- --></A>
  118. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  119. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  120. <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
  121. <B>Method Detail</B></FONT></TH>
  122. </TR>
  123. </TABLE>
  124. <A NAME="handleToken(javax.swing.text.Segment, byte, int, int, org.gjt.sp.jedit.syntax.TokenMarker.LineContext)"><!-- --></A><H3>
  125. handleToken</H3>
  126. <PRE>
  127. void <B>handleToken</B>(javax.swing.text.Segment&nbsp;seg,
  128. byte&nbsp;id,
  129. int&nbsp;offset,
  130. int&nbsp;length,
  131. <A HREF="../../../../../org/gjt/sp/jedit/syntax/TokenMarker.LineContext.html" title="class in org.gjt.sp.jedit.syntax">TokenMarker.LineContext</A>&nbsp;context)</PRE>
  132. <DL>
  133. <DD>Called by the token marker when a syntax token has been parsed.
  134. <P>
  135. <DD><DL>
  136. <DT><B>Parameters:</B><DD><CODE>seg</CODE> - The segment containing the text<DD><CODE>id</CODE> - The token type (one of the constants in the
  137. <A HREF="../../../../../org/gjt/sp/jedit/syntax/Token.html" title="class in org.gjt.sp.jedit.syntax"><CODE>Token</CODE></A> class).<DD><CODE>offset</CODE> - The start offset of the token<DD><CODE>length</CODE> - The number of characters in the token<DD><CODE>context</CODE> - The line context<DT><B>Since:</B></DT>
  138. <DD>jEdit 4.2pre3</DD>
  139. </DL>
  140. </DD>
  141. </DL>
  142. <HR>
  143. <A NAME="setLineContext(org.gjt.sp.jedit.syntax.TokenMarker.LineContext)"><!-- --></A><H3>
  144. setLineContext</H3>
  145. <PRE>
  146. void <B>setLineContext</B>(<A HREF="../../../../../org/gjt/sp/jedit/syntax/TokenMarker.LineContext.html" title="class in org.gjt.sp.jedit.syntax">TokenMarker.LineContext</A>&nbsp;lineContext)</PRE>
  147. <DL>
  148. <DD>The token handler can compare this object with the object
  149. previously given for this line to see if the token type at the end
  150. of the line has changed (meaning subsequent lines might need to be
  151. retokenized).
  152. <P>
  153. <DD><DL>
  154. <DT><B>Since:</B></DT>
  155. <DD>jEdit 4.2pre6</DD>
  156. </DL>
  157. </DD>
  158. </DL>
  159. <!-- ========= END OF CLASS DATA ========= -->
  160. <HR>
  161. <!-- ======= START OF BOTTOM NAVBAR ====== -->
  162. <A NAME="navbar_bottom"><!-- --></A>
  163. <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
  164. <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
  165. <TR>
  166. <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
  167. <A NAME="navbar_bottom_firstrow"><!-- --></A>
  168. <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  169. <TR ALIGN="center" VALIGN="top">
  170. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  171. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  172. <TD BGCOLOR="#00008B" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  173. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/TokenHandler.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  174. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  175. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  176. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  177. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  178. </TR>
  179. </TABLE>
  180. </TD>
  181. <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
  182. </EM>
  183. </TD>
  184. </TR>
  185. <TR>
  186. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  187. &nbsp;<A HREF="../../../../../org/gjt/sp/jedit/syntax/Token.html" title="class in org.gjt.sp.jedit.syntax"><B>PREV CLASS</B></A>&nbsp;
  188. &nbsp;<A HREF="../../../../../org/gjt/sp/jedit/syntax/TokenMarker.html" title="class in org.gjt.sp.jedit.syntax"><B>NEXT CLASS</B></A></FONT></TD>
  189. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  190. <A HREF="../../../../../index.html?org/gjt/sp/jedit/syntax/TokenHandler.html" target="_top"><B>FRAMES</B></A> &nbsp;
  191. &nbsp;<A HREF="TokenHandler.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
  192. &nbsp;
  193. <NOSCRIPT>
  194. <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
  195. </NOSCRIPT>
  196. </FONT></TD>
  197. </TR>
  198. <TR>
  199. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  200. SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
  201. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  202. DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
  203. </TR>
  204. </TABLE>
  205. <A NAME="skip-navbar_bottom"></A>
  206. <!-- ======== END OF BOTTOM NAVBAR ======= -->
  207. <HR>
  208. </BODY>
  209. </HTML>