Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
245,100
boolean () { return myFadedIn; }
wasFadedIn
245,101
boolean () { return myFadedOut; }
wasFadedOut
245,102
boolean () { return isDisposed; }
isDisposed
245,103
String () { return myTitle; }
getTitle
245,104
void (@NlsContexts.NotificationTitle String title) { myTitle = title; myTitleLabel.setText(title); }
setTitle
245,105
void (@NotNull ActionProvider actionProvider) { myActionProvider = actionProvider; }
setActionProvider
245,106
RelativePoint () { Point p = myPosition.getShiftedPoint(myTargetPoint, myCalloutShift * -1); return new RelativePoint(myLayeredPane, p); }
getShowingPoint
245,107
void (boolean enabled) { myAnimationEnabled = enabled; }
setAnimationEnabled
245,108
boolean () { return myAnimationEnabled && myAnimationCycle > 0 && !RemoteDesktopService.isRemoteSession(); }
isAnimationEnabled
245,109
void (boolean blockClicks) { myBlockClicks = blockClicks; }
setBlockClicks
245,110
boolean () { return myBlockClicks; }
isBlockClicks
245,111
boolean () { return myClickHandler != null || !myCloseOnClick || isBlockClicks(); }
isClickProcessor
245,112
String () { return myId; }
getId
245,113
void (String id) { myId = id; }
setId
245,114
int () { return myClipY; }
getClipY
245,115
void (int clipY) { int oldClip = myClipY; myClipY = clipY; if (oldClip != clipY) { component.repaint(); } }
setClipY
245,116
void (boolean aFlag) { if (myActionButtons != null) { for (ActionButton button : myActionButtons) { button.setVisible(aFlag); } } }
setActionButtonsVisible
245,117
void (@NotNull AnActionEvent e) { Window root = parent(); if (root != null) { List<ColorPickerListener> listeners = ColorPickerListenerFactory.createListenersFor(e.getData(CommonDataKeys.PSI_ELEMENT)); ColorPicker.ColorPickerDialog picker = new ColorPicker.ColorPickerDialog(root, IdeBundle.message("dialog.title.color.p...
actionPerformed
245,118
void (@NotNull AnActionEvent e) { Component component = e.getData(PlatformCoreDataKeys.CONTEXT_COMPONENT); if (component == null || !(SwingUtilities.getWindowAncestor(component) instanceof Frame)) { e.getPresentation().setEnabledAndVisible(false); return; } e.getPresentation().setEnabledAndVisible(true); }
update
245,119
ActionUpdateThread () { return ActionUpdateThread.EDT; }
getActionUpdateThread
245,120
Window () { Window activeWindow = null; for (Window w : Window.getWindows()) { if (w.isActive()) {activeWindow = w;} } return activeWindow; }
parent
245,121
void (@NotNull EditorEx editor) { editor.setOneLineMode(isEnabled()); }
customize
245,122
String (Object element) { return textGetter.apply((T)element); }
getElementText
245,123
ComboboxSpeedSearch (final @NotNull JComboBox<?> comboBox) { ComboboxSpeedSearch search = new ComboboxSpeedSearch(comboBox, null); search.setupListeners(); return search; }
installOn
245,124
void () { super.setupListeners(); removeKeyStroke(myComponent.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT), KeyStroke.getKeyStroke(' ', 0)); }
setupListeners
245,125
void (@Nullable InputMap map, KeyStroke ks) { while (map != null) { map.remove(ks); map = map.getParent(); } }
removeKeyStroke
245,126
void (Object element, String selectedText) { myComponent.setSelectedItem(element); myComponent.repaint(); }
selectElement
245,127
int () { return myComponent.getSelectedIndex(); }
getSelectedIndex
245,128
int () { return myComponent.getModel().getSize(); }
getElementCount
245,129
Object (int viewIndex) { return myComponent.getModel().getElementAt(viewIndex); }
getElementAt
245,130
String (Object element) { return element == null ? null : element.toString(); }
getElementText
245,131
void () { }
refreshSelection
245,132
boolean () { return false; }
isPopupActive
245,133
void (@NotNull PropertyChangeListener listener) { }
addChangeListener
245,134
void (@NotNull PropertyChangeListener listener) { }
removeChangeListener
245,135
void (@NotNull String searchQuery) { }
findAndSelectElement
245,136
SearchTextField () { SearchTextField field = new SearchTextField(false) { @Override protected boolean preprocessEventForTextField(KeyEvent e) { if (e.getKeyCode() == KeyEvent.VK_DOWN || e.getKeyCode() == KeyEvent.VK_UP) { myTree.dispatchEvent(e); return true; } if (e.getKeyCode() == KeyEvent.VK_ESCAPE && getText().isEm...
installSearchField
245,137
boolean (KeyEvent e) { if (e.getKeyCode() == KeyEvent.VK_DOWN || e.getKeyCode() == KeyEvent.VK_UP) { myTree.dispatchEvent(e); return true; } if (e.getKeyCode() == KeyEvent.VK_ESCAPE && getText().isEmpty()) { UIUtil.requestFocus(myTree); return true; } return false; }
preprocessEventForTextField
245,138
SpeedSearchSupply (@NotNull SearchTextField searchTextField) { return new FilteringSpeedSearch(searchTextField); }
createSpeedSearch
245,139
void (String pattern) { TreePath[] paths = myTree.getSelectionModel().getSelectionPaths(); getSearchModel().refilter(); expandTreeOnSearchUpdateComplete(pattern); myTree.getSelectionModel().setSelectionPaths(paths); onSpeedSearchUpdateComplete(pattern); }
onSearchFieldUpdated
245,140
void (@NotNull T node) { TreeUtil.selectInTree(node, false, myTree); }
select
245,141
boolean (@NotNull T node) { String text = getText(getUserObject(node)); return text != null && matchingFragments(text) != null; }
isMatching
245,142
Iterator<T> (@Nullable T start, boolean fwd) { JBTreeTraverser<T> traverser = JBTreeTraverser.from(n -> { int count = n.getChildCount(); List<T> children = new ArrayList<>(count); for (int i = 0; i < count; ++i) { T c = ObjectUtils.tryCast(n.getChildAt(fwd ? i : count - i - 1), getNodeClass()); if (c != null) children....
iterate
245,143
void () { TreeSpeedSearch supply = new TreeSpeedSearch(myTree, true, null, p -> StringUtil.notNullize(getText(p == null ? null : getUserObject((TreeNode)p.getLastPathComponent())))) { @Override protected void onSearchFieldUpdated(String pattern) { super.onSearchFieldUpdated(pattern); //constructor of popup if (StringUt...
installSimple
245,144
void (String pattern) { super.onSearchFieldUpdated(pattern); //constructor of popup if (StringUtil.isNotEmpty(pattern) && !isPopupActive()) { SwingUtilities.invokeLater(() -> { getSearchModel().refilter(); if (StringUtil.isNotEmpty(pattern)) TreeUtil.expandAll(myTree); }); } else { getSearchModel().refilter(); } }
onSearchFieldUpdated
245,145
Tree () { return myTree; }
getTree
245,146
JComponent () { return myTree; }
getComponent
245,147
void (@Nullable String pattern) { if (StringUtil.isNotEmpty(pattern)) TreeUtil.expandAll(myTree); }
expandTreeOnSearchUpdateComplete
245,148
void (@Nullable String pattern) { }
onSpeedSearchUpdateComplete
245,149
boolean () { return true; }
useIdentityHashing
245,150
T () { return myRoot; }
getRoot
245,151
void (@NotNull SpeedSearchSupply supply) { mySpeedSearch = supply; updateStructure(); }
setSpeedSearch
245,152
SpeedSearchSupply () { return mySpeedSearch; }
getSpeedSearch
245,153
void () { Map<U, N> newNodes = createUserObjectMap(); for (U node : JBTreeTraverser.from(myStructure).withRoot(getRootObject())) { N treeNode = myNodeCache.get(node); newNodes.put(node, treeNode == null ? createNode(node) : treeNode); } List<N> oldNodes = new ArrayList<>(); for (Map.Entry<U, N> entry : myNodeCache.entr...
updateStructure
245,154
N () { return (N)root; }
getRoot
245,155
U () { return myRootObject; }
getRootObject
245,156
N (@NotNull U object) { N node = getCachedNode(object); if (node == null) myNodeCache.put(object, node = createNode(object)); return node; }
getNode
245,157
N (@NotNull U object) { assert !(object instanceof DefaultMutableTreeNode); return myFactory.fun(object); }
createNode
245,158
void () { if (mySpeedSearch.isPopupActive()) { Set<U> acceptCache = createUserObjectSet(); computeAcceptCache(myRootObject, acceptCache); filterChildren(myRootObject, x -> acceptCache.contains(x)); } else { filterChildren(myRootObject, x -> true); } }
refilter
245,159
Set<U> () { return myUseIdentityHashing ? new ReferenceOpenHashSet<>() : new HashSet<>(); }
createUserObjectSet
245,160
boolean (@Nullable U u1, @Nullable U u2) { return myUseIdentityHashing ? u1 == u2 : Objects.equals(u1, u2); }
equalUserObjects
245,161
boolean (@NotNull U object, @NotNull Set<? super U> cache) { boolean isAccepted = false; Iterable<? extends U> children = getChildren(object); for (U child : children) { isAccepted |= computeAcceptCache(child, cache); } String name = myNamer.fun(object); isAccepted |= object == myRootObject || name != null && accept(na...
computeAcceptCache
245,162
void (@Nullable U object, @NotNull Condition<? super U> filter) { if (object == null) return; N node = getNode(object); filterDirectChildren(node, filter); for (int i = 0, c = node.getChildCount(); i < c; ++i) { filterChildren(getUserObject(getChild(node, i)), filter); } }
filterChildren
245,163
void (@NotNull N node, @NotNull Condition<? super U> filter) { Set<U> acceptedSet = createUserObjectSet(); List<U> acceptedList = new ArrayList<>(); for (U child : getChildren(getUserObject(node))) { if (filter.value(child)) { acceptedSet.add(child); acceptedList.add(child); } } removeNotAccepted(node, acceptedSet); me...
filterDirectChildren
245,164
void (@NotNull N node, List<? extends U> accepted) { int k = 0; N cur = getChildSafe(node, 0); IntList newIds = new IntArrayList(); for (U child : accepted) { U curUsrObject = getUserObject(cur); boolean isCur = cur != null && equalUserObjects(child, curUsrObject); if (isCur) { cur = getChildSafe(node, k + 1); } else {...
mergeAcceptedNodes
245,165
void (@NotNull N node, Set<U> accepted) { IntList removedIds = new IntArrayList(); List<N> removedNodes = new ArrayList<>(); for (int i = node.getChildCount() - 1; i >= 0; --i) { N child = getChild(node, i); if (!accepted.contains(getUserObject(child))) { removedIds.add(i); removedNodes.add(child); node.remove(i); } } ...
removeNotAccepted
245,166
boolean (@Nullable String name) { if (name == null) return true; return mySpeedSearch.matchingFragments(name) != null; }
accept
245,167
boolean (Object node) { return getRoot() != node && super.isLeaf(node); }
isLeaf
245,168
void (@NotNull DocumentEvent e) { if (!myUpdating) { myUpdating = true; try { String text = myField.getText(); updatePattern(text); onUpdatePattern(text); update(); } finally { myUpdating = false; } } }
textChanged
245,169
void (KeyEvent e) { if (selectTargetElement(e.getKeyCode())) { e.consume(); } }
keyPressed
245,170
void () { String filter = getFilter(); if (!myUpdating) { myUpdating = true; try { myField.setText(filter); } finally { myUpdating = false; } } onSearchFieldUpdated(filter); updateSelection(); }
update
245,171
void () { myField.setBackground(LightColors.RED); }
noHits
245,172
void () { Item selection = getSelection(); if (selection != null && isMatching(selection)) return; JBIterator<Item> it = JBIterator.from(iterate(selection, true, true)) .filter(item -> item != selection && isMatching(item)); if (!it.advance()) return; select(it.current()); }
updateSelection
245,173
void (@Nullable String text) { }
onUpdatePattern
245,174
void (String pattern) { }
onSearchFieldUpdated
245,175
Iterator<Item> (@Nullable Item start, boolean fwd, boolean wrap) { if (!wrap || start == null) return iterate(start, fwd); return new JBIterator<>() { boolean wrapped = false; Iterator<Item> it = iterate(start, fwd); @Override protected Item nextImpl() { if (it.hasNext()) return it.next(); if (wrapped) return stop(); w...
iterate
245,176
Item () { if (it.hasNext()) return it.next(); if (wrapped) return stop(); wrapped = true; it = JBIterator.from(iterate(null, fwd)).takeWhile(item -> item != start); return it.hasNext() ? it.next() : stop(); }
nextImpl
245,177
boolean (int keyCode) { if (!isPopupActive()) return false; Iterator<Item> it; if (keyCode == KeyEvent.VK_UP) { it = iterate(getSelection(), false, UISettings.getInstance().getCycleScrolling()); } else if (keyCode == KeyEvent.VK_DOWN) { it = iterate(getSelection(), true, UISettings.getInstance().getCycleScrolling()); }...
selectTargetElement
245,178
void () { super.repaint(); if (myRepaintPanel != null) { myRepaintPanel.repaint(); } }
repaint
245,179
void (@NotNull Graphics g, @NotNull Icon icon) { icon.paintIcon(this, g, CloseHoverBounds.x, CloseHoverBounds.y); }
paintIcon
245,180
void () { DefaultActionGroup group = new MyActionGroup(); if (NotificationsConfigurationImpl.getInstanceImpl().isRegistered(myNotification.getGroupId())) { group.add(new DumbAwareAction(IdeBundle.message("notification.settings.action.text")) { @Override public void actionPerformed(@NotNull AnActionEvent event) { doShow...
showMorePopup
245,181
void (@NotNull AnActionEvent event) { doShowSettings(); }
actionPerformed
245,182
void (@NotNull AnActionEvent event) { handleDoNotAsk(true); }
actionPerformed
245,183
void (@NotNull AnActionEvent event) { handleDoNotAsk(false); }
actionPerformed
245,184
void () { NotificationCollector.getInstance() .logNotificationSettingsClicked(myNotification.id, myNotification.getDisplayId(), myNotification.getGroupId()); final NotificationsConfigurable configurable = new NotificationsConfigurable(); ShowSettingsUtil.getInstance().editConfigurable(myLayoutData.project, configurable...
doShowSettings
245,185
void (boolean forProject) { myNotification.setDoNotAskFor(forProject ? myLayoutData.project : null); myNotification.expire(); }
handleDoNotAsk
245,186
void (@NotNull Rectangle bounds) { Dimension closeSize = myCloseButton.getPreferredSize(); Insets borderInsets = myBalloon.getShadowBorderInsets(); int x = bounds.x + bounds.width - borderInsets.right - closeSize.width - myLayoutData.configuration.rightActionsOffset.width; int y = bounds.y + borderInsets.top + myLayout...
layout
245,187
void (@Nullable JComponent content) { myDecorator.setContentComponent(content); }
setContentComponent
245,188
void (boolean on) { myDecorator.setOn(on); }
setOn
245,189
boolean () { return myDecorator.isExpanded(); }
isExpanded
245,190
void (@NlsContexts.Separator String title) { myDecorator.setTitle(title); }
setTitle
245,191
String () { return myDecorator.getTitle(); }
getTitle
245,192
void (boolean enabled) { myDecorator.setEnabled(enabled); }
setEnabled
245,193
void (TableColumn column, int preferredWidth) { myColumns.add(Pair.create(column, preferredWidth)); }
addColumn
245,194
void (int step) { myStep = step; }
setStep
245,195
void (ActionEvent e) { if (myColumns.isEmpty()) { stop(); if (myDone != null) { SwingUtilities.invokeLater(myDone); } return; } final TableColumn c = myColumns.get(0).first; if (!added) { myTable.addColumn(c); c.setMaxWidth(0); c.setPreferredWidth(0); c.setWidth(0); added = true; } final int prefWidth = myColumns.get(0...
actionPerformed
245,196
void (Runnable done) { myDone = done; }
startAndDoWhenDone
245,197
void (@NotNull DialogWrapper dialog) { if (isAvailable()) { if ((SystemInfoRt.isMac && StartupUiUtil.INSTANCE.isDarkTheme()) || SystemInfoRt.isWindows) { setRoundedCorners(dialog.getWindow(), JBUI.CurrentTheme.Popup.borderColor(true)); dialog.getRootPane().setBorder(PopupBorder.Factory.createEmpty()); } else { setRound...
configure
245,198
boolean () { if (!JBR.isRoundedCornersManagerSupported()) { return false; } if (!ExperimentalUI.isNewUI() || !Registry.is("ide.popup.rounded.corners", true)) { return false; } if (SystemInfoRt.isWindows) { Long buildNumber = SystemInfo.getWinBuildNumber(); return buildNumber != null && buildNumber.longValue() >= 22000;...
isAvailable
245,199
void (@NotNull Window window) { setRoundedCorners(window, null); }
setRoundedCorners