Problem identifying a syntax error found in preprocessing.
| 25 | * Problem identifying a syntax error found in preprocessing. |
| 26 | */ |
| 27 | public class SyntaxProblem extends JavaProblem { |
| 28 | |
| 29 | private final int tabIndex; |
| 30 | private final int lineNumber; |
| 31 | private final String message; |
| 32 | private final int lineStartOffset; |
| 33 | private final int lineStopOffset; |
| 34 | |
| 35 | /** |
| 36 | * Create a new syntax problem. |
| 37 | * |
| 38 | * @param newTabIndex The tab number containing the source with the syntax issue. |
| 39 | * @param newLineNumber The line number within the tab at which the offending code can be found. |
| 40 | * @param newMessage Human readable message describing the issue. |
| 41 | * @param newStartOffset The character index at which the issue starts relative to line. |
| 42 | * @param newStopOffset The character index at which the issue end relative to line. |
| 43 | */ |
| 44 | public SyntaxProblem(int newTabIndex, int newLineNumber, String newMessage, int newStartOffset, |
| 45 | int newStopOffset) { |
| 46 | |
| 47 | super(newMessage, JavaProblem.ERROR, newLineNumber, newLineNumber); |
| 48 | |
| 49 | tabIndex = newTabIndex; |
| 50 | lineNumber = newLineNumber; |
| 51 | message = newMessage; |
| 52 | lineStartOffset = newStartOffset; |
| 53 | lineStopOffset = newStopOffset; |
| 54 | } |
| 55 | |
| 56 | @Override |
| 57 | public boolean isError() { |
| 58 | return true; |
| 59 | } |
| 60 | |
| 61 | @Override |
| 62 | public boolean isWarning() { |
| 63 | return false; |
| 64 | } |
| 65 | |
| 66 | @Override |
| 67 | public int getTabIndex() { |
| 68 | return tabIndex; |
| 69 | } |
| 70 | |
| 71 | @Override |
| 72 | public int getLineNumber() { |
| 73 | return lineNumber; |
| 74 | } |
| 75 | |
| 76 | @Override |
| 77 | public String getMessage() { |
| 78 | return message; |
| 79 | } |
| 80 | |
| 81 | public int getStartOffset() { |
| 82 | return lineStartOffset; |
| 83 | } |
| 84 |
nothing calls this directly
no outgoing calls
no test coverage detected