Interface IXtextBslModuleFixFacade


  • public interface IXtextBslModuleFixFacade
    Contract for xtext BSL quick fix model
    • Method Detail

      • getElement

        org.eclipse.emf.ecore.EObject getElement()
        Provides the element which is used to create a quick fix
        Returns:
        the element, can be null
      • getFormatString

        String getFormatString​(Method method)
                        throws org.eclipse.jface.text.BadLocationException
        Provides the format string for the given Method
        Parameters:
        method - the method, cannot be null
        Returns:
        format string, never null
        Throws:
        org.eclipse.jface.text.BadLocationException
      • getDeclarationKeyword

        String getDeclarationKeyword()
        Provides the declaration keyword for element
        Returns:
        declaration keyword, never null
      • getIndent

        String getIndent​(Method method)
                  throws org.eclipse.jface.text.BadLocationException
        Gets indent by method
        Returns:
        indent, never null
        Throws:
        org.eclipse.jface.text.BadLocationException
      • getOffset

        int getOffset​(Method method)
        Gets offset by method
        Returns:
        offset
      • getTotalEndOffset

        int getTotalEndOffset​(Method method)
        Returns the end offset (exclusive) for the method
        Returns:
        the end offset (exclusive)
      • getVariableName

        String getVariableName()
        Genearates and returns the variable name
        Returns:
        the variable name, never null
      • getMethodName

        String getMethodName()
        Genearates and returns the method name
        Returns:
        the method name, never null
      • getTypeMethodName

        String getTypeMethodName​(boolean isFunc)
        Gets 'Procedure' or 'Function'
        Parameters:
        isFunc - defines what will be return
        Returns:
        'Procedure' if isFunc == false, else return 'Function'
      • getTypeEndMethodName

        String getTypeEndMethodName​(boolean isFunc)
        Gets 'EndProcedure' or 'EndFunction'
        Parameters:
        isFunc - defines what will be return
        Returns:
        'EndProcedure' if isFunc == false, else return 'EndFunction'
      • getDirectiveName

        String getDirectiveName()
        Provides the directive name
        Returns:
        the directive name, never null, can be empty
      • createVariable

        String createVariable​(Method method)
                       throws org.eclipse.jface.text.BadLocationException
        Creates the variable and returns its name
        Parameters:
        method - the method, cannot be null
        Returns:
        created variable name, never null
        Throws:
        org.eclipse.jface.text.BadLocationException
      • createMethod

        String createMethod​(org.eclipse.xtext.resource.XtextResource state,
                            Method method,
                            String directiveName,
                            String methodKeywordType,
                            String methodName,
                            String methodEndKeywordType)
                     throws org.eclipse.jface.text.BadLocationException
        Creates the method and returns its name
        Parameters:
        state - the xtext resource, cannot be null
        method - the method, cannot be null
        directiveName - the directive name, cannot be null, can be empty
        methodKeywordType - the method keyword type, cannot be null
        methodName - the method name, cannot be null
        methodEndKeywordType - the metod end keyword type, cannot be null
        Returns:
        the method name, cannot be null
        Throws:
        org.eclipse.jface.text.BadLocationException
      • writeVariableToModule

        void writeVariableToModule​(int offset,
                                   String declarationKeyWord,
                                   String variable)
        Serializes the variable to module
        Parameters:
        offset - the offset
        declarationKeyWord - the declaration keyword, cannot be null, can be empty
        variable - the variable name, cannot be null
      • writeMethodToModule

        void writeMethodToModule​(Method method,
                                 String methodKeywordType,
                                 String directiveName,
                                 int totalEndOffset,
                                 String func)
                          throws org.eclipse.jface.text.BadLocationException
        Serializes the method to module
        Parameters:
        method - the method, cannot be null
        methodKeywordType - the method keyword type, cannot be null
        directiveName - the directive name, cannot be null, can be empty
        totalEndOffset - the end offset (exclusive) for the method
        func - the method name, cannot be null
        Throws:
        org.eclipse.jface.text.BadLocationException