Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
290,100
void (RunnerAndConfigurationSettings configuration, ConfigurationContext context) { if (!ApplicationManager.getApplication().isUnitTestMode()) { RunDialog.editConfiguration(context.getProject(), configuration, ExecutionBundle.message("edit.run.configuration.for.item.dialog.title", configuration.getName())); } }
perform
290,101
void (Presentation presentation, ConfigurationContext context, @NotNull String actionText) { presentation.setEnabledAndVisible(false); }
update
290,102
void (Presentation presentation, String actionText) { }
updateText
290,103
void (RunnerAndConfigurationSettings configurationSettings, ConfigurationContext context) { }
perform
290,104
boolean (@NotNull AnActionEvent e) { return ActionPlaces.isMainMenuOrActionSearch(e.getPlace()) || ActionPlaces.NEW_UI_RUN_TOOLBAR.equals(e.getPlace()) || ActionPlaces.MAIN_TOOLBAR.equals(e.getPlace()) || ActionPlaces.NAVIGATION_BAR_TOOLBAR.equals(e.getPlace()) || ActionPlaces.TOUCHBAR_GENERAL.equals(e.getPlace()); }
isPlaceGlobal
290,105
ActionUpdateThread () { return ActionUpdateThread.BGT; }
getActionUpdateThread
290,106
void (final @NotNull AnActionEvent e) { boolean enable = false; Icon icon = getActionIcon(e); String description = getTemplatePresentation().getDescription(); Presentation presentation = e.getPresentation(); if (isPlaceGlobal(e)) { List<RunContentDescriptor> stoppableDescriptors = getActiveStoppableDescriptors(e.getPro...
update
290,107
Icon (final @NotNull AnActionEvent e) { return getTemplatePresentation().getIcon(); }
getActionIcon
290,108
void (final @NotNull AnActionEvent e) { final DataContext dataContext = e.getDataContext(); Project project = e.getProject(); List<RunContentDescriptor> stoppableDescriptors = getActiveStoppableDescriptors(project); int stopCount = stoppableDescriptors.size(); if (isPlaceGlobal(e)) { if (stopCount == 1) { ExecutionMana...
actionPerformed
290,109
boolean (HandlerItem item) { return item.hasSeparator; }
hasSeparatorAboveOf
290,110
void (@NotNull LightweightWindowEvent event) { myActivePopupRef = null; }
onClosed
290,111
void (@NotNull AnActionEvent e, DataContext dataContext, Project project, JBPopup popup) { InputEvent inputEvent = e.getInputEvent(); Component component = inputEvent != null ? inputEvent.getComponent() : null; if (component != null && (ActionPlaces.MAIN_TOOLBAR.equals(e.getPlace()) || ActionPlaces.NAVIGATION_BAR_TOOLB...
showStopPopup
290,112
List<RunContentDescriptor> (@Nullable Project project) { List<RunContentDescriptor> runningProcesses = project != null ? ContainerUtil.map(getStoppableDescriptors(project), kotlin.Pair::getFirst) : Collections.emptyList(); if (runningProcesses.isEmpty()) { return Collections.emptyList(); } List<RunContentDescriptor> ac...
getActiveStoppableDescriptors
290,113
boolean (@Nullable RunContentDescriptor descriptor) { @Nullable ProcessHandler processHandler = descriptor != null ? descriptor.getProcessHandler() : null; return processHandler != null && !processHandler.isProcessTerminated() && (!processHandler.isProcessTerminating() || processHandler instanceof KillableProcess && ((...
canBeStopped
290,114
String () { return displayName; }
toString
290,115
boolean (@NotNull Project project) { if (RunToolbarSlotManager.Companion.getInstance(project).getActive$intellij_platform_execution_impl()) { // Run Widget shows up only in Rider. In other IDEs it's a secret feature backed by the "ide.run.widget" Registry key. // The 'Run Current File' feature doesn't look great togeth...
hasRunCurrentFileItem
290,116
boolean (@NotNull Project project) { return hasRunCurrentFileItem(project) || ExperimentalUI.isNewUI() || PlatformUtils.isCLion(); }
hasRunSubActions
290,117
ActionUpdateThread () { return ActionUpdateThread.BGT; }
getActionUpdateThread
290,118
void (@NotNull AnActionEvent e) { Presentation presentation = e.getPresentation(); Project project = e.getData(CommonDataKeys.PROJECT); if (ActionPlaces.isMainMenuOrActionSearch(e.getPlace())) { presentation.setDescription(ExecutionBundle.messagePointer("choose.run.configuration.action.description")); } try { if (proje...
update
290,119
void (@Nullable ExecutionTarget target, @Nullable RunnerAndConfigurationSettings settings, @Nullable Project project, @NotNull Presentation presentation, String actionPlace) { presentation.putClientProperty(BUTTON_MODE, null); if (project != null && target != null && settings != null) { String name; if (!ExperimentalUI...
updatePresentation
290,120
void (final Presentation presentation, final RunnerAndConfigurationSettings settings, final Project project) { setConfigurationIcon(presentation, settings, project, true); }
setConfigurationIcon
290,121
void (final Presentation presentation, final RunnerAndConfigurationSettings settings, final Project project, final boolean withLiveIndicator) { try { presentation.setIcon(RunManagerEx.getInstanceEx(project).getConfigurationIcon(settings, withLiveIndicator)); } catch (IndexNotReadyException ignored) { } }
setConfigurationIcon
290,122
void (@NotNull AnActionEvent e) { if (ActionPlaces.TOUCHBAR_GENERAL.equals(e.getPlace())) { final Presentation presentation = e.getPresentation(); if (Boolean.TRUE.equals(presentation.getClientProperty(BUTTON_MODE))) { InputEvent inputEvent = e.getInputEvent(); Component component = inputEvent != null ? inputEvent.getC...
actionPerformed
290,123
boolean () { return true; }
shouldShowDisabledActions
290,124
JComponent (@NotNull Presentation presentation, @NotNull String place) { ComboBoxButton button = new RunConfigurationsComboBoxButton(presentation); if (isNoWrapping(place)) return button; NonOpaquePanel panel = new NonOpaquePanel(new BorderLayout()); Border border = UIUtil.isUnderDefaultMacTheme() ? JBUI.Borders.empty(...
createCustomComponent
290,125
void (@NotNull Component src, String place) { ActionManager manager = ActionManager.getInstance(); manager.tryToExecute(manager.getAction(IdeActions.ACTION_EDIT_RUN_CONFIGURATIONS), new MouseEvent(src, MouseEvent.MOUSE_PRESSED, System.currentTimeMillis(), 0, 0, 0, 0,false, 0), src, place, true ); }
performWhenButton
290,126
DefaultActionGroup (@NotNull JComponent button, @NotNull DataContext context) { final DefaultActionGroup allActionsGroup = new DefaultActionGroup(); final Project project = CommonDataKeys.PROJECT.getData(DataManager.getInstance().getDataContext(button)); if (project == null) { return allActionsGroup; } AnAction editRun...
createPopupActionGroup
290,127
int (@NotNull DefaultActionGroup allActionsGroup, @NotNull Project project, @NotNull Function<? super RunnerAndConfigurationSettings, ? extends AnAction> createAction, @NotNull Function<? super @NlsSafe String, ? extends DefaultActionGroup> createFolder, @Nullable BiFunction<? super RunnerAndConfigurationSettings, Stri...
addRunConfigurations
290,128
void (Project project, DefaultActionGroup allActionsGroup) { RunnerAndConfigurationSettings selected = RunManager.getInstance(project).getSelectedConfiguration(); if (selected != null) { ExecutionTarget activeTarget = ExecutionTargetManager.getActiveTarget(project); for (ExecutionTarget eachTarget : ExecutionTargetMana...
addTargetGroup
290,129
AnAction (final @NotNull RunnerAndConfigurationSettings configuration, final @NotNull Project project) { return new SelectConfigAction(configuration, project, executor -> true); }
createFinalAction
290,130
Dimension () { Dimension d = super.getPreferredSize(); d.width = Math.max(d.width, JBUIScale.scale(75)); return d; }
getPreferredSize
290,131
void () { DataContext context = DataManager.getInstance().getDataContext(this); final Project project = CommonDataKeys.PROJECT.getData(context); if (project != null && !ActionUtil.isDumbMode(project)) { new EditConfigurationsDialog(project).show(); return; } super.doShiftClick(); }
doShiftClick
290,132
void (ActionEvent event) { if (Boolean.TRUE.equals(getPresentation().getClientProperty(BUTTON_MODE))) { performWhenButton(this, ActionPlaces.UNKNOWN); return; } super.fireActionPerformed(event); }
fireActionPerformed
290,133
boolean (@NotNull Presentation presentation) { return !Boolean.TRUE.equals(presentation.getClientProperty(BUTTON_MODE)); }
isArrowVisible
290,134
void (final @NotNull AnActionEvent e) { final Project project = e.getData(CommonDataKeys.PROJECT); if (project != null) { RunnerAndConfigurationSettings settings = chooseTempSettings(project); if (settings != null) { final RunManager runManager = RunManager.getInstance(project); runManager.makeStable(settings); } } }
actionPerformed
290,135
void (final @NotNull AnActionEvent e) { final Presentation presentation = e.getPresentation(); final Project project = e.getData(CommonDataKeys.PROJECT); if (project == null) { disable(presentation); return; } RunnerAndConfigurationSettings settings = chooseTempSettings(project); if (settings == null) { disable(present...
update
290,136
ActionUpdateThread () { return ActionUpdateThread.EDT; }
getActionUpdateThread
290,137
void (final Presentation presentation) { presentation.setEnabledAndVisible(false); }
disable
290,138
void (@NotNull DefaultActionGroup group, @NotNull Function<? super Executor, ? extends ExecutorRegistryImpl.ExecutorAction> actionCreator, @NotNull Function<? super Executor, Boolean> executorFilter) { for (Executor executor : Executor.EXECUTOR_EXTENSION_NAME.getExtensionList()) { if (executor instanceof ExecutorGroup)...
addExecutorActions
290,139
void () { // Add actions similar to com.intellij.execution.actions.ChooseRunConfigurationPopup.ConfigurationActionsStep#buildActions addExecutorActions(this, ExecutorRegistryImpl.RunCurrentFileExecutorAction::new, myExecutorFilter); addSeparator(); addAction(new ExecutorRegistryImpl.EditRunConfigAndRunCurrentFileExecut...
addSubActions
290,140
void (@NotNull AnActionEvent e) { e.getPresentation().setEnabledAndVisible(e.getProject() != null && hasRunCurrentFileItem(e.getProject())); }
update
290,141
ActionUpdateThread () { return ActionUpdateThread.EDT; }
getActionUpdateThread
290,142
void (@NotNull AnActionEvent e) { Project project = e.getProject(); if (project == null) return; RunManager.getInstance(project).setSelectedConfiguration(null); updatePresentation(null, null, project, e.getPresentation(), e.getPlace()); }
actionPerformed
290,143
void (@NotNull AnActionEvent e) { ExecutionTargetManager.setActiveTarget(myProject, myTarget); updatePresentation(ExecutionTargetManager.getActiveTarget(myProject), RunManager.getInstance(myProject).getSelectedConfiguration(), myProject, e.getPresentation(), e.getPlace()); }
actionPerformed
290,144
boolean () { RunnerAndConfigurationSettings configuration = RunManager.getInstance(myProject).getSelectedConfiguration(); return configuration == null || configuration.getType().isDumbAware(); }
isDumbAware
290,145
RunnerAndConfigurationSettings () { return myConfiguration; }
getConfiguration
290,146
void (final Presentation presentation) { setConfigurationIcon(presentation, myConfiguration, myProject); }
updateIcon
290,147
void () { // Add actions similar to com.intellij.execution.actions.ChooseRunConfigurationPopup.ConfigurationActionsStep#buildActions addExecutorActions(this, executor -> new ExecutorRegistryImpl.RunSpecifiedConfigExecutorAction(executor, myConfiguration, false), myExecutorFilter); addSeparator(ExperimentalUI.isNewUI() ...
addSubActions
290,148
void (@NotNull AnActionEvent e) { RunManager.getInstance(myProject).makeStable(myConfiguration); }
actionPerformed
290,149
void (@NotNull AnActionEvent e) { ChooseRunConfigurationPopup.deleteConfiguration(myProject, myConfiguration, null); }
actionPerformed
290,150
void (final @NotNull AnActionEvent e) { RunManager.getInstance(myProject).setSelectedConfiguration(myConfiguration); updatePresentation(ExecutionTargetManager.getActiveTarget(myProject), myConfiguration, myProject, e.getPresentation(), e.getPlace()); }
actionPerformed
290,151
void (final @NotNull AnActionEvent e) { super.update(e); updateIcon(e.getPresentation()); }
update
290,152
ActionUpdateThread () { return ActionUpdateThread.BGT; }
getActionUpdateThread
290,153
void (final @NotNull AnActionEvent e) { final Project project = e.getProject(); if (project == null || project.isDisposed()) return; final Ref<Pair<? extends JComponent, String>> stateRef = new Ref<>(); final Ref<Balloon> balloonRef = new Ref<>(); final Timer timer = TimerUtil.createNamedTimer("runningLists", 250); Act...
actionPerformed
290,154
void (ActionEvent actionEvent) { Balloon balloon = balloonRef.get(); if (project.isDisposed() || (balloon != null && balloon.isDisposed())) { timer.stop(); return; } ArrayList<Project> projects = new ArrayList<>(Arrays.asList(ProjectManager.getInstance().getOpenProjects())); //List should begin with current project pro...
actionPerformed
290,155
void (ActionEvent e) { if (e.getSource() instanceof MouseEvent mouseEvent) { Component component = mouseEvent.getComponent(); component = SwingUtilities.getDeepestComponentAt(component, mouseEvent.getX(), mouseEvent.getY()); Object value = ((JComponent)component).getClientProperty(KEY); if (value instanceof Trinity) { ...
actionPerformed
290,156
ActionUpdateThread () { return ActionUpdateThread.BGT; }
getActionUpdateThread
290,157
void (@NotNull AnActionEvent e) { Project[] projects = ProjectManager.getInstance().getOpenProjects(); for (Project project : projects) { boolean enabled = project != null && !project.isDisposed() && !ExecutionManagerImpl.getInstance(project).getRunningDescriptors(Conditions.alwaysTrue()).isEmpty(); e.getPresentation()...
update
290,158
boolean (RunConfiguration configuration, ConfigurationContext context) { return super.isEnabledFor(configuration) && isNewConfiguration(configuration, context); }
isEnabledFor
290,159
boolean (RunConfiguration configuration, ConfigurationContext context) { RunnerAndConfigurationSettings existing = context.findExisting(); return existing != null && !existing.getConfiguration().equals(configuration); }
isNewConfiguration
290,160
void (ConfigurationContext context) { final RunManagerEx runManager = (RunManagerEx)context.getRunManager(); DataContext dataContext = context.getDefaultDataContext(); ReadAction .nonBlocking(() -> findExisting(context)) .finishOnUiThread(ModalityState.nonModal(), existingConfiguration -> perform(runManager, existingCo...
perform
290,161
void (final RunnerAndConfigurationSettings configuration, ConfigurationContext context) { final RunManagerEx runManager = (RunManagerEx)context.getRunManager(); if (configuration == null) { RunnerAndConfigurationSettings contextConfiguration = context.getConfiguration(); if (contextConfiguration == null) { return; } ru...
perform
290,162
void (RunManagerEx runManager, RunnerAndConfigurationSettings configuration, DataContext dataContext) { if (runManager.shouldSetRunConfigurationFromContext()) { runManager.setSelectedConfiguration(configuration); RunConfigurationStartHistory.getInstance(configuration.getConfiguration().getProject()).register(configurat...
perform
290,163
boolean (@NotNull RunConfiguration configuration) { return getRunner(configuration) != null; }
isEnabledFor
290,164
void (final Presentation presentation, final @NotNull String actionText, final ConfigurationContext context) { presentation.setText(myExecutor.getStartActionText(actionText), true); Pair<Boolean, Boolean> b = isEnabledAndVisible(context); presentation.setEnabled(b.first); presentation.setVisible(b.second); }
updatePresentation
290,165
void (AnActionEvent event, ThreeState hadAnythingRunnable) { super.approximatePresentationByPreviousAvailability(event, hadAnythingRunnable); event.getPresentation().setText(myExecutor.getStartActionText() + "..."); }
approximatePresentationByPreviousAvailability
290,166
List<AnAction> (@NotNull ConfigurationContext context, @NotNull List<? extends ConfigurationFromContext> configurations) { final List<AnAction> childActions = new ArrayList<>(super.createChildActions(context, configurations)); boolean isMultipleConfigurationsFromAlternativeLocations = configurations.size() > 1 && confi...
createChildActions
290,167
AnAction (@NotNull ConfigurationContext context, @NotNull List<? extends ConfigurationFromContext> configurationsFromContext) { return new AnAction( CommonBundle.message("action.text.run.all"), ExecutionBundle.message("run.all.configurations.available.in.this.context"), AllIcons.RunConfigurations.Compound ) { @Override...
runAllConfigurationsAction
290,168
void (@NotNull AnActionEvent e) { long groupId = ExecutionEnvironment.getNextUnusedExecutionId(); List<ConfigurationType> types = ContainerUtil.map(configurationsFromContext, context1 -> context1.getConfiguration().getType()); promptUserToUseRunDashboard(context.getProject(), types); for (ConfigurationFromContext confi...
actionPerformed
290,169
Executor () { return myExecutor; }
getExecutor
290,170
void (final @NotNull AnActionEvent e) { Project project = e.getData(CommonDataKeys.PROJECT); if (project != null && project.isDisposed()) { return; } if (project == null) { //setup template project configurations project = ProjectManager.getInstance().getDefaultProject(); } RunnerAndConfigurationSettings configurationS...
actionPerformed
290,171
RunnerAndConfigurationSettings () { return configurationSettings; }
getInitialSelectedConfiguration
290,172
void (final @NotNull AnActionEvent e) { Presentation presentation = e.getPresentation(); // we always show it enabled even in DumbMode, // 99% chances there will be some editable run configuration inside // and we don't want to check heavy conditions here presentation.setEnabled(true); if (e.getData(RunToolbarPopupKt.g...
update
290,173
ActionUpdateThread () { return ActionUpdateThread.BGT; }
getActionUpdateThread
290,174
void () { final String adText = getAdText(myAlternativeExecutor); if (adText != null) { myPopup.setAdText(adText); } myPopup.showCenteredInCurrentWindow(myProject); }
show
290,175
void (final RunListPopup popup) { popup.registerAction("alternateExecutor", KeyStroke.getKeyStroke("shift pressed SHIFT"), new AbstractAction() { @Override public void actionPerformed(ActionEvent e) { myCurrentExecutor = myAlternativeExecutor; updatePresentation(); } }); popup.registerAction("restoreDefaultExecutor", K...
registerActions
290,176
void (ActionEvent e) { myCurrentExecutor = myAlternativeExecutor; updatePresentation(); }
actionPerformed
290,177
void (ActionEvent e) { myCurrentExecutor = myDefaultExecutor; updatePresentation(); }
actionPerformed
290,178
void (ActionEvent e) { popup.handleSelect(true); }
actionPerformed
290,179
void (ActionEvent e) { myEditConfiguration = true; popup.handleSelect(true); }
actionPerformed
290,180
void (ActionEvent e) { popup.removeSelected(); }
actionPerformed
290,181
void (ActionEvent e) { SpeedSearch speedSearch = popup.getSpeedSearch(); if (speedSearch.isHoldingFilter()) { speedSearch.backspace(); speedSearch.update(); } else { popup.removeSelected(); } }
actionPerformed
290,182
void (RunListPopup popup, int number) { Action action = createNumberAction(number, popup, myDefaultExecutor); Action action_ = createNumberAction(number, popup, myAlternativeExecutor); popup.registerAction(number + "Action", KeyStroke.getKeyStroke(String.valueOf(number)), action); popup.registerAction(number + "Action_...
addNumberAction
290,183
void () { myPopup.setCaption(getExecutor().getActionName()); }
updatePresentation
290,184
void (ItemWrapper<?> itemWrapper, @Nullable Executor executor) { if (executor == null) { return; } final DataContext dataContext = DataManager.getInstance().getDataContext(); final Project project = CommonDataKeys.PROJECT.getData(dataContext); if (project != null) { itemWrapper.perform(project, executor, dataContext); ...
execute
290,185
void (@NotNull Project project, @NotNull RunnerAndConfigurationSettings configuration) { final Executor executor = getExecutor(); PropertiesComponent.getInstance().setValue("run.configuration.edit.ad", Boolean.toString(true)); if (RunDialog.editConfiguration(project, configuration, ExecutionBundle.message("dialog.title...
editConfiguration
290,186
void (@NotNull Project project, @NotNull RunnerAndConfigurationSettings configurationSettings, @Nullable JBPopup popupToCancel) { RunManagerConfig runManagerConfig = RunManagerImpl.getInstanceImpl(project).getConfig(); boolean confirmed; if (runManagerConfig.isDeletionFromPopupRequiresConfirmation()) { if (popupToCance...
deleteConfiguration
290,187
void (boolean isSelected, int exitCode) { runManagerConfig.setDeletionFromPopupRequiresConfirmation(!isSelected); }
rememberChoice
290,188
String () { return ExecutionBundle.message("don.t.ask.again"); }
getDoNotShowMessage
290,189
boolean () { return true; }
shouldSaveOptionsOnCancel
290,190
Executor () { return myCurrentExecutor == null ? myDefaultExecutor : myCurrentExecutor; }
getExecutor
290,191
Action (final int number, final ListPopupImpl listPopup, final Executor executor) { return new MyAbstractAction(listPopup, number, executor); }
createNumberAction
290,192
int () { return myMnemonic; }
getMnemonic
290,193
boolean () { return myMnemonicsEnabled; }
digitMnemonicsEnabled
290,194
boolean () { return myChecked; }
isChecked
290,195
void (boolean checked) { myChecked = checked; }
setChecked
290,196
void (int mnemonic) { myMnemonic = mnemonic; }
setMnemonic
290,197
void (boolean mnemonicsEnabled) { myMnemonicsEnabled = mnemonicsEnabled; }
setMnemonicsEnabled
290,198
boolean () { return myAddSeparatorAbove; }
addSeparatorAbove
290,199
boolean () { return false; }
canBeDeleted