System.out.println("BlockMarker.updateAnnotations(...):ERROR:cant extract word from position.");
    public void updateAnnotations(ITextSelection selection) {        super.updateAnnotations(selection);//        List positions = findOtherPositionsforElse(selection.getStartLine());//        for (Iterator iterator = positions.iterator(); iterator.hasNext(); ) {//            Position position = (Position) iterator.next();//            System.out.println("DEBUG:BlockMarker.updateAnnotations(...):position:"+makeStringFromPosition(position));//        }//        //        return;                List newPositions = new ArrayList();        Position blockDirectiveAsPosition;                blockDirectiveAsPosition = PolishDocumentUtils.extractDirectiveAtOffset(getDocument(),selection.getOffset());        if(blockDirectiveAsPosition == null) {           return;        }        //        blockDirectiveAsPosition = getDirectiveFromLine(selection.getStartLine());//        if(blockDirectiveAsPosition == null || ! blockDirectiveAsPosition.overlapsWith(selection.getOffset(),selection.getLength())) {//            System.out.println("DEBUG:BlockMarker.updateAnnotations(...):Nothing to do for BlockMarker.updateAnnotations(...).");//            return;//        }                // Search for corresponding directives.        String blockDirectiveAsString = PolishDocumentUtils.makeStringFromPosition(getDocument(),blockDirectiveAsPosition);        blockDirectiveAsString = blockDirectiveAsString.intern();                if(PolishDocumentUtils.isDirectiveInCategory(blockDirectiveAsString,IPolishConstants.IF_DIRECTIVES)) {            newPositions.addAll(findOtherPositionsForIf(selection.getStartLine()));        }        if(PolishDocumentUtils.isDirectiveInCategory(blockDirectiveAsString,IPolishConstants.ELSE_DIRECTIVES)) {            newPositions.addAll(findOtherPositionsforElse(selection.getStartLine()));        }        if(PolishDocumentUtils.isDirectiveInCategory(blockDirectiveAsString,IPolishConstants.ENDIF_DIRECTIVES)) {            newPositions.addAll(findOtherPositionsForEndif(selection.getStartLine()));        }        // Annotate the found positions of corresponding directives.        Position position;        String text;        Annotation annotation;        for(Iterator iterator = newPositions.iterator();iterator.hasNext();) {          position = (Position)iterator.next();          text = PolishDocumentUtils.makeStringFromPosition(getDocument(),position);          if(text.equals("")) {              System.out.println("BlockMarker.updateAnnotations(...):ERROR:cant extract word from position.");              continue;          }          annotation = new Annotation(IPolishConstants.POLISH_ANNOTATION,false,text);          addAnnotation(annotation);          getAnnotationModel().addAnnotation(annotation,position);      }    }