Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
50,700
int () { return myNamespaces.size(); }
getRowCount
50,701
int () { return 2; }
getColumnCount
50,702
Object (int rowIndex, int columnIndex) { final Namespace namespace = myNamespaces.get(rowIndex); return columnIndex == 0 ? namespace.getPrefix() : namespace.getUri(); }
getValueAt
50,703
void (Object aValue, int rowIndex, int columnIndex) { if (columnIndex == 0) { final Namespace namespace = myNamespaces.get(rowIndex); namespace.setPrefix((String)aValue); } }
setValueAt
50,704
void (Namespace namespace) { final int firstRow = myNamespaces.size(); myNamespaces.add(namespace); fireTableRowsInserted(firstRow, firstRow); }
addNamespace
50,705
void (int selectedRow) { myNamespaces.remove(selectedRow); fireTableRowsDeleted(selectedRow, selectedRow); }
removeNamespace
50,706
Component (JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column); setForeground(table.getForeground()); final String prefix = myNamespaces.get(row).getPrefix(); if (column == 1 && prefix == null || pr...
getTableCellRendererComponent
50,707
String (String prefix, XmlElement context) { return Namespace.makeMap(myNamespaceTableModel.getNamespaces()).get(prefix); }
getNamespaceURI
50,708
String (String uri, XmlElement context) { final BidirectionalMap<String, String> bidiMap = new BidirectionalMap<>(); bidiMap.putAll(Namespace.makeMap(myNamespaceTableModel.getNamespaces())); final List<String> list = bidiMap.getKeysByValue(uri); return list != null && list.size() > 0 ? list.get(0) : null; }
getPrefixForURI
50,709
Collection<String> (XmlElement context) { return Namespace.makeMap(myNamespaceTableModel.getNamespaces()).keySet(); }
getKnownPrefixes
50,710
PsiElement (String prefix, XmlElement context) { return null; }
resolve
50,711
IntentionAction[] (@NotNull PsiReference reference, String localName) { return IntentionAction.EMPTY_ARRAY; }
getUnresolvedNamespaceFixes
50,712
String (XmlElement context) { return null; }
getDefaultNamespace
50,713
ContextType () { return myContextProvider.getContextType(); }
getContextType
50,714
XmlElement () { return myContextProvider.getContextElement(); }
getContextElement
50,715
NamespaceContext () { return myNamespaceContext; }
getNamespaceContext
50,716
VariableContext () { return myVariableContext; }
getVariableContext
50,717
Set<QName> (boolean forValidation) { return myContextProvider.getAttributes(forValidation); }
getAttributes
50,718
Set<QName> (boolean forValidation) { return myContextProvider.getElements(forValidation); }
getElements
50,719
void () { myRoot = this; }
createUIComponents
50,720
JComponent () { return this; }
getComponent
50,721
JLabel () { return myIcon; }
getIcon
50,722
JButton () { return myEditContextButton; }
getEditContextButton
50,723
JPanel () { return myEditorPanel; }
getEditorPanel
50,724
void () {}
dispose
50,725
void (Component c, Graphics g, int x, int y, int width, int height) { if (!c.hasFocus() || c instanceof JComponent && UIUtil.isHelpButton(c)) return; Graphics2D g2 = (Graphics2D)g.create(); try { g2.translate(x, y); float arc = MacIntelliJTextBorder.ARC.getFloat(); if (isSmallVariant(c) && c.isFocusable() && c.hasFocus...
paintBorder
50,726
Insets (Component c) { return isSmallVariant(c) ? JBUI.insets(1, 2).asUIResource() : JBUI.insets(3).asUIResource(); }
getBorderInsets
50,727
boolean () { return false; }
isBorderOpaque
50,728
float (Graphics2D g2) { float f = UIUtil.isRetina(g2) ? 0.5f : 1.0f; return JBUIScale.scale(f); }
LW
50,729
float (Graphics2D g2) { return LW(g2); }
lw
50,730
float () { return BW.getFloat(); }
bw
50,731
Color (boolean enabled, boolean focused) { return OUTLINE_COLOR; }
getOutlineColor
50,732
void (Graphics2D g, Rectangle r, JTextComponent c, boolean fillBackground) { paintMacSearchArea(g, r, c, fillBackground); }
paintSearchArea
50,733
void (Graphics2D g, Rectangle r, JComponent c, boolean fillBackground) { Graphics2D g2 = (Graphics2D)g.create(); try { g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); g2.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, MacUIUtil.USE_QUARTZ ? RenderingHints.VALUE_STROKE_PURE :...
paintMacSearchArea
50,734
Insets () { return PADDINGS; }
paddings
50,735
ComponentUI (final JComponent c) { return new MacIntelliJTextFieldUI(); }
createUI
50,736
int (int textHeight) { Insets i = getComponent().getInsets(); Component c = getComponent(); return DarculaEditorTextFieldBorder.isComboBoxEditor(c) || ComponentUtil.getParentOfType((Class<? extends JSpinner>)JSpinner.class, c) != null || isCompact(c) ? textHeight : MINIMUM_HEIGHT.get() + i.top + i.bottom; }
getMinimumHeight
50,737
Insets () { Component c = getComponent(); return isCompact(c) || DarculaUIUtil.isTableCellEditor(c) ? JBInsets.create(0, 3) : JBInsets.create(1, 6); }
getDefaultMargins
50,738
float () { return BW.getFloat(); }
bw
50,739
ComponentUI (JComponent c) { return new MacIntelliJCheckBoxUI(((JCheckBox)c)); }
createUI
50,740
Icon () { return DEFAULT_ICON; }
getDefaultIcon
50,741
int () { return JBUIScale.scale(3); }
textIconGap
50,742
void (JComponent c, Graphics2D g, AbstractButton b, Rectangle iconRect, boolean selected, boolean enabled) { Graphics2D g2 = (Graphics2D)g.create(); try { String iconName = isIndeterminate(b) ? "checkBoxIndeterminate" : "checkBox"; DarculaUIUtil.Outline op = DarculaUIUtil.getOutline(b); boolean hasFocus = op == null &&...
drawCheckIcon
50,743
void (Component c, Graphics g, int x, int y, int width, int height) { if (!(c instanceof JComponent)) return; Graphics2D g2 = (Graphics2D)g.create(); try { boolean focused = isFocused(c); if (!isTableCellEditor(c)) { g2.translate(x, y); g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS...
paintBorder
50,744
Insets (Component c) { return JBUI.insets(isTableCellEditor(c) ? 2 : 3).asUIResource(); }
getBorderInsets
50,745
boolean (Component c) { if (c instanceof JComboBox<?> comboBox) { if (!comboBox.isEnabled()) { return false; } if (comboBox.isEditable()) { ComboBoxEditor ed = comboBox.getEditor(); Component editorComponent = ed.getEditorComponent(); Component focused = KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwn...
isFocused
50,746
void (Component c, Graphics2D g2, int width, int height) { float lw = LW(g2); float bw = BW.getFloat(); Area area = new Area(new Rectangle2D.Double(0, 0, width, height)); Shape innerShape = isRound(c) ? new RoundRectangle2D.Float(bw + lw, bw + lw, width - (bw + lw) * 2, height - (bw + lw) * 2, bw + lw, bw + lw) : new R...
clipForBorder
50,747
boolean () { return false; }
isSymmetric
50,748
ComponentUI (JComponent c) { return new MacIntelliJProgressBarUI(); }
createUI
50,749
Color (JComponent c) { return UIUtil.isGraphite() ? GRAPHITE_END_COLOR : super.getFinishedColor(c); }
getFinishedColor
50,750
Color (JComponent c) { return UIUtil.isGraphite() ? GRAPHITE_START_COLOR : super.getStartColor(c); }
getStartColor
50,751
Color (JComponent c) { return UIUtil.isGraphite() ? getFinishedColor(c) : super.getEndColor(c); }
getEndColor
50,752
ComponentUI (JComponent c) { return new MacIntelliJPasswordFieldUI(); }
createUI
50,753
void (Graphics graphics) { Graphics2D g = (Graphics2D)graphics; final JTextComponent c = getComponent(); final Container parent = c.getParent(); if (c.isOpaque() && parent != null) { g.setColor(parent.getBackground()); g.fillRect(0, 0, c.getWidth(), c.getHeight()); } if (c.getBorder() instanceof MacIntelliJTextBorder) ...
paintBackground
50,754
int (int originHeight) { JComponent component = getComponent(); Insets insets = component.getInsets(); return isCompact(component) ? originHeight : MINIMUM_HEIGHT.get() + insets.top + insets.bottom; }
getMinimumHeight
50,755
void (Component c, Graphics g, int x, int y, int width, int height) { if (isComboBoxEditor(c)) { g.setColor(c.getBackground()); g.fillRect(x, y, width, height); return; } EditorTextField editorTextField = ComponentUtil.getParentOfType((Class<? extends EditorTextField>)EditorTextField.class, c); if (editorTextField == n...
paintBorder
50,756
Insets (Component c) { return DarculaUIUtil.isTableCellEditor(c) || DarculaUIUtil.isCompact(c) || isComboBoxEditor(c) ? JBInsets.create(2, 3).asUIResource() : JBInsets.create(5, 8).asUIResource(); }
getBorderInsets
50,757
ComponentUI (JComponent c) { return new MacIntelliJSpinnerUI(); }
createUI
50,758
void (Graphics g, JComponent c) { Container parent = c.getParent(); if (c.isOpaque() && parent != null) { g.setColor(parent.getBackground()); g.fillRect(0, 0, c.getWidth(), c.getHeight()); } Insets i = c.getInsets(); int x = c.getWidth() - DEFAULT_ICON.getIconWidth() - i.right; if (c instanceof JSpinner) { Graphics2D g...
paint
50,759
void (Graphics g, BasicArrowButton button, int direction) { }
paintArrowButton
50,760
Dimension (Insets i, Dimension size) { int iconWidth = DEFAULT_ICON.getIconWidth() + i.right; int iconHeight = DEFAULT_ICON.getIconHeight() + i.top + i.bottom; Dimension minSize = new Dimension(i.left + DarculaSpinnerUI.MINIMUM_WIDTH.get() + i.right, iconHeight); size = maximize(size, minSize); Dimension editorSize = s...
getSizeWithButtons
50,761
void () { JComponent editor = spinner.getEditor(); if (editor == null) { return; } Insets i = spinner.getInsets(); Insets m = editorMargins(); int editorHeight = editor.getPreferredSize().height; int editorOffset = (spinner.getHeight() - i.top - i.bottom - m.top - m.bottom - editorHeight) / 2; editor.setBounds(i.left +...
layout
50,762
Rectangle () { Insets i = spinner.getInsets(); return new Rectangle(spinner.getWidth() - DEFAULT_ICON.getIconWidth() - i.right, i.top, DEFAULT_ICON.getIconWidth(), DEFAULT_ICON.getIconHeight()); }
getArrowButtonBounds
50,763
ComponentUI (JComponent c) { return new MacIntelliJRadioButtonUI(); }
createUI
50,764
Icon () { return DEFAULT_ICON; }
getDefaultIcon
50,765
int (AbstractButton b) { return JBUIScale.scale(3); }
textIconGap
50,766
void (JComponent c, Graphics2D g, Rectangle iconRect) { Icon icon = MacIconLookup.getIcon("radio", ((AbstractButton)c).isSelected(), c.hasFocus(), c.isEnabled()); icon.paintIcon(c, g, iconRect.x, iconRect.y); }
paintIcon
50,767
ComponentUI (JComponent c) { return new MacIntelliJComboBoxUI(); }
createUI
50,768
void () { comboBox.setOpaque(false); }
installDarculaDefaults
50,769
void () {}
uninstallDarculaDefaults
50,770
JButton () { Color bg = comboBox.getBackground(); Color fg = comboBox.getForeground(); JButton button = new BasicArrowButton(SwingConstants.SOUTH, bg, fg, fg, fg) { @Override public void paint(Graphics g) { // paint events may still arrive after UI switch until the entire UI is updated if (!LafManager.getInstance().get...
createArrowButton
50,771
void (Graphics g) { // paint events may still arrive after UI switch until the entire UI is updated if (!LafManager.getInstance().getCurrentUIThemeLookAndFeel().getId().equals("macOSLight")) { return; } Icon icon = MacIconLookup.getIcon("comboRight", false, false, comboBox.isEnabled(), comboBox.isEditable()); if (getWi...
paint
50,772
Dimension () { Icon icon = comboBox.isEditable() ? EDITABLE_ICON : ICON; return new Dimension(icon.getIconWidth(), icon.getIconHeight()); }
getPreferredSize
50,773
Dimension (Dimension size, Dimension editorSize) { Insets i = comboBox.getInsets(); Icon icon = comboBox.isEditable() ? EDITABLE_ICON : ICON; int iconWidth = icon.getIconWidth() + i.right; int iconHeight = icon.getIconHeight() + i.top + i.bottom; int editorHeight = editorSize != null ? editorSize.height + i.top + i.bot...
getSizeWithButton
50,774
LayoutManager () { return new BasicComboBoxUI.ComboBoxLayoutManager() { @Override public void layoutContainer(Container parent) { JComboBox cb = (JComboBox)parent; if (arrowButton != null) { Rectangle bounds = cb.getBounds(); Insets cbInsets = cb.getInsets(); Dimension prefSize = arrowButton.getPreferredSize(); int but...
createLayoutManager
50,775
void (Container parent) { JComboBox cb = (JComboBox)parent; if (arrowButton != null) { Rectangle bounds = cb.getBounds(); Insets cbInsets = cb.getInsets(); Dimension prefSize = arrowButton.getPreferredSize(); int buttonHeight = bounds.height - (cbInsets.top + cbInsets.bottom); double ar = (double)buttonHeight / prefSiz...
layoutContainer
50,776
ComboPopup () { if (comboBox.getClientProperty(DarculaJBPopupComboPopup.CLIENT_PROP) != null) { return new DarculaJBPopupComboPopup<>(comboBox) { @Override public void configureList(@NotNull JList<Object> list) { super.configureList(list); list.setSelectionBackground(JBColor.lazy(() -> ColorUtil.withAlpha(UIManager.get...
createPopup
50,777
void (@NotNull JList<Object> list) { super.configureList(list); list.setSelectionBackground(JBColor.lazy(() -> ColorUtil.withAlpha(UIManager.getColor("ComboBox.selectionBackground"), 0.75))); }
configureList
50,778
void () { super.configureList(); list.setSelectionBackground(JBColor.lazy(() -> ColorUtil.withAlpha(UIManager.getColor("ComboBox.selectionBackground"), 0.75))); }
configureList
50,779
void (Graphics g, JComponent c) { Graphics2D g2 = (Graphics2D)g.create(); Rectangle r = new Rectangle(c.getSize()); try { g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); g2.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, RenderingHints.VALUE_STROKE_NORMALIZE); g2.translate(r...
paint
50,780
boolean (Component c) { return DarculaSpinnerBorder.isFocused(c); }
isFocused
50,781
ComponentUI (JComponent c) { return new MacIntelliJButtonUI(); }
createUI
50,782
void (Graphics g, JComponent c) { if (!(c.getBorder() instanceof MacIntelliJButtonBorder)) { super.paint(g, c); return; } int w = c.getWidth(); int h = c.getHeight(); if (UIUtil.isHelpButton(c)) { Icon icon = MacIconLookup.getIcon("help", false, c.hasFocus(), true); int x = (w - icon.getIconWidth()) / 2; int y = (h - i...
paint
50,783
Paint (JComponent b) { int h = b.getHeight(); Insets i = b.getInsets(); if (!b.isEnabled()) { return Gray.xF1; } else if (DarculaButtonUI.isDefaultButton(b)) { return UIUtil.isGraphite() ? new GradientPaint(0, i.top, new Color(0xb2b2b7), 0, h - (i.top + i.bottom), new Color(0x929297)) : new GradientPaint(0, i.top, new ...
getBackgroundPaint
50,784
Paint (JComponent b) { int h = b.getHeight(); Insets i = b.getBorder().getBorderInsets(b); if (!b.isEnabled()) { return new GradientPaint(0, i.top, Gray.xD2, 0, h - (i.top + i.bottom), Gray.xC3); } else if (DarculaButtonUI.isDefaultButton(b)) { return UIUtil.isGraphite() ? new GradientPaint(0, i.top, new Color(0xa5a5ab...
getBorderPaint
50,785
Dimension (JComponent c, Dimension prefSize) { if (UIUtil.isHelpButton(c)) { Icon icon = MacIconLookup.getIcon("help"); return new Dimension(icon.getIconWidth(), icon.getIconHeight()); } else { return super.getDarculaButtonSize(c, prefSize); } }
getDarculaButtonSize
50,786
int () { return MINIMUM_HEIGHT.get(); }
getMinimumHeight
50,787
void (Graphics g, String text, JComponent c, Rectangle textRect, FontMetrics metrics) { int x = textRect.x + getTextShiftOffset(); int y = textRect.y + metrics.getAscent() + getTextShiftOffset(); if (DarculaButtonUI.isDefaultButton(c)) { g.setColor(Gray.xCC); } else { g.setColor(UIManager.getColor("Button.disabledText"...
paintDisabledText
50,788
void (Component c, Graphics g, int x, int y, int width, int height) { if (!(c instanceof JSpinner spinner)) return; Graphics2D g2 = (Graphics2D)g.create(); try { g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); g2.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, RenderingHints...
paintBorder
50,789
Insets (Component c) { return JBUI.insets(1).asUIResource(); }
getBorderInsets
50,790
ComponentUI (JComponent b) { return new WinIntelliJSliderUI(); }
createUI
50,791
void (JSlider slider) { super.installListeners(slider); mouseListener = new MouseAdapter() { @Override public void mousePressed(MouseEvent e) { setProperty(e, PRESSED_PROPERTY, Boolean.TRUE); } @Override public void mouseReleased(MouseEvent e) { setProperty(e, PRESSED_PROPERTY, Boolean.FALSE); } @Override public void m...
installListeners
50,792
void (MouseEvent e) { setProperty(e, PRESSED_PROPERTY, Boolean.TRUE); }
mousePressed
50,793
void (MouseEvent e) { setProperty(e, PRESSED_PROPERTY, Boolean.FALSE); }
mouseReleased
50,794
void (MouseEvent e) { setProperty(e, HOVER_PROPERTY, Boolean.TRUE); }
mouseEntered
50,795
void (MouseEvent e) { setProperty(e, HOVER_PROPERTY, Boolean.FALSE); }
mouseExited
50,796
void (MouseEvent e, String property, Boolean value) { JComponent c = (JComponent)e.getComponent(); c.putClientProperty(property, value); c.repaint(); }
setProperty
50,797
void (JSlider slider) { super.uninstallListeners(slider); if (mouseListener != null) { slider.removeMouseListener(mouseListener); } }
uninstallListeners
50,798
void (int x, int y) { super.setThumbLocation(x, y); slider.repaint(); }
setThumbLocation
50,799
void (Graphics g) { Graphics2D g2 = (Graphics2D)g.create(); try { Rectangle2D coloredTrack, scaleRect; int tw = JBUIScale.scale(1); if (slider.getOrientation() == SwingConstants.HORIZONTAL) { coloredTrack = new Rectangle2D.Double(trackRect.x - thumbRect.width / 2, trackRect.y + trackRect.height - JBUIScale.scale(10), t...
paintTrack