source: other-projects/rsyntax-textarea/src/java/org/fife/ui/rsyntaxtextarea/parser/ParseResult.java@ 25584

Last change on this file since 25584 was 25584, checked in by davidb, 12 years ago

Initial cut an a text edit area for GLI that supports color syntax highlighting

File size: 2.0 KB
Line 
1/*
2 * 07/27/2009
3 *
4 * ParseResult.java - The result of a Parser parsing some section of an
5 * RSyntaxTextArea.
6 *
7 * This library is distributed under a modified BSD license. See the included
8 * RSyntaxTextArea.License.txt file for details.
9 */
10package org.fife.ui.rsyntaxtextarea.parser;
11
12import java.util.List;
13
14
15/**
16 * The result from a {@link Parser}. This contains the section of lines
17 * parsed and any notices for that section.
18 *
19 * @author Robert Futrell
20 * @version 1.0
21 * @see DefaultParseResult
22 * @see ParserNotice
23 */
24public interface ParseResult {
25
26
27 /**
28 * Returns an error that occurred while parsing the document, if any.
29 *
30 * @return The error, or <code>null</code> if the document was
31 * successfully parsed.
32 */
33 public Exception getError();
34
35
36 /**
37 * Returns the first line parsed. All parser implementations should
38 * currently set this to <code>0</code> and parse the entire document.
39 *
40 * @return The first line parsed.
41 * @see #getLastLineParsed()
42 */
43 public int getFirstLineParsed();
44
45
46 /**
47 * Returns the first line parsed. All parser implementations should
48 * currently set this to the document's line count and parse the entire
49 * document.
50 *
51 * @return The last line parsed.
52 * @see #getFirstLineParsed()
53 */
54 public int getLastLineParsed();
55
56
57 /**
58 * Returns the notices for the parsed section.
59 *
60 * @return A list of {@link ParserNotice}s.
61 */
62 public List getNotices();
63
64
65 /**
66 * Returns the parser that generated these notices.
67 *
68 * @return The parser.
69 */
70 public Parser getParser();
71
72
73 /**
74 * Returns the amount of time this parser took to parse the specified
75 * range of text. This is an optional operation; parsers are permitted
76 * to return <code>0</code> for this value.
77 *
78 * @return The parse time, in milliseconds, or <code>0</code> if the
79 * parse time was not recorded.
80 */
81 public long getParseTime();
82
83
84}
Note: See TracBrowser for help on using the repository browser.