mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 14:42:11 +02:00
2004-10-17 Alain Magloire
Remove deprecated method in CDI adjust the implementation. * src/org/eclipse/cdt/launch/internal/CoreFileLaunchDelegate.java * src/org/eclipse/cdt/launch/internal/LocalCLaunchConfigurationDelegate.java
This commit is contained in:
parent
fea4e25184
commit
6bc057c303
3 changed files with 41 additions and 28 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2004-10-17 Alain Magloire
|
||||||
|
Remove deprecated method in CDI adjust the implementation.
|
||||||
|
* src/org/eclipse/cdt/launch/internal/CoreFileLaunchDelegate.java
|
||||||
|
* src/org/eclipse/cdt/launch/internal/LocalCLaunchConfigurationDelegate.java
|
||||||
|
|
||||||
2004-10-08 Mikhail Khodjaiants
|
2004-10-08 Mikhail Khodjaiants
|
||||||
Added the launch configuration preference for the register bookkeeping.
|
Added the launch configuration preference for the register bookkeeping.
|
||||||
* LaunchUIPluginResources.properties
|
* LaunchUIPluginResources.properties
|
||||||
|
|
|
@ -16,6 +16,7 @@ import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants;
|
||||||
import org.eclipse.cdt.debug.core.ICDebugConfiguration;
|
import org.eclipse.cdt.debug.core.ICDebugConfiguration;
|
||||||
import org.eclipse.cdt.debug.core.cdi.CDIException;
|
import org.eclipse.cdt.debug.core.cdi.CDIException;
|
||||||
import org.eclipse.cdt.debug.core.cdi.ICDISession;
|
import org.eclipse.cdt.debug.core.cdi.ICDISession;
|
||||||
|
import org.eclipse.cdt.debug.core.cdi.model.ICDITarget;
|
||||||
import org.eclipse.cdt.launch.AbstractCLaunchDelegate;
|
import org.eclipse.cdt.launch.AbstractCLaunchDelegate;
|
||||||
import org.eclipse.cdt.launch.internal.ui.LaunchUIPlugin;
|
import org.eclipse.cdt.launch.internal.ui.LaunchUIPlugin;
|
||||||
import org.eclipse.core.resources.IFile;
|
import org.eclipse.core.resources.IFile;
|
||||||
|
@ -77,14 +78,15 @@ public class CoreFileLaunchDelegate extends AbstractCLaunchDelegate {
|
||||||
}
|
}
|
||||||
// set the source locator
|
// set the source locator
|
||||||
setSourceLocator(launch, config);
|
setSourceLocator(launch, config);
|
||||||
|
ICDITarget[] dTargets = dsession.getTargets();
|
||||||
CDIDebugModel.newCoreFileDebugTarget(
|
for (int i = 0; i < dTargets.length; ++i) {
|
||||||
launch,
|
CDIDebugModel.newCoreFileDebugTarget(
|
||||||
dsession.getCurrentTarget(),
|
launch,
|
||||||
renderTargetLabel(debugConfig),
|
dTargets[i],
|
||||||
debuggerProcess,
|
renderTargetLabel(debugConfig),
|
||||||
exeFile);
|
debuggerProcess,
|
||||||
|
exeFile);
|
||||||
|
}
|
||||||
monitor.done();
|
monitor.done();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -94,24 +94,27 @@ public class LocalCLaunchConfigurationDelegate extends AbstractCLaunchDelegate {
|
||||||
opt.setWorkingDirectory(wd.getAbsolutePath());
|
opt.setWorkingDirectory(wd.getAbsolutePath());
|
||||||
}
|
}
|
||||||
opt.setEnvironment(expandEnvironment(config));
|
opt.setEnvironment(expandEnvironment(config));
|
||||||
ICDITarget dtarget = dsession.getTargets()[0];
|
|
||||||
Process process = dtarget.getProcess();
|
|
||||||
IProcess iprocess = DebugPlugin.newProcess(launch, process, renderProcessLabel(commandArray[0]));
|
|
||||||
debugger = dsession.getSessionProcess();
|
debugger = dsession.getSessionProcess();
|
||||||
if ( debugger != null ) {
|
if ( debugger != null ) {
|
||||||
debuggerProcess = DebugPlugin.newProcess(launch, debugger, renderDebuggerProcessLabel());
|
debuggerProcess = DebugPlugin.newProcess(launch, debugger, renderDebuggerProcessLabel());
|
||||||
}
|
}
|
||||||
boolean stopInMain = config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN, false);
|
ICDITarget[] dtargets = dsession.getTargets();
|
||||||
CDIDebugModel.newDebugTarget(
|
for (int i = 0; i < dtargets.length; ++i) {
|
||||||
launch,
|
ICDITarget dtarget = dtargets[i];
|
||||||
dsession.getCurrentTarget(),
|
Process process = dtarget.getProcess();
|
||||||
renderTargetLabel(debugConfig),
|
IProcess iprocess = DebugPlugin.newProcess(launch, process, renderProcessLabel(commandArray[0]));
|
||||||
iprocess,
|
boolean stopInMain = config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN, false);
|
||||||
debuggerProcess,
|
CDIDebugModel.newDebugTarget(
|
||||||
exeFile,
|
launch,
|
||||||
true,
|
dtarget,
|
||||||
false,
|
renderTargetLabel(debugConfig),
|
||||||
stopInMain);
|
iprocess,
|
||||||
|
debuggerProcess,
|
||||||
|
exeFile,
|
||||||
|
true,
|
||||||
|
false,
|
||||||
|
stopInMain);
|
||||||
|
}
|
||||||
|
|
||||||
} else if (debugMode.equals(ICDTLaunchConfigurationConstants.DEBUGGER_MODE_ATTACH)) {
|
} else if (debugMode.equals(ICDTLaunchConfigurationConstants.DEBUGGER_MODE_ATTACH)) {
|
||||||
int pid = getProcessID();
|
int pid = getProcessID();
|
||||||
|
@ -124,12 +127,15 @@ public class LocalCLaunchConfigurationDelegate extends AbstractCLaunchDelegate {
|
||||||
debuggerProcess = DebugPlugin.newProcess(launch, debugger, renderDebuggerProcessLabel());
|
debuggerProcess = DebugPlugin.newProcess(launch, debugger, renderDebuggerProcessLabel());
|
||||||
launch.removeProcess(debuggerProcess);
|
launch.removeProcess(debuggerProcess);
|
||||||
}
|
}
|
||||||
CDIDebugModel.newAttachDebugTarget(
|
ICDITarget[] dTargets = dsession.getTargets();
|
||||||
launch,
|
for (int i = 0; i < dTargets.length; ++i) {
|
||||||
dsession.getCurrentTarget(),
|
CDIDebugModel.newAttachDebugTarget(
|
||||||
renderTargetLabel(debugConfig),
|
launch,
|
||||||
debuggerProcess,
|
dTargets[i],
|
||||||
exeFile);
|
renderTargetLabel(debugConfig),
|
||||||
|
debuggerProcess,
|
||||||
|
exeFile);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} catch (CDIException e) {
|
} catch (CDIException e) {
|
||||||
if (dsession != null) {
|
if (dsession != null) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue