Class AbstractVariable

    • Constructor Detail

      • AbstractVariable

        public AbstractVariable​(org.eclipse.jface.text.IRegion region)
        Creates new instance of this with given region
        Parameters:
        region - The region of the occurrence of the variable, cannot be null
    • Method Detail

      • apply

        public ApplyResult apply​(String indentation)
        Description copied from interface: IVariable
        Performs apply creating replace edits for template. Do not shift for template's offset
        Specified by:
        apply in interface IVariable
        Parameters:
        indentation - The current indentation level, cannot be null
        Returns:
        The replace edit for template string, cannot be null
      • getRegion

        public org.eclipse.jface.text.IRegion getRegion()
        Description copied from interface: IVariable
        Returns region of the entry of this variable inside template
        Specified by:
        getRegion in interface IVariable
        Returns:
        The regions that are entries of this variable inside the template, cannot be null
      • getProposalProvider

        public IVariableProposalProvider getProposalProvider()
        Description copied from interface: IVariable
        Creates proposal provider that can create proposals for linked position.
        Specified by:
        getProposalProvider in interface IVariable
        Returns:
        Proposal provider for this variable, can be null if no proposals can be created by this variable and it does not need linked mode. Linked mode created for non-null providers
      • getDialogProvider

        public IVariableDialogProvider getDialogProvider()
        Description copied from interface: IVariable
        Gets special provider for open dialog for editing value after apllying variable
        Specified by:
        getDialogProvider in interface IVariable
        Returns:
        special provider for open dialog for editing value after apllying variable, can be null
      • getVariableText

        protected abstract String getVariableText()
        Returns text of the variable for the given region
        Returns:
        The text of the variable for the given region, can be null