01: /*
02: * Copyright (c) 2000, Jacob Smullyan.
03: *
04: * This is part of SkunkDAV, a WebDAV client. See http://skunkdav.sourceforge.net/
05: * for the latest version.
06: *
07: * SkunkDAV is free software; you can redistribute it and/or
08: * modify it under the terms of the GNU General Public License as published
09: * by the Free Software Foundation; either version 2, or (at your option)
10: * any later version.
11: *
12: * SkunkDAV is distributed in the hope that it will be useful,
13: * but WITHOUT ANY WARRANTY; without even the implied warranty of
14: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15: * General Public License for more details.
16: *
17: * You should have received a copy of the GNU General Public License
18: * along with SkunkDAV; see the file COPYING. If not, write to the Free
19: * Software Foundation, 59 Temple Place - Suite 330, Boston, MA
20: * 02111-1307, USA.
21: */
22:
23: package org.skunk.swing.text.syntax;
24:
25: import javax.swing.text.Segment;
26: import javax.swing.text.StyleContext;
27:
28: public interface SyntaxTokenizer {
29: /**
30: * updates the document's style buffer.
31: * The tokenizer determines the correct parse context
32: * from the int parameters.
33: * @param doc the SyntaxDocument upon which to operate
34: * @param offset the offset of a change to the document
35: * @param nInserted the number of inserted characters
36: * @param nRemoved the number of removed characters
37: */
38: void tokenize(SyntaxDocument doc, int offset, int nInserted,
39: int nRemoved);
40: }
41:
42: /* $Log: SyntaxTokenizer.java,v $
43: /* Revision 1.8 2001/01/30 23:03:19 smulloni
44: /* beginning of integration of syntax highlighting into SimpleTextEditor.
45: /*
46: /* Revision 1.7 2001/01/29 22:28:47 smulloni
47: /* syntax highlighting package now uses a custom view for painting the
48: /* highlights. Fixed bug in get(int, int[]) in GappedIntArray.
49: /*
50: /* Revision 1.6 2001/01/20 00:16:07 smulloni
51: /* moved style buffer to SyntaxDocument class. I may move it out again.
52: /* */
|