use of org.kie.workbench.common.widgets.metadata.client.menu.RegisteredDocumentsMenuView.DocumentMenuItem in project kie-wb-common by kiegroup.
the class RegisteredDocumentsMenuBuilder method makeDocumentMenuItem.
DocumentMenuItem makeDocumentMenuItem(final KieDocument document) {
final DocumentMenuItem documentMenuItem = documentMenuItemProvider.get();
documentMenuItem.setName(document.getCurrentPath().getFileName());
documentMenuItem.setRemoveDocumentCommand(() -> onRemoveDocument(document));
documentMenuItem.setActivateDocumentCommand(() -> onActivateDocument(document));
documentMenuItem.setReadOnly(document.isReadOnly());
return documentMenuItem;
}
use of org.kie.workbench.common.widgets.metadata.client.menu.RegisteredDocumentsMenuView.DocumentMenuItem in project kie-wb-common by kiegroup.
the class RegisteredDocumentsMenuBuilder method registerDocument.
@Override
public void registerDocument(final KieDocument document) {
final DocumentMenuItem documentMenuItem = makeDocumentMenuItem(document);
registeredDocuments.put(document, documentMenuItem);
view.addDocument(documentMenuItem);
}
use of org.kie.workbench.common.widgets.metadata.client.menu.RegisteredDocumentsMenuView.DocumentMenuItem in project kie-wb-common by kiegroup.
the class RegisteredDocumentsMenuBuilder method deregisterDocument.
@Override
public void deregisterDocument(final KieDocument document) {
final DocumentMenuItem documentMenuItem = registeredDocuments.remove(document);
documentMenuItemProvider.destroy(documentMenuItem);
view.deleteDocument(documentMenuItem);
}
Aggregations