/** * Saves the working copy (may return <tt>null</tt> if the <code>launchWorkingCopy</code> is * <tt>null</tt> or the save fails). */ private static ILaunchConfiguration save(ILaunchConfigurationWorkingCopy launchWorkingCopy) { if(null == launchWorkingCopy) return null; try { return launchWorkingCopy.doSave(); } catch(CoreException cex) { TestNGPlugin.log(cex); } return null; }
public void migrate(ILaunchConfiguration candidate) throws CoreException { ILaunchConfigurationWorkingCopy wc= candidate.getWorkingCopy(); mapResources(wc); wc.doSave(); }
@Override public void migrate(ILaunchConfiguration candidate) throws CoreException { ILaunchConfigurationWorkingCopy wc = candidate.getWorkingCopy(); updateResourceMapping(wc); wc.doSave(); }
@Override public void migrate(ILaunchConfiguration candidate) throws CoreException { ILaunchConfigurationWorkingCopy wc = candidate.getWorkingCopy(); updateResourceMapping(wc); wc.doSave(); }
@Override public void migrate(ILaunchConfiguration candidate) throws CoreException { ILaunchConfigurationWorkingCopy wc= candidate.getWorkingCopy(); mapResources(wc); wc.doSave(); }
public void setRunConfVmArgs(final ILaunchConfiguration conf, final String vmargs) throws CoreException { ILaunchConfigurationWorkingCopy confWc = conf.getWorkingCopy(); confWc.setAttribute(JunitLaunchListener.VM_ARGS, vmargs); confWc.doSave(); }
public void save() { try { getWorkingCopy().doSave(); } catch (CoreException e) { SDBGDebugCorePlugin.logError(e); } }
private ILaunchConfiguration persistConfiguration(ILaunchConfigurationWorkingCopy launchConfiguration) { try { return launchConfiguration.doSave(); } catch (CoreException e) { CorePlugin.logger().warn("Cannot persist Gradle launch configuration", e); return launchConfiguration; } }
public void migrate(ILaunchConfiguration candidate) throws CoreException { ILaunchConfigurationWorkingCopy wc = candidate.getWorkingCopy(); migrate(wc); wc.doSave(); }
private void updateLaunchConfiguration(ILaunchConfiguration configuration, Map<String, String> plusEntries, Set<String> minusEntries) throws CoreException { if (configuration instanceof ILaunchConfigurationWorkingCopy) { updateLaunchConfiguration((ILaunchConfigurationWorkingCopy) configuration, plusEntries, minusEntries); } else { ILaunchConfigurationWorkingCopy workingCopy = configuration.getWorkingCopy(); updateLaunchConfiguration(workingCopy, plusEntries, minusEntries); workingCopy.doSave(); } }
ILaunchConfigurationWorkingCopy workingCopy = launchConfig.getWorkingCopy(); workingCopy.delete(); ILaunchConfigurationType launchType = launchConfig.getType(); IContainer container = launchConfig.getFile() == null ? null : launchConfig.getFile().getParent(); ILaunchConfigurationWorkingCopy newLaunchConfig = launchType.newInstance( container, workingCopy.getName() ); // copy all attributes from 'launchConfig' to 'newLaunchConfig' newLaunchConfig.doSave();
@Override public ILaunchConfiguration newApplicationLaunchConfiguration(String projectName, String fullyQualifiedNameOfClass, Class<? extends IRuntimeClasspathProvider> classPathProvider) throws CoreException { final ILaunchConfigurationWorkingCopy wc = initLaunchConfiguration(getApplicationLaunchConfigurationType(), projectName, simpleName(fullyQualifiedNameOfClass), false); setMainJavaClass(wc, fullyQualifiedNameOfClass); if (classPathProvider != null) { wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_CLASSPATH_PROVIDER, classPathProvider.getName()); } return wc.doSave(); }
protected void setDefaultSourceLocator(ILaunch launch, ILaunchConfiguration configuration) throws CoreException { ILaunchConfigurationWorkingCopy wc = null; if (configuration.isWorkingCopy()) { wc = (ILaunchConfigurationWorkingCopy) configuration; } else { wc = configuration.getWorkingCopy(); } String id = configuration.getAttribute(IJavaLaunchConfigurationConstants.ATTR_SOURCE_PATH_PROVIDER, (String) null); if (!PDESourcePathProvider.ID.equals(id)) { wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_SOURCE_PATH_PROVIDER, PDESourcePathProvider.ID); wc.doSave(); } manageLaunch(launch); }
@Override public ILaunchConfiguration newAgentLaunchConfiguration(String projectName, String fullyQualifiedNameOfAgent) throws CoreException { final ILaunchConfigurationWorkingCopy wc = initLaunchConfiguration(getAgentLaunchConfigurationType(), projectName, simpleName(fullyQualifiedNameOfAgent), true); setAgent(wc, fullyQualifiedNameOfAgent); return wc.doSave(); }
ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager(); ILaunchConfigurationType antType = launchManager.getLaunchConfigurationType(IExternalToolConstants.ID_PROGRAM_BUILDER_LAUNCH_CONFIGURATION_TYPE); ILaunchConfigurationWorkingCopy workingCopy = antType.newInstance(BuilderUtils.getBuilderFolder(project, true), "lstest" ); workingCopy.setAttribute(IDebugUIConstants.ATTR_LAUNCH_IN_BACKGROUND, false); workingCopy.setAttribute(IExternalToolConstants.ATTR_LOCATION, "${project_loc}\\YOUR_SHELL_SCRIPT"); workingCopy.setAttribute(....); ILaunchConfiguration ilc = workingCopy.doSave();
@Override protected void okPressed() { ILaunchConfiguration config = fDirector.getLaunchConfiguration(); ILaunchConfigurationWorkingCopy copy = null; if(config != null) { try { copy = config.getWorkingCopy(); fPanel.performApply(copy); copy.doSave(); } catch (CoreException e) {DebugUIPlugin.log(e);} } super.okPressed(); }
public boolean performOk() { fWorkingDirBlock.performApply(fWorkingCopy); fJRETab.performApply(fWorkingCopy); fVMArgumentsBlock.performApply(fWorkingCopy); try { if (!fWorkingCopy.contentsEqual(fConfig)) { fConfig = fWorkingCopy.doSave(); fWorkingCopy = fConfig.getWorkingCopy(); } } catch (CoreException e) { JDIDebugUIPlugin.statusDialog(e.getStatus()); } return super.performOk(); } }
ILaunchConfiguration cfg = programType.newInstance(null, "YourCommandName"); ILaunchConfigurationWorkingCopy wc = cfg.getWorkingCopy(); wc.setAttribute(IExternalToolConstants.ATTR_LOCATION, "${system_path:" + systemCommand+ "}"); wc.setAttribute(IExternalToolConstants.ATTR_WORKING_DIRECTORY, directoryToStartFrom); wc.setAttribute(IExternalToolConstants.ATTR_TOOL_ARGUMENTS, parametersToPass); cfg = wc.doSave(); cfg.launch(ILaunchManager.RUN_MODE, null, false, true); cfg.delete();
protected ILaunchConfiguration createConfiguration(IJavaProject type) throws Exception { ILaunchConfiguration config = null; ILaunchConfigurationWorkingCopy wc = null; ILaunchConfigurationType configType = getConfigurationType(); wc = configType.newInstance(null, getLaunchManager() .generateUniqueLaunchConfigurationNameFrom( type.getElementName())); wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, type.getElementName()); config = wc.doSave(); return config; }
/** * @see AbstractLaunchConfigurationAction#performAction() */ @Override protected void performAction() { ILaunchConfiguration original = (ILaunchConfiguration)getStructuredSelection().getFirstElement(); String newName = DebugPlugin.getDefault().getLaunchManager().generateLaunchConfigurationName(original.getName()); try { ILaunchConfigurationWorkingCopy newWorkingCopy = original.copy(newName); newWorkingCopy.doSave(); } catch (CoreException e) { errorDialog(e); } }