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