PageRenderTime 45ms CodeModel.GetById 43ms app.highlight 1ms RepoModel.GetById 0ms app.codeStats 1ms

/jEdit/tags/jedit-4-1-pre5/org/gjt/sp/jedit/syntax/DummyTokenHandler.java

#
Java | 53 lines | 7 code | 3 blank | 43 comment | 0 complexity | 38aeff9bd78e4a97e5291ce7b5e63f23 MD5 | raw file
 1/*
 2 * DummyTokenHandler.java - Ignores tokens
 3 * :tabSize=8:indentSize=8:noTabs=false:
 4 * :folding=explicit:collapseFolds=1:
 5 *
 6 * Copyright (C) 2002 Slava Pestov
 7 *
 8 * This program is free software; you can redistribute it and/or
 9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
21 */
22
23package org.gjt.sp.jedit.syntax;
24
25/**
26 * A dummy token handler that discards tokens.
27 *
28 * @author Slava Pestov
29 * @version $Id: DummyTokenHandler.java 4191 2002-05-26 07:38:44Z spestov $
30 * @since jEdit 4.1pre1
31 */
32public class DummyTokenHandler implements TokenHandler
33{
34	/**
35	 * To avoid having to create new instances of this class, use
36	 * this variable. This is allowed because instances of this
37	 * class do not store any state.
38	 */
39	public static final DummyTokenHandler INSTANCE = new DummyTokenHandler();
40
41	//{{{ handleToken() method
42	/**
43	 * Called by the token marker when a syntax token has been parsed.
44	 * @param id The token type (one of the constants in the
45	 * <code>Token</code> class).
46	 * @param offset The start offset of the token
47	 * @param length The number of characters in the token
48	 * @param context The line context
49	 * @since jEdit 4.1pre1
50	 */
51	public void handleToken(byte id, int offset, int length,
52		TokenMarker.LineContext context) {}
53}