Reputation: 149
Does somebody know if there's a UIEvents which tracks the closure/opening of a MPart?
Just to remark it, I don't need a @PreDestroy method. I have some actions to perform outside the MPart's class.
Thanks
Upvotes: 1
Views: 227
Reputation: 111217
Rather than UIEvents
use the EPartService
IPartListener
:
@Inject
EPartService partService;
partService.addPartListener(listener);
The IPartListener
has methods called for all major changes to parts.
Note: This is org.eclipse.e4.ui.workbench.modeling.IPartListener
not org.eclipse.ui.IPartListener
Upvotes: 1