Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
242,400 | void () { scrollbar.removeMouseMotionListener(this); scrollbar.removeMouseListener(this); super.uninstallListeners(); } | uninstallListeners |
242,401 | void (@NotNull UISettings uiSettings) { if (!uiSettings.getShowEditorToolTip()) { hideMyEditorPreviewHint(); } setMinMarkHeight(DaemonCodeAnalyzerSettings.getInstance().getErrorStripeMarkMinHeight()); repaintTrafficLightIcon(); repaintVerticalScrollBar(); myTrafficLightPopup.updateVisiblePopup(analyzerStatus); } | uiSettingsChanged |
242,402 | void (@NotNull Graphics g, @NotNull JComponent c, Rectangle thumbBounds) { if (isMacOverlayScrollbar()) { if (!isMirrored()) { super.paintThumb(g, c, thumbBounds); } else { Graphics2D g2d = (Graphics2D)g; AffineTransform old = g2d.getTransform(); AffineTransform tx = AffineTransform.getScaleInstance(-1, 1); tx.translat... | paintThumb |
242,403 | boolean () { return true; } | isThumbTranslucent |
242,404 | int (int value) { if (SystemInfo.isMac || Registry.is("editor.full.width.scrollbar")) return getMinMarkHeight() + JBUIScale.scale(2); return super.getThumbOffset(value); } | getThumbOffset |
242,405 | boolean () { return myEditor.isDarkEnough(); } | isDark |
242,406 | boolean () { return true; } | alwaysPaintThumb |
242,407 | Rectangle (Rectangle baseBounds, boolean thumb) { Rectangle bounds = super.getMacScrollBarBounds(baseBounds, thumb); bounds.width = Math.min(bounds.width, getMaxMacThumbWidth()); int b2 = bounds.width / 2; bounds.x = getThinGap() + getMinMarkHeight() + SCROLLBAR_WIDTH.get() / 2 - b2; return bounds; } | getMacScrollBarBounds |
242,408 | int () { return SCROLLBAR_WIDTH.get() + getThinGap() + getMinMarkHeight(); } | getThickness |
242,409 | void (@NotNull Graphics g, @NotNull JComponent c, @NotNull Rectangle trackBounds) { if (myEditor.isDisposed()) return; if (transparent()) { ReadAction.run(() -> doPaintTrack(g, c, trackBounds)); } else { super.paintTrack(g, c, trackBounds); } } | paintTrack |
242,410 | void (@NotNull Graphics g, @NotNull JComponent c, @NotNull Rectangle bounds) { Rectangle clip = g.getClipBounds().intersection(bounds); if (clip.height == 0) return; Rectangle componentBounds = c.getBounds(); ProperTextRange docRange = ProperTextRange.create(0, componentBounds.height); if (myCachedTrack == null || myCa... | doPaintTrack |
242,411 | void (@NotNull Graphics g, @NotNull Rectangle bounds) { if (transparent()) { Graphics2D g2 = (Graphics2D)g; g2.setComposite(AlphaComposite.getInstance(AlphaComposite.CLEAR)); g.fillRect(bounds.x, bounds.y, bounds.width, bounds.height); g2.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER)); } else { g.set... | paintTrackBasement |
242,412 | Color (Color c) { return isMacOverlayScrollbar() ? super.adjustColor(c) : EditorImpl.adjustThumbColor(super.adjustColor(c), isDark()); } | adjustColor |
242,413 | void (@NotNull Graphics g, int gutterWidth, @NotNull ProperTextRange yRange) { Rectangle clip = new Rectangle(0, yRange.getStartOffset(), gutterWidth, yRange.getLength() + getMinMarkHeight()); paintTrackBasement(g, clip); int startOffset = yPositionToOffset(clip.y - getMinMarkHeight(), true); int endOffset = yPositionT... | repaint |
242,414 | void (@NotNull Graphics g, int startOffset, int endOffset) { Queue<PositionedStripe> thinEnds = new PriorityQueue<>(5, Comparator.comparingInt(o -> o.yEnd)); Queue<PositionedStripe> wideEnds = new PriorityQueue<>(5, Comparator.comparingInt(o -> o.yEnd)); // sorted by layer List<PositionedStripe> thinStripes = new Array... | drawErrorStripeMarkers |
242,415 | int (int ys, @NotNull Queue<? extends PositionedStripe> ends, @NotNull List<PositionedStripe> stripes, @NotNull Graphics g, int yStart) { while (!ends.isEmpty()) { PositionedStripe endingStripe = ends.peek(); if (endingStripe == null || endingStripe.yEnd > ys) break; ends.remove(); // check whether endingStripe got obs... | drawStripesEndingBefore |
242,416 | void (@NotNull Graphics g, boolean thinErrorStripeMark, int yStart, int yEnd, @NotNull Color color) { int paintWidth; int x; if (thinErrorStripeMark) { paintWidth = getMinMarkHeight(); x = isMirrored() ? getThickness() - paintWidth : 0; if (yEnd - yStart < 6) { yStart -= 1; yEnd += yEnd - yStart - 1; } } else { x = isM... | drawSpot |
242,417 | void (@NotNull MouseEvent e) { CommandProcessor.getInstance().executeCommand(myEditor.getProject(), () -> doMouseClicked(e), EditorBundle.message("move.caret.command.name"), DocCommandGroupId.noneGroupId(getDocument()), UndoConfirmationPolicy.DEFAULT, getDocument() ); } | mouseClicked |
242,418 | void (@NotNull MouseEvent e) { } | mousePressed |
242,419 | void (@NotNull MouseEvent e) { } | mouseReleased |
242,420 | int () { return scrollbar.getWidth(); } | getWidth |
242,421 | void (@NotNull MouseEvent e) { IdeFocusManager.getGlobalInstance().doWhenFocusSettlesDown(() -> IdeFocusManager.getGlobalInstance().requestFocus(myEditor.getContentComponent(), true)); int lineCount = getDocument().getLineCount() + myEditor.getSettings().getAdditionalLinesCount(); if (lineCount == 0) { return; } if (e.... | doMouseClicked |
242,422 | void (@NotNull MouseEvent e) { int lineCount = getDocument().getLineCount() + myEditor.getSettings().getAdditionalLinesCount(); if (lineCount == 0) { return; } if (e.getX() > 0 && e.getX() <= getWidth() && showToolTipByMouseMove(e)) { UIUtil.setCursor(scrollbar, Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); return; ... | mouseMoved |
242,423 | void (@NotNull MouseWheelEvent e) { if (myEditorFragmentRenderer.getEditorPreviewHint() == null) { // process wheel event by the parent scroll pane if no code lens MouseEventAdapter.redispatch(e, e.getComponent().getParent()); return; } int units = e.getUnitsToScroll(); if (units == 0) return; // Stop accumulating when... | mouseWheelMoved |
242,424 | void (@NotNull MouseEvent e, boolean checkIfShouldSurvive) { hideMyEditorPreviewHint(); TooltipController tooltipController = TooltipController.getInstance(); if (!checkIfShouldSurvive || !tooltipController.shouldSurvive(e)) { tooltipController.cancelTooltip(ERROR_STRIPE_TOOLTIP_GROUP, e, true); } } | cancelMyToolTips |
242,425 | void (@NotNull MouseEvent e) { } | mouseEntered |
242,426 | void (@NotNull MouseEvent e) { hideMyEditorPreviewHint(); LightweightHint currentHint = getCurrentHint(); if (currentHint != null && !myKeepHint) { closeHintOnMovingMouseAway(currentHint); } } | mouseExited |
242,427 | void (LightweightHint hint) { Disposable disposable = Disposer.newDisposable(); IdeEventQueue.getInstance().addDispatcher(e -> { if (e.getID() == MouseEvent.MOUSE_PRESSED) { myKeepHint = true; Disposer.dispose(disposable); } else if (e.getID() == MouseEvent.MOUSE_MOVED && !hint.isInsideHint(new RelativePoint((MouseEven... | closeHintOnMovingMouseAway |
242,428 | void (@NotNull MouseEvent e) { cancelMyToolTips(e, true); } | mouseDragged |
242,429 | void (@NotNull PopupHandler handler) { if (myHandler != null) { scrollbar.removeMouseListener(myHandler); } myHandler = handler; scrollbar.addMouseListener(handler); } | setPopupHandler |
242,430 | void () { myEditorFragmentRenderer.hideHint(); myRowAdjuster = 0; myWheelAccumulator = 0; myLastVisualLine = 0; } | hideMyEditorPreviewHint |
242,431 | LightweightHint (@NotNull TooltipRenderer tooltipObject, @NotNull HintHint hintHint) { hideMyEditorPreviewHint(); return TooltipController.getInstance().showTooltipByMouseMove(myEditor, hintHint.getTargetPoint(), tooltipObject, myEditor.getVerticalScrollbarOrientation() == EditorEx.VERTICAL_SCROLLBAR_RIGHT, ERROR_STRIP... | showTooltip |
242,432 | void (@NotNull ErrorStripeListener listener, @NotNull Disposable parent) { myErrorStripeMarkersModel.addErrorMarkerListener(listener, parent); } | addErrorMarkerListener |
242,433 | void (@NotNull ProperTextRange yPositions) { if (myDirtyYPositions != WHOLE_DOCUMENT) { int start = Math.max(0, yPositions.getStartOffset() - myEditor.getLineHeight()); int end = myEditorScrollbarTop + myEditorTargetHeight == 0 ? yPositions.getEndOffset() + myEditor.getLineHeight() : Math .min(myEditorScrollbarTop + my... | markDirtied |
242,434 | void (int minMarkHeight) { myMinMarkHeight = Math.min(minMarkHeight, getMaxStripeSize()); } | setMinMarkHeight |
242,435 | boolean () { return getErrorPanel() != null; } | isErrorStripeVisible |
242,436 | TooltipRenderer (@NotNull Collection<? extends RangeHighlighter> highlighters) { ApplicationManager.getApplication().assertIsNonDispatchThread(); LineTooltipRenderer bigRenderer = null; //do not show the same tooltip twice Set<String> tooltips = null; for (RangeHighlighter highlighter : highlighters) { Object tooltipOb... | calcTooltipRenderer |
242,437 | TooltipRenderer (@NotNull String text) { return new LineTooltipRenderer(text, new Object[]{text}); } | calcTooltipRenderer |
242,438 | TooltipRenderer (@NotNull String text, int width) { return new LineTooltipRenderer(text, width, new Object[]{text}); } | calcTooltipRenderer |
242,439 | ProperTextRange (int start, int end) { if (!dimensionsAreValid) { recalcEditorDimensions(); } Document document = myEditor.getDocument(); int startLineNumber = end == -1 ? 0 : offsetToLine(start, document); int editorStartY = myEditor.visualLineToY(startLineNumber); int startY; int editorTargetHeight = Math.max(0, myEd... | offsetsToYPositions |
242,440 | int (int y, boolean beginLine) { if (!dimensionsAreValid) { recalcEditorDimensions(); } int safeY = Math.max(0, y - myEditorScrollbarTop); int editorY; if (myEditorSourceHeight < myEditorTargetHeight) { editorY = safeY; } else { float fraction = Math.max(0, Math.min(1, safeY / (float)myEditorTargetHeight)); editorY = (... | yPositionToOffset |
242,441 | ActionUpdateThread () { return ActionUpdateThread.EDT; } | getActionUpdateThread |
242,442 | JComponent (@NotNull Presentation presentation, @NotNull String place) { return new TrafficLightButton(this, presentation, new EditorToolbarButtonLook(), place, myEditor.getColorsScheme()); } | createCustomComponent |
242,443 | void (@NotNull JComponent component, @NotNull Presentation presentation) { ((TrafficLightButton)component).updateFromPresentation(presentation); } | updateCustomComponent |
242,444 | void (@NotNull AnActionEvent e) { myTrafficLightPopup.hidePopup(); analyzerStatus.getController().toggleProblemsView(); } | actionPerformed |
242,445 | void (@NotNull AnActionEvent e) { Presentation presentation = e.getPresentation(); List<StatusItem> newStatus = analyzerStatus.getExpandedStatus(); Icon newIcon = analyzerStatus.getIcon(); presentation.setVisible(!analyzerStatus.isEmpty()); if (!hasAnalyzed || analyzerStatus.getAnalyzingType() != AnalyzingType.EMPTY) {... | update |
242,446 | void (MouseEvent me) { if (SwingUtilities.isLeftMouseButton(me)) { showInspectionHint(me); } } | mouseClicked |
242,447 | void (MouseEvent me) { DataContext context = ActionToolbar.getDataContextFor(TrafficLightButton.this); AnActionEvent event = AnActionEvent.createFromInputEvent(me, place, presentation, context, false, true); if (ActionUtil.lastUpdateAndCheckDumb(action, event, false)) { ActionUtil.performActionDumbAwareWithCallbacks(ac... | showInspectionHint |
242,448 | void (MouseEvent me) { DefaultActionGroup group = new DefaultActionGroup(); /* TODO: show context menu by right click group.addAll(analyzerStatus.getController().getActions()); group.add(new CompactViewAction()); */ if (0 < group.getChildrenCount()) { JBPopupMenu.showByEvent(me, ActionPlaces.EDITOR_INSPECTIONS_TOOLBAR,... | showContextMenu |
242,449 | void (MouseEvent me) { if (me.isPopupTrigger()) showContextMenu(me); mousePressed = true; repaint(); } | mousePressed |
242,450 | void (MouseEvent me) { if (me.isPopupTrigger()) showContextMenu(me); mousePressed = false; repaint(); } | mouseReleased |
242,451 | void (MouseEvent me) { mouseHover = true; myTrafficLightPopup.scheduleShow(me, analyzerStatus); repaint(); } | mouseEntered |
242,452 | void (MouseEvent me) { mouseHover = false; myTrafficLightPopup.scheduleHide(); repaint(); } | mouseExited |
242,453 | void (Component c, Graphics g, int x, int y, int w, int h) {} | paintBorder |
242,454 | boolean () { return false; } | isBorderOpaque |
242,455 | Insets (Component c) { return showNavigation ? JBUI.insets(2, 2, 2, 0) : JBUI.insets(2); } | getBorderInsets |
242,456 | void (@NotNull Presentation presentation) { boolean newTranslucent = Boolean.TRUE.equals(presentation.getClientProperty(TRANSLUCENT_STATE)); List<StatusItem> newItems = presentation.getClientProperty(EXPANDED_STATUS); if (translucent == newTranslucent && Objects.equals(items, newItems)) { return; } translucent = newTra... | updateFromPresentation |
242,457 | void () { super.addNotify(); addMouseListener(mouseListener); } | addNotify |
242,458 | void () { removeMouseListener(mouseListener); } | removeNotify |
242,459 | void (@NotNull List<StatusItem> status) { removeAll(); setEnabled(!status.isEmpty()); setVisible(!status.isEmpty()); GridBag gc = new GridBag().nextLine(); if (status.size() == 1 && StringUtil.isEmpty(status.get(0).getText())) { add(createStyledLabel(null, status.get(0).getIcon(), SwingConstants.CENTER), gc.next().weig... | updateContents |
242,460 | JLabel (@Nullable @Nls String text, @Nullable Icon icon, int alignment) { JLabel label = new JLabel(text, icon, alignment) { @Override protected void paintComponent(@NotNull Graphics graphics) { Graphics2D g2 = (Graphics2D)graphics.create(); try { float alpha = translucent ? 0.5f : 1.0f; g2.setComposite(AlphaComposite.... | createStyledLabel |
242,461 | void (@NotNull Graphics graphics) { Graphics2D g2 = (Graphics2D)graphics.create(); try { float alpha = translucent ? 0.5f : 1.0f; g2.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, alpha)); super.paintComponent(g2); } finally { g2.dispose(); } } | paintComponent |
242,462 | void (LabelUI ui) { super.setUI(ui); if (!SystemInfo.isWindows) { Font font = getFont(); font = new FontUIResource(font.deriveFont(font.getStyle(), font.getSize() - JBUIScale.scale(2))); // Allow resetting the font by UI setFont(font); } } | setUI |
242,463 | void (Graphics graphics) { int state = mousePressed ? ActionButtonComponent.PUSHED : mouseHover ? ActionButtonComponent.POPPED : ActionButtonComponent.NORMAL; buttonLook.paintBackground(graphics, this, state); } | paintComponent |
242,464 | Dimension () { if (getComponentCount() == 0) { return JBUI.emptySize(); } Dimension size = super.getPreferredSize(); Insets i = getInsets(); size.height = Math.max(getStatusIconSize() + i.top + i.bottom, size.height); size.width = Math.max(getStatusIconSize() + i.left + i.right, size.width); return size; } | getPreferredSize |
242,465 | void (String s, Component component) { actionButtons.add(Pair.pair(component, s)); } | addLayoutComponent |
242,466 | void (Component component) { for (int i = 0; i < actionButtons.size(); i++) { if (Comparing.equal(component, actionButtons.get(i).first)) { actionButtons.remove(i); break; } } } | removeLayoutComponent |
242,467 | Dimension (Container container) { Dimension size = JBUI.emptySize(); for (Pair<Component, String> c : actionButtons) { if (c.first.isVisible()) { Dimension prefSize = c.first.getPreferredSize(); size.height = Math.max(size.height, prefSize.height); } } for (Pair<Component, String> c : actionButtons) { if (c.first.isVis... | preferredLayoutSize |
242,468 | Dimension (Container container) { return preferredLayoutSize(container); } | minimumLayoutSize |
242,469 | void (Container container) { Dimension prefSize = preferredLayoutSize(container); if (prefSize.width > 0 && prefSize.height > 0) { Insets i = container.getInsets(); JBInsets.removeFrom(prefSize, i); int offset = i.left; for (Pair<Component, String> c : actionButtons) { if (c.first.isVisible()) { Dimension cPrefSize = c... | layoutContainer |
242,470 | void (Graphics g, JComponent component, int state) {} | paintBorder |
242,471 | void (Graphics g, JComponent component, Color color) {} | paintBorder |
242,472 | void (Graphics g, JComponent component, @ActionButtonComponent.ButtonState int state) { if (state == ActionButtonComponent.NORMAL) return; Rectangle rect = new Rectangle(component.getSize()); JBInsets.removeFrom(rect, component.getInsets()); EditorColorsScheme scheme = myEditor.getColorsScheme(); Color color = state ==... | paintBackground |
242,473 | void (Graphics g, JComponent component, Color color) { ActionButtonLook.SYSTEM_LOOK.paintBackground(g, component, color); } | paintBackground |
242,474 | void (Graphics g, ActionButtonComponent actionButton, Icon icon, int x, int y) { if (icon != null) { boolean isDark = ColorUtil.isDark(myEditor.getColorsScheme().getDefaultBackground()); super.paintIcon(g, actionButton, IconLoader.getDarkIcon(icon, isDark), x, y); } } | paintIcon |
242,475 | boolean (@NotNull AnActionEvent e) { return !showToolbar; } | isSelected |
242,476 | void (@NotNull AnActionEvent e, boolean state) { showToolbar = !state; EditorSettingsExternalizable.getInstance().setShowInspectionWidget(showToolbar); updateTrafficLightVisibility(); ActionsCollector.getInstance().record(e.getProject(), this, e, null); } | setSelected |
242,477 | void (@NotNull AnActionEvent e) { super.update(e); e.getPresentation().setEnabled(analyzerStatus.getController().isToolbarEnabled()); } | update |
242,478 | ActionUpdateThread () { return ActionUpdateThread.BGT; } | getActionUpdateThread |
242,479 | boolean () { return true; } | isDumbAware |
242,480 | void (@NotNull AnActionEvent e) { IdeFocusManager focusManager = IdeFocusManager.getInstance(myEditor.getProject()); AnActionEvent delegateEvent = AnActionEvent.createFromAnAction(getDelegate(), e.getInputEvent(), ActionPlaces.EDITOR_INSPECTIONS_TOOLBAR, myEditor.getDataContext()); if (focusManager.getFocusOwner() != m... | actionPerformed |
242,481 | EditorMouseHoverPopupControl () { return ApplicationManager.getApplication().getService(EditorMouseHoverPopupControl.class); } | getInstance |
242,482 | void (@NotNull Editor editor) { setTrackingDisabled(editor, true); } | disablePopups |
242,483 | void (@NotNull Editor editor) { setTrackingDisabled(editor, false); } | enablePopups |
242,484 | void (@NotNull Document document) { setTrackingDisabled(document, true); } | disablePopups |
242,485 | void (@NotNull Document document) { setTrackingDisabled(document, false); } | enablePopups |
242,486 | void (@NotNull Project project) { setTrackingDisabled(project, true); } | disablePopups |
242,487 | void (@NotNull Project project) { setTrackingDisabled(project, false); } | enablePopups |
242,488 | void (@NotNull UserDataHolder holder, boolean value) { ThreadingAssertions.assertEventDispatchThread(); Integer userData = holder.getUserData(MOUSE_TRACKING_DISABLED_COUNT); int count = (userData == null ? 0 : userData) + (value ? 1 : -1); if (count < 0) { LOG.warn(new IllegalStateException("Editor mouse hover popups w... | setTrackingDisabled |
242,489 | boolean (@NotNull Editor editor) { ThreadingAssertions.assertEventDispatchThread(); Project project = editor.getProject(); return editor.getUserData(MOUSE_TRACKING_DISABLED_COUNT) != null || editor.getDocument().getUserData(MOUSE_TRACKING_DISABLED_COUNT) != null || project != null && project.getUserData(MOUSE_TRACKING_... | arePopupsDisabled |
242,490 | void (@NotNull Runnable listener) { listeners.add(listener); } | addListener |
242,491 | String () { return EditorBundle.message("combobox.editor.paste.line.copied.from.empty.selection.entire.line.above.caret"); } | toString |
242,492 | String () { return EditorBundle.message("combobox.editor.paste.line.copied.from.empty.selection.at.caret.position"); } | toString |
242,493 | String () { return EditorBundle.message("combobox.editor.paste.line.copied.from.empty.selection.trim.if.middle.line"); } | toString |
242,494 | void () { int startOffset = myEvent.getStartOffset(); int minEndOffset = myEvent.getMandatoryEndOffset(); int maxEndOffset = getEndOffsetUpperEstimate(); SoftWrap lastSoftWrap = null; boolean minWrapOffsetAtFolding = false; int minWrapOffset = -1; int maxWrapOffset = -1; float nonWhitespaceStartX = 0; int nonWhitespace... | generate |
242,495 | SoftWrap (SoftWrap lastSoftWrap, int minWrapOffset, int maxWrapOffset, boolean preferMinOffset, int nonWhitespaceStartOffset, float nonWhitespaceStartX) { int wrapOffset = minWrapOffset >= maxWrapOffset ? minWrapOffset : calcSoftWrapOffset(minWrapOffset, maxWrapOffset, preferMinOffset); int indentInColumns = 1; int ind... | createSoftWrap |
242,496 | int (int minOffset, int maxOffset, boolean preferMinOffset) { if (canBreakBeforeOrAfterCodePoint(Character.codePointAt(myText, maxOffset))) return maxOffset; for (int i = 0, offset = maxOffset; i < BASIC_LOOK_BACK_LENGTH && offset >= minOffset; i++) { int prevOffset = Character.offsetByCodePoints(myText, offset, -1); i... | calcSoftWrapOffset |
242,497 | boolean (int codePoint) { return codePoint == ' ' || codePoint == '\t' || (codePoint >= 0x2f00 && codePoint < 0x10000 /* eastern languages unicode ranges */); } | canBreakBeforeOrAfterCodePoint |
242,498 | int () { int endOffsetUpperEstimate = EditorUtil.getNotFoldedLineEndOffset(myEditor, myEvent.getMandatoryEndOffset()); int line = myDocument.getLineNumber(endOffsetUpperEstimate); if (line < myDocument.getLineCount() - 1) { endOffsetUpperEstimate = myDocument.getLineStartOffset(line + 1); } return endOffsetUpperEstimat... | getEndOffsetUpperEstimate |
242,499 | Placement () { return Placement.AFTER_LINE_END; } | getPlacement |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.