/** * Create workspace selection action workspace selection action. * * @param workspaceName * the workspace name * @param workspaceViewDescriptor * the workspace view descriptor * @return the workspace selection action */ protected WorkspaceSelectionAction<E, F, G> createWorkspaceSelectionAction(String workspaceName, IViewDescriptor workspaceViewDescriptor) { WorkspaceSelectionAction<E, F, G> workspaceSelectionAction = new WorkspaceSelectionAction<>(); workspaceSelectionAction.setWorkspaceName(workspaceName); workspaceSelectionAction.setName(workspaceViewDescriptor.getName()); workspaceSelectionAction.setDescription(workspaceViewDescriptor.getDescription()); workspaceSelectionAction.setIcon(workspaceViewDescriptor.getIcon()); return workspaceSelectionAction; }
/** * Displays the workspace. * <p> * {@inheritDoc} */ @Override public boolean execute(IActionHandler actionHandler, Map<String, Object> context) { if (forceReselection) { getController(context).displayWorkspace(null); } getController(context).displayWorkspace(workspaceName); return super.execute(actionHandler, context); }
@Override protected WorkspaceSelectionAction<RComponent, RIcon, RAction> createWorkspaceSelectionAction(String workspaceName, IViewDescriptor workspaceViewDescriptor) { WorkspaceSelectionAction<RComponent, RIcon, RAction> workspaceSelectionAction = super .createWorkspaceSelectionAction(workspaceName, workspaceViewDescriptor); workspaceSelectionAction.setForceReselection(getClientType() == EClientType.MOBILE_HTML5_PHONE); return workspaceSelectionAction; } }