]> 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
Improve Maven and RPM Structure
[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 /** 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;
14
15 public SlcSecureWorkbenchAdvisor(String username) {
16 super();
17 this.username = username;
18 }
19
20 public WorkbenchWindowAdvisor createWorkbenchWindowAdvisor(
21 IWorkbenchWindowConfigurer configurer) {
22 return new SlcSecureWorkbenchWindowAdvisor(configurer, username);
23 }
24
25 public String getInitialWindowPerspectiveId() {
26 return initialPerspective;
27 }
28
29 @Override
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);
35 }
36
37 }