示例#1
0
 @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);
   }
 }
示例#3
0
 @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);
   }
 }
示例#4
0
 public static SNode addRootNode(SModel model, SNode node) {
   if (model != null && node != null) {
     model.addRootNode(node);
   }
   return node;
 }
示例#5
0
 public static SNode createNewRootNode(SModel model, SConcept concept) {
   SNode newNode = createNewNode(model, null, concept);
   model.addRootNode(newNode);
   return newNode;
 }