class RegisteredDocumentsMenuBuilder implements MenuFactory.CustomMenuBuilder,
                                                       RegisteredDocumentsMenuView.Presenter {

    @Override
    public void registerDocument(final KieDocument document) {
        final DocumentMenuItem documentMenuItem = makeDocumentMenuItem(document);
        registeredDocuments.put(document,
                                documentMenuItem);
        view.addDocument(documentMenuItem);
    }

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

}