Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
241,500
FoldRegion (int startOffset, int endOffset, @NotNull String placeholderText) { return null; }
addFoldRegion
241,501
void (@NotNull FoldRegion region) { }
removeFoldRegion
241,502
boolean (int offset) { return false; }
isOffsetCollapsed
241,503
FoldRegion (int offset) { return null; }
getCollapsedRegionAtOffset
241,504
void (@NotNull Runnable operation, boolean allowMovingCaret, boolean keepRelativeCaretPosition) { }
runBatchFoldingOperation
241,505
void (@NotNull Runnable operation, boolean moveCaretFromCollapsedRegion) { }
runBatchFoldingOperation
241,506
Editor () { return myEditor; }
getEditor
241,507
void (final @NotNull SelectionListener listener) { throw new UnsupportedOperationException("Not implemented"); }
addSelectionListener
241,508
void (final @NotNull SelectionListener listener) { throw new UnsupportedOperationException("Not implemented"); }
removeSelectionListener
241,509
void () { EditorCopyPasteHelper.getInstance().copySelectionToClipboard(myEditor); }
copySelectionToClipboard
241,510
void (final @NotNull LogicalPosition blockStart, final @NotNull LogicalPosition blockEnd) { throw new UnsupportedOperationException("Not implemented"); }
setBlockSelection
241,511
TextAttributes () { return null; }
getTextAttributes
241,512
Document () { return myDocument; }
getDocument
241,513
boolean () { return !myTextComponent.isEditable(); }
isViewer
241,514
JComponent () { return myTextComponent; }
getComponent
241,515
JTextComponent () { return myTextComponent; }
getContentComponent
241,516
void (@Nullable Border border) { }
setBorder
241,517
Insets () { return JBInsets.emptyInsets(); }
getInsets
241,518
TextComponentSelectionModel () { return mySelectionModel; }
getSelectionModel
241,519
MarkupModel () { throw new UnsupportedOperationException("Not implemented"); }
getMarkupModel
241,520
FoldingModel () { return myFoldingModel; }
getFoldingModel
241,521
ScrollingModel () { return myScrollingModel; }
getScrollingModel
241,522
CaretModel () { return myCaretModel; }
getCaretModel
241,523
SoftWrapModel () { return mySoftWrapModel; }
getSoftWrapModel
241,524
InlayModel () { return new EmptyInlayModel(); }
getInlayModel
241,525
EditorKind () { return EditorKind.UNTYPED; }
getEditorKind
241,526
EditorSettings () { if (mySettings == null) { mySettings = new SettingsImpl(); } return mySettings; }
getSettings
241,527
EditorColorsScheme () { throw new UnsupportedOperationException("Not implemented"); }
getColorsScheme
241,528
int () { throw new UnsupportedOperationException("Not implemented"); }
getLineHeight
241,529
Point (final @NotNull LogicalPosition pos) { throw new UnsupportedOperationException("Not implemented"); }
logicalPositionToXY
241,530
int (final @NotNull LogicalPosition pos) { if (pos.line >= myDocument.getLineCount()) { return myDocument.getTextLength(); } return myDocument.getLineStartOffset(pos.line) + pos.column; }
logicalPositionToOffset
241,531
VisualPosition (final @NotNull LogicalPosition logicalPos) { return new VisualPosition(logicalPos.line, logicalPos.column); }
logicalToVisualPosition
241,532
Point (final @NotNull VisualPosition visible) { throw new UnsupportedOperationException("Not implemented"); }
visualPositionToXY
241,533
Point2D (@NotNull VisualPosition pos) { throw new UnsupportedOperationException("Not implemented"); }
visualPositionToPoint2D
241,534
LogicalPosition (final @NotNull VisualPosition visiblePos) { return new LogicalPosition(visiblePos.line, visiblePos.column); }
visualToLogicalPosition
241,535
LogicalPosition (final int offset) { int line = myDocument.getLineNumber(offset); final int lineStartOffset = myDocument.getLineStartOffset(line); return new LogicalPosition(line, offset - lineStartOffset); }
offsetToLogicalPosition
241,536
VisualPosition (final int offset) { int line = myDocument.getLineNumber(offset); final int lineStartOffset = myDocument.getLineStartOffset(line); return new VisualPosition(line, offset - lineStartOffset); }
offsetToVisualPosition
241,537
VisualPosition (int offset, boolean leanForward, boolean beforeSoftWrap) { return offsetToVisualPosition(offset); }
offsetToVisualPosition
241,538
LogicalPosition (final @NotNull Point p) { throw new UnsupportedOperationException("Not implemented"); }
xyToLogicalPosition
241,539
VisualPosition (final @NotNull Point p) { throw new UnsupportedOperationException("Not implemented"); }
xyToVisualPosition
241,540
VisualPosition (@NotNull Point2D p) { throw new UnsupportedOperationException("Not implemented"); }
xyToVisualPosition
241,541
void (final @NotNull EditorMouseListener listener) { throw new UnsupportedOperationException("Not implemented"); }
addEditorMouseListener
241,542
void (final @NotNull EditorMouseListener listener) { throw new UnsupportedOperationException("Not implemented"); }
removeEditorMouseListener
241,543
void (final @NotNull EditorMouseMotionListener listener) { throw new UnsupportedOperationException("Not implemented"); }
addEditorMouseMotionListener
241,544
void (final @NotNull EditorMouseMotionListener listener) { throw new UnsupportedOperationException("Not implemented"); }
removeEditorMouseMotionListener
241,545
boolean () { return false; }
isDisposed
241,546
boolean () { return true; }
isInsertMode
241,547
boolean () { return false; }
isColumnMode
241,548
boolean () { return !(myTextComponent instanceof JTextArea); }
isOneLineMode
241,549
EditorGutter () { throw new UnsupportedOperationException("Not implemented"); }
getGutter
241,550
void (final @Nullable JComponent header) { throw new UnsupportedOperationException("Not implemented"); }
setHeaderComponent
241,551
boolean () { return false; }
hasHeaderComponent
241,552
IndentsModel () { return new EmptyIndentsModel(); }
getIndentsModel
241,553
void () { if (!classesLoaded.compareAndSet(false, true)) { return; } var classLoader = TextComponentEditorImpl.class.getClassLoader(); for (var c : Arrays.asList( Border.class, CaretModel.class, Document.class, EditorColorsScheme.class, EditorGutter.class, EditorKind.class, EditorMouseEventArea.class, EditorMouseListen...
ensureRequiredClassesAreLoaded
241,554
boolean (int offset) { return false; }
hasInlineElementAt
241,555
void (boolean enabled) {}
setConsiderCaretPositionOnDocumentUpdates
241,556
void (boolean batchMode, @NotNull Runnable operation) { operation.run(); }
execute
241,557
boolean () { return false; }
isInBatchMode
241,558
void (@NotNull Listener listener, @NotNull Disposable disposable) { }
addListener
241,559
int () { return myTextArea.getLineCount(); }
getLineCount
241,560
int (final int offset) { try { return myTextArea.getLineOfOffset(offset); } catch (BadLocationException e) { throw new RuntimeException(e); } }
getLineNumber
241,561
int (final int line) { try { return myTextArea.getLineStartOffset(line); } catch (BadLocationException e) { throw new RuntimeException(e); } }
getLineStartOffset
241,562
int (final int line) { try { return myTextArea.getLineEndOffset(line) - getLineSeparatorLength(line); } catch (BadLocationException e) { throw new RuntimeException(e); } }
getLineEndOffset
241,563
int (final int line) { if (line == myTextArea.getLineCount()-1) { return 0; } try { int l = 0; String text = getText(); for (int pos = myTextArea.getLineEndOffset(line) - 1; pos >= myTextArea.getLineStartOffset(line); pos--) { if (text.charAt(pos) != '\r' && text.charAt(pos) != '\n') break; l++; } return l; } catch (Ba...
getLineSeparatorLength
241,564
Rectangle () { throw new UnsupportedOperationException("Not implemented"); }
getVisibleArea
241,565
Rectangle () { throw new UnsupportedOperationException("Not implemented"); }
getVisibleAreaOnScrollingFinished
241,566
void (final @NotNull ScrollType scrollType) { final int position = myTextComponent.getCaretPosition(); try { final Rectangle rectangle = myTextComponent.modelToView(position); if (rectangle != null) myTextComponent.scrollRectToVisible(rectangle); } catch (BadLocationException e) { throw new RuntimeException(e); } }
scrollToCaret
241,567
void (final @NotNull LogicalPosition pos, final @NotNull ScrollType scrollType) { throw new UnsupportedOperationException("Not implemented"); }
scrollTo
241,568
void (final @NotNull Runnable action) { throw new UnsupportedOperationException("Not implemented"); }
runActionOnScrollingFinished
241,569
void () { }
disableAnimation
241,570
void () { }
enableAnimation
241,571
int () { throw new UnsupportedOperationException("Not implemented"); }
getVerticalScrollOffset
241,572
int () { throw new UnsupportedOperationException("Not implemented"); }
getHorizontalScrollOffset
241,573
void (final int scrollOffset) { throw new UnsupportedOperationException("Not implemented"); }
scrollVertically
241,574
void (final int scrollOffset) { throw new UnsupportedOperationException("Not implemented"); }
scrollHorizontally
241,575
void (int horizontalOffset, int verticalOffset) { throw new UnsupportedOperationException("Not implemented"); }
scroll
241,576
void (final @NotNull VisibleAreaListener listener) { throw new UnsupportedOperationException("Not implemented"); }
addVisibleAreaListener
241,577
void (final @NotNull VisibleAreaListener listener) { throw new UnsupportedOperationException("Not implemented"); }
removeVisibleAreaListener
241,578
Editor () { return myEditor; }
getEditor
241,579
CaretModel () { return myEditor.getCaretModel(); }
getCaretModel
241,580
boolean () { return true; }
isValid
241,581
void (int columnShift, int lineShift, boolean withSelection, boolean scrollToCaret) { getCaretModel().moveCaretRelatively(columnShift, lineShift, withSelection, false, scrollToCaret); }
moveCaretRelatively
241,582
void (@NotNull LogicalPosition pos) { moveToOffset(myEditor.logicalPositionToOffset(pos), false); }
moveToLogicalPosition
241,583
void (@NotNull VisualPosition pos) { moveToLogicalPosition(myEditor.visualToLogicalPosition(pos)); }
moveToVisualPosition
241,584
void (int offset) { moveToOffset(offset, false); }
moveToOffset
241,585
void (int offset, boolean locateBeforeSoftWrap) { JTextComponent textComponent = getTextComponent(); int targetOffset = Math.min(offset, textComponent.getText().length()); int currentPosition = textComponent.getCaretPosition(); // We try to preserve selection, to match EditorImpl behaviour. // It's only possible though...
moveToOffset
241,586
boolean () { return true; }
isUpToDate
241,587
LogicalPosition () { JTextComponent textComponent = getTextComponent(); int caretPos = textComponent.getCaretPosition(); int line; int lineStart; if (textComponent instanceof JTextArea textArea) { try { line = textArea.getLineOfOffset(caretPos); lineStart = textArea.getLineStartOffset(line); } catch (BadLocationExcepti...
getLogicalPosition
241,588
VisualPosition () { LogicalPosition pos = getLogicalPosition(); return new VisualPosition(pos.line, pos.column); }
getVisualPosition
241,589
int () { return getTextComponent().getCaretPosition(); }
getOffset
241,590
int () { return 0; }
getVisualLineStart
241,591
int () { return 0; }
getVisualLineEnd
241,592
int () { return getTextComponent().getSelectionStart(); }
getSelectionStart
241,593
VisualPosition () { return myEditor.offsetToVisualPosition(getSelectionStart()); }
getSelectionStartPosition
241,594
int () { return getTextComponent().getSelectionEnd(); }
getSelectionEnd
241,595
VisualPosition () { return myEditor.offsetToVisualPosition(getSelectionEnd()); }
getSelectionEndPosition
241,596
int () { JTextComponent textComponent = getTextComponent(); final int caretPosition = textComponent.getCaretPosition(); final int start = textComponent.getSelectionStart(); final int end = textComponent.getSelectionEnd(); return caretPosition == start ? end : start; }
getLeadSelectionOffset
241,597
VisualPosition () { return myEditor.offsetToVisualPosition(getLeadSelectionOffset()); }
getLeadSelectionPosition
241,598
boolean () { return getSelectionStart() != getSelectionEnd(); }
hasSelection
241,599
void (int startOffset, int endOffset) { JTextComponent textComponent = getTextComponent(); if (textComponent.getCaretPosition() == startOffset) { // avoid moving caret (required for correct Ctrl-W operation) textComponent.setCaretPosition(endOffset); textComponent.moveCaretPosition(startOffset); } else { textComponent....
setSelection