Exceute a query in the context of a selected database
It isn't possible to execute a query in the context of a selected(in the Database Explorer) database. When I open a new SQL Editor and execute a query, then the database specified in the connection properties is the context for this query. I think in the context menu of a table should be a new item(New SQL or New Query) which opens a new SQL editor. All queries inside this editor should be executed in the context of the previous selected table.
You can select database in which context to execute from drop-down list on SQL Toolbar.
Dynamically changing the database each time when new query document is opened can be confusing.