Interface IGlobalVariable

    • Method Detail

      • preApplyGlobal

        IPlacementContext preApplyGlobal​(org.eclipse.xtext.ui.editor.model.XtextDocument document,
                                         int offset)
        Computes additional data for computing ApplyResult in method #applyGlobal(XtextDocument, IRegion) before content of the document will be changed by template pattern
        Parameters:
        document - actual document for applying ITemplate
        offset - offset of applying whole ITemplate
        Returns:
        additional data for computing ApplyResult in method #applyGlobal(XtextDocument, IRegion) before content of the document will be changed by template pattern, can be null if
      • applyGlobal

        ApplyResult applyGlobal​(org.eclipse.xtext.ui.editor.model.XtextDocument document,
                                org.eclipse.jface.text.IRegion variablePosition,
                                IPlacementContext placementContext)
        Performs apply at any region of the document
        Parameters:
        document - The document to perform apply on, cannot be null
        variablePosition - The position of the variable after applying template and usual IVariable.apply(String), cannot be null
        placementContext - additional information for creating ApplyResult, computed in {@link #preApplyGlobal(XtextDocument, int), can be null if there is no additional information
        Returns:
        The result of global apply, cannot be null