Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
290,200
String () { return "Wrapper[" + getText() + "]"; }
toString
290,201
boolean () { return myDynamic; }
isDynamic
290,202
void (final boolean b) { myDynamic = b; }
setDynamic
290,203
boolean (Object o) { if (this == o) return true; if (!(o instanceof ItemWrapper)) return false; if (!Objects.equals(myValue, ((ItemWrapper<?>)o).myValue)) return false; return true; }
equals
290,204
int () { return myValue != null ? myValue.hashCode() : 0; }
hashCode
290,205
boolean (Executor executor) { return false; }
available
290,206
boolean () { return false; }
hasActions
290,207
PopupStep (Project project, ChooseRunConfigurationPopup action) { return PopupStep.FINAL_CHOICE; }
getNextStep
290,208
ItemWrapper (final @NotNull Project project, final @NotNull RunnerAndConfigurationSettings settings, final boolean dynamic) { final ItemWrapper result = wrap(project, settings); result.setDynamic(dynamic); return result; }
wrap
290,209
ItemWrapper (final @NotNull Project project, final @NotNull RunnerAndConfigurationSettings settings) { return new ItemWrapper<>(settings) { @Override public void perform(@NotNull Project project, @NotNull Executor executor, @NotNull DataContext context) { RunnerAndConfigurationSettings config = getValue(); final RunManager manager = RunManager.getInstance(project); if (!manager.isRiderRunWidgetActive()) RunManager.getInstance(project).setSelectedConfiguration(config); ExecutorRegistryImpl.RunnerHelper.run(project, settings.getConfiguration(), settings, context, executor); } @Override public ConfigurationType getType() { return getValue().getType(); } @Override public Icon getIcon() { return RunManagerEx.getInstanceEx(project).getConfigurationIcon(getValue(), true); } @Override public String getText() { return Executor.shortenNameIfNeeded(getValue().getName()) + getValue().getConfiguration().getPresentableType(); } @Override public boolean hasActions() { return true; } @Override public boolean available(@NotNull Executor executor) { RunnerAndConfigurationSettings value = getValue(); return value != null && ExecutorRegistryImpl.RunnerHelper.canRun(project, executor, settings.getConfiguration()); } @Override public PopupStep getNextStep(final @NotNull Project project, final @NotNull ChooseRunConfigurationPopup action) { return new ConfigurationActionsStep(project, action, getValue(), isDynamic()); } }; }
wrap
290,210
void (@NotNull Project project, @NotNull Executor executor, @NotNull DataContext context) { RunnerAndConfigurationSettings config = getValue(); final RunManager manager = RunManager.getInstance(project); if (!manager.isRiderRunWidgetActive()) RunManager.getInstance(project).setSelectedConfiguration(config); ExecutorRegistryImpl.RunnerHelper.run(project, settings.getConfiguration(), settings, context, executor); }
perform
290,211
ConfigurationType () { return getValue().getType(); }
getType
290,212
Icon () { return RunManagerEx.getInstanceEx(project).getConfigurationIcon(getValue(), true); }
getIcon
290,213
String () { return Executor.shortenNameIfNeeded(getValue().getName()) + getValue().getConfiguration().getPresentableType(); }
getText
290,214
boolean () { return true; }
hasActions
290,215
boolean (@NotNull Executor executor) { RunnerAndConfigurationSettings value = getValue(); return value != null && ExecutorRegistryImpl.RunnerHelper.canRun(project, executor, settings.getConfiguration()); }
available
290,216
PopupStep (final @NotNull Project project, final @NotNull ChooseRunConfigurationPopup action) { return new ConfigurationActionsStep(project, action, getValue(), isDynamic()); }
getNextStep
290,217
boolean () { return !isDynamic() && getValue() instanceof RunnerAndConfigurationSettings; }
canBeDeleted
290,218
int () { int i = 0; for (final ItemWrapper wrapper : getValues()) { if (wrapper.isDynamic()) { return i; } i++; } return -1; }
getDynamicIndex
290,219
boolean () { return false; }
isAutoSelectionEnabled
290,220
ListSeparator (ItemWrapper value) { if (value.addSeparatorAbove()) return new ListSeparator(); final List<ItemWrapper> configurations = getValues(); final int index = configurations.indexOf(value); if (index > 0 && index <= configurations.size() - 1) { final ItemWrapper aboveConfiguration = configurations.get(index - 1); if (aboveConfiguration != null && aboveConfiguration.isDynamic() != value.isDynamic()) { return new ListSeparator(); } final ConfigurationType currentType = value.getType(); final ConfigurationType aboveType = aboveConfiguration == null ? null : aboveConfiguration.getType(); if (aboveType != currentType && currentType != null) { return new ListSeparator(); // new ListSeparator(currentType.getDisplayName()); } } return null; }
getSeparatorAbove
290,221
boolean () { return true; }
isSpeedSearchEnabled
290,222
int () { final RunnerAndConfigurationSettings currentConfiguration = RunManager.getInstance(myProject).getSelectedConfiguration(); if (currentConfiguration == null && myDefaultConfiguration != -1) { return myDefaultConfiguration; } return currentConfiguration instanceof RunnerAndConfigurationSettingsImpl ? getValues() .indexOf(ItemWrapper.wrap(myProject, currentConfiguration)) : -1; }
getDefaultOptionIndex
290,223
PopupStep (final ItemWrapper wrapper, boolean finalChoice) { if (myAction.myEditConfiguration) { final Object o = wrapper.getValue(); if (o instanceof RunnerAndConfigurationSettingsImpl) { return doFinalStep(() -> myAction.editConfiguration(myProject, (RunnerAndConfigurationSettings)o)); } } if (finalChoice && wrapper.available(myAction.getExecutor())) { return doFinalStep(() -> { if (myAction.getExecutor() == myAction.myAlternativeExecutor) { PropertiesComponent.getInstance().setValue(myAction.myAddKey, Boolean.toString(true)); } wrapper.perform(myProject, myAction.getExecutor(), DataManager.getInstance().getDataContext()); }); } else { return wrapper.getNextStep(myProject, myAction); } }
onChosen
290,224
boolean (ItemWrapper wrapper) { return myAction.myEditConfiguration || wrapper.available(myAction.getExecutor()) || wrapper.getNextStep(myProject, myAction) == FINAL_CHOICE; }
isFinal
290,225
boolean (ItemWrapper selectedValue) { return selectedValue.hasActions(); }
hasSubstep
290,226
String (ItemWrapper value) { //noinspection DialogTitleCapitalization return value.getText(); }
getTextFor
290,227
Icon (ItemWrapper value) { return value.getIcon(); }
getIconFor
290,228
RunnerAndConfigurationSettings () { return mySettings; }
getSettings
290,229
Icon () { return RunManagerEx.getInstanceEx(myProject).getConfigurationIcon(mySettings); }
getIcon
290,230
ListSeparator (ActionWrapper value) { return value.addSeparatorAbove() ? new ListSeparator() : null; }
getSeparatorAbove
290,231
ActionWrapper[] (final @NotNull Project project, final ChooseRunConfigurationPopup action, final @NotNull RunnerAndConfigurationSettings settings, final boolean dynamic) { final List<ActionWrapper> result = new ArrayList<>(); final ExecutionTarget active = ExecutionTargetManager.getActiveTarget(project); for (final ExecutionTarget eachTarget : ExecutionTargetManager.getTargetsToChooseFor(project, settings.getConfiguration())) { result.add(new ActionWrapper(eachTarget.getDisplayName(), eachTarget.getIcon()) { { setChecked(eachTarget.equals(active)); } @Override public void perform() { final RunManager manager = RunManager.getInstance(project); if (dynamic) { manager.setTemporaryConfiguration(settings); } manager.setSelectedConfiguration(settings); ExecutionTargetManager.setActiveTarget(project, eachTarget); ExecutionUtil.runConfiguration(settings, action.getExecutor()); } }); } boolean isFirst = true; final List<Executor> allExecutors = new ArrayList<>(); for (Executor executor: Executor.EXECUTOR_EXTENSION_NAME.getExtensionList()) { if (executor instanceof ExecutorGroup) { allExecutors.addAll(((ExecutorGroup<?>)executor).childExecutors()); } else { allExecutors.add(executor); } } for (final Executor executor : allExecutors) { if (ExecutorRegistryImpl.RunnerHelper.canRun(project, executor, settings.getConfiguration())) { result.add(new ActionWrapper(executor.getActionName(), executor.getIcon(), isFirst) { @Override public void perform() { final RunManager manager = RunManager.getInstance(project); if (dynamic) { manager.setTemporaryConfiguration(settings); } if (!manager.isRiderRunWidgetActive()) manager.setSelectedConfiguration(settings); ExecutorRegistryImpl.RunnerHelper.run(project, settings.getConfiguration(), settings, DataContext.EMPTY_CONTEXT, executor); } }); isFirst = false; } } result.add(new ActionWrapper(ExecutionBundle.message("choose.run.popup.edit"), AllIcons.Actions.EditSource, true) { @Override public void perform() { if (dynamic) { RunManager.getInstance(project).setTemporaryConfiguration(settings); } action.editConfiguration(project, settings); } }); if (settings.isTemporary() || dynamic) { result.add(new ActionWrapper(ExecutionBundle.message("choose.run.popup.save"), AllIcons.Actions.MenuSaveall) { @Override public void perform() { final RunManager manager = RunManager.getInstance(project); if (dynamic) { manager.setTemporaryConfiguration(settings); } manager.makeStable(settings); } }); } result.add(new ActionWrapper(ExecutionBundle.message("choose.run.popup.delete"), AllIcons.Actions.Cancel) { @Override public void perform() { deleteConfiguration(project, settings, action.myPopup); } }); return result.toArray(new ActionWrapper[0]); }
buildActions
290,232
void () { final RunManager manager = RunManager.getInstance(project); if (dynamic) { manager.setTemporaryConfiguration(settings); } manager.setSelectedConfiguration(settings); ExecutionTargetManager.setActiveTarget(project, eachTarget); ExecutionUtil.runConfiguration(settings, action.getExecutor()); }
perform
290,233
void () { final RunManager manager = RunManager.getInstance(project); if (dynamic) { manager.setTemporaryConfiguration(settings); } if (!manager.isRiderRunWidgetActive()) manager.setSelectedConfiguration(settings); ExecutorRegistryImpl.RunnerHelper.run(project, settings.getConfiguration(), settings, DataContext.EMPTY_CONTEXT, executor); }
perform
290,234
void () { if (dynamic) { RunManager.getInstance(project).setTemporaryConfiguration(settings); } action.editConfiguration(project, settings); }
perform
290,235
void () { final RunManager manager = RunManager.getInstance(project); if (dynamic) { manager.setTemporaryConfiguration(settings); } manager.makeStable(settings); }
perform
290,236
void () { deleteConfiguration(project, settings, action.myPopup); }
perform
290,237
PopupStep (final ActionWrapper selectedValue, boolean finalChoice) { return doFinalStep(() -> selectedValue.perform()); }
onChosen
290,238
Icon (ActionWrapper aValue) { return aValue.getIcon(); }
getIconFor
290,239
String (ActionWrapper value) { return value.getText(); }
getTextFor
290,240
String () { return myName; }
getText
290,241
Icon () { return myIcon; }
getIcon
290,242
void (ActionEvent e) { if (myListPopup.getSpeedSearch().isHoldingFilter()) return; for (final Object item : myListPopup.getListStep().getValues()) { if (item instanceof ItemWrapper && ((ItemWrapper<?>)item).getMnemonic() == myNumber) { myListPopup.setFinalRunnable(() -> execute((ItemWrapper)item, myExecutor)); myListPopup.closeOk(null); } } }
actionPerformed
290,243
WizardPopup (WizardPopup parent, PopupStep step, Object parentValue) { return new RunListPopup(getProject(), parent, (ListPopupStep)step, parentValue); }
createPopup
290,244
boolean (Object value) { if (super.shouldBeShowing(value)) { return true; } if (value instanceof FolderWrapper folderWrapper && mySpeedSearch.isHoldingFilter()) { for (RunnerAndConfigurationSettings configuration : folderWrapper.myConfigurations) { if (mySpeedSearch.shouldBeShowing(configuration.getName() + configuration.getConfiguration().getPresentableType()) ) { return true; } } } return false; }
shouldBeShowing
290,245
JComponent () { JPanel res = new JPanel(new BorderLayout()); res.setBorder(JBUI.Borders.emptyRight(JBUI.CurrentTheme.ActionsList.elementIconGap())); res.add(myMnemonicLabel, BorderLayout.WEST); res.add(myIconLabel, BorderLayout.CENTER); return res; }
createIconBar
290,246
void (boolean handleFinalChoices, InputEvent e) { if (e instanceof MouseEvent && e.isShiftDown()) { handleShiftClick(handleFinalChoices, e, this); return; } _handleSelect(handleFinalChoices, e); }
handleSelect
290,247
void (boolean handleFinalChoices, InputEvent e) { super.handleSelect(handleFinalChoices, e); }
_handleSelect
290,248
void (boolean handleFinalChoices, final InputEvent inputEvent, final RunListPopup popup) { myCurrentExecutor = myAlternativeExecutor; popup._handleSelect(handleFinalChoices, inputEvent); }
handleShiftClick
290,249
void () { final PropertiesComponent propertiesComponent = PropertiesComponent.getInstance(); if (!propertiesComponent.isTrueValue("run.configuration.delete.ad")) { propertiesComponent.setValue("run.configuration.delete.ad", Boolean.toString(true)); } final int index = getSelectedIndex(); if (index == -1) { return; } final Object o = getListModel().get(index); if (o instanceof ItemWrapper && ((ItemWrapper<?>)o).canBeDeleted()) { RunnerAndConfigurationSettings runConfig = (RunnerAndConfigurationSettings)((ItemWrapper<?>)o).getValue(); deleteConfiguration(myProject, runConfig, ChooseRunConfigurationPopup.this.myPopup); getListModel().deleteItem(o); final List<Object> values = getListStep().getValues(); values.remove(o); if (index < values.size()) { onChildSelectedFor(values.get(index)); } else if (index - 1 >= 0) { onChildSelectedFor(values.get(index - 1)); } } }
removeSelected
290,250
boolean () { return true; }
isResizable
290,251
void (@NotNull Project project, @NotNull Executor executor, @NotNull DataContext context) { RunManager runManager = RunManager.getInstance(project); RunnerAndConfigurationSettings selectedConfiguration = runManager.getSelectedConfiguration(); if (myConfigurations.contains(selectedConfiguration)) { runManager.setSelectedConfiguration(selectedConfiguration); ExecutionUtil.runConfiguration(selectedConfiguration, myExecutorProvider.getExecutor()); } }
perform
290,252
Icon () { return AllIcons.Nodes.Folder; }
getIcon
290,253
String () { return getValue(); }
getText
290,254
boolean () { return true; }
hasActions
290,255
PopupStep (Project project, ChooseRunConfigurationPopup action) { List<ConfigurationActionsStep> steps = new ArrayList<>(); for (RunnerAndConfigurationSettings settings : myConfigurations) { steps.add(new ConfigurationActionsStep(project, action, settings, false)); } return new FolderStep(myProject, myExecutorProvider, null, steps, action); }
getNextStep
290,256
PopupStep (final ConfigurationActionsStep selectedValue, boolean finalChoice) { if (finalChoice) { if (myPopup.myEditConfiguration) { final RunnerAndConfigurationSettings settings = selectedValue.getSettings(); return doFinalStep(() -> myPopup.editConfiguration(myProject, settings)); } return doFinalStep(() -> { RunnerAndConfigurationSettings settings = selectedValue.getSettings(); RunManager.getInstance(myProject).setSelectedConfiguration(settings); ExecutionUtil.runConfiguration(settings, myExecutorProvider.getExecutor()); }); } else { return selectedValue; } }
onChosen
290,257
Icon (ConfigurationActionsStep aValue) { return aValue.getIcon(); }
getIconFor
290,258
String (ConfigurationActionsStep value) { return value.getName(); }
getTextFor
290,259
boolean (ConfigurationActionsStep selectedValue) { return !selectedValue.getValues().isEmpty(); }
hasSubstep
290,260
ItemWrapper (@NotNull Project project, @NotNull RunnerAndConfigurationSettings configuration, @Nullable RunnerAndConfigurationSettings selectedConfiguration, @NotNull Map<RunnerAndConfigurationSettings, ItemWrapper<?>> wrappedExisting) { ItemWrapper wrapped = ItemWrapper.wrap(project, configuration); if (configuration == selectedConfiguration) { wrapped.setMnemonic(1); } wrappedExisting.put(configuration, wrapped); return wrapped; }
wrapAndAdd
290,261
FolderWrapper (@NotNull Project project, @NotNull ExecutorProvider executorProvider, @Nullable RunnerAndConfigurationSettings selectedConfiguration, @NotNull String folderName, @NotNull List<? extends RunnerAndConfigurationSettings> configurations) { boolean isSelected = selectedConfiguration != null && configurations.contains(selectedConfiguration); String value = folderName; if (isSelected) { value += " (mnemonic is to \"" + selectedConfiguration.getName() + "\")"; } FolderWrapper result = new FolderWrapper(project, executorProvider, value, configurations); if (isSelected) { result.setMnemonic(1); } return result; }
createFolderItem
290,262
void (@NotNull RunnerAndConfigurationSettings selectedConfiguration, @NotNull Project project, @NotNull List<ItemWrapper<?>> result) { boolean isFirst = true; final ExecutionTarget activeTarget = ExecutionTargetManager.getActiveTarget(project); for (ExecutionTarget eachTarget : ExecutionTargetManager.getTargetsToChooseFor(project, selectedConfiguration.getConfiguration())) { ItemWrapper<ExecutionTarget> itemWrapper = new ItemWrapper<>(eachTarget, isFirst) { @Override public Icon getIcon() { return getValue().getIcon(); } @Override public String getText() { return getValue().getDisplayName(); } @Override public void perform(final @NotNull Project project, final @NotNull Executor executor, @NotNull DataContext context) { ExecutionTargetManager.setActiveTarget(project, getValue()); ExecutionUtil.doRunConfiguration(selectedConfiguration, executor, null, null, context); } @Override public boolean available(Executor executor) { return true; } }; itemWrapper.setChecked(eachTarget.equals(activeTarget)); result.add(itemWrapper); isFirst = false; } }
addActionsForSelected
290,263
Icon () { return getValue().getIcon(); }
getIcon
290,264
String () { return getValue().getDisplayName(); }
getText
290,265
void (final @NotNull Project project, final @NotNull Executor executor, @NotNull DataContext context) { ExecutionTargetManager.setActiveTarget(project, getValue()); ExecutionUtil.doRunConfiguration(selectedConfiguration, executor, null, null, context); }
perform
290,266
boolean (Executor executor) { return true; }
available
290,267
ItemWrapper<Void> () { ItemWrapper<Void> result = new ItemWrapper<>(null) { @Override public Icon getIcon() { return AllIcons.Actions.EditSource; } @Override public String getText() { return UIUtil.removeMnemonic(ActionsBundle.message("action.editRunConfigurations.text")); } @Override public void perform(final @NotNull Project project, final @NotNull Executor executor, @NotNull DataContext context) { if (new EditConfigurationsDialog(project) { @Override protected void init() { setOKButtonText(executor.getActionName()); myExecutor = executor; super.init(); } }.showAndGet()) { ApplicationManager.getApplication().invokeLater(() -> { RunnerAndConfigurationSettings configuration = RunManager.getInstance(project).getSelectedConfiguration(); if (configuration != null) { ExecutionUtil.doRunConfiguration(configuration, executor, null, null, context); } }, project.getDisposed()); } } @Override public boolean available(Executor executor) { return true; } }; result.setMnemonic(0); return result; }
createEditAction
290,268
Icon () { return AllIcons.Actions.EditSource; }
getIcon
290,269
String () { return UIUtil.removeMnemonic(ActionsBundle.message("action.editRunConfigurations.text")); }
getText
290,270
void (final @NotNull Project project, final @NotNull Executor executor, @NotNull DataContext context) { if (new EditConfigurationsDialog(project) { @Override protected void init() { setOKButtonText(executor.getActionName()); myExecutor = executor; super.init(); } }.showAndGet()) { ApplicationManager.getApplication().invokeLater(() -> { RunnerAndConfigurationSettings configuration = RunManager.getInstance(project).getSelectedConfiguration(); if (configuration != null) { ExecutionUtil.doRunConfiguration(configuration, executor, null, null, context); } }, project.getDisposed()); } }
perform
290,271
void () { setOKButtonText(executor.getActionName()); myExecutor = executor; super.init(); }
init
290,272
boolean (Executor executor) { return true; }
available
290,273
void (List<ItemWrapper<?>> result, Map<RunnerAndConfigurationSettings, ItemWrapper<?>> existing, Project project, RunManager manager, RunnerAndConfigurationSettings selectedConfiguration) { if (!EventQueue.isDispatchThread()) { return; } final DataContext dataContext = DataManager.getInstance().getDataContext(); final ConfigurationContext context = ConfigurationContext.getFromContext(dataContext, ActionPlaces.UNKNOWN); final List<ConfigurationFromContext> producers = PreferredProducerFind.getConfigurationsFromContext(context.getLocation(), context, false, true); if (producers == null) return; producers.sort(ConfigurationFromContext.NAME_COMPARATOR); final RunnerAndConfigurationSettings[] preferred = {null}; int i = 2; // selectedConfiguration == null ? 1 : 2; for (final ConfigurationFromContext fromContext : producers) { final RunnerAndConfigurationSettings configuration = fromContext.getConfigurationSettings(); if (existing.containsKey(configuration)) { final ItemWrapper wrapper = existing.get(configuration); if (wrapper.getMnemonic() != 1) { wrapper.setMnemonic(i); i++; } } else { if (selectedConfiguration != null && configuration.equals(selectedConfiguration)) continue; if (preferred[0] == null) { preferred[0] = configuration; } //noinspection unchecked final ItemWrapper wrapper = new ItemWrapper(configuration) { @Override public Icon getIcon() { return RunManagerEx.getInstanceEx(project).getConfigurationIcon(configuration); } @Override public String getText() { return Executor.shortenNameIfNeeded(configuration.getName()) + configuration.getConfiguration().getPresentableType(); } @Override public boolean available(Executor executor) { return ProgramRunner.getRunner(executor.getId(), configuration.getConfiguration()) != null; } @Override public void perform(@NotNull Project project, @NotNull Executor executor, @NotNull DataContext context) { manager.setTemporaryConfiguration(configuration); RunManager.getInstance(project).setSelectedConfiguration(configuration); ExecutionUtil.doRunConfiguration(configuration, executor, null, null, context); } @Override public PopupStep getNextStep(final @NotNull Project project, final @NotNull ChooseRunConfigurationPopup action) { return new ConfigurationActionsStep(project, action, configuration, isDynamic()); } @Override public boolean hasActions() { return true; } }; wrapper.setDynamic(true); wrapper.setMnemonic(i); result.add(wrapper); i++; } } }
populateWithDynamicRunners
290,274
Icon () { return RunManagerEx.getInstanceEx(project).getConfigurationIcon(configuration); }
getIcon
290,275
String () { return Executor.shortenNameIfNeeded(configuration.getName()) + configuration.getConfiguration().getPresentableType(); }
getText
290,276
boolean (Executor executor) { return ProgramRunner.getRunner(executor.getId(), configuration.getConfiguration()) != null; }
available
290,277
void (@NotNull Project project, @NotNull Executor executor, @NotNull DataContext context) { manager.setTemporaryConfiguration(configuration); RunManager.getInstance(project).setSelectedConfiguration(configuration); ExecutionUtil.doRunConfiguration(configuration, executor, null, null, context); }
perform
290,278
PopupStep (final @NotNull Project project, final @NotNull ChooseRunConfigurationPopup action) { return new ConfigurationActionsStep(project, action, configuration, isDynamic()); }
getNextStep
290,279
boolean () { return true; }
hasActions
290,280
void (@NotNull AnActionEvent e) { final Project project = e.getData(CommonDataKeys.PROJECT); assert project != null; new ChooseRunConfigurationPopup(project, getAdKey(), getDefaultExecutor(), getAlternativeExecutor()).show(); }
actionPerformed
290,281
Executor () { return DefaultRunExecutor.getRunExecutorInstance(); }
getDefaultExecutor
290,282
Executor () { return ExecutorRegistry.getInstance().getExecutorById(ToolWindowId.DEBUG); }
getAlternativeExecutor
290,283
String () { return "run.configuration.alternate.action.ad"; }
getAdKey
290,284
void (@NotNull AnActionEvent e) { final Presentation presentation = e.getPresentation(); final Project project = e.getData(CommonDataKeys.PROJECT); presentation.setEnabled(true); if (project == null || project.isDisposed()) { presentation.setEnabledAndVisible(false); return; } if (null == getDefaultExecutor()) { presentation.setEnabledAndVisible(false); return; } presentation.setEnabledAndVisible(true); }
update
290,285
ActionUpdateThread () { return ActionUpdateThread.BGT; }
getActionUpdateThread
290,286
boolean () { return true; }
isDumbAware
290,287
boolean (@NotNull AnActionEvent event) { ConsoleView consoleView = getConsoleView(event); return consoleView != null && consoleView.isOutputPaused(); }
isSelected
290,288
void (@NotNull AnActionEvent event, boolean flag) { ConsoleView consoleView = getConsoleView(event); if (consoleView != null) { consoleView.setOutputPaused(flag); } }
setSelected
290,289
ActionUpdateThread () { return ActionUpdateThread.BGT; }
getActionUpdateThread
290,290
void (@NotNull AnActionEvent event) { super.update(event); ConsoleView consoleView = getConsoleView(event); boolean isEnabled; if (consoleView == null || !consoleView.canPause()) { isEnabled = false; } else { RunContentDescriptor descriptor = StopAction.getRecentlyStartedContentDescriptor(event.getDataContext()); ProcessHandler handler = descriptor != null ? descriptor.getProcessHandler() : null; isEnabled = handler != null && !handler.isProcessTerminated() || consoleView.hasDeferredOutput(); } Presentation presentation = event.getPresentation(); presentation.setEnabledAndVisible(isEnabled); }
update
290,291
void (@Nullable ProcessHandler processHandler) { myProcessHandler = processHandler; }
setProcessHandler
290,292
void (final @NotNull AnActionEvent e) { update(e.getPresentation(), getTemplatePresentation(), myProcessHandler); }
update
290,293
ActionUpdateThread () { return ActionUpdateThread.EDT; }
getActionUpdateThread
290,294
void (@NotNull Presentation presentation, @NotNull Presentation templatePresentation, @Nullable ProcessHandler processHandler) { boolean enable = false; Icon icon = templatePresentation.getIcon(); String description = templatePresentation.getDescription(); if (processHandler != null && !processHandler.isProcessTerminated()) { enable = true; if (processHandler.isProcessTerminating() && processHandler instanceof KillableProcess killableProcess) { if (killableProcess.canKillProcess()) { // 'force quite' action presentation icon = AllIcons.Debugger.KillProcess; description = ExecutionBundle.message("action.terminating.process.progress.kill.description"); } } } presentation.setEnabled(enable); presentation.setIcon(icon); presentation.setDescription(description); }
update
290,295
void (@NotNull AnActionEvent e) { stopProcess(myProcessHandler); }
actionPerformed
290,296
void (@Nullable ProcessHandler processHandler) { ExecutionManagerImpl.stopProcess(processHandler); }
stopProcess
290,297
boolean (RunConfiguration configuration, ConfigurationContext context) { return super.isEnabledFor(configuration, context) && RunNewConfigurationContextAction.isNewConfiguration(configuration, context); }
isEnabledFor
290,298
String (@NotNull String path) { try { String converted = myWsl.getWslPath(path); return converted != null ? converted : path; } catch (IllegalArgumentException e) { LOG.warn("Failed to convert to path: " + path, e); return path; } }
convertPath
290,299
String (@NotNull String pathList) { List<String> paths = StringUtil.split(pathList, File.pathSeparator); return Strings.join(ContainerUtil.map(paths, p -> convertPath(p)), ":"); }
convertPathList