| org.netbeans.modules.visualweb.insync.ParserAnnotation
ParserAnnotation | public class ParserAnnotation extends Annotation implements PropertyChangeListener(Code) | | A source error; annotation which can be attached to a particular line in a source document.
Based on some similar code in the java module.
|
Constructor Summary | |
public | ParserAnnotation(String message, FileObject fobj, int line, int column) Creates a new annotation. |
Method Summary | |
public void | attachToLineSet(Set lines) Only underline the part of the line that has text on it. | public void | chain(ParserAnnotation anno) Chaining allows multiple annotations to appear on the same line using a single annotation -
with a combined tooltip. | public String | getAnnotationType() Annotation type, which allows the editor to look up annotation type information (defined in
the layer file) such as the icon and highlight type to use for this annotation. | public int | getColumn() Return the column number where the error occurred. | public FileObject | getFileObject() | public Icon | getIcon() | public int | getLine() | public String | getMessage() | public String | getShortDescription() Tooltip shown for this annotation. | protected void | notifyAttached(Annotatable toAnno) Whenever the annotation is attached to the editor, listen for line edits so we can detach the
annotation. | protected void | notifyDetached(Annotatable fromAnno) Whenever the annotation is detached from the editor we can stop listening for line edits. | public void | propertyChange(PropertyChangeEvent ev) When the line containing the annotation is edited, remove the annotation immediately. | public String | toString() |
ParserAnnotation | public ParserAnnotation(String message, FileObject fobj, int line, int column)(Code) | | Creates a new annotation.
Parameters: message - The error message produced by the compiler/parser Parameters: dataObject - The data object this error is associated with Parameters: line - The line number where the error occurred Parameters: column - The column number on the line where the error occurred |
attachToLineSet | public void attachToLineSet(Set lines)(Code) | | Only underline the part of the line that has text on it.
|
chain | public void chain(ParserAnnotation anno)(Code) | | Chaining allows multiple annotations to appear on the same line using a single annotation -
with a combined tooltip. This is useful since especially with java, it's not unlikely to
encounter many errors on the same line, and you don't want a separate glyph/underline for
each one, instead we have a single one.
|
getAnnotationType | public String getAnnotationType()(Code) | | Annotation type, which allows the editor to look up annotation type information (defined in
the layer file) such as the icon and highlight type to use for this annotation. See
parser_annotation.xml for the definition of this type.
|
getColumn | public int getColumn()(Code) | | Return the column number where the error occurred.
the column number, or 0 if none is known. |
getFileObject | public FileObject getFileObject()(Code) | | Return the data object whose source file this error is associated with
the data object associated with this error |
getIcon | public Icon getIcon()(Code) | | Return a suitable icon for this error
an icon |
getLine | public int getLine()(Code) | | Return the line number where the error occurred
the line number - 1-based. |
getMessage | public String getMessage()(Code) | | Return the error message reported by the compiler/parser
the localized error message |
getShortDescription | public String getShortDescription()(Code) | | Tooltip shown for this annotation. If this annotation is chained, return a tooltip showing
the descriptions for all the chained annotations.
the parser error message |
notifyAttached | protected void notifyAttached(Annotatable toAnno)(Code) | | Whenever the annotation is attached to the editor, listen for line edits so we can detach the
annotation.
|
notifyDetached | protected void notifyDetached(Annotatable fromAnno)(Code) | | Whenever the annotation is detached from the editor we can stop listening for line edits.
|
propertyChange | public void propertyChange(PropertyChangeEvent ev)(Code) | | When the line containing the annotation is edited, remove the annotation immediately.
|
|
|