use of org.eclipse.debug.ui.ILaunchShortcut2 in project linuxtools by eclipse.
the class CApplicationLaunchShortcut method getProxy.
private ILaunchShortcut2 getProxy() {
if (proxy == null) {
// Get a proxy to CDT's CApplicationLaunchShortcut class which is internal
// This plug-in has a dependency on org.eclipe.cdt.debug.ui so this extension is expected to be found.
IExtensionPoint extPoint = // $NON-NLS-1$
Platform.getExtensionRegistry().getExtensionPoint("org.eclipse.debug.ui.launchShortcuts");
IConfigurationElement[] configs = extPoint.getConfigurationElements();
for (IConfigurationElement config : configs) {
Object obj = null;
if (config.getName().equals("shortcut")) {
// $NON-NLS-1$
// $NON-NLS-1$
String id = config.getAttribute("id");
if (id.equals(CDT_LAUNCH_SHORTCUT_ID)) {
try {
// $NON-NLS-1$
obj = config.createExecutableExtension("class");
} catch (CoreException e) {
ProfileLaunchPlugin.log(e);
}
if (obj instanceof ILaunchShortcut2) {
proxy = (ILaunchShortcut2) obj;
break;
}
}
}
if (proxy != null)
break;
}
}
return proxy;
}
Aggregations