1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-09 02:36:01 +02:00

Add getUniqIdentifier.

This commit is contained in:
Alain Magloire 2002-09-23 19:25:08 +00:00
parent cec7386710
commit ebb45efa08
2 changed files with 46 additions and 17 deletions

View file

@ -0,0 +1,19 @@
package org.eclipse.cdt.debug.mi.core;
/*
* (c) Copyright QNX Software System 2002.
* All Rights Reserved.
*/
public interface IMILaunchConfigurationConstants {
/**
* Launch configuration attribute key. The value is a name of
* a C/C++ project associated with a C/C++ launch configuration.
*/
public static final String ATTR_DEBUG_NAME = MIPlugin.getUniqueIdentifier() + ".DEBUG_NAME"; //$NON-NLS-1$
public static final String ATTR_DEBUG_ARGS = MIPlugin.getUniqueIdentifier() + ".DEBUG_ARGS"; //$NON-NLS-1$
public static final String ATTR_AUTO_SOLIB = MIPlugin.getUniqueIdentifier() + ".AUTO_SOLIB"; //$NON-NLS-1$
}

View file

@ -130,8 +130,6 @@ public class MIPlugin extends Plugin {
throw new IOException("No answer"); throw new IOException("No answer");
} }
//@@@ We have to manually set the suspended state when we attach //@@@ We have to manually set the suspended state when we attach
//(assuming the attach works) as a safeguard since GDB man not
//notice the attach (the behaviour in gdb 5.0).
session.getMIInferior().setSuspended(); session.getMIInferior().setSuspended();
} catch (MIException e) { } catch (MIException e) {
throw new IOException("Failed to attach"); throw new IOException("Failed to attach");
@ -139,6 +137,18 @@ public class MIPlugin extends Plugin {
return new CSession(session, true); return new CSession(session, true);
} }
/**
* 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 "org.eclipse.cdt.debug.mi.core"; //$NON-NLS-1$
}
return getDefault().getDescriptor().getUniqueIdentifier();
}
public static void debugLog(String message) { public static void debugLog(String message) {
// if ( getDefault().isDebugging() ) { // if ( getDefault().isDebugging() ) {