Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
279,700
void (@NotNull AnActionEvent e) { e.getPresentation().setEnabledAndVisible(false); }
update
279,701
ActionGroup () { return myDelegate; }
getDelegate
279,702
boolean () { return myDelegate.isDumbAware(); }
isDumbAware
279,703
ActionUpdateThread () { return myDelegate.getActionUpdateThread(); }
getActionUpdateThread
279,704
boolean () { return myDelegate.isPopup(); }
isPopup
279,705
void (@NotNull AnActionEvent e) { UpdateSession session = e.getUpdateSession(); if (session == UpdateSession.EMPTY) myDelegate.update(e); else e.getPresentation().copyFrom(session.presentation(myDelegate), null, true); }
update
279,706
void (@NotNull AnActionEvent e) { myDelegate.beforeActionPerformedUpdate(e); }
beforeActionPerformedUpdate
279,707
boolean (@NotNull DataContext context) { return myDelegate.canBePerformed(context); }
canBePerformed
279,708
void (@NotNull AnActionEvent e) { myDelegate.actionPerformed(e); }
actionPerformed
279,709
boolean () { return PerformWithDocumentsCommitted.isPerformWithDocumentsCommitted(myDelegate); }
isPerformWithDocumentsCommitted
279,710
boolean () { return myDelegate.isInInjectedContext(); }
isInInjectedContext
279,711
boolean () { return myDelegate.hideIfNoVisibleChildren(); }
hideIfNoVisibleChildren
279,712
boolean () { return myDelegate.disableIfNoVisibleChildren(); }
disableIfNoVisibleChildren
279,713
double () { return myStage; }
getStage
279,714
int () { return MouseEvent.BUTTON1; }
getButton
279,715
int () { return 0; }
getModifiers
279,716
int () { return 1; }
getClickCount
279,717
boolean (Object obj) { if (this == obj) return true; if (obj == null || getClass() != obj.getClass()) return false; PressureShortcut other = (PressureShortcut) obj; return myStage == other.myStage; }
equals
279,718
int () { return super.hashCode() + (int)myStage; }
hashCode
279,719
boolean (final @NotNull Shortcut sc) { return equals(sc); }
startsWith
279,720
String () { return "Force touch"; }
toString
279,721
void (@NotNull Supplier<String> text) { if (mySynonyms == Collections.<Supplier<String>>emptyList()) { mySynonyms = new SmartList<>(text); } else { mySynonyms.add(text); } }
addSynonym
279,722
PluginDescriptor () { return myPlugin; }
getPlugin
279,723
Presentation () { return myTemplatePresentation.get(); }
createTemplatePresentation
279,724
String () { return myClassName; }
getClassName
279,725
String () { return myId; }
getId
279,726
void (@NotNull AnActionEvent e) { throw new UnsupportedOperationException(); }
actionPerformed
279,727
void (@NotNull AnAction targetAction) { copyTemplatePresentation(getTemplatePresentation(), targetAction.getTemplatePresentation()); targetAction.setShortcutSet(getShortcutSet()); copyActionTextOverrides(targetAction); for (Supplier<String> synonym : mySynonyms) { targetAction.addSynonym(synonym); } if (targetAction instanceof ActionGroup) { LOG.warn(String.format("ActionGroup should be registered using <group> tag: id=\"%s\" class=\"%s\"", myId, targetAction.getClass().getName())); } }
initAction
279,728
void (Presentation sourcePresentation, Presentation targetPresentation) { targetPresentation.copyIconIfUnset(sourcePresentation); if (Strings.isEmpty(targetPresentation.getText()) && sourcePresentation.getText() != null) { targetPresentation.setTextWithMnemonic(sourcePresentation.getTextWithPossibleMnemonic()); } if (targetPresentation.getDescription() == null && sourcePresentation.getDescription() != null) { targetPresentation.setDescription(sourcePresentation.getDescription()); } }
copyTemplatePresentation
279,729
void (final @NotNull AnActionEvent e) { final boolean state = !isSelected(e); setSelected(e, state); final Presentation presentation = e.getPresentation(); Toggleable.setSelected(presentation, state); }
actionPerformed
279,730
void (final @NotNull AnActionEvent e) { boolean selected = isSelected(e); Presentation presentation = e.getPresentation(); Toggleable.setSelected(presentation, selected); if (e.isFromContextMenu()) { // force showing check marks instead of toggle icons in the context menu presentation.setIcon(null); } }
update
279,731
ActionInGroup (boolean isSecondary) { myGroup.setAsPrimary(myAction, !isSecondary); return this; }
setAsSecondary
279,732
ActionGroup () { return myGroup; }
getGroup
279,733
DefaultActionGroup (@NotNull Supplier<@ActionText String> shortName) { return new DefaultActionGroup(shortName, true); }
createPopupGroup
279,734
DefaultActionGroup (@NotNull Supplier<@ActionText String> shortName) { return new DefaultActionGroup(shortName, false); }
createFlatGroup
279,735
DefaultActionGroup () { return createPopupGroup(() -> ""); }
createPopupGroupWithEmptyText
279,736
void () { myModificationStamp++; }
incrementModificationStamp
279,737
int () { return myModificationStamp; }
getModificationStamp
279,738
IllegalArgumentException () { return new IllegalArgumentException("Cannot add a group to itself: " + this + " (" + getTemplateText() + ")"); }
newThisGroupToItselfAddedException
279,739
IllegalArgumentException () { return new IllegalArgumentException("Cannot add null action to the group " + this + " (" + getTemplateText() + ")"); }
nullActionAddedToTheGroupException
279,740
IllegalArgumentException (@NotNull AnAction action) { return new IllegalArgumentException( "Cannot add an action twice: " + action + " (" + (action instanceof ActionStub ? ((ActionStub)action).getClassName() : action.getClass().getName()) + ")"); }
newDuplicateActionAddedException
279,741
void (@NotNull AnAction action, @NotNull ActionManager actionManager) { add(action, Constraints.LAST, actionManager); }
add
279,742
void (@NotNull AnAction action) { addAction(action, Constraints.LAST); }
add
279,743
ActionInGroup (@NotNull AnAction action) { return addAction(action, Constraints.LAST); }
addAction
279,744
void () { add(Separator.create()); }
addSeparator
279,745
void (@NotNull AnAction action, @NotNull Constraints constraint) { addAction(action, constraint, ActionManager.getInstance()); }
add
279,746
ActionInGroup (@NotNull AnAction action, @NotNull Constraints constraint) { return addAction(action, constraint, ActionManager.getInstance()); }
addAction
279,747
void (@NotNull AnAction action, @NotNull Constraints constraint, @NotNull ActionManager actionManager) { addAction(action, constraint, actionManager); }
add
279,748
void (@NotNull ActionManager actionManager) { outer: while (!myPendingActions.isEmpty()) { for (int i = 0; i < myPendingActions.size(); i++) { AnAction pendingAction = myPendingActions.get(i); Constraints constraints = myConstraints.get(pendingAction); if (constraints != null && addToSortedList(pendingAction, constraints, actionManager)) { myPendingActions.remove(i); continue outer; } } break; } }
addAllToSortedList
279,749
boolean (@NotNull AnAction action, @NotNull Constraints constraint, @NotNull ActionManager actionManager) { int index = findIndex(constraint.myRelativeToActionId, mySortedChildren, actionManager); if (index == -1) { return false; } if (constraint.myAnchor == Anchor.BEFORE) { mySortedChildren.add(index, action); } else { mySortedChildren.add(index + 1, action); } return true; }
addToSortedList
279,750
int (String actionId, @NotNull List<? extends AnAction> actions, @NotNull ActionManager actionManager) { for (int i = 0; i < actions.size(); i++) { AnAction action = actions.get(i); if (action instanceof ActionStub) { if (((ActionStub)action).getId().equals(actionId)) { return i; } } else { String id = actionManager.getId(action); if (id != null && id.equals(actionId)) { return i; } } } return -1; }
findIndex
279,751
void (@NotNull AnAction action) { remove(action, ActionManager.getInstance()); }
remove
279,752
void (@NotNull AnAction action, @NotNull ActionManager actionManager) { remove(action, actionManager.getId(action)); }
remove
279,753
void (AnAction oldAction, AnAction newAction) { Constraints constraint = myConstraints.get(oldAction); if (constraint != null) { myConstraints.put(newAction, constraint); myConstraints.remove(oldAction); } }
replaceConstraint
279,754
void (@NotNull ActionGroup group) { addAll(group.getChildren(null)); }
addAll
279,755
void (@NotNull Collection<? extends AnAction> actionList) { addAll(actionList, ActionManager.getInstance()); }
addAll
279,756
void (@NotNull Collection<? extends AnAction> actionList, @NotNull ActionManager actionManager) { if (actionList.isEmpty()) { return; } for (AnAction action : actionList) { addAction(action, Constraints.LAST, actionManager); } }
addAll
279,757
void (@NotNull AnAction @NotNull ... actions) { if (actions.length == 0) { return; } ActionManager actionManager = ActionManager.getInstance(); for (AnAction action : actions) { addAction(action, Constraints.LAST, actionManager); } }
addAll
279,758
void (@Nullable @NlsContexts.Separator String separatorText) { add(Separator.create(separatorText)); }
addSeparator
279,759
DefaultActionGroup (@ActionText String templateText) { return new DefaultActionGroup() { @Override public @Nullable String getTemplateText() { return templateText; } }; }
createUserDataAwareGroup
279,760
boolean (@NotNull AnActionEvent event) { Option option = optionSupplier.apply(event); return option != null && option.isSelected(); }
isSelected
279,761
void (@NotNull AnActionEvent event, boolean selected) { Option option = optionSupplier.apply(event); if (option != null) option.setSelected(selected); }
setSelected
279,762
void (@NotNull AnActionEvent event) { Option option = optionSupplier.apply(event); boolean enabled = option != null && option.isEnabled(); boolean visible = enabled || option != null && option.isAlwaysVisible(); Presentation presentation = event.getPresentation(); presentation.setEnabled(enabled); presentation.setVisible(visible); if (visible) { Toggleable.setSelected(presentation, option.isSelected()); String name = option.getName(); if (name != null) presentation.setText(name); String description = option.getDescription(); if (description != null) { presentation.setDescription(description); } if (ActionPlaces.isPopupPlace(event.getPlace())) { presentation.setIcon(null); } } }
update
279,763
ActionUpdateThread () { return ActionUpdateThread.EDT; }
getActionUpdateThread
279,764
void (@NotNull AnActionEvent e) { }
actionPerformed
279,765
void (@NotNull AnActionEvent e) { e.getPresentation().setEnabledAndVisible(myEnabled); }
update
279,766
ActionUpdateThread () { return ActionUpdateThread.BGT; }
getActionUpdateThread
279,767
void (@NotNull AnAction action, @NotNull String id, @Nullable JComponent component) { ActionUtil.mergeFrom(action, id).registerCustomShortcutSet(component, null); }
setupAction
279,768
void (@NotNull JComponent component, @NotNull JComponent fromComponent) { ActionUtil.copyRegisteredShortcuts(component, fromComponent); }
registerActionShortcuts
279,769
AnAction (@NotNull String id, @NotNull ShortcutSet shortcutSet, @NotNull JComponent component) { AnAction newAction = wrap(ActionManager.getInstance().getAction(id)); newAction.registerCustomShortcutSet(shortcutSet, component); return newAction; }
registerWithShortcutSet
279,770
AnAction (AnAction action) { return action instanceof ActionGroup ? new ActionGroupWrapper(((ActionGroup)action)) : new MyDelegatingAction(action); }
wrap
279,771
int (MouseEvent event) { if (event instanceof MouseWheelEvent wheel) { return 0 < wheel.getPreciseWheelRotation() ? BUTTON_WHEEL_DOWN : BUTTON_WHEEL_UP; } return event.getButton(); }
getButton
279,772
int () { return myButton; }
getButton
279,773
int () { return myModifiers; }
getModifiers
279,774
int () { return myClickCount; }
getClickCount
279,775
boolean (Object obj) { if (this == obj) return true; if (obj == null || getClass() != obj.getClass()) return false; MouseShortcut other = (MouseShortcut) obj; return myButton == other.myButton && myModifiers == other.myModifiers && myClickCount == other.myClickCount; }
equals
279,776
int () { return myButton + myModifiers + myClickCount; }
hashCode
279,777
int (@JdkConstants.InputEventMask int modifiers) { if (BitUtil.isSet(modifiers, InputEvent.SHIFT_MASK)) { modifiers |= InputEvent.SHIFT_DOWN_MASK; } if (BitUtil.isSet(modifiers, InputEvent.ALT_MASK)) { modifiers |= InputEvent.ALT_DOWN_MASK; } if (BitUtil.isSet(modifiers, InputEvent.ALT_GRAPH_MASK)) { modifiers |= InputEvent.ALT_GRAPH_DOWN_MASK; } if (BitUtil.isSet(modifiers, InputEvent.CTRL_MASK)) { modifiers |= InputEvent.CTRL_DOWN_MASK; } if (BitUtil.isSet(modifiers, InputEvent.META_MASK)) { modifiers |= InputEvent.META_DOWN_MASK; } modifiers &= InputEvent.SHIFT_DOWN_MASK | InputEvent.ALT_DOWN_MASK | InputEvent.ALT_GRAPH_DOWN_MASK | InputEvent.CTRL_DOWN_MASK | InputEvent.META_DOWN_MASK; return modifiers; }
mapOldModifiers
279,778
boolean () { return false; }
isKeyboard
279,779
boolean (final @NotNull Shortcut sc) { return equals(sc); }
startsWith
279,780
String () { return "button=" + myButton + " clickCount=" + myClickCount + " modifiers=" + myModifiers; }
toString
279,781
Shortcut (KeyboardGestureAction.ModifierType type, KeyStroke stroke) { return switch (type) { case dblClick -> new DblClick(stroke); case hold -> new Hold(stroke); }; }
newInstance
279,782
KeyStroke () { return myStroke; }
getStroke
279,783
boolean () { return true; }
isKeyboard
279,784
boolean (final @NotNull Shortcut sc) { if (!(sc instanceof KeyboardModifierGestureShortcut other)) return false; if (myType.equals(other.myType)) { if (myStroke.getModifiers() != other.myStroke.getModifiers()) return false; return other.myStroke.getKeyCode() != -1 || other.myStroke.getKeyCode() == myStroke.getKeyCode(); } return false; }
startsWith
279,785
boolean (final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; final KeyboardModifierGestureShortcut that = (KeyboardModifierGestureShortcut)o; if (myStroke != null ? !myStroke.equals(that.myStroke) : that.myStroke != null) return false; if (myType != that.myType) return false; return true; }
equals
279,786
int () { int result; result = (myStroke != null ? myStroke.hashCode() : 0); result = 31 * result + (myType != null ? myType.hashCode() : 0); return result; }
hashCode
279,787
String () { String s = getType() == KeyboardGestureAction.ModifierType.dblClick ? "Press, release and hold " : "Hold "; s += KeymapUtil.getKeystrokeText(this.getStroke()); return s; }
toString
279,788
ShortcutSet () { final ArrayList<Shortcut> shortcuts = new ArrayList<>(); for (Shortcut shortcut : getNew().getShortcuts()) { if (isCtrlEnter(shortcut)) continue; shortcuts.add(shortcut); } return new CustomShortcutSet(shortcuts.toArray(Shortcut.EMPTY_ARRAY)); }
getNewForDialogs
279,789
boolean (Shortcut shortcut) { if (shortcut instanceof KeyboardShortcut) { KeyStroke keyStroke = ((KeyboardShortcut)shortcut).getFirstKeyStroke(); return keyStroke.getKeyCode() == KeyEvent.VK_ENTER && BitUtil.isSet(keyStroke.getModifiers(), InputEvent.CTRL_MASK); } return false; }
isCtrlEnter
279,790
KeyStroke () { return SystemInfo.isMac ? KeyStroke.getKeyStroke(KeyEvent.VK_N, InputEvent.CTRL_DOWN_MASK) : KeyStroke.getKeyStroke(KeyEvent.VK_INSERT, 0); }
getInsertKeystroke
279,791
ShortcutSet () { return getActiveKeymapShortcuts(IdeActions.ACTION_COPY); }
getCopy
279,792
ShortcutSet () { return getActiveKeymapShortcuts(IdeActions.ACTION_PASTE); }
getPaste
279,793
ShortcutSet () { return getActiveKeymapShortcuts(IdeActions.ACTION_RERUN); }
getRerun
279,794
ShortcutSet () { return getActiveKeymapShortcuts(IdeActions.ACTION_EDIT_SOURCE); }
getEditSource
279,795
ShortcutSet () { return getActiveKeymapShortcuts(IdeActions.ACTION_VIEW_SOURCE); }
getViewSource
279,796
ShortcutSet () { return getActiveKeymapShortcuts(IdeActions.ACTION_NEW_ELEMENT); }
getNew
279,797
ShortcutSet () { return getActiveKeymapShortcuts(IdeActions.ACTION_EDITOR_DUPLICATE); }
getDuplicate
279,798
ShortcutSet () { return getActiveKeymapShortcuts(IdeActions.ACTION_MOVE); }
getMove
279,799
ShortcutSet () { return getActiveKeymapShortcuts(IdeActions.ACTION_RENAME); }
getRename