From 12931d59a7f1cbd00007e0da826c8f451ffadd1f Mon Sep 17 00:00:00 2001 From: Marc Khouzam Date: Fri, 9 Oct 2015 16:33:49 -0400 Subject: [PATCH] Remove deprecated method. GdbLaunchDelegate.newServiceFactory(String) has been deprecated for 4 years and has now been removed. It has been replaced with GdbLaunchDelegate.newServiceFactory(ILaunchConfiguration, String) Change-Id: Ida8e164da48fcd9d26baf1c77efef7b207ef7565 --- .../dsf/gdb/launching/GdbLaunchDelegate.java | 30 ++++--------------- 1 file changed, 6 insertions(+), 24 deletions(-) diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/GdbLaunchDelegate.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/GdbLaunchDelegate.java index f90ec53e949..b488dfdb6d4 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/GdbLaunchDelegate.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/GdbLaunchDelegate.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008, 2015 QNX Software Systems and others. + * Copyright (c) 2008, 2016 QNX Software Systems and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -66,9 +66,6 @@ public class GdbLaunchDelegate extends AbstractCLaunchDelegate2 private static final String NON_STOP_FIRST_VERSION = "6.8.50"; //$NON-NLS-1$ - // Can be removed once we remove the deprecated newServiceFactory(String) - private boolean fIsNonStopSession = false; - private static final String TRACING_FIRST_VERSION = "7.1.50"; //$NON-NLS-1$ private GdbLaunch fGdbLaunch; @@ -147,9 +144,6 @@ public class GdbLaunchDelegate extends AbstractCLaunchDelegate2 monitor.worked(1); - // Must set this here for users that call directly the deprecated newServiceFactory(String) - fIsNonStopSession = LaunchUtils.getIsNonStopMode(config); - String gdbVersion = getGDBVersion(config); // First make sure non-stop is supported, if the user want to use this mode @@ -477,29 +471,17 @@ public class GdbLaunchDelegate extends AbstractCLaunchDelegate2 return false; } - /** - * @deprecated Replaced by newServiceFactory(ILaunchConfiguration, String) - */ - @Deprecated - protected IDsfDebugServicesFactory newServiceFactory(String version) { - - if (fIsNonStopSession && isNonStopSupportedInGdbVersion(version)) { - return new GdbDebugServicesFactoryNS(version); - } - - return new GdbDebugServicesFactory(version); - } - /** * Method called to create the services factory for this debug session. * A subclass can override this method and provide its own ServiceFactory. * @since 4.1 */ protected IDsfDebugServicesFactory newServiceFactory(ILaunchConfiguration config, String version) { - // Call the deprecated one for now to avoid code duplication. - // Once we get rid of the deprecated one, we can also get rid of fIsNonStopSession - fIsNonStopSession = LaunchUtils.getIsNonStopMode(config); - return newServiceFactory(version); + if (LaunchUtils.getIsNonStopMode(config) && isNonStopSupportedInGdbVersion(version)) { + return new GdbDebugServicesFactoryNS(version); + } + + return new GdbDebugServicesFactory(version); } @Override