1
0
Fork 0
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:
Jonah Graham 2016-05-25 15:19:29 +01:00 committed by Marc Khouzam
parent 25f52b35c9
commit 69d3441795

View file

@ -98,11 +98,39 @@ public class GdbDebugServicesFactory extends AbstractDsfDebugServicesFactory {
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() {
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; }
@Override
@ -269,7 +297,7 @@ public class GdbDebugServicesFactory extends AbstractDsfDebugServicesFactory {
@Override
protected IRunControl createRunControlService(DsfSession session) {
// First check for the non-stop case
if (LaunchUtils.getIsNonStopMode(getConfiguration())) {
if (getIsNonStopMode()) {
if (compareVersionWith(GDB_7_2_VERSION) >= 0) {
return new GDBRunControl_7_2_NS(session);
}