private void createContent() { try { viewComponent = plugin.newInstance(); viewComponentHolder.add(viewComponent); viewComponent.setView(this); viewComponent.initialise(); } catch (Exception e) { logger.error("An error occurred whilst creating the view content for the '{}' view: {}", plugin.getLabel(), e); viewComponentHolder.add(ComponentFactory.createExceptionComponent( "An error occurred whilst creating the view", e, null)); } }
private void createContent() { try { viewComponent = plugin.newInstance(); viewComponentHolder.add(viewComponent); viewComponent.setView(this); viewComponent.initialise(); } catch (Exception e) { ProtegeApplication.getErrorLog().logError(e); viewComponentHolder.add(ComponentFactory.createExceptionComponent( "An error occurred whilst creating the view", e, null)); } }
private void createContent() { try { viewComponent = plugin.newInstance(); viewComponentHolder.add(viewComponent); viewComponent.setView(this); viewComponent.initialise(); } catch (Exception e) { ProtegeApplication.getErrorLog().logError(e); viewComponentHolder.add(ComponentFactory.createExceptionComponent( "An error occurred whilst creating the view", e, null)); } }
public View showResultsView(ViewComponentPlugin plugin, boolean replace, int location) { try { ViewHolder viewHolder; if (location == BOTTOM_RESULTS_VIEW) { viewHolder = bottomResultsViewHolder; } else { viewHolder = leftResultsViewHolder; } if (replace) { View v = viewHolder.getView(plugin.getId()); if (v != null) { v.closeView(); } } View view = new View(plugin, this); ViewComponent viewComponent = plugin.newInstance(); viewComponent.setup(plugin); viewHolder.addView(view); return view; } catch (ClassNotFoundException | IllegalAccessException | InstantiationException e) { logger.error("An error occurred whilst instantiating the results view: {}", e); } return null; }
ViewComponent viewComponent = plugin.newInstance(); viewComponent.setup(plugin); viewHolder.addView(view);
ViewComponent viewComponent = plugin.newInstance(); viewComponent.setup(plugin); viewHolder.addView(view);