PageRenderTime 22ms CodeModel.GetById 12ms app.highlight 7ms RepoModel.GetById 1ms 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
  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>
  7TokenHandler (jEdit API)
  8</TITLE>
  9
 10<META NAME="keywords" CONTENT="org.gjt.sp.jedit.syntax.TokenHandler interface">
 11
 12<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">
 13
 14
 15<NOSCRIPT>
 16</NOSCRIPT>
 17
 18</HEAD>
 19
 20<BODY BGCOLOR="white" >
 21
 22
 23<!-- ========= START OF TOP NAVBAR ======= -->
 24<A NAME="navbar_top"><!-- --></A>
 25<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
 26<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
 27<TR>
 28<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
 29<A NAME="navbar_top_firstrow"><!-- --></A>
 30<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
 31  <TR ALIGN="center" VALIGN="top">
 32  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
 33  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
 34  <TD BGCOLOR="#00008B" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
 35  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/TokenHandler.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
 36  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
 37  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
 38  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
 39  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
 40  </TR>
 41</TABLE>
 42</TD>
 43<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
 44</EM>
 45</TD>
 46</TR>
 47
 48<TR>
 49<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
 50&nbsp;<A HREF="../../../../../org/gjt/sp/jedit/syntax/Token.html" title="class in org.gjt.sp.jedit.syntax"><B>PREV CLASS</B></A>&nbsp;
 51&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>
 52<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
 53  <A HREF="../../../../../index.html?org/gjt/sp/jedit/syntax/TokenHandler.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 54&nbsp;<A HREF="TokenHandler.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
 55&nbsp;
 56<NOSCRIPT>
 57  <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
 58</NOSCRIPT>
 59
 60
 61</FONT></TD>
 62</TR>
 63<TR>
 64<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
 65  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
 66<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
 67DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
 68</TR>
 69</TABLE>
 70<A NAME="skip-navbar_top"></A>
 71<!-- ========= END OF TOP NAVBAR ========= -->
 72
 73<HR>
 74<!-- ======== START OF CLASS DATA ======== -->
 75<H2>
 76<FONT SIZE="-1">
 77org.gjt.sp.jedit.syntax</FONT>
 78<BR>
 79Interface TokenHandler</H2>
 80<DL>
 81<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>
 82</DL>
 83<HR>
 84<DL>
 85<DT><PRE>public interface <B>TokenHandler</B></DL>
 86</PRE>
 87
 88<P>
 89Token markers send tokens to implementations of this interface.
 90<P>
 91
 92<P>
 93<DL>
 94<DT><B>Since:</B></DT>
 95  <DD>jEdit 4.1pre1</DD>
 96</DL>
 97<HR>
 98
 99<P>
100
101<!-- ========== METHOD SUMMARY =========== -->
102
103<A NAME="method_summary"><!-- --></A>
104<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
105<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
106<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
107<B>Method Summary</B></FONT></TH>
108</TR>
109<TR BGCOLOR="white" CLASS="TableRowColor">
110<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
111<CODE>&nbsp;void</CODE></FONT></TD>
112<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,
113            byte&nbsp;id,
114            int&nbsp;offset,
115            int&nbsp;length,
116            <A HREF="../../../../../org/gjt/sp/jedit/syntax/TokenMarker.LineContext.html" title="class in org.gjt.sp.jedit.syntax">TokenMarker.LineContext</A>&nbsp;context)</CODE>
117
118<BR>
119&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Called by the token marker when a syntax token has been parsed.</TD>
120</TR>
121<TR BGCOLOR="white" CLASS="TableRowColor">
122<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
123<CODE>&nbsp;void</CODE></FONT></TD>
124<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>
125
126<BR>
127&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The token handler can compare this object with the object
128 previously given for this line to see if the token type at the end
129 of the line has changed (meaning subsequent lines might need to be
130 retokenized).</TD>
131</TR>
132</TABLE>
133&nbsp;
134<P>
135
136<!-- ============ METHOD DETAIL ========== -->
137
138<A NAME="method_detail"><!-- --></A>
139<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
140<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
141<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
142<B>Method Detail</B></FONT></TH>
143</TR>
144</TABLE>
145
146<A NAME="handleToken(javax.swing.text.Segment, byte, int, int, org.gjt.sp.jedit.syntax.TokenMarker.LineContext)"><!-- --></A><H3>
147handleToken</H3>
148<PRE>
149void <B>handleToken</B>(javax.swing.text.Segment&nbsp;seg,
150                 byte&nbsp;id,
151                 int&nbsp;offset,
152                 int&nbsp;length,
153                 <A HREF="../../../../../org/gjt/sp/jedit/syntax/TokenMarker.LineContext.html" title="class in org.gjt.sp.jedit.syntax">TokenMarker.LineContext</A>&nbsp;context)</PRE>
154<DL>
155<DD>Called by the token marker when a syntax token has been parsed.
156<P>
157<DD><DL>
158<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
159 <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>
160  <DD>jEdit 4.2pre3</DD>
161</DL>
162</DD>
163</DL>
164<HR>
165
166<A NAME="setLineContext(org.gjt.sp.jedit.syntax.TokenMarker.LineContext)"><!-- --></A><H3>
167setLineContext</H3>
168<PRE>
169void <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>
170<DL>
171<DD>The token handler can compare this object with the object
172 previously given for this line to see if the token type at the end
173 of the line has changed (meaning subsequent lines might need to be
174 retokenized).
175<P>
176<DD><DL>
177<DT><B>Since:</B></DT>
178  <DD>jEdit 4.2pre6</DD>
179</DL>
180</DD>
181</DL>
182<!-- ========= END OF CLASS DATA ========= -->
183<HR>
184
185
186<!-- ======= START OF BOTTOM NAVBAR ====== -->
187<A NAME="navbar_bottom"><!-- --></A>
188<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
189<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
190<TR>
191<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
192<A NAME="navbar_bottom_firstrow"><!-- --></A>
193<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
194  <TR ALIGN="center" VALIGN="top">
195  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
196  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
197  <TD BGCOLOR="#00008B" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
198  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/TokenHandler.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
199  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
200  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
201  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
202  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
203  </TR>
204</TABLE>
205</TD>
206<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
207</EM>
208</TD>
209</TR>
210
211<TR>
212<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
213&nbsp;<A HREF="../../../../../org/gjt/sp/jedit/syntax/Token.html" title="class in org.gjt.sp.jedit.syntax"><B>PREV CLASS</B></A>&nbsp;
214&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>
215<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
216  <A HREF="../../../../../index.html?org/gjt/sp/jedit/syntax/TokenHandler.html" target="_top"><B>FRAMES</B></A>  &nbsp;
217&nbsp;<A HREF="TokenHandler.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
223
224</FONT></TD>
225</TR>
226<TR>
227<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
228  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
229<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
230DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
231</TR>
232</TABLE>
233<A NAME="skip-navbar_bottom"></A>
234<!-- ======== END OF BOTTOM NAVBAR ======= -->
235
236<HR>
237
238</BODY>
239</HTML>