RuleModellerActionSelectorPopup extends AbstractRuleModellerSelectorPopup { boolean addUpdateNotModify(final boolean previousItemsAdded) { boolean moreItemsAdded = false; List<String> vars = model.getLHSPatternVariables(); if (vars.size() > 0) { if (previousItemsAdded) { choices.addItem(SECTION_SEPARATOR, SECTION_SEPARATOR); } for (Iterator<String> iter = vars.iterator(); iter.hasNext(); ) { final String v = iter.next(); choices.addItem(GuidedRuleEditorResources.CONSTANTS.ChangeFieldValuesOf0(v), "VAR" + v); cmds.put("VAR" + v, new Command() { public void execute() { addActionSetField(v, Integer.parseInt(positionCbo.getValue(positionCbo.getSelectedIndex()))); hide(); } }); moreItemsAdded = true; } } return moreItemsAdded; } RuleModellerActionSelectorPopup(final RuleModel model,
                                           final RuleModeller ruleModeller,
                                           final Collection<RuleModellerActionPlugin> actionPlugins,
                                           final Integer position,
                                           final AsyncPackageDataModelOracle oracle); @Override Widget getContent(); @Override void show();  }
@Test public void checkAddUpdateNotModifyGetsPatternBindings() { popup.addUpdateNotModify(false); verify(model).getLHSPatternVariables(); }