@Test public void testDestroyDiagramDisplayers() { RenderMode renderMode = RenderMode.EDIT_MODE; FormDisplayer firstDisplayer = testRender(getNode(FIRST_ELEMENT_UUID), 1, 1, renderMode); FormDisplayer secondDisplayer = testRender(getNode(SECOND_ELEMENT_UUID), 2, 1, renderMode); formsContainer.clearDiagramDisplayers(GRAPH_UUID); verify(firstDisplayer, times(3)).hide(); verify(view, times(1)).removeDisplayer(firstDisplayer); verify(displayersInstance, times(1)).destroy(firstDisplayer); verify(secondDisplayer, times(2)).hide(); verify(view, times(1)).removeDisplayer(secondDisplayer); verify(displayersInstance, times(1)).destroy(secondDisplayer); }
public void clearDiagramDisplayers(final String graphUuid) { LOGGER.fine("Clearing properties forms for graph: " + graphUuid); List<FormDisplayerKey> keys = formDisplayers.keySet() .stream() .filter(entry -> entry.getGraphUuid().equals(graphUuid)).collect(Collectors.toList()); keys.forEach(this::clearDisplayer); LOGGER.fine("Cleared properties forms for graph: " + graphUuid); }
FormsContainer implements IsElement { public void clearDiagramDisplayers(final String graphUuid) { LOGGER.fine("Clearing properties forms for graph: " + graphUuid); List<FormDisplayerKey> keys = formDisplayers.keySet() .stream() .filter(entry -> entry.getGraphUuid().equals(graphUuid)).collect(Collectors.toList()); keys.forEach(this::clearDisplayer); LOGGER.fine("Cleared properties forms for graph: " + graphUuid); } }
FormsContainer implements IsElement { public void clearDiagramDisplayers(final String graphUuid) { LOGGER.fine("Clearing properties forms for graph: " + graphUuid); List<FormDisplayerKey> keys = formDisplayers.keySet() .stream() .filter(entry -> entry.getGraphUuid().equals(graphUuid)).collect(Collectors.toList()); keys.forEach(this::clearDisplayer); LOGGER.fine("Cleared properties forms for graph: " + graphUuid); } @Inject  FormsContainer(final FormsContainerView view,
                          final @Any ManagedInstance<FormDisplayer> displayersInstance,
                          final Event<FormFieldChanged> formFieldChangedEvent); }
FormsContainer implements IsElement { public void clearDiagramDisplayers(final String graphUuid) { LOGGER.fine("Clearing properties forms for graph: " + graphUuid); List<FormDisplayerKey> keys = formDisplayers.keySet() .stream() .filter(entry -> entry.getGraphUuid().equals(graphUuid)).collect(Collectors.toList()); keys.forEach(this::clearDisplayer); LOGGER.fine("Cleared properties forms for graph: " + graphUuid); } @Inject  FormsContainer(final FormsContainerView view,
                          final @Any ManagedInstance<FormDisplayer> displayersInstance,
                          final Event<FormFieldChanged> formFieldChangedEvent); void render(final String graphUuid,
                       final String domainObjectUUID,
                       final Object domainObject,
                       final Path diagramPath,
                       final FieldChangeHandler changeHandler,
                       final RenderMode renderMode); void clearDiagramDisplayers(final String graphUuid); void clearFormDisplayer(final String graphUuid,
                                   final String elementUid); void flush(String graphUUID, String elementUUID); @Override HTMLElement getElement(); @PreDestroy void destroyAll(); }
FormsContainer implements IsElement { public void clearDiagramDisplayers(final String graphUuid) { LOGGER.fine("Clearing properties forms for graph: " + graphUuid); List<FormDisplayerKey> keys = formDisplayers.keySet() .stream() .filter(entry -> entry.getGraphUuid().equals(graphUuid)).collect(Collectors.toList()); keys.forEach(this::clearDisplayer); LOGGER.fine("Cleared properties forms for graph: " + graphUuid); } @Inject  FormsContainer(final FormsContainerView view,
                          final @Any ManagedInstance<FormDisplayer> displayersInstance,
                          final Event<FormFieldChanged> formFieldChangedEvent); void render(final String graphUuid,
                       final String domainObjectUUID,
                       final Object domainObject,
                       final Path diagramPath,
                       final FieldChangeHandler changeHandler,
                       final RenderMode renderMode); void clearDiagramDisplayers(final String graphUuid); void clearFormDisplayer(final String graphUuid,
                                   final String elementUid); void flush(String graphUUID, String elementUUID); @Override HTMLElement getElement(); @PreDestroy void destroyAll();  }