Package org.eclipse.jface.text.templates

Examples of org.eclipse.jface.text.templates.DocumentTemplateContext


  private static DocumentTemplateContext getContext(
      ContextTypeRegistry contextTypeRegistry, Template template,
      String containerName, String fileName, IDocument document, CodeTemplateVariableHolder varHolder) {

    if (fileName == null) {
      return new DocumentTemplateContext(contextTypeRegistry
          .getContextType(template.getContextTypeId()), document, 0,
          0);

    }
View Full Code Here


   * @since 3.1
   */
  protected final int getReplaceOffset() {
    int start;
    if (fContext instanceof DocumentTemplateContext) {
      DocumentTemplateContext docContext = (DocumentTemplateContext)fContext;
      start= docContext.getStart();
    } else {
      start= fRegion.getOffset();
    }
    return start;
  }
View Full Code Here

   * @since 3.1
   */
  protected final int getReplaceEndOffset() {
    int end;
    if (fContext instanceof DocumentTemplateContext) {
      DocumentTemplateContext docContext = (DocumentTemplateContext)fContext;
      end= docContext.getEnd();
    } else {
      end= fRegion.getOffset() + fRegion.getLength();
    }
    return end;
  }
View Full Code Here

TOP

Related Classes of org.eclipse.jface.text.templates.DocumentTemplateContext

Copyright © 2018 www.massapicom. 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.