Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
284,600
void (float proportion) { int width = tabs.getWidth(); if (tabs.getTabsPosition() == JBTabsPosition.left) { setSideTabsLimit((int)Math.max(JBTabsImpl.MIN_TAB_WIDTH, proportion * width)); } else if (tabs.getTabsPosition() == JBTabsPosition.right) { setSideTabsLimit(width - (int)Math.max(JBTabsImpl.MIN_TAB_WIDTH, proport...
setProportion
284,601
boolean () { return false; }
getOrientation
284,602
void (boolean verticalSplit) { //ignore }
setOrientation
284,603
void (boolean dragging) { // ignore }
setDragging
284,604
Component () { return tabs; }
asComponent
284,605
void (PropertyChangeEvent event) { if (event.getSource() != tabs) { return; } Integer limit = ClientProperty.get(tabs, JBTabsImpl.SIDE_TABS_SIZE_LIMIT_KEY); if (limit == null) { limit = JBTabsImpl.DEFAULT_MAX_TAB_WIDTH; } setSideTabsLimit(limit); }
propertyChange
284,606
Color () { return UIUtil.getPanelBackground(); }
getEmptySpaceColor
284,607
void (Color color) { myDefaultTabColor = color; }
setDefaultTabColor
284,608
boolean (@NotNull MouseEvent event, @NotNull Point dragToScreenPoint, @NotNull Point startScreenPoint) { if (myDragSource == null || !myDragSource.canBeDraggedOut()) { return false; } TabLabel label = myTabs.getInfoToLabel().get(myDragSource); if (label == null) { return false; } int dX = dragToScreenPoint.x - startScr...
isDragOut
284,609
void (@NotNull MouseEvent event, @NotNull Point dragToScreenPoint, @NotNull Point startScreenPoint, boolean justStarted) { if (!MouseDragHelper.checkModifiers(event)) { if (myDragOutSource != null) { processDragOutCancel(); } return; } TabInfo.DragOutDelegate delegate = myDragOutSource.getDragOutDelegate(); if (justSta...
processDragOut
284,610
void (@NotNull MouseEvent event) { if (!MouseDragHelper.checkModifiers(event)) { if (myDragOutSource != null) { processDragOutCancel(); } return; } super.processDragOutFinish(event); boolean wasSorted = prepareDisableSorting(); try { myDragOutSource.getDragOutDelegate().dragOutFinished(event, myDragOutSource); } finall...
processDragOutFinish
284,611
boolean () { boolean wasSorted = UISettings.getInstance().getSortTabsAlphabetically() /*&& myTabs.isAlphabeticalMode()*/; if (wasSorted && !UISettings.getInstance().getAlwaysKeepTabsAlphabeticallySorted()) { UISettings.getInstance().setSortTabsAlphabetically(false); } return wasSorted; }
prepareDisableSorting
284,612
void (@NotNull MouseEvent event, boolean wasSorted) { if (!wasSorted) return; if (event.isConsumed() || UISettings.getInstance().getAlwaysKeepTabsAlphabeticallySorted()) {//new container for separate window was created, see DockManagerImpl.MyDragSession UISettings.getInstance().setSortTabsAlphabetically(true); } else {...
disableSortingIfNeed
284,613
void () { myDragOutSource.getDragOutDelegate().dragOutCancelled(myDragOutSource); myDragOutSource = null; }
processDragOutCancel
284,614
void (@NotNull MouseEvent event) { // since selection change can cause tabs to be reordered, we need to remember the tab on which the mouse was pressed, otherwise // we'll end up dragging the wrong tab (IDEA-65073) TabLabel label = findLabel(new RelativePoint(event).getPoint(myTabs)); myPressedTabLabel = label == null ...
processMousePressed
284,615
void (@NotNull MouseEvent event, @NotNull Point targetScreenPoint, @NotNull Point startPointScreen) { if (!myTabs.isTabDraggingEnabled() || !isDragSource(event) || !MouseDragHelper.checkModifiers(event)) return; SwingUtilities.convertPointFromScreen(startPointScreen, myTabs); if (isDragJustStarted()) { TabLabel pressed...
processDrag
284,616
boolean (MouseEvent event) { final Object source = event.getSource(); if (source instanceof Component) { return SwingUtilities.windowForComponent(myTabs) == SwingUtilities.windowForComponent((Component)source); } return false; }
isDragSource
284,617
TabLabel (Axis measurer, TabLabel... labels) { double freeSpace; if (measurer.getMinValue(dragRec) < measurer.getMinValue(myDragOriginalRec)) { freeSpace = measurer.getMaxValue(myDragOriginalRec) - measurer.getMaxValue(dragRec); } else { freeSpace = measurer.getMinValue(dragRec) - measurer.getMinValue(myDragOriginalRec...
findMostOverlapping
284,618
boolean (@NotNull JComponent dragComponent, @NotNull Point dragComponentPoint) { return findLabel(dragComponentPoint) != null; }
canStartDragging
284,619
boolean (@NotNull JComponent component, @NotNull RelativePoint point) { Component realDropTarget = UIUtil.getDeepestComponentAt(point.getOriginalComponent(), point.getOriginalPoint().x, point.getOriginalPoint().y); if (realDropTarget == null) realDropTarget = SwingUtilities.getDeepestComponentAt(point.getOriginalCompon...
canFinishDragging
284,620
void (@NotNull MouseEvent event, boolean willDragOutStart) { boolean checkModifiers = MouseDragHelper.checkModifiers(event); if (!checkModifiers && myDragSource == null) { return; } super.processDragFinish(event, willDragOutStart); boolean wasSorted = !willDragOutStart && prepareDisableSorting(); try { endDrag(willDrag...
processDragFinish
284,621
void (boolean willDragOutStart) { if (willDragOutStart) { myDragOutSource = myDragSource; } myTabs.resetTabsCache(); if (!willDragOutStart) { myTabs.fireTabsMoved(); } myTabs.relayout(true, false); myTabs.revalidate(); if (myDragSource != null) { TabInfo.DragDelegate delegate = myDragSource.getDragDelegate(); if (deleg...
endDrag
284,622
void () { endDrag(false); }
processDragCancel
284,623
TabInfo () { return myDragSource; }
getDragSource
284,624
void (@NotNull UISettings uiSettings) { resetTabsCache(); relayout(true, false); super.uiSettingsChanged(uiSettings); }
uiSettingsChanged
284,625
boolean () { return true; }
isEditorTabs
284,626
boolean () { return UISettings.getInstance().getUseSmallLabelsOnTabs() && !ExperimentalUI.isNewUI(); }
useSmallLabels
284,627
boolean () { if (myAlphabeticalModeChanged) { return super.isAlphabeticalMode(); } return UISettings.getInstance().getSortTabsAlphabetically(); }
isAlphabeticalMode
284,628
JBTabsPresentation (boolean alphabeticalMode) { myAlphabeticalModeChanged = true; return super.setAlphabeticalMode(alphabeticalMode); }
setAlphabeticalMode
284,629
boolean () { return true; }
shouldPaintBottomBorder
284,630
void (MouseEvent e) { hover.accept(true); }
mouseEntered
284,631
void (MouseEvent e) { hover.accept(false); }
mouseExited
284,632
void (Component c) { repaintComponent(c); }
doRepaintComponent
284,633
void () { super.addNotify(); myInplaceButton.addMouseListener(myListener); }
addNotify
284,634
void () { super.removeNotify(); myInplaceButton.removeMouseListener(myListener); }
removeNotify
284,635
InplaceButton () { return myInplaceButton; }
getComponent
284,636
Presentation () { return myPrevPresentation; }
getPrevPresentation
284,637
void (Component c) { c.repaint(); }
repaintComponent
284,638
void (TimedDeadzone.Length deadZone) { myInplaceButton.setMouseDeadzone(deadZone); }
setMouseDeadZone
284,639
boolean () { AnActionEvent event = createAnEvent(null, 0); myAction.update(event); Presentation p = event.getPresentation(); boolean changed = !areEqual(p, myPrevPresentation); myIconButton.setIcons(p.getIcon(), p.getDisabledIcon(), p.getHoveredIcon()); if (changed) { myInplaceButton.setIcons(myIconButton); String tool...
update
284,640
boolean (Presentation p1, Presentation p2) { if (p1 == null || p2 == null) return false; return Objects.equals(p1.getText(), p2.getText()) && Comparing.equal(p1.getIcon(), p2.getIcon()) && Comparing.equal(p1.getHoveredIcon(), p2.getHoveredIcon()) && p1.isEnabled() == p2.isEnabled() && p1.isVisible() == p2.isVisible(); ...
areEqual
284,641
void (final ActionEvent e) { AnActionEvent event = createAnEvent(e); if (ActionUtil.lastUpdateAndCheckDumb(myAction, event, true)) { ActionUtil.performActionDumbAwareWithCallbacks(myAction, event); } }
actionPerformed
284,642
AnActionEvent (final @NotNull ActionEvent e) { Object source = e.getSource(); InputEvent inputEvent = null; if (source instanceof InputEvent) { inputEvent = (InputEvent)source; } return createAnEvent(inputEvent, e.getModifiers()); }
createAnEvent
284,643
AnActionEvent (InputEvent inputEvent, int modifiers) { Presentation presentation = myAction.getTemplatePresentation().clone(); DataContext parent = DataManager.getInstance().getDataContext(myInplaceButton); DataContext dataContext = CustomizedDataContext.create(parent, dataId -> { if (CommonDataKeys.VIRTUAL_FILE.is(dat...
createAnEvent
284,644
void (final boolean autoHide) { myAutoHide = autoHide; if (!myToShow) { toggleShowActions(false); } }
setAutoHide
284,645
void (boolean show) { if (myAutoHide) { myInplaceButton.setPainting(show); } else { myInplaceButton.setPainting(true); } myToShow = show; }
toggleShowActions
284,646
void (Graphics2D g2d, Rectangle effectiveBounds, int x, int y, int w, int h, Color tabColor, int row, int column, boolean vertical) { g2d.setColor(tabColor != null ? tabColor : getDefaultTabColor()); g2d.fillRect(x, y, w, h); g2d.setColor(getInactiveMaskColor()); g2d.fillRect(x, y, w, h); }
doPaintInactive
284,647
void (Graphics2D g, Rectangle clip, boolean vertical, Rectangle rectangle) { g.setColor(getBackgroundColor()); g.fill(clip); }
doPaintBackground
284,648
Color () { return BORDER_COLOR; }
getBackgroundColor
284,649
Color () { if (myDefaultTabColor != null) { return myDefaultTabColor; } return DEFAULT_TAB_COLOR; }
getDefaultTabColor
284,650
Color () { return INACTIVE_MASK_COLOR; }
getInactiveMaskColor
284,651
TablePassInfo (List<TabInfo> visibleInfos) { final TablePassInfo data = new TablePassInfo(this, visibleInfos); if (myTabs.isHideTabs()) { return data; } doScrollToSelectedTab(lastTableLayout); boolean singleRow = myTabs.isSingleRow(); boolean showPinnedTabsSeparately = showPinnedTabsSeparately(); boolean scrollable = U...
computeLayoutTable
284,652
void (TablePassInfo data) { boolean compressible = isCompressible(); boolean showPinnedTabsSeparately = showPinnedTabsSeparately(); int standardLengthToFit = data.moreRect.x - (data.titleRect.x + data.titleRect.width) - myTabs.getActionsInsets().left; if (compressible || showPinnedTabsSeparately) { if (showPinnedTabsSe...
calculateLengths
284,653
int () { return myTabs.isSingleRow() ? myTabs.getMoreToolbarPreferredSize().width : 0; }
getMoreRectAxisSize
284,654
int (@NotNull List<TabInfo> list, @NotNull TablePassInfo data) { int total = 0; for (TabInfo info : list) { total += data.lengths.get(info); } return total; }
getTotalLength
284,655
boolean () { return myTabs.isSingleRow() && !UISettings.getInstance().getHideTabsIfNeeded() && myTabs.supportCompression(); }
isCompressible
284,656
void (List<TabInfo> list, TablePassInfo data, int toFitLength) { if (list.isEmpty()) return; int spentLength = 0; int lengthEstimation = 0; for (TabInfo tabInfo : list) { lengthEstimation += Math.max(getMinTabWidth(), myTabs.getInfoToLabel().get(tabInfo).getPreferredSize().width); } final int extraWidth = toFitLength -...
calculateCompressibleLengths
284,657
void (List<TabInfo> list, TablePassInfo data) { for (TabInfo info : list) { TabLabel eachLabel = myTabs.getTabLabel(info); Dimension size = eachLabel.isPinned() && showPinnedTabsSeparately() ? eachLabel.getNotStrictPreferredSize() : eachLabel.getPreferredSize(); data.lengths.put(info, Math.max(getMinTabWidth(), size.wi...
calculateRawLengths
284,658
LayoutPassInfo (List<TabInfo> visibleInfos) { myTabs.resetLayout(true); Rectangle unitedTabArea = null; TablePassInfo data = computeLayoutTable(visibleInfos); Rectangle rect = new Rectangle(data.moreRect); rect.y += myTabs.getBorderThickness(); myTabs.getMoreToolbar().getComponent().setBounds(rect); ActionToolbar entry...
layoutTable
284,659
boolean (@NotNull TabInfo info) { TabLabel label = myTabs.getInfoToLabel().get(info); Rectangle bounds = label.getBounds(); int deadzone = JBUI.scale(DEADZONE_FOR_DECLARE_TAB_HIDDEN); return bounds.x < -deadzone || bounds.width < label.getPreferredSize().width - deadzone; }
isTabHidden
284,660
boolean (@NotNull TabLabel tabLabel, int deltaX, int deltaY) { if (lastTableLayout == null) { return super.isDragOut(tabLabel, deltaX, deltaY); } Rectangle area = new Rectangle(lastTableLayout.toFitRec.width, tabLabel.getBounds().height); for (int i = 0; i < lastTableLayout.myVisibleInfos.size(); i++) { area = area.uni...
isDragOut
284,661
int (Point point) { if (lastTableLayout == null) return -1; int result = -1; Component c = myTabs.getComponentAt(point); Set<TabInfo> lastInRow = new HashSet<>(); for (int i = 0; i < lastTableLayout.table.size(); i++) { List<TabInfo> columns = lastTableLayout.table.get(i).myColumns; if (!columns.isEmpty()) { lastInRow....
getDropIndexFor
284,662
int (@NotNull Point point) { return TabsUtil.getDropSideFor(point, myTabs); }
getDropSideFor
284,663
int () { return myScrollOffset; }
getScrollOffset
284,664
void (int units) { if (!myTabs.isSingleRow()) { myScrollOffset = 0; return; } myScrollOffset += units; clampScrollOffsetToBounds(lastTableLayout); }
scroll
284,665
void (@Nullable TablePassInfo data) { if (data == null) { return; } if (data.requiredLength < data.toFitRec.width) { myScrollOffset = 0; } else { int entryPointsWidth = data.moreRect.y == data.entryPointRect.y ? data.entryPointRect.width + 1 : 0; myScrollOffset = Math.max(0, Math.min(myScrollOffset, data.requiredLength...
clampScrollOffsetToBounds
284,666
boolean () { return myWithScrollBar; }
isWithScrollBar
284,667
int () { return 10; }
getScrollUnitIncrement
284,668
void (TablePassInfo data) { if (myTabs.isMouseInsideTabsArea() || data == null || data.lengths.isEmpty() || myTabs.isHideTabs() || !showPinnedTabsSeparately()) { return; } int offset = -myScrollOffset; for (TabInfo info : data.myVisibleInfos) { if (info.isPinned()) continue; final int length = data.lengths.get(info); i...
doScrollToSelectedTab
284,669
boolean (final TabInfo tabInfo) { final TableRow row = myInfo2Row.get(tabInfo); final int index = table.indexOf(row); return index != -1 && index == table.size() - 1; }
isInSelectionRow
284,670
int () { return table.size(); }
getRowCount
284,671
Rectangle () { return (Rectangle)tabRectangle.clone(); }
getHeaderRectangle
284,672
int () { return requiredLength; }
getRequiredLength
284,673
int () { return !moreRect.isEmpty() ? moreRect.x - toFitRec.x - myTabs.getActionsInsets().left : table.size() > 1 || entryPointRect.isEmpty() ? toFitRec.width : entryPointRect.x - toFitRec.x - myTabs.getActionsInsets().left; }
getScrollExtent
284,674
boolean () { return getStrategy().isSideComponentOnTabs(); }
isSideComponentOnTabs
284,675
ShapeTransform (Rectangle labelRec) { return getStrategy().createShapeTransform(labelRec); }
createShapeTransform
284,676
boolean (@NotNull TabLabel tabLabel, int deltaX, int deltaY) { return getStrategy().isDragOut(tabLabel, deltaX, deltaY); }
isDragOut
284,677
boolean (SingleRowPassInfo data) { boolean layoutLabels = true; if (!myTabs.getForcedRelayout$intellij_platform_ide() && lastSingRowLayout != null && lastSingRowLayout.contentCount == myTabs.getTabCount() && lastSingRowLayout.layoutSize.equals(myTabs.getSize()) && lastSingRowLayout.scrollOffset == getScrollOffset()) { ...
checkLayoutLabels
284,678
LayoutPassInfo (List<TabInfo> visibleInfos) { SingleRowPassInfo data = new SingleRowPassInfo(this, visibleInfos); final boolean shouldLayoutLabels = checkLayoutLabels(data); if (!shouldLayoutLabels) { data = lastSingRowLayout; } final TabInfo selected = myTabs.getSelectedInfo(); prepareLayoutPassInfo(data, selected); m...
layoutSingleRow
284,679
void (SingleRowPassInfo data, TabInfo selected) { data.insets = myTabs.getLayoutInsets(); if (myTabs.isHorizontalTabs()) { data.insets.left += myTabs.getFirstTabOffset(); } final JBTabsImpl.Toolbar selectedToolbar = myTabs.getInfoToToolbar().get(selected); data.hToolbar = new WeakReference<>(selectedToolbar != null && ...
prepareLayoutPassInfo
284,680
void (SingleRowPassInfo data) { data.titleRect = getStrategy().getTitleRect(data); data.position += myTabs.isHorizontalTabs() ? data.titleRect.width : data.titleRect.height; }
layoutTitle
284,681
void (SingleRowPassInfo data) { if (!data.toDrop.isEmpty()) { data.moreRect = getStrategy().getMoreRect(data); } }
layoutMoreButton
284,682
void (SingleRowPassInfo data) { data.entryPointRect = getStrategy().getEntryPointRect(data); }
layoutEntryPointButton
284,683
void (final SingleRowPassInfo data) { boolean layoutStopped = false; for (TabInfo eachInfo : data.toLayout) { final TabLabel label = myTabs.getInfoToLabel().get(eachInfo); if (layoutStopped) { final Rectangle rec = getStrategy().getLayoutRect(data, 0, 0); myTabs.layout(label, rec); continue; } final Dimension eachSize ...
layoutLabels
284,684
boolean (SingleRowPassInfo data, TabLabel label, int length) { final Rectangle rec = getStrategy().getLayoutRect(data, data.position, length); myTabs.layout(label, rec); label.setAlignmentToCenter(myTabs.isEditorTabs() && getStrategy().isToCenterTextWhenStretched()); return true; }
applyTabLayout
284,685
void (SingleRowPassInfo data) { data.requiredLength += myTabs.isHorizontalTabs() ? data.insets.left + data.insets.right : data.insets.top + data.insets.bottom; for (TabInfo eachInfo : data.myVisibleInfos) { data.requiredLength += getRequiredLength(eachInfo); data.toLayout.add(eachInfo); } data.requiredLength += getStra...
calculateRequiredLength
284,686
int (TabInfo eachInfo) { TabLabel label = myTabs.getInfoToLabel().get(eachInfo); return getStrategy().getLengthIncrement(label != null ? label.getPreferredSize() : new Dimension()) + (myTabs.isEditorTabs() ? myTabs.getTabHGap() : 0); }
getRequiredLength
284,687
boolean (@NotNull TabInfo info) { return lastSingRowLayout != null && lastSingRowLayout.toDrop.contains(info); }
isTabHidden
284,688
int (Point point) { if (lastSingRowLayout == null) return -1; int result = -1; Component c = myTabs.getComponentAt(point); if (c instanceof JBTabsImpl) { for (int i = 0; i < lastSingRowLayout.myVisibleInfos.size() - 1; i++) { TabLabel first = myTabs.getInfoToLabel().get(lastSingRowLayout.myVisibleInfos.get(i)); TabLabe...
getDropIndexFor
284,689
int (@NotNull Point point) { return TabsUtil.getDropSideFor(point, myTabs); }
getDropSideFor
284,690
int () { return 1; }
getRowCount
284,691
Rectangle () { return (Rectangle)tabRectangle.clone(); }
getHeaderRectangle
284,692
int () { return requiredLength; }
getRequiredLength
284,693
int () { if (tabs.isHorizontalTabs()) { return !moreRect.isEmpty() ? moreRect.x - tabs.getActionsInsets().left : !entryPointRect.isEmpty() ? entryPointRect.x - tabs.getActionsInsets().left : layoutSize.width; } else { if (ExperimentalUI.isNewUI()) { return layoutSize.height; } return !moreRect.isEmpty() ? moreRect.y - ...
getScrollExtent
284,694
int () { return myScrollOffset; }
getScrollOffset
284,695
void (int units) { myScrollOffset += units; clampScrollOffsetToBounds(lastSingRowLayout); }
scroll
284,696
boolean (SingleRowPassInfo data) { return true; }
checkLayoutLabels
284,697
void (@Nullable SingleRowPassInfo data) { if (data == null) { return; } if (data.requiredLength < data.toFitLength) { myScrollOffset = 0; } else { int max = data.requiredLength - data.toFitLength + getMoreRectAxisSize(); Insets actionInsets = myTabs.getActionsInsets(); max += myTabs.isHorizontalTabs() ? actionInsets.le...
clampScrollOffsetToBounds
284,698
void (SingleRowPassInfo passInfo) { if (myTabs.isMouseInsideTabsArea()) { return; } int offset = -myScrollOffset; for (TabInfo info : passInfo.myVisibleInfos) { final int length = getRequiredLength(info); if (info == myTabs.getSelectedInfo()) { if (offset < 0) { scroll(offset); } else { int maxLength = passInfo.toFitLe...
doScrollToSelectedTab
284,699
void (SingleRowPassInfo data) { calculateRequiredLength(data); clampScrollOffsetToBounds(data); doScrollToSelectedTab(data); clampScrollOffsetToBounds(data); }
recomputeToLayout