X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=org.argeo.eclipse.ui.workbench%2Fsrc%2Forg%2Fargeo%2Feclipse%2Fui%2Fworkbench%2Fjcr%2Finternal%2FGenericNodeDoubleClickListener.java;h=a70d9a52c2a2ec8cb22de47543834bf9d47acf12;hb=ab81a6a1a62b51e670eae7482b1aa9181801cfbd;hp=0a93bce61e4f8a18fe5ea6a7c6ecd0ad9f6a76a8;hpb=21a4ea1fb5380ce1dd763c1ea09067cdd2dfd0f3;p=lgpl%2Fargeo-commons.git diff --git a/org.argeo.eclipse.ui.workbench/src/org/argeo/eclipse/ui/workbench/jcr/internal/GenericNodeDoubleClickListener.java b/org.argeo.eclipse.ui.workbench/src/org/argeo/eclipse/ui/workbench/jcr/internal/GenericNodeDoubleClickListener.java index 0a93bce61..a70d9a52c 100644 --- a/org.argeo.eclipse.ui.workbench/src/org/argeo/eclipse/ui/workbench/jcr/internal/GenericNodeDoubleClickListener.java +++ b/org.argeo.eclipse.ui.workbench/src/org/argeo/eclipse/ui/workbench/jcr/internal/GenericNodeDoubleClickListener.java @@ -20,8 +20,6 @@ import javax.jcr.RepositoryException; import javax.jcr.nodetype.NodeType; import org.argeo.ArgeoException; -import org.argeo.eclipse.ui.jcr.utils.JcrFileProvider; -import org.argeo.eclipse.ui.specific.FileHandler; import org.argeo.eclipse.ui.workbench.WorkbenchUiPlugin; import org.argeo.eclipse.ui.workbench.jcr.DefaultNodeEditor; import org.argeo.eclipse.ui.workbench.jcr.internal.model.RepositoryElem; @@ -34,23 +32,21 @@ import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.TreeViewer; import org.eclipse.ui.PartInitException; -/** - * Centralizes the management of double click on a NodeTreeViewer - */ +/** Centralizes the management of double click on a NodeTreeViewer */ public class GenericNodeDoubleClickListener implements IDoubleClickListener { - // private final static Log log = LogFactory // .getLog(GenericNodeDoubleClickListener.class); private TreeViewer nodeViewer; - private JcrFileProvider jfp; - private FileHandler fileHandler; + + // private JcrFileProvider jfp; + // private FileHandler fileHandler; public GenericNodeDoubleClickListener(TreeViewer nodeViewer) { this.nodeViewer = nodeViewer; - jfp = new JcrFileProvider(); + // jfp = new JcrFileProvider(); // Commented out. see https://www.argeo.org/bugzilla/show_bug.cgi?id=188 - fileHandler = null; + // fileHandler = null; // fileHandler = new FileHandler(jfp); } @@ -78,8 +74,18 @@ public class GenericNodeDoubleClickListener implements IDoubleClickListener { try { if (node.isNodeType(NodeType.NT_FILE)) { // double click on a file node triggers its opening - String name = node.getName(); - String id = node.getIdentifier(); + // String name = node.getName(); + // String id = node.getIdentifier(); + + // TODO add integration of direct retrieval of the binary in + // a JCR repo. + // Map params = new HashMap(); + // params.put(OpenFile.PARAM_FILE_NAME, name); + // params.put(OpenFile.PARAM_FILE_URI, "jcr://" + id); + // CommandUtils + // .callCommand("org.argeo.security.ui.specific.openFile", + // params); // For the file provider to be able to browse the // various @@ -88,9 +94,9 @@ public class GenericNodeDoubleClickListener implements IDoubleClickListener { // ITreeContentProvider itcp = (ITreeContentProvider) // nodeViewer // .getContentProvider(); - jfp.setReferenceNode(node); - if (fileHandler != null) - fileHandler.openFile(name, id); + // jfp.setReferenceNode(node); + // if (fileHandler != null) + // fileHandler.openFile(name, id); } GenericNodeEditorInput gnei = new GenericNodeEditorInput(node); WorkbenchUiPlugin.getDefault().getWorkbench()