Package org.eclipse.jface.text.templates

Examples of org.eclipse.jface.text.templates.TemplateContext.evaluate()


                final Template template = getTemplate();
                if (context instanceof ErlangTemplateContext) {
                    final ErlangTemplateContext etc = (ErlangTemplateContext) context;
                    templateBuffer = etc.evaluate(template, true);
                } else {
                    templateBuffer = context.evaluate(template);
                }
            } catch (final TemplateException e) {
                return null;
            }
            return templateBuffer.getString();
View Full Code Here


    if (template != null) {
      TemplateContextType contextType = JSPUIPlugin.getDefault().getTemplateContextRegistry().getContextType(TemplateContextTypeIdsJSP.NEW_TAG);
      IDocument document = new Document();
      TemplateContext context = new DocumentTemplateContext(contextType, document, 0, 0);
      try {
        TemplateBuffer buffer = context.evaluate(template);
        templateString = buffer.getString();
      }
      catch (Exception e) {
        Logger.log(Logger.WARNING_DEBUG, "Could not create template for new jsp tag", e); //$NON-NLS-1$
      }
View Full Code Here

    if (template != null) {
      TemplateContextType contextType = JSPUIPlugin.getDefault().getTemplateContextRegistry().getContextType(TemplateContextTypeIdsJSP.NEW);
      IDocument document = new Document();
      TemplateContext context = new DocumentTemplateContext(contextType, document, 0, 0);
      try {
        TemplateBuffer buffer = context.evaluate(template);
        templateString = buffer.getString();
      }
      catch (Exception e) {
        Logger.log(Logger.WARNING_DEBUG, "Could not create template for new jsp", e); //$NON-NLS-1$
      }
View Full Code Here

    if (template != null) {
      TemplateContextType contextType = XMLUIPlugin.getDefault().getTemplateContextRegistry().getContextType(TemplateContextTypeIdsXML.NEW);
      IDocument document = new Document();
      TemplateContext context = new DocumentTemplateContext(contextType, document, 0, 0);
      try {
        TemplateBuffer buffer = context.evaluate(template);
        templateString = buffer.getString();
      }
      catch (Exception e) {
        Logger.log(Logger.WARNING_DEBUG, "Could not create template for new xml", e); //$NON-NLS-1$
      }
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.