Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
289,900 | void (final Collection<? extends RunnerAndConfigurationSettings> shared, final Collection<? extends RunnerAndConfigurationSettings> local) { mySharedConfigurations.clear(); myAllConfigurations.clear(); mySharedConfigurations.addAll(shared); myAllConfigurations.addAll(shared); myAllConfigurations.addAll(local); myAllConfigurations.sort(new RunnerAndConfigurationSettingsComparator()); } | setData |
289,901 | void () { throw new UnsupportedOperationException("Not implemented"); } | addRow |
289,902 | void (int oldIndex, int newIndex) { throw new UnsupportedOperationException("Not implemented"); } | exchangeRows |
289,903 | boolean (int oldIndex, int newIndex) { return false; } | canExchangeRows |
289,904 | void (int idx) { final RunnerAndConfigurationSettings settings = myAllConfigurations.remove(idx); if (settings != null) { mySharedConfigurations.remove(settings); fireTableDataChanged(); } } | removeRow |
289,905 | int () { return myAllConfigurations.size(); } | getRowCount |
289,906 | int () { return 2; } | getColumnCount |
289,907 | Object (int rowIndex, int columnIndex) { if (NAME_COLUMN == columnIndex) { return myAllConfigurations.get(rowIndex).getName(); } else if (IS_SHARED_COLUMN == columnIndex) { return mySharedConfigurations.contains(myAllConfigurations.get(rowIndex)); } return null; } | getValueAt |
289,908 | void (Object aValue, int rowIndex, int columnIndex) { if (IS_SHARED_COLUMN == columnIndex) { if (Boolean.TRUE.equals(aValue)) { mySharedConfigurations.add(myAllConfigurations.get(rowIndex)); } else { mySharedConfigurations.remove(myAllConfigurations.get(rowIndex)); } fireTableRowsUpdated(rowIndex, rowIndex + 1); } } | setValueAt |
289,909 | String (int column) { if (NAME_COLUMN == column) return ExecutionBundle.message("project.startup.task.table.name.column"); if (IS_SHARED_COLUMN == column) return ExecutionBundle.message("project.startup.task.table.is.shared.column"); return ""; } | getColumnName |
289,910 | boolean (int rowIndex, int columnIndex) { if (NAME_COLUMN == columnIndex) return false; return myAllConfigurations.get(rowIndex).isShared(); } | isCellEditable |
289,911 | void (final @NotNull RunnerAndConfigurationSettings configuration) { if (myAllConfigurations.contains(configuration)) return; myAllConfigurations.add(configuration); myAllConfigurations.sort(RunnerAndConfigurationSettingsComparator.getInstance()); if (configuration.isShared()) { mySharedConfigurations.add(configuration); } fireTableDataChanged(); } | addConfiguration |
289,912 | Set<RunnerAndConfigurationSettings> () { return mySharedConfigurations; } | getSharedConfigurations |
289,913 | List<RunnerAndConfigurationSettings> () { return myAllConfigurations; } | getAllConfigurations |
289,914 | void (final Processor<? super RunnerAndConfigurationSettings> existenceChecker) { final Iterator<RunnerAndConfigurationSettings> iterator = myAllConfigurations.iterator(); while (iterator.hasNext()) { final RunnerAndConfigurationSettings settings = iterator.next(); if (!existenceChecker.process(settings)) { iterator.remove(); mySharedConfigurations.remove(settings); } } } | reValidateConfigurations |
289,915 | RunnerAndConfigurationSettingsComparator () { return ourInstance; } | getInstance |
289,916 | int (RunnerAndConfigurationSettings o1, RunnerAndConfigurationSettings o2) { return o1.getName().compareToIgnoreCase(o2.getName()); } | compare |
289,917 | void () { if (myShared.isEmpty()) { return; } Collection<RunnerAndConfigurationSettings> sharedConfigurations = getSharedConfigurations(); List<RunnerAndConfigurationSettings> canNotBeShared = new ArrayList<>(); Iterator<RunnerAndConfigurationSettings> iterator = sharedConfigurations.iterator(); while (iterator.hasNext()) { final RunnerAndConfigurationSettings configuration = iterator.next(); if (!configuration.isShared()) { iterator.remove(); canNotBeShared.add(configuration); } } if (!canNotBeShared.isEmpty()) { canNotBeShared.addAll(getLocalConfigurations()); setStartupConfigurations(sharedConfigurations, canNotBeShared); } } | verifyState |
289,918 | Collection<RunnerAndConfigurationSettings> (ProjectStartupConfigurationBase configuration) { if (configuration.isEmpty()) return Collections.emptyList(); final List<RunnerAndConfigurationSettings> result = new ArrayList<>(); final List<ProjectStartupConfigurationBase.ConfigurationDescriptor> list = configuration.getList(); RunManagerImpl runManager = (RunManagerImpl)RunManager.getInstance(myProject); for (ProjectStartupConfigurationBase.ConfigurationDescriptor descriptor : list) { final RunnerAndConfigurationSettings settings = runManager.getConfigurationById(descriptor.getId()); if (settings != null && settings.getName().equals(descriptor.getName())) { result.add(settings); } else { getNotificationGroup().createNotification( ExecutionBundle.message("0.run.configuration.1.not.found.removed.from.list", PREFIX, descriptor.getName()), MessageType.WARNING).notify(myProject); } } return result; } | getConfigurations |
289,919 | void (RunnerAndConfigurationSettings settings) { if (settings.isShared()) { return; } Collection<RunnerAndConfigurationSettings> sharedConfigurations = getSharedConfigurations(); if (sharedConfigurations.remove(settings)) { List<RunnerAndConfigurationSettings> localConfigurations = new ArrayList<>(getLocalConfigurations()); localConfigurations.add(settings); setStartupConfigurations(sharedConfigurations, localConfigurations); getNotificationGroup().createNotification(ExecutionBundle.message("0.configuration.was.made.not.shared", PREFIX, settings.getName()), MessageType.WARNING).notify(myProject); } } | checkOnChange |
289,920 | Collection<RunnerAndConfigurationSettings> () { return getConfigurations(myShared); } | getSharedConfigurations |
289,921 | Collection<RunnerAndConfigurationSettings> () { return getConfigurations(myLocal); } | getLocalConfigurations |
289,922 | void (@NotNull Collection<? extends RunnerAndConfigurationSettings> shared, @NotNull Collection<? extends RunnerAndConfigurationSettings> local) { myShared.setConfigurations(shared); myLocal.setConfigurations(local); } | setStartupConfigurations |
289,923 | void (final String oldId, RunnerAndConfigurationSettings settings) { if (myShared.rename(oldId, settings)) { return; } myLocal.rename(oldId, settings); } | rename |
289,924 | void (final String id) { if (myShared.deleteConfiguration(id)) { return; } myLocal.deleteConfiguration(id); } | delete |
289,925 | NotificationGroup () { return NotificationGroupManager.getInstance().getNotificationGroup("Project Startup Tasks Messages"); } | getNotificationGroup |
289,926 | boolean () { return myShared.isEmpty() && myLocal.isEmpty(); } | isEmpty |
289,927 | ProjectStartupTaskManager (@NotNull Project project) { return project.getService(ProjectStartupTaskManager.class); } | getInstance |
289,928 | void (@NotNull T configuration) { } | onNewConfigurationCreated |
289,929 | void (@NotNull T configuration) { } | onConfigurationCopied |
289,930 | Project () { return myProject; } | getProject |
289,931 | JComponent () { return (JComponent)myField; } | getField |
289,932 | void (@NotNull ComponentWithBrowseButton<T> field) { setTextAccessor((TextAccessor)field); field.addActionListener(this); field.setButtonEnabled(!myProject.isDefault()); } | setField |
289,933 | void (@NotNull TextAccessor accessor) { myField = accessor; } | setTextAccessor |
289,934 | String () { return myField.getText(); } | getText |
289,935 | void () { if (myField instanceof ComponentWithBrowseButton) { ((ComponentWithBrowseButton<?>)myField).removeActionListener(this); myField = null; } } | detach |
289,936 | void (ActionEvent e) { String text = showDialog(); if (text != null) { myField.setText(text); } } | actionPerformed |
289,937 | boolean () { return myPassParentEnvs; } | isPassParentEnvs |
289,938 | boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; EnvironmentVariablesData data = (EnvironmentVariablesData)o; return myPassParentEnvs == data.myPassParentEnvs && myEnvs.equals(data.myEnvs) && Objects.equals(myEnvironmentFile, data.myEnvironmentFile); } | equals |
289,939 | int () { final int prime = 31; int result = myEnvs.hashCode(); result = prime * result + (myPassParentEnvs ? 1 : 0); if (myEnvironmentFile != null) { result = prime * result + myEnvironmentFile.hashCode(); } return result; } | hashCode |
289,940 | String () { return "envs=" + myEnvs + ", passParentEnvs=" + myPassParentEnvs + ", environmentFile=" + myEnvironmentFile; } | toString |
289,941 | EnvironmentVariablesData (@NotNull Element element) { Element envsElement = element.getChild(ENVS); if (envsElement == null) { return DEFAULT; } Map<String, String> envs = Map.of(); String passParentEnvsStr = envsElement.getAttributeValue(PASS_PARENT_ENVS); boolean passParentEnvs = passParentEnvsStr == null || Boolean.parseBoolean(passParentEnvsStr); for (Element envElement : envsElement.getChildren(ENV)) { String envName = envElement.getAttributeValue(NAME); String envValue = envElement.getAttributeValue(VALUE); if (envName != null && envValue != null) { if (envs.isEmpty()) { envs = new LinkedHashMap<>(); } envs.put(envName, envValue); } } return create(envs, passParentEnvs); } | readExternal |
289,942 | void (@NotNull Element parent) { if (!DEFAULT.equals(this)) { writeExternal(parent); } } | writeExternalNoDefault |
289,943 | void (@NotNull Element parent) { Element envsElement = new Element(ENVS); if (!myPassParentEnvs) { // Avoid writing pass-parent-envs="true" to minimize changes in xml comparing it to xml written by // com.intellij.execution.configuration.EnvironmentVariablesComponent.writeExternal envsElement.setAttribute(PASS_PARENT_ENVS, Boolean.FALSE.toString()); } for (Map.Entry<String, String> entry : myEnvs.entrySet()) { envsElement.addContent(new Element(ENV).setAttribute(NAME, entry.getKey()).setAttribute(VALUE, entry.getValue())); } parent.addContent(envsElement); } | writeExternal |
289,944 | void (@NotNull GeneralCommandLine commandLine, boolean consoleParentEnvs) { commandLine.withParentEnvironmentType(!myPassParentEnvs ? GeneralCommandLine.ParentEnvironmentType.NONE : consoleParentEnvs ? GeneralCommandLine.ParentEnvironmentType.CONSOLE : GeneralCommandLine.ParentEnvironmentType.SYSTEM); commandLine.withEnvironment(myEnvs); } | configureCommandLine |
289,945 | EnvironmentVariablesData (@NotNull Map<String, String> envs, boolean passParentEnvs) { return create(envs, passParentEnvs, null); } | create |
289,946 | EnvironmentVariablesData (@NotNull Map<String, String> envs, boolean passParentEnvs, @Nullable String environmentFile) { if (passParentEnvs && envs.isEmpty() && environmentFile == null) { return DEFAULT; } return new EnvironmentVariablesData(envs, passParentEnvs, environmentFile); } | create |
289,947 | EnvironmentVariablesData (@NotNull Map<String, String> envs) { return create(envs, myPassParentEnvs, myEnvironmentFile); } | with |
289,948 | EnvironmentVariablesData (boolean passParentEnvs) { return passParentEnvs == myPassParentEnvs ? this : create(myEnvs, passParentEnvs, myEnvironmentFile); } | with |
289,949 | EnvironmentVariablesData (@Nullable String environmentFile) { return Objects.equals(environmentFile, myEnvironmentFile) ? this : create(myEnvs, myPassParentEnvs, environmentFile); } | with |
289,950 | EnvironmentVariablesTextFieldWithBrowseButton () { return new EnvironmentVariablesTextFieldWithBrowseButton(); } | createBrowseComponent |
289,951 | void (@NotNull Map<String, String> envs) { myEnvVars.setEnvs(envs); } | setEnvs |
289,952 | boolean () { return myEnvVars.isPassParentEnvs(); } | isPassParentEnvs |
289,953 | void (final boolean passParentEnvs) { myEnvVars.setPassParentEnvs(passParentEnvs); } | setPassParentEnvs |
289,954 | void (List<String> envFilePaths) { myEnvVars.setEnvFilePaths(envFilePaths); } | setEnvFilePaths |
289,955 | List<String> () { return myEnvVars.getEnvFilePaths(); } | getEnvFilePaths |
289,956 | EnvironmentVariablesData () { return myEnvVars.getData(); } | getEnvData |
289,957 | void (@NotNull EnvironmentVariablesData envData) { myEnvVars.setData(envData); } | setEnvData |
289,958 | void (CommonProgramRunConfigurationParameters s) { setEnvs(s.getEnvs()); setPassParentEnvs(s.isPassParentEnvs()); if (s instanceof EnvFilesOptions) { myEnvVars.setEnvFilePaths(((EnvFilesOptions)s).getEnvFilePaths()); } } | reset |
289,959 | void (CommonProgramRunConfigurationParameters s) { s.setEnvs(getEnvs()); s.setPassParentEnvs(isPassParentEnvs()); if (s instanceof EnvFilesOptions) { ((EnvFilesOptions)s).setEnvFilePaths(myEnvVars.getEnvFilePaths()); } } | apply |
289,960 | void (Element element, Map<String, String> envs) { final Element envsElement = element.getChild(ENVS); if (envsElement != null) { for (Element envElement : envsElement.getChildren(ENV)) { final String envName = envElement.getAttributeValue(NAME); final String envValue = envElement.getAttributeValue(VALUE); if (envName != null && envValue != null) { envs.put(envName, envValue); } } } else { //compatibility with prev version for (Element o : element.getChildren(OPTION)) { if (Comparing.strEqual(o.getAttributeValue(NAME), ENV_VARIABLES)) { splitVars(envs, o.getAttributeValue(VALUE)); break; } } } } | readExternal |
289,961 | void (final Map<String, String> envs, final String val) { if (val != null) { final String[] envVars = val.split(";"); for (String envVar : envVars) { final int idx = envVar.indexOf('='); if (idx > -1) { envs.put(envVar.substring(0, idx), idx < envVar.length() - 1 ? envVar.substring(idx + 1) : ""); } } } } | splitVars |
289,962 | void (@NotNull Element element, @NotNull Map<String, String> envs) { if (envs.isEmpty()) { return; } final Element envsElement = new Element(ENVS); for (String envName : envs.keySet()) { final Element envElement = new Element(ENV); envElement.setAttribute(NAME, envName); envElement.setAttribute(VALUE, envs.get(envName)); envsElement.addContent(envElement); } element.addContent(envsElement); } | writeExternal |
289,963 | void (final @NotNull ChangeListener changeListener) { myEnvVars.addChangeListener(changeListener); } | addChangeListener |
289,964 | void (final @NotNull ChangeListener changeListener) { myEnvVars.removeChangeListener(changeListener); } | removeChangeListener |
289,965 | void (ActionEvent e) { updateSysTableState(); } | actionPerformed |
289,966 | MyEnvVariablesTable (@NotNull List<EnvironmentVariable> variables, boolean userList) { return new MyEnvVariablesTable(variables, userList); } | createEnvVariablesTable |
289,967 | Dimension () { var size = super.getInitialSize(); if (size != null) { return size; } return new Dimension(500, 500); } | getInitialSize |
289,968 | void () { mySystemTable.getTableView().setEnabled(isIncludeSystemVars()); List<EnvironmentVariable> userList = new ArrayList<>(myUserTable.getEnvironmentVariables()); List<EnvironmentVariable> systemList = new ArrayList<>(mySystemTable.getEnvironmentVariables()); boolean[] dirty = {false}; if (isIncludeSystemVars()) { //System properties are included so overridden properties should be shown as 'bold' or 'modified' in a system table for (Iterator<EnvironmentVariable> iterator = userList.iterator(); iterator.hasNext(); ) { EnvironmentVariable userVariable = iterator.next(); Optional<EnvironmentVariable> optional = systemList.stream().filter(systemVariable -> systemVariable.getName().equals(userVariable.getName())).findAny(); optional.ifPresent(variable -> { if (!Objects.equals(variable.getValue(), userVariable.getValue())) { variable.setValue(userVariable.getValue()); iterator.remove(); dirty[0] = true; } }); } } else { // Overridden system properties should be shown as user variables as soon as system ones aren't included // Thus system table should look unmodified and disabled for (EnvironmentVariable systemVariable : systemList) { if (myParent.isModifiedSysEnv(systemVariable)) { Optional<EnvironmentVariable> optional = userList.stream().filter(userVariable -> userVariable.getName().equals(systemVariable.getName())).findAny(); if (optional.isPresent()) { optional.get().setValue(systemVariable.getValue()); } else { EnvironmentVariable clone = systemVariable.clone(); clone.IS_PREDEFINED = false; userList.add(clone); systemVariable.setValue(myParent.myParentDefaults.get(systemVariable.getName())); } dirty[0] = true; } } } if (dirty[0]) { myUserTable.setValues(userList); mySystemTable.setValues(systemList); } } | updateSysTableState |
289,969 | JComponent () { return myWholePanel; } | createCenterPanel |
289,970 | void () { myUserTable.stopEditing(); final Map<String, String> envs = new LinkedHashMap<>(); for (EnvironmentVariable variable : myUserTable.getEnvironmentVariables()) { if (StringUtil.isEmpty(variable.getName()) && StringUtil.isEmpty(variable.getValue())) continue; envs.put(variable.getName(), variable.getValue()); } for (EnvironmentVariable variable : mySystemTable.getEnvironmentVariables()) { if (myParent.isModifiedSysEnv(variable)) { envs.put(variable.getName(), variable.getValue()); } } myParent.setEnvs(envs); myParent.setPassParentEnvs(isIncludeSystemVars()); super.doOKAction(); } | doOKAction |
289,971 | boolean () { return myAlwaysIncludeSystemVars || myIncludeSystemVarsCb != null && myIncludeSystemVarsCb.isSelected(); } | isIncludeSystemVars |
289,972 | void (@NotNull AnActionEvent e) { stopEditing(); List<EnvironmentVariable> variables = getSelection(); for (EnvironmentVariable environmentVariable : variables) { if (myParent.isModifiedSysEnv(environmentVariable)) { environmentVariable.setValue(myParent.myParentDefaults.get(environmentVariable.getName())); setModified(); } } getTableView().revalidate(); getTableView().repaint(); } | actionPerformed |
289,973 | boolean () { List<EnvironmentVariable> selection = getSelection(); for (EnvironmentVariable variable : selection) { if (myParent.isModifiedSysEnv(variable)) return true; } return false; } | isEnabled |
289,974 | ActionUpdateThread () { return ActionUpdateThread.EDT; } | getActionUpdateThread |
289,975 | ListTableModel () { return new ListTableModel(new MyNameColumnInfo(), new MyValueColumnInfo()); } | createListModel |
289,976 | Component (JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { Component component = super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column); component.setEnabled(table.isEnabled() && (hasFocus || isSelected)); return component; } | getTableCellRendererComponent |
289,977 | TableCellRenderer (EnvironmentVariable o, TableCellRenderer renderer) { return o.getNameIsWriteable() ? renderer : myModifiedRenderer; } | getCustomizedRenderer |
289,978 | Component (JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { Component component = super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column); component.setFont(component.getFont().deriveFont(Font.BOLD)); if (!hasFocus && !isSelected) { component.setForeground(JBUI.CurrentTheme.Link.Foreground.ENABLED); } return component; } | getTableCellRendererComponent |
289,979 | boolean (EnvironmentVariable environmentVariable) { return true; } | isCellEditable |
289,980 | TableCellRenderer (EnvironmentVariable o, TableCellRenderer renderer) { return myParent.isModifiedSysEnv(o) ? myModifiedRenderer : renderer; } | getCustomizedRenderer |
289,981 | void (final ActionEvent e) { setEnvs(EnvVariablesTable.parseEnvsFromText(getText())); createDialog().show(); } | actionPerformed |
289,982 | void (@NotNull DocumentEvent e) { if (!StringUtil.equals(getEnvText(), getText())) { Map<String, String> textEnvs = EnvVariablesTable.parseEnvsFromText(getText()); myData = myData.with(textEnvs); updateEnvFilesFromText(); fireStateChanged(); } } | textChanged |
289,983 | void () { if (myEnvFilesExtension != null) return; myEnvFilesExtension = ExtendableTextComponent.Extension.create(AllIcons.General.OpenDisk, AllIcons.General.OpenDiskHover, ExecutionBundle.message("tooltip.browse.for.environment.files"), () -> browseForEnvFile()); getTextField().addExtension(myEnvFilesExtension); getTextField().getEmptyText().setText(ExecutionBundle.message("status.text.environment.variables.or.env.files")); } | addEnvFilesExtension |
289,984 | void () { if (myEnvFilePaths.isEmpty()) { EnvFilesDialogKt.addEnvFile(getTextField(), null, s -> { myEnvFilePaths.add(s); updateText(); return null; }); } else { EnvFilesDialog dialog = new EnvFilesDialog(this, myEnvFilePaths); dialog.show(); if (dialog.isOK()) { myEnvFilePaths = new ArrayList<>(dialog.getPaths()); updateText(); } } } | browseForEnvFile |
289,985 | ExtendableTextField () { return (ExtendableTextField)super.getTextField(); } | getTextField |
289,986 | EnvironmentVariablesDialog () { return new EnvironmentVariablesDialog(this); } | createDialog |
289,987 | void (@NotNull Map<String, String> envs) { setData(myData.with(envs)); } | setEnvs |
289,988 | EnvironmentVariablesData () { return myData; } | getData |
289,989 | void (@NotNull EnvironmentVariablesData data) { EnvironmentVariablesData oldData = myData; myData = data; updateText(); if (!oldData.equals(data)) { fireStateChanged(); } } | setData |
289,990 | Icon () { return AllIcons.General.InlineVariables; } | getDefaultIcon |
289,991 | Icon () { return AllIcons.General.InlineVariablesHover; } | getHoveredIcon |
289,992 | String () { String s = stringifyEnvs(myData); if (myEnvFilePaths.isEmpty()) return s; StringBuilder buf = new StringBuilder(s); for (String path : myEnvFilePaths) { if (!buf.isEmpty()) { buf.append(";"); } buf.append(path); } return buf.toString(); } | getEnvText |
289,993 | void () { setText(getEnvText()); } | updateText |
289,994 | String (@NotNull EnvironmentVariablesData evd) { StringBuilder buf = new StringBuilder(); for (Map.Entry<String, String> entry : evd.getEnvs().entrySet()) { if (!buf.isEmpty()) { buf.append(";"); } buf.append(StringUtil.escapeChar(entry.getKey(), ';')) .append("=") .append(StringUtil.escapeChar(entry.getValue(), ';')); } return buf.toString(); } | stringifyEnvs |
289,995 | boolean () { return myData.isPassParentEnvs(); } | isPassParentEnvs |
289,996 | void (boolean passParentEnvs) { setData(myData.with(passParentEnvs)); } | setPassParentEnvs |
289,997 | void (@NotNull ChangeListener changeListener) { myListeners.add(changeListener); } | addChangeListener |
289,998 | void (@NotNull ChangeListener changeListener) { myListeners.remove(changeListener); } | removeChangeListener |
289,999 | void () { for (ChangeListener listener : myListeners) { listener.stateChanged(new ChangeEvent(this)); } } | fireStateChanged |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.