X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;ds=inline;f=org.argeo.eclipse.ui.workbench%2Fsrc%2Forg%2Fargeo%2Feclipse%2Fui%2Fworkbench%2Fcommands%2FDumpNode.java;h=4943ccbf35140d6a6b310cebd2f70aa898f96a79;hb=e6d2d877a7208a13c05a9c9a8b67641972f13870;hp=79d807625ab4832a8659979215f28c9735c340b2;hpb=ebc46b310bf1f44c4acbeae3d2ab8c1aeaef5eb5;p=lgpl%2Fargeo-commons.git
diff --git a/org.argeo.eclipse.ui.workbench/src/org/argeo/eclipse/ui/workbench/commands/DumpNode.java b/org.argeo.eclipse.ui.workbench/src/org/argeo/eclipse/ui/workbench/commands/DumpNode.java
index 79d807625..4943ccbf3 100644
--- a/org.argeo.eclipse.ui.workbench/src/org/argeo/eclipse/ui/workbench/commands/DumpNode.java
+++ b/org.argeo.eclipse.ui.workbench/src/org/argeo/eclipse/ui/workbench/commands/DumpNode.java
@@ -27,13 +27,13 @@ import java.util.Map;
import javax.jcr.Node;
import javax.jcr.RepositoryException;
+import javax.jcr.Session;
import org.argeo.ArgeoException;
-import org.argeo.eclipse.ui.specific.OpenFile;
import org.argeo.eclipse.ui.workbench.CommandUtils;
import org.argeo.eclipse.ui.workbench.WorkbenchUiPlugin;
-import org.argeo.jcr.JcrUtils;
import org.argeo.eclipse.ui.workbench.jcr.internal.model.SingleJcrNodeElem;
+import org.argeo.jcr.JcrUtils;
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
@@ -42,13 +42,12 @@ import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.ui.handlers.HandlerUtil;
/**
- * If the method
- * HandlerUtil.getActiveWorkbenchWindow(event).getActivePage().getSelection()
- * exits and has a SingleJcrNodeElem as first element, it canonically calls the
- * JCR Session.exportSystemView() method on the underlying node with both
- * skipBinary & noRecurse boolean flags set to false.
+ * Canonically call JCR {@link Session#exportSystemView()} on the first element
+ * returned by {@link HandlerUtil#getActiveWorkbenchWindow()}
+ * (...getActivePage().getSelection()), if it is a {@link SingleJcrNodeElem},
+ * with both skipBinary & noRecurse boolean flags set to false.
*
- * Resulting stream is saved in a tmp file and opened via the "open file"
+ * Resulting stream is saved in a tmp file and opened via the {@link OpenFile}
* single-sourced command.
*/
public class DumpNode extends AbstractHandler {
@@ -86,8 +85,9 @@ public class DumpNode extends AbstractHandler {
.getTime());
node.getSession().exportSystemView(node.getPath(), fos,
true, false);
- openGeneratedFile(tmpFile.getAbsolutePath(),
- "Dump-" + JcrUtils.replaceInvalidChars(node.getName())+ "-" + dateVal + ".xml");
+ openGeneratedFile(tmpFile.getAbsolutePath(), "Dump-"
+ + JcrUtils.replaceInvalidChars(node.getName())
+ + "-" + dateVal + ".xml");
} catch (RepositoryException e) {
throw new ArgeoException(
"Unable to perform SystemExport on " + node, e);
@@ -104,7 +104,6 @@ public class DumpNode extends AbstractHandler {
Map params = new HashMap();
params.put(OpenFile.PARAM_FILE_NAME, fileName);
params.put(OpenFile.PARAM_FILE_URI, "file://" + path);
- CommandUtils.callCommand("org.argeo.security.ui.specific.openFile",
- params);
+ CommandUtils.callCommand(OpenFile.ID, params);
}
}