Class CreateMethodVariable

All Implemented Interfaces:
IGlobalVariable, IVariable

public class CreateMethodVariable extends CreateMethodAndInvocationVariable
Variable that creates the method and puts its name in the variable spot
  • Constructor Details

    • CreateMethodVariable

      public CreateMethodVariable(org.eclipse.jface.text.IRegion region, String name, boolean isProcedure, List<String> params)
      Creates new instance of this by calling super's constructor
      Parameters:
      region - The region of the variable, cannot be null
      name - The name of the created method, cannot be null
      isProcedure - true if variable should create Procedure, false if should create Function
      params - The list of method parameters names, cannot be null
  • Method Details

    • getVariableText

      protected String getVariableText()
      Description copied from class: AbstractVariable
      Returns text of the variable for the given region
      Overrides:
      getVariableText in class CreateMethodAndInvocationVariable
      Returns:
      The text of the variable for the given region, can be null
    • setupVariableLinks

      protected Collection<LinkedGroup> setupVariableLinks(org.eclipse.xtext.ui.editor.model.XtextDocument document, org.eclipse.jface.text.IRegion variablePosition, List<org.eclipse.text.edits.RangeMarker> nameGroup)
      Description copied from class: CreateMethodAndInvocationVariable
      Setups link groups for the variable text
      Overrides:
      setupVariableLinks in class CreateMethodAndInvocationVariable
      Parameters:
      document - The document to work on, cannot be null
      variablePosition - The position of the variable, cannot be null
      nameGroup - The list to add link group of the name to, cannot be null
      Returns:
      created LinkedGroup by template variable RangeMarker, never null