public static void openNavigatorNode(Object node, IWorkbenchWindow window, Map<?, ?> parameters) {
        try {
            if (node instanceof DBNResource resource) {
                DBPResourceHandler resourceHandler = resource.getHandler();
                resourceHandler.openResource(resource.getResource());
            } else if (node instanceof DBNPathBase dbnPath) {
                if (!EditorUtils.openExternalFiles(new Path[]{ dbnPath.getPath() }, null)) {
                    // Try resource handler
                    IResource resource = dbnPath.getAdapter(IResource.class);
                    if (resource instanceof IFile file) {
                        openResourceWithHandler(file);
                    } else {
                        openEntityEditor(node, window, parameters);
                    }
                }
            } else if (node instanceof DBNNode baseNode && baseNode.allowsOpen()) {
                openEntityEditor(node, window, parameters);
            } else {
                throw new DBException("Do not know how to open node '" + node + "'");
            }
        } catch (Exception e) {
            DBWorkbench.getPlatformUI().showError(
                "Error opening object",
                "Error while opening object '" + node + "'",
                e);
        }
    }
Find selected node for specified UI element
@param element ui element
@return node or null
plugins/org.jkiss.dbeaver.ui.navigator/src/org/jkiss/dbeaver/ui/navigator/NavigatorUtils.java