PageRenderTime 746ms CodeModel.GetById 41ms RepoModel.GetById 6ms app.codeStats 0ms

/jEdit/tags/jedit-4-2-pre4/org/gjt/sp/jedit/syntax/DummyTokenHandler.java

#
Java | 56 lines | 8 code | 4 blank | 44 comment | 0 complexity | 6a1ac5ef84236c28917b3d00b1d33106 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. import javax.swing.text.Segment;
  24. /**
  25. * A dummy token handler that discards tokens.
  26. *
  27. * @author Slava Pestov
  28. * @version $Id: DummyTokenHandler.java 4755 2003-06-03 22:02:40Z spestov $
  29. * @since jEdit 4.1pre1
  30. */
  31. public class DummyTokenHandler implements TokenHandler
  32. {
  33. /**
  34. * To avoid having to create new instances of this class, use
  35. * this variable. This is allowed because instances of this
  36. * class do not store any state.
  37. */
  38. public static final DummyTokenHandler INSTANCE = new DummyTokenHandler();
  39. //{{{ handleToken() method
  40. /**
  41. * Called by the token marker when a syntax token has been parsed.
  42. * @param seg The segment containing the text
  43. * @param id The token type (one of the constants in the
  44. * {@link Token} class).
  45. * @param offset The start offset of the token
  46. * @param length The number of characters in the token
  47. * @param context The line context
  48. * @since jEdit 4.2pre3
  49. */
  50. public void handleToken(Segment seg, byte id, int offset, int length,
  51. TokenMarker.LineContext context) {} //}}}
  52. }