unclejohn00
unclejohn00

Reputation: 149

Eclipse E4 - UIEvents Mpart Closure/Opening

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

Answers (1)

greg-449
greg-449

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

Related Questions