IndentGuideDescriptor () { final LogicalPosition pos = myEditor.getCaretModel().getLogicalPosition(); final int column = pos.column; final int line = pos.line; if (column > 0) { for (IndentGuideDescriptor indent : myIndents) { if (column == indent.indentLevel && line >= indent.startLine && line < indent.endLine) { return indent; } } } return null; }