/** * Gets the <code>ViewComponentPlugin</code> Id. This * is typically used to configure actions (toolbar buttons) * for this view. * @return A <code>String</code> representation of the Id * for the <code>ViewComponentPlugin</code>. */ public String getId() { return plugin.getId(); }
/** * Gets the <code>ViewComponentPlugin</code> Id. This * is typically used to configure actions (toolbar buttons) * for this view. * @return A <code>String</code> representation of the Id * for the <code>ViewComponentPlugin</code>. */ public String getId() { return plugin.getId(); }
/** * Gets the <code>ViewComponentPlugin</code> Id. This * is typically used to configure actions (toolbar buttons) * for this view. * @return A <code>String</code> representation of the Id * for the <code>ViewComponentPlugin</code>. */ public String getId() { return plugin.getId(); }
public void registerViews(WorkspaceViewsTab tab) { ViewComponentPluginLoader loader = new ViewComponentPluginLoader(tab.getWorkspace()); Set<ViewComponentPlugin> plugins = loader.getPlugins(); for (final ViewComponentPlugin plugin : plugins) { pluginMap.put(plugin.getId(), plugin); } registeredTabs.add(tab); }
public void actionPerformed(ActionEvent e) { WorkspaceViewManager viewManager = workspace.getViewManager(); viewManager.showView(plugin.getId());; } };
public void registerViews(WorkspaceViewsTab tab) { ViewComponentPluginLoader loader = new ViewComponentPluginLoader(tab.getWorkspace()); Set<ViewComponentPlugin> plugins = loader.getPlugins(); for (final ViewComponentPlugin plugin : plugins) { pluginMap.put(plugin.getId(), plugin); } registeredTabs.add(tab); }
public void actionPerformed(ActionEvent e) { WorkspaceViewManager viewManager = workspace.getViewManager(); viewManager.showView(plugin.getId());; } };
public void actionPerformed(ActionEvent e) { WorkspaceViewManager viewManager = workspace.getViewManager(); viewManager.showView(plugin.getId());; } };
public void registerViews(WorkspaceViewsTab tab) { ViewComponentPluginLoader loader = new ViewComponentPluginLoader(tab.getWorkspace()); Set<ViewComponentPlugin> plugins = loader.getPlugins(); for (final ViewComponentPlugin plugin : plugins) { pluginMap.put(plugin.getId(), plugin); } registeredTabs.add(tab); }
public View showResultsView(String id, boolean replace, int location) { ViewComponentPluginLoader pluginLoader = new ViewComponentPluginLoader(this); for (ViewComponentPlugin plugin : pluginLoader.getPlugins()) { if (id.equals(plugin.getId())) { return showResultsView(plugin, replace, location); } } return null; }
public View showResultsView(String id, boolean replace, int location) { ViewComponentPluginLoader pluginLoader = new ViewComponentPluginLoader(this); for (ViewComponentPlugin plugin : pluginLoader.getPlugins()) { if (id.equals(plugin.getId())) { return showResultsView(plugin, replace, location); } } return null; }
public View showResultsView(String id, boolean replace, int location) { ViewComponentPluginLoader pluginLoader = new ViewComponentPluginLoader(this); for (ViewComponentPlugin plugin : pluginLoader.getPlugins()) { if (id.equals(plugin.getId())) { return showResultsView(plugin, replace, location); } } return null; }
public JComponent createComponent(Map<String, String> properties) { String pluginId = properties.get("pluginId"); ViewComponentPluginLoader loader = new ViewComponentPluginLoader(workspace); for (ViewComponentPlugin plugin : loader.getPlugins()) { if (plugin.getId().equals(pluginId)) { return new View(plugin, workspace); } } // we need to return a fully functioning view so that the close button works return new View(getEmptyPlugin(pluginId, "Couldn't load view plugin: " + pluginId), workspace); }
public JComponent createComponent(Map<String, String> properties) { String pluginId = properties.get("pluginId"); ViewComponentPluginLoader loader = new ViewComponentPluginLoader(workspace); for (ViewComponentPlugin plugin : loader.getPlugins()) { if (plugin.getId().equals(pluginId)) { return new View(plugin, workspace); } } // we need to return a fully functioning view so that the close button works return new View(getEmptyPlugin(pluginId, "Couldn't load view plugin: " + pluginId), workspace); }
public JComponent createComponent(Map<String, String> properties) { String pluginId = properties.get("pluginId"); ViewComponentPluginLoader loader = new ViewComponentPluginLoader(workspace); for (ViewComponentPlugin plugin : loader.getPlugins()) { if (plugin.getId().equals(pluginId)) { return new View(plugin, workspace); } } // we need to return a fully functioning view so that the close button works String msg = String.format( "<html><body>" + "<div style='font-weight: bold; padding-bottom: 20px;'>This view could not be loaded because its content is " + "provided by a view " + "plugin that could not be found.</div>" + "<div style='padding-bottom: 20px;'>" + "This problem may have been caused because the plugin is not installed or it may have been " + "caused by incompatible changes to the plugin in question.</div>" + "<div>Please check that the relevant plugin is installed. You can also try resetting " + "the tab to its default state to see if " + "this solves the issue.</div>" + "</body></html>" ); return new View(getEmptyPlugin(pluginId, msg), workspace); }
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; }
View v = viewHolder.getView(plugin.getId()); if (v != null) { v.closeView();
View v = viewHolder.getView(plugin.getId()); if (v != null) { v.closeView();