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