Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
241,800 | boolean () { return false; } | isValid |
241,801 | void (boolean greedy) {} | setGreedyToLeft |
241,802 | void (boolean greedy) {} | setGreedyToRight |
241,803 | boolean () { return false; } | isGreedyToRight |
241,804 | boolean () { return false; } | isGreedyToLeft |
241,805 | void () {} | dispose |
241,806 | IndentGuideDescriptor () { return null; } | getCaretIndentGuide |
241,807 | IndentGuideDescriptor (int startLine, int endLine) { return null; } | getDescriptor |
241,808 | void (List<IndentGuideDescriptor> descriptors) { } | assumeIndents |
241,809 | void (@NotNull DocumentEvent e) { myEditor.getInlayModel().myPutMergedIntervalsAtBeginning = intervalStart() == e.getOffset(); super.changedUpdateImpl(e); if (isValid() && DocumentUtil.isInsideSurrogatePair(getDocument(), intervalStart())) { invalidate(); } } | changedUpdateImpl |
241,810 | void (@NotNull DocumentEvent e) { InlayModelImpl inlayModel = myEditor.getInlayModel(); inlayModel.myPutMergedIntervalsAtBeginning = intervalStart() == e.getMoveOffset() + e.getNewLength(); if (DocumentUtil.isInsideSurrogatePair(getDocument(), getOffset())) { inlayModel.myMoveInProgress = true; try { invalidate(); } fi... | onReTarget |
241,811 | void () { if (isValid()) { int offset = getOffset(); List<Inlay<?>> inlays = myEditor.getInlayModel().getInlineElementsInRange(offset, offset); putUserData(ORDER_BEFORE_DISPOSAL, inlays.indexOf(this)); putUserData(ID_BEFORE_DISPOSAL, getId()); } super.dispose(); } | dispose |
241,812 | Placement () { return Placement.INLINE; } | getPlacement |
241,813 | VisualPosition () { int offset = getOffset(); VisualPosition pos = myEditor.offsetToVisualPosition(offset); List<Inlay<?>> inlays = myEditor.getInlayModel().getInlineElementsInRange(offset, offset); int order = inlays.indexOf(this); return new VisualPosition(pos.line, pos.column + order, true); } | getVisualPosition |
241,814 | int () { return myEditor.getLineHeight(); } | getHeightInPixels |
241,815 | InlayProperties () { return new InlayProperties() .relatesToPrecedingText(isRelatedToPrecedingText()) .priority(myPriority); } | getProperties |
241,816 | String () { return "[Inline inlay, offset=" + getOffset() + ", width=" + myWidthInPixels + ", renderer=" + myRenderer + "]" + (isValid() ? "" : "(invalid)"); } | toString |
241,817 | boolean (int codePoint) { try { if (codePoint < 128) return true; if (mySafeCharacters.contains(codePoint)) return true; if (canDisplay(myFont, codePoint, false)) { mySafeCharacters.add(codePoint); return true; } return false; } catch (Exception e) { // JRE has problems working with the font. Just skip. return false; }... | canDisplay |
241,818 | boolean (@NotNull Font font, int codePoint, boolean disableFontFallback) { if (!Character.isValidCodePoint(codePoint)) return false; if (disableFontFallback && SystemInfo.isMac) { int glyphCode = font.createGlyphVector(DEFAULT_CONTEXT, new String(new int[]{codePoint}, 0, 1)).getGlyphCode(0); return (glyphCode & Composi... | canDisplay |
241,819 | Font () { return myFont; } | getFont |
241,820 | int (int codePoint) { final FontMetrics metrics = fontMetrics(); return FontLayoutService.getInstance().charWidth(metrics, codePoint); } | charWidth |
241,821 | float (int codePoint) { FontMetrics metrics = fontMetrics(); return FontLayoutService.getInstance().charWidth2D(metrics, codePoint); } | charWidth2D |
241,822 | FontMetrics (@NotNull Font font, @NotNull FontRenderContext fontRenderContext) { return FontDesignMetrics.getMetrics(font, fontRenderContext); } | getFontMetrics |
241,823 | FontRenderContext (Component component) { if (component == null) { return DEFAULT_CONTEXT; } return component.getFontMetrics(DUMMY_FONT).getFontRenderContext(); } | getFontRenderContext |
241,824 | int () { return (int)(mySize + 0.5); } | getSize |
241,825 | float () { return mySize; } | getSize2D |
241,826 | FontRenderContext () { return myContext; } | getFontRenderContext |
241,827 | boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; FontInfo fontInfo = (FontInfo)o; if (!myFont.equals(fontInfo.myFont)) return false; return true; } | equals |
241,828 | int () { return myFont.hashCode(); } | hashCode |
241,829 | Point (double scale, Point at) { if (myEditor.isDisposed()) return at; VisualPosition magnificationPosition = myEditor.xyToVisualPosition(at); float currentSize = myEditor.getColorsScheme().getEditorFontSize2D(); float defaultFontSize = EditorColorsManager.getInstance().getGlobalScheme().getEditorFontSize2D(); float si... | magnify |
241,830 | void (@NotNull UISettings uiSettings) { UISettingsUtils settingsUtils = UISettingsUtils.with(uiSettings); if (uiSettings.getPresentationMode() && myEditor.getFontSize() != settingsUtils.getPresentationModeFontSize()) { myEditor.setFontSize(settingsUtils.getPresentationModeFontSize()); } } | uiSettingsChanged |
241,831 | void (@NotNull Graphics g) { if (!isEnabled()) { g = new Grayer((Graphics2D)g, getBackground()); } super.paint(g); } | paint |
241,832 | EditorImpl () { return myEditor; } | getEditor |
241,833 | Object (@NotNull String dataId) { if (myEditor.isDisposed()) return null; if (PlatformDataKeys.COPY_PROVIDER.is(dataId)) { // enable copying from editor in renderer mode return myEditor.getCopyProvider(); } if (myEditor.isRendererMode()) return null; if (CommonDataKeys.EDITOR.is(dataId)) { return myEditor; } if (Common... | getData |
241,834 | Color () { return myEditor.getBackgroundColor(); } | getBackground |
241,835 | Dimension () { return myEditor.getPreferredSize(); } | getPreferredSize |
241,836 | void (Cursor cursor) { super.setCursor(cursor); myEditor.myCursorSetExternally = true; if (LOG.isDebugEnabled()) { LOG.debug("Mouse cursor set to " + cursor + " in " + myEditor, new Throwable()); } } | setCursor |
241,837 | void (InputMethodEvent e) { if (EditorImpl.EVENT_LOG.isDebugEnabled()) { EditorImpl.EVENT_LOG.debug(e.toString()); } // Don't dispatch to super first; now that EdditorComponentImpl is a JTextComponent, // this would have the side effect of invoking Swing document machinery which relies // on creating Document positions... | processInputMethodEvent |
241,838 | ActionCallback (String text) { ActionCallback result = new ActionCallback(); EdtInvocationManager.invokeLaterIfNeeded(() -> myEditor.type(text).notify(result)); return result; } | type |
241,839 | Graphics (Graphics graphics) { return JBSwingUtilities.runGlobalCGTransform(this, super.getComponentGraphics(graphics)); } | getComponentGraphics |
241,840 | void (Graphics g) { myEditor.measureTypingLatency(); Graphics2D gg = (Graphics2D)g; if (myEditor.useEditorAntialiasing()) { EditorUIUtil.setupAntialiasing(gg); } else { UISettings.setupAntialiasing(gg); } gg.setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS, UISettings.getEditorFractionalMetricsHint()); AffineTrans... | paintComponent |
241,841 | void (int x, int y, int width, int height) { int topOverhang = Math.max(0, myEditor.myView.getTopOverhang()); int bottomOverhang = Math.max(0, myEditor.myView.getBottomOverhang()); repaint(x, y - topOverhang, width, height + topOverhang + bottomOverhang); } | repaintEditorComponent |
241,842 | Dimension () { return myEditor.getPreferredSize(); } | getPreferredScrollableViewportSize |
241,843 | int (Rectangle visibleRect, int orientation, int direction) { return ReadAction.compute(() -> { if (orientation == SwingConstants.VERTICAL) { return myEditor.getLineHeight(); } // if orientation == SwingConstants.HORIZONTAL return EditorUtil.getSpaceWidth(Font.PLAIN, myEditor); }); } | getScrollableUnitIncrement |
241,844 | int (Rectangle visibleRect, int orientation, int direction) { if (orientation == SwingConstants.VERTICAL) { int lineHeight = myEditor.getLineHeight(); if (direction > 0) { int lineNumber = (visibleRect.y + visibleRect.height) / lineHeight; return lineHeight * lineNumber - visibleRect.y; } else { int lineNumber = (visib... | getScrollableBlockIncrement |
241,845 | boolean () { return getParent() instanceof JViewport && getParent().getWidth() > getPreferredSize().width; } | getScrollableTracksViewportWidth |
241,846 | boolean () { return getParent() instanceof JViewport && getParent().getHeight() > getPreferredSize().height; } | getScrollableTracksViewportHeight |
241,847 | void (@NotNull Map<? super String, ? super String> info) { myEditor.putInfo(info); } | putInfo |
241,848 | boolean () { if ((myEditorSwingCaretUpdatesCourier != null) || (myEditor == null) || (myEditor.isDisposed()) ) { return false; } if (ArrayUtil.isEmpty(getCaretListeners())) { return false; } myEditorSwingCaretUpdatesCourier = EditorSwingCaretUpdatesCourier.create(this); return true; } | setupEditorSwingCaretUpdatesCourierIfRequired |
241,849 | void (javax.swing.event.CaretListener listener) { super.addCaretListener(listener); setupEditorSwingCaretUpdatesCourierIfRequired(); } | addCaretListener |
241,850 | void (javax.swing.event.CaretListener listener) { super.removeCaretListener(listener); } | removeCaretListener |
241,851 | void () { isInsideCaretsAction = true; } | beforeAllCaretsAction |
241,852 | void () { isInsideCaretsAction = false; if (isInsideBulkUpdate()) { return; } final var currentPrimaryCaret = myEditor.getCaretModel().getPrimaryCaret(); primaryCaretPositionPossiblyChanged(currentPrimaryCaret); } | afterAllCaretsAction |
241,853 | void (@NotNull CaretEvent event) { if (isInsideBulkUpdate()) { return; } final Caret changedCaret = event.getCaret(); final Caret currentPrimaryCaret = myEditor.getCaretModel().getPrimaryCaret(); if (changedCaret != currentPrimaryCaret) { // Filter out changes of secondary carets return; } primaryCaretPositionPossiblyC... | caretPositionChanged |
241,854 | void (@NotNull CaretEvent event) { // Adding a caret may cause a change of the primary caret instance if (isInsideBulkUpdate()) { return; } final Caret addedCaret = event.getCaret(); final Caret currentPrimaryCaret = myEditor.getCaretModel().getPrimaryCaret(); if (addedCaret != currentPrimaryCaret) { // The added caret... | caretAdded |
241,855 | void (@NotNull CaretEvent event) { // Removing a caret may cause a switching of the primary caret if (isInsideBulkUpdate()) { return; } final var currentPrimaryCaret = myEditor.getCaretModel().getPrimaryCaret(); if (myLastKnownPrimaryCaret.refersTo(currentPrimaryCaret)) { // The removal of a caret didn't cause a switch... | caretRemoved |
241,856 | void (@NotNull DocumentEvent event) { isInsideBulkDocumentUpdate = true; } | beforeDocumentChange |
241,857 | void (@NotNull Document document) { isInsideBulkDocumentUpdate = false; if (isInsideBulkUpdate()) { return; } final Caret currentPrimaryCaret = myEditor.getCaretModel().getPrimaryCaret(); primaryCaretPositionPossiblyChanged(currentPrimaryCaret); } | afterDocumentChange |
241,858 | boolean () { return isInsideCaretsAction || isInsideBulkDocumentUpdate; } | isInsideBulkUpdate |
241,859 | void (final @NotNull Caret currentPrimaryCaret) { final int currentPrimaryCaretDot = currentPrimaryCaret.getOffset(); final int currentPrimaryCaretMark = currentPrimaryCaret.getLeadSelectionOffset(); if (!myLastKnownPrimaryCaret.refersTo(currentPrimaryCaret)) { myLastKnownPrimaryCaret.clear(); myLastKnownPrimaryCaret =... | primaryCaretPositionPossiblyChanged |
241,860 | int () { return currentPrimaryCaretDot; } | getDot |
241,861 | int () { return currentPrimaryCaretMark; } | getMark |
241,862 | AccessibleContext () { if (accessibleContext == null) { accessibleContext = new EditorAccessibleContextDelegate(); } return accessibleContext; } | getAccessibleContext |
241,863 | void () { setDocument(new EditorAccessibilityDocument()); setCaret(new EditorAccessibilityCaret()); } | setupJTextComponentContext |
241,864 | int () { return myEditor.getCaretModel().getOffset(); } | getCaretPosition |
241,865 | void () { ReadAction.run(() -> { // Don't use the default TextUI, BaseTextUI, which does a lot of unnecessary // work. We do however need to provide a TextUI implementation since some // screen reader support code will invoke it setUI(new EditorAccessibilityTextUI()); UISettings.setupEditorAntialiasing(this); // myEdit... | updateUI |
241,866 | String (MouseEvent event) { // Undo effect of JTextComponent superclass: this is the default JComponent implementation return this.getToolTipText(); } | getToolTipText |
241,867 | void (final DocumentEvent event) { //noinspection deprecation List<javax.swing.event.DocumentListener> listeners = ((EditorAccessibilityDocument)getDocument()).getListeners(); if (listeners == null) { return; } javax.swing.event.DocumentEvent swingEvent = new javax.swing.event.DocumentEvent() { @Override public int get... | fireJTextComponentDocumentChange |
241,868 | int () { return event.getOffset(); } | getOffset |
241,869 | int () { return event.getNewLength(); } | getLength |
241,870 | EventType () { return event.getOldLength() == 0 ? EventType.INSERT : event.getNewLength() == 0 ? EventType.REMOVE : EventType.CHANGE; } | getType |
241,871 | void () { throw new RuntimeException("Not supported for this text implementation"); } | notSupported |
241,872 | int () { return myEditor.getDocument().getTextLength(); } | getLength |
241,873 | void (javax.swing.event.DocumentListener documentListener) { if (myListeners == null) { myListeners = new ArrayList<>(2); } myListeners.add(documentListener); } | addDocumentListener |
241,874 | void (javax.swing.event.DocumentListener documentListener) { if (myListeners != null) { myListeners.remove(documentListener); } } | removeDocumentListener |
241,875 | void (UndoableEditListener undoableEditListener) { } | addUndoableEditListener |
241,876 | void (UndoableEditListener undoableEditListener) { } | removeUndoableEditListener |
241,877 | void (Object o, Object o1) { } | putProperty |
241,878 | void (final int offset, final int length) { editDocumentSafely(offset, length, null); } | remove |
241,879 | void (final int offset, final String text, AttributeSet attributeSet) { editDocumentSafely(offset, 0, text); } | insertString |
241,880 | String (final int offset, final int length) { return ReadAction .compute(() -> myEditor.getDocument().getText(new TextRange(offset, offset + length))); } | getText |
241,881 | void (int offset, int length, Segment segment) { char[] s = getText(offset, length).toCharArray(); segment.array = s; segment.offset = 0; segment.count = s.length; } | getText |
241,882 | Element[] () { return new Element[] { this }; } | getRootElements |
241,883 | Element () { return this; } | getDefaultRootElement |
241,884 | void (Runnable runnable) { ApplicationManager.getApplication().runReadAction(runnable); } | render |
241,885 | int () { return 0; } | getStartOffset |
241,886 | int () { return getLength(); } | getEndOffset |
241,887 | int (int i) { // For the root element this asks for the index of the offset, which // means the line number Document document = myEditor.getDocument(); return document.getLineNumber(i); } | getElementIndex |
241,888 | int () { Document document = myEditor.getDocument(); return document.getLineCount(); } | getElementCount |
241,889 | Element (final int i) { return new Element() { @Override public javax.swing.text.Document getDocument() { return EditorAccessibilityDocument.this; } @Override public Element getParentElement() { return EditorAccessibilityDocument.this; } @Override public @Nullable String getName() { return null; } @Override public @Nul... | getElement |
241,890 | Element () { return EditorAccessibilityDocument.this; } | getParentElement |
241,891 | int () { Document document = myEditor.getDocument(); return document.getLineStartOffset(i); } | getStartOffset |
241,892 | int () { Document document = myEditor.getDocument(); return document.getLineEndOffset(i); } | getEndOffset |
241,893 | int (int i) { return 0; } | getElementIndex |
241,894 | int () { return 0; } | getElementCount |
241,895 | boolean () { return true; } | isLeaf |
241,896 | boolean () { return false; } | isLeaf |
241,897 | String () { return myEditor.getSelectionModel().getSelectedText(true); } | getSelectedText |
241,898 | void (String text) { editDocumentSafely(0, myEditor.getDocument().getTextLength(), text); } | setText |
241,899 | void (final int offset, final int length, final @Nullable String text) { Document document = myEditor.getDocument(); RangeMarker marker = document.createRangeMarker(offset, offset + length); TransactionGuard.submitTransaction(myEditor.getDisposable(), () -> { Project project = myEditor.getProject(); if (!marker.isValid... | editDocumentSafely |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.