@Test public void testGetFactoriesWhenIsNotReadOnlyDiagram() { when(readonlyProvider.isReadOnlyDiagram()).thenReturn(false); tested.getFactories(); verify(commonActionsToolboxFactory).get(); verify(flowActionsToolboxFactory).get(); }
@Override protected List<ActionsToolboxFactory> getFactories() { if (readonlyProvider.isReadOnlyDiagram()) { return Collections.singletonList(commonActionsToolboxFactories.get()); } else { return Arrays.asList(flowActionsToolboxFactories.get(), commonActionsToolboxFactories.get()); } }
DMNToolboxControl extends AbstractToolboxControl { @Override protected List<ActionsToolboxFactory> getFactories() { if (readonlyProvider.isReadOnlyDiagram()) { return Collections.singletonList(commonActionsToolboxFactories.get()); } else { return Arrays.asList(flowActionsToolboxFactories.get(), commonActionsToolboxFactories.get()); } } }
DMNToolboxControl extends AbstractToolboxControl { @Override protected List<ActionsToolboxFactory> getFactories() { if (readonlyProvider.isReadOnlyDiagram()) { return Collections.singletonList(commonActionsToolboxFactories.get()); } else { return Arrays.asList(flowActionsToolboxFactories.get(), commonActionsToolboxFactories.get()); } } @Inject  DMNToolboxControl(final @Any @DMNFlowActionsToolbox ManagedInstance<ActionsToolboxFactory> flowActionsToolboxFactories,
                             final @Any @DMNCommonActionsToolbox ManagedInstance<ActionsToolboxFactory> commonActionsToolboxFactories,
                             final @Any @DMNEditor ReadOnlyProvider readOnlyProvider); }
DMNToolboxControl extends AbstractToolboxControl { @Override protected List<ActionsToolboxFactory> getFactories() { if (readonlyProvider.isReadOnlyDiagram()) { return Collections.singletonList(commonActionsToolboxFactories.get()); } else { return Arrays.asList(flowActionsToolboxFactories.get(), commonActionsToolboxFactories.get()); } } @Inject  DMNToolboxControl(final @Any @DMNFlowActionsToolbox ManagedInstance<ActionsToolboxFactory> flowActionsToolboxFactories,
                             final @Any @DMNCommonActionsToolbox ManagedInstance<ActionsToolboxFactory> commonActionsToolboxFactories,
                             final @Any @DMNEditor ReadOnlyProvider readOnlyProvider); @PreDestroy @Override void destroy(); }
DMNToolboxControl extends AbstractToolboxControl { @Override protected List<ActionsToolboxFactory> getFactories() { if (readonlyProvider.isReadOnlyDiagram()) { return Collections.singletonList(commonActionsToolboxFactories.get()); } else { return Arrays.asList(flowActionsToolboxFactories.get(), commonActionsToolboxFactories.get()); } } @Inject  DMNToolboxControl(final @Any @DMNFlowActionsToolbox ManagedInstance<ActionsToolboxFactory> flowActionsToolboxFactories,
                             final @Any @DMNCommonActionsToolbox ManagedInstance<ActionsToolboxFactory> commonActionsToolboxFactories,
                             final @Any @DMNEditor ReadOnlyProvider readOnlyProvider); @PreDestroy @Override void destroy();  }