public class ValidationProblem extends java.lang.Object implements java.lang.Comparable<ValidationProblem>
Modifier and Type | Class and Description |
---|---|
static class |
ValidationProblem.Severity |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_MARKER_ID
The default marker id for a WikiText validation problem.
|
Constructor and Description |
---|
ValidationProblem(ValidationProblem.Severity severity,
java.lang.String message,
int offset,
int length)
create a validation problem
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(ValidationProblem o2) |
int |
getLength()
the length of the problem in characters
|
java.lang.String |
getMarkerId() |
java.lang.String |
getMessage()
the text message as it is displayed to the user
|
int |
getOffset()
the character offset in the document of the problem
|
ValidationProblem.Severity |
getSeverity() |
void |
setLength(int length) |
void |
setMarkerId(java.lang.String markerId) |
void |
setMessage(java.lang.String message) |
void |
setOffset(int offset) |
void |
setSeverity(ValidationProblem.Severity severity) |
java.lang.String |
toString() |
public static final java.lang.String DEFAULT_MARKER_ID
public ValidationProblem(ValidationProblem.Severity severity, java.lang.String message, int offset, int length)
severity
- a severity indicating the severity of the problemmessage
- the message describing the problemoffset
- the offset into the document that the problem startslength
- the length of the problem, which may be 0java.lang.IllegalArgumentException
- if the severity is invalid, the offset is < 0, the length is < 0, or if no message is providedpublic java.lang.String getMarkerId()
public void setMarkerId(java.lang.String markerId)
public ValidationProblem.Severity getSeverity()
public void setSeverity(ValidationProblem.Severity severity)
severity
- a severitypublic java.lang.String getMessage()
public void setMessage(java.lang.String message)
message
- the text message as it is displayed to the userpublic int getOffset()
public void setOffset(int offset)
public int getLength()
public void setLength(int length)
public java.lang.String toString()
toString
in class java.lang.Object
public int compareTo(ValidationProblem o2)
compareTo
in interface java.lang.Comparable<ValidationProblem>
Copyright © 2007, 2013 David Green and others.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
which accompanies this distribution, and is available at
http://www.eclipse.org/legal/epl-v10.html