Introduce home workspace.
[lgpl/argeo-commons.git] / org.argeo.cms.e4 / src / org / argeo / cms / e4 / jcr / JcrBrowserView.java
index 7639df459dedc55f3478b9d926b412b58e68fcfb..5b5c3ff8277b1fae722bc3044c82effd77450c1c 100644 (file)
@@ -43,9 +43,11 @@ import org.argeo.eclipse.ui.EclipseUiException;
 import org.argeo.eclipse.ui.TreeParent;
 import org.argeo.eclipse.ui.jcr.AsyncUiEventListener;
 import org.argeo.eclipse.ui.jcr.utils.NodeViewerComparer;
+import org.argeo.jcr.JcrUtils;
 import org.argeo.node.security.CryptoKeyring;
 import org.argeo.node.security.Keyring;
 import org.eclipse.e4.core.contexts.IEclipseContext;
+import org.eclipse.e4.core.di.annotations.Optional;
 import org.eclipse.e4.ui.services.EMenuService;
 import org.eclipse.e4.ui.workbench.modeling.EPartService;
 import org.eclipse.e4.ui.workbench.modeling.ESelectionService;
@@ -78,6 +80,7 @@ public class JcrBrowserView {
 
        /* DEPENDENCY INJECTION */
        @Inject
+       @Optional
        private Keyring keyring;
        @Inject
        private RepositoryFactory repositoryFactory;
@@ -151,6 +154,7 @@ public class JcrBrowserView {
 
        @PreDestroy
        public void dispose() {
+               JcrUtils.logoutQuietly(userSession);
                repositoryRegister.destroy();
        }
 
@@ -278,9 +282,8 @@ public class JcrBrowserView {
        /**
         * Resets the tree content provider
         * 
-        * @param sortChildNodes
-        *            if true the content provider will use a comparer to sort nodes
-        *            that might slow down the display
+        * @param sortChildNodes if true the content provider will use a comparer to
+        *                       sort nodes that might slow down the display
         */
        public void setSortChildNodes(boolean sortChildNodes) {
                this.sortChildNodes = sortChildNodes;