I've seen a few unanswered questions regarding this issue, and was wondering how to solve it.

My RCP has a few perspective, and I'd like to associate each one with different file types.
I have tried doing it via a PartListener, but switching perspectives actually fires a part activation event so that's obviously not the way to go.

How do you go about adding the "switch perspective" association and dialog, like when starting to debug?