Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
291,100
void (@NotNull PsiElement newElement) { boolean hasGeneratedName = myConfiguration.isGeneratedName(); myListener.elementRenamed(newElement); if (hasGeneratedName) { updateSuggestedName(); } }
elementRenamed
291,101
void (@NotNull PsiElement newElement, @NotNull String oldQualifiedName) { if (myListener instanceof UndoRefactoringElementListener) { boolean hasGeneratedName = myConfiguration.isGeneratedName(); ((UndoRefactoringElementListener) myListener).undoElementMovedOrRenamed(newElement, oldQualifiedName); if (hasGeneratedName)...
undoElementMovedOrRenamed
291,102
void () { RunManagerImpl runManager = RunManagerImpl.getInstanceImpl(myConfiguration.getProject()); myConfiguration.setName(myConfiguration.suggestedName()); RunnerAndConfigurationSettingsImpl settings = runManager.getSettings(myConfiguration); if (settings != null) { runManager.addConfiguration(settings); } }
updateSuggestedName
291,103
Key<RunConfigurableBeforeRunTask> () { return ID; }
getId
291,104
Icon () { return AllIcons.Actions.Execute; }
getIcon
291,105
Icon (RunConfigurableBeforeRunTask task) { RunnerAndConfigurationSettings settings = task.getSettingsWithTarget().first; return settings == null ? null : ProgramRunnerUtil.getConfigurationIcon(settings, false); }
getTaskIcon
291,106
String () { return ExecutionBundle.message("before.launch.run.another.configuration.title"); }
getName
291,107
String (RunConfigurableBeforeRunTask task) { Pair<RunnerAndConfigurationSettings, ExecutionTarget> settingsWithTarget = task.getSettingsWithTarget(); if (settingsWithTarget.first == null) { if (task.typeNameTarget.getName() == null) { return ExecutionBundle.message("before.launch.run.another.configuration"); } else { r...
getDescription
291,108
boolean () { return true; }
isConfigurable
291,109
RunConfigurableBeforeRunTask (@NotNull RunConfiguration runConfiguration) { return new RunConfigurableBeforeRunTask(); }
createTask
291,110
Promise<Boolean> (@NotNull DataContext context, @NotNull RunConfiguration configuration, @NotNull RunConfigurableBeforeRunTask task) { Project project = configuration.getProject(); RunManagerImpl runManager = RunManagerImpl.getInstanceImpl(project); List<RunConfiguration> configurations = ContainerUtil.map(getAvailable...
configureTask
291,111
List<RunnerAndConfigurationSettings> (@NotNull RunConfiguration runConfiguration) { Project project = runConfiguration.getProject(); if (project == null || !project.isInitialized()) { return Collections.emptyList(); } List<RunnerAndConfigurationSettings> configurations = new ArrayList<>(RunManagerImpl.getInstanceImpl(p...
getAvailableConfigurations
291,112
boolean (@NotNull RunConfiguration configuration, @NotNull RunConfigurableBeforeRunTask task) { RunnerAndConfigurationSettings settings = task.getSettingsWithTarget().first; if (settings == null) { return false; } String executorId = DefaultRunExecutor.getRunExecutorInstance().getId(); ProgramRunner<?> runner = Program...
canExecuteTask
291,113
boolean (final @NotNull DataContext dataContext, @NotNull RunConfiguration configuration, final @NotNull ExecutionEnvironment env, @NotNull RunConfigurableBeforeRunTask task) { Pair<RunnerAndConfigurationSettings, ExecutionTarget> settings = task.getSettingsWithTarget(); if (settings.first == null) { return true; // ig...
executeTask
291,114
boolean (final @NotNull ExecutionEnvironment env, final @NotNull RunnerAndConfigurationSettings settings, final @Nullable ExecutionTarget target) { RunConfiguration configuration = settings.getConfiguration(); Executor executor = configuration instanceof BeforeRunTaskAwareConfiguration && ((BeforeRunTaskAwareConfigurat...
doExecuteTask
291,115
boolean (final String executorId, final ExecutionEnvironment environment, ProgramRunner<?> runner) { final Semaphore targetDone = new Semaphore(); final Ref<Boolean> result = new Ref<>(false); final Disposable disposable = Disposer.newDisposable(); environment.getProject().getMessageBus().connect(disposable).subscribe(...
doRunTask
291,116
void (final @NotNull String executorIdLocal, final @NotNull ExecutionEnvironment environmentLocal) { if (executorId.equals(executorIdLocal) && environment.equals(environmentLocal)) { targetDone.down(); } }
processStartScheduled
291,117
void (final @NotNull String executorIdLocal, final @NotNull ExecutionEnvironment environmentLocal) { if (executorId.equals(executorIdLocal) && environment.equals(environmentLocal)) { Boolean skipRun = environment.getUserData(ExecutionManagerImpl.EXECUTION_SKIP_RUN); if (skipRun != null && skipRun) { result.set(true); }...
processNotStarted
291,118
void (@NotNull String executorIdLocal, @NotNull ExecutionEnvironment environmentLocal, @NotNull ProcessHandler handler, int exitCode) { if (executorId.equals(executorIdLocal) && environment.equals(environmentLocal)) { result.set(exitCode == 0); targetDone.up(); } }
processTerminated
291,119
void (@NotNull ExecutionEnvironment environment) { for (RunConfigurationBeforeRunProviderDelegate delegate : RunConfigurationBeforeRunProviderDelegate.EP_NAME.getExtensionList()) { delegate.beforeRun(environment); } }
beforeRun
291,120
void (@NotNull Element element) { super.writeExternal(element); if (typeNameTarget.getName() != null) { element.setAttribute("run_configuration_name", typeNameTarget.getName()); } if (typeNameTarget.getType() != null) { element.setAttribute("run_configuration_type", typeNameTarget.getType()); } if (typeNameTarget.getTa...
writeExternal
291,121
void (@NotNull Element element) { super.readExternal(element); typeNameTarget.setName(element.getAttributeValue("run_configuration_name")); typeNameTarget.setType(element.getAttributeValue("run_configuration_type")); typeNameTarget.setTargetId(element.getAttributeValue("run_configuration_target")); mySettingsWithTarget...
readExternal
291,122
void (@NotNull RunManagerImpl runManager) { if (mySettingsWithTarget != null) { return; } String type = typeNameTarget.getType(); String name = typeNameTarget.getName(); String targetId = typeNameTarget.getTargetId(); RunnerAndConfigurationSettings settings = type != null && name != null ? runManager.findConfigurationB...
init
291,123
void (@Nullable RunnerAndConfigurationSettings settings, @Nullable ExecutionTarget target) { if (settings == null) { mySettingsWithTarget = Pair.empty(); typeNameTarget.setName(null); typeNameTarget.setType(null); typeNameTarget.setTargetId(null); } else { mySettingsWithTarget = new Pair<>(settings, target); typeNameTa...
setSettingsWithTarget
291,124
boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; if (!super.equals(o)) return false; RunConfigurableBeforeRunTask that = (RunConfigurableBeforeRunTask)o; return Comparing.equal(typeNameTarget, that.typeNameTarget); }
equals
291,125
int () { int result = super.hashCode(); result = 31 * result + typeNameTarget.hashCode(); return result; }
hashCode
291,126
BeforeRunTask () { RunConfigurableBeforeRunTask task = new RunConfigurableBeforeRunTask(); if (mySettingsWithTarget != null) { task.setSettingsWithTarget(mySettingsWithTarget.first, mySettingsWithTarget.second); } task.typeNameTarget.setType(typeNameTarget.getType()); task.typeNameTarget.setName(typeNameTarget.getName(...
clone
291,127
EventLogGroup () { return GROUP; }
getGroup
291,128
StructuredIdeActivity (@NotNull Project project, @NotNull ConfigurationFactory factory, @NotNull Executor executor, @Nullable RunConfiguration runConfiguration, boolean isRerun) { return ACTIVITY_GROUP .startedAsync(project, () -> ReadAction.nonBlocking(() -> buildContext(project, factory, executor, runConfiguration, i...
trigger
291,129
StructuredIdeActivity (@NotNull StructuredIdeActivity parentActivity, @NotNull Project project, @NotNull ConfigurationFactory factory, @NotNull Executor executor, @Nullable RunConfiguration runConfiguration, boolean isRerun) { return ACTIVITY_GROUP .startedAsyncWithParent(project, parentActivity, () -> ReadAction.nonBl...
triggerWithParent
291,130
void (@Nullable StructuredIdeActivity activity, RunConfigurationFinishType finishType) { if (activity != null) { activity.finished(() -> Collections.singletonList(FINISH_TYPE.with(finishType))); } }
logProcessFinished
291,131
String () { return "run_config_executor"; }
getRuleId
291,132
ValidationResultType (@NotNull String data, @NotNull EventContext context) { for (Executor executor : Executor.EXECUTOR_EXTENSION_NAME.getExtensions()) { if (StringUtil.equals(executor.getId(), data)) { final PluginInfo info = PluginInfoDetectorKt.getPluginInfo(executor.getClass()); return info.isSafeToReport() ? Valid...
doValidate
291,133
String () { return RULE_ID; }
getRuleId
291,134
ValidationResultType (@NotNull String data, @NotNull EventContext context) { if (LOCAL_TYPE_ID.equals(data)) { return ValidationResultType.ACCEPTED; } for (TargetEnvironmentType<?> type : TargetEnvironmentType.EXTENSION_NAME.getExtensions()) { if (StringUtil.equals(type.getId(), data)) { final PluginInfo info = PluginI...
doValidate
291,135
String () { return RunConfigurationTypeUsagesCollector.GROUP.getId(); }
getGroupId
291,136
String () { return RunConfigurationTypeUsagesCollector.CONFIGURED_IN_PROJECT; }
getEventId
291,137
List<EventField> () { return List.of(EventFields.Language, RunConfigurationUsageTriggerCollector.ALTERNATIVE_JRE_VERSION); }
getExtensionFields
291,138
String () { return RunConfigurationUsageTriggerCollector.GROUP_NAME; }
getGroupId
291,139
String () { return "started"; }
getEventId
291,140
List<EventField> () { return List.of(EventFields.Language, RunConfigurationUsageTriggerCollector.ALTERNATIVE_JRE_VERSION); }
getExtensionFields
291,141
EventLogGroup () { return GROUP; }
getGroup
291,142
Set<MetricEvent> (@NotNull Project project) { Object2IntMap<Template> templates = new Object2IntOpenHashMap<>(); if (project.isDisposed()) { return Collections.emptySet(); } RunManager runManager = RunManager.getInstance(project); for (RunnerAndConfigurationSettings settings : runManager.getAllSettings()) { ProgressMan...
getMetrics
291,143
boolean () { return true; }
requiresReadAccess
291,144
void (Object2IntMap<Template> templates, Template template) { templates.mergeInt(template, 1, Math::addExact); }
addOrIncrement
291,145
void (RunConfiguration runConfiguration, Object2IntMap<Template> templates) { if (runConfiguration instanceof RunConfigurationBase) { PluginInfo info = PluginInfoDetectorKt.getPluginInfo(runConfiguration.getClass()); if (!info.isSafeToReport()) return; Object state = ((RunConfigurationBase<?>)runConfiguration).getState...
collectRunConfigurationFeatures
291,146
List<EventPair<Boolean>> (@NotNull RunnerAndConfigurationSettings settings, @NotNull RunConfiguration runConfiguration) { return List.of(SHARED_FIELD.with(settings.isShared()), EDIT_BEFORE_RUN_FIELD.with(settings.isEditBeforeRun()), ACTIVATE_BEFORE_RUN_FIELD.with(settings.isActivateToolWindowBeforeRun()), FOCUS_BEFORE_...
getSettings
291,147
MetricEvent (int count) { myEventPairs.add(COUNT_FIELD.with(count)); return myEventId.metric(myEventPairs); }
createMetricEvent
291,148
boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Template template = (Template)o; return Objects.equals(myEventId, template.myEventId) && Objects.equals(myEventPairs, template.myEventPairs); }
equals
291,149
int () { return Objects.hash(myEventId, myEventPairs); }
hashCode
291,150
String () { return "run_config_id"; }
getRuleId
291,151
boolean (@Nullable String ruleId) { return getRuleId().equals(ruleId) || "run_config_factory".equals(ruleId); }
acceptRuleId
291,152
ValidationResultType (@NotNull String data, @NotNull EventContext context) { if (isThirdPartyValue(data) || "unknown".equals(data)) return ValidationResultType.ACCEPTED; final String configurationId = getEventDataField(context, ID_FIELD.getName()); final String factoryId = getEventDataField(context, FACTORY_FIELD.getNa...
doValidate
291,153
ActionGroup (@NotNull MouseEvent event) { DefaultActionGroup group = new DefaultActionGroup(); for (final WebBrowser browser : WebBrowserManager.getInstance().getActiveBrowsers()) { if (browserCondition.value(browser)) { group.add(new AnAction(IdeBundle.message("open.in.0", browser.getName()), IdeBundle.message("open.u...
getPopupMenuGroup
291,154
void (@NotNull AnActionEvent e) { BrowserLauncher.getInstance().browse(url, browser, e.getProject()); }
actionPerformed
291,155
void (@NotNull AnActionEvent e) { CopyPasteManager.getInstance().setContents(new StringSelection(url)); }
actionPerformed
291,156
void (@NotNull Project project) { BrowserLauncher.getInstance().browse(url, browser, project); }
navigate
291,157
void (@NotNull ExtendableTextField textField) { addTextFieldExtension(textField, Filters.ALL, null); }
addTextFieldExtension
291,158
void (@NotNull ExtendableTextField textField, @NotNull Predicate<? super Macro> macroFilter, @Nullable Map<String, String> userMacros) { textField.addExtension(ExtendableTextComponent.Extension.create( AllIcons.General.InlineAdd, AllIcons.General.InlineAddHover, ExecutionBundle.message("insert.macros"), () -> show(text...
addTextFieldExtension
291,159
void (@NotNull ExtendableTextField textField, @NotNull Predicate<? super Macro> macroFilter, Computable<Boolean> hasModule) { textField.addExtension(ExtendableTextComponent.Extension.create( AllIcons.General.InlineVariables, AllIcons.General.InlineVariablesHover, ExecutionBundle.message("insert.macros"), () -> show(tex...
addMacroSupport
291,160
void (@NotNull JTextComponent textComponent) { show(textComponent, Filters.ALL, null); }
show
291,161
void (@NotNull JTextComponent textComponent, @NotNull Predicate<? super Macro> filter, @Nullable Map<String, String> userMacros) { MacrosDialog dialog = new MacrosDialog(textComponent, filter, userMacros); if (dialog.showAndGet()) { String macro = dialog.getSelectedMacroName(); if (macro != null) { int position = textC...
show
291,162
void (@NotNull EditorTextField textComponent, @NotNull Predicate<? super Macro> filter, @Nullable Map<String, String> userMacros) { MacrosDialog dialog = new MacrosDialog(textComponent, filter, userMacros); if (dialog.showAndGet()) { String macro = dialog.getSelectedMacroName(); Editor editor = textComponent.getEditor(...
show
291,163
void () { throw new UnsupportedOperationException("Call init(...) overload accepting parameters"); }
init
291,164
void (@NotNull Predicate<? super Macro> filter, @Nullable Map<String, String> userMacros) { super.init(); setTitle(IdeCoreBundle.message("title.macros")); setOKButtonText(IdeCoreBundle.message("button.insert")); List<Macro> macros = ContainerUtil.sorted(ContainerUtil.filter(MacroManager.getInstance().getMacros(), macro...
init
291,165
int (Macro macro1, Macro macro2) { String name1 = macro1.getName(); String name2 = macro2.getName(); if (!StringUtil.startsWithChar(name1, '/')) { name1 = ZERO + name1; } if (!StringUtil.startsWithChar(name2, '/')) { name2 = ZERO + name2; } return name1.compareToIgnoreCase(name2); }
compare
291,166
String (Item value) { return value.toString(); //NON-NLS }
getTextFor
291,167
boolean (Item value) { return value == finalFirstMacro; }
hasSeparatorAboveOf
291,168
String () { return "reference.settings.ide.settings.external.tools.macros"; }
getHelpId
291,169
String () { return "#com.intellij.ide.macro.MacrosDialog"; }
getDimensionServiceKey
291,170
JComponent () { JPanel panel = new JPanel(new GridBagLayout()); GridBagConstraints constr; // list label constr = new GridBagConstraints(); constr.gridy = 0; constr.anchor = GridBagConstraints.WEST; constr.fill = GridBagConstraints.HORIZONTAL; panel.add(SeparatorFactory.createSeparator(IdeCoreBundle.message("label.macr...
createCenterPanel
291,171
String () { return myMacro.getName(); }
getName
291,172
String () { return StringUtil.notNullize(myMacro.preview(myDataContext)); }
getPreview
291,173
String () { return myMacro.getName() + " - " + myMacro.getDescription(); }
toString
291,174
String () { return myEntry.getKey(); }
getName
291,175
String () { return StringUtil.notNullize(myEntry.getValue(), "$" + getName() + "$"); }
getPreview
291,176
String () { return myEntry.getKey(); }
toString
291,177
void () { myMacrosList.getSelectionModel().addListSelectionListener( e -> { Item item = myMacrosList.getSelectedValue(); if (item == null) { myPreviewTextarea.setText(""); setOKActionEnabled(false); } else { myPreviewTextarea.setText(item.getPreview()); setOKActionEnabled(true); } } ); new DoubleClickListener() { @Over...
addListeners
291,178
boolean (@NotNull MouseEvent e) { if (getSelectedMacroName() != null) { close(OK_EXIT_CODE); return true; } return false; }
onDoubleClick
291,179
JComponent () { return myMacrosList; }
getPreferredFocusedComponent
291,180
boolean (@NotNull Macro m, @NotNull String part) { final String[] nameParts = CAMEL_HUMP_START_PATTERN.split(m.getName()); return ArrayUtil.contains(part, nameParts); }
nameContains
291,181
void () { final Task.Backgroundable task = new Task.Backgroundable(myProject, getApplyingFilterTitle()) { @Override public void run(@NotNull ProgressIndicator indicator) { myModel.updateCustomFilter(getFilter()); } }; ProgressManager.getInstance().run(task); }
filter
291,182
void (@NotNull ProgressIndicator indicator) { myModel.updateCustomFilter(getFilter()); }
run
291,183
void (LogFilterModel model) { if (myModel != null) { myModel.removeFilterListener(this); } myModel = model; myModel.addFilterListener(this); }
setFilterModel
291,184
LogFilterModel () { return myModel; }
getFilterModel
291,185
void () { // Don't override Shift-TAB if screen reader is active. It is unclear why overriding // Shift-TAB was necessary in the first place. // See https://github.com/JetBrains/intellij-community/commit/a36a3a00db97e4d5b5c112bb4136a41d9435f667 if (!ScreenReader.isActive()) { new AnAction() { { var shiftTabShortcut = n...
registerShiftTab
291,186
void (final @NotNull AnActionEvent e) { var console = ComponentUtil.getParentOfType(ConsoleWithFloatingToolbar.class, getConsoleNotNull().getComponent()); if (console != null) { console.myFloatingToolbar.scheduleShow(); } getTextFilterComponent().requestFocusInWindow(); }
actionPerformed
291,187
ActionGroup () { if (myActions != null) return myActions; DefaultActionGroup group = new DefaultActionGroup(); final AnAction[] actions = getConsoleNotNull().createConsoleActions(); for (AnAction action : actions) { group.add(action); } group.addSeparator(); /*for (final LogFilter filter : filters) { group.add(new Togg...
getOrCreateActions
291,188
boolean (AnActionEvent e) { return prefs.isFilterSelected(filter); }
isSelected
291,189
void (AnActionEvent e, boolean state) { prefs.setFilterSelected(filter, state); }
setSelected
291,190
void (final @NotNull LogFilter filter) { filterConsoleOutput(); }
onFilterStateChange
291,191
void () { filterConsoleOutput(); }
onTextFilterChange
291,192
JComponent () { if (!myWasInitialized) { myWasInitialized = true; var console = getConsoleNotNull().getComponent(); if (myBuildInActions) { var search = getSearchComponent(); var group = getOrCreateActions(); if (search != null) { group = addSearchFilter(group, search); } add(new ConsoleWithFloatingToolbar(console, gro...
getComponent
291,193
ActionGroup (ActionGroup origin, @NotNull JComponent searchComponent) { var filterAction = new ToggleSearchFilterAction() { @Override protected @NotNull JComponent getSearchFilterComponent() { return searchComponent; } @Override protected boolean isModified(@NotNull JComponent component) { if (myLogFilterCombo.getSelec...
addSearchFilter
291,194
JComponent () { return searchComponent; }
getSearchFilterComponent
291,195
boolean (@NotNull JComponent component) { if (myLogFilterCombo.getSelectedIndex() > 0) { return true; } var textFilterComponent = getTextFilterComponent(); if (textFilterComponent instanceof FilterComponent) { String filterText = ((FilterComponent)textFilterComponent).getFilter(); return StringUtil.isNotEmpty(filterTex...
isModified
291,196
void () { Rectangle bounds = getBounds(); myComponent.setBounds(0, 0, bounds.width, bounds.height); var toolbarSize = myFloatingToolbar.getPreferredSize(); myFloatingToolbar.setBounds( bounds.width - toolbarSize.width - RIGHT_OFFSET, TOP_OFFSET - (toolbarSize.height - ActionToolbar.DEFAULT_MINIMUM_BUTTON_SIZE.height) /...
doLayout
291,197
boolean (@NotNull JComponent component) { return false; }
isModified
291,198
boolean (@NotNull AnActionEvent e) { return Toggleable.isSelected(e.getPresentation()); }
isSelected
291,199
ActionUpdateThread () { return ActionUpdateThread.EDT; }
getActionUpdateThread