@Test @SuppressWarnings("unchecked") public void testGetActionsForSupportedNode() { element.setContent(new ViewImpl<>(new UserTask(), Bounds.create())); final Collection<ToolboxAction<AbstractCanvasHandler>> actions = tested.getActions(canvasHandler, element); assertEquals(2, actions.size()); assertTrue(actions.contains(action1)); assertTrue(actions.contains(formGenerationToolboxAction)); }
@Override public Collection<ToolboxAction<AbstractCanvasHandler>> getActions(final AbstractCanvasHandler canvasHandler, final Element<?> e) { final List<ToolboxAction<AbstractCanvasHandler>> actions = new LinkedList<>(); actions.addAll(commonActionToolbox.getActions(canvasHandler, e)); if (BPMNFormsContextUtils.isFormGenerationSupported(e)) { actions.add(generateFormsActions.get()); } return actions; }
BPMNProjectActionsToolboxFactory extends AbstractActionsToolboxFactory { @Override public Collection<ToolboxAction<AbstractCanvasHandler>> getActions(final AbstractCanvasHandler canvasHandler, final Element<?> e) { final List<ToolboxAction<AbstractCanvasHandler>> actions = new LinkedList<>(); actions.addAll(commonActionToolbox.getActions(canvasHandler, e)); if (BPMNFormsContextUtils.isFormGenerationSupported(e)) { actions.add(generateFormsActions.get()); } return actions; } }
BPMNProjectActionsToolboxFactory extends AbstractActionsToolboxFactory { @Override public Collection<ToolboxAction<AbstractCanvasHandler>> getActions(final AbstractCanvasHandler canvasHandler, final Element<?> e) { final List<ToolboxAction<AbstractCanvasHandler>> actions = new LinkedList<>(); actions.addAll(commonActionToolbox.getActions(canvasHandler, e)); if (BPMNFormsContextUtils.isFormGenerationSupported(e)) { actions.add(generateFormsActions.get()); } return actions; } @Inject  BPMNProjectActionsToolboxFactory(final @CommonActionsToolbox ActionsToolboxFactory commonActionToolbox,
                                            final @Any ManagedInstance<FormGenerationToolboxAction> generateFormsActions,
                                            final @Any @CommonActionsToolbox ManagedInstance<ActionsToolboxView> views); }
BPMNProjectActionsToolboxFactory extends AbstractActionsToolboxFactory { @Override public Collection<ToolboxAction<AbstractCanvasHandler>> getActions(final AbstractCanvasHandler canvasHandler, final Element<?> e) { final List<ToolboxAction<AbstractCanvasHandler>> actions = new LinkedList<>(); actions.addAll(commonActionToolbox.getActions(canvasHandler, e)); if (BPMNFormsContextUtils.isFormGenerationSupported(e)) { actions.add(generateFormsActions.get()); } return actions; } @Inject  BPMNProjectActionsToolboxFactory(final @CommonActionsToolbox ActionsToolboxFactory commonActionToolbox,
                                            final @Any ManagedInstance<FormGenerationToolboxAction> generateFormsActions,
                                            final @Any @CommonActionsToolbox ManagedInstance<ActionsToolboxView> views); @Override Collection<ToolboxAction<AbstractCanvasHandler>> getActions(final AbstractCanvasHandler canvasHandler,
                                                                       final Element<?> e); @PreDestroy void destroy(); }
BPMNProjectActionsToolboxFactory extends AbstractActionsToolboxFactory { @Override public Collection<ToolboxAction<AbstractCanvasHandler>> getActions(final AbstractCanvasHandler canvasHandler, final Element<?> e) { final List<ToolboxAction<AbstractCanvasHandler>> actions = new LinkedList<>(); actions.addAll(commonActionToolbox.getActions(canvasHandler, e)); if (BPMNFormsContextUtils.isFormGenerationSupported(e)) { actions.add(generateFormsActions.get()); } return actions; } @Inject  BPMNProjectActionsToolboxFactory(final @CommonActionsToolbox ActionsToolboxFactory commonActionToolbox,
                                            final @Any ManagedInstance<FormGenerationToolboxAction> generateFormsActions,
                                            final @Any @CommonActionsToolbox ManagedInstance<ActionsToolboxView> views); @Override Collection<ToolboxAction<AbstractCanvasHandler>> getActions(final AbstractCanvasHandler canvasHandler,
                                                                       final Element<?> e); @PreDestroy void destroy();  }