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
;
9 * implements initial perspective and saveAndRestore status of the workbench.
14 public class SlcSecureWorkbenchAdvisor
extends WorkbenchAdvisor
{
15 // private static final String PERSPECTIVE_ID =
16 // "org.argeo.slc.client.ui.perspectives.slcExecution";
17 static final String DEFAULT_PERSPECTIVE_ID
= "org.argeo.security.ui.securityPerspective"; //$NON-NLS-1$
19 public final static String INITIAL_PERSPECTIVE_PROPERTY
= "org.argeo.security.ui.initialPerspective";
20 private String initialPerspective
= System
.getProperty(
21 INITIAL_PERSPECTIVE_PROPERTY
, DEFAULT_PERSPECTIVE_ID
);
22 private String username
;
24 public SlcSecureWorkbenchAdvisor(String username
) {
26 this.username
= username
;
29 public WorkbenchWindowAdvisor
createWorkbenchWindowAdvisor(
30 IWorkbenchWindowConfigurer configurer
) {
31 return new SlcSecureWorkbenchWindowAdvisor(configurer
, username
);
34 public String
getInitialWindowPerspectiveId() {
35 // return PERSPECTIVE_ID;
36 return initialPerspective
;
40 public void initialize(IWorkbenchConfigurer configurer
) {
41 super.initialize(configurer
);
42 // To remember the user's layout and window size for the next time he
43 // starts the application
44 // configurer.setSaveAndRestore(true);