Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
281,500
void () { if (myLabel != null) { Font labelFont = StartupUiUtil.getLabelFont(); myLabel.setFont(RelativeFont.NORMAL.fromResource("TitledSeparator.fontSizeOffset", 0).derive(labelFont)); } }
updateLabelFont
281,501
void (@NlsContexts.Separator String text) { originalText = text; myLabel.setText(text != null && text.startsWith("<html>") ? text : UIUtil.replaceMnemonicAmpersand(originalText)); }
setText
281,502
void (Font font) { myLabel.setFont(font); }
setTitleFont
281,503
Font () { return myLabel.getFont(); }
getTitleFont
281,504
JLabel () { return myLabel; }
getLabel
281,505
JSeparator () { return mySeparator; }
getSeparator
281,506
Component () { return myLabel.getLabelFor(); }
getLabelFor
281,507
void (Component labelFor) { myLabel.setLabelFor(labelFor); }
setLabelFor
281,508
void (boolean enabled) { super.setEnabled(enabled); myLabel.setEnabled(enabled); mySeparator.setEnabled(enabled); mySeparator.setForeground(enabled ? ENABLED_SEPARATOR_FOREGROUND : DISABLED_SEPARATOR_FOREGROUND); }
setEnabled
281,509
AccessibleContext () { if (accessibleContext == null) { accessibleContext = super.getAccessibleContext(); accessibleContext.setAccessibleName(myLabel.getText()); } return accessibleContext; }
getAccessibleContext
281,510
Border (boolean focused) { if (!focused) { return new EmptyBorder(getInsets()); } int arcSize = JBUIScale.scale(Registry.intValue("ide.link.button.focus.round.arc", 4)); return JBUI.Borders.compound( new EmptyBorder(getOutsideFrameInsets()), new RoundedLineBorder(JBUI.CurrentTheme.Link.FOCUSED_BORDER_COLOR, arcSize, FOCUS_THICKNESS), new EmptyBorder(getInsideFrameInsets())); }
getLabelBorder
281,511
void (Insets destInsets, Insets insetsToAdd) { destInsets.top += insetsToAdd.top; destInsets.bottom += insetsToAdd.bottom; destInsets.left += insetsToAdd.left; destInsets.right += insetsToAdd.right; }
add
281,512
Insets () { return new JBInsets(0, 0, INSIDE_BOTTOM_RIGHT_INSET, INSIDE_BOTTOM_RIGHT_INSET); }
getInsideFrameInsets
281,513
Insets () { // RoundedLineBorder doesn't use scale //noinspection UseDPIAwareInsets return new Insets(FOCUS_THICKNESS, FOCUS_THICKNESS, FOCUS_THICKNESS, FOCUS_THICKNESS); }
getFrameInsets
281,514
Insets () { Insets insets = getInsideFrameInsets(); add(insets, getFrameInsets()); //noinspection UseDPIAwareInsets return new Insets(JBUIScale.scale(TOP_INSET) - insets.top, insets.left + 1, // RoundedLineBorder is a little clipped near edges, reserve additional space JBUIScale.scale(BOTTOM_INSET) - insets.bottom, SEPARATOR_LEFT_INSET - insets.right); }
getOutsideFrameInsets
281,515
Insets () { Insets result = getInsideFrameInsets(); add(result, getFrameInsets()); add(result, getOutsideFrameInsets()); return result; }
getInsets
281,516
void (@NotNull VirtualFile file) { }
updateNotifications
281,517
void (@NotNull EditorNotificationProvider provider) { }
updateNotifications
281,518
void () { }
updateAllNotifications
281,519
List<IntentionActionWithOptions> (@NotNull FileEditor fileEditor) { return Collections.emptyList(); }
getStoredFileLevelIntentions
281,520
EditorNotifications (@NotNull Project project) { return project.isDefault() ? NULL_IMPL : project.getService(EditorNotifications.class); }
getInstance
281,521
void () { Project[] projects = ProjectManager.getInstance().getOpenProjects(); for (Project project : projects) { getInstance(project).updateAllNotifications(); } Project lightEditProject = LightEditService.getInstance().getProject(); if (lightEditProject != null) { getInstance(lightEditProject).updateAllNotifications(); } }
updateAll
281,522
Component (JTable table, @Nullable Object value, boolean isSelected, boolean hasFocus, int row, int col) { try { rendererComponentInner(table, value, isSelected, hasFocus, row, col); } catch (Exception e) { try { LOG.error(e); } catch (Exception ignore) { } } return this; }
getTableCellRendererComponent
281,523
void (@NotNull JTable table, @Nullable Object value, boolean isSelected, boolean hasFocus, int row, int col) { clear(); setPaintFocusBorder(hasFocus && table.getCellSelectionEnabled()); acquireState(table, isSelected, hasFocus, row, col); getCellState().updateRenderer(this); customizeCellRenderer(table, value, isSelected, hasFocus, row, col); }
rendererComponentInner
281,524
void (final JTree tree) { new ClickListener() { @Override public boolean onClick(@NotNull MouseEvent e, int clickCount) { if (clickCount > 1) return false; TreePath location = tree.getPathForLocation(e.getPoint().x, e.getPoint().y); if (location != null) { onMouseClicked(tree); // return isAutoScrollMode(); // do not consume event to allow processing by a tree } return false; } }.installOn(tree); tree.addMouseMotionListener(new MouseMotionAdapter() { @Override public void mouseDragged(final MouseEvent e) { onSelectionChanged(tree); } }); tree.addTreeSelectionListener( new TreeSelectionListener() { @Override public void valueChanged(TreeSelectionEvent e) { onSelectionChanged(tree); } } ); }
install
281,525
boolean (@NotNull MouseEvent e, int clickCount) { if (clickCount > 1) return false; TreePath location = tree.getPathForLocation(e.getPoint().x, e.getPoint().y); if (location != null) { onMouseClicked(tree); // return isAutoScrollMode(); // do not consume event to allow processing by a tree } return false; }
onClick
281,526
void (final MouseEvent e) { onSelectionChanged(tree); }
mouseDragged
281,527
void (TreeSelectionEvent e) { onSelectionChanged(tree); }
valueChanged
281,528
void (final JTable table) { new ClickListener() { @Override public boolean onClick(@NotNull MouseEvent e, int clickCount) { if (clickCount >= 2) return false; Component location = table.getComponentAt(e.getPoint()); if (location != null) { onMouseClicked(table); return isAutoScrollMode(); } return false; } }.installOn(table); table.addMouseMotionListener(new MouseMotionAdapter() { @Override public void mouseDragged(final MouseEvent e) { onSelectionChanged(table); } }); table.getSelectionModel().addListSelectionListener( new ListSelectionListener() { @Override public void valueChanged(ListSelectionEvent e) { onSelectionChanged(table); } } ); }
install
281,529
boolean (@NotNull MouseEvent e, int clickCount) { if (clickCount >= 2) return false; Component location = table.getComponentAt(e.getPoint()); if (location != null) { onMouseClicked(table); return isAutoScrollMode(); } return false; }
onClick
281,530
void (final MouseEvent e) { onSelectionChanged(table); }
mouseDragged
281,531
void (ListSelectionEvent e) { onSelectionChanged(table); }
valueChanged
281,532
void (final JList jList) { new ClickListener() { @Override public boolean onClick(@NotNull MouseEvent e, int clickCount) { if (clickCount >= 2) return false; final Object source = e.getSource(); final int index = jList.locationToIndex(SwingUtilities.convertPoint(source instanceof Component ? (Component)source : null, e.getPoint(), jList)); if (index >= 0 && index < jList.getModel().getSize()) { onMouseClicked(jList); return true; } return false; } }.installOn(jList); jList.addListSelectionListener(new ListSelectionListener() { @Override public void valueChanged(ListSelectionEvent e) { onSelectionChanged(jList); } }); }
install
281,533
boolean (@NotNull MouseEvent e, int clickCount) { if (clickCount >= 2) return false; final Object source = e.getSource(); final int index = jList.locationToIndex(SwingUtilities.convertPoint(source instanceof Component ? (Component)source : null, e.getPoint(), jList)); if (index >= 0 && index < jList.getModel().getSize()) { onMouseClicked(jList); return true; } return false; }
onClick
281,534
void (ListSelectionEvent e) { onSelectionChanged(jList); }
valueChanged
281,535
void () { myAutoScrollAlarm.cancelAllRequests(); }
cancelAllRequests
281,536
void (final Component component) { cancelAllRequests(); if (isAutoScrollMode()){ ApplicationManager.getApplication().invokeLater(() -> scrollToSource(component)); } }
onMouseClicked
281,537
void (final Component component) { if (component != null && component.isShowing() && isAutoScrollMode()) { myAutoScrollAlarm.cancelAllRequests(); myAutoScrollAlarm.addRequest( () -> { if (component.isShowing()) { //for tests if (!needToCheckFocus() || UIUtil.hasFocus(component)) { scrollToSource(component); } } }, Registry.intValue("ide.autoscroll.to.source.delay", 100) ); } }
onSelectionChanged
281,538
boolean () { return true; }
needToCheckFocus
281,539
boolean (@NotNull VirtualFile file) { // Attempt to navigate to the virtual file with unknown file type will show a modal dialog // asking to register some file type for this file. This behaviour is undesirable when auto scrolling. FileType type = file.getFileType(); if (type == FileTypes.UNKNOWN || type instanceof INativeFileType) return false; //IDEA-84881 Don't autoscroll to very large files return file.getLength() <= PersistentFSConstants.getMaxIntellisenseFileSize(); }
isAutoScrollEnabledFor
281,540
void (@NotNull Component tree) { AutoScrollToSourceTaskManager.getInstance() .scheduleScrollToSource(this, DataManager.getInstance().getDataContext(tree)); }
scrollToSource
281,541
ToggleAction () { return new AutoscrollToSourceAction(getActionName(), getActionDescription()); }
createToggleAction
281,542
boolean (@NotNull AnActionEvent event) { return isAutoScrollMode(); }
isSelected
281,543
ActionUpdateThread () { return ActionUpdateThread.EDT; }
getActionUpdateThread
281,544
void (@NotNull AnActionEvent event, boolean flag) { setAutoScrollMode(flag); }
setSelected
281,545
Border () { return createBorder(SideBorder.ALL); }
createBorder
281,546
Border (Color color) { return createBorder(color, SideBorder.ALL); }
createBorder
281,547
RoundedLineBorder () { return createRoundedBorder(BORDER_ROUNDNESS); }
createRoundedBorder
281,548
RoundedLineBorder (int arcSize) { return new RoundedLineBorder(getBorderColor(), arcSize); }
createRoundedBorder
281,549
RoundedLineBorder (int arcSize, final int thickness) { return new RoundedLineBorder(getBorderColor(), arcSize, thickness); }
createRoundedBorder
281,550
Border (Insets insets) { return new EmptyBorder(JBInsets.create(insets)); }
createEmptyBorder
281,551
Border () { return JBUI.Borders.empty(); }
createEmptyBorder
281,552
Border (int thickness) { return JBUI.Borders.empty(thickness); }
createEmptyBorder
281,553
Border (int top, int left, int bottom, int right) { return JBUI.Borders.empty(top, left, bottom, right); }
createEmptyBorder
281,554
TitledBorder (@NlsContexts.BorderTitle String s) { return createTitledBorder(s, true); }
createTitledBorder
281,555
IdeaTitledBorder (@NlsContexts.BorderTitle String title, boolean hasIndent) { int top = Math.max(0, intValue("ide.titled.border.top", TITLED_BORDER_TOP_INSET)); int left = Math.max(0, intValue("ide.titled.border.left", TITLED_BORDER_LEFT_INSET)); int right = Math.max(0, intValue("ide.titled.border.right", TITLED_BORDER_RIGHT_INSET)); int bottom = Math.max(0, intValue("ide.titled.border.bottom", TITLED_BORDER_BOTTOM_INSET)); @SuppressWarnings("UseDPIAwareInsets") Insets insets = new Insets(top, left, bottom, right); return createTitledBorder(title, hasIndent, insets); }
createTitledBorder
281,556
IdeaTitledBorder (@NlsContexts.BorderTitle String title, boolean hasIndent, Insets insets) { int indent = hasIndent ? Math.max(0, intValue("ide.titled.border.indent", TITLED_BORDER_INDENT)) : 0; return new IdeaTitledBorder(title, indent, insets); }
createTitledBorder
281,557
Color () { return JBColor.border(); }
getBorderColor
281,558
TitledBorder (Border border, @NlsContexts.BorderTitle String title, int titleJustification, int titlePosition, Font titleFont, Color titleColor) { return IdeBorderFactory.createTitledBorder(title); }
createTitledBorder
281,559
TitledBorder (Border border, @NlsContexts.BorderTitle String title, int titleJustification, int titlePosition, Font titleFont, Color titleColor) { return IdeBorderFactory.createTitledBorder(title, false); }
createTitledBorder
281,560
TitledBorder (Border border, @NlsContexts.BorderTitle String title, int titleJustification, int titlePosition, Font titleFont, Color titleColor) { return IdeBorderFactory.createTitledBorder(title, false, new Insets(TITLED_BORDER_TOP_INSET,0,0,0)); }
createTitledBorder
281,561
TitledBorder (Border border, @NlsContexts.BorderTitle String title, int titleJustification, int titlePosition, Font titleFont, Color titleColor) { return IdeBorderFactory.createTitledBorder(title, true, new Insets(TITLED_BORDER_TOP_INSET,0,0,0)); }
createTitledBorder
281,562
void (JTable table, boolean isSelected, boolean hasFocus, int row, int column) { myCellState.collectState(table, isSelected, hasFocus, row, column); }
acquireState
281,563
void (@NotNull String fragment, @NotNull SimpleTextAttributes attributes, boolean isMainText) { super.append(fragment, modifyAttributes(attributes), isMainText); }
append
281,564
void () { // no need for this in a renderer }
revalidateAndRepaint
281,565
SimpleTextAttributes (final SimpleTextAttributes attributes) { return myCellState.modifyAttributes(attributes); }
modifyAttributes
281,566
TableCellState () { return myCellState; }
getCellState
281,567
void (TableCellState cellState) { myCellState = cellState; }
setCellState
281,568
boolean () { return true; }
shouldPaintBackground
281,569
void (Graphics g) { if (shouldPaintBackground()) { g.setColor(getBackground()); g.fillRect(0, 0, getWidth(), getHeight()); } super.paintComponent(g); }
paintComponent
281,570
AccessibleContext () { if (accessibleContext == null) { accessibleContext = new AccessibleContextDelegateWithContextMenu(super.getAccessibleContext()) { @Override protected void doShowContextMenu() { ActionManager.getInstance().tryToExecute(ActionManager.getInstance().getAction("ShowPopupMenu"), null, null, null, true); } @Override protected Container getDelegateParent() { return getParent(); } }; } return accessibleContext; }
getAccessibleContext
281,571
void () { ActionManager.getInstance().tryToExecute(ActionManager.getInstance().getAction("ShowPopupMenu"), null, null, null, true); }
doShowContextMenu
281,572
Container () { return getParent(); }
getDelegateParent
281,573
Component (JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) { try { rendererComponentInner(tree, value, selected, expanded, leaf, row, hasFocus); } catch (ProcessCanceledException e) { throw e; } catch (Exception e) { try { LOG.error(e); } catch (Exception ignore) { } } return this; }
getTreeCellRendererComponent
281,574
void (JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) { myTree = tree; clear(); mySelected = selected; myFocusedCalculated = false; // We paint background if and only if tree path is selected and tree has focus. // If path is selected and tree is not focused then we just paint focused border. if (UIUtil.isFullRowSelectionLAF()) { setBackground(selected ? UIUtil.getTreeSelectionBackground() : null); } else if (WideSelectionTreeUI.isWideSelection(tree)) { setPaintFocusBorder(false); if (selected) { setBackground(RenderingUtil.getSelectionBackground(tree)); } else { setBackground(null); } } else if (selected) { setPaintFocusBorder(true); if (isFocused()) { setBackground(UIUtil.getTreeSelectionBackground()); } else { setBackground(null); } } else { setBackground(null); } if (value instanceof LoadingNode) { setForeground(JBColor.GRAY); setIcon(LOADING_NODE_ICON); } else { setForeground(RenderingUtil.getForeground(tree, selected)); setIcon(null); } if (WideSelectionTreeUI.isWideSelection(tree)) { super.setOpaque(false); // avoid erasing Nimbus focus frame super.setIconOpaque(false); } else { super.setOpaque(myOpaque || selected && hasFocus || selected && isFocused()); // draw selection background even for non-opaque tree } customizeCellRenderer(tree, value, selected, expanded, leaf, row, hasFocus); if (!myUsedCustomSpeedSearchHighlighting && !(value instanceof LoadingNode)) { SpeedSearchUtil.applySpeedSearchHighlightingFiltered(tree, value, this, true, selected); } }
rendererComponentInner
281,575
JTree () { return myTree; }
getTree
281,576
boolean () { if (!myFocusedCalculated) { myFocused = calcFocusedState(); myFocusedCalculated = true; } return myFocused; }
isFocused
281,577
boolean () { return myTree.hasFocus(); }
calcFocusedState
281,578
void (boolean isOpaque) { myOpaque = isOpaque; super.setOpaque(isOpaque); }
setOpaque
281,579
Font () { Font font = super.getFont(); // Cell renderers could have no parent and no explicit set font. // Take tree font in this case. if (font != null) return font; JTree tree = getTree(); return tree != null ? tree.getFont() : null; }
getFont
281,580
void (@NotNull @Nls String fragment, @NotNull SimpleTextAttributes attributes, boolean isMainText) { if (mySelected && isFocused() && JBUI.CurrentTheme.Tree.Selection.forceFocusedSelectionForeground()) { super.append(fragment, new SimpleTextAttributes(attributes.getStyle(), UIUtil.getTreeSelectionForeground(true)), isMainText); } else { super.append(fragment, attributes, isMainText); } }
append
281,581
void () { // no need for this in a renderer }
revalidateAndRepaint
281,582
void (@Nullable @Nls String accessibleStatusText) { myAccessibleStatusText = accessibleStatusText; }
setAccessibleStatusText
281,583
AccessibleContext () { if (accessibleContext == null) { accessibleContext = new AccessibleContextDelegateWithContextMenu(new AccessibleColoredTreeCellRenderer()) { @Override protected void doShowContextMenu() { ActionManager.getInstance().tryToExecute(ActionManager.getInstance().getAction("ShowPopupMenu"), null, null, null, true); } @Override protected Container getDelegateParent() { return getParent(); } @Override public String getAccessibleName() { String name = super.getAccessibleName(); if (myAccessibleStatusText != null && !myAccessibleStatusText.isEmpty()) { if (name == null) name = myAccessibleStatusText; else { if (!name.endsWith(",")) name += ","; name += " " + myAccessibleStatusText + "."; } } return name; } }; } return accessibleContext; }
getAccessibleContext
281,584
void () { ActionManager.getInstance().tryToExecute(ActionManager.getInstance().getAction("ShowPopupMenu"), null, null, null, true); }
doShowContextMenu
281,585
Container () { return getParent(); }
getDelegateParent
281,586
String () { String name = super.getAccessibleName(); if (myAccessibleStatusText != null && !myAccessibleStatusText.isEmpty()) { if (name == null) name = myAccessibleStatusText; else { if (!name.endsWith(",")) name += ","; name += " " + myAccessibleStatusText + "."; } } return name; }
getAccessibleName
281,587
void () { }
validate
281,588
void () { }
invalidate
281,589
void () { }
revalidate
281,590
void (long tm, int x, int y, int width, int height) { }
repaint
281,591
void (String propertyName, Object oldValue, Object newValue) { }
firePropertyChange
281,592
void (String propertyName, byte oldValue, byte newValue) { }
firePropertyChange
281,593
void (String propertyName, char oldValue, char newValue) { }
firePropertyChange
281,594
void (String propertyName, short oldValue, short newValue) { }
firePropertyChange
281,595
void (String propertyName, int oldValue, int newValue) { }
firePropertyChange
281,596
void (String propertyName, long oldValue, long newValue) { }
firePropertyChange
281,597
void (String propertyName, float oldValue, float newValue) { }
firePropertyChange
281,598
void (String propertyName, double oldValue, double newValue) { }
firePropertyChange
281,599
void (String propertyName, boolean oldValue, boolean newValue) { }
firePropertyChange