Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
243,900
void (ComponentEvent event) { moveSearchPopup(); }
componentMoved
243,901
void (ComponentEvent event) { moveSearchPopup(); }
componentResized
243,902
void (FocusEvent e) { if (!keepEvenWhenFocusLost()) { manageSearchPopup(null); } }
focusLost
243,903
void (FocusEvent e) { if (!isStickySearch()) return; String text = ClientProperty.get(myComponent, SEARCH_TEXT_KEY); if (Strings.isEmpty(text)) { return; } ApplicationManager.getApplication().invokeLater(() -> { if (myComponent.hasFocus()) { manageSearchPopup(createPopup(text)); // keep selection } }); }
focusGained
243,904
void (KeyEvent e) { processKeyEvent(e); }
keyTyped
243,905
void (KeyEvent e) { processKeyEvent(e); }
keyPressed
243,906
void (@NotNull AnActionEvent e) { String prefix = getEnteredPrefix(); String[] strings = NameUtilCore.splitNameIntoWords(prefix); if (strings.length == 0) return; // "__" has no words String last = strings[strings.length - 1]; int i = prefix.lastIndexOf(last); mySearchPopup.mySearchField.setText(prefix.substring(0, i)....
actionPerformed
243,907
void (@NotNull AnActionEvent e) { e.getPresentation().setEnabled(isPopupActive() && Strings.isNotEmpty(getEnteredPrefix())); }
update
243,908
ActionUpdateThread () { return ActionUpdateThread.EDT; }
getActionUpdateThread
243,909
boolean () { return false; }
isStickySearch
243,910
boolean () { return false; }
keepEvenWhenFocusLost
243,911
boolean (JComponent component) { return getSupply(component) != null; }
hasActiveSpeedSearch
243,912
void (boolean clearSearchOnNavigateNoMatch) { myClearSearchOnNavigateNoMatch = clearSearchOnNavigateNoMatch; }
setClearSearchOnNavigateNoMatch
243,913
boolean () { ThreadingAssertions.assertEventDispatchThread(); return mySearchPopup != null && mySearchPopup.isVisible() || isStickySearch() && Strings.isNotEmpty(myComponent == null ? null : ClientProperty.get(myComponent, SEARCH_TEXT_KEY)); }
isPopupActive
243,914
Iterable<TextRange> (@NotNull String text) { if (!isPopupActive()) return null; final SpeedSearchComparator comparator = getComparator(); final String recentSearchText = comparator.getRecentSearchText(); return Strings.isNotEmpty(recentSearchText) ? comparator.matchingFragments(recentSearchText, text) : null; }
matchingFragments
243,915
int () { LOG.warn("Please implement getElementCount() and getElementAt(int) in " + getClass().getName()); return getAllElements().length; }
getElementCount
243,916
Object (int viewIndex) { throw new UnsupportedOperationException(); }
getElementAt
243,917
int (final int viewIndex) { return viewIndex; }
convertIndexToModel
243,918
ListIterator<Object> (int startingViewIndex) { return new MyListIterator(this, startingViewIndex); }
getElementIterator
243,919
void (@NotNull PropertyChangeListener listener) { myChangeSupport.addPropertyChangeListener(listener); }
addChangeListener
243,920
void (@NotNull PropertyChangeListener listener) { myChangeSupport.removePropertyChangeListener(listener); }
removeChangeListener
243,921
void () { String enteredPrefix = getEnteredPrefix(); myChangeSupport.firePropertyChange(ENTERED_PREFIX_PROPERTY_NAME, myRecentEnteredPrefix, enteredPrefix); myRecentEnteredPrefix = enteredPrefix; }
fireStateChanged
243,922
boolean (Object element, String pattern) { String str = getElementText(element); return str != null && compare(str, pattern); }
isMatchingElement
243,923
boolean (@NotNull String text, @Nullable String pattern) { return pattern != null && myComparator.matchingFragments(pattern, text) != null; }
compare
243,924
SpeedSearchComparator () { return myComparator; }
getComparator
243,925
void (final SpeedSearchComparator comparator) { myComparator = comparator; }
setComparator
243,926
void (String searchText) { manageSearchPopup(createPopup(searchText)); if (mySearchPopup != null && myComponent.isDisplayable()) { mySearchPopup.refreshSelection(); } }
showPopup
243,927
void () { showPopup(""); }
showPopup
243,928
void () { JTextField field = getSearchField(); if (field != null) field.setText(""); manageSearchPopup(null); }
hidePopup
243,929
void (KeyEvent e) { if (e.isAltDown()) return; if (e.isShiftDown() && isNavigationKey(e.getKeyCode())) return; if (mySearchPopup != null) { mySearchPopup.processKeyEvent(e); return; } if (!isSpeedSearchEnabled()) return; if (e.getID() == KeyEvent.KEY_TYPED) { if (!UIUtil.isReallyTypedEvent(e)) return; char c = e.getKey...
processKeyEvent
243,930
Comp () { return myComponent; }
getComponent
243,931
boolean () { return true; }
isSupported
243,932
boolean () { return true; }
isSpeedSearchEnabled
243,933
boolean () { return isSpeedSearchEnabled(); }
isAvailable
243,934
boolean () { return isPopupActive(); }
isActive
243,935
JComponent () { return getSearchField(); }
getTextField
243,936
void () { showPopup(); }
activate
243,937
void () { if (mySearchPopup != null) mySearchPopup.refreshSelection(); }
refreshSelection
243,938
void (@NotNull String searchQuery) { if (mySearchPopup != null) { // If there's a popup showing, we must let it handle selection, because // it also updates its own state (error / not error) in the process. mySearchPopup.updateSelection(findElement(searchQuery), searchQuery); } else { selectElement(findElement(searchQu...
findAndSelectElement
243,939
boolean (int keyCode, @NotNull String searchQuery) { if (isUpDownHomeEnd(keyCode)) { UIEventLogger.IncrementalSearchNextPrevItemSelected.log(myComponent.getClass()); Object element = findTargetElement(keyCode, searchQuery); if (element != null) { selectElement(element, searchQuery); return true; } } return false; }
adjustSelection
243,940
void () { String pattern = Strings.notNullize(mySearchField.getText()); if (!pattern.equals(myLastPattern)) { myLastPattern = pattern; onSearchFieldUpdated(pattern); } }
updateLastPattern
243,941
void (String newText) { if (findElement(newText) == null) { mySearchField.setForeground(ERROR_FOREGROUND_COLOR); } else { mySearchField.setForeground(FOREGROUND_COLOR); } }
handleInsert
243,942
void (KeyEvent e) { mySearchField.processKeyEvent(e); if (e.isConsumed()) { updateLastPattern(); String s = mySearchField.getText(); Object element; int navKeyCode = getNavigationKeyCode(e); if (navKeyCode != 0) { element = findTargetElement(navKeyCode, s); if (myClearSearchOnNavigateNoMatch && element == null) { manag...
processKeyEvent
243,943
void (Object element, String selectedText) { if (element != null) { selectElement(element, selectedText); mySearchField.setForeground(FOREGROUND_COLOR); } else { mySearchField.setForeground(ERROR_FOREGROUND_COLOR); } if (mySearchPopup != null) { mySearchPopup.setSize(mySearchPopup.getPreferredSize()); mySearchPopup.val...
updateSelection
243,944
int (KeyEvent e) { KeyStroke keyStroke = KeyStroke.getKeyStrokeForEvent(e); if (isUpDownHomeEnd(e.getKeyCode())) { return e.getKeyCode(); } KeymapManager keymapManager = KeymapManager.getInstance(); if (keymapManager != null) { @NotNull String @NotNull [] actionIds = keymapManager.getActiveKeymap().getActionIds(keyStro...
getNavigationKeyCode
243,945
void (String pattern) { if (Strings.isEmpty(pattern) && Registry.is("ide.speed.search.close.when.empty")) { hidePopup(); } }
onSearchFieldUpdated
243,946
Icon (boolean hovered) { return AllIcons.Actions.Search; }
getIcon
243,947
boolean () { return true; }
isIconBeforeText
243,948
int () { return JBUIScale.scale(10); }
getIconGap
243,949
void () { super.addNotify(); getCaret().setVisible(true); // we still want it blinking even though the field isn't focusable }
addNotify
243,950
void () { getCaret().setVisible(false); // doesn't happen automatically for some reason and causes Timer leaks super.removeNotify(); }
removeNotify
243,951
void (Color color) { super.setForeground(color); }
setForeground
243,952
Dimension () { Dimension dim = super.getPreferredSize(); Insets m = getMargin(); var fm = getFontMetrics(getFont()); var text = getText(); var emptyText = getEmptyText().getText(); dim.width = Math.max(fm.stringWidth(text), fm.stringWidth(emptyText)) + 10 + m.left + m.right; return dim; }
getPreferredSize
243,953
void (KeyEvent e) { int i = e.getKeyCode(); if (i == KeyEvent.VK_BACK_SPACE && getDocument().getLength() == 0) { e.consume(); return; } if ( i == KeyEvent.VK_ENTER || i == KeyEvent.VK_PAGE_UP || i == KeyEvent.VK_PAGE_DOWN || i == KeyEvent.VK_LEFT || i == KeyEvent.VK_RIGHT ) { if (!isStickySearch()) { manageSearchPopup(...
processKeyEvent
243,954
void (FocusEvent e) { super.processFocusEvent(e); if (isShowing()) { getCaret().setVisible(true); // we want to keep it blinking even if the focus is lost // (never happens in practice, though, as the field isn't focusable, so this is just a precaution) } }
processFocusEvent
243,955
boolean (int keyCode) { return keyCode == KeyEvent.VK_HOME || keyCode == KeyEvent.VK_END || keyCode == KeyEvent.VK_UP || keyCode == KeyEvent.VK_DOWN; }
isUpDownHomeEnd
243,956
boolean (int keyCode) { return keyCode == KeyEvent.VK_PAGE_UP || keyCode == KeyEvent.VK_PAGE_DOWN; }
isPgUpPgDown
243,957
boolean (int keyCode) { return isPgUpPgDown(keyCode) || isUpDownHomeEnd(keyCode); }
isNavigationKey
243,958
void (@Nullable SearchPopup searchPopup) { Project project = null; if (ApplicationManager.getApplication() != null && !ApplicationManager.getApplication().isDisposed()) { project = CommonDataKeys.PROJECT.getData(DataManager.getInstance().getDataContext(myComponent)); } if (project != null && project.isDefault()) { proj...
manageSearchPopup
243,959
void () { if (myComponent == null || mySearchPopup == null || myPopupLayeredPane == null) return; Point lPaneP = myPopupLayeredPane.getLocationOnScreen(); Point componentP = getComponentLocationOnScreen(); Rectangle r = getComponentVisibleRect(); Dimension prefSize = mySearchPopup.getPreferredSize(); Window window = (W...
moveSearchPopup
243,960
Rectangle () { return myComponent.getVisibleRect(); }
getComponentVisibleRect
243,961
Point () { return myComponent.getLocationOnScreen(); }
getComponentLocationOnScreen
243,962
boolean () { return myCurrentIndex != 0; }
hasPrevious
243,963
Object () { int i = myCurrentIndex - 1; if (i < 0) throw new NoSuchElementException(); Object previous = getElementAt(i); myCurrentIndex = i; return previous; }
previous
243,964
Object (int i) { if (mySpeedSearch.myElementAtImplemented) { return mySpeedSearch.getElementAt(i); } int index = mySpeedSearch.convertIndexToModel(i); return myElements[index]; }
getElementAt
243,965
int () { return myCurrentIndex; }
nextIndex
243,966
int () { return myCurrentIndex - 1; }
previousIndex
243,967
boolean () { return myCurrentIndex != myElementCount; }
hasNext
243,968
Object () { if (myCurrentIndex + 1 > myElementCount) throw new NoSuchElementException(); return getElementAt(myCurrentIndex++); }
next
243,969
void () { throw new UnsupportedOperationException("Not implemented in: " + getClass().getCanonicalName()); }
remove
243,970
void (Object o) { throw new UnsupportedOperationException("Not implemented in: " + getClass().getCanonicalName()); }
set
243,971
void (Object o) { throw new UnsupportedOperationException("Not implemented in: " + getClass().getCanonicalName()); }
add
243,972
EditorEx () { EditorEx editor = super.createEditor(); onEditorCreate(editor); return editor; }
createEditor
243,973
void (EditorEx editor) {}
onEditorCreate
243,974
void () { myTextField.selectAll(); IdeFocusManager.getGlobalInstance().doWhenFocusSettlesDown(() -> IdeFocusManager.getGlobalInstance().requestFocus(myTextField, true)); }
selectAll
243,975
EditorTextField () { return myTextField; }
getEditorComponent
243,976
void (ActionListener l) { }
addActionListener
243,977
void (ActionListener l) { }
removeActionListener
243,978
Object () { return getDocument(); }
getItem
243,979
Document () { return myTextField.getDocument(); }
getDocument
243,980
void (Object anObject) { myTextField.setDocument((Document)anObject); }
setItem
243,981
void (@NotNull String notificationName, @NotNull String title, @NotNull String text) { }
notify
243,982
SystemNotifications () { Application app = ApplicationManager.getApplication(); return app.isHeadlessEnvironment() || app.isUnitTestMode() ? NULL : ApplicationManager.getApplication().getService(SystemNotifications.class); }
getInstance
243,983
Point () { return myBounds == null ? null : myBounds.getLocation(); }
getLocation
243,984
Dimension () { return myBounds == null ? null : myBounds.getSize(); }
getSize
243,985
Rectangle () { return myBounds == null ? null : new Rectangle(myBounds); }
getBounds
243,986
boolean () { return myMaximized; }
isMaximized
243,987
boolean () { return myFullScreen; }
isFullScreen
243,988
int (Component component) { int state = Frame.NORMAL; if (component instanceof Frame) { state = ((Frame)component).getExtendedState(); if (SystemInfoRt.isMac) { // workaround: frame.state is not updated by jdk so get it directly from peer ComponentPeer peer = AWTAccessor.getComponentAccessor().getPeer(component); if (p...
getExtendedState
243,989
FrameState (@NotNull Component component) { for (ComponentListener listener : component.getComponentListeners()) { if (listener instanceof FrameState) { return (FrameState)listener; } } return null; }
findFrameState
243,990
void (@NotNull Component component) { if (component instanceof Frame) { // it makes sense for a frame only FrameState state = findFrameState(component); if (state == null) { component.addComponentListener(new Listener()); } } }
setFrameStateListener
243,991
void (ComponentEvent event) { update(event.getComponent()); }
componentMoved
243,992
void (ComponentEvent event) { update(event.getComponent()); }
componentResized
243,993
void (ComponentEvent event) { }
componentShown
243,994
void (ComponentEvent event) { }
componentHidden
243,995
void (Component component) { Rectangle bounds = component.getBounds(); myFullScreen = component instanceof IdeFrame && FrameInfoHelper.Companion.isFullScreenSupportedInCurrentOs$intellij_platform_ide_impl() && ((IdeFrame)component).isInFullScreen(); myMaximized = FrameInfoHelper.isMaximized(getExtendedState(component))...
update
243,996
int (String pattern, String text) { return obtainMatcher(pattern).matchingDegree(text); }
matchingDegree
243,997
MinusculeMatcher (@NotNull String pattern) { if (myRecentSearchText == null || !myRecentSearchText.equals(pattern)) { myRecentSearchText = pattern; if (myShouldMatchCamelCase) { pattern = StringUtil.join(NameUtilCore.nameToWords(pattern), "*"); } if (!myShouldMatchFromTheBeginning && !pattern.startsWith("*")) { pattern...
obtainMatcher
243,998
MinusculeMatcher (@NotNull String pattern) { return NameUtil.buildMatcher(pattern).withSeparators(myHardSeparators).build(); }
createMatcher
243,999
String () { return myRecentSearchText; }
getRecentSearchText