use of org.eclipse.debug.core.ILaunchManager in project iobserve-analysis by research-iobserve.
the class PerOpteryxLaunchConfigurationBuilder method getDefaultLaunchConfiguration.
public static ILaunchConfiguration getDefaultLaunchConfiguration(final String projectModelDir, final String sourceModelDir) throws CoreException {
final Map<String, Object> attr = new HashMap<>();
setDefaultConfigFiles(projectModelDir, attr);
setDefaultGeneralOptions(attr);
setDefaultAnalysisOptions(attr);
setDefaultResourceOptions(attr);
setDefaultReliabilityOptions(attr);
// setSimuComDefaultOptions(attr);
setLQNSDefaultOptions(attr, projectModelDir, sourceModelDir);
setDefaultTacticsOptions(attr);
ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager();
ILaunchConfigurationType launchConfigType = launchManager.getLaunchConfigurationType(DSE_LAUNCH_TYPE_ID);
ILaunchConfigurationWorkingCopy workingCopy = launchConfigType.newInstance(null, DEFAULT_LAUNCH_CONFIG_NAME);
workingCopy.setAttributes(attr);
ILaunchConfiguration launchConfig = workingCopy.doSave();
LOG.info("Using launch configuration with attributes: " + attr.toString());
return launchConfig;
}
use of org.eclipse.debug.core.ILaunchManager in project jbosstools-openshift by jbosstools.
the class ExternalLaunchUtil method findExternalToolsLaunchConfig.
public static ILaunchConfigurationWorkingCopy findExternalToolsLaunchConfig(IServer s, String launchName) throws CoreException {
ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();
ILaunchConfigurationType type = manager.getLaunchConfigurationType(EXTERNAL_TOOLS);
ILaunchConfiguration[] all = manager.getLaunchConfigurations(type);
for (int i = 0; i < all.length; i++) {
if (all[i].getName().equals(launchName)) {
return all[i].getWorkingCopy();
}
}
ILaunchConfigurationWorkingCopy wc = type.newInstance(null, launchName);
return wc;
}
use of org.eclipse.debug.core.ILaunchManager in project tdi-studio-se by Talend.
the class DebugProcessTosComposite method exec.
public void exec() {
setHideconsoleLine(false);
if (getProcessContext() == null) {
return;
}
if (getProcessContext().getProcess() instanceof IProcess2) {
ReplaceNodesInProcessProvider.beforeRunJobInGUI(getProcessContext().getProcess());
}
CorePlugin.getDefault().getRunProcessService().saveJobBeforeRun(getProcessContext().getProcess());
if (manager.getClearBeforeExec()) {
processContext.clearMessages();
}
if (manager.getExecTime()) {
processContext.switchTime();
}
processContext.setWatchAllowed(manager.getExecTime());
processContext.setMonitorPerf(manager.getStat());
// processContext.setMonitorTrace(traceBtn.getSelection());
processContext.setNextBreakPoint(false);
processContext.setSelectedContext(manager.getSelectContext());
processContext.exec(manager.getProcessShell());
checkSaveBeforeRunSelection();
ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();
ILaunch[] launches = manager.getLaunches();
manager.removeLaunches(launches);
// trace debug to collect when tos
IPreferenceStore preferenceStore = RunProcessPlugin.getDefault().getPreferenceStore();
int num = preferenceStore.getInt(RunProcessTokenCollector.TOS_COUNT_DEBUG_RUNS.getPrefKey());
preferenceStore.setValue(RunProcessTokenCollector.TOS_COUNT_DEBUG_RUNS.getPrefKey(), num + 1);
}
use of org.eclipse.debug.core.ILaunchManager in project tdi-studio-se by Talend.
the class ProcessComposite method exec.
public void exec() {
setHideconsoleLine(false);
if (getProcessContext() == null) {
return;
}
if (getProcessContext().getProcess() instanceof IProcess2) {
ReplaceNodesInProcessProvider.beforeRunJobInGUI(getProcessContext().getProcess());
}
CorePlugin.getDefault().getRunProcessService().saveJobBeforeRun(getProcessContext().getProcess());
if (processContext.isClearBeforeExec()) {
processContext.clearMessages();
}
// processContext.
// if (processContext.isWatchAllowed()) {
// processContext.switchTime();
// }
processContext.setMonitorTrace(false);
processContext.setWatchAllowed(processManager.getExecTime());
processContext.setMonitorPerf(processManager.getStat());
// processContext.setMonitorTrace(traceBtn.getSelection());
/* check and save should be execute before processContext.exec,or it will cause dirty problem,bug 16791 */
checkSaveBeforeRunSelection();
processContext.setSelectedContext(processManager.getSelectContext());
processContext.exec(processManager.getProcessShell());
processContext.cleanWorkingDirectory();
ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();
ILaunch[] launches = manager.getLaunches();
manager.removeLaunches(launches);
}
use of org.eclipse.debug.core.ILaunchManager in project tdi-studio-se by Talend.
the class MemoryRuntimeComposite method exec.
private void exec() {
if (processContext instanceof IProcess2) {
ReplaceNodesInProcessProvider.beforeRunJobInGUI(processContext.getProcess());
}
CorePlugin.getDefault().getRunProcessService().saveJobBeforeRun(processContext.getProcess());
if (processContext.isClearBeforeExec()) {
processContext.clearMessages();
}
processContext.setMonitorTrace(false);
processContext.setWatchAllowed(processManager.getExecTime());
processContext.setMonitorPerf(processManager.getStat());
if (processContext.isSaveBeforeRun()) {
SaveJobBeforeRunAction action = new SaveJobBeforeRunAction(processContext.getProcess());
action.run();
}
processContext.setSelectedContext(processManager.getSelectContext());
processContext.exec(processManager.getProcessShell());
ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();
ILaunch[] launches = manager.getLaunches();
manager.removeLaunches(launches);
}
Aggregations