@Test public void testEnterGraphView() { toolbarStateHandler.enterGridView(); toolbarStateHandler.enterGraphView(); verify(editorMenuSessionItems).setItemEnabled(ClearSessionCommand.class, true); verify(editorMenuSessionItems).setItemEnabled(SwitchGridSessionCommand.class, true); verify(editorMenuSessionItems).setItemEnabled(VisitGraphSessionCommand.class, true); verify(editorMenuSessionItems).setItemEnabled(DeleteSelectionSessionCommand.class, true); verify(editorMenuSessionItems).setItemEnabled(CutSelectionSessionCommand.class, true); verify(editorMenuSessionItems).setItemEnabled(CopySelectionSessionCommand.class, true); verify(editorMenuSessionItems).setItemEnabled(PasteSelectionSessionCommand.class, true); }
@Override public void enterGraphView() { commandStates.entrySet().forEach(entry -> { final Class<? extends ClientSessionCommand> command = entry.getKey(); projectEditorMenuSessionItems.setItemEnabled(command, entry.getValue()); }); }
DMNProjectToolbarStateHandler implements ToolbarStateHandler { @Override public void enterGraphView() { commandStates.entrySet().forEach(entry -> { final Class<? extends ClientSessionCommand> command = entry.getKey(); projectEditorMenuSessionItems.setItemEnabled(command, entry.getValue()); }); } }
DMNProjectToolbarStateHandler implements ToolbarStateHandler { @Override public void enterGraphView() { commandStates.entrySet().forEach(entry -> { final Class<? extends ClientSessionCommand> command = entry.getKey(); projectEditorMenuSessionItems.setItemEnabled(command, entry.getValue()); }); } @SuppressWarnings("unchecked")  DMNProjectToolbarStateHandler(final AbstractDiagramEditorMenuSessionItems projectEditorMenuSessionItems); }
DMNProjectToolbarStateHandler implements ToolbarStateHandler { @Override public void enterGraphView() { commandStates.entrySet().forEach(entry -> { final Class<? extends ClientSessionCommand> command = entry.getKey(); projectEditorMenuSessionItems.setItemEnabled(command, entry.getValue()); }); } @SuppressWarnings("unchecked")  DMNProjectToolbarStateHandler(final AbstractDiagramEditorMenuSessionItems projectEditorMenuSessionItems); @Override void enterGridView(); @Override void enterGraphView(); }
DMNProjectToolbarStateHandler implements ToolbarStateHandler { @Override public void enterGraphView() { commandStates.entrySet().forEach(entry -> { final Class<? extends ClientSessionCommand> command = entry.getKey(); projectEditorMenuSessionItems.setItemEnabled(command, entry.getValue()); }); } @SuppressWarnings("unchecked")  DMNProjectToolbarStateHandler(final AbstractDiagramEditorMenuSessionItems projectEditorMenuSessionItems); @Override void enterGridView(); @Override void enterGraphView();  }