]> git.argeo.org Git - lgpl/argeo-commons.git/blobdiff - security/plugins/org.argeo.security.ui.rcp/src/main/java/org/argeo/security/ui/rcp/SecureWorkbenchAdvisor.java
Add dep folder
[lgpl/argeo-commons.git] / security / plugins / org.argeo.security.ui.rcp / src / main / java / org / argeo / security / ui / rcp / SecureWorkbenchAdvisor.java
index e0c3ecd2ba8444331d6a2b76413722af70e8b0d7..33b781ee5396d6f7eeacced4b476a3ef7a485b7d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2007-2012 Mathieu Baudier
+ * Copyright (C) 2007-2012 Argeo GmbH
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -27,6 +27,8 @@ import org.eclipse.ui.application.WorkbenchWindowAdvisor;
  */
 public class SecureWorkbenchAdvisor extends WorkbenchAdvisor {
        public final static String INITIAL_PERSPECTIVE_PROPERTY = "org.argeo.security.ui.initialPerspective";
+       public final static String SAVE_AND_RESTORE_PROPERTY = "org.argeo.security.ui.saveAndRestore";
+
        private String initialPerspective = System.getProperty(
                        INITIAL_PERSPECTIVE_PROPERTY, null);
 
@@ -39,7 +41,9 @@ public class SecureWorkbenchAdvisor extends WorkbenchAdvisor {
        @Override
        public void initialize(final IWorkbenchConfigurer configurer) {
                super.initialize(configurer);
-               configurer.setSaveAndRestore(true);
+               Boolean saveAndRestore = Boolean.parseBoolean(System.getProperty(
+                               SAVE_AND_RESTORE_PROPERTY, "true"));
+               configurer.setSaveAndRestore(saveAndRestore);
        }
 
        public WorkbenchWindowAdvisor createWorkbenchWindowAdvisor(