private static void addDatabaseNodeCreateItems(@Nullable IWorkbenchPartSite site, List<IContributionItem> createActions, DBNDatabaseNode node) {
        if (node instanceof DBNDatabaseFolder) {
            DBXTreeFolder folderMeta = ((DBNDatabaseFolder) node).getMeta();
            final List<DBXTreeNode> metaChildren = folderMeta.getChildren(node);
            if (!CommonUtils.isEmpty(metaChildren)) {
                // Test direct child node items
                Class<?> nodeClass = null;
                if (metaChildren.size() == 1 && metaChildren.get(0) instanceof DBXTreeItem) {
                    nodeClass = node.getChildrenClass((DBXTreeItem)metaChildren.get(0));
                }
                {
                    Class<?> childrenClass = ((DBNDatabaseFolder) node).getChildrenClass();
                    if (nodeClass == null || (childrenClass != null && nodeClass.isAssignableFrom(childrenClass))) {
                        // folder.getChildrenClass may return more precise type than node.getChildrenClass
                        nodeClass = childrenClass;
                    }
                }
                if (nodeClass == null) {
                    nodeClass = ((DBNDatabaseFolder) node).getChildrenClass();
                }
                String nodeType = metaChildren.get(0).getChildrenTypeLabel(node.getDataSource(), null);
                if (nodeClass != null && nodeType != null) {
                    if (isCreateSupported(node, nodeClass)) {
                        DBPImage nodeIcon = node.getNodeIconDefault();//metaChildren.get(0).getIcon(node);
                        IContributionItem item = makeCreateContributionItem(
                            site, nodeClass.getName(), nodeType, nodeIcon, false);
                        createActions.add(item);
                    }
                }
            }
            // Test explicit create types
            DBXTreeFolder.ItemType[] itemTypes = folderMeta.getItemTypes();
            if (itemTypes != null) {
                for (DBXTreeFolder.ItemType itemType : itemTypes) {
                    Class<Object> itemClass = folderMeta.getSource().getObjectClass(itemType.getClassName(), Object.class);
                    if (itemClass != null) {
                        if (isCreateSupported(node, itemClass)) {
                            IContributionItem item = makeCreateContributionItem(
                                site, itemType.getClassName(), itemType.getItemType(), itemType.getItemIcon(), false);
                            createActions.add(item);
                        }
                    }
                }
            }

        } else {
            if (node.getObject() == null) {
                return;
            }
            Class<?> nodeItemClass = node.getObject().getClass();
            if (nodeItemClass == DataSourceDescriptor.class) {
                // Use interface instead of implementation.
                // Otherwise ClassNotFoundException may happen
                nodeItemClass = DBPDataSourceContainer.class;
            }
            DBNNode parentNode = node.getParentNode();
            if (isCreateSupported(
                parentNode,
                nodeItemClass))
            {
                if (site == null) {
                    createActions.add(DUMMY_CONTRIBUTION_ITEM);
                } else {
                    DBPImage nodeIcon = node instanceof DBNDataSource ?
                        UIIcon.SQL_NEW_CONNECTION : node.getNodeIconDefault();
                    createActions.add(
                        makeCreateContributionItem(
                            site, nodeItemClass.getName(), node.getNodeTypeLabel(), nodeIcon, false));
                }
            }

            if (!node.getDataSourceContainer().hasModifyPermission(DBPDataSourcePermission.PERMISSION_EDIT_METADATA)) {
                // Do not add child folders
                return;
            }

            if (site != null) {
                // Now add all child folders
                createActions.add(new Separator());
            }

            List<DBXTreeNode> childNodeMetas = node.getMeta().getChildren(node);
            if (!CommonUtils.isEmpty(childNodeMetas)) {
                for (DBXTreeNode childMeta : childNodeMetas) {
                    if (childMeta instanceof DBXTreeFolder) {
                        List<DBXTreeNode> folderChildMeta = childMeta.getChildren(node);
                        if (!CommonUtils.isEmpty(folderChildMeta) && folderChildMeta.size() == 1 && folderChildMeta.get(0) instanceof DBXTreeItem) {
                            addChildNodeCreateItem(site, createActions, node, (DBXTreeItem) folderChildMeta.get(0));
                        }
                    } else if (childMeta instanceof DBXTreeItem) {
                        addChildNodeCreateItem(site, createActions, node, (DBXTreeItem) childMeta);
                    }
                }
            }
        }
    }
Sorry, this is a bit over-complicated handler. Historical reasons.
It can create object of specified type (in parameters) or for current selection.
Dynamic menu "Create" fills elements with parameters. Direct contribution of create command will create nearest
object type according to navigator selection.
plugins/org.jkiss.dbeaver.ui.navigator/src/org/jkiss/dbeaver/ui/navigator/actions/NavigatorHandlerObjectCreateNew.java