1 package org
.argeo
.slc
.client
.rcp
;
3 import org
.eclipse
.ui
.application
.IWorkbenchConfigurer
;
4 import org
.eclipse
.ui
.application
.IWorkbenchWindowConfigurer
;
5 import org
.eclipse
.ui
.application
.WorkbenchAdvisor
;
6 import org
.eclipse
.ui
.application
.WorkbenchWindowAdvisor
;
8 /** Implements initial perspective and saveAndRestore status of the workbench. */
9 public class SlcSecureWorkbenchAdvisor
extends WorkbenchAdvisor
{
10 public final static String INITIAL_PERSPECTIVE_PROPERTY
= "org.argeo.security.ui.initialPerspective";
11 private String initialPerspective
= System
12 .getProperty(INITIAL_PERSPECTIVE_PROPERTY
);
13 private String username
;
15 public SlcSecureWorkbenchAdvisor(String username
) {
17 this.username
= username
;
20 public WorkbenchWindowAdvisor
createWorkbenchWindowAdvisor(
21 IWorkbenchWindowConfigurer configurer
) {
22 return new SlcSecureWorkbenchWindowAdvisor(configurer
, username
);
25 public String
getInitialWindowPerspectiveId() {
26 return initialPerspective
;
30 public void initialize(IWorkbenchConfigurer configurer
) {
31 super.initialize(configurer
);
32 // To remember the user's layout and window size for the next time he
33 // starts the application
34 //configurer.setSaveAndRestore(true);