You should just be able to inject the MMenuItem
on the method:
@CanExecute
public boolean canExecute(@Optional MMenuItem menuItem);
If the handler is not called from a menu the @Optional
will mean the call will still work and the menu item will be null
.