try {
// Activate plug-in that declares extension.
getManager().activatePlugin(ext.getDeclaringPluginDescriptor().getId());
Class<?> dockWidgetCls = loadPlugin(ext);
// Create DockProvider instance.
DockWidgetProviderInterface dockProvider = (DockWidgetProviderInterface) dockWidgetCls.newInstance();
// Initialize class instance according to interface contract.
dockProvider.init(MainWindow.getInstance(), viewAction);
} catch (Throwable t) {
displayPluginLoadErrorMsg(t, ext);
}
}