@Override public SNode createDeclaration(ClassInfo ci) { String classname = ci.getDeclarationClass().getName(); String name = this.myNamesMap.getNameForClass(ci.getDeclarationClass()); if (ci.isInterface()) { SNode decl = Generator.GENERATOR.createInterfaceDeclaration(name, classname, ci.isDeprecated()); myModel.addRootNode(decl); return decl; } SNode decl = Generator.GENERATOR.createDeclaration( name, classname, ci.isAbstract(), ci.canHaveInternalText(), ci.isDeprecated()); myModel.addRootNode(decl); return decl; }
public void insertOrReplace(SNode newNode) { if (isNodeInPlace()) { SNodeUtil.replaceWithAnother(node, newNode); } else { model.addRootNode(newNode); } }
@Override protected void doExecute(AnActionEvent e, Map<String, Object> params) { SNode result = NodeFactoryManager.createNode(myConcept, null, null, myModel); myModel.addRootNode(result); if (myNewRootCallback != null) { myNewRootCallback.set(result); } }
public static SNode addRootNode(SModel model, SNode node) { if (model != null && node != null) { model.addRootNode(node); } return node; }
public static SNode createNewRootNode(SModel model, SConcept concept) { SNode newNode = createNewNode(model, null, concept); model.addRootNode(newNode); return newNode; }