title: How to listen to lose focus event of a part in Eclipse E4 RCP?
body: <p>I have multiple views in a perspective, these are shown as tabs. I want to catch the event when I switch from one <code>Part</code> to another (by clicking on the other parts tab). In other words I want to catch the event when a part looses focus. How can I do that in E4?</p>
  
  <p>I have tried <code>IPartListener</code> implementation but its methods are called twice and also too late. For example, if I have parts A and B and part A is in focus, when I click on tab for part B, the <code>@Focus</code> method of part B is called first and then part deactivated (or part hidden) method of <code>IPartListener</code> is called for part A. I do not want that. Also, I have noticed that the <code>partActivated</code> and <code>partDeactivated</code> methods are called twice (for each part), which is also not desireable.</p>
  
  <p>Any help would be greatly appreciated.</p>
  
  <p>Thanks,
  Jehan</p>