MIDRASH TEHILLIM
... a song of dedication of the House, of David.
1.....(30.1)
Rabbi Chisda said, There is no difference of opinion that the sanctuary below is the counterpart of the sanctuary above, for the verse - "You, LORD, have made it a place [MKWN - makon] of Your dwelling..." (Shemot - Exodus 15:17), you are to read not MAKON - a place for, but MAKUWAN - a counterpart of.
Because the two are counterparts, said Rabbi Acha, debir in the verse - "When I lift up my hands toward Your holy oracle [DEBIR] (Tehillim 28:2)", means literally the place out of which revelations (dibberot) go forth to the world, as is said: "...out of Zion shall the Torah come forth... (Michah 4:2)".
1.....(30.2)
These words are to be considered in the light of the words: "Who came to meet Me? I will pay [his reward]..." (Iyov - Job 41:3).
Who thought in his heart to do a mitzvah before Me and I did not reward him for it?
Who performed a commandment and I did not give him the reward before he even did it?
Whoever thought in his heart to do a mitzvah, but did not do it, I credit him as if he did it.
Thus David had only to think of building the Holy Temple and it is named after him.