]> git.argeo.org Git - gpl/argeo-slc.git/blob - eclipse/plugins/org.argeo.slc.client.rcp/src/main/java/org/argeo/slc/client/rcp/SlcSecureWorkbenchAdvisor.java
integrate SLC RAP & RCP in secure.ui
[gpl/argeo-slc.git] / eclipse / plugins / org.argeo.slc.client.rcp / src / main / java / org / argeo / slc / client / rcp / SlcSecureWorkbenchAdvisor.java
1 package org.argeo.slc.client.rcp;
2
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;
7
8 /**
9 * implements initial perspective and saveAndRestore status of the workbench.
10 *
11 * @author bsinou
12 *
13 */
14 public class SlcSecureWorkbenchAdvisor extends WorkbenchAdvisor {
15
16 // private static final String PERSPECTIVE_ID =
17 // "org.argeo.slc.client.ui.perspectives.slcExecution";
18 static final String DEFAULT_PERSPECTIVE_ID = "org.argeo.security.ui.securityPerspective"; //$NON-NLS-1$
19
20 public final static String INITIAL_PERSPECTIVE_PROPERTY = "org.argeo.security.ui.initialPerspective";
21 private String initialPerspective = System.getProperty(
22 INITIAL_PERSPECTIVE_PROPERTY, DEFAULT_PERSPECTIVE_ID);
23
24 public WorkbenchWindowAdvisor createWorkbenchWindowAdvisor(
25 IWorkbenchWindowConfigurer configurer) {
26 return new SlcSecureWorkbenchWindowAdvisor(configurer);
27 }
28
29 public String getInitialWindowPerspectiveId() {
30 // return PERSPECTIVE_ID;
31 return initialPerspective;
32 }
33
34 @Override
35 public void initialize(IWorkbenchConfigurer configurer) {
36 super.initialize(configurer);
37
38 // To remember the user's layout and window size for the next time he
39 // starts the application
40 // configurer.setSaveAndRestore(true);
41 }
42 }