Exemplo n.º 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;
 }
Exemplo n.º 2
0
 public void insertOrReplace(SNode newNode) {
   if (isNodeInPlace()) {
     SNodeUtil.replaceWithAnother(node, newNode);
   } else {
     model.addRootNode(newNode);
   }
 }
Exemplo n.º 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);
   }
 }
Exemplo n.º 4
0
 public static SNode addRootNode(SModel model, SNode node) {
   if (model != null && node != null) {
     model.addRootNode(node);
   }
   return node;
 }
Exemplo n.º 5
0
 public static SNode createNewRootNode(SModel model, SConcept concept) {
   SNode newNode = createNewNode(model, null, concept);
   model.addRootNode(newNode);
   return newNode;
 }