1 | private static IHTMLViewerPlugin createHTMLViewerPluginInstance(↵ | | 1 | private IHTMLViewerPlugin createHTMLViewerPluginInstance(↵
|
2 | String pluginId) {↵ | | 2 | String pluginId) {↵
|
3 | IHTMLViewerPlugin plugin = null;↵ | | 3 | IHTMLViewerPlugin plugin = null;↵
|
4 | try {↵ | | 4 | try {↵
|
|
5 | IExtensionHandler handler = PluginManager.getInstance()↵ | | 5 | IExtensionHandler handler = PluginManager.getInstance()↵
|
6 | .getExtensionHandler(↵ | | 6 | .getExtensionHandler(↵
|
7 | IExtensionHandlerKeys.ORG_COLUMBA_CORE_HTMLVIEWER);↵ | | 7 | IExtensionHandlerKeys.ORG_COLUMBA_CORE_HTMLVIEWER);↵
|
|
8 | IExtension extension = handler.getExtension(pluginId);↵ | | 8 | IExtension extension = handler.getExtension(pluginId);↵
|
9 | if (extension == null)↵ | | 9 | if (extension == null)↵
|
10 | return null;↵ | | 10 | return null;↵
|
|
11 | plugin = (IHTMLViewerPlugin) extension.instanciateExtension(null);↵ | | 11 | plugin = (IHTMLViewerPlugin) extension.instanciateExtension(null);↵
|
|
12 | return plugin;↵ | | 12 | return plugin;↵
|
13 | } catch (PluginHandlerNotFoundException e) {↵ | | 13 | } catch (PluginHandlerNotFoundException e) {↵
|
14 | LOG.severe("Error while loading viewer plugin: " + e.getMessage());↵ | | 14 | LOG.severe("Error while loading viewer plugin: " + e.getMessage());↵
|
15 | if (Logging.DEBUG)↵ | | 15 | if (Logging.DEBUG)↵
|
16 | e.printStackTrace();↵ | | 16 | e.printStackTrace();↵
|
17 | } catch (PluginException e) {↵ | | 17 | } catch (PluginException e) {↵
|
18 | LOG.severe("Error while loading viewer plugin: " + e.getMessage());↵ | | 18 | LOG.severe("Error while loading viewer plugin: " + e.getMessage());↵
|
19 | if (Logging.DEBUG)↵ | | 19 | if (Logging.DEBUG)↵
|
20 | e.printStackTrace();↵ | | 20 | e.printStackTrace();↵
|
21 | }↵ | | 21 | }↵
|
|
22 | return null;↵ | | 22 | return null;↵
|
23 | | | 23 |
|