private static void openResourceWithHandler(IFile file) throws CoreException, DBException {
        DBPResourceHandler handler = DBPPlatformDesktop.getInstance().getWorkspace().getResourceHandler(file);
        if (handler != null) {
            handler.openResource(file);
        } else {
            throw new DBException("Cannot find resource handler for " + file);
        }
    }
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