Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
50,900 | void (MouseEvent e) { setPressedProperty(false); } | mouseReleased |
50,901 | void (boolean isPressed) { if (!comboBox.isEditable()) { comboBox.putClientProperty(PRESSED_PROPERTY, Boolean.valueOf(isPressed)); comboBox.repaint(); } } | setPressedProperty |
50,902 | void (MouseEvent e) { setHoverProperty(true); } | mouseEntered |
50,903 | void (MouseEvent e) { setHoverProperty(false); } | mouseExited |
50,904 | void (boolean isHover) { comboBox.putClientProperty(HOVER_PROPERTY, Boolean.valueOf(isHover)); comboBox.repaint(); } | setHoverProperty |
50,905 | ComboPopup () { if (comboBox.getClientProperty(DarculaJBPopupComboPopup.CLIENT_PROP) != null) { return new DarculaJBPopupComboPopup<>(comboBox) { @Override public void configureList(@NotNull JList<Object> list) { super.configureList(list); list.setBackground(UIManager.getColor("TextField.background")); } @Override publ... | createPopup |
50,906 | void (@NotNull JList<Object> list) { super.configureList(list); list.setBackground(UIManager.getColor("TextField.background")); } | configureList |
50,907 | void (JComponent component) { super.customizeListRendererComponent(component); component.setBorder(getList().getComponentOrientation().isLeftToRight() ? JBUI.Borders.empty(0, 5, 0, 1) : JBUI.Borders.empty(0, 1, 0, 5)); } | customizeListRendererComponent |
50,908 | void () { super.configurePopup(); addPopupMenuListener(new PopupMenuListenerAdapter() { @Override public void popupMenuWillBecomeInvisible(PopupMenuEvent e) { comboBox.repaint(); } }); setBorder(UIManager.getBorder("PopupMenu.border")); } | configurePopup |
50,909 | void (PopupMenuEvent e) { comboBox.repaint(); } | popupMenuWillBecomeInvisible |
50,910 | void () { super.configureList(); list.setBackground(UIManager.getColor("TextField.background")); } | configureList |
50,911 | void (JComponent component) { super.customizeListRendererComponent(component); component.setBorder(list.getComponentOrientation().isLeftToRight() ? JBUI.Borders.empty(0, 5, 0, 1) : JBUI.Borders.empty(0, 1, 0, 5)); } | customizeListRendererComponent |
50,912 | void (Component invoker, int x, int y) { int i = DarculaUIUtil.isTableCellEditor(comboBox) ? 0 : 1; int yOffset = JBUIScale.scale(i); super.show(invoker, x, y - yOffset); } | show |
50,913 | ComponentUI (JComponent c) { return new WinIntelliJSpinnerUI(); } | createUI |
50,914 | void () { super.installDefaults(); spinner.setOpaque(false); } | installDefaults |
50,915 | void () { super.installListeners(); editorMouseListener = new MouseAdapter() { @Override public void mouseEntered(MouseEvent e) { setHover(Boolean.TRUE); } @Override public void mouseExited(MouseEvent e) { setHover(Boolean.FALSE); } private void setHover(Boolean value) { if (spinner.isEnabled()) { spinner.putClientProp... | installListeners |
50,916 | void (MouseEvent e) { setHover(Boolean.TRUE); } | mouseEntered |
50,917 | void (MouseEvent e) { setHover(Boolean.FALSE); } | mouseExited |
50,918 | void (Boolean value) { if (spinner.isEnabled()) { spinner.putClientProperty(HOVER_PROPERTY, value); spinner.repaint(); } } | setHover |
50,919 | void () { super.uninstallListeners(); if (editorMouseListener != null) { spinner.removeMouseListener(editorMouseListener); getEditorFocusOwner(spinner).removeMouseListener(editorMouseListener); } } | uninstallListeners |
50,920 | Component (JSpinner spinner) { synchronized (spinner.getEditor().getTreeLock()) { return spinner.getEditor().getComponent(0); } } | getEditorFocusOwner |
50,921 | void (Graphics g, JComponent c) { Graphics2D g2 = (Graphics2D)g.create(); try { g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); g2.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, RenderingHints.VALUE_STROKE_NORMALIZE); Rectangle r = new Rectangle(c.getWidth(), c.getHeight())... | paint |
50,922 | void (Graphics g) { Graphics2D g2 = (Graphics2D)g.create(); try { g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); g2.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, RenderingHints.VALUE_STROKE_NORMALIZE); int bw = JBUIScale.scale(1); ButtonModel bm = getModel(); // set clip ... | paint |
50,923 | Dimension () { Insets si = spinner.getInsets(); return JBUI.size(BUTTON_WIDTH + si.right, (getDirection() == SwingConstants.NORTH) ? 13 : 12); } | getPreferredSize |
50,924 | LayoutManager () { return new LayoutManagerDelegate(super.createLayout()) { @Override public void layoutContainer(Container parent) { super.layoutContainer(parent); Rectangle bounds = parent.getBounds(); Dimension nextButtonSize = nextButton.getPreferredSize(); Dimension prevButtonSize = prevButton.getPreferredSize(); ... | createLayout |
50,925 | void (Container parent) { super.layoutContainer(parent); Rectangle bounds = parent.getBounds(); Dimension nextButtonSize = nextButton.getPreferredSize(); Dimension prevButtonSize = prevButton.getPreferredSize(); nextButtonSize.height = bounds.height * nextButtonSize.height / (nextButtonSize.height + prevButtonSize.heig... | layoutContainer |
50,926 | JComponent () { JComponent editor = super.createEditor(); editor.setBorder(JBUI.Borders.empty(1, 0)); editor.setOpaque(false); return editor; } | createEditor |
50,927 | void (JComponent oldEditor, JComponent newEditor) { super.replaceEditor(oldEditor, newEditor); newEditor.setBorder(JBUI.Borders.empty(1, 0)); newEditor.setOpaque(false); } | replaceEditor |
50,928 | Dimension (Insets i, Dimension size) { int iconWidth = JBUIScale.scale(BUTTON_WIDTH) + i.right; int iconHeight = JBUIScale.scale(SPINNER_HEIGHT) + i.top + i.bottom; Dimension minSize = new Dimension(i.left + DarculaSpinnerUI.MINIMUM_WIDTH.get() + i.right, iconHeight); size = DarculaUIUtil.maximize(size, minSize); Dimen... | getSizeWithButtons |
50,929 | void (Component c, Graphics g, int x, int y, int width, int height) { if (!(c instanceof AbstractButton b) || UIUtil.isHelpButton(c)) return; Graphics2D g2 = (Graphics2D)g.create(); Rectangle outerRect = new Rectangle(x, y, width, height); try { JBInsets.removeFrom(outerRect, b.getInsets()); g2.setRenderingHint(Renderi... | paintBorder |
50,930 | Color (AbstractButton b) { ButtonModel bm = b.getModel(); Color focusedBorderColor = (Color)b.getClientProperty("JButton.focusedBorderColor"); if (bm.isPressed()) { return focusedBorderColor != null ? focusedBorderColor : UIManager.getColor("Button.intellij.native.pressedBorderColor"); } else if (b.hasFocus() || bm.isR... | getBorderColor |
50,931 | boolean (@NotNull AbstractButton b) { ButtonModel bm = b.getModel(); return b.isEnabled() && !bm.isPressed() && !b.hasFocus() && !bm.isRollover() && DarculaButtonUI.isDefaultButton(b); } | isWideBorder |
50,932 | int (@NotNull AbstractButton b) { return isWideBorder(b) ? 2 : 1; } | getBorderWidth |
50,933 | Insets (Component c) { return JBUI.insets(1); } | getBorderInsets |
50,934 | boolean () { return false; } | isBorderOpaque |
50,935 | Icon (@NotNull String path, int cacheKey, int flags) { return IconManager.getInstance().loadRasterizedIcon(path, PackageSearchIcons.class.getClassLoader(), cacheKey, flags); } | load |
50,936 | String () { return projectDir; } | getProjectDir |
50,937 | List<Configuration> () { return configurations; } | getConfigurations |
50,938 | String () { return group; } | getGroupId |
50,939 | String () { return artifact; } | getArtifactId |
50,940 | String () { return version; } | getVersion |
50,941 | String () { return name; } | getName |
50,942 | List<Dependency> () { return dependencies; } | getDependencies |
50,943 | GradleConfigurationReportModel (@NotNull String modelName, Project project, @NotNull ModelBuilderContext context) { List<GradleConfigurationReportModel.Configuration> configurations = new ArrayList<>(project.getConfigurations().size()); for (Configuration configuration : project.getConfigurations()) { List<GradleConfig... | buildAll |
50,944 | boolean (String modelName) { return modelName.equals(GradleConfigurationReportModel.class.getName()); } | canBuild |
50,945 | ErrorMessageBuilder (@NotNull Project project, @NotNull Exception e) { return ErrorMessageBuilder .create(project, e, "Gradle import errors") .withDescription("Unable to import resolved versions " + "from configurations in project ''${project.name}'' for" + " the Dependencies toolwindow."); } | getErrorMessageBuilder |
50,946 | void () { if (SystemInfo.isUnix) { doTest(new String[]{"myshell", "someargs", "-i"}, "myshell someargs -i", Maps.newHashMap()); doTest(new String[]{"myshell", "someargs", "--login"}, "myshell someargs --login", Maps.newHashMap()); } } | testDontAddAnything |
50,947 | void () { if (SystemInfo.isLinux) { contains("bash someargs", true, Maps.newHashMap(), "-i", "someargs", "bash"); contains("bash someargs", false, Maps.newHashMap(), "-i", "someargs", "bash"); } else if (SystemInfo.isMac) { contains("bash someargs", true, Maps.newHashMap(), "someargs", "bash"); contains("bash someargs"... | testAddInteractiveOrLogin |
50,948 | void () { if (SystemInfo.isUnix) { hasRcConfig("bash -i", "bash/bash-integration.bash", Maps.newHashMap()); hasRcConfig("bash --login", "bash/bash-integration.bash", Maps.newHashMap()); Map<String, String> envs = Maps.newHashMap(); hasRcConfig("bash --rcfile ~/.bashrc", "bash/bash-integration.bash", envs); assertTrue(e... | testAddRcConfig |
50,949 | List<String> (@NotNull String shellPath, @NotNull Map<String, String> envs, boolean shellIntegration) { List<String> shellCommand = LocalTerminalDirectRunner.convertShellPathToCommand(shellPath); if (shellIntegration) { ShellStartupOptions options = LocalTerminalDirectRunner.injectShellIntegration(shellCommand, envs); ... | getCommand |
50,950 | void (String path, String configName, Map<String, String> envs) { List<String> res = getCommand(path, envs, true); assertEquals("--rcfile", res.get(1)); assertTrue(res.get(2).contains(configName)); } | hasRcConfig |
50,951 | void (String[] expected, String path, Map<String, String> envs) { assertEquals(Arrays.asList(expected), getCommand(path, envs, true)); } | doTest |
50,952 | void (@NotNull String shellPath, boolean shellIntegration, Map<String, String> envs, String... item) { List<String> result = getCommand(shellPath, envs, shellIntegration); for (String i : item) { assertTrue(i + " isn't in " + StringUtil.join(result, " "), result.contains(i)); } } | contains |
50,953 | void (@NonNls List<String> expectedScreenLines, int timeoutMillis) { myWatcher.awaitScreenLinesEndWith(expectedScreenLines, timeoutMillis); } | awaitScreenLinesEndWith |
50,954 | void (@NonNls List<String> expectedScreenLines, int timeoutMillis) { myWatcher.awaitScreenLinesAre(expectedScreenLines, timeoutMillis); } | awaitScreenLinesAre |
50,955 | void (@NonNls BooleanSupplier condition, int timeoutMillis) { myWatcher.awaitBuffer(condition, timeoutMillis); } | awaitBufferCondition |
50,956 | String () { return myWatcher.getScreenLines(); } | getScreenLines |
50,957 | List<String> (boolean aboveCursorLine) { List<String> screenLines = new ArrayList<>(); myBuffer.lock(); try { int cursorLineInd = myTerminal.getCursorY() - 1; for (int row = 0; row < myBuffer.getHeight(); row++) { if (!aboveCursorLine || row < cursorLineInd) { TerminalLine line = myBuffer.getLine(row); screenLines.add(... | getScreenLines |
50,958 | void (@NotNull List<String> expectedScreenLines, long timeoutMillis) { boolean ok = awaitBuffer(() -> expectedScreenLines.equals(getScreenLines(true)), timeoutMillis); if (!ok) { Assert.assertEquals(expectedScreenLines, getScreenLines(true)); Assert.fail("Unexpected failure"); } } | awaitScreenLinesAre |
50,959 | void (@NotNull List<String> expectedScreenLines, long timeoutMillis) { boolean ok = awaitBuffer(() -> checkScreenLinesEndWith(expectedScreenLines), timeoutMillis); if (!ok) { Assert.assertEquals(expectedScreenLines, getScreenLines(true)); Assert.fail("Unexpected failure"); } } | awaitScreenLinesEndWith |
50,960 | boolean (@NotNull BooleanSupplier awaitCondition, long timeoutMillis) { CountDownLatch latch = new CountDownLatch(1); AtomicBoolean ok = new AtomicBoolean(false); TerminalModelListener listener = new TerminalModelListener() { @Override public void modelChanged() { if (awaitCondition.getAsBoolean()) { ok.set(true); latc... | awaitBuffer |
50,961 | void () { if (awaitCondition.getAsBoolean()) { ok.set(true); latch.countDown(); } } | modelChanged |
50,962 | boolean (@NotNull List<String> expectedScreenLines) { List<String> actualLines = getScreenLines(true); if (actualLines.size() < expectedScreenLines.size()) return false; List<String> lastActualLines = actualLines.subList(actualLines.size() - expectedScreenLines.size(), actualLines.size()); return expectedScreenLines.eq... | checkScreenLinesEndWith |
50,963 | String () { return myBuffer.getScreenLines(); } | getScreenLines |
50,964 | void (KeyEvent e) { if (isFeatureEnabled()) { myLastKeyPressedMillis.set(System.currentTimeMillis()); if (e.getKeyCode() == KeyEvent.VK_ESCAPE && e.getModifiersEx() == 0 && hideNotification()) { e.consume(); } } } | processKeyPressed |
50,965 | void () { myAlarm.cancelAllRequests(); myAlarm.addRequest(() -> { highlightMatchedCommand(myWidget.getProject()); }, 0); } | scheduleCommandHighlighting |
50,966 | boolean () { Experiments experiments = ourExperiments; if (experiments == null) { experiments = ReadAction.compute(() -> { return ApplicationManager.getApplication().isDisposed() ? null : Experiments.getInstance(); }); ourExperiments = experiments; } return experiments != null && experiments.isFeatureEnabled(FEATURE_ID... | isFeatureEnabled |
50,967 | void (@NotNull Project project) { if (!isEnabledForProject()) { setCommandHighlighting(null); return; } String command = myWidget.getTypedShellCommand().trim(); TerminalLineIntervalHighlighting commandHighlighting = highlightCommandIfMatched(project, command); setCommandHighlighting(commandHighlighting); ApplicationMan... | highlightMatchedCommand |
50,968 | boolean () { boolean shown = myNotificationDisposable != null && !Disposer.isDisposed(myNotificationDisposable); if (shown) { Disposer.dispose(myNotificationDisposable); } myNotificationDisposable = null; return shown; } | hideNotification |
50,969 | void (@Nullable TerminalLineIntervalHighlighting commandHighlighting) { if (commandHighlighting == null || commandHighlighting.isDisposed()) { hideNotification(); return; } if (myNotificationDisposable != null && !Disposer.isDisposed(myNotificationDisposable)) { return; } Disposable notificationDisposable = Disposer.ne... | showOrHideNotification |
50,970 | boolean () { return getPropertiesComponent().getBoolean(TerminalCommandHandlerCustomizer.TERMINAL_CUSTOM_COMMAND_EXECUTION, true); } | isEnabledForProject |
50,971 | PropertiesComponent () { PropertiesComponent propertiesComponent = myPropertiesComponent; if (propertiesComponent == null) { propertiesComponent = ReadAction.compute(() -> PropertiesComponent.getInstance()); myPropertiesComponent = propertiesComponent; } return propertiesComponent; } | getPropertiesComponent |
50,972 | String () { String workingDirectory = myWorkingDirectory; if (workingDirectory == null) { workingDirectory = StringUtil.notNullize(TerminalWorkingDirectoryManager.getWorkingDirectory(myWidget.asNewWidget())); myWorkingDirectory = workingDirectory; } return StringUtil.nullize(workingDirectory); } | getWorkingDirectory |
50,973 | boolean () { Boolean hasRunningCommands = myHasRunningCommands; if (hasRunningCommands == null) { hasRunningCommands = myWidget.hasRunningCommands(); myHasRunningCommands = hasRunningCommands; } return hasRunningCommands; } | hasRunningCommands |
50,974 | boolean (@NotNull KeyEvent keyPressed) { if (!isFeatureEnabled() || !isEnabledForProject()) { onShellCommandExecuted(); return false; } myLastKeyPressedMillis.set(System.currentTimeMillis()); String command = myWidget.getTypedShellCommand().trim(); if (LOG.isDebugEnabled()) { LOG.debug("typed shell command to execute: ... | processEnterKeyPressed |
50,975 | void () { myWorkingDirectory = null; myHasRunningCommands = null; } | onShellCommandExecuted |
50,976 | void (@NotNull String command) { TtyConnector connector = myWidget.getTtyConnector(); byte[] array = new byte[command.length()]; Arrays.fill(array, Ascii.BS); try { connector.write(array); } catch (IOException e) { LOG.info("Cannot clear shell command " + command, e); } } | clearTypedCommand |
50,977 | boolean (@NotNull KeyEvent e, @NotNull AnAction action) { KeyboardShortcut eventShortcut = new KeyboardShortcut(KeyStroke.getKeyStrokeForEvent(e), null); return ContainerUtil.exists(action.getShortcutSet().getShortcuts(), sc -> sc.isKeyboard() && sc.startsWith(eventShortcut)); } | matchAction |
50,978 | AnAction () { return Objects.requireNonNull(ActionManager.getInstance().getAction("Terminal.SmartCommandExecution.Run")); } | getRunAction |
50,979 | AnAction () { return Objects.requireNonNull(ActionManager.getInstance().getAction("Terminal.SmartCommandExecution.Debug")); } | getDebugAction |
50,980 | void () { String promptWhenCommandStarted = myPrevPromptWhenCommandStarted; if (promptWhenCommandStarted != null) { processTerminalBuffer(terminalTextBuffer -> { TerminalLine line = myPrompt.getLineAtCursor(terminalTextBuffer); String lineStr = line.getText(); if (lineStr.startsWith(promptWhenCommandStarted)) { // A sh... | refreshVfsIfPromptIsShown |
50,981 | void () { myPrompt.reset(); } | handleEnterPressed |
50,982 | void () { myPrompt.onKeyPressed(); } | handleAnyKeyPressed |
50,983 | void (@Nullable String commandHistoryFilePath) { myCommandHistoryFilePath = commandHistoryFilePath; } | setCommandHistoryFilePath |
50,984 | void (@Nullable List<String> shellCommand) { myShellCommand = shellCommand != null ? List.copyOf(shellCommand) : null; } | setShellCommand |
50,985 | String () { return myPrompt.getTypedShellCommand(); } | getTypedShellCommand |
50,986 | void (@NotNull Consumer<TtyConnector> consumer) { asNewWidget().getTtyConnectorAccessor().executeWithTtyConnector(consumer); } | executeWithTtyConnector |
50,987 | JBTerminalSystemSettingsProvider () { return (JBTerminalSystemSettingsProvider)super.getSettingsProvider(); } | getSettingsProvider |
50,988 | List<TerminalAction> () { List<TerminalAction> actions = new ArrayList<>(super.getActions()); if (TerminalToolWindowManager.isInTerminalToolWindow(this)) { ContainerUtil.addIfNotNull(actions, TerminalActionUtil.createTerminalAction(this, RenameTerminalSessionActionKt.ACTION_ID, true)); } JBTerminalWidgetListener listen... | getActions |
50,989 | void () { myTypings.set(0); myTerminalLine = null; myMaxCursorX = -1; } | reset |
50,990 | void () { TerminalLine terminalLine = processTerminalBuffer(this::getLineAtCursor); if (terminalLine != myTerminalLine) { myTypings.set(0); myTerminalLine = terminalLine; myMaxCursorX = -1; } String prompt = getLineTextUpToCursor(terminalLine); if (myTypings.get() == 0) { myPrompt = prompt; myTerminalLine = terminalLin... | onKeyPressed |
50,991 | String () { if (myTypings.get() == 0) { return ""; } TerminalLine terminalLine = processTerminalBuffer(this::getLineAtCursor); if (terminalLine != myTerminalLine) { return ""; } String lineTextUpToCursor = getLineTextUpToCursor(terminalLine); if (lineTextUpToCursor.startsWith(myPrompt)) { return lineTextUpToCursor.subs... | getTypedShellCommand |
50,992 | TerminalLine (@NotNull TerminalTextBuffer textBuffer) { return textBuffer.getLine(getLineNumberAtCursor()); } | getLineAtCursor |
50,993 | String (@Nullable TerminalLine line) { if (line == null) return ""; return processTerminalBuffer(textBuffer -> { int cursorX = getTerminal().getCursorX() - 1; String lineStr = line.getText(); int maxCursorX = Math.max(myMaxCursorX, cursorX); while (maxCursorX < lineStr.length() && !Character.isWhitespace(lineStr.charAt... | getLineTextUpToCursor |
50,994 | ShellTerminalWidget (@NotNull TerminalWidget widget) { return (ShellTerminalWidget)Objects.requireNonNull(JBTerminalWidget.asJediTermWidget(widget)); } | toShellJediTermWidgetOrThrow |
50,995 | String (@NotNull String shellName) { String rcfile = switch (shellName) { case BASH_NAME, SH_NAME -> "shell-integrations/bash/bash-integration.bash"; case ZSH_NAME -> "shell-integrations/zsh/.zshenv"; case FISH_NAME -> "shell-integrations/fish/fish-integration.fish"; default -> null; }; if (rcfile == null && isPowerShe... | findRCFile |
50,996 | boolean (@NotNull String shellName) { return shellName.equalsIgnoreCase("powershell") || shellName.equalsIgnoreCase("powershell.exe") || shellName.equalsIgnoreCase("pwsh") || shellName.equalsIgnoreCase("pwsh.exe"); } | isPowerShell |
50,997 | LocalTerminalDirectRunner (Project project) { return new LocalTerminalDirectRunner(project); } | createTerminalRunner |
50,998 | TerminalWidget (@NotNull Disposable parent, @NotNull ShellStartupOptions startupOptions) { if (isBlockTerminalEnabled()) { return new TerminalWidgetImpl(myProject, getSettingsProvider(), parent); } return super.createShellTerminalWidget(parent, startupOptions); } | createShellTerminalWidget |
50,999 | void (@NotNull Map<String, String> userEnvs, @NotNull Map<String, String> resultEnvs) { String wslEnv = userEnvs.keySet().stream().map(name -> name + "/u").collect(Collectors.joining(":")); if (wslEnv.isEmpty()) return; String prevValue = userEnvs.get(WslConstants.WSLENV); if (prevValue == null) { prevValue = System.ge... | setupWslEnv |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.