Package com.intellij.codeInsight.template

Examples of com.intellij.codeInsight.template.TemplateBuilder.run()


                               firstStatement.getText().substring(pendingRange.getStartOffset(), pendingRange.getEndOffset()));
      }

      final PsiDocumentManager documentManager = PsiDocumentManager.getInstance(project);
      documentManager.doPostponedOperationsAndUnblockDocument(editor.getDocument());
      builder.run(editor, false);
    }

    return true;
  }
View Full Code Here


          for (TextRange groupRange : ranges) {
            final TextRange shiftedRange = groupRange.shiftRight(off);
            final String matchedText = shiftedRange.substring(stepText);
            builder.replaceRange(shiftedRange, matchedText);
          }
          builder.run(context.getEditor(), false);
        }
      }
    }
  }
}
View Full Code Here

                TemplateBuilder templateBuilder = TemplateBuilderFactory.getInstance().createTemplateBuilder(spec);
                Collection<ErlangTopType> types = PsiTreeUtil.findChildrenOfType(spec, ErlangTopType.class);
                for (ErlangTopType type : types) {
                  templateBuilder.replaceElement(type, type.getText());
                }
                templateBuilder.run(editor, false);
              }
            });
          }
        }, "Generate spec template editor", null);
      }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.