protected void onPlugInRenamed(@Observes final PluginRenamed pluginRenamed) { if (pluginRenamed.getOldPluginName().equals(plugin.getName()) && pluginRenamed.getPlugin().getType().equals(plugin.getType())) { plugin = new Plugin(pluginRenamed.getPlugin().getName(), PluginType.DYNAMIC_MENU, pluginRenamed.getPlugin().getPath()); changeTitleNotification.fire(new ChangeTitleWidgetEvent(place, getTitleText(), getTitle())); } }
@Override public int hashCode() { int result = super.hashCode(); result = ~~result; if (layoutEditorModel != null) { result = 31 * result + layoutEditorModel.hashCode(); } return result; }
public Plugin getLayoutTemplatePlugin(String perspectiveName) { if (perspectiveName == null) { return null; } for (Plugin plugin : pluginServices.listPlugins()) { if (PluginType.PERSPECTIVE_LAYOUT.equals(plugin.getType()) && plugin.getName().equals(perspectiveName)) { return plugin; } } return null; }
private void refreshPerspective(Plugin plugin) { if (perspectiveId != null && perspectiveId.equals(plugin.getName())) { showPerspective(perspectiveId); } }
public boolean isRuntimePerspective(Plugin plugin) { ClientResourceType type = clientTypeRegistry.resolve(plugin.getPath()); return type != null && type instanceof PerspectiveLayoutPluginResourceType; }
private Plugin mkPlugin(String name) { return new Plugin(name, PluginType.PERSPECTIVE, null); }
public PluginType getPluginType() { return getPlugin().getType(); } }
private void refreshPerspective(Plugin plugin) { if (perspectiveId != null && perspectiveId.equals(plugin.getName())) { showPerspective(perspectiveId); } }
@Override public LayoutTemplate getLayoutTemplate(Plugin perspectivePlugin) { return getLayoutTemplate(perspectivePlugin.getPath()); }
private Plugin mkPlugin(String name) { return new Plugin(name, PluginType.PERSPECTIVE, null); }
public PluginType getOldPluginType() { return getPlugin().getType(); } }
protected void onPlugInRenamed(@Observes final PluginRenamed pluginRenamed) { if (pluginRenamed.getOldPluginName().equals(plugin.getName()) && pluginRenamed.getPlugin().getType().equals(plugin.getType())) { plugin = new Plugin(pluginRenamed.getPlugin().getName(), PluginType.DYNAMIC_MENU, pluginRenamed.getPlugin().getPath()); changeTitleNotification.fire(new ChangeTitleWidgetEvent(place, getTitleText(), getTitle())); } }
private Set<String> getRuntimePerspectiveIds() { Set<String> result = new HashSet<>(); perspectivePluginManager.getPerspectivePlugins(plugins -> { plugins.forEach(p -> { String perspectiveId = p.getName(); result.add(perspectiveId); }); }); return result; }
public boolean isRuntimePerspective(Plugin plugin) { ClientResourceType type = clientTypeRegistry.resolve(plugin.getPath()); return type != null && type instanceof PerspectiveLayoutPluginResourceType; }
@OnStartup public void onStartup(final ObservablePath path, final PlaceRequest place) { init(path, place, resourceType, true, false, SAVE, COPY, RENAME, DELETE); // This is only used to define the "name" used by @WorkbenchPartTitle which is called by Uberfire after @OnStartup // but before the async call in "loadContent()" has returned. When the *real* plugin is loaded this is overwritten this.plugin = new Plugin(place.getParameter("name", ""), PluginType.DYNAMIC_MENU, path); }