Search in sources :

Example 1 with IValgrindLaunchDelegate

use of org.eclipse.linuxtools.valgrind.launch.IValgrindLaunchDelegate in project linuxtools by eclipse.

the class ValgrindLaunchPlugin method getToolDelegate.

public IValgrindLaunchDelegate getToolDelegate(String id) throws CoreException {
    IValgrindLaunchDelegate delegate = null;
    IConfigurationElement config = getToolMap().get(id);
    if (config != null) {
        Object obj = config.createExecutableExtension(EXT_ATTR_DELEGATE);
        if (obj instanceof IValgrindLaunchDelegate) {
            delegate = (IValgrindLaunchDelegate) obj;
        }
    }
    if (delegate == null) {
        // $NON-NLS-1$
        throw new CoreException(new Status(IStatus.ERROR, PLUGIN_ID, Messages.getString("ValgrindLaunchPlugin.Cannot_retrieve_delegate")));
    }
    return delegate;
}
Also used : IStatus(org.eclipse.core.runtime.IStatus) Status(org.eclipse.core.runtime.Status) IValgrindLaunchDelegate(org.eclipse.linuxtools.valgrind.launch.IValgrindLaunchDelegate) CoreException(org.eclipse.core.runtime.CoreException) IConfigurationElement(org.eclipse.core.runtime.IConfigurationElement)

Aggregations

CoreException (org.eclipse.core.runtime.CoreException)1 IConfigurationElement (org.eclipse.core.runtime.IConfigurationElement)1 IStatus (org.eclipse.core.runtime.IStatus)1 Status (org.eclipse.core.runtime.Status)1 IValgrindLaunchDelegate (org.eclipse.linuxtools.valgrind.launch.IValgrindLaunchDelegate)1