# HG changeset patch # User timkelly # Date 1253028352 18000 # Node ID defec9d2b40ac79efcd10e612b0140d52b87c28c # Parent fafaec74d446c8be0de504d2ec6500680d1de766 refactor to use AbstractCLaunchDelegate (bug 9762) diff -r fafaec74d446 -r defec9d2b40a cdt/cdt_6_0_x/org.eclipse.cdt.dsf.gdb/META-INF/MANIFEST.MF --- a/cdt/cdt_6_0_x/org.eclipse.cdt.dsf.gdb/META-INF/MANIFEST.MF Thu Sep 10 14:08:35 2009 -0500 +++ b/cdt/cdt_6_0_x/org.eclipse.cdt.dsf.gdb/META-INF/MANIFEST.MF Tue Sep 15 10:25:52 2009 -0500 @@ -12,7 +12,8 @@ org.eclipse.cdt.core, org.eclipse.cdt.debug.core, org.eclipse.core.variables, - org.eclipse.jface + org.eclipse.jface, + org.eclipse.cdt.launch Bundle-ActivationPolicy: lazy Bundle-RequiredExecutionEnvironment: J2SE-1.5 Export-Package: org.eclipse.cdt.dsf.gdb, diff -r fafaec74d446 -r defec9d2b40a cdt/cdt_6_0_x/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/internal/GdbPlugin.java --- a/cdt/cdt_6_0_x/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/internal/GdbPlugin.java Thu Sep 10 14:08:35 2009 -0500 +++ b/cdt/cdt_6_0_x/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/internal/GdbPlugin.java Tue Sep 15 10:25:52 2009 -0500 @@ -150,5 +150,19 @@ traceBuilder.append(millis); return traceBuilder.toString(); } + + /** + * Convenience method which returns the unique identifier of this plugin. + */ + public static String getUniqueIdentifier() { + if (getDefault() == null) { + // If the default instance is not yet initialized, + // return a static identifier. This identifier must + // match the plugin id defined in plugin.xml + return PLUGIN_ID; + } + return getDefault().getBundle().getSymbolicName(); + } + } diff -r fafaec74d446 -r defec9d2b40a cdt/cdt_6_0_x/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/GdbLaunchDelegate.java --- a/cdt/cdt_6_0_x/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/GdbLaunchDelegate.java Thu Sep 10 14:08:35 2009 -0500 +++ b/cdt/cdt_6_0_x/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/GdbLaunchDelegate.java Tue Sep 15 10:25:52 2009 -0500 @@ -30,6 +30,7 @@ import org.eclipse.cdt.dsf.gdb.service.GdbDebugServicesFactoryNS; import org.eclipse.cdt.dsf.gdb.service.SessionType; import org.eclipse.cdt.dsf.service.DsfSession; +import org.eclipse.cdt.launch.AbstractCLaunchDelegate; import org.eclipse.core.resources.IMarker; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IResource; @@ -46,17 +47,14 @@ import org.eclipse.debug.core.ILaunch; import org.eclipse.debug.core.ILaunchConfiguration; import org.eclipse.debug.core.ILaunchManager; -import org.eclipse.debug.core.model.ILaunchConfigurationDelegate2; import org.eclipse.debug.core.model.ISourceLocator; -import org.eclipse.debug.core.model.LaunchConfigurationDelegate; /** * The shared launch configuration delegate for the DSF/GDB debugger. * This delegate supports all configuration types (local, remote, attach, etc) */ @ThreadSafe -public class GdbLaunchDelegate extends LaunchConfigurationDelegate - implements ILaunchConfigurationDelegate2 +public class GdbLaunchDelegate extends AbstractCLaunchDelegate { public final static String GDB_DEBUG_MODEL_ID = "org.eclipse.cdt.dsf.gdb"; //$NON-NLS-1$ @@ -391,4 +389,12 @@ return new GdbDebugServicesFactory(version); } + + @Override + protected String getPluginID() { + return GdbPlugin.getUniqueIdentifier(); + } + + + }