@Test() public void testDeregisterDocument() { final TestDocument document = createTestDocument(); final ObservablePath path = document.getLatestPath(); registerDocument(document); editor.deregisterDocument(document); verify(path, times(1)).dispose(); verify(registeredDocumentsMenuBuilder, times(1)).deregisterDocument(document); }
@Override public void deregisterDocument(final D document) { PortablePreconditions.checkNotNull("document", document); if (!documents.contains(document)) { return; } registeredDocumentsMenuBuilder.deregisterDocument(document); document.getLatestPath().dispose(); documents.remove(document); }
KieMultipleDocumentEditor implements KieMultipleDocumentEditorPresenter<D> { @Override public void deregisterDocument(final D document) { PortablePreconditions.checkNotNull("document", document); if (!documents.contains(document)) { return; } registeredDocumentsMenuBuilder.deregisterDocument(document); document.getLatestPath().dispose(); documents.remove(document); } }
KieMultipleDocumentEditor implements KieMultipleDocumentEditorPresenter<D> { @Override public void deregisterDocument(final D document) { PortablePreconditions.checkNotNull("document", document); if (!documents.contains(document)) { return; } registeredDocumentsMenuBuilder.deregisterDocument(document); document.getLatestPath().dispose(); documents.remove(document); } KieMultipleDocumentEditor();  KieMultipleDocumentEditor(final KieEditorView editorView); }
KieMultipleDocumentEditor implements KieMultipleDocumentEditorPresenter<D> { @Override public void deregisterDocument(final D document) { PortablePreconditions.checkNotNull("document", document); if (!documents.contains(document)) { return; } registeredDocumentsMenuBuilder.deregisterDocument(document); document.getLatestPath().dispose(); documents.remove(document); } KieMultipleDocumentEditor();  KieMultipleDocumentEditor(final KieEditorView editorView); @Override void registerDocument(final D document); @Override void deregisterDocument(final D document); @Override void activateDocument(final D document,
                                 final Overview overview,
                                 final AsyncPackageDataModelOracle dmo,
                                 final Imports imports,
                                 final boolean isReadOnly); @Override D getActiveDocument(); @Override IsWidget getWidget(); @Override IsWidget getTitleWidget(final D document); @Override void getMenus(final Consumer<Menus> menusConsumer); @Override void onClose(); @Override void onSourceTabSelected(); @Override void updateSource(final String source); @Override void onEditTabSelected(); @Override void onEditTabUnselected(); @Override void onOverviewSelected(); @Override boolean mayClose(final Integer originalHashCode,
                            final Integer currentHashCode); @Override Promise<Void> makeMenuBar(); }
KieMultipleDocumentEditor implements KieMultipleDocumentEditorPresenter<D> { @Override public void deregisterDocument(final D document) { PortablePreconditions.checkNotNull("document", document); if (!documents.contains(document)) { return; } registeredDocumentsMenuBuilder.deregisterDocument(document); document.getLatestPath().dispose(); documents.remove(document); } KieMultipleDocumentEditor();  KieMultipleDocumentEditor(final KieEditorView editorView); @Override void registerDocument(final D document); @Override void deregisterDocument(final D document); @Override void activateDocument(final D document,
                                 final Overview overview,
                                 final AsyncPackageDataModelOracle dmo,
                                 final Imports imports,
                                 final boolean isReadOnly); @Override D getActiveDocument(); @Override IsWidget getWidget(); @Override IsWidget getTitleWidget(final D document); @Override void getMenus(final Consumer<Menus> menusConsumer); @Override void onClose(); @Override void onSourceTabSelected(); @Override void updateSource(final String source); @Override void onEditTabSelected(); @Override void onEditTabUnselected(); @Override void onOverviewSelected(); @Override boolean mayClose(final Integer originalHashCode,
                            final Integer currentHashCode); @Override Promise<Void> makeMenuBar();  }