Enable/Disable toolbar menu

Hello,
I have added one toolbar in Capella to get selected element information.
but the toolbar is always enabled for selection.
I want to disable the toolbar while the user does not select anything in the project explorer
also, enable only for model element of aird file.

Please help me out to do that.
check below-attached screenshot.
Capture

I want to enable toolbar only for highlighted element and their root element also.

Thanks in advance
best regards,
Rohit.