Class MergingHighlightedPositionAcceptor

    • Method Detail

      • addPosition

        public void addPosition​(int offset,
                                int length,
                                java.lang.String... ids)
        Description copied from interface: IHighlightedPositionAcceptor
        Associates a text range with a style.
        Specified by:
        addPosition in interface IHighlightedPositionAcceptor
        Parameters:
        offset - the offset of the range.
        length - the length of the range.
        ids - the ids of the highlighting style, that should be applied.
      • newPosition

        protected LightweightPosition newPosition​(int offset,
                                                  int length,
                                                  int timestamp,
                                                  java.lang.String... ids)
      • provideHighlightingFor

        public void provideHighlightingFor​(org.eclipse.xtext.resource.XtextResource resource,
                                           IHighlightedPositionAcceptor acceptor,
                                           org.eclipse.xtext.util.CancelIndicator cancelIndicator)
        Specified by:
        provideHighlightingFor in interface ISemanticHighlightingCalculator
        Parameters:
        resource - the resource that will be highlighted. May be null in some rare cases.
        acceptor - used to announce the mapping from text-range to the style's id. The acceptor will never be null.
        cancelIndicator - used to determine whether we should stop searching for highlighting positions (use OperationCanceledManager to check)
      • mergePositions

        public void mergePositions()