The Code Context menu item only works on Editor windows so disable it for others.
Attach a file by drag & drop or click to upload