Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
279,900 | void (@NotNull AnAction action, @NotNull Component component, @NotNull String place, @Nullable InputEvent inputEvent, @Nullable Runnable onDone) { invokeAction(action, DataManager.getInstance().getDataContext(component), place, inputEvent, onDone); } | invokeAction |
279,901 | void (@NotNull AnAction action, @NotNull DataContext dataContext, @NotNull String place, @Nullable InputEvent inputEvent, @Nullable Runnable onDone) { Presentation presentation = action.getTemplatePresentation().clone(); AnActionEvent event = AnActionEvent.createFromInputEvent(inputEvent, place, presentation, dataConte... | invokeAction |
279,902 | ActionListener (@NotNull String actionId, @NotNull Component component, @NotNull String place) { return e -> { AnAction action = getAction(actionId); if (action == null) { return; } invokeAction(action, component, place, null, null); }; } | createActionListener |
279,903 | AnAction (@NotNull String actionId) { AnAction action = ActionManager.getInstance().getAction(actionId); if (action == null) throw new IllegalArgumentException("No action found with id='" + actionId + "'"); return action instanceof ActionGroup ? new ActionGroupWrapper((ActionGroup)action) : new AnActionWrapper(action);... | wrap |
279,904 | AnAction (@NotNull AnAction action) { return action instanceof ActionGroup ? new ActionGroupWrapper((ActionGroup)action) : new AnActionWrapper(action); } | wrap |
279,905 | ShortcutSet (@NotNull @NonNls String id) { AnAction action = getAction(id); return action == null ? CustomShortcutSet.EMPTY : action.getShortcutSet(); } | getShortcutSet |
279,906 | Object (@NotNull AnAction action) { Object delegate = action; while (delegate instanceof ActionWithDelegate<?>) { delegate = ((ActionWithDelegate<?>)delegate).getDelegate(); } return delegate; } | getDelegateChainRoot |
279,907 | AnAction (@NotNull AnAction action) { while (action instanceof ActionWithDelegate<?>) { Object delegate = ((ActionWithDelegate<?>)action).getDelegate(); if (delegate instanceof AnAction) { action = (AnAction)delegate; } else { return action; } } return action; } | getDelegateChainRootAction |
279,908 | JComponent (@NotNull JComponent target, @NotNull @NonNls String place, @NotNull ActionGroup group, boolean horizontal) { ActionToolbar toolbar = ActionManager.getInstance().createActionToolbar(place, group, horizontal); toolbar.setTargetComponent(target); return toolbar.getComponent(); } | createToolbarComponent |
279,909 | AnAction (@NotNull Action action) { AnAction anAction = new AnAction((String)action.getValue(Action.NAME)) { @Override public void update(@NotNull AnActionEvent e) { e.getPresentation().setEnabled(action.isEnabled()); } @Override public @NotNull ActionUpdateThread getActionUpdateThread() { return ActionUpdateThread.EDT... | createActionFromSwingAction |
279,910 | void (@NotNull AnActionEvent e) { e.getPresentation().setEnabled(action.isEnabled()); } | update |
279,911 | ActionUpdateThread () { return ActionUpdateThread.EDT; } | getActionUpdateThread |
279,912 | void (@NotNull AnActionEvent e) { action.actionPerformed(new ActionEvent(this, ActionEvent.ACTION_PERFORMED, null)); } | actionPerformed |
279,913 | void (@NotNull JComponent component) { ClientProperty.put(component, ACTION_CONTEXT_ELEMENT_KEY, getActionThreadContext()); } | initActionContextForComponent |
279,914 | AccessToken (@NotNull String actionId, @NotNull String place, @Nullable InputEvent event, @Nullable Component component) { ActionContextElement parent = UIUtil.uiParents(component, false) .filterMap(o -> ClientProperty.get(o, ACTION_CONTEXT_ELEMENT_KEY)).first(); return installThreadContext(currentThreadContext().plus(... | withActionThreadContext |
279,915 | void (@NotNull AnActionEvent e) { } | actionPerformed |
279,916 | FileChooserFactory () { return ApplicationManager.getApplication().getService(FileChooserFactory.class); } | getInstance |
279,917 | FileTextField (@NotNull FileChooserDescriptor descriptor, @Nullable Disposable parent) { return createFileTextField(descriptor, true, parent); } | createFileTextField |
279,918 | void (final @NotNull FileChooserDescriptor descriptor, final @Nullable Project project, final @Nullable VirtualFile toSelect, final @NotNull Consumer<? super List<VirtualFile>> callback) { chooseFiles(descriptor, project, null, toSelect, callback); } | chooseFiles |
279,919 | void (final @NotNull FileChooserDescriptor descriptor, final @Nullable Project project, final @Nullable Component parent, final @Nullable VirtualFile toSelect, final @NotNull Consumer<? super List<VirtualFile>> callback) { Component parentComponent = parent == null ? WindowManager.getInstance().suggestParentWindow(proj... | chooseFiles |
279,920 | void (final @NotNull FileChooserDescriptor descriptor, final @Nullable Project project, final @Nullable VirtualFile toSelect, final @NotNull Consumer<? super VirtualFile> callback) { chooseFile(descriptor, project, null, toSelect, callback); } | chooseFile |
279,921 | void (final @NotNull FileChooserDescriptor descriptor, final @Nullable Project project, final @Nullable Component parent, final @Nullable VirtualFile toSelect, final @NotNull Consumer<? super VirtualFile> callback) { LOG.assertTrue(!descriptor.isChooseMultiple()); chooseFiles(descriptor, project, parent, toSelect, file... | chooseFile |
279,922 | FilenameFilter (@NotNull FilenameFilter filter, boolean defaultValue) { return (dir, name) -> { try { return filter.accept(dir, name); } catch (Throwable e) { LOG.error(e); return defaultValue; } }; } | safeInvokeFilter |
279,923 | boolean (VirtualFile file, boolean showHiddenFiles) { if (!showHiddenFiles && FileElement.isFileHidden(file)) { return false; } if (file.isDirectory()) { return true; } String name = file.getName(); for (String extension : myExtensions) { if (name.endsWith(extension)) { return true; } } return false; } | isFileVisible |
279,924 | boolean (@Nullable VirtualFile file) { return file != null && !file.isDirectory() && isFileVisible(file, true); } | isFileSelectable |
279,925 | boolean (VirtualFile file, boolean showHiddenFiles) { return extensions.isEmpty() || file.isDirectory() ? super.isFileVisible(file, showHiddenFiles) : extensions.contains(file.getExtension()); } | isFileVisible |
279,926 | DataFlavor[] () { return DATA_FLAVORS; } | getTransferDataFlavors |
279,927 | boolean (DataFlavor flavor) { return flavor == DataFlavor.stringFlavor; } | isDataFlavorSupported |
279,928 | int () { return myStartOffset; } | getStartOffset |
279,929 | int () { return myEndOffset; } | getEndOffset |
279,930 | boolean () { return myCut; } | isCut |
279,931 | boolean () { return myReadyToCombine; } | isReadyToCombine |
279,932 | void (boolean readyToCombine) { myReadyToCombine = readyToCombine; } | setReadyToCombine |
279,933 | String () { return "data='" + myData + "', startOffset=" + myStartOffset + ", endOffset=" + myEndOffset +", cut=" + myCut; } | toString |
279,934 | KeymapGroupFactory () { return ApplicationManager.getApplication().getService(KeymapGroupFactory.class); } | getInstance |
279,935 | String (@NotNull MouseShortcut shortcut) { if (shortcut instanceof PressureShortcut) return shortcut.toString(); return getMouseShortcutText(shortcut.getButton(), shortcut.getModifiers(), shortcut.getClickCount()); } | getMouseShortcutText |
279,936 | String (int button, @JdkConstants.InputEventMask int modifiers, int clickCount) { String resource; if (button == MouseShortcut.BUTTON_WHEEL_UP) { resource = "mouse.wheel.rotate.up.shortcut.text"; } else if (button == MouseShortcut.BUTTON_WHEEL_DOWN) { resource = "mouse.wheel.rotate.down.shortcut.text"; } else if (click... | getMouseShortcutText |
279,937 | int (@JdkConstants.InputEventMask int modifiers) { if ((modifiers & InputEvent.SHIFT_DOWN_MASK) != 0) { modifiers |= InputEvent.SHIFT_MASK; } if ((modifiers & InputEvent.ALT_DOWN_MASK) != 0) { modifiers |= InputEvent.ALT_MASK; } if ((modifiers & InputEvent.ALT_GRAPH_DOWN_MASK) != 0) { modifiers |= InputEvent.ALT_GRAPH_... | mapNewModifiers |
279,938 | String (int code) { return switch (code) { case KeyEvent.VK_BACK_QUOTE -> "`"; case KeyEvent.VK_SEPARATOR -> ","; case KeyEvent.VK_DECIMAL -> "."; case KeyEvent.VK_SLASH -> "/"; case KeyEvent.VK_BACK_SLASH -> "\\"; case KeyEvent.VK_PERIOD -> "."; case KeyEvent.VK_SEMICOLON -> ";"; case KeyEvent.VK_CLOSE_BRACKET -> "]";... | getKeyText |
279,939 | boolean () { return SystemInfo.isMac && !isSimplifiedMacShortcuts(); } | isNativeMacShortcuts |
279,940 | boolean () { return SystemInfo.isMac && AdvancedSettings.getInstanceIfCreated() != null && AdvancedSettings.getBoolean("ide.macos.disable.native.shortcut.symbols"); } | isSimplifiedMacShortcuts |
279,941 | String (@JdkConstants.InputEventMask int modifiers) { if (isNativeMacShortcuts()) { //try { // Class appleLaf = Class.forName(APPLE_LAF_AQUA_LOOK_AND_FEEL_CLASS_NAME); // Method getModifiers = appleLaf.getMethod(GET_KEY_MODIFIERS_TEXT_METHOD, int.class, boolean.class); // return (String)getModifiers.invoke(appleLaf, mo... | getModifiersText |
279,942 | String (int modifiers) { StringBuilder buf = new StringBuilder(); if ((modifiers & InputEvent.META_MASK) != 0) buf.append("Cmd+"); if ((modifiers & InputEvent.CTRL_MASK) != 0) buf.append("Ctrl+"); if ((modifiers & InputEvent.ALT_MASK) != 0) buf.append("Alt+"); if ((modifiers & InputEvent.SHIFT_MASK) != 0) buf.append("S... | getSimplifiedMacKeyModifiersText |
279,943 | String (int code) { return switch (code) { case KeyEvent.VK_ENTER -> "Enter"; case KeyEvent.VK_BACK_SPACE -> "Backspace"; case KeyEvent.VK_TAB -> "Tab"; case KeyEvent.VK_CANCEL -> "Cancel"; case KeyEvent.VK_CLEAR -> "Clear"; case KeyEvent.VK_COMPOSE -> "Compose"; case KeyEvent.VK_PAUSE -> "Pause"; case KeyEvent.VK_CAPS... | getSimplifiedMacKeyText |
279,944 | String (@NotNull MouseShortcut shortcut) { if (shortcut instanceof PressureShortcut) { return "Force touch"; } StringBuilder buffer = new StringBuilder(); // modifiers int modifiers = shortcut.getModifiers(); if ((InputEvent.SHIFT_DOWN_MASK & modifiers) > 0) { buffer.append(SHIFT); buffer.append(' '); } if ((InputEvent... | getMouseShortcutString |
279,945 | String (@NotNull MouseShortcut shortcut) { return defaultKeymapTextContext.getMouseShortcutText(shortcut); } | getMouseShortcutText |
279,946 | String (int code) { return defaultKeymapTextContext.getKeyText(code); } | getKeyText |
279,947 | boolean () { return defaultKeymapTextContext.isSimplifiedMacShortcuts(); } | isSimplifiedMacShortcuts |
279,948 | ShortcutSet (@Nullable @NonNls String actionId) { KeymapManager keymapManager = KeymapManager.getInstance(); if (keymapManager == null || actionId == null) { return new CustomShortcutSet(Shortcut.EMPTY_ARRAY); } return new CustomShortcutSet(keymapManager.getActiveKeymap().getShortcuts(actionId)); } | getActiveKeymapShortcuts |
279,949 | boolean (@NotNull KeyEvent keyEvent, @NotNull @NonNls String actionId) { for (Shortcut shortcut : getActiveKeymapShortcuts(actionId).getShortcuts()) { if (shortcut instanceof KeyboardShortcut && AWTKeyStroke.getAWTKeyStrokeForEvent(keyEvent) == ((KeyboardShortcut)shortcut).getFirstKeyStroke()) { return true; } } return... | isEventForAction |
279,950 | String (@NotNull MouseShortcut shortcut) { return defaultKeymapTextContext.getMouseShortcutString(shortcut); } | getMouseShortcutString |
279,951 | boolean (@NotNull KeyEvent keyEvent) { if (ourTooltipKeysProperty == null) { ourTooltipKeysProperty = Registry.get("ide.forcedShowTooltip"); ourTooltipKeysProperty.addListener(new RegistryValueListener() { @Override public void afterValueChanged(@NotNull RegistryValue value) { updateTooltipRequestKey(value); } }, Appli... | isTooltipRequest |
279,952 | void (@NotNull RegistryValue value) { updateTooltipRequestKey(value); } | afterValueChanged |
279,953 | void (@NotNull RegistryValue value) { final String text = value.asString(); ourTooltipKeys.clear(); ourOtherTooltipKeys.clear(); processKey(text.contains("meta"), InputEvent.META_MASK); processKey(text.contains("control") || text.contains("ctrl"), InputEvent.CTRL_MASK); processKey(text.contains("shift"), InputEvent.SHI... | updateTooltipRequestKey |
279,954 | void (boolean condition, int value) { if (condition) { ourTooltipKeys.add(value); } else { ourOtherTooltipKeys.add(value); } } | processKey |
279,955 | boolean () { return isEmacsKeymap(KeymapManager.getInstance().getActiveKeymap()); } | isEmacsKeymap |
279,956 | boolean (@Nullable Keymap keymap) { for (; keymap != null; keymap = keymap.getParent()) { if ("Emacs".equalsIgnoreCase(keymap.getName())) { return true; } } return false; } | isEmacsKeymap |
279,957 | Collection<KeyStroke> (@NotNull ShortcutSet shortcutSet) { Shortcut[] shortcuts = shortcutSet.getShortcuts(); if (shortcuts.length == 0) { return Collections.emptySet(); } Set<KeyStroke> result = new HashSet<>(); for (Shortcut shortcut : shortcuts) { if (!(shortcut instanceof KeyboardShortcut kbShortcut)) { continue; }... | getKeyStrokes |
279,958 | boolean (@NotNull Keymap activeKeymap, @JdkConstants.InputEventMask int modifiers, @NotNull @NonNls String actionId) { final MouseShortcut syntheticShortcut = new MouseShortcut(MouseEvent.BUTTON1, modifiers, 1); for (Shortcut shortcut : activeKeymap.getShortcuts(actionId)) { if (shortcut instanceof MouseShortcut mouseS... | matchActionMouseShortcutsModifiers |
279,959 | MouseShortcut (@NotNull MouseEvent e) { int button = MouseShortcut.getButton(e); int modifiers = e.getModifiersEx(); if (button == MouseEvent.NOBUTTON && e.getID() == MouseEvent.MOUSE_DRAGGED) { // mouse drag events don't have button field set due to some reason if ((modifiers & InputEvent.BUTTON1_DOWN_MASK) != 0) { bu... | createMouseShortcut |
279,960 | boolean (@NotNull JComponent component, @NotNull KeyStroke oldKeyStroke, @Nullable KeyStroke newKeyStroke, int condition) { return reassignAction(component, oldKeyStroke, newKeyStroke, condition, true); } | reassignAction |
279,961 | boolean (@NotNull JComponent component, @NotNull KeyStroke oldKeyStroke, @Nullable KeyStroke newKeyStroke, int condition, boolean muteOldKeystroke) { ActionListener action = component.getActionForKeyStroke(oldKeyStroke); if (action == null) return false; if (newKeyStroke != null) { component.registerKeyboardAction(acti... | reassignAction |
279,962 | void (ActionEvent e) { AWTEvent event = EventQueue.getCurrentEvent(); if (event instanceof KeyEvent && event.getSource() == myComponent) { Container parent = myComponent.getParent(); if (parent != null) { KeyEvent keyEvent = (KeyEvent)event; parent.dispatchEvent(new KeyEvent(parent, event.getID(), ((KeyEvent)event).get... | actionPerformed |
279,963 | boolean (@NotNull Component component) { if (SystemInfoRt.isLinux) { return true; } String[] supportedNonEnglishLanguages; if (SystemInfoRt.isMac) { supportedNonEnglishLanguages = MAC_SUPPORTED_LOCALES; } else if (SystemInfoRt.isWindows) { supportedNonEnglishLanguages = WIN_SUPPORTED_LOCALES; } else { return false; } S... | isSupportedKeyboardLayout |
279,964 | String () { if (SystemInfoRt.isMac || SystemInfoRt.isLinux) { return "com.sun.awt.use.national.layouts"; } return "com.sun.awt.useLatinNonAlphaNumKeycodes"; } | getVMOption |
279,965 | String () { if (SystemInfoRt.isMac || SystemInfoRt.isLinux) { return "use.national.layouts.for.shortcuts"; } return "use.us.non.alpha.num.keys"; } | getKeymapBundleKey |
279,966 | NationalKeyboardSupport () { if (ApplicationManager.getApplication().isDisposed()) { return new NationalKeyboardSupport(); } else { return ApplicationManager.getApplication().getService(NationalKeyboardSupport.class); } } | getInstance |
279,967 | void (@NotNull OptionSet state) { isEnabled = state.enabled || "true".equals(System.getProperty(VMOption)); myOptions = state; } | loadState |
279,968 | void () { // on MacOS national keymap support is turned on by default isEnabled = SystemInfoRt.isMac && "true".equals(System.getProperty(VMOption, "true")); } | noStateLoaded |
279,969 | boolean () { return isEnabled; } | getEnabled |
279,970 | void (boolean enabled) { isEnabled = enabled; myOptions.enabled = enabled; } | setEnabled |
279,971 | String (@JdkConstants.InputEventMask int modifiers, String delimiter) { StringJoiner buf = new StringJoiner(delimiter != null ? delimiter : ""); if ((modifiers & InputEvent.CTRL_MASK) != 0) buf.add(get(CONTROL, "Ctrl+")); if ((modifiers & InputEvent.ALT_MASK) != 0) buf.add(get(OPTION, "Alt+")); if ((modifiers & InputEv... | getModifiersText |
279,972 | String (@JdkConstants.InputEventMask int modifiers) { return getModifiersText(modifiers, null); } | getModifiersText |
279,973 | String (int code) { if (!isNativeShortcutSymbolsDisabled()) { return switch (code) { case KeyEvent.VK_BACK_SPACE -> get(BACKSPACE, "Backspace"); case KeyEvent.VK_ESCAPE -> get(ESCAPE, "Escape"); case KeyEvent.VK_CAPS_LOCK -> get(CAPS_LOCK, "Caps Lock"); case KeyEvent.VK_TAB -> get(TAB, "Tab"); case KeyEvent.VK_SPACE ->... | getKeyText |
279,974 | String (@NotNull KeyStroke keyStroke, String delimiter, boolean onlyDelimIntoModifiersAndKey) { String modifiers = getModifiersText(keyStroke.getModifiers()); final String key = KeymapUtil.getKeyText(keyStroke.getKeyCode()); if (!onlyDelimIntoModifiersAndKey) { modifiers = getModifiersText(keyStroke.getModifiers(), del... | getKeyStrokeText |
279,975 | String (@NotNull KeyStroke keyStroke) { return getKeyStrokeText(keyStroke, null, true); } | getKeyStrokeText |
279,976 | String (@NotNull String value, @NotNull String replacement) { if (isNativeShortcutSymbolsDisabled()) { return replacement; } return StartupUiUtil.getLabelFont().canDisplayUpTo(value) == -1 ? value : replacement; } | get |
279,977 | boolean () { return AdvancedSettings.getInstanceIfCreated() != null && AdvancedSettings.getBoolean("ide.macos.disable.native.shortcut.symbols"); } | isNativeShortcutSymbolsDisabled |
279,978 | String (@JdkConstants.InputEventMask int modifiers) { StringBuilder buf = new StringBuilder(); if ((modifiers & InputEvent.META_MASK) != 0) { buf.append("\u2318"); } if ((modifiers & InputEvent.CTRL_MASK) != 0) { buf.append(Toolkit.getProperty("AWT.control", "Ctrl")); } if ((modifiers & InputEvent.ALT_MASK) != 0) { buf... | getKeyModifiersTextForMacOSLeopard |
279,979 | KeymapManager () { Application app = ApplicationManager.getApplication(); if (app == null || !LoadingState.CONFIGURATION_STORE_INITIALIZED.isOccurred()) { return null; } KeymapManager instance = INSTANCE; if (instance == null) { instance = app.getService(KeymapManager.class); INSTANCE = instance; } return instance; } | getInstance |
279,980 | void (@NotNull PluginDescriptor pluginDescriptor) { myHelpTopicPrefix = pluginDescriptor.getPluginId().getIdString() + "."; } | setPluginDescriptor |
279,981 | String () { return myHelpTopicPrefix; } | getHelpTopicPrefix |
279,982 | HelpManager () { return ApplicationManager.getApplication().getService(HelpManager.class); } | getInstance |
279,983 | void (@Nullable String helpId) { if (helpId != null && LOG.isDebugEnabled()) { LOG.debug("Will open helpId: " + helpId); } } | logWillOpenHelpId |
279,984 | ProjectReloadState (@NotNull Project project) { return project.getService(ProjectReloadState.class); } | getInstance |
279,985 | DumbAwareAction (@NotNull Consumer<? super AnActionEvent> actionPerformed) { return new SimpleLightEditCompatibleAction(actionPerformed); } | create |
279,986 | DumbAwareAction (@Nullable @NlsActions.ActionText String text, @NotNull Consumer<? super AnActionEvent> actionPerformed) { return new SimpleLightEditCompatibleAction(text, actionPerformed); } | create |
279,987 | JComponent () { return myDumbUnawareContent; } | getContent |
279,988 | void (boolean show) { for (int i = 0, count = getComponentCount(); i < count; i++) { getComponent(i).setVisible(show); } } | setContentVisible |
279,989 | boolean (@NotNull Document document, boolean isSaveExplicit) { return true; } | maySaveDocument |
279,990 | boolean (@NotNull VirtualFile file, @NotNull Document document) { return true; } | mayReloadFileContent |
279,991 | double () { return DEFAULT_WEIGHT; } | getWeight |
279,992 | boolean () { return true; } | isDumbAware |
279,993 | void (boolean requestFocus) { PsiElement element = getElement(); if (element != null) { VirtualFile file = element.getContainingFile().getVirtualFile(); if (file != null) { new Task.Modal(element.getProject(), EditorBundle.message("editor.open.file.progress", file.getName()), true) { @Override public void run(@NotNull ... | navigate |
279,994 | void (@NotNull ProgressIndicator indicator) { int offset = ReadAction.compute(() -> element.isValid() ? element.getTextOffset() : -1); // may trigger decompilation indicator.checkCanceled(); if (offset >= 0) { Navigatable descriptor = PsiNavigationSupport.getInstance().createNavigatable(myProject, file, offset); Condit... | run |
279,995 | boolean () { PsiElement element = getElement(); return element != null && element.getContainingFile().getVirtualFile() != null; } | canNavigate |
279,996 | PsiElement () { PsiElement element = myPointer.getElement(); if (element != null && element.isValid()) { PsiElement navigationElement = element.getNavigationElement(); return navigationElement != null ? navigationElement : element; } return null; } | getElement |
279,997 | boolean () { return canNavigate(); } | canNavigateToSource |
279,998 | void (Graphics g) { super.paintComponent(g); Graphics2D g2 = (Graphics2D) g; int width = getSize().width; int height = getSize().height; Object oldAntialiasing = g2.getRenderingHint(RenderingHints.KEY_ANTIALIASING); g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); g2.setPaint(new... | paintComponent |
279,999 | void (int width) { myMinimumAndPreferredWidth = width; registerCancelOnEscape(); installComboBoxCopyAction(this); } | init |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.