@Override public void writeExternal(Element element) { super.writeExternal(element); if (myConfigurationName != null && myConfigurationType != null) { element.setAttribute("run_configuration_name", myConfigurationName); element.setAttribute("run_configuration_type", myConfigurationType); } else if (mySettings != null) { element.setAttribute("run_configuration_name", mySettings.getName()); element.setAttribute("run_configuration_type", mySettings.getType().getId()); } }
public SelectConfigAction( final RunnerAndConfigurationSettings configuration, final Project project) { myConfiguration = configuration; myProject = project; String name = configuration.getName(); if (name == null || name.length() == 0) { name = " "; } final Presentation presentation = getTemplatePresentation(); presentation.setText(name, false); final ConfigurationType type = configuration.getType(); if (type != null) { presentation.setDescription( "Select " + type.getConfigurationTypeDescription() + " '" + name + "'"); } updateIcon(presentation); }
void init() { if (myInitialized) { return; } if (myConfigurationName != null && myConfigurationType != null) { Collection<RunnerAndConfigurationSettings> configurations = RunManagerImpl.getInstanceImpl(myProject).getSortedConfigurations(); for (RunnerAndConfigurationSettings runConfiguration : configurations) { ConfigurationType type = runConfiguration.getType(); if (myConfigurationName.equals(runConfiguration.getName()) && type != null && myConfigurationType.equals(type.getId())) { setSettings(runConfiguration); return; } } } }