Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
290,000
List<String> () { return myEnvFilePaths; }
getEnvFilePaths
290,001
void () { String text = StringUtil.trimStart(getText(), stringifyEnvs(myData)); if (myEnvFilePaths.isEmpty() || text.isEmpty()) return; List<String> paths = ContainerUtil.filter(ContainerUtil.map(text.split(";"), s -> s.trim()), s -> !s.isEmpty()); for (int i = 0; i < Math.min(myEnvFilePaths.size(), paths.size()); i++)...
updateEnvFilesFromText
290,002
List<EnvironmentVariable> (Map<String, String> map, final boolean readOnly) { return ContainerUtil.map(map.entrySet(), entry -> new EnvironmentVariable(entry.getKey(), entry.getValue(), readOnly) { @Override public boolean getNameIsWriteable() { return !readOnly; } }); }
convertToVariables
290,003
boolean () { return !readOnly; }
getNameIsWriteable
290,004
boolean (@NotNull EnvironmentVariable v) { return !v.getNameIsWriteable() && !Objects.equals(v.getValue(), myParentDefaults.get(v.getName())); }
isModifiedSysEnv
290,005
boolean (@NotNull Attribute attribute) { return attribute.getName().equals(Constants.NAME) && attribute.getParent().getName().equals("configuration"); }
skipPathMacros
290,006
boolean (@NotNull Element element) { if (!element.getName().equals("env")) { return false; } var name = element.getAttributeValue(Constants.NAME); var value = element.getAttributeValue(Constants.VALUE); return name != null && value != null && EnvironmentUtil.containsEnvKeySubstitution(name, value); }
skipPathMacros
290,007
boolean (@NotNull Attribute attribute) { final Element parent = attribute.getParent(); if (parent != null && Constants.OPTION.equals(parent.getName())) { final Element grandParent = parent.getParentElement(); return grandParent != null && "configuration".equals(grandParent.getName()); } return false; }
recursePathMacros
290,008
void (final @NotNull RunContentDescriptor descriptor) { if (descriptor.getComponent() != null && REGISTRY.add(descriptor)) { Disposer.register(descriptor, new Disposable() { @Override public void dispose() { REGISTRY.remove(descriptor); } }); } }
register
290,009
void () { REGISTRY.remove(descriptor); }
dispose
290,010
void (@NotNull AnActionEvent e) { List<RunContentDescriptor> descriptors = new ArrayList<>(REGISTRY); for (RunContentDescriptor descriptor : descriptors) { if (descriptor.getComponent() == null) { REGISTRY.remove(descriptor); } else { Project project = e.getProject(); if (project != null) { RunContentManager runContent...
actionPerformed
290,011
ActionUpdateThread () { return ActionUpdateThread.BGT; }
getActionUpdateThread
290,012
void (@NotNull AnActionEvent e) { e.getPresentation().setEnabled(e.getProject() != null); }
update
290,013
ExecutionEnvironment (@NotNull ExecutionEnvironment environment, @Nullable ProgramRunner runner) { if (runner == null || runner.equals(environment.getRunner())) { return environment; } else { return new ExecutionEnvironmentBuilder(environment).runner(runner).build(); } }
fix
290,014
void (final @NotNull AnAction action) { myRunnerActions.add(action); }
addAction
290,015
RunContentDescriptor () { RunProfile profile = myEnvironment.getRunProfile(); if (ApplicationManager.getApplication().isUnitTestMode()) { return new RunContentDescriptor(profile, myExecutionResult, myUi); } ExecutionConsole console = myExecutionResult.getExecutionConsole(); RunContentDescriptor contentDescriptor = new ...
createDescriptor
290,016
void (AnAction @NotNull [] restartActions, AnAction @NotNull [] consoleActions, AnAction @NotNull [] additionalActions) { toolbar = createActionToolbar(restartActions, consoleActions, additionalActions); if (UIExperiment.isNewDebuggerUIEnabled()) { var isVerticalToolbar = Registry.get("debugger.new.tool.window.layout.t...
initToolbars
290,017
List<AnAction> () { return List.of(myUi.getOptions().getLayoutActions()); }
getContentActions
290,018
String () { return ActionPlaces.RUNNER_TOOLBAR; }
getMainToolbarPlace
290,019
String () { return ActionPlaces.RUNNER_TOOLBAR; }
getContentToolbarPlace
290,020
String (@Nullable ExecutionConsole console) { if (console instanceof ExecutionConsoleEx) { String id = ((ExecutionConsoleEx)console).getExecutionConsoleId(); if (id != null) { return JAVA_RUNNER + '.' + id; } } return JAVA_RUNNER; }
getRunnerType
290,021
Content (@NotNull RunnerLayoutUi ui, @NotNull ExecutionConsole console) { Content consoleContent = ui.createContent(ExecutionConsole.CONSOLE_CONTENT_ID, console.getComponent(), CommonBundle.message("title.console"), null, console.getPreferredFocusableComponent()); consoleContent.setCloseable(false); addAdditionalConsol...
buildConsoleUiDefault
290,022
void (final ExecutionConsole console, final Content consoleContent) { final DefaultActionGroup consoleActions = new DefaultActionGroup(); if (console instanceof ConsoleView) { for (AnAction action : ((ConsoleView)console).createConsoleActions()) { consoleActions.add(action); } } consoleContent.setActions(consoleActions...
addAdditionalConsoleEditorActions
290,023
DefaultActionGroup (AnAction @NotNull [] restartActions, AnAction @NotNull [] consoleActions, AnAction @NotNull [] additionalActions) { boolean isNewLayout = UIExperiment.isNewDebuggerUIEnabled(); String mainGroupId = isNewLayout ? RUN_TOOL_WINDOW_TOP_TOOLBAR_GROUP : RUN_TOOL_WINDOW_TOP_TOOLBAR_OLD_GROUP; ActionGroup t...
createActionToolbar
290,024
RunContentDescriptor (@Nullable RunContentDescriptor reuseContent) { RunContentDescriptor descriptor = createDescriptor(); Disposer.register(descriptor, this); Disposer.register(myProject, descriptor); RunContentManagerImpl.copyContentAndBehavior(descriptor, reuseContent); myRunContentDescriptor = descriptor; return de...
showRunContent
290,025
void (@NotNull String text, @NotNull ConsoleViewContentType type) { if (myProject.isDisposed() || myUi.isDisposed()) { return; } if (((type == ConsoleViewContentType.NORMAL_OUTPUT) && myShowConsoleOnStdOut || (type == ConsoleViewContentType.ERROR_OUTPUT) && myShowConsoleOnStdErr) && myFocused.compareAndSet(false, true)...
textAdded
290,026
Component (@Nullable AnActionEvent e) { if (e == null) return null; SingleContentSupplier supplier = e.getData(SingleContentSupplier.KEY); return supplier != null ? supplier.getTabs().getComponent() : null; }
getEventComponent
290,027
boolean (@Nullable Component parent) { for (Component component : UIUtil.uiTraverser(parent)) { if (component instanceof ActionToolbarImpl) { ActionGroup group = ((ActionToolbarImpl)component).getActionGroup(); if (myDuplicatePredicate.test(group)) { return true; } } } return false; }
isToolbarDuplicatedAnywhere
290,028
ActionGroup () { return myDelegate; }
getDelegate
290,029
GlobalSearchScope () { return mySearchScope; }
getSearchScope
290,030
void (AnAction[] actions, Constraints constraints, DefaultActionGroup actionGroup, @Nullable DefaultActionGroup moreGroup) { addActionsWithConstraints(Arrays.asList(actions), constraints, actionGroup, moreGroup); }
addActionsWithConstraints
290,031
void (List<AnAction> actions, Constraints constraints, DefaultActionGroup actionGroup, @Nullable DefaultActionGroup moreGroup) { for (AnAction action : ContainerUtil.reverse(actions)) { if (moreGroup != null && action.getTemplatePresentation().getClientProperty(PREFERRED_PLACE) == PreferredPlace.MORE_GROUP) { moreGroup...
addActionsWithConstraints
290,032
List<AnAction> (AnAction[] actionsToFilter, Collection<AnAction> mainActions) { HashSet<AnAction> visited = new HashSet<>(mainActions); return filter(actionsToFilter, action -> action instanceof Separator || !visited.contains(action)); }
removeDuplicatesExceptSeparators
290,033
ActionUpdateThread () { return ActionUpdateThread.EDT; }
getActionUpdateThread
290,034
void (@NotNull AnActionEvent event) { Presentation presentation = event.getPresentation(); ExecutionEnvironment environment = getEnvironment(event); if (environment != null) { RunnerAndConfigurationSettings settings = environment.getRunnerAndConfigurationSettings(); RunConfiguration configuration = settings == null ? n...
update
290,035
void (@NotNull AnActionEvent event) { ExecutionEnvironment environment = getEnvironment(event); if (environment != null) { ExecutionUtil.restart(environment); } }
actionPerformed
290,036
boolean (@NotNull AnActionEvent event) { RunContentDescriptor descriptor = getDescriptor(event); ProcessHandler processHandler = descriptor == null ? null : descriptor.getProcessHandler(); ExecutionEnvironment environment = getEnvironment(event); Project project = getEventProject(event); if (environment == null || proj...
isEnabled
290,037
boolean () { return true; }
isDumbAware
290,038
void () { myRunContentDescriptor = null; myEnvironment = null; logConsoleManager = null; }
dispose
290,039
LogConsoleManagerBase () { if (logConsoleManager == null) { logConsoleManager = new LogConsoleManagerBase(myProject, mySearchScope) { @Override protected Icon getDefaultIcon() { return AllIcons.Debugger.Console; } @Override protected RunnerLayoutUi getUi() { return myUi; } @Override public ProcessHandler getProcessHand...
getLogConsoleManager
290,040
Icon () { return AllIcons.Debugger.Console; }
getDefaultIcon
290,041
RunnerLayoutUi () { return myUi; }
getUi
290,042
ProcessHandler () { return myRunContentDescriptor == null ? null : myRunContentDescriptor.getProcessHandler(); }
getProcessHandler
290,043
void (@NotNull RunProfile runConfiguration, @NotNull RunContentDescriptor contentDescriptor, @Nullable ExecutionConsole console) { ProcessHandler processHandler = contentDescriptor.getProcessHandler(); if (runConfiguration instanceof RunConfigurationBase configuration) { if (myManager == null) { myManager = new LogFile...
initLogConsoles
290,044
void (@NotNull AnActionEvent e) { e.getPresentation().setEnabledAndVisible(getChildren(null).length > 0); }
update
290,045
ActionUpdateThread () { return ActionUpdateThread.EDT; }
getActionUpdateThread
290,046
boolean () { return true; }
isDumbAware
290,047
JBTabs () { RunnerContentUi contentUi = RunnerContentUi.KEY.getData((DataProvider)myUi); return Objects.requireNonNull(contentUi).getTabs(); }
getTabs
290,048
List<AnAction> () { return List.of(layoutActionGroup); }
getContentActions
290,049
void (@Nullable ActionToolbar mainToolbar, @Nullable ActionToolbar contentToolbar) { JBTabs tabs = getTabs(); if (tabs instanceof JBTabsEx) { ((JBTabsEx)tabs).setHideTopPanel(true); } }
init
290,050
void () { JBTabs tabs = getTabs(); if (tabs instanceof JBTabsEx) { ((JBTabsEx)tabs).setHideTopPanel(false); } }
reset
290,051
boolean (@NotNull TabInfo tab) { List<Content> gridContents = ((GridImpl)tab.getComponent()).getContents(); return gridContents.size() > 0 && gridContents.get(0).isCloseable(); }
isClosable
290,052
void (@NotNull TabInfo tab) { GridImpl grid = (GridImpl)tab.getComponent(); ViewContext context = ViewContext.CONTEXT_KEY.getData(grid); Content[] content = ViewContext.CONTENT_KEY.getData(grid); if (context == null || content == null || content.length == 0) { SingleContentSupplier.super.close(tab); return; } context.g...
close
290,053
void (@NotNull TabInfo tabInfo, @NotNull Content content) { myTabInfoContentMap.put(tabInfo, content); }
addSubContent
290,054
Collection<Content> () { return myTabInfoContentMap.values(); }
getSubContents
290,055
boolean () { return myMoveToolbar; }
isMoveToolbar
290,056
void (boolean moveToolbar) { myMoveToolbar = moveToolbar; }
setMoveToolbar
290,057
boolean () { return true; }
isDumbAware
290,058
ActionUpdateThread () { return ActionUpdateThread.BGT; }
getActionUpdateThread
290,059
ActionRemoteBehavior () { return ActionRemoteBehavior.BackendOnly; }
getBehavior
290,060
AnAction[] (DataContext dataContext, @Nullable String place) { if (dataContext.getData(ExecutorAction.getOrderKey()) != null) return EMPTY_ARRAY; final ConfigurationContext context = ConfigurationContext.getFromContext(dataContext, place); //!!! to rule??? if (!Registry.is("suggest.all.run.configurations.from.context")...
getChildren
290,061
List<AnAction> (@NotNull ConfigurationContext context, @NotNull List<? extends ConfigurationFromContext> configurations) { if (configurations.size() <= 1) { return Collections.emptyList(); } final List<AnAction> childActions = new ArrayList<>(); for (final ConfigurationFromContext fromContext : configurations) { final ...
createChildActions
290,062
void (@NotNull AnActionEvent e) { perform(fromContext, ConfigurationContext.getFromContext(e.getDataContext(), e.getPlace())); }
actionPerformed
290,063
List<ConfigurationFromContext> (ConfigurationContext context) { final List<ConfigurationFromContext> fromContext = context.getConfigurationsFromContext(); if (fromContext == null) { return Collections.emptyList(); } final List<ConfigurationFromContext> enabledConfigurations = new ArrayList<>(); for (ConfigurationFromCo...
getConfigurationsFromContext
290,064
boolean (RunConfiguration configuration) { return true; }
isEnabledFor
290,065
boolean (RunConfiguration configuration, ConfigurationContext context) { return isEnabledFor(configuration); }
isEnabledFor
290,066
void (final @NotNull AnActionEvent e) { final DataContext dataContext = e.getDataContext(); final ConfigurationContext context = ConfigurationContext.getFromContext(dataContext, e.getPlace()); final RunnerAndConfigurationSettings existing = findExisting(context); if (existing == null || dataContext.getData(ExecutorActi...
actionPerformed
290,067
ConfigurationFromContext (DataContext dataContext, List<? extends ConfigurationFromContext> producers) { Integer order = dataContext.getData(ExecutorAction.getOrderKey()); if (order != null && order < producers.size()) { return producers.get(order); } return producers.get(0); }
getOrderedConfiguration
290,068
void (final ConfigurationFromContext configurationFromContext, final ConfigurationContext context) { int eventCount = IdeEventQueue.getInstance().getEventCount(); RunnerAndConfigurationSettings configurationSettings = configurationFromContext.getConfigurationSettings(); context.setConfiguration(configurationSettings); ...
perform
290,069
void (RunnerAndConfigurationSettings configurationSettings, ConfigurationContext context) { perform(context); }
perform
290,070
void (@NotNull AnActionEvent e) { fullUpdate(e); }
beforeActionPerformedUpdate
290,071
void (final @NotNull AnActionEvent event) { boolean doFullUpdate = !ApplicationManager.getApplication().isDispatchThread() || ApplicationManager.getApplication().isUnitTestMode(); VirtualFile vFile = event.getDataContext().getData(CommonDataKeys.VIRTUAL_FILE); ThreeState hadAnythingRunnable = vFile == null ? ThreeState...
update
290,072
boolean () { return Objects.equals(IdeEventQueue.getInstance().getEventCount(), ourLastTimeoutStamp); }
alreadyExceededTimeoutOnSimilarAction
290,073
void () { ourLastTimeoutStamp = IdeEventQueue.getInstance().getEventCount(); }
recordUpdateTimeout
290,074
void (AnActionEvent event, ThreeState hadAnythingRunnable) { event.getPresentation().copyFrom(getTemplatePresentation()); event.getPresentation().setEnabledAndVisible(hadAnythingRunnable == ThreeState.YES); }
approximatePresentationByPreviousAvailability
290,075
void (@NotNull AnActionEvent event) { DataContext dataContext = event.getDataContext(); ConfigurationContext context = ConfigurationContext.getFromEvent(event); Presentation presentation = event.getPresentation(); RunnerAndConfigurationSettings existing = findExisting(context); RunnerAndConfigurationSettings configurat...
fullUpdate
290,076
boolean () { return isDumbAware; }
isDumbAware
290,077
String (@NotNull LocatableConfiguration configuration) { return suggestRunActionName((RunConfiguration)configuration); }
suggestRunActionName
290,078
Executor () { return super.getAlternativeExecutor(); }
getDefaultExecutor
290,079
Executor () { return super.getDefaultExecutor(); }
getAlternativeExecutor
290,080
String () { return "debug.configuration.alternate.action.ad"; }
getAdKey
290,081
ActionUpdateThread () { return ActionUpdateThread.BGT; }
getActionUpdateThread
290,082
void (@NotNull AnActionEvent e) { RunContentDescriptor descriptor = StopAction.getRecentlyStartedContentDescriptor(e.getDataContext()); boolean isConsoleSelected = descriptor != null && isConsoleSelected(descriptor); ProcessHandler handler = descriptor != null ? descriptor.getProcessHandler() : null; e.getPresentation(...
update
290,083
boolean (@NotNull RunContentDescriptor descriptor) { RunnerLayoutUi runnerLayoutUi = descriptor.getRunnerLayoutUi(); if (runnerLayoutUi == null) return false; ContentManager contentManager = runnerLayoutUi.getContentManager(); Content selectedContent = contentManager.getSelectedContent(); return selectedContent != null...
isConsoleSelected
290,084
void (@NotNull AnActionEvent e) { RunContentDescriptor descriptor = StopAction.getRecentlyStartedContentDescriptor(e.getDataContext()); ProcessHandler activeProcessHandler = descriptor != null ? descriptor.getProcessHandler() : null; if (activeProcessHandler == null || activeProcessHandler.isProcessTerminated()) return...
actionPerformed
290,085
void (OutputStream outputStream) { if (outputStream != null) { try { outputStream.write(Ascii.EOT); outputStream.flush(); } catch (IOException ignored) { } } }
sendEOFToPtyProcess
290,086
ActionUpdateThread () { return ActionUpdateThread.BGT; }
getActionUpdateThread
290,087
void (@NotNull AnActionEvent e) { e.getPresentation().setEnabled(!getCancellableProcesses(e.getProject()).isEmpty()); }
update
290,088
void (@NotNull AnActionEvent e) { final DataContext dataContext = e.getDataContext(); Project project = e.getProject(); List<StopAction.HandlerItem> handlerItems = getItemsList(getCancellableProcesses(project)); if (handlerItems.isEmpty()) { return; } final JBList<StopAction.HandlerItem> list = new JBList<>(handlerItem...
actionPerformed
290,089
boolean (StopAction.HandlerItem item) { return item.hasSeparator; }
hasSeparatorAboveOf
290,090
ActionUpdateThread () { return ActionUpdateThread.EDT; }
getActionUpdateThread
290,091
void (@NotNull AnActionEvent e) { ConsoleView data = e.getData(LangDataKeys.CONSOLE_VIEW); boolean enabled = data != null && data.getContentSize() > 0; e.getPresentation().setEnabled(enabled); }
update
290,092
void (final @NotNull AnActionEvent e) { final ConsoleView consoleView = e.getData(LangDataKeys.CONSOLE_VIEW); if (consoleView != null) { consoleView.clear(); } }
actionPerformed
290,093
void (final ConfigurationContext context) { RunnerAndConfigurationSettings configuration = context.findExisting(); if (configuration == null) { configuration = context.getConfiguration(); } choosePolicy(context).perform(configuration, context); }
perform
290,094
void (RunnerAndConfigurationSettings configurationSettings, ConfigurationContext context) { choosePolicy(context).perform(configurationSettings, context); }
perform
290,095
void (final Presentation presentation, final @NotNull String actionText, final ConfigurationContext context) { choosePolicy(context).update(presentation, context, actionText); }
updatePresentation
290,096
BaseCreatePolicy (final ConfigurationContext context) { final RunnerAndConfigurationSettings configuration = findExisting(context); if (configuration == null) { return Holder.CREATE_AND_EDIT; } if (configuration.getConfiguration() instanceof SyntheticRunConfigurationBase) { return Holder.DISABLED; } return Holder.EDIT;...
choosePolicy
290,097
void (final Presentation presentation, final ConfigurationContext context, final @NotNull String actionText) { updateText(presentation, actionText); }
update
290,098
void (final Presentation presentation, final String actionText) { presentation.setText(ExecutionBundle.message("create.run.configuration.action.name"), false); }
updateText
290,099
void (RunnerAndConfigurationSettings configuration, ConfigurationContext context) { if (ApplicationManager.getApplication().isUnitTestMode() || RunDialog.editConfiguration(context.getProject(), configuration, ExecutionBundle.message("create.run.configuration.for.item.dialog.title", configuration.getName()))) { final Ru...
perform