@Override public LayoutTemplate getLayoutTemplate(Plugin perspectivePlugin) { return getLayoutTemplate(perspectivePlugin.getPath()); }
public boolean isRuntimePerspective(Plugin plugin) { ClientResourceType type = clientTypeRegistry.resolve(plugin.getPath()); return type != null && type instanceof PerspectiveLayoutPluginResourceType; }
public boolean isRuntimePerspective(Plugin plugin) { ClientResourceType type = clientTypeRegistry.resolve(plugin.getPath()); return type != null && type instanceof PerspectiveLayoutPluginResourceType; }
@Override public LayoutTemplate getLayoutTemplate(Plugin perspectivePlugin) { return getLayoutTemplate(perspectivePlugin.getPath()); }
@Override public LayoutTemplate getLayoutTemplate(Plugin perspectivePlugin) { LayoutEditorModel layoutEditorModel = pluginServices.getLayoutEditor(perspectivePlugin.getPath(), PluginType.PERSPECTIVE_LAYOUT); return layoutServices.convertLayoutFromString(layoutEditorModel.getLayoutEditorModel()); }
@Override public Plugin createNewPerspective(String name, LayoutTemplate.Style style) { Plugin perspectivePlugin = pluginServices.createNewPlugin(name, PluginType.PERSPECTIVE_LAYOUT); LayoutTemplate layoutTemplate = new LayoutTemplate(name, style); saveLayoutTemplate(perspectivePlugin.getPath(), layoutTemplate, "Perspective '" + name + "' check-in"); return perspectivePlugin; }
protected PlaceRequest getPathPlaceRequest(Plugin response) { return new PathPlaceRequest(response.getPath()).addParameter("name", response.getName()); }
@Override public LayoutTemplate getLayoutTemplate(Plugin perspectivePlugin) { LayoutEditorModel layoutEditorModel = pluginServices.getLayoutEditor(perspectivePlugin.getPath(), PluginType.PERSPECTIVE_LAYOUT); return layoutServices.convertLayoutFromString(layoutEditorModel.getLayoutEditorModel()); }
protected PlaceRequest getPathPlaceRequest(Plugin response) { return new PathPlaceRequest(response.getPath()) .addParameter("name", response.getName()); }
@Override public Plugin createNewPerspective(String name, LayoutTemplate.Style style) { Plugin perspectivePlugin = pluginServices.createNewPlugin(name, PluginType.PERSPECTIVE_LAYOUT); LayoutTemplate layoutTemplate = new LayoutTemplate(name, style); saveLayoutTemplate(perspectivePlugin.getPath(), layoutTemplate, "Perspective '" + name + "' check-in"); return perspectivePlugin; }
protected PlaceRequest getPathPlaceRequest(Plugin response) { return new PathPlaceRequest(response.getPath()) .addParameter("name", response.getName()); }
protected PlaceRequest getPathPlaceRequest(Plugin response) { return new PathPlaceRequest(response.getPath()).addParameter("name", response.getName()); }
@Before public void setup() { LayoutEditorModel layoutEditorModel = new LayoutEditorModel("layout", PluginType.PERSPECTIVE_LAYOUT, path2, "").emptyLayout(); when(pluginServices.createNewPlugin(anyString(), any())).thenReturn(plugin); when(plugin.getPath()).thenReturn(path); when(pluginServices.copy(any(), anyString(), anyString())).thenReturn(path2); when(pluginServices.copy(any(), anyString(), any(), anyString())).thenReturn(path2); when(pluginServices.rename(any(), anyString(), anyString())).thenReturn(path2); when(pluginServices.getLayoutEditor(eq(path2), eq(PluginType.PERSPECTIVE_LAYOUT))).thenReturn(layoutEditorModel); perspectiveServices = spy(new PerspectiveServicesImpl(pluginServices, layoutServices, saveAndRenameService)); }
@Before public void setup() { LayoutEditorModel layoutEditorModel = new LayoutEditorModel("layout", PluginType.PERSPECTIVE_LAYOUT, path2, "").emptyLayout(); when(pluginServices.createNewPlugin(anyString(), any())).thenReturn(plugin); when(plugin.getPath()).thenReturn(path); when(pluginServices.copy(any(), anyString(), anyString())).thenReturn(path2); when(pluginServices.copy(any(), anyString(), any(), anyString())).thenReturn(path2); when(pluginServices.rename(any(), anyString(), anyString())).thenReturn(path2); when(pluginServices.getLayoutEditor(eq(path2), eq(PluginType.PERSPECTIVE_LAYOUT))).thenReturn(layoutEditorModel); perspectiveServices = spy(new PerspectiveServicesImpl(pluginServices, layoutServices, saveAndRenameService)); }
public void onPerspectiveClick(Plugin plugin) { PlaceRequest placeRequest = new PathPlaceRequest(plugin.getPath()).addParameter("name", plugin.getName()); placeManager.goTo(placeRequest); }
public void onPerspectiveClick(Plugin plugin) { PlaceRequest placeRequest = new PathPlaceRequest(plugin.getPath()).addParameter("name", plugin.getName()); placeManager.goTo(placeRequest); }
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())); } }
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())); } }
protected void onPlugInRenamed(@Observes final PluginRenamed pluginRenamed) { if (pluginRenamed.getOldPluginName().equals(plugin.getName()) && pluginRenamed.getPlugin().getType().equals(plugin.getType())) { this.plugin = new Plugin(pluginRenamed.getPlugin().getName(), getPluginType(), pluginRenamed.getPlugin().getPath()); changeTitleNotification.fire(new ChangeTitleWidgetEvent(place, getTitleText(), getTitle())); } }
protected void onPlugInRenamed(@Observes final PluginRenamed pluginRenamed) { if (pluginRenamed.getOldPluginName().equals(plugin.getName()) && pluginRenamed.getPlugin().getType().equals(plugin.getType())) { this.plugin = new Plugin(pluginRenamed.getPlugin().getName(), getPluginType(), pluginRenamed.getPlugin().getPath()); changeTitleNotification.fire(new ChangeTitleWidgetEvent(place, getTitleText(), getTitle())); } }