use of com.intellij.openapi.editor.IndentGuideDescriptor in project intellij-community by JetBrains.
the class IndentsModelImpl method assumeIndents.
@Override
public void assumeIndents(@NotNull List<IndentGuideDescriptor> descriptors) {
myIndents = descriptors;
myIndentsByLines.clear();
for (IndentGuideDescriptor descriptor : myIndents) {
myIndentsByLines.put(new IntPair(descriptor.startLine, descriptor.endLine), descriptor);
}
}
use of com.intellij.openapi.editor.IndentGuideDescriptor in project intellij-community by JetBrains.
the class IndentsModelImpl method getCaretIndentGuide.
@Override
public IndentGuideDescriptor getCaretIndentGuide() {
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;
}
Aggregations