Showing a selected node property in a plugin

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By TheRadMatt

How can I show f.e name of a node (selected in the current scene tree) in the plugin?

What I want to do is to put a label with a node’s name in a custom dock and update it everytime I select a node.