]> git.argeo.org Git - lgpl/argeo-commons.git/blobdiff - org.argeo.eclipse.ui.workbench/src/org/argeo/eclipse/ui/workbench/commands/OpenEditor.java
Refactor monitor and exceptions
[lgpl/argeo-commons.git] / org.argeo.eclipse.ui.workbench / src / org / argeo / eclipse / ui / workbench / commands / OpenEditor.java
index 123f089b84d70ee8d0eb0e37b43f72c916adc80b..57ae9f28d6ecd38cf2c72c197bbb5ca6c580b609 100644 (file)
  */
 package org.argeo.eclipse.ui.workbench.commands;
 
-import org.argeo.ArgeoException;
+import javax.jcr.Node;
+
+import org.argeo.eclipse.ui.EclipseUiException;
 import org.argeo.eclipse.ui.workbench.WorkbenchUiPlugin;
-import org.argeo.eclipse.ui.workbench.jcr.GenericJcrQueryEditor;
+import org.argeo.eclipse.ui.workbench.internal.jcr.parts.JcrQueryEditorInput;
+import org.argeo.eclipse.ui.workbench.internal.jcr.parts.NodeEditorInput;
 import org.argeo.eclipse.ui.workbench.jcr.DefaultNodeEditor;
-import org.argeo.eclipse.ui.workbench.jcr.internal.parts.JcrQueryEditorInput;
-import org.argeo.eclipse.ui.workbench.jcr.internal.parts.NodeEditorInput;
+import org.argeo.eclipse.ui.workbench.jcr.GenericJcrQueryEditor;
 import org.eclipse.core.commands.AbstractHandler;
 import org.eclipse.core.commands.ExecutionEvent;
 import org.eclipse.core.commands.ExecutionException;
@@ -28,7 +30,7 @@ import org.eclipse.ui.IWorkbenchPage;
 import org.eclipse.ui.PartInitException;
 import org.eclipse.ui.handlers.HandlerUtil;
 
-/** Opens an editor given its ID. */
+/** Open a {@link Node} editor of a specific type given the node path */
 public class OpenEditor extends AbstractHandler {
        public final static String ID = WorkbenchUiPlugin.ID + ".openEditor";
 
@@ -50,7 +52,7 @@ public class OpenEditor extends AbstractHandler {
                                activePage.openEditor(editorInput, editorId);
                        }
                } catch (PartInitException e) {
-                       throw new ArgeoException("Cannot open editor of ID " + editorId, e);
+                       throw new EclipseUiException("Cannot open editor of ID " + editorId, e);
                }
                return null;
        }