use of com.intellij.diff.util.LineCol in project intellij-community by JetBrains.
the class TwosideTextDiffViewer method getNavigatable.
//
// Misc
//
@Nullable
@Override
protected Navigatable getNavigatable() {
Side side = getCurrentSide();
LineCol position = LineCol.fromCaret(getEditor(side));
Navigatable navigatable = getContent(side).getNavigatable(position);
if (navigatable != null)
return navigatable;
LineCol otherPosition = transferPosition(side, position);
return getContent(side.other()).getNavigatable(otherPosition);
}
use of com.intellij.diff.util.LineCol in project intellij-community by JetBrains.
the class DocumentFragmentContent method getNavigatable.
@Nullable
@Override
public Navigatable getNavigatable(@NotNull LineCol position) {
if (!myRangeMarker.isValid())
return null;
int offset = position.toOffset(getDocument());
int originalOffset = offset + myRangeMarker.getStartOffset();
LineCol originalPosition = LineCol.fromOffset(myOriginal.getDocument(), originalOffset);
return myOriginal.getNavigatable(originalPosition);
}
Aggregations