Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
282,500
SeparatorWithText () { return mySeparatorComponent; }
getSeparator
282,501
GroupedElementsRenderer () { return renderer; }
getRenderer
282,502
AccessibleContext () { return myRendererComponent.getAccessibleContext(); }
getAccessibleContext
282,503
void (ListDataEvent e) { updateButtons(); }
intervalAdded
282,504
void (ListDataEvent e) { updateButtons(); }
intervalRemoved
282,505
void (ListDataEvent e) { updateButtons(); }
contentsChanged
282,506
void () { myRemoveAction = __ -> { ListUtil.removeSelectedItems(myList); updateButtons(); }; myUpAction = __ -> { ListUtil.moveSelectedItemsUp(myList); updateButtons(); }; myDownAction = __ -> { ListUtil.moveSelectedItemsDown(myList); updateButtons(); }; }
createActions
282,507
JComponent () { return myList; }
getComponent
282,508
void () { final CommonActionsPanel p = getActionsPanel(); if (p != null) { boolean someElementSelected; if (myList.isEnabled()) { final int index = myList.getSelectedIndex(); someElementSelected = 0 <= index && index < myList.getModel().getSize(); if (someElementSelected) { final boolean downEnable = myList.getMaxSelec...
updateButtons
282,509
ToolbarDecorator (int rowCount) { myList.setVisibleRowCount(rowCount); return this; }
setVisibleRowCount
282,510
boolean () { return myEditableModel != null || myList.getModel() instanceof EditableModel; }
isModelEditable
282,511
void () { RowsDnDSupport.install(myList, myEditableModel != null ? myEditableModel : (EditableModel)myList.getModel()); }
installDnDSupport
282,512
void (@Nullable @Nls String text) { String oldAccessibleName = null; if (accessibleContext != null) { oldAccessibleName = accessibleContext.getAccessibleName(); } if (text == null) { text = ""; } myText = text; myHighlightedRegions = new ArrayList<>(4); if ((accessibleContext != null) && !StringUtil.equals(accessibleCo...
setText
282,513
String () { return myText; }
getText
282,514
void (@Nullable Icon icon) { myIcon = icon; updateDslVisualPaddings(); invalidate(); repaint(); }
setIcon
282,515
void (int startOffset, int endOffset, TextAttributes attributes) { addHighlighter(0, startOffset, endOffset, attributes); }
addHighlighter
282,516
void (int startIndex, int startOffset, int endOffset, TextAttributes attributes) { if (startOffset < 0) startOffset = 0; if (endOffset > myText.length()) endOffset = myText.length(); if (startOffset >= endOffset) return; if (myHighlightedRegions.isEmpty()){ myHighlightedRegions.add(new HighlightedRegion(startOffset, en...
addHighlighter
282,517
void (int gap) { myIconTextGap = Math.max(gap, 2); }
setIconTextGap
282,518
int () { return myIconTextGap; }
getIconTextGap
282,519
void (Color bg) { myEnforcedBackground = bg; }
enforceBackgroundOutsideText
282,520
void (final boolean b) { myDoNotHighlight = b; }
setDoNotHighlight
282,521
void (Graphics g) { // determine color of background Color bgColor; Color fgColor; boolean paintHighlightsBackground; boolean paintHighlightsForeground; if (myIsSelected && (myHasFocus || myPaintUnfocusedSelection)) { bgColor = UIUtil.getTreeSelectionBackground(); fgColor = UIUtil.getTreeSelectionForeground(); paintHig...
paintComponent
282,522
void (Graphics g) { UISettings.setupAntialiasing(g); }
applyRenderingHints
282,523
int () { if (myIcon == null || isIconAtRight()) { return 2; } return myIcon.getIconWidth() + myIconTextGap; }
getTextOffset
282,524
int () { return isIconAtRight() ? getWidth() - myIcon.getIconWidth() : 0; }
getIconOffset
282,525
Dimension () { FontMetrics defFontMetrics = getFontMetrics(getFont()); int width = getTextOffset(); if (!myText.isEmpty()){ if (myHighlightedRegions.isEmpty()){ width += getStringWidth(myText, defFontMetrics); } else{ int endIndex = 0; for (HighlightedRegion hRegion : myHighlightedRegions) { width += getStringWidth(myT...
getPreferredSize
282,526
int (@Nls String text, FontMetrics fontMetrics) { return fontMetrics.stringWidth(text); }
getStringWidth
282,527
ArrayList<HighlightedRegion> () { return myHighlightedRegions; }
getHighlightedRegions
282,528
AccessibleContext () { if (accessibleContext == null) { accessibleContext = new AccessibleHighlightable(); } return accessibleContext; }
getAccessibleContext
282,529
boolean () { return myIconAtRight; }
isIconAtRight
282,530
void (boolean iconAtRight) { myIconAtRight = iconAtRight; updateDslVisualPaddings(); }
setIconAtRight
282,531
String () { return myText; }
getAccessibleName
282,532
AccessibleRole () { return AccessibleRole.LABEL; }
getAccessibleRole
282,533
void () { int left = myIcon == null || isIconAtRight() ? getTextOffset() : 0; putClientProperty(DslComponentProperty.VISUAL_PADDINGS, UnscaledGapsKt.UnscaledGaps(0, left, 0 ,0)); }
updateDslVisualPaddings
282,534
void (@NotNull JComponent c, boolean draggable) { c.putClientProperty(DRAGGABLE_MARKER, draggable ? Boolean.TRUE : null); }
setComponentDraggable
282,535
boolean (@NotNull Component c) { return c instanceof JComponent && ((JComponent)c).getClientProperty(DRAGGABLE_MARKER) == Boolean.TRUE; }
isComponentDraggable
282,536
boolean (@Nullable InputEvent event) { if (event == null || !UISettings.getInstance().getDndWithPressedAltOnly()) { return true; } return (event.getModifiers() & InputEvent.ALT_MASK) != 0; }
checkModifiers
282,537
void () { if (myGlassPane != null) { return; } UiNotifyConnector.installOn(myDragComponent, new Activatable() { @Override public void showNotify() { attach(); } @Override public void hideNotify() { detach(true); } }); Disposer.register(myParentDisposable, () -> stop()); }
start
282,538
void () { attach(); }
showNotify
282,539
void () { detach(true); }
hideNotify
282,540
void () { if (myDetachPostponed) { myDetachPostponed = false; return; } if (myStopped || myGlassPane != null) { return; } myGlassPane = IdeGlassPaneUtil.find(myDragComponent); myGlassPaneListenersDisposable = Disposer.newDisposable("myGlassPaneListeners"); Disposer.register(myParentDisposable, myGlassPaneListenersDispo...
attach
282,541
void () { myStopped = true; detach(false); }
stop
282,542
void (boolean canPostponeDetach) { if (canPostponeDetach && myDraggingNow) { myDetachPostponed = true; return; } if (myGlassPane != null) { Disposer.dispose(myGlassPaneListenersDisposable); myGlassPaneListenersDisposable = Disposer.newDisposable(); KeyboardFocusManager.getCurrentKeyboardFocusManager().removeKeyEventDis...
detach
282,543
double () { return 2; }
getWeight
282,544
void (final MouseEvent e) { if (!canStartDragging(e) || ourLastDragHash == System.identityHashCode(e)) return; myPressPointScreen = new RelativePoint(e).getScreenPoint(); myPressedOnScreenPoint = new Point(myPressPointScreen); processMousePressed(e); ourLastDragHash = System.identityHashCode(e); }
mousePressed
282,545
void (final MouseEvent e) { if (myCancelled) { myCancelled = false; return; } if (myDraggingNow && !canFinishDragging(e)) { cancelDragging(); e.consume(); myPressedOnScreenPoint = null; myCancelled = false; return; } boolean wasDragging = myDraggingNow; myPressPointScreen = null; myDraggingNow = false; myDragJustStarte...
mouseReleased
282,546
void () { myDraggingNow = false; myDragJustStarted = false; myPressPointScreen = null; myDetachingMode = false; }
resetDragState
282,547
void (@NotNull MouseEvent e) { if (myPressPointScreen == null || myCancelled) return; final boolean deadZone = isWithinDeadZone(e); if (!myDraggingNow && !deadZone) { myDraggingNow = true; myDragJustStarted = true; } else if (myDraggingNow) { myDragJustStarted = false; } if (myDraggingNow && myPressPointScreen != null)...
mouseDragged
282,548
boolean (@NotNull MouseEvent me) { if (me.getButton() != MouseEvent.BUTTON1) return false; if (!myDragComponent.isShowing()) return false; Component component = me.getComponent(); if (NullableComponent.Check.isNullOrHidden(component)) return false; final Point dragComponentPoint = SwingUtilities.convertPoint(me.getComp...
canStartDragging
282,549
boolean (@NotNull JComponent dragComponent, @NotNull Point dragComponentPoint) { return true; }
canStartDragging
282,550
boolean (@NotNull MouseEvent me) { if (!myDragComponent.isShowing()) return false; Component component = me.getComponent(); if (NullableComponent.Check.isNullOrHidden(component)) return false; return canFinishDragging(myDragComponent, new RelativePoint(me)); }
canFinishDragging
282,551
boolean (@NotNull JComponent component, @NotNull RelativePoint point) { return true; }
canFinishDragging
282,552
void (@NotNull MouseEvent event) { }
processMousePressed
282,553
void () { }
processDragCancel
282,554
void (@NotNull MouseEvent event, boolean willDragOutStart) { }
processDragFinish
282,555
void (@NotNull MouseEvent event) { }
processDragOutFinish
282,556
void () { }
processDragOutCancel
282,557
boolean () { return myDragJustStarted; }
isDragJustStarted
282,558
boolean (@NotNull MouseEvent event, @NotNull Point dragToScreenPoint, @NotNull Point startScreenPoint) { return false; }
isDragOut
282,559
void (@NotNull MouseEvent event, @NotNull Point dragToScreenPoint, @NotNull Point startScreenPoint, boolean justStarted) { event.consume(); }
processDragOut
282,560
boolean (@NotNull MouseEvent e) { return myPressPointScreen.distance(e.getLocationOnScreen()) < getDragStartDeadzone(myPressedOnScreenPoint.getLocation(), e.getLocationOnScreen()); }
isWithinDeadZone
282,561
int (@NotNull Point pressedScreenPoint, @NotNull Point draggedScreenPoint) { return JBUI.scale(DRAG_START_DEADZONE); }
getDragStartDeadzone
282,562
void (final @NotNull MouseEvent e) { }
mouseMoved
282,563
boolean (@NotNull KeyEvent e) { if (e.getKeyCode() == KeyEvent.VK_ESCAPE && e.getID() == KeyEvent.KEY_PRESSED) { return cancelDragging(); } return false; }
dispatchKeyEvent
282,564
boolean () { if (!myDraggingNow) return false; myCancelled = true; if (myDetachingMode) { processDragOutCancel(); } else { processDragCancel(); } resetDragState(); return true; }
cancelDragging
282,565
void (final AnActionEvent e) { e.getPresentation().setEnabled(getHistory(e).canGoForward()); }
doUpdate
282,566
ActionUpdateThread () { return ActionUpdateThread.EDT; }
getActionUpdateThread
282,567
void (final @NotNull AnActionEvent e) { getHistory(e).forward(); }
actionPerformed
282,568
boolean (final Object obj) { return ComparableObjectCheck.equals(this, obj); }
equals
282,569
int () { return ComparableObjectCheck.hashCode(this, super.hashCode()); }
hashCode
282,570
Place (String name, Object value) { myPath.put(name, value); return this; }
putPath
282,571
Place (final String name, Object value) { final Place clone = new Place(); clone.myPath = (LinkedHashMap<String, Object>)myPath.clone(); clone.myPath.put(name, value); return clone; }
cloneForElement
282,572
void (final Place from) { myPath = (LinkedHashMap<String, Object>)from.myPath.clone(); }
copyFrom
282,573
boolean (final Place place) { if (myPath.size() >= place.myPath.size()) return false; final Iterator<String> thisIterator = myPath.keySet().iterator(); final Iterator<String> otherIterator = place.myPath.keySet().iterator(); while (thisIterator.hasNext()) { String thisKey = thisIterator.next(); String otherKey = otherI...
isMoreGeneralFor
282,574
ActionCallback (Object object, Place place, final boolean requestFocus) { if (object instanceof Navigator) { return ((Navigator)object).navigateTo(place, requestFocus); } return ActionCallback.DONE; }
goFurther
282,575
void (final Object object, final Place place) { if (object instanceof Navigator) { ((Navigator)object).queryPlace(place); } }
queryFurther
282,576
void () { if (isNavigatingNow()) return; final Place place = query(); pushPlace(place); }
pushQueryPlace
282,577
void (String name, Object value) { if (!canNavigateFor(name)) return; final Place checkPlace = getCheckPlace(name); if (checkPlace == null) return; pushPlace(checkPlace.cloneForElement(name, value)); }
pushPlaceForElement
282,578
void (Place place) { myRoot.navigateTo(place, false); }
navigateTo
282,579
void () { int next = findValid(-1); assert next != -1; goThere(next); }
back
282,580
int (int increment) { List<Place> places = new ArrayList<>(); int first; synchronized (this) { first = myCurrentPos + increment; for (int idx = first; idx >= 0 && idx < myHistory.size(); idx += increment) { places.add(myHistory.get(idx)); } } int index = ContainerUtil.indexOf(places, place -> myRoot.isValid(place)); re...
findValid
282,581
void (final int nextPos) { myNavigatedNow = true; final Place next = myHistory.get(nextPos); final Place from = getCurrent(); fireStarted(from, next); try { final ActionCallback callback = myRoot.navigateTo(next, false); assert callback != null; callback.doWhenDone(() -> { synchronized (this) { myCurrentPos = nextPos; ...
goThere
282,582
boolean () { return myNavigatedNow; }
isNavigatingNow
282,583
boolean () { return findValid(-1) != -1; }
canGoBack
282,584
void () { int next = findValid(1); assert next != -1; goThere(next); }
forward
282,585
boolean () { return findValid(1) != -1; }
canGoForward
282,586
Place () { final Place result = new Place(); myRoot.queryPlace(result); return result; }
query
282,587
boolean (String pathElement) { if (isNavigatingNow()) return false; Place checkPlace = getCheckPlace(pathElement); return checkPlace != null && checkPlace.getPath(pathElement) != null; }
canNavigateFor
282,588
void (final HistoryListener listener, Disposable parent) { myListeners.add(listener); Disposer.register(parent, new Disposable() { @Override public void dispose() { myListeners.remove(listener); } }); }
addListener
282,589
void () { myListeners.remove(listener); }
dispose
282,590
void (Place from, Place to) { for (HistoryListener each : myListeners) { each.navigationStarted(from, to); } }
fireStarted
282,591
void (Place from, Place to) { for (HistoryListener each : myListeners) { each.navigationFinished(from, to); } }
fireFinished
282,592
void (final @NotNull AnActionEvent e) { e.getPresentation().setEnabled(getHistory(e) != null); if (e.getPresentation().isEnabled()) { doUpdate(e); } }
update
282,593
void (final AnActionEvent e) { e.getPresentation().setEnabled(getHistory(e).canGoBack()); }
doUpdate
282,594
ActionUpdateThread () { return ActionUpdateThread.EDT; }
getActionUpdateThread
282,595
void (final @NotNull AnActionEvent e) { getHistory(e).back(); }
actionPerformed
282,596
void (Graphics g) { final Icon icon = myIsSelected? mySelectedIcon : myIcon; if (icon != null) { final Graphics2D g2 = (Graphics2D)g; g2.setBackground(getBackground()); final AffineTransform savedTransform = g2.getTransform(); g2.scale(((double)getWidth()) / icon.getIconWidth(), ((double)getHeight()) / icon.getIconHeig...
paintComponent
282,597
void (boolean isSelected) { myIsSelected = isSelected; this.revalidate(); this.repaint(); }
setSelected
282,598
void (JLabel labelToClip, JComponent componentToWatch) { componentToWatch.addComponentListener(new FilePathClipper(labelToClip, componentToWatch)); }
install
282,599
void (ComponentEvent e) { final String optimalTextForComponent = FilePathSplittingPolicy.SPLIT_BY_SEPARATOR.getOptimalTextForComponent(myFile, myLabelToClip, myComponentToWatch.getWidth()); myLabelToClip.setText(optimalTextForComponent); }
componentResized