public void realizeParent(CompoundCommand tgtCmd) { // logger.info("realizeParent: " + this); // logger.info(this.getClass().getName() + " .realizeParent() - parent: " + parent // + " / findEditPart(parent): " + findEditPart(parent)); if (getModel() instanceof DerivedArtifact) return; final Artifact parentArt = getArtifact().getArt().queryParentArtifact(getBrowseModel().getRepo()); if (parentArt == null) return; final ReloController rc = getRootController(); ArtifactEditPart parentEP = (ArtifactEditPart) findEditPart(parentArt); if (parentEP != null) { parentEP.assertParenthood(tgtCmd); return; } if (!rc.artCreatable(parentArt)) return; // check if browse model will allow // parentEP = null and it is creatable tgtCmd.add(new CreateParentCommand(this, "create parent and assert parenthood", parentArt, rc)); return; }
/** Asserts parenthood for this AEP */ public void assertParenthood() { CompoundCommand cc = new CompoundCommand(); assertParenthood(cc); cc.execute(); }