| package org.eclipse.papyrus.aceeditor; |
| |
| public class CodeAnnotation { |
| public static enum CodeAnnotationType{ |
| Error, |
| Warning, |
| Information |
| } |
| |
| |
| public int row; |
| public int column; |
| public String text; |
| public CodeAnnotationType type; |
| |
| public CodeAnnotation(int row, int column, String text, CodeAnnotationType type) { |
| super(); |
| this.row = row; |
| this.column = column; |
| this.text = text; |
| this.type = type; |
| } |
| |
| public CodeAnnotation() { |
| super(); |
| } |
| |
| public int getRow() { |
| return row; |
| } |
| |
| public void setRow(int row) { |
| this.row = row; |
| } |
| |
| public int getColumn() { |
| return column; |
| } |
| |
| public void setColumn(int column) { |
| this.column = column; |
| } |
| |
| public String getText() { |
| return text; |
| } |
| |
| public void setText(String text) { |
| this.text = text; |
| } |
| |
| public CodeAnnotationType getType() { |
| return type; |
| } |
| |
| public void setType(CodeAnnotationType type) { |
| this.type = type; |
| } |
| |
| public String toJSLine() { |
| return "{row: " + (row - 1) + ", " + |
| "column: " + (column - 1) + ", " + |
| "text: '" + AceCodeEditor.cleanString(text) + "', " + |
| "type: '" + type.name().toLowerCase() + "'}"; |
| } |
| |
| } |