intial source from ttp://www.sf.net/projects/wdte
[phpeclipse.git] / archive / net.sourceforge.phpeclipse.css.core / src / net / sourceforge / phpeclipse / css / core / parser / IProblem.java
1 /*
2  * Copyright (c) 2003-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:07:12 jsurfer Exp $
12  */
13
14 package net.sourceforge.phpeclipse.css.core.parser;
15
16 /**
17  * 
18  */
19 public interface IProblem {
20
21         /**
22          * Returns the problem identifier.
23          * 
24          * @return the problem id
25          */
26         String getId();
27
28         /**
29          * Returns a localized, human-readable message string which describes the
30          * problem.
31          * 
32          * @return the problem message
33          */
34         String getMessage();
35
36         /**
37          * Returns the file name in which the problem was found.
38          * 
39          * @return the file name in which the problem was found
40          */
41         String getOriginatingFileName();
42         
43         /**
44          * Returns the end position of the problem (inclusive).
45          * 
46          * @return the end position of the problem), or -1 if unknown
47          */
48         int getSourceEnd();
49
50         /**
51          * Returns the line number of the source where the problem begins.
52          * 
53          * @return the line number of the source where the problem begins
54          */
55         int getSourceLineNumber();
56
57         /**
58          * Returns the start position of the problem (inclusive).
59          * 
60          * @return the start position of the problem, or -1 if unknown
61          */
62         int getSourceStart();
63
64         /**
65          * Returns whether the problem is an error.
66          * 
67          * @return <code>true</code> if the problem is an error, <code>false</code>
68          *         otherwise
69          */
70         boolean isError();
71
72         /**
73          * Returns whether the problem is a warning.
74          * 
75          * @return <code>true</code> if the problem is a warning, <code>false</code>
76          *         otherwise
77          */
78         boolean isWarning();
79
80 }