Interface ITemplate

  • All Known Implementing Classes:
    BslTemplate

    public interface ITemplate
    The template class, which contains all necessary information to compute proposals and define where it can be applied.
    • Method Detail

      • getName

        String getName()
        Returns the name of the template. This is its id and its trigger-word
        Returns:
        The name of template, cannot be null
      • getDescription

        String getDescription()
        Returns the description of the template
        Returns:
        The description of template, cannot be null
      • getTemplateContext

        ITemplateContext getTemplateContext()
        The template context that is used to check where template is applicable
        Returns:
        The context where this template is applicable, cannot be null
      • getPattern

        String getPattern()
        Returns the pattern string for this template, which will be inserted after all variables are processed
        Returns:
        The pattern string, cannot be null
      • setName

        void setName​(String name)
        Sets the name of the template to the given one
        Parameters:
        name - The name to set, cannot be null
      • setPattern

        void setPattern​(String pattern)
        Sets the pattern of the template to the given one
        Parameters:
        pattern - The pattern to set, cannot be null
      • setDescription

        void setDescription​(String description)
        Sets the description of the template to the given one
        Parameters:
        description - The description to set, cannot be null
      • isAutoinsertable

        boolean isAutoinsertable()
        Whether this template can be inserted without calling content assist if previous text matches the name
        Returns:
        Whether this template can be autoinserted
      • setTemplateContext

        void setTemplateContext​(ITemplateContext templateContext)
        Sets the template context to given context
        Parameters:
        templateContext - The context to set, cannot be null