Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
290,300
ListPopup (@NotNull Project project, @NotNull RunManagerImpl runManager, @NotNull List<? extends RunConfiguration> configurations, @NotNull BiConsumer<? super List<RunConfiguration>, ? super ExecutionTarget> onSelected) { return JBPopupFactory.getInstance().createListPopup(new MultiSelectionListPopupStep<RunConfiguration>(null, configurations) { @Override public @Nullable ListSeparator getSeparatorAbove(RunConfiguration value) { int i = configurations.indexOf(value); if (i < 1) return null; RunConfiguration previous = configurations.get(i - 1); return value.getType() != previous.getType() ? new ListSeparator() : null; } @Override public Icon getIconFor(RunConfiguration value) { return value.getType().getIcon(); } @Override public boolean isSpeedSearchEnabled() { return true; } @Override public @NotNull String getTextFor(RunConfiguration value) { return value.getName(); } @Override public PopupStep<?> onChosen(List<RunConfiguration> selectedConfigs, boolean finalChoice) { if (finalChoice) { onSelected.accept(selectedConfigs, null); return FINAL_CHOICE; } else { return new BaseListPopupStep<>(null, getTargets(selectedConfigs)) { @Override public boolean isSpeedSearchEnabled() { return true; } @Override public Icon getIconFor(ExecutionTarget value) { return value.getIcon(); } @Override public @NotNull String getTextFor(ExecutionTarget value) { return value.getDisplayName(); } @Override public PopupStep onChosen(ExecutionTarget selectedTarget, boolean finalChoice) { onSelected.accept(selectedConfigs, selectedTarget); return FINAL_CHOICE; } }; } } @Override public boolean hasSubstep(List<? extends RunConfiguration> selectedValues) { return !getTargets(selectedValues).isEmpty(); } public @NotNull List<ExecutionTarget> getTargets(List<? extends RunConfiguration> selectedValues) { LinkedHashSet<ExecutionTarget> intersection = new LinkedHashSet<>(); for (int i = 0; i < selectedValues.size(); i++) { RunConfiguration config = selectedValues.get(i); RunnerAndConfigurationSettingsImpl settings = runManager.getSettings(config); List<ExecutionTarget> targets = settings == null ? Collections.emptyList() : ExecutionTargetManager.getTargetsToChooseFor(project, settings.getConfiguration()); if (i == 0) { intersection.addAll(targets); } else { intersection.retainAll(targets); } } return new ArrayList<>(intersection); } }); }
createPopup
290,301
Icon (RunConfiguration value) { return value.getType().getIcon(); }
getIconFor
290,302
boolean () { return true; }
isSpeedSearchEnabled
290,303
String (RunConfiguration value) { return value.getName(); }
getTextFor
290,304
boolean () { return true; }
isSpeedSearchEnabled
290,305
Icon (ExecutionTarget value) { return value.getIcon(); }
getIconFor
290,306
String (ExecutionTarget value) { return value.getDisplayName(); }
getTextFor
290,307
PopupStep (ExecutionTarget selectedTarget, boolean finalChoice) { onSelected.accept(selectedConfigs, selectedTarget); return FINAL_CHOICE; }
onChosen
290,308
boolean (List<? extends RunConfiguration> selectedValues) { return !getTargets(selectedValues).isEmpty(); }
hasSubstep
290,309
List<ExecutionTarget> (List<? extends RunConfiguration> selectedValues) { LinkedHashSet<ExecutionTarget> intersection = new LinkedHashSet<>(); for (int i = 0; i < selectedValues.size(); i++) { RunConfiguration config = selectedValues.get(i); RunnerAndConfigurationSettingsImpl settings = runManager.getSettings(config); List<ExecutionTarget> targets = settings == null ? Collections.emptyList() : ExecutionTargetManager.getTargetsToChooseFor(project, settings.getConfiguration()); if (i == 0) { intersection.addAll(targets); } else { intersection.retainAll(targets); } } return new ArrayList<>(intersection); }
getTargets
290,310
boolean (@NotNull RunConfiguration candidate, final @NotNull CompoundRunConfiguration root) { if (candidate.getType() == root.getType() && candidate.getName().equals(root.getName())) return false; List<BeforeRunTask<?>> tasks = RunManagerImplKt.doGetBeforeRunTasks(candidate); for (BeforeRunTask<?> task : tasks) { if (task instanceof RunConfigurationBeforeRunProvider.RunConfigurableBeforeRunTask runTask) { RunnerAndConfigurationSettings settings = runTask.getSettings(); if (settings != null) { if (!canBeAdded(settings.getConfiguration(), root)) return false; } } } if (candidate instanceof CompoundRunConfiguration) { for (RunConfiguration configuration : ((CompoundRunConfiguration)candidate).getConfigurationsWithTargets(myRunManager).keySet()) { if (!canBeAdded(configuration, root)) { return false; } } } return true; }
canBeAdded
290,311
void (@NotNull CompoundRunConfiguration compoundRunConfiguration) { myModel.clear(); Map<RunConfiguration, ExecutionTarget> map = compoundRunConfiguration.getConfigurationsWithTargets(myRunManager); myModel.addAll(ContainerUtil.map(map.entrySet(), entry -> Pair.create(entry.getKey(), entry.getValue()))); mySnapshot = compoundRunConfiguration; }
resetEditorFrom
290,312
JComponent () { ToolbarDecorator decorator = ToolbarDecorator.createDecorator(myList) .setToolbarPosition(ActionToolbarPosition.TOP) .setPanelBorder(JBUI.Borders.empty()) .disableUpDownActions(); decorator.setAddAction(new AnActionButtonRunnable() { @Override public void run(AnActionButton button) { List<RunConfiguration> configurations = new ArrayList<>(); for (RunnerAndConfigurationSettings settings : myRunManager.getAllSettings()) { RunConfiguration configuration = settings.getConfiguration(); if (!mySnapshot.getConfigurationsWithTargets(myRunManager).containsKey(configuration) && canBeAdded(configuration, mySnapshot)) { configurations.add(configuration); } } ConfigurationSelectionUtil.createPopup(myProject, myRunManager, configurations, (selectedConfigs, selectedTarget) -> { for (RunConfiguration each : selectedConfigs) { myModel.add(Pair.create(each, selectedTarget)); } }).showUnderneathOf(decorator.getActionsPanel()); } }).setEditAction(new AnActionButtonRunnable() { @Override public void run(AnActionButton button) { int index = myList.getSelectedIndex(); if (index == -1) return; RunConfiguration configuration = myModel.get(index).first; RunConfigurationSelector selector = RunConfigurationSelector.KEY.getData(DataManager.getInstance().getDataContext(button.getContextComponent())); if (selector != null) { selector.select(configuration); } } }); return decorator.createPanel(); }
createEditor
290,313
void (AnActionButton button) { List<RunConfiguration> configurations = new ArrayList<>(); for (RunnerAndConfigurationSettings settings : myRunManager.getAllSettings()) { RunConfiguration configuration = settings.getConfiguration(); if (!mySnapshot.getConfigurationsWithTargets(myRunManager).containsKey(configuration) && canBeAdded(configuration, mySnapshot)) { configurations.add(configuration); } } ConfigurationSelectionUtil.createPopup(myProject, myRunManager, configurations, (selectedConfigs, selectedTarget) -> { for (RunConfiguration each : selectedConfigs) { myModel.add(Pair.create(each, selectedTarget)); } }).showUnderneathOf(decorator.getActionsPanel()); }
run
290,314
void (AnActionButton button) { int index = myList.getSelectedIndex(); if (index == -1) return; RunConfiguration configuration = myModel.get(index).first; RunConfigurationSelector selector = RunConfigurationSelector.KEY.getData(DataManager.getInstance().getDataContext(button.getContextComponent())); if (selector != null) { selector.select(configuration); } }
run
290,315
ActionUpdateThread () { return ActionUpdateThread.BGT; }
getActionUpdateThread
290,316
void (@NotNull AnActionEvent e) { final Project project = e.getProject(); final RunContentDescriptor contentDescriptor = e.getData(LangDataKeys.RUN_CONTENT_DESCRIPTOR); final Presentation presentation = e.getPresentation(); if (contentDescriptor != null && project != null) { final ProcessHandler processHandler = contentDescriptor.getProcessHandler(); final RunningApplicationUpdater updater = findUpdater(project, processHandler); if (updater != null) { presentation.setEnabled(processHandler.isStartNotified() && !processHandler.isProcessTerminating() && !processHandler.isProcessTerminated()); presentation.setText(updater.getDescription()); } else { presentation.setEnabled(false); } presentation.setVisible(true); return; } final List<RunningApplicationUpdater> updaters = getAvailableUpdaters(project); final boolean enable = !updaters.isEmpty(); presentation.setEnabledAndVisible(enable); if (updaters.size() == 1) { presentation.setText(updaters.get(0).getDescription()); } else { presentation.setText(ExecutionBundle.messagePointer("action.presentation.UpdateRunningApplicationAction.text")); } }
update
290,317
List<RunningApplicationUpdater> (@Nullable Project project) { if (project == null) { return Collections.emptyList(); } List<RunningApplicationUpdater> result = new ArrayList<>(); ProcessHandler[] processes = ExecutionManager.getInstance(project).getRunningProcesses(); for (ProcessHandler process : processes) { if (!process.isProcessTerminated() && !process.isProcessTerminating() && process.isStartNotified()) { ContainerUtil.addIfNotNull(result, findUpdater(project, process)); } } return result; }
getAvailableUpdaters
290,318
void (@NotNull AnActionEvent e) { final Project project = e.getData(CommonDataKeys.PROJECT); if (project == null) return; final RunContentDescriptor contentDescriptor = e.getData(LangDataKeys.RUN_CONTENT_DESCRIPTOR); if (contentDescriptor != null) { final RunningApplicationUpdater updater = findUpdater(project, contentDescriptor.getProcessHandler()); if (updater != null) { updater.performUpdate(e); return; } } final List<RunningApplicationUpdater> updaters = getAvailableUpdaters(project); if (updaters.isEmpty()) return; if (updaters.size() > 1) { final ListPopup popup = JBPopupFactory.getInstance().createListPopup(new BaseListPopupStep<>( ExecutionBundle.message("popup.title.select.process.to.update"), updaters) { @Override public @NotNull String getTextFor(RunningApplicationUpdater value) { return value.getShortName(); } @Override public Icon getIconFor(RunningApplicationUpdater value) { return value.getIcon(); } @Override public PopupStep onChosen(final RunningApplicationUpdater selectedValue, boolean finalChoice) { return doFinalStep(() -> selectedValue.performUpdate(e)); } }); popup.showCenteredInCurrentWindow(project); } else { updaters.get(0).performUpdate(e); } }
actionPerformed
290,319
String (RunningApplicationUpdater value) { return value.getShortName(); }
getTextFor
290,320
Icon (RunningApplicationUpdater value) { return value.getIcon(); }
getIconFor
290,321
PopupStep (final RunningApplicationUpdater selectedValue, boolean finalChoice) { return doFinalStep(() -> selectedValue.performUpdate(e)); }
onChosen
290,322
Pattern () { return myPattern; }
getPattern
290,323
List<FileHyperlinkRawData> (@NotNull String line) { if (line.length() > myMaxLineLength) { return Collections.emptyList(); } Pair<Matcher, PatternHyperlinkFormat> pair = findMatcher(line); if (pair == null) { return Collections.emptyList(); } Matcher matcher = pair.first; PatternHyperlinkFormat format = pair.second; PatternHyperlinkPart[] linkParts = format.getLinkParts(); int groupCount = matcher.groupCount(); if (groupCount > linkParts.length) { return Collections.emptyList(); } String path = null; int lineNumber = -1, columnNumber = -1; int hyperlinkStartInd = -1, hyperlinkEndInd = -1; boolean hyperlinkFreezed = false; for (int i = 1; i <= groupCount; i++) { String value = matcher.group(i); if (value == null) { continue; } PatternHyperlinkPart part = linkParts[i - 1]; if (part == PatternHyperlinkPart.HYPERLINK) { hyperlinkStartInd = matcher.start(i); hyperlinkEndInd = matcher.end(i); hyperlinkFreezed = true; } else if (part == PatternHyperlinkPart.PATH) { path = value; if (!hyperlinkFreezed) { hyperlinkStartInd = matcher.start(i); hyperlinkEndInd = matcher.end(i); } } else if (part == PatternHyperlinkPart.LINE) { value = StringUtil.trimStart(value, ":"); lineNumber = StringUtil.parseInt(value, UNKNOWN); hyperlinkEndInd = tryExtendHyperlinkEnd(hyperlinkFreezed, hyperlinkEndInd, matcher.start(i), matcher.end(i)); } else if (part == PatternHyperlinkPart.COLUMN) { value = StringUtil.trimStart(value, ":"); columnNumber = StringUtil.parseInt(value, UNKNOWN); if (columnNumber != UNKNOWN) { hyperlinkEndInd = tryExtendHyperlinkEnd(hyperlinkFreezed, hyperlinkEndInd, matcher.start(i), matcher.end(i)); } } } if (path == null || lineNumber == UNKNOWN || columnNumber == UNKNOWN || hyperlinkStartInd == -1) { return Collections.emptyList(); } if (!format.isZeroBasedLineNumbering()) { lineNumber--; } if (!format.isZeroBasedColumnNumbering()) { columnNumber--; } lineNumber = Math.max(lineNumber, -1); columnNumber = Math.max(columnNumber, -1); FileHyperlinkRawData data = new FileHyperlinkRawData(path, lineNumber, columnNumber, hyperlinkStartInd, hyperlinkEndInd); return Collections.singletonList(data); }
find
290,324
int (boolean hyperlinkFreezed, int hyperlinkEndInd, int groupStartInd, int groupEndInd) { if (!hyperlinkFreezed && (hyperlinkEndInd == groupStartInd || hyperlinkEndInd + 1 == groupStartInd)) { return groupEndInd; } return hyperlinkEndInd; }
tryExtendHyperlinkEnd
290,325
HyperlinkInfo (@NotNull String url) { HyperlinkInfo fileHyperlinkInfo = buildFileHyperlinkInfo(url); return fileHyperlinkInfo != null ? fileHyperlinkInfo : new OpenUrlHyperlinkInfo(url); }
buildHyperlinkInfo
290,326
String (@NotNull String path) { if (path.length() >= 4 && path.charAt(0) == '/' && OSAgnosticPathUtil.isDriveLetter(path.charAt(1)) && path.charAt(2) == ':' && PathUtilRt.isSeparator(path.charAt(3))) { return path.substring(1); } return path; }
toWindowsPath
290,327
String (@NotNull String encodedStr) { try { return URLDecoder.decode(encodedStr, StandardCharsets.UTF_8); } catch (IllegalArgumentException e) { return encodedStr; } }
decode
290,328
void (@NotNull Project project) { VirtualFile file = getVirtualFile(); if (file == null || !file.isValid()) { Messages.showErrorDialog(project, ExecutionBundle.message("message.cannot.find.file.0", StringUtil.trimMiddle(myUrl, 150)), IdeBundle.message("title.cannot.open.file")); return; } super.navigate(project); }
navigate
290,329
String () { return myFilePath; }
getFilePath
290,330
int () { return myDocumentLine; }
getDocumentLine
290,331
int () { return myDocumentColumn; }
getDocumentColumn
290,332
int () { return myHyperlinkStartInd; }
getHyperlinkStartInd
290,333
int () { return myHyperlinkEndInd; }
getHyperlinkEndInd
290,334
boolean () { return myIsUseBrowser; }
getIsUseBrowser
290,335
boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; FileHyperlinkRawData data = (FileHyperlinkRawData)o; return myDocumentLine == data.myDocumentLine && myDocumentColumn == data.myDocumentColumn && myHyperlinkStartInd == data.myHyperlinkStartInd && myHyperlinkEndInd == data.myHyperlinkEndInd && myFilePath.equals(data.myFilePath) && myIsUseBrowser == data.myIsUseBrowser; }
equals
290,336
int () { int result = myFilePath.hashCode(); result = 31 * result + myDocumentLine; result = 31 * result + myDocumentColumn; result = 31 * result + myHyperlinkStartInd; result = 31 * result + myHyperlinkEndInd; result = 31 * result + Boolean.hashCode(myIsUseBrowser); return result; }
hashCode
290,337
String () { return "filePath=" + myFilePath + ", line=" + myDocumentLine + ", column=" + myDocumentColumn + ", hyperlinkStartOffset=" + myHyperlinkStartInd + ", hyperlinkEndOffset=" + myHyperlinkEndInd + ", isUseBrowser=" + myIsUseBrowser; }
toString
290,338
boolean () { return false; }
supportVfsRefresh
290,339
boolean (@NotNull VirtualFile file) { if (myProject.isDefault()) return true; ProjectFileIndex fileIndex = getFileIndex(); return !fileIndex.isInContent(file) || fileIndex.isInLibrary(file); }
isGrayedHyperlink
290,340
ProjectFileIndex () { ProjectFileIndex fileIndex = myFileIndex; if (fileIndex == null) { fileIndex = ProjectFileIndex.getInstance(myProject); myFileIndex = fileIndex; } return fileIndex; }
getFileIndex
290,341
void (@NotNull Project project) { Ref<VirtualFile> fileRef = myFileRef; if (fileRef == null) { VirtualFile file = WriteAction.compute(() -> VfsUtil.findFileByIoFile(myIoFile, true)); fileRef = Ref.create(file); myFileRef = fileRef; } if (fileRef.get() != null) { OpenFileHyperlinkInfo linkInfo = new OpenFileHyperlinkInfo(project, fileRef.get(), myDocumentLine, myDocumentColumn); linkInfo.navigate(project); } }
navigate
290,342
List<FileHyperlinkRawData> (@NotNull String line) { return myFinder.find(line); }
parse
290,343
boolean () { return ExperimentalUI.isNewUI() || EarlyAccessRegistryManager.INSTANCE.getBoolean("debugger.new.tool.window.layout"); }
isNewDebuggerUIEnabled
290,344
void (@NotNull RunnerAndConfigurationSettingsImpl s) { mySettings = s; doReset(s); }
resetEditorFrom
290,345
boolean (Settings settings) { return myInitialVisibility.test(mySettings); }
isInitiallyVisible
290,346
void () { Disposer.dispose(myComponent); }
disposeEditor
290,347
void (@NotNull RunnerAndConfigurationSettingsImpl s) { button.setVisible(getter.test(s)); }
doReset
290,348
void (@NotNull RunnerAndConfigurationSettingsImpl s) { setter.accept(s, button.isVisible()); }
applyEditorTo
290,349
boolean () { return true; }
isTag
290,350
int () { return menuPosition; }
getMenuPosition
290,351
boolean () { return myConfigurationEditor.isInplaceValidationSupported(); }
isInplaceValidationSupported
290,352
void (String targetName) { myConfigurationEditor.targetChanged(targetName); }
targetChanged
290,353
boolean () { return myRCStorageUi != null && myRCStorageUi.isModified() || myConfigurationEditor.isSpecificallyModified(); }
isSpecificallyModified
290,354
boolean () { return myConfigurationEditor.isReadyForApply(); }
isReadyForApply
290,355
void (@NotNull RunnerAndConfigurationSettings s) { myConfigurationEditor.resetEditorFrom((RunnerAndConfigurationSettingsImpl)s); myConfigurationEditor.resetFrom((RunConfigurationBase<?>)s.getConfiguration()); if (myRCStorageUi != null) { myRCStorageUi.reset(s); myRunOnTargetPanel.reset(); } }
resetEditorFrom
290,356
JComponent () { if (myRCStorageUi == null) return myConfigurationEditor.getComponent(); JPanel panel = new JPanel(new GridBagLayout()); GridBagConstraints c = new GridBagConstraints(); c.gridx = 0; c.gridy = 0; c.anchor = GridBagConstraints.EAST; c.insets = JBUI.insets(5, 0, 5, 0); c.fill = GridBagConstraints.NONE; c.weightx = 0; c.weighty = 0; panel.add(myRCStorageUi.createComponent(), c); c.gridx = 0; c.gridy = 1; c.anchor = GridBagConstraints.NORTH; c.insets = JBInsets.emptyInsets(); c.fill = GridBagConstraints.HORIZONTAL; c.weightx = 1; c.weighty = 0; JPanel comp = new JPanel(new GridBagLayout()); myRunOnTargetPanel.buildUi(comp, null); panel.add(comp, c); c.gridx = 0; c.gridy = 2; c.anchor = GridBagConstraints.NORTH; c.insets = JBInsets.emptyInsets(); c.fill = GridBagConstraints.BOTH; c.weightx = 1; c.weighty = 1; panel.add(myConfigurationEditor.getComponent(), c); return panel; }
createEditor
290,357
InvalidRunConfigurationIcon (@NotNull IconReplacer replacer) { return new InvalidRunConfigurationIcon(replacer.replaceIcon(Objects.requireNonNull(getIcon(0))), replacer.replaceIcon(Objects.requireNonNull(getIcon(1)))); }
replaceBy
290,358
LayeredIcon () { return new InvalidRunConfigurationIcon(Objects.requireNonNull(getIcon(0)), Objects.requireNonNull(getIcon(1))); }
copy
290,359
Module () { if (module == null) module = myFileChooserDescriptor.getUserData(LangDataKeys.MODULE_CONTEXT); if (module == null) module = myFileChooserDescriptor.getUserData(PlatformCoreDataKeys.MODULE); return module; }
getModule
290,360
String (@NotNull String path) { Project project = getProject(); if (project != null) path = PathMacroManager.getInstance(project).expandPath(path); Module module = getModule(); if (module != null) path = PathMacroManager.getInstance(module).expandPath(path); return super.expandPath(path); }
expandPath
290,361
String () { return accessor.getText(this); }
getText
290,362
void (String text) { accessor.setText(this, text != null ? text : ""); }
setText
290,363
void (Module module) { this.module = module; configure(); }
setModule
290,364
void () { always = true; configure(); }
showModuleMacroAlways
290,365
void () { MacroComboBoxModel model = (MacroComboBoxModel)getModel(); if (model != null) model.useModuleDir(always || module != null); }
configure
290,366
String (ComboBox<String> component) { Object item = component == null ? null : component.getSelectedItem(); return item == null ? "" : item.toString(); }
getText
290,367
void (ComboBox<String> component, @NotNull String text) { if (component != null) component.setSelectedItem(text); }
setText
290,368
void () { initComponents(); updateUI(); setupAnchor(); }
init
290,369
void () { myAnchor = UIUtil.mergeComponentsWithAnchor(myProgramParametersComponent, myWorkingDirectoryComponent, myEnvVariablesComponent); }
setupAnchor
290,370
void () { myProgramParametersComponent = LabeledComponent.create(new RawCommandLineEditor(), ExecutionBundle.message("run.configuration.program.parameters")); // for backward compatibility: com.microsoft.tooling.msservices.intellij.azure:3.0.11 myWorkingDirectoryField = new TextFieldWithBrowseButton(); myWorkingDirectoryField.addBrowseFolderListener(ExecutionBundle.message("select.working.directory.message"), null, getProject(), FileChooserDescriptorFactory.createSingleFolderDescriptor(), TextComponentAccessor.TEXT_FIELD_WHOLE_TEXT); myWorkingDirectoryComponent = LabeledComponent.create(myWorkingDirectoryField, ExecutionBundle.message("run.configuration.working.directory.label")); myEnvVariablesComponent = createEnvironmentVariablesComponent(); myEnvVariablesComponent.setLabelLocation(BorderLayout.WEST); myProgramParametersComponent.setLabelLocation(BorderLayout.WEST); myWorkingDirectoryComponent.setLabelLocation(BorderLayout.WEST); addComponents(); if (isMacroSupportEnabled()) { initMacroSupport(); } copyDialogCaption(myProgramParametersComponent); }
initComponents
290,371
EnvironmentVariablesComponent () { return new EnvironmentVariablesComponent(); }
createEnvironmentVariablesComponent
290,372
JComponent (final @NotNull TextFieldWithBrowseButton textAccessor) { final FixedSizeButton button = new FixedSizeButton(textAccessor); button.setIcon(AllIcons.Actions.ListFiles); button.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { final List<String> macros = ContainerUtil.map(myMacrosMap.keySet(), s -> s.startsWith("%") ? s : "$" + s + "$"); JBPopupFactory.getInstance() .createPopupChooserBuilder(macros) .setItemChosenCallback((value) -> textAccessor.setText(value)) .setMovable(false) .setResizable(false) .createPopup() .showUnderneathOf(button); } }); JPanel panel = new JPanel(new BorderLayout()); panel.add(textAccessor, BorderLayout.CENTER); panel.add(button, BorderLayout.EAST); return panel; }
createComponentWithMacroBrowse
290,373
void (ActionEvent e) { final List<String> macros = ContainerUtil.map(myMacrosMap.keySet(), s -> s.startsWith("%") ? s : "$" + s + "$"); JBPopupFactory.getInstance() .createPopupChooserBuilder(macros) .setItemChosenCallback((value) -> textAccessor.setText(value)) .setMovable(false) .setResizable(false) .createPopup() .showUnderneathOf(button); }
actionPerformed
290,374
void () { add(myProgramParametersComponent); add(myWorkingDirectoryComponent); add(myEnvVariablesComponent); }
addComponents
290,375
boolean () { return false; }
isMacroSupportEnabled
290,376
void () { updatePathMacros(); addMacroSupport(myProgramParametersComponent.getComponent().getEditorField(), MacrosDialog.Filters.ALL); addMacroSupport((ExtendableTextField)myWorkingDirectoryField.getTextField(), MacrosDialog.Filters.DIRECTORY_PATH); }
initMacroSupport
290,377
void (@NotNull ExtendableTextField textField) { doAddMacroSupport(textField, MacrosDialog.Filters.ALL, null); }
addMacroSupport
290,378
void (@NotNull ExtendableTextField textField, @NotNull Predicate<? super Macro> macroFilter) { final Predicate<? super Macro> commonMacroFilter = getCommonMacroFilter(); doAddMacroSupport(textField, t -> commonMacroFilter.test(t) && macroFilter.test(t), myMacrosMap); }
addMacroSupport
290,379
void (@NotNull ExtendableTextField textField, @NotNull Predicate<? super Macro> macroFilter, @Nullable Map<String, String> userMacros) { if (Registry.is("allow.macros.for.run.configurations")) { MacrosDialog.addTextFieldExtension(textField, macroFilter.and(macro -> !(macro instanceof EditorMacro)), userMacros); } }
doAddMacroSupport
290,380
void (final LabeledComponent<RawCommandLineEditor> component) { final RawCommandLineEditor rawCommandLineEditor = component.getComponent(); rawCommandLineEditor.setDialogCaption(component.getRawText()); component.getLabel().setLabelFor(rawCommandLineEditor.getTextField()); }
copyDialogCaption
290,381
void (@Nls String textWithMnemonic) { myProgramParametersComponent.setText(textWithMnemonic); copyDialogCaption(myProgramParametersComponent); }
setProgramParametersLabel
290,382
void (String params) { myProgramParametersComponent.getComponent().setText(params); }
setProgramParameters
290,383
TextAccessor () { return myWorkingDirectoryField; }
getWorkingDirectoryAccessor
290,384
void (String dir) { myWorkingDirectoryField.setText(dir); }
setWorkingDirectory
290,385
void (Module moduleContext) { myModuleContext = moduleContext; updatePathMacros(); }
setModuleContext
290,386
void () { myHasModuleMacro = true; updatePathMacros(); }
setHasModuleMacro
290,387
void () { myMacrosMap.clear(); myMacrosMap.putAll(MacrosDialog.getPathMacros(myModuleContext != null || myHasModuleMacro)); }
updatePathMacros
290,388
LabeledComponent<RawCommandLineEditor> () { return myProgramParametersComponent; }
getProgramParametersComponent
290,389
JComponent () { return myAnchor; }
getAnchor
290,390
void (JComponent anchor) { myAnchor = anchor; myProgramParametersComponent.setAnchor(anchor); myWorkingDirectoryComponent.setAnchor(anchor); myEnvVariablesComponent.setAnchor(anchor); }
setAnchor
290,391
void (@NotNull CommonProgramRunConfigurationParameters configuration) { configuration.setProgramParameters(fromTextField(myProgramParametersComponent.getComponent(), configuration)); configuration.setWorkingDirectory(fromTextField(myWorkingDirectoryField, configuration)); myEnvVariablesComponent.apply(configuration); }
applyTo
290,392
void (@NotNull CommonProgramRunConfigurationParameters configuration) { setProgramParameters(configuration.getProgramParameters()); setWorkingDirectory(PathUtil.toSystemDependentName(configuration.getWorkingDirectory())); myEnvVariablesComponent.reset(configuration); }
reset
290,393
boolean () { return false; }
isInplaceValidationSupported
290,394
boolean () { return myDefaultSettings; }
isDefaultSettings
290,395
Project () { return mySettings.getProject(); }
getProject
290,396
FragmentedSettingsBuilder<Settings> () { FragmentedSettingsBuilder<Settings> builder = super.getBuilder(); builder.setConfigId(mySettings.getType().getId()); return builder; }
getBuilder
290,397
void (List<? super SettingsEditorFragment<Settings, ?>> fragments) { for (Executor executor : Executor.EXECUTOR_EXTENSION_NAME.getExtensionList()) { ProgramRunner<RunnerSettings> runner = ProgramRunner.getRunner(executor.getId(), mySettings); if (runner == null) { continue; } SettingsEditor<ConfigurationPerRunnerSettings> configEditor = mySettings.getRunnerSettingsEditor(runner); SettingsEditor<RunnerSettings> runnerEditor = runner.getSettingsEditor(executor, mySettings); if (configEditor == null && runnerEditor == null) { continue; } JComponent component = new JPanel(new BorderLayout()); component.setBorder(IdeBorderFactory.createTitledBorder(executor.getStartActionText(), false)); if (configEditor != null) { component.add(configEditor.getComponent(), BorderLayout.CENTER); } if (runnerEditor != null) { component.add(runnerEditor.getComponent(), configEditor == null ? BorderLayout.CENTER : BorderLayout.SOUTH); } RunConfigurationEditorFragment<Settings, JComponent> fragment = new RunConfigurationEditorFragment<>(executor.getId() + ".config", executor.getStartActionText(), ExecutionBundle.message("run.configuration.startup.connection.rab.title"), component, 0, settings -> false) { @Override public void doReset(@NotNull RunnerAndConfigurationSettingsImpl s) { if (configEditor != null) { configEditor.resetFrom(s.getConfigurationSettings(runner)); } if (runnerEditor != null) { runnerEditor.resetFrom(s.getRunnerSettings(runner)); } } @Override public void applyEditorTo(@NotNull RunnerAndConfigurationSettingsImpl s) { try { if (configEditor != null) { configEditor.applyTo(s.getConfigurationSettings(runner)); } if (runnerEditor != null) { runnerEditor.applyTo(s.getRunnerSettings(runner)); } } catch (ConfigurationException e) { LOG.error(e); } } }; if (configEditor != null) { Disposer.register(fragment, configEditor); } if (runnerEditor != null) { Disposer.register(fragment, runnerEditor); } fragments.add(fragment); } }
addRunnerSettingsEditors
290,398
void (@NotNull RunnerAndConfigurationSettingsImpl s) { if (configEditor != null) { configEditor.resetFrom(s.getConfigurationSettings(runner)); } if (runnerEditor != null) { runnerEditor.resetFrom(s.getRunnerSettings(runner)); } }
doReset
290,399
void (@NotNull RunnerAndConfigurationSettingsImpl s) { try { if (configEditor != null) { configEditor.applyTo(s.getConfigurationSettings(runner)); } if (runnerEditor != null) { runnerEditor.applyTo(s.getRunnerSettings(runner)); } } catch (ConfigurationException e) { LOG.error(e); } }
applyEditorTo