I have created a context menu item for Build, but it doesn't work on a selection, just builds the whole file.
So if right-clicking empty space in file -> Build, it builds whole file.
If right-clicking selection in file -> Build, it builds whole file also.
Whereas using keyboard shortcut (Ctrl+b) works as intended.