System.out.println("DEBUG:FOUND ELSE2");
    private List findOtherPositionsForEndif(int startLineIndex) {        int level = 0;        this.state.setState(STATE_SEARCH_FOR_ENDIF);                IDocument document = getDocument();        int maxLineIndex = document.getNumberOfLines() - 1;        List positionsOfCorrespondingBlockElements = new LinkedList();                if(startLineIndex < 0 || startLineIndex > maxLineIndex) {            System.out.println("ERROR:BlockMarker.findOtherPositionsForIf(...):Parameter startLineIndex out of bounds.");            return positionsOfCorrespondingBlockElements;        }                int currentLineIndex;        Position directiveAsPosition;        String directiveAsString;                // Advance up the document.        for(currentLineIndex = startLineIndex;currentLineIndex >= 0; currentLineIndex--) {            directiveAsPosition = PolishDocumentUtils.extractDirectiveFromLine(getDocument(),currentLineIndex);                                   if(directiveAsPosition == null){                continue;            }            directiveAsString = PolishDocumentUtils.makeStringFromPosition(getDocument(),directiveAsPosition);//          Use intern to speed comparison up a bit.            directiveAsString = directiveAsString.intern();	                    if(PolishDocumentUtils.isDirectiveInCategory(directiveAsString,IPolishConstants.IF_DIRECTIVES) && level == 0 && this.state.isInState(STATE_SEARCH_FOR_IF)) {	            positionsOfCorrespondingBlockElements.add(directiveAsPosition);	            System.out.println("DEBUG:FOUND IF2");	            break;	        }                        if(PolishDocumentUtils.isDirectiveInCategory(directiveAsString,IPolishConstants.ELSE_DIRECTIVES) && level == 0 && this.state.isInState(STATE_SEARCH_FOR_ELSE)) {	            positionsOfCorrespondingBlockElements.add(directiveAsPosition);//	            this.state.reset();//	            this.state.addState(STATE_SEARCH_FOR_IF);//	            this.state.addState(STATE_SEARCH_FOR_ELSE);	            System.out.println("DEBUG:FOUND ELSE2");	            continue;	        }            if(PolishDocumentUtils.isDirectiveInCategory(directiveAsString,IPolishConstants.ENDIF_DIRECTIVES) && level == 0 && this.state.isInState(STATE_SEARCH_FOR_ENDIF)) {	            positionsOfCorrespondingBlockElements.add(directiveAsPosition);	            System.out.println("DEBUG:FOUND ENDIF2");	            this.state.reset();	            this.state.addState(STATE_SEARCH_FOR_IF);	            this.state.addState(STATE_SEARCH_FOR_ELSE);	            continue;	        }//          We found a nested if block.	        if(PolishDocumentUtils.isDirectiveInCategory(directiveAsString,IPolishConstants.IF_DIRECTIVES) && level != 0) { 	            System.out.println("DEBUG:BlockMarker.findOtherPositionsForEndif(...):levelUp:directiveAsString:"+directiveAsString);	            level = level + 1;	            continue;	        }	        // We found a endif in the wrong level.	        if(PolishDocumentUtils.isDirectiveInCategory(directiveAsString,IPolishConstants.ENDIF_DIRECTIVES) && ! this.state.isInState(STATE_SEARCH_FOR_ENDIF)) {	            System.out.println("DEBUG:BlockMarker.findOtherPositionsForEndif(...):levelDown:directiveAsString:"+directiveAsString);	            level = level - 1;	            continue;	        }        }        return positionsOfCorrespondingBlockElements;    }