Search in sources :

Example 1 with IValgrindToolView

use of org.eclipse.linuxtools.valgrind.ui.IValgrindToolView in project linuxtools by eclipse.

the class ValgrindUIPlugin method getToolView.

/**
 * Returns the view specialized of a tool.
 *
 * @param id The valgrind view identifier
 * @return IValgrindToolView The valgrind view
 * @throws CoreException The view cannot be retrieved
 */
public IValgrindToolView getToolView(String id) throws CoreException {
    IValgrindToolView view = null;
    IConfigurationElement config = getToolMap().get(id);
    if (config != null) {
        Object obj = config.createExecutableExtension(EXT_ATTR_CLASS);
        if (obj instanceof IValgrindToolView) {
            view = (IValgrindToolView) obj;
        }
    }
    if (view == null) {
        // $NON-NLS-1$
        throw new CoreException(new Status(IStatus.ERROR, PLUGIN_ID, Messages.getString("ValgrindUIPlugin.Cannot_retrieve_view")));
    }
    return view;
}
Also used : Status(org.eclipse.core.runtime.Status) IStatus(org.eclipse.core.runtime.IStatus) IValgrindToolView(org.eclipse.linuxtools.valgrind.ui.IValgrindToolView) 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 IValgrindToolView (org.eclipse.linuxtools.valgrind.ui.IValgrindToolView)1