intial source from http://www.sf.net/projects/wdte
[phpeclipse.git] / net.sourceforge.phpeclipse.xml.core / src / net / sourceforge / phpeclipse / xml / core / parser / IProblem.java
1 /*
2  * Copyright (c) 2004 Christopher Lenz and others.
3  * All rights reserved. This program and the accompanying materials 
4  * are made available under the terms of the Common Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/cpl-v10.html
7  * 
8  * Contributors:
9  *     Christopher Lenz - initial API
10  * 
11  * $Id: IProblem.java,v 1.1 2004-09-02 18:26:55 jsurfer Exp $
12  */
13
14 package net.sourceforge.phpeclipse.xml.core.parser;
15
16 /**
17  * 
18  */
19 public interface IProblem {
20
21         /**
22          * Returns a localized, human-readable message string which describes the
23          * problem.
24          * 
25          * @return the problem message
26          */
27         String getMessage();
28
29         /**
30          * Returns the start position of the problem (inclusive).
31          * 
32          * @return the start position of the problem, or -1 if unknown
33          */
34         int getSourceStart();
35
36         /**
37          * Returns the end position of the problem (inclusive).
38          * 
39          * @return the end position of the problem), or -1 if unknown
40          */
41         int getSourceEnd();
42
43         /**
44          * Returns the line number of the source where the problem begins.
45          * 
46          * @return the line number of the source where the problem begins
47          */
48         int getSourceLineNumber();
49
50         /**
51          * Returns whether the problem is an error.
52          * 
53          * @return <code>true</code> if the problem is an error, <code>false</code>
54          *         otherwise
55          */
56         boolean isError();
57
58         /**
59          * Returns whether the problem is a warning.
60          * 
61          * @return <code>true</code> if the problem is a warning, <code>false</code>
62          *         otherwise
63          */
64         boolean isWarning();
65
66 }