Similar issue to occurs in tests a lot. If the Output pane has focus, we fail to correctly detect the active editor, and therefore prompt for which project to add dependencies to when it seems like we should infer it.
We should detect this case, and if there's a single open editor (that isn't the "active" one), use that.