class RegisteredDocumentsMenuBuilder implements MenuFactory.CustomMenuBuilder,
                                                       RegisteredDocumentsMenuView.Presenter {

    @Override
    public void onRemoveDocument(final KieDocument document) {
        if (isReadOnly) {
            return;
        }
        if (removeDocumentCommand != null) {
            removeDocumentCommand.execute(document);
        }
    }

    @Inject public  RegisteredDocumentsMenuBuilder(final RegisteredDocumentsMenuView view,
                                          final ManagedInstance<DocumentMenuItem> documentMenuItemProvider);

}