PageRenderTime 22ms CodeModel.GetById 3ms RepoModel.GetById 0ms app.codeStats 0ms

/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
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. /*
  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. package org.gjt.sp.jedit.syntax;
  23. /**
  24. * A dummy token handler that discards tokens.
  25. *
  26. * @author Slava Pestov
  27. * @version $Id: DummyTokenHandler.java 4191 2002-05-26 07:38:44Z spestov $
  28. * @since jEdit 4.1pre1
  29. */
  30. public class DummyTokenHandler implements TokenHandler
  31. {
  32. /**
  33. * To avoid having to create new instances of this class, use
  34. * this variable. This is allowed because instances of this
  35. * class do not store any state.
  36. */
  37. public static final DummyTokenHandler INSTANCE = new DummyTokenHandler();
  38. //{{{ handleToken() method
  39. /**
  40. * Called by the token marker when a syntax token has been parsed.
  41. * @param id The token type (one of the constants in the
  42. * <code>Token</code> class).
  43. * @param offset The start offset of the token
  44. * @param length The number of characters in the token
  45. * @param context The line context
  46. * @since jEdit 4.1pre1
  47. */
  48. public void handleToken(byte id, int offset, int length,
  49. TokenMarker.LineContext context) {}
  50. }