Examples of TemplateImpl


Examples of com.intellij.codeInsight.template.impl.TemplateImpl

    protected void processIntention(@NotNull PsiElement element, Editor editor)
            throws IntentionExecutionException {

        TextRange textRange = statement.getTextRange();

        TemplateImpl template;

        template = TemplateUtil.createTemplate(String.format("%s %s {$END$}", getKeyword(), expr.getText()));

        TemplateUtil.runTemplate(editor, textRange, new ArrayList<String>(), template);
    }
View Full Code Here

Examples of com.intellij.codeInsight.template.impl.TemplateImpl

        if (doc == null) {
            return;
        }

        TemplateImpl template = TemplateUtil.createTemplate(String.format("\n\n%s := func (%s) { \n$v%d$$END$\n}", startElement.getText(), fnArguments, arguments.size()));
        arguments.add("//TODO: implements " + startElement.getText());
        TemplateUtil.runTemplate(editor, insertPoint, arguments, template);
    }
View Full Code Here

Examples of com.intellij.codeInsight.template.impl.TemplateImpl

        }

        for (int i = ids.length; i < expressions.length; i++) {
            sb.append(", $v").append(i).append("$");
        }
        TemplateImpl template = createTemplate(sb.toString());
        for (int i = ids.length; i < expressions.length; i++) {
            template.addVariable("v" + i, "\"C\"", "\"C\"", true);
        }

        editor.getCaretModel().moveToOffset(ids[ids.length - 1].getTextRange().getEndOffset());
        TemplateManager.getInstance(project).startTemplate(editor, "", template);
    }
View Full Code Here

Examples of com.intellij.codeInsight.template.impl.TemplateImpl

            if (i != 0) {
                sb.append(", ");
            }
            sb.append("$v").append(i).append("$");
        }
        TemplateImpl template = createTemplate(sb.toString());
        for (int i = expressions.length; i < ids.length; i++) {
            template.addVariable("v" + i, "\"value\"", "\"value\"", true);
        }

        editor.getCaretModel().moveToOffset(getConstEndOffset(cd));
        TemplateManager.getInstance(project).startTemplate(editor, "", template);
    }
View Full Code Here

Examples of com.intellij.codeInsight.template.impl.TemplateImpl

    }

    private void addConstInitializer(Project project, Editor editor, GoConstDeclaration cd) {
        int length = cd.getIdentifiers().length;
        String text = " = " + getTemplateVariableExpression(length, ", ");
        TemplateImpl template = createTemplate(text);
        template.setToIndent(false);
        for (int i = 0; i < length; i++) {
            template.addVariable("v" + i, "\"value\"", "\"value\"", true);
        }
        editor.getCaretModel().moveToOffset(getConstEndOffset(cd));
        TemplateManager.getInstance(project).startTemplate(editor, "", template);
    }
View Full Code Here

Examples of com.sogou.qadev.service.cynthia.bean.impl.TemplateImpl

  {
    if(templateTypeId == null)
      return null;
   
    UUID templateId = DataAccessFactory.getInstance().newUUID("TEMP");
    Template template =  new TemplateImpl(templateId, templateTypeId);
    return template;
  }
View Full Code Here

Examples of com.sogou.qadev.service.cynthia.bean.impl.TemplateImpl

        else
          xml = rs.getString("xml");
        Document doc = XMLUtil.string2Document(xml, "UTF-8");
        if(doc != null)
        {
          template = new TemplateImpl(doc,rs.getString("create_user"));
        }
      }
    }catch(Exception e)
    {
      e.printStackTrace();
View Full Code Here

Examples of com.sogou.qadev.service.cynthia.bean.impl.TemplateImpl

          System.out.println(rs.getString("name"));
        }
       
        if(doc != null)
        {
          Template template = new TemplateImpl(doc,rs.getString("create_user"));
  //        if (template != null && !ConfigUtil.abandonTemplateIdSet.contains(template.getId().getValue())) {
          if (template != null) {
            templateList.add(template);
          }
        }
View Full Code Here

Examples of org.jclouds.compute.domain.internal.TemplateImpl

        Image image = new ImageBuilder().providerId("ec2").name("test").id("testId").location(location)
              .uri(URI.create("http://node")).operatingSystem(OperatingSystem.builder().description("op").build())
              .description("description").status(Image.Status.AVAILABLE).defaultCredentials(loginCredentials).build();
        Hardware hardware = new HardwareBuilder().providerId("ec2").name("test").id("testId").location(location)
              .uri(URI.create("http://node")).ram(1).hypervisor("xen").build();
        Template template = new TemplateImpl(image, hardware, location, TemplateOptions.NONE);
        throw new RunNodesException("tag" + id, num, template, nodes, executionExceptions, failedNodes);
      }
      return nodes;
    }
View Full Code Here

Examples of org.jclouds.compute.domain.internal.TemplateImpl

        Image image = new ImageBuilder().providerId("ec2").name("test").id("testId").location(location)
              .uri(URI.create("http://node")).operatingSystem(OperatingSystem.builder().description("op").build())
              .description("description").status(Image.Status.AVAILABLE).defaultCredentials(loginCredentials).build();
        Hardware hardware = new HardwareBuilder().providerId("ec2").name("test").id("testId").location(location)
              .uri(URI.create("http://node")).ram(1).hypervisor("xen").build();
        Template template = new TemplateImpl(image, hardware, location, TemplateOptions.NONE);
        throw new RunNodesException("tag" + id, num, template, nodes, executionExceptions, failedNodes);
      }
      return nodes;
    }
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.