Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
242,700 | void (boolean show) { myState.setMyShowPlaceholderWhenFocused(show); } | setShowPlaceholderWhenFocused |
242,701 | boolean () { return myState.getMyShowPlaceholderWhenFocused(); } | getShowPlaceholderWhenFocused |
242,702 | Color () { Color color = myScheme.getDefaultBackground(); if (myDocument.isWritable()) { return color; } Color readOnlyColor = myScheme.getColor(EditorColors.READONLY_BACKGROUND_COLOR); return readOnlyColor != null ? readOnlyColor : color; } | getBackgroundIgnoreForced |
242,703 | boolean () { return myInputMethodRequestsHandler != null && (myInputMethodRequestsHandler.composedRangeMarker != null || myInputMethodRequestsHandler.inlayLeft != null || myInputMethodRequestsHandler.inlayRight != null); } | composedTextExists |
242,704 | int (int startOffset, int endOffset) { return ReadAction.compute(() -> myView.getMaxWidthInRange(startOffset, endOffset)); } | getMaxWidthInRange |
242,705 | boolean () { return myState.isPaintSelection() || !isOneLineMode() || IJSwingUtilities.hasFocus(getContentComponent()); } | isPaintSelection |
242,706 | void (boolean paintSelection) { myState.setPaintSelection(paintSelection); } | setPaintSelection |
242,707 | int () { return myView.getAscent(); } | getAscent |
242,708 | int () { return ReadAction.compute(() -> myView.getLineHeight()); } | getLineHeight |
242,709 | int () { return myView.getDescent(); } | getDescent |
242,710 | int () { return myView.getCharHeight(); } | getCharHeight |
242,711 | FontMetrics (@JdkConstants.FontStyle int fontType) { EditorFontType ft; if (fontType == Font.PLAIN) { ft = EditorFontType.PLAIN; } else if (fontType == Font.BOLD) { ft = EditorFontType.BOLD; } else if (fontType == Font.ITALIC) { ft = EditorFontType.ITALIC; } else if (fontType == (Font.BOLD | Font.ITALIC)) { ft = Editor... | getFontMetrics |
242,712 | int () { return isReleased ? 0 : myView.getPreferredHeight(); } | getPreferredHeight |
242,713 | Dimension () { return ReadAction.compute(() -> isReleased ? new Dimension() : Registry.is("idea.true.smooth.scrolling.dynamic.scrollbars") ? new Dimension(getPreferredWidthOfVisibleLines(), myView.getPreferredHeight()) : myView.getPreferredSize()); } | getPreferredSize |
242,714 | int () { Rectangle area = getScrollingModel().getVisibleArea(); VisualPosition begin = xyToVisualPosition(area.getLocation()); VisualPosition end = xyToVisualPosition(new Point(area.x + area.width, area.y + area.height)); return Math.max(myView.getPreferredWidth(begin.line, end.line), getScrollingWidth()); } | getPreferredWidthOfVisibleLines |
242,715 | int () { JScrollBar scrollbar = myScrollPane.getHorizontalScrollBar(); if (scrollbar != null) { BoundedRangeModel model = scrollbar.getModel(); if (model != null) { return model.getValue() + model.getExtent(); } } return 0; } | getScrollingWidth |
242,716 | Dimension () { return ReadAction.compute(() -> isReleased ? new Dimension() : myView.getPreferredSize()); } | getContentSize |
242,717 | JScrollPane () { return myScrollPane; } | getScrollPane |
242,718 | void (@Nullable Border border) { if (border == null) border = JBUI.Borders.empty(); myState.setMyBorder(border); } | setBorder |
242,719 | void (ObservableStateListener.PropertyChangeEvent event) { myScrollPane.setBorder(myState.getMyBorder()); } | borderChanged |
242,720 | Insets () { return ReadAction.compute(() -> myScrollPane.getInsets()); } | getInsets |
242,721 | int (@NotNull LogicalPosition pos) { return ReadAction.compute(() -> myView.logicalPositionToOffset(pos)); } | logicalPositionToOffset |
242,722 | int () { return ReadAction.compute(() -> Math.max(1, getVisibleLogicalLinesCount() + getSoftWrapModel().getSoftWrapsIntroducedLinesNumber())); } | getVisibleLineCount |
242,723 | int () { return getDocument().getLineCount() - myFoldingModel.getTotalNumberOfFoldedLines(); } | getVisibleLogicalLinesCount |
242,724 | VisualPosition (@NotNull LogicalPosition logicalPos) { return ReadAction.compute(() -> myView.logicalToVisualPosition(logicalPos, false)); } | logicalToVisualPosition |
242,725 | LogicalPosition (@NotNull VisualPosition visiblePos) { return ReadAction.compute(() -> myView.visualToLogicalPosition(visiblePos)); } | visualToLogicalPosition |
242,726 | int (int offset) { int textLength = myDocument.getTextLength(); if (textLength == 0) return 0; if (offset > textLength || offset < 0) { throw new IndexOutOfBoundsException("Wrong offset: " + offset + " textLength: " + textLength); } int lineIndex = myDocument.getLineNumber(offset); LOG.assertTrue(lineIndex >= 0 && line... | offsetToLogicalLine |
242,727 | VisualPosition (int x, int y, boolean trimToLineWidth, @Nullable Caret targetCaret) { if (myDocument.getLineCount() == 0) { return new VisualPosition(0, 0); } if (x < 0) { x = 0; } if (y < 0) { y = 0; } int visualLineCount = getVisibleLineCount(); if (yToVisualLine(y) >= visualLineCount) { y = visualLineToY(Math.max(0,... | getTargetPosition |
242,728 | boolean (@NotNull MouseEvent e) { if (!myIgnoreMouseEventsConsecutiveToInitial) { myInitialMouseEvent = null; return false; } if (myInitialMouseEvent != null && (e.getComponent() != myInitialMouseEvent.getComponent() || !e.getPoint().equals(myInitialMouseEvent.getPoint()))) { myIgnoreMouseEventsConsecutiveToInitial = f... | checkIgnore |
242,729 | void (@NotNull MouseEvent e) { if (checkIgnore(e)) return; if (e.getSource() == myGutterComponent && !(myMousePressedEvent != null && myMousePressedEvent.isConsumed())) { myGutterComponent.mouseReleased(e); } if (getMouseEventArea(e) != EditorMouseEventArea.EDITING_AREA || e.getY() < 0 || e.getX() < 0) { return; } Fold... | processMouseReleased |
242,730 | DataContext () { return EditorUtil.getEditorDataContext(this); } | getDataContext |
242,731 | boolean (@NotNull MouseEvent e) { EditorMouseEventArea area = getMouseEventArea(e); return area == EditorMouseEventArea.FOLDING_OUTLINE_AREA && myGutterComponent.convertX(e.getX()) > myGutterComponent.getWhitespaceSeparatorOffset(); } | isInsideGutterWhitespaceArea |
242,732 | EditorMouseEventArea (@NotNull MouseEvent e) { return ReadAction.compute(() -> { if (myGutterComponent != e.getSource()) return EditorMouseEventArea.EDITING_AREA; int x = myGutterComponent.convertX(e.getX()); return myGutterComponent.getEditorMouseAreaByOffset(x); }); } | getMouseEventArea |
242,733 | void () { if (!myEditorComponent.hasFocus()) { IdeFocusManager.getInstance(myProject).requestFocus(myEditorComponent, true); } } | requestFocus |
242,734 | void () { UIUtil.setCursor(myEditorComponent, NamedColorUtil.getTextCursor(getBackgroundColor())); } | resetMousePointer |
242,735 | void (@NotNull MouseEvent e, @Nullable EditorMouseEvent editorMouseEvent) { if (e.getSource() == myGutterComponent) { myGutterComponent.validateMousePointer(e); } else { myGutterComponent.setActiveFoldRegions(Collections.emptyList()); myDefaultCursor = getDefaultCursor(e, editorMouseEvent); updateEditorCursor(); } } | validateMousePointer |
242,736 | void () { Cursor customCursor = getCustomCursor(); if (customCursor == null && myCursorSetExternally && myEditorComponent.isCursorSet()) { Cursor cursor = myEditorComponent.getCursor(); if (cursor != Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR) && cursor != Cursor.getPredefinedCursor(Cursor.TEXT_CURSOR) && cursor ... | updateEditorCursor |
242,737 | Cursor (@NotNull MouseEvent e, @Nullable EditorMouseEvent editorMouseEvent) { Cursor result = null; if (getSelectionModel().hasSelection() && (e.getModifiersEx() & (InputEvent.BUTTON1_DOWN_MASK | InputEvent.BUTTON2_DOWN_MASK)) == 0) { int offset = editorMouseEvent == null ? logicalPositionToOffset(xyToLogicalPosition(e... | getDefaultCursor |
242,738 | void (@NotNull MouseEvent e) { if (myCommandProcessor == null || e.isConsumed() || myMousePressedEvent != null && myMousePressedEvent.isConsumed()) { return; } myCommandProcessor.executeCommand(myProject, () -> mouseDragHandler.mouseDragged(e), "", MOUSE_DRAGGED_COMMAND_GROUP, UndoConfirmationPolicy.DEFAULT, getDocumen... | runMouseDraggedCommand |
242,739 | void (@NotNull MouseEvent e) { if (!SwingUtilities.isLeftMouseButton(e) && !SwingUtilities.isMiddleMouseButton(e) || (Registry.is("editor.disable.drag.with.right.button") && SwingUtilities.isRightMouseButton(e))) { return; } EditorMouseEventArea eventArea = getMouseEventArea(e); if (eventArea == EditorMouseEventArea.AN... | processMouseDragged |
242,740 | VisualPosition (@NotNull VisualPosition pos) { if (!isColumnMode() && pos.column >= EditorUtil.getLastVisualLineColumnNumber(this, pos.line)) { return new VisualPosition(pos.line + 1, 0, false); } return new VisualPosition(pos.line, pos.column + 1, false); } | nextSelectionVisualPosition |
242,741 | VisualPosition (@NotNull VisualPosition pos) { int prevColumn = pos.column - 1; if (prevColumn >= 0) { return new VisualPosition(pos.line, prevColumn, true); } if (isColumnMode() || pos.line == 0) { return new VisualPosition(pos.line, 0, true); } int prevLine = pos.line - 1; return new VisualPosition(prevLine, EditorUt... | prevSelectionVisualPosition |
242,742 | void (int newCaretOffset, int caretShift) { int newSelectionStart; int newSelectionEnd = newCaretOffset; if (caretShift < 0) { if (getMouseSelectionState() == MOUSE_SELECTION_STATE_WORD_SELECTED) { newSelectionEnd = myCaretModel.getWordAtCaretStart(mySettings.isCamelWords() && mySettings.isMouseClickSelectionHonorsCame... | setupSpecialSelectionOnMouseDrag |
242,743 | int (int offset) { if (offset < 0) return 0; if (offset > myDocument.getTextLength()) return myDocument.getTextLength(); return offset; } | validateOffset |
242,744 | void () { if (myDraggedRange != null) { myDraggedRange.dispose(); myDraggedRange = null; } myGutterComponent.myDnDInProgress = false; } | clearDnDContext |
242,745 | void (@NotNull LogicalPosition targetPosition) { List<CaretState> caretStates = new ArrayList<>(myCaretStateBeforeLastPress); if (myRectangularSelectionInProgress) { caretStates.addAll(EditorModificationUtil.calcBlockSelectionState(this, myLastMousePressedLocation, targetPosition)); } else { LogicalPosition selectionSt... | createSelectionTill |
242,746 | Caret () { List<Caret> allCarets = myCaretModel.getAllCarets(); Caret firstCaret = allCarets.get(0); if (firstCaret == myCaretModel.getPrimaryCaret()) { return allCarets.get(allCarets.size() - 1); } return firstCaret; } | getLeadCaret |
242,747 | void (@NotNull MouseEvent mouseDragEvent, @NotNull VisualPosition startPosition, int startOffset, @NotNull VisualPosition endPosition, int endOffset) { mySelectionModel.setSelection(startPosition, startOffset, endPosition, endOffset); if (myCurrentDragIsSubstantial || startOffset != endOffset || !Comparing.equal(startP... | setSelectionAndBlockActions |
242,748 | void (@NotNull MouseEvent mouseDragEvent, @NotNull LogicalPosition startPosition, @NotNull LogicalPosition endPosition) { if (myCurrentDragIsSubstantial || !startPosition.equals(endPosition)) { onSubstantialDrag(mouseDragEvent); } } | blockActionsIfNeeded |
242,749 | void (@NotNull MouseEvent mouseDragEvent) { IdeEventQueue.getInstance().blockNextEvents(mouseDragEvent, IdeEventQueue.BlockMode.ACTIONS); myCurrentDragIsSubstantial = true; } | onSubstantialDrag |
242,750 | void (int blinkPeriod) { mySleepTime = Math.max(blinkPeriod, 10); } | setBlinkPeriod |
242,751 | void (boolean value) { myIsBlinkCaret = value; } | setBlinkCaret |
242,752 | void () { EditorImpl editor = myEditor; if (editor != null) { CaretCursor activeCursor = editor.myCaretCursor; long time = System.currentTimeMillis(); time -= activeCursor.myStartTime; if (time > mySleepTime) { boolean toRepaint = true; if (myIsBlinkCaret) { activeCursor.myIsShown = !activeCursor.myIsShown; } else { to... | run |
242,753 | void () { List<CaretRectangle> caretPoints = new ArrayList<>(); for (Caret caret : getCaretModel().getAllCarets()) { boolean isRtl = caret.isAtRtlLocation(); VisualPosition caretPosition = caret.getVisualPosition(); Point2D pos1 = visualPositionToPoint2D(caretPosition.leanRight(!isRtl)); Point2D pos2 = visualPositionTo... | setCursorPosition |
242,754 | boolean (boolean b) { return ReadAction.compute(() -> { boolean old = myCaretCursor.isActive(); if (b) { myCaretCursor.activate(); } else { myCaretCursor.passivate(); } return old; }); } | setCaretVisible |
242,755 | boolean (boolean enabled) { return ReadAction.compute(() -> { boolean old = myCaretCursor.isEnabled(); myCaretCursor.setEnabled(enabled); return old; }); } | setCaretEnabled |
242,756 | void (@NotNull FocusChangeListener listener) { myFocusListeners.add(listener); } | addFocusListener |
242,757 | void (@NotNull FocusChangeListener listener, @NotNull Disposable parentDisposable) { ContainerUtil.add(listener, myFocusListeners, parentDisposable); } | addFocusListener |
242,758 | boolean () { return myState.isOneLineMode(); } | isOneLineMode |
242,759 | boolean () { return myState.isEmbeddedIntoDialogWrapper(); } | isEmbeddedIntoDialogWrapper |
242,760 | void (boolean b) { assertIsDispatchThread(); ReadAction.run(() -> myState.setEmbeddedIntoDialogWrapper(b)); } | setEmbeddedIntoDialogWrapper |
242,761 | void (ObservableStateListener.PropertyChangeEvent event) { assertIsDispatchThread(); Object newValue = event.getNewValue(); if (!(newValue instanceof Boolean)) { LOG.error("newValue is not Boolean. property name = " + event.getPropertyName() + ", newValue = " + newValue); return; } boolean newValueBoolean = (boolean)ne... | isEmbeddedIntoDialogWrapperChanged |
242,762 | void (boolean isOneLineMode) { myState.setOneLineMode(isOneLineMode); } | setOneLineMode |
242,763 | void (ObservableStateListener.PropertyChangeEvent event) { Object newValue = event.getNewValue(); if (!(newValue instanceof Boolean)) { LOG.error("newValue is not Boolean. property name = " + event.getPropertyName() + ", newValue = " + newValue); return; } mouseDragHandler.setNativeSelectionEnabled((boolean)newValue); ... | isOneLineModeChanged |
242,764 | boolean () { return myEnabled; } | isEnabled |
242,765 | void (boolean enabled) { myEnabled = enabled; } | setEnabled |
242,766 | void () { boolean blink = mySettings.isBlinkCaret(); int blinkPeriod = mySettings.getCaretBlinkPeriod(); synchronized (ourCaretBlinkingCommand) { ourCaretBlinkingCommand.myEditor = EditorImpl.this; ourCaretBlinkingCommand.setBlinkCaret(blink); ourCaretBlinkingCommand.setBlinkPeriod(blinkPeriod); myIsShown = true; ourCa... | activate |
242,767 | boolean () { synchronized (ourCaretBlinkingCommand) { return myIsShown; } } | isActive |
242,768 | void () { synchronized (ourCaretBlinkingCommand) { myIsShown = false; } } | passivate |
242,769 | void (CaretRectangle @NotNull [] locations) { myStartTime = System.currentTimeMillis(); myLocations = locations; } | setPositions |
242,770 | void () { myView.repaintCarets(); } | repaint |
242,771 | boolean () { Component focusOwner = KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner(); Component content = getContentComponent(); for (Component temp = focusOwner; temp != null; temp = (temp instanceof Window) ? null : temp.getParent()) { if (temp == content) { return true; } // check if hosted comp... | isEditorInputFocusOwner |
242,772 | void (int dx, int dy) { myDx = 0; myDy = 0; if (dx > 0) { myXCycles = CYCLE_SIZE / dx + 1; myDx = 1 + dx / CYCLE_SIZE; } else { if (dx < 0) { myXCycles = -CYCLE_SIZE / dx + 1; myDx = -1 + dx / CYCLE_SIZE; } } if (dy > 0) { myYCycles = CYCLE_SIZE / dy + 1; myDy = 1 + dy / CYCLE_SIZE; } else { if (dy < 0) { myYCycles = -... | start |
242,773 | void () { int oldSelectionStart = mySelectionModel.getLeadSelectionOffset(); VisualPosition caretPosition = myMultiSelectionInProgress ? myTargetMultiSelectionPosition : getCaretModel().getVisualPosition(); int column = caretPosition.column; xPassedCycles++; if (xPassedCycles >= myXCycles) { xPassedCycles = 0; column +... | run |
242,774 | void () { if (myTimer != null) { myTimer.stop(); myTimer = null; } } | stop |
242,775 | void (@Nullable JScrollBar bar) { if (bar instanceof OpaqueAwareScrollBar) { bar.setOpaque(((OpaqueAwareScrollBar)bar).myOpaque); } } | updateOpaque |
242,776 | void (boolean opaque) { myOpaque = opaque; super.setOpaque(opaque || shouldScrollBarBeOpaque()); } | setOpaque |
242,777 | boolean () { return !myBackgroundImageSet; } | isOptimizedDrawingEnabled |
242,778 | void (ScrollBarUI ui) { if (myPersistentUI == null) myPersistentUI = ui; super.setUI(myPersistentUI); } | setUI |
242,779 | int (int direction) { JViewport vp = myScrollPane.getViewport(); Rectangle vr = vp.getViewRect(); return myEditorComponent.getScrollableUnitIncrement(vr, SwingConstants.VERTICAL, direction); } | getUnitIncrement |
242,780 | int (int direction) { JViewport vp = myScrollPane.getViewport(); Rectangle vr = vp.getViewRect(); return myEditorComponent.getScrollableBlockIncrement(vr, SwingConstants.VERTICAL, direction); } | getBlockIncrement |
242,781 | void (@Nullable ButtonlessScrollBarUI.ScrollbarRepaintCallback callback) { if (myPersistentUI instanceof ButtonlessScrollBarUI) { ((ButtonlessScrollBarUI)myPersistentUI).registerRepaintCallback(callback); } } | registerRepaintCallback |
242,782 | MyEditable () { MyEditable editable = myEditable; if (editable == null) { myEditable = editable = ReadAction.compute(() -> new MyEditable()); } return editable; } | getViewer |
242,783 | CopyProvider () { return getViewer(); } | getCopyProvider |
242,784 | CutProvider () { return getViewer(); } | getCutProvider |
242,785 | PasteProvider () { return getViewer(); } | getPasteProvider |
242,786 | DeleteProvider () { return getViewer(); } | getDeleteProvider |
242,787 | ActionUpdateThread () { return ActionUpdateThread.EDT; } | getActionUpdateThread |
242,788 | void (@NotNull DataContext dataContext) { executeAction(IdeActions.ACTION_EDITOR_COPY, dataContext); } | performCopy |
242,789 | boolean (@NotNull DataContext dataContext) { return true; } | isCopyEnabled |
242,790 | boolean (@NotNull DataContext dataContext) { Caret caret = dataContext.getData(CommonDataKeys.CARET); return caret != null ? isCaretInsideSelection(caret) : getSelectionModel().hasSelection(true); } | isCopyVisible |
242,791 | void (@NotNull DataContext dataContext) { executeAction(IdeActions.ACTION_EDITOR_CUT, dataContext); } | performCut |
242,792 | boolean (@NotNull DataContext dataContext) { return !isViewer(); } | isCutEnabled |
242,793 | boolean (@NotNull DataContext dataContext) { Caret caret = dataContext.getData(CommonDataKeys.CARET); return isCutEnabled(dataContext) && (caret != null ? isCaretInsideSelection(caret) : getSelectionModel().hasSelection(true)); } | isCutVisible |
242,794 | void (@NotNull DataContext dataContext) { executeAction(IdeActions.ACTION_EDITOR_PASTE, dataContext); } | performPaste |
242,795 | boolean (@NotNull DataContext dataContext) { // Copy of isPasteEnabled. See interface method javadoc. return !isViewer(); } | isPastePossible |
242,796 | boolean (@NotNull DataContext dataContext) { return !isViewer(); } | isPasteEnabled |
242,797 | void (@NotNull DataContext dataContext) { executeAction(IdeActions.ACTION_EDITOR_DELETE, dataContext); } | deleteElement |
242,798 | boolean (@NotNull DataContext dataContext) { return !isViewer(); } | canDeleteElement |
242,799 | void (@NotNull String actionId, @NotNull DataContext dataContext) { EditorAction action = (EditorAction)ActionManager.getInstance().getAction(actionId); if (action != null) { action.actionPerformed(EditorImpl.this, dataContext); } } | executeAction |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.