public DObjectCreateAction(DObjectRef po, Window owner, int width, int height) { super( IDUtil.childTypeFromId(po.id()).toString(), new ArrayList<ActionPrecondition>(), owner, width, height); _po = po; _o = po.createEmptyChildObject(); preconditions().add(new CanCreatePrecondition(_po)); preconditions().add(new MetaForCreatePrecondition(_o)); if (_o instanceof Subject) { preconditions().add(new SubjectMethodPrecondition(_po)); } }
@Override public String actionName() { return ACTION_NAME + " " + IDUtil.childTypeFromId(_po.id()); }