Java 类com.intellij.util.xml.actions.generate.DomTemplateRunner 实例源码

项目:intellij-ce-playground    文件:CreateClassMappingAction.java   
@Nullable
protected DomElement createElement(final T context,
                                   final Editor editor,
                                   final PsiFile file,
                                   final Project project,
                                   PsiClass selectedClass) {
  final Map<String,String> map = new HashMap<String, String>();
  map.put("CLASS_NAME", selectedClass.getQualifiedName());
  new WriteCommandAction.Simple(project, file) {
    @Override
    protected void run() throws Throwable {
      DomTemplateRunner.getInstance(project).runTemplate(createElement(context), myTemplate, editor, map);
    }
  }.execute();
  return null;
}
项目:tools-idea    文件:CreateClassMappingAction.java   
@Nullable
protected DomElement createElement(final T context,
                                   final Editor editor,
                                   final PsiFile file,
                                   final Project project,
                                   PsiClass selectedClass) {
  final Map<String,String> map = new HashMap<String, String>();
  map.put("CLASS_NAME", selectedClass.getQualifiedName());
  new WriteCommandAction.Simple(project, file) {
    @Override
    protected void run() throws Throwable {
      DomTemplateRunner.getInstance(project).runTemplate(createElement(context), myTemplate, editor, map);
    }
  }.execute();
  return null;
}
项目:consulo-java    文件:CreateClassMappingAction.java   
@Nullable
protected DomElement createElement(final T context,
                                   final Editor editor,
                                   final PsiFile file,
                                   final Project project,
                                   PsiClass selectedClass) {
  final Map<String,String> map = new HashMap<String, String>();
  map.put("CLASS_NAME", selectedClass.getQualifiedName());
  new WriteCommandAction.Simple(project, file) {
    @Override
    protected void run() throws Throwable {
      DomTemplateRunner.getInstance(project).runTemplate(createElement(context), myTemplate, editor, map);
    }
  }.execute();
  return null;
}