*/
public void draw(Annotation annotation, GC gc, StyledText textWidget, int offset, int length,
Color color) {
if (length > 0) {
if ((annotation instanceof EclipseAnnotationPeer)) {
AnnotationFS annotationFS = ((EclipseAnnotationPeer) annotation).getAnnotationFS();
if (gc != null) {
Rectangle bounds = textWidget.getTextBounds(offset, offset + length - 1);
gc.setForeground(color);
boolean isDrawOpenBracket = annotationFS.getBegin() == offset;
if (isDrawOpenBracket) {
gc.drawLine(bounds.x, bounds.y + bounds.height - 1, bounds.x + BRACKET_WIDTH, bounds.y
+ bounds.height - 1);
gc.drawLine(bounds.x, bounds.y, bounds.x, bounds.y + bounds.height - 1);
gc.drawLine(bounds.x, bounds.y, bounds.x + BRACKET_WIDTH, bounds.y);
}
boolean isDrawCloseBracket = annotationFS.getEnd() == offset + length;
if (isDrawCloseBracket) {
gc.drawLine(bounds.x + bounds.width, bounds.y + bounds.height - 1, bounds.x
+ bounds.width - BRACKET_WIDTH, bounds.y + bounds.height - 1);
gc.drawLine(bounds.x + bounds.width - 1, bounds.y, bounds.x + bounds.width - 1, bounds.y