Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
247,700
void (@Nullable Project project, @NotNull Notification notification) { BALLOON_COLLAPSED.log(project, createNotificationData(notification.getGroupId(), notification.id, notification.getDisplayId())); }
logNotificationBalloonCollapsed
247,701
NotificationCollector () { return ApplicationManager.getApplication().getService(NotificationCollector.class); }
getInstance
247,702
List<String> (@Nullable String entry) { if (entry == null) { return Collections.emptyList(); } List<String> list = new ArrayList<>(); String[] values = StringUtil.convertLineSeparators(entry, "").split(";"); for (String value : values) { if (Strings.isEmptyOrSpaces(value)) { continue; } list.add(value.trim()); } return...
parseIds
247,703
String () { return "notification_group"; }
getRuleId
247,704
ValidationResultType (@NotNull String data, @NotNull EventContext context) { if (UNKNOWN.equals(data)) { return ValidationResultType.ACCEPTED; } NotificationGroup group = NotificationGroupManager.getInstance().getNotificationGroup(data); if (group != null && getPluginInfoById(group.getPluginId()).isDevelopedByJetBrains...
doValidate
247,705
String () { return "notification_display_id"; }
getRuleId
247,706
ValidationResultType (@NotNull String data, @NotNull EventContext context) { if (UNKNOWN.equals(data)) { return ValidationResultType.ACCEPTED; } if (NotificationGroupManager.getInstance().isRegisteredNotificationId(data)) { return ValidationResultType.ACCEPTED; } return ValidationResultType.REJECTED; }
doValidate
247,707
void (@NotNull Notification notification) { if (!NotificationsConfigurationImpl.getSettings(notification.getGroupId()).isShouldReadAloud() || NotificationsAnnouncerKt.isNotificationAnnouncerEnabled()) { return; } String message = notification.getTitle(); if (message.isEmpty()) { message = notification.getContent(); } m...
notify
247,708
void (@NotNull Project project) { if (myEarlyNotifications != null) { myEarlyNotifications.removeIf(pair -> project.equals(pair.second)); } for (Notification notification : getNotificationsOfType(Notification.class, project)) { notification.hideBalloon(); } TooltipController.getInstance().resetCurrent(); }
projectClosed
247,709
void (@NotNull Notification notification) { UIUtil.invokeLaterIfNeeded(() -> { NotificationsToolWindowFactory.Companion.expire(notification); }); }
expire
247,710
void () { NotificationsToolWindowFactory.Companion.expireAll(); }
expireAll
247,711
void (@NotNull Notification notification, @Nullable Project project) { NotificationsConfigurationImpl configuration = NotificationsConfigurationImpl.getInstanceImpl(); NotificationSettings settings = NotificationsConfigurationImpl.getSettings(notification.getGroupId()); if (!configuration.isRegistered(notification.getG...
showNotification
247,712
void () { if (myEarlyNotifications != null) { List<Pair<Notification, @Nullable Project>> copy = myEarlyNotifications; myEarlyNotifications = null; if (LOG.isDebugEnabled()) LOG.debug("dispatching early notifications: " + copy); copy.forEach(early -> showNotificationWithSpan(early.first, early.second)); } }
dispatchEarlyNotifications
247,713
void (Notification notification, @Nullable Project project) { if (LOG.isDebugEnabled()) LOG.debug("incoming: " + notification + ", project=" + project); if (myEarlyNotifications != null) { myEarlyNotifications.add(new Pair<>(notification, project)); return; } String groupId = notification.getGroupId(); NotificationSett...
showNotificationInner
247,714
void (@NotNull LightweightWindowEvent event) { if (!event.isOk()) { notification.expire(); } }
onClosed
247,715
void (HyperlinkEvent e) { if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) { AnAction action = actionListeners.get(e.getDescription()); if (action != null) { Object source = e.getSource(); DataContext context = source instanceof Component ? DataManager.getInstance().getDataContext((Component)source) : null; ...
hyperlinkUpdate
247,716
void (Notification notification, @Nullable Project project) { TraceUtil.runWithSpanThrows(myTracer, "show notification", (Span span) -> { if(project != null) { span.setAttribute("project", project.toString()); } span.setAttribute("notification", notification.toString()); showNotificationInner(notification, project); })...
showNotificationWithSpan
247,717
void (@NotNull Disposable parentDisposable, @NotNull Runnable callback) { if (ApplicationManager.getApplication().isActive()) { callback.run(); } else { Disposable listenerDisposable = Disposer.newDisposable(); Disposer.register(parentDisposable, listenerDisposable); ApplicationManager.getApplication().getMessageBus()....
frameActivateBalloonListener
247,718
void (@NotNull IdeFrame ideFrame) { Disposer.dispose(listenerDisposable); callback.run(); }
applicationActivated
247,719
Balloon (@NotNull IdeFrame window, @NotNull Notification notification, boolean showCallout, boolean hideOnClickOutside, @NotNull Ref<BalloonLayoutData> layoutDataRef, @NotNull Disposable parentDisposable) { return createBalloon(window.getComponent(), notification, showCallout, hideOnClickOutside, layoutDataRef, parentD...
createBalloon
247,720
Balloon (@Nullable JComponent windowComponent, @NotNull Notification notification, boolean showCallout, boolean hideOnClickOutside, @NotNull Ref<BalloonLayoutData> layoutDataRef, @NotNull Disposable parentDisposable) { BalloonLayoutData layoutData = layoutDataRef.isNull() ? new BalloonLayoutData() : layoutDataRef.get()...
createBalloon
247,721
void (Graphics g) { super.paintComponent(g); if (layoutData.showMinSize) { Point location = getCollapsedTextEndLocation(this, layoutData); if (location != null) { if (g instanceof Graphics2D) { ((Graphics2D)g).setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON); } g.setColor(g...
paintComponent
247,722
void (AdjustmentEvent e) { JScrollBar scrollBar = pane.getVerticalScrollBar(); if (layoutData.showMinSize && scrollBar.getValue() > 0) { scrollBar.removeAdjustmentListener(this); scrollBar.setValue(0); scrollBar.addAdjustmentListener(this); } }
adjustmentValueChanged
247,723
void (Graphics g) { if (!layoutData.showMinSize) { super.paintGradient(g); } }
paintGradient
247,724
void (Graphics g) { super.paintComponent(g); icon.paintIcon(this, g, layoutData.configuration.iconOffset.width, layoutData.configuration.iconOffset.height); }
paintComponent
247,725
void (@NotNull JComponent component, @NotNull String htmlContent) { component.putClientProperty(AccessibleContext.ACCESSIBLE_NAME_PROPERTY, StringUtil.unescapeXmlEntities(StringUtil.stripHtml(htmlContent, " "))); }
setTextAccessibleName
247,726
JScrollPane (@NotNull Component content, boolean configure) { JScrollPane pane = ScrollPaneFactory.createScrollPane(content, true); if (configure) { configureBalloonScrollPane(pane, FILL_COLOR); } return pane; }
createBalloonScrollPane
247,727
void (@NotNull JScrollPane pane, @NotNull Color fillColor) { pane.setOpaque(false); pane.getViewport().setOpaque(false); pane.setBackground(fillColor); pane.getViewport().setBackground(fillColor); pane.getVerticalScrollBar().setBackground(fillColor); }
configureBalloonScrollPane
247,728
void (Notification notification, NotificationCenterPanel centerPanel, int gap, HoverAdapter hoverAdapter) { NotificationActionPanel actionPanel = new NotificationActionPanel(gap, notification.getCollapseDirection()); centerPanel.addActionPanel(actionPanel); List<AnAction> actions = notification.getActions(); int action...
createActionPanel
247,729
void (@NotNull JButton button, @NotNull String colorKey, @NotNull String colorProperty) { if (UIManager.getColor(colorKey) != null) { button.putClientProperty(colorProperty, JBColor.namedColor(colorKey)); } }
setButtonColor
247,730
LinkLabel<AnAction> (@NotNull Notification notification, @NotNull AnAction action) { Presentation presentation = action.getTemplatePresentation(); @SuppressWarnings("DialogTitleCapitalization") String text = presentation.getText(); // action templates are unfit for the context :/ return new LinkLabel<>(text, presentati...
createAction
247,731
Color () { return NotificationsUtil.getLinkButtonForeground(); }
getTextColor
247,732
void (Notification notification, NotificationActionPanel actionPanel) { DropDownAction action = new DropDownAction(notification.getDropDownText(), (link, ignored) -> { NotificationActionPanel parent = (NotificationActionPanel)link.getParent(); DefaultActionGroup group = new DefaultActionGroup(); for (LinkLabel<AnAction...
addDropDownAction
247,733
void (@NotNull Component component, @NotNull Function<? super Component, ? extends Rectangle> hover) { myComponents.add(Pair.create(component, hover)); }
addComponent
247,734
void (@NotNull Component component, @NotNull Insets hover) { myComponents.add(Pair.create(component, hover)); }
addComponent
247,735
void (@NotNull Component component) { mySources.add(component); }
addSource
247,736
void () { if (!myComponents.isEmpty()) { for (Component source : mySources) { source.addMouseMotionListener(this); source.addMouseListener(this); } mySources = null; } }
initListeners
247,737
void (MouseEvent e) { handleEvent(e, true, false); }
mousePressed
247,738
void (MouseEvent e) { handleEvent(e, false, false); }
mouseReleased
247,739
void (MouseEvent e) { handleEvent(e, false, true); }
mouseMoved
247,740
void (MouseEvent e) { if (myLastComponent != null) { mouseExited(e, myLastComponent); myLastComponent = null; } }
mouseExited
247,741
void (MouseEvent e, boolean pressed, boolean moved) { if (e.getSource() instanceof JEditorPane pane) { int pos = pane.viewToModel2D(e.getPoint()); if (pos >= 0) { HTMLDocument document = (HTMLDocument)pane.getDocument(); AttributeSet attributes = document.getCharacterElement(pos).getAttributes(); if (attributes.getAttr...
handleEvent
247,742
void (MouseEvent e, Component component) { e.getComponent().setCursor(null); MouseEvent event = createEvent(e, component); MouseListener[] listeners = component.getMouseListeners(); for (MouseListener listener : listeners) { listener.mouseExited(event); } }
mouseExited
247,743
MouseEvent (MouseEvent e, Component c) { return new MouseEvent(c, e.getID(), e.getWhen(), e.getModifiers(), 5, 5, e.getClickCount(), e.isPopupTrigger(), e.getButton()); }
createEvent
247,744
void (BalloonLayoutData layoutData, JPanel panel) { @SuppressWarnings("removal") String shortTitle = NotificationParentGroup.getShortTitle(layoutData.groupId); String title = shortTitle != null ? IdeBundle.message("notification.manager.merge.n.more.from", layoutData.mergeData.count, shortTitle) : IdeBundle.message("not...
createMergeAction
247,745
boolean (Point pt) { return true; }
isInClickableArea
247,746
Color () { return NotificationsUtil.getMoreButtonForeground(); }
getTextColor
247,747
Dimension (Container parent) { return new Dimension(parent.getWidth(), JBUIScale.scale(20) + 2); }
preferredLayoutSize
247,748
void (Container parent) { parent.getComponent(0).setBounds(2, 1, parent.getWidth() - 4, JBUIScale.scale(20)); }
layoutContainer
247,749
void (Graphics g) { super.paintComponent(g); g.setColor(NotificationsUtil.getMoreButtonBackground()); ((Graphics2D)g).fill(new Rectangle2D.Double(1.5, 1, getWidth() - 2.5, getHeight() - 2)); g.setColor(JBColor.namedColor("Notification.MoreButton.innerBorderColor", new JBColor(0xDBDBDB, 0x353738))); if (SystemInfo.isMac...
paintComponent
247,750
int (int lines) { String word = IdeBundle.message("notification.manager.content.height.word"); String lineBreak = IdeBundle.message("notification.manager.content.height.linebreak"); String content = word + StringUtil.repeat(lineBreak + word, lines - 1); JEditorPane text = new JEditorPane(); text.setEditorKit(HTMLEditor...
calculateContentHeight
247,751
boolean () { Application app = ApplicationManager.getApplication(); return app.isUnitTestMode() || app.isCommandLine(); }
isDummyEnvironment
247,752
void (@NotNull Balloon balloon) { myAlarm.cancelAllRequests(); myPopupMenu.addPopupMenuListener(this); Disposer.register(balloon, this); }
setupListeners
247,753
void (PopupMenuEvent e) { myHandleDispose = false; Disposer.dispose(this); myComponent.putClientProperty("PopupHideInProgress", Boolean.TRUE); myAlarm.addRequest(() -> myComponent.putClientProperty("PopupHideInProgress", null), 500); }
popupMenuWillBecomeInvisible
247,754
void () { myPopupMenu.removePopupMenuListener(this); if (myHandleDispose) { myPopupMenu.setVisible(false); } }
dispose
247,755
void (Component c, Graphics g, int x, int y) { icon.paintIcon(c, g, x, y + 1); }
paintIcon
247,756
int () { return icon.getIconWidth(); }
getIconWidth
247,757
int () { return icon.getIconHeight(); }
getIconHeight
247,758
Color () { return NotificationsUtil.getLinkButtonForeground(); }
getTextColor
247,759
void (@NotNull Notification notification, @NotNull LinkLabel<?> link, @NotNull DefaultActionGroup group, @NotNull Alarm popupAlarm) { if (link.getClientProperty("PopupHideInProgress") != null) { return; } JPopupMenu menu = showPopup(link, group); Balloon balloon = notification.getBalloon(); if (menu != null && balloon ...
showPopup
247,760
int (JEditorPane text) { try { int end = text.getDocument().getLength(); for (int i = 0; i < end; i++) { Rectangle2D r = text.modelToView2D(i); if (r != null) { int height = (int)r.getHeight(); if (height > 0) return height; } } } catch (BadLocationException ignored) { } return 0; }
getFirstLineHeight
247,761
void (JLabel title) { add(title, BorderLayout.NORTH); myLayout.myTitleComponent = title; }
addTitle
247,762
Component () { return myLayout.getTitle(); }
getTitle
247,763
void (LinkLabel<Void> action) { add(action, BorderLayout.EAST); myLayout.myExpandAction = action; }
addExpandAction
247,764
void (JComponent component) { add(component, BorderLayout.CENTER); myLayout.myCenteredComponent = component; }
addContent
247,765
void (NotificationActionPanel panel) { add(panel, BorderLayout.SOUTH); myLayout.myActionPanel = panel; }
addActionPanel
247,766
void (Graphics g) { super.paintChildren(g); Component title = myLayout.getTitle(); if (title != null && myLayoutData.showActions != null && myLayoutData.showActions.compute()) { int width = myLayoutData.configuration.allActionsOffset; int x = getWidth() - width - JBUIScale.scale(5); int y = myLayoutData.configuration.t...
paintChildren
247,767
void (DropDownAction action) { add(action); groupedActionsLink = action; }
addGroupedActionsLink
247,768
void (LinkLabel<AnAction> label) { add(HorizontalLayout.LEFT, label); actionLinks.add(label); }
addActionLink
247,769
void (JComponent component) { add(HorizontalLayout.LEFT, component); }
addAction
247,770
Dimension (Container parent) { return layoutSize(component -> component.getPreferredSize()); }
preferredLayoutSize
247,771
Dimension (Container parent) { return layoutSize(component -> component.getMinimumSize()); }
minimumLayoutSize
247,772
Dimension (Function<? super Component, ? extends Dimension> size) { Dimension titleSize = myTitleComponent == null ? new Dimension() : size.apply(myTitleComponent); Dimension centeredSize = myCenteredComponent == null ? new Dimension() : size.apply(myCenteredComponent); Dimension actionSize = myActionPanel == null ? ne...
layoutSize
247,773
void (Container parent) { int top = myLayoutData.configuration.topSpaceHeight; int width = parent.getWidth(); Dimension centeredSize = myCenteredComponent == null ? new Dimension() : myCenteredComponent.getPreferredSize(); boolean isActions = myActionPanel != null || (myExpandAction != null && !myLayoutData.showMinSize...
layoutContainer
247,774
void (@NotNull Component component, @NotNull Dimension size, int width) { size.width = width; component.setPreferredSize(size); if (component instanceof JButton button) { button.setToolTipText(button.getText()); } else if (component instanceof JLabel label) { label.setToolTipText(label.getText()); } }
cutWidth
247,775
void (MouseEvent e) { if (!myLayoutData.showMinSize) { super.mouseClicked(e); } }
mouseClicked
247,776
void (MouseEvent e) { if (!myLayoutData.showMinSize) { super.mousePressed(e); } }
mousePressed
247,777
void (MouseEvent e) { if (!myLayoutData.showMinSize) { super.mouseReleased(e); } }
mouseReleased
247,778
void (MouseEvent e) { if (!myLayoutData.showMinSize) { super.mouseEntered(e); } }
mouseEntered
247,779
void (MouseEvent e) { if (!myLayoutData.showMinSize) { super.mouseExited(e); } }
mouseExited
247,780
void (MouseEvent e) { if (!myLayoutData.showMinSize) { super.mouseDragged(e); } }
mouseDragged
247,781
void (MouseEvent e) { if (!myLayoutData.showMinSize) { super.mouseMoved(e); } }
mouseMoved
247,782
void (@NotNull SearchableOptionProcessor processor) { for (NotificationSettings settings : NotificationsConfigurationImpl.getInstanceImpl().getAllSettings()) { processor.addOptions(settings.getGroupId(), null, settings.getGroupId() + " notifications", NotificationsConfigurable.ID, NotificationsConfigurable.displayName(...
processOptions
247,783
NotificationsConfigurationImpl () { return (NotificationsConfigurationImpl)getNotificationsConfiguration(); }
getInstanceImpl
247,784
void (@NotNull Notification notification) { getInstanceImpl().notify(notification); }
notify
247,785
void (String... toRemove) { getInstanceImpl().doRemove(toRemove); }
remove
247,786
NotificationSettings (@NotNull String groupId) { NotificationSettings settings; NotificationsConfigurationImpl impl = getInstanceImpl(); synchronized (impl) { settings = impl.myIdToSettingsMap.get(groupId); } return settings == null ? getDefaultSettings(groupId) : settings; }
getSettings
247,787
NotificationSettings (String groupId) { NotificationGroup group = NotificationGroup.findRegisteredGroup(groupId); if (group != null) { return new NotificationSettings(groupId, group.getDisplayType(), group.isLogByDefault(), false); } return new NotificationSettings(groupId, NotificationDisplayType.BALLOON, true, false)...
getDefaultSettings
247,788
void (@NotNull String groupDisplayName, @NotNull NotificationDisplayType displayType) { register(groupDisplayName, displayType, true); }
register
247,789
void (@NotNull String groupDisplayName, @NotNull NotificationDisplayType displayType, boolean shouldLog) { register(groupDisplayName, displayType, shouldLog, false); }
register
247,790
void (@NotNull String groupDisplayName, @NotNull NotificationDisplayType displayType, boolean shouldLog, boolean shouldReadAloud) { register(groupDisplayName, displayType, shouldLog, shouldReadAloud, null); }
register
247,791
void (@NotNull String groupDisplayName, @NotNull NotificationDisplayType displayType, boolean shouldLog, boolean shouldReadAloud, @Nullable String toolWindowId) { if (!isRegistered(groupDisplayName)) { // register a new group and remember these settings as default new NotificationGroup(groupDisplayName, displayType, sh...
register
247,792
boolean () { return SHOW_BALLOONS; }
areNotificationsEnabled
247,793
NotificationAnnouncingMode () { if (NOTIFICATION_ANNOUNCING_MODE != null) return NOTIFICATION_ANNOUNCING_MODE; else if (SystemInfo.isWindows) return NotificationAnnouncingMode.NONE; else return NotificationAnnouncingMode.MEDIUM; }
getNotificationAnnouncingMode
247,794
void (@NotNull NotificationAnnouncingMode mode) { NOTIFICATION_ANNOUNCING_MODE = mode; }
setNotificationAnnouncingMode
247,795
NotificationDisplayType (@NotNull String groupId) { return getSettings(groupId).getDisplayType(); }
getDisplayType
247,796
void (@NotNull String groupId, @NotNull NotificationDisplayType displayType) { changeSettings(getSettings(groupId).withDisplayType(displayType)); }
setDisplayType
247,797
void (@NotNull String groupId, @NotNull NotificationDisplayType displayType, boolean shouldLog, boolean shouldReadAloud) { changeSettings(new NotificationSettings(groupId, displayType, shouldLog, shouldReadAloud)); }
changeSettings
247,798
void () { if (myParents == null) { myParents = new HashMap<>(); NotificationParentGroupBean[] parents = EP_NAME.getExtensions(); for (NotificationParentGroupBean bean : parents) { myParents.put(bean.id, bean); } myChildren = new HashMap<>(); for (NotificationParentGroupBean bean : parents) { if (bean.parentId != null) ...
prepareInfo
247,799
List<NotificationParentGroupBean> (@NotNull NotificationParentGroupBean parent) { prepareInfo(); List<NotificationParentGroupBean> children = myChildren.get(parent); return children == null ? Collections.emptyList() : children; }
getChildren