Rambam codifies that the blessing over fruit of the tree is 'Borei Pri HaEtz,' and that if one is uncertain whether a plant is a tree or a ground plant, one recites 'Borei Pri HaAdamah,' which covers both cases.
יְרָקוֹת שֶׁדַּרְכָּן לְהִשָּׁלֵק שְׁלָקָן מְבָרֵךְ עַל מֵי שֶׁלֶק שֶׁלָּהֶן בּוֹרֵא פְּרִי הָאֲדָמָה. וְהוּא שֶׁשְּׁלָקָן לִשְׁתּוֹת מֵימֵיהֶן שֶׁמֵּימֵי הַשְּׁלָקוֹת כִּשְׁלָקוֹת בְּמָקוֹם שֶׁדַּרְכָּן לִשְׁתּוֹתָן. דְּבַשׁ תְּמָרִים מְבָרְכִין עָלָיו תְּחִלָּה שֶׁהַכֹּל. אֲבָל תְּמָרִים שֶׁמְּעָכָן בַּיָּד וְהוֹצִיא גַּרְעִינִין שֶׁלָּהֶן וַעֲשָׂאָן כְּמוֹ עִסָּה מְבָרֵךְ עֲלֵיהֶן תְּחִלָּה בּוֹרֵא פְּרִי הָעֵץ וּלְבַסּוֹף בְּרָכָה אַחַת מֵעֵין שָׁלֹשׁ: הַקָּנִים הַמְּתוּקִים שֶׁסּוֹחֲטִין אוֹתָן וּמְבַשְּׁלִין מֵימֵיהֶן עַד שֶׁיִּקְפָּא וְיִדְמֶה לְמֶלַח. כָּל הַגְּאוֹנִים אוֹמְרִים שֶׁמְּבָרְכִין עָלָיו בּוֹרֵא פְּרִי הָאֲדָמָה. וּמִקְצָתָם אָמְרוּ בּוֹרֵא פְּרִי הָעֵץ. וְכֵן אָמְרוּ שֶׁהַמּוֹצֵץ אוֹתָם קָנִים מְבָרֵךְ בּוֹרֵא פְּרִי הָאֲדָמָה. וַאֲנִי אוֹמֵר שֶׁאֵין זֶה פְּרִי וְאֵין מְבָרְכִין עָלָיו אֶלָּא שֶׁהַכֹּל. שֶׁלֹּא יִהְיֶה דְּבַשׁ אֵלּוּ הַקָּנִים שֶׁנִּשְׁתַּנָּה עַל יְדֵי אוּר גָּדוֹל מִדְּבַשׁ תְּמָרִים שֶׁלֹּא נִשְׁתַּנָּה עַל יְדֵי הָאוּר וּמְבָרְכִין עָלָיו שֶׁהַכֹּל:
When one stews vegetables that are frequently stewed, one should recite the blessing borey pri ha'adamah on the soup produced, because the soup produced by stewing is equivalent to [the vegetables] that are stewed if it is common custom to stew them. This applies only when one stews them to drink the soup. The blessing shehakol is recited over date-honey. Nevertheless, when one crushes dates by hand, removes their pits, and makes them into a substance resembling a dough, one should recite the blessing borey pri ha'etz beforehand and the single blessing that includes the three [blessings of grace] afterward. Regarding sugar cane whose sap is extracted and cooked until it crystallizes like salt: The overwhelming majority of the Geonim require that the blessing borey pri ha'adamah is recited upon it. Others say that the blessing borey pri ha'etz should be recited upon it. Similarly, they say that one who sucks sugar cane should recite the blessing borey pri ha'adamah. I say that this is not a fruit, and the blessing shehakol should be recited upon it. The "honey" produced by these canes that has been altered by fire should not be given greater prominence than date honey, which is not changed by fire, and yet the blessing shehakol is recited upon it.