@Override public boolean test(Object receiver, String property, Object[] args, Object expectedValue) { if (Activator.getDefault().TRACE_PROPERTY_TESTERS) { LogUtils.debug(this, Constants.PREFIX + property + "(" + receiver + ")"); } if (!(receiver instanceof IManager)) { LogUtils.error(this, "Receiver not IManager: " + receiver); return false; } if (Constants.PROPERTY_CAN_UNDO.equals(property)) return EditingDomainUtils.getCommandStack().canUndo(); if (Constants.PROPERTY_CAN_REDO.equals(property)) return EditingDomainUtils.getCommandStack().canRedo(); if (Constants.PROPERTY_IS_SAVE_NEEDED.equals(property)) return EditingDomainUtils.getCommandStack().isSaveNeeded(); return false; }
private void createModel() { myTestGrid = createTestGrid(); myModel = new TestGridGridModel( EditingDomainUtils.getEditingDomain(), myTestGrid, TestModelPackage.Literals.TEST_GRID_CELL__DETAILS, null); myCellA1 = myTestGrid.getColumns().get(0).getCells().get(0); myCellB1 = myTestGrid.getColumns().get(1).getCells().get(0); myCellC1 = myTestGrid.getColumns().get(2).getCells().get(0); myCellA2 = myTestGrid.getColumns().get(0).getCells().get(1); }