Remove 32 bits SWT.
[lgpl/argeo-commons.git] / org.argeo.cms.ui.workbench / src / org / argeo / cms / ui / workbench / jcr / NodeFsBrowserView.java
index 8a0eb5872a3ada71588c95cb4c5436f1e6465902..cba228f2d27f748a56aa92f8669e363cbadcb066 100644 (file)
@@ -18,20 +18,16 @@ package org.argeo.cms.ui.workbench.jcr;
 import java.net.URI;
 import java.nio.file.FileSystem;
 import java.nio.file.Path;
-import java.nio.file.Paths;
 import java.nio.file.spi.FileSystemProvider;
 
 import org.argeo.cms.CmsException;
 import org.argeo.cms.ui.workbench.WorkbenchUiPlugin;
-import org.argeo.eclipse.ui.EclipseUiUtils;
 import org.argeo.eclipse.ui.fs.SimpleFsBrowser;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.ui.part.ViewPart;
 
-/**
- * Browse the node file system.
- */
+/** Browse the node file system. */
 public class NodeFsBrowserView extends ViewPart {
        public final static String ID = WorkbenchUiPlugin.PLUGIN_ID + ".nodeFsBrowserView";
 
@@ -40,18 +36,13 @@ public class NodeFsBrowserView extends ViewPart {
        @Override
        public void createPartControl(Composite parent) {
                try {
-// Display nothing yet
-//                     URI uri = new URI("node:///home");
-//                     FileSystem fileSystem = nodeFileSystemProvider.getFileSystem(uri);
-//                     if(fileSystem==null)
-//                             fileSystem = nodeFileSystemProvider.newFileSystem(uri,null);
-//                     Path nodePath = fileSystem.getPath("/home");
-////                   Path nodePath = Paths.get(uri);
-//                     
-//                     Path path = Paths.get("/");
-//                     SimpleFsBrowser browser = new SimpleFsBrowser(parent, SWT.NO_FOCUS);
-//                     browser.setInput(path, nodePath);
-//                     browser.setLayoutData(EclipseUiUtils.fillAll());
+                       URI uri = new URI("node:///");
+                       FileSystem fileSystem = nodeFileSystemProvider.getFileSystem(uri);
+                       if (fileSystem == null)
+                               fileSystem = nodeFileSystemProvider.newFileSystem(uri, null);
+                       Path nodePath = fileSystem.getPath("~");
+                       SimpleFsBrowser browser = new SimpleFsBrowser(parent, SWT.NO_FOCUS);
+                       browser.setInput(nodePath);
                } catch (Exception e) {
                        throw new CmsException("Cannot open file system browser", e);
                }