private ILaunchConfigurationWorkingCopy getWorkingCopy() throws CoreException{ ILaunchConfigurationWorkingCopy workingcopy = null; if( fLaunchConfiguration instanceof ILaunchConfigurationWorkingCopy){ workingcopy = (ILaunchConfigurationWorkingCopy) fLaunchConfiguration; }else{ workingcopy = fLaunchConfiguration.getWorkingCopy(); } return workingcopy; }
/** * Get the working copy of the launch configuration associated with this * tab. * * @return an {@link ILaunchConfigurationWorkingCopy}. * @throws CoreException */ private ILaunchConfigurationWorkingCopy getWorkingCopy() throws CoreException { ILaunchConfigurationWorkingCopy workingCopy; if (fSelectedLaunchConfiguration instanceof ILaunchConfigurationWorkingCopy) { workingCopy = (ILaunchConfigurationWorkingCopy) fSelectedLaunchConfiguration; } else { workingCopy = fSelectedLaunchConfiguration.getWorkingCopy(); } return workingCopy; }
public void entriesChanged(IClasspathViewer viewer) { // setDirty(true); try { saveEntries(fLaunchConfiguration.getWorkingCopy()); } catch (CoreException e) { throw new IllegalStateException(e); } // updateLaunchConfigurationDialog(); }
public ILaunchConfigurationWorkingCopy getWorkingCopy() throws CoreException { return new AdjustedLaunchConfigurationWorkingCopy(extraVMArgument, delegate.getWorkingCopy(), this); }
@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(); }
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(); 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 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(); } }
/** * Set the provider attribute in the specified configuration. * @param providerId The new provider id. */ private void setProvider(String providerId) { try { ILaunchConfigurationWorkingCopy wc = initial.getWorkingCopy(); wc.setAttribute(ProviderProfileConstants.PROVIDER_CONFIG_ATT, providerId); initial = wc.doSave(); } catch (CoreException e1) { e1.printStackTrace(); } }
/** * Notification that the 'Revert' button has been pressed */ protected void handleRevertPressed() { try { if(fTabGroup != null) { fTabGroup.initializeFrom(fOriginal); fNameWidget.setText(fOriginal.getName()); fWorkingCopy = fOriginal.getWorkingCopy(); refreshStatus(); } } catch (CoreException e) {DebugUIPlugin.log(e);} }
@Override public void launch(ILaunchConfiguration configuration, String mode, ILaunch launch, IProgressMonitor monitor) throws CoreException { ILaunchConfigurationWorkingCopy wc = configuration.getWorkingCopy(); JsonObject param = new JsonObject(); param.addProperty("request", "attach"); //$NON-NLS-1$ //$NON-NLS-2$ param.addProperty("processId", wc.getAttribute(AttachMainTab.ATTR_PID, Integer.toString(-1))); //$NON-NLS-1$ wc.setAttribute(DSPPlugin.ATTR_DSP_PARAM, new Gson().toJson(param)); wc.setAttribute(DSPPlugin.ATTR_DSP_MODE, DSPPlugin.DSP_MODE_LAUNCH); wc.setAttribute(DSPPlugin.ATTR_DSP_MONITOR_DEBUG_ADAPTER, true); if (wc.getAttribute(DebuggerTab.ATTR_DEFAULT_DEBUGGER, true)) { DebuggerInfo debuggerInfo = DebuggersRegistry.getDefaultDebugger(); wc.setAttribute(DSPPlugin.ATTR_DSP_CMD, debuggerInfo.debugger.getAbsolutePath()); wc.setAttribute(DSPPlugin.ATTR_DSP_ARGS, debuggerInfo.args); } configuration = wc.doSave(); super.launch(configuration, mode, launch, monitor); }
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); }
protected void okPressed() { try { if (fAskAgainCheckBox != null) { fNotAskAgain= fAskAgainCheckBox.getSelection(); } ILaunchConfigurationWorkingCopy wc = fConfiguration.getWorkingCopy(); fSourceLookupBlock.performApply(wc); if (!fConfiguration.contentsEqual(wc)) { fConfiguration = wc.doSave(); } } catch (CoreException e) { JDIDebugUIPlugin.log(e); } super.okPressed(); } }
@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(); } }
@Override protected ILaunchConfiguration findLaunchConfiguration(String mode) { ILaunchConfiguration config = super.findLaunchConfiguration(mode); if (config != null) { try { if (!(config.getAttribute(IPDELauncherConstants.USE_DEFAULT, false)) && (config.getAttribute(IPDEUIConstants.GENERATED_CONFIG, false))) { ILaunchConfigurationWorkingCopy wc = config.getWorkingCopy(); initializePluginsList(wc); return wc.doSave(); } } catch (CoreException e) { } } return config; }
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();