mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-29 20:05:35 +02:00
Bug 494504 - Reverse API changes to GdbDebugServicesFactory
This change reverses the breaking API changes made to GdbDebugServicesFactory as part of Bug 488909 while retaining the code cleanup done in that bug. Change-Id: If269fa5e38e0c019a8f5ce9aa927f27da70f43ee Signed-off-by: Jonah Graham <jonah@kichwacoders.com>
This commit is contained in:
parent
25f52b35c9
commit
69d3441795
1 changed files with 31 additions and 3 deletions
|
@ -97,12 +97,40 @@ public class GdbDebugServicesFactory extends AbstractDsfDebugServicesFactory {
|
||||||
fVersion = version;
|
fVersion = version;
|
||||||
fConfiguration = config;
|
fConfiguration = config;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @since 5.0 */
|
/**
|
||||||
|
* @deprecated Use {@link GdbDebugServicesFactory#GdbDebugServicesFactory(String, ILaunchConfiguration)
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
|
public GdbDebugServicesFactory(String version) {
|
||||||
|
fVersion = version;
|
||||||
|
fConfiguration = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the launch configuration. This is useful for cases where the
|
||||||
|
* service to use is dependent on the launch settings.
|
||||||
|
*
|
||||||
|
* @return configuration or <code>null</code>
|
||||||
|
* @since 5.0
|
||||||
|
*/
|
||||||
protected ILaunchConfiguration getConfiguration() {
|
protected ILaunchConfiguration getConfiguration() {
|
||||||
return fConfiguration;
|
return fConfiguration;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns true if the services should be created for non-stop mode.
|
||||||
|
* @return <code>true</code> if services should be created for GDB non-stop
|
||||||
|
* @since 5.0
|
||||||
|
*/
|
||||||
|
protected boolean getIsNonStopMode() {
|
||||||
|
ILaunchConfiguration configuration = getConfiguration();
|
||||||
|
if (configuration == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return LaunchUtils.getIsNonStopMode(configuration);
|
||||||
|
}
|
||||||
|
|
||||||
public String getVersion() { return fVersion; }
|
public String getVersion() { return fVersion; }
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -269,7 +297,7 @@ public class GdbDebugServicesFactory extends AbstractDsfDebugServicesFactory {
|
||||||
@Override
|
@Override
|
||||||
protected IRunControl createRunControlService(DsfSession session) {
|
protected IRunControl createRunControlService(DsfSession session) {
|
||||||
// First check for the non-stop case
|
// First check for the non-stop case
|
||||||
if (LaunchUtils.getIsNonStopMode(getConfiguration())) {
|
if (getIsNonStopMode()) {
|
||||||
if (compareVersionWith(GDB_7_2_VERSION) >= 0) {
|
if (compareVersionWith(GDB_7_2_VERSION) >= 0) {
|
||||||
return new GDBRunControl_7_2_NS(session);
|
return new GDBRunControl_7_2_NS(session);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue