Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
284,700
void (SingleRowPassInfo data) { if (data.requiredLength > data.toFitLength) { data.moreRect = getStrategy().getMoreRect(data); } }
layoutMoreButton
284,701
boolean (SingleRowPassInfo data, TabLabel label, int length) { if (data.requiredLength > data.toFitLength && !(label.isPinned() && TabLayout.showPinnedTabsSeparately())) { length = getStrategy().getLengthIncrement(label.getPreferredSize()); int moreRectSize = getMoreRectAxisSize(); if (data.entryPointAxisSize == 0) { I...
applyTabLayout
284,702
boolean (@NotNull TabInfo info) { TabLabel label = myTabs.getInfoToLabel().get(info); Rectangle bounds = label.getBounds(); int deadzone = JBUI.scale(DEADZONE_FOR_DECLARE_TAB_HIDDEN); return getStrategy().getMinPosition(bounds) < -deadzone || bounds.width < label.getPreferredSize().width - deadzone || bounds.height < l...
isTabHidden
284,703
int () { if (ExperimentalUI.isNewUI() && myTabs.getPosition().isSide()) { return 0; } return getStrategy().getMoreRectAxisSize(); }
getMoreRectAxisSize
284,704
boolean () { return true; }
isScrollable
284,705
boolean () { return myWithScrollBar; }
isWithScrollBar
284,706
void (SingleRowPassInfo data) { data.requiredLength = myTabs.getWidth(); data.toLayout.addAll(data.myVisibleInfos); }
recomputeToLayout
284,707
boolean (SingleRowPassInfo data, TabLabel label, int length) { int tabCount = data.toLayout.size(); if (tabCount > 0) { Rectangle bounds = getStrategy().getLayoutRect(data, data.position, length); int tabsWidth = myTabs.getWidth(); bounds.width = tabsWidth / tabCount; if (myTabs.getIndexOf(label.getInfo()) == myTabs.ge...
applyTabLayout
284,708
int (Point point) { Component component = myTabs.getComponentAt(point); if (component instanceof TabLabel label && lastSingRowLayout != null) { return lastSingRowLayout.myVisibleInfos.indexOf(label.getInfo()); } return -1; }
getDropIndexFor
284,709
int (@NotNull Point point) { return -1; }
getDropSideFor
284,710
boolean (@NotNull TabLabel tabLabel, int deltaX, int deltaY) { Rectangle bounds = tabLabel.getBounds(); if (bounds.x + bounds.width + deltaX < 0 || bounds.x + bounds.width > tabLabel.getParent().getWidth()) return true; return Math.abs(deltaY) > tabLabel.getHeight(); }
isDragOut
284,711
Rectangle (final SingleRowPassInfo data, final int position, final int length) { return getLayoutRec(data, position, getFixedPosition(data), length, getFixedFitLength(data)); }
getLayoutRect
284,712
boolean () { return false; }
isSideComponentOnTabs
284,713
boolean () { return true; }
isToCenterTextWhenStretched
284,714
boolean (TabLabel tabLabel, int deltaX, int deltaY) { Rectangle bounds = tabLabel.getBounds(); if (bounds.x + bounds.width + deltaX < 0 || bounds.x + bounds.width > tabLabel.getParent().getWidth()) return true; return Math.abs(deltaY) > tabLabel.getHeight() * TabLayout.getDragOutMultiplier(); }
isDragOut
284,715
int () { return myTabs.getMoreToolbarPreferredSize().width; }
getMoreRectAxisSize
284,716
int () { return myTabs.getEntryPointPreferredSize().width; }
getEntryPointAxisSize
284,717
int (final SingleRowPassInfo data) { JComponent hToolbar = data.hToolbar.get(); int length; if (hToolbar != null) { length = myTabs.getWidth() - data.insets.left - data.insets.right - hToolbar.getMinimumSize().width; } else { length = myTabs.getWidth() - data.insets.left - data.insets.right; } length += getStartPositio...
getToFitLength
284,718
int (final Dimension labelPrefSize) { return myTabs.isEditorTabs() ? Math.max(labelPrefSize.width, MIN_TAB_WIDTH) : labelPrefSize.width; }
getLengthIncrement
284,719
int () { return 0; }
getAdditionalLength
284,720
int (Rectangle bounds) { return (int)bounds.getX(); }
getMinPosition
284,721
int (final Rectangle bounds) { return (int)bounds.getMaxX(); }
getMaxPosition
284,722
int (final SingleRowPassInfo data) { return myTabs.getHeaderFitSize().height; }
getFixedFitLength
284,723
Rectangle (final SingleRowPassInfo data, final int position, final int fixedPos, final int length, final int fixedFitLength) { return new Rectangle(position, fixedPos, length, fixedFitLength); }
getLayoutRec
284,724
int (final SingleRowPassInfo data) { return data.insets.left; }
getStartPosition
284,725
boolean () { return true; }
drawPartialOverflowTabs
284,726
boolean () { return !myTabs.isSideComponentVertical() && myTabs.isSideComponentOnTabs(); }
isSideComponentOnTabs
284,727
ShapeTransform (Rectangle labelRec) { return new ShapeTransform.Top(labelRec); }
createShapeTransform
284,728
int (final SingleRowPassInfo data) { return data.insets.top; }
getFixedPosition
284,729
Rectangle (SingleRowPassInfo data) { int x; if (myTabs.isEditorTabs()) { x = data.layoutSize.width - myTabs.getActionsInsets().right - data.entryPointAxisSize; } else { x = data.position; } return new Rectangle(x, 1, data.entryPointAxisSize, myTabs.getHeaderFitSize().height); }
getEntryPointRect
284,730
Rectangle (final SingleRowPassInfo data) { int x; if (myTabs.isEditorTabs()) { x = data.layoutSize.width - myTabs.getActionsInsets().right - data.moreRectAxisSize; } else { x = data.position; } x -= data.entryPointAxisSize; return new Rectangle(x, 1, data.moreRectAxisSize, myTabs.getHeaderFitSize().height); }
getMoreRect
284,731
Rectangle (SingleRowPassInfo data) { return new Rectangle(0, 0, myTabs.getTitleWrapper().getPreferredSize().width, myTabs.getHeaderFitSize().height); }
getTitleRect
284,732
void (SingleRowPassInfo data) { if (myTabs.isHideTabs()) { myTabs.layoutComp(data, 0, 0, 0, 0); } else { JComponent vToolbar = data.vToolbar.get(); final int vToolbarWidth = vToolbar != null ? vToolbar.getPreferredSize().width : 0; final int vSeparatorWidth = vToolbarWidth > 0 ? myTabs.separatorWidth : 0; final int x =...
layoutComp
284,733
void (SingleRowPassInfo data) { if (myTabs.isHideTabs()) { myTabs.layoutComp(data, 0, 0, 0, 0); } else { myTabs.layoutComp(data, 0, 0, 0, -(myTabs.getHeaderFitSize().height)); } }
layoutComp
284,734
int (final SingleRowPassInfo data) { return myTabs.getSize().height - data.insets.bottom - myTabs.getHeaderFitSize().height; }
getFixedPosition
284,735
Rectangle (SingleRowPassInfo data) { int x; if (myTabs.isEditorTabs()) { x = data.layoutSize.width - myTabs.getActionsInsets().right - data.entryPointAxisSize; } else { x = data.position; } return new Rectangle(x, getFixedPosition(data), data.entryPointAxisSize, myTabs.getHeaderFitSize().height); }
getEntryPointRect
284,736
Rectangle (final SingleRowPassInfo data) { int x; if (myTabs.isEditorTabs()) { x = data.layoutSize.width - myTabs.getActionsInsets().right - data.moreRectAxisSize; } else { x = data.position; } x -= data.entryPointAxisSize; return new Rectangle(x, getFixedPosition(data), data.moreRectAxisSize, myTabs.getHeaderFitSize()...
getMoreRect
284,737
Rectangle (SingleRowPassInfo data) { return new Rectangle(0, getFixedPosition(data), myTabs.getTitleWrapper().getPreferredSize().width, myTabs.getHeaderFitSize().height); }
getTitleRect
284,738
ShapeTransform (Rectangle labelRec) { return new ShapeTransform.Bottom(labelRec); }
createShapeTransform
284,739
boolean (TabLabel tabLabel, int deltaX, int deltaY) { Rectangle bounds = tabLabel.getBounds(); if (bounds.y + bounds.height + deltaX < 0 || bounds.y + bounds.height > tabLabel.getParent().getHeight()) return true; return Math.abs(deltaX) > tabLabel.getWidth() * TabLayout.getDragOutMultiplier(); }
isDragOut
284,740
boolean () { return false; }
isToCenterTextWhenStretched
284,741
int (final SingleRowPassInfo data) { return data.insets.top; }
getStartPosition
284,742
int (final SingleRowPassInfo data) { int length = myTabs.getHeight() - data.insets.top - data.insets.bottom; if (!ExperimentalUI.isNewUI()) { int entryPointHeight = data.entryPointAxisSize; Insets toolbarInsets = myTabs.getActionsInsets(); int insets = toolbarInsets.top + toolbarInsets.bottom; length -= (entryPointHeig...
getToFitLength
284,743
int (final Dimension labelPrefSize) { return labelPrefSize.height; }
getLengthIncrement
284,744
int () { return ExperimentalUI.isNewUI() ? JBUI.scale(32) : 0; }
getAdditionalLength
284,745
int (Rectangle bounds) { return (int) bounds.getMinY(); }
getMinPosition
284,746
int (final Rectangle bounds) { return (int)bounds.getMaxY(); }
getMaxPosition
284,747
int (final SingleRowPassInfo data) { return myTabs.getHeaderFitSize().width; }
getFixedFitLength
284,748
Rectangle (final SingleRowPassInfo data, final int position, final int fixedPos, final int length, final int fixedFitLength) { Rectangle baseRect = new Rectangle(fixedPos, position, fixedFitLength, length); if (!ExperimentalUI.isNewUI()) { return baseRect; } Rectangle rect = myTabs.getMoreToolbar().getComponent().isVis...
getLayoutRec
284,749
boolean () { return ExperimentalUI.isNewUI(); }
drawPartialOverflowTabs
284,750
void (SingleRowPassInfo data) { if (myTabs.isHideTabs()) { myTabs.layoutComp(data, 0, 0, 0, 0); } else { myTabs.layoutComp(data, myTabs.getHeaderFitSize().width, 0, 0, 0); } }
layoutComp
284,751
ShapeTransform (Rectangle labelRec) { return new ShapeTransform.Left(labelRec); }
createShapeTransform
284,752
Rectangle (SingleRowPassInfo data) { return new Rectangle(0, 0, myTabs.getHeaderFitSize().width, myTabs.getTitleWrapper().getPreferredSize().height); }
getTitleRect
284,753
int (final SingleRowPassInfo data) { return data.insets.left; }
getFixedPosition
284,754
Rectangle (SingleRowPassInfo data) { Insets insets = myTabs.getActionsInsets(); Dimension entryPointSize = myTabs.getEntryPointPreferredSize(); if (ExperimentalUI.isNewUI()) { return new Rectangle(myTabs.getHeaderFitSize().width - entryPointSize.width - data.insets.right - insets.right - 1, myTabs.getHeight() - entryPo...
getEntryPointRect
284,755
Rectangle (final SingleRowPassInfo data) { Dimension entryPointSize = myTabs.getEntryPointPreferredSize(); Dimension moreToolbarSize = myTabs.getMoreToolbarPreferredSize(); Insets insets = myTabs.getActionsInsets(); if (ExperimentalUI.isNewUI()) { return new Rectangle(myTabs.getHeaderFitSize().width - entryPointSize.wi...
getMoreRect
284,756
void (SingleRowPassInfo data) { if (myTabs.isHideTabs()) { myTabs.layoutComp(data, 0, 0, 0, 0); } else { myTabs.layoutComp(data, 0, 0, -(myTabs.getHeaderFitSize().width), 0); } }
layoutComp
284,757
ShapeTransform (Rectangle labelRec) { return new ShapeTransform.Right(labelRec); }
createShapeTransform
284,758
int (SingleRowPassInfo data) { return data.layoutSize.width - myTabs.getHeaderFitSize().width - data.insets.right; }
getFixedPosition
284,759
Rectangle (SingleRowPassInfo data) { Dimension entryPointSize = myTabs.getEntryPointPreferredSize(); Insets insets = myTabs.getActionsInsets(); if (ExperimentalUI.isNewUI()) { return new Rectangle(data.layoutSize.width - entryPointSize.width - insets.right, myTabs.getHeight() - entryPointSize.height - data.insets.botto...
getEntryPointRect
284,760
Rectangle (SingleRowPassInfo data) { Dimension entryPointSize = myTabs.getEntryPointPreferredSize(); Dimension moreToolbarSize = myTabs.getMoreToolbarPreferredSize(); Insets insets = myTabs.getActionsInsets(); if (ExperimentalUI.isNewUI()) { return new Rectangle(data.layoutSize.width - moreToolbarSize.width - entryPoin...
getMoreRect
284,761
Rectangle (SingleRowPassInfo data) { return new Rectangle(data.layoutSize.width - myTabs.getHeaderFitSize().width, 0, myTabs.getHeaderFitSize().width, myTabs.getTitleWrapper().getPreferredSize().height); }
getTitleRect
284,762
ActionUpdateThread () { return ActionUpdateThread.BGT; }
getActionUpdateThread
284,763
void (@NotNull AnActionEvent e) { QuickActionProvider quickActionProvider = e.getData(QuickActionProvider.KEY); if (quickActionProvider == null) { e.getPresentation().setEnabled(false); return; } List<AnAction> actions = quickActionProvider.getActions(true); e.getPresentation().setEnabled(!actions.isEmpty()); }
update
284,764
void (@NotNull AnActionEvent e) { QuickActionProvider provider = e.getRequiredData(QuickActionProvider.KEY); List<AnAction> actions = provider.getActions(true); DefaultActionGroup group = new DefaultActionGroup(actions); group.addSeparator(); JComponent component = provider.getComponent(); if (component != null && !pro...
actionPerformed
284,765
void (@NotNull Graphics2D g, int x, int y, int width, int height, Font font) { EffectPainter2D.LINE_UNDERSCORE.paint(g, x, y, width, height, font); }
paint
284,766
void (@NotNull Graphics2D g, int x, int y, int width, int height, Font font) { EffectPainter2D.BOLD_LINE_UNDERSCORE.paint(g, x, y, width, height, font); }
paint
284,767
void (@NotNull Graphics2D g, int x, int y, int width, int height, Font font) { EffectPainter2D.BOLD_DOTTED_UNDERSCORE.paint(g, x, y, width, height, font); }
paint
284,768
void (@NotNull Graphics2D g, int x, int y, int width, int height, Font font) { EffectPainter2D.WAVE_UNDERSCORE.paint(g, x, y, width, height, font); }
paint
284,769
void (@NotNull Graphics2D g, int x, int y, int width, int height, Font font) { EffectPainter2D.STRIKE_THROUGH.paint(g, x, y, width, height, font); }
paint
284,770
void (@NotNull Graphics2D g, double x, double y, double width, double height, Font font) { if (!Registry.is("ide.text.effect.new")) { LinePainter2D.paint(g, x, y + 1, x + width, y + 1); } else { paintUnderline(g, x, y, width, height, font, 1, this); } }
paint
284,771
void (@NotNull Graphics2D g, double x, double y, double width, double height, Font font) { if (!Registry.is("ide.text.effect.new")) { int h = JBUIScale.scale(Registry.intValue("editor.bold.underline.height", 2)); RectanglePainter2D.FILL.paint(g, x, y, width, h); } else { paintUnderline(g, x, y, width, height, font, 2, ...
paint
284,772
void (@NotNull Graphics2D g, double x, double y, double width, double height, Font font) { paintUnderline(g, x, y, width, height, font, 2, this); }
paint
284,773
void (@NotNull Graphics2D g, double x, double y, double width, double height, Font font) { if (!Registry.is("ide.text.effect.new")) { WavePainter2D.forColor(g.getColor()).paint(g, x, x + width, y + height); } else if (Registry.is("ide.text.effect.new.metrics")) { paintUnderline(g, x, y, width, height, font, 3, this); }...
paint
284,774
void (@NotNull Graphics2D g, double x, double y, double width, double height, Font font) { if (width > 0 && height > 0) { if (!Registry.is("ide.text.effect.new.metrics")) { drawLineCentered(g, x, y - height, width, height, 1, this); } else { if (font == null) font = g.getFont(); LineMetrics metrics = font.getLineMetric...
paint
284,775
double (double height) { return height > 7 && Registry.is("ide.text.effect.new.scale") ? height / 2 : 3; }
getMaxHeight
284,776
void (Graphics2D g, double x, double y, double width, double height, Font font, double thickness, EffectPainter2D painter) { if (width > 0 && height > 0) { if (Registry.is("ide.text.effect.new.metrics")) { if (font == null) font = g.getFont(); RoundingMode roundingMode = !JreHiDpiUtil.isJreHiDPIEnabled() || painter != ...
paintUnderline
284,777
double (double fontMetricsThickness, @NotNull Font font) { return maybeScaleFontMetricsThickness(fontMetricsThickness, font); }
maybeScaleFontMetricsThickness_TestOnly
284,778
double (double fontMetricsThickness, @NotNull Font font) { float fontScale = JBUIScale.getFontScale(font.getSize2D()); float normalizedFontScale = font.getSize2D() / UISettings.getDefFontSize(); if (normalizedFontScale > 1) { // k==1.0 with normalizedFontScale==1.0, k->0.5 fast enough with normalizedFontScale increasin...
maybeScaleFontMetricsThickness
284,779
void (Graphics2D g, double x, double y, double width, double height, double thickness, EffectPainter2D painter) { double offset = height - thickness; if (offset > 0) { y += offset / 2; height = thickness; } drawLine(g, x, y, width, height, painter); }
drawLineCentered
284,780
void (Graphics2D g, double x, double y, double width, double height, EffectPainter2D painter) { if (painter == BOLD_DOTTED_UNDERSCORE) { double dx = (x % height + height) % height; double w = width + dx; double dw = (w % height + height) % height; Cached.BOLD_DOTTED_UNDERSCORE.paint(g, x - dx, y, dw == 0 ? w : w - dw +...
drawLine
284,781
void (@NotNull Graphics2D g, double x, double y, double width, double height, Paint paint) { if (paint == null) paint = g.getPaint(); g = (Graphics2D)g.create(); g.translate(x, y); g.clip(new Rectangle2D.Double(0, 0, width, height)); g.setComposite(AlphaComposite.SrcOver); BufferedImage image = paint instanceof Color ?...
paint
284,782
PopupState<JBPopup> () { return new JBPopupState(); }
forPopup
284,783
PopupState<JPopupMenu> () { return new JPopupMenuState(); }
forPopupMenu
284,784
PopupState<Balloon> () { return new BalloonState(); }
forBalloon
284,785
void (@NotNull Popup popup) { hidePopup(); addListener(popup); reference = new WeakReference<>(popup); }
prepareToShow
284,786
boolean () { if (hiddenLongEnough) return false; hiddenLongEnough = true; return (System.currentTimeMillis() - timeHiddenAt) < intValue("ide.popup.hide.show.threshold", 200); }
isRecentlyHidden
284,787
boolean () { return !isShowing(); }
isHidden
284,788
boolean () { Popup popup = getPopup(); return popup != null && isShowing(popup); }
isShowing
284,789
void () { Popup popup = getPopup(); if (popup != null) hide(popup); reference = null; }
hidePopup
284,790
void (@NotNull LightweightWindowEvent event) { onHide(); }
onClosed
284,791
void (PopupMenuEvent event) { }
popupMenuWillBecomeVisible
284,792
void (PopupMenuEvent event) { onHide(); }
popupMenuWillBecomeInvisible
284,793
void (PopupMenuEvent event) { }
popupMenuCanceled
284,794
void (@NotNull LightweightWindowEvent event) { onHide(); }
onClosed
284,795
void (@NotNull JComponent component) { HintUpdateSupply supply = getSupply(component); if (supply != null) supply.hideHint(); }
hideHint
284,796
void (@NotNull JComponent component) { installHintUpdateSupply(component, o -> o instanceof PsiElement ? (PsiElement)o : null); }
installSimpleHintUpdateSupply
284,797
void (@NotNull JComponent component) { installHintUpdateSupply(component, o -> o instanceof PsiElement ? (PsiElement)o : CommonDataKeys.PSI_ELEMENT.getData(DataManager.getInstance().getDataContext(component))); }
installDataContextHintUpdateSupply
284,798
void (final @NotNull JComponent component, final Function<Object, ? extends PsiElement> provider) { HintUpdateSupply supply = new HintUpdateSupply(component) { @Override protected @Nullable PsiElement getPsiElementForHint(@Nullable Object selectedValue) { return provider.fun(selectedValue); } }; if (component instanceo...
installHintUpdateSupply
284,799
void (final @NotNull JTable table) { ListSelectionListener listener = new ListSelectionListener() { @Override public void valueChanged(final ListSelectionEvent e) { if (!shouldUpdateHint()) return; int selected = ((ListSelectionModel)e.getSource()).getLeadSelectionIndex(); int rowCount = table.getRowCount(); if (select...
installTableListener