Class ContextBasedFormattingStrategy

    • Constructor Detail

      • ContextBasedFormattingStrategy

        public ContextBasedFormattingStrategy()
    • Method Detail

      • format

        public String format​(String content,
                             boolean start,
                             String indentation,
                             int[] positions)
        Description copied from interface: IFormattingStrategy
        Formats the given string. During the formatting process this strategy must update the given character positions according to the changes applied to the given string.
        Specified by:
        format in interface IFormattingStrategy
        content - the initial string to be formatted
        start - indicates whether the beginning of content is a line start in its document
        indentation - the indentation string to be used
        positions - the character positions to be updated
        the formatted string
      • formatterStarts

        public void formatterStarts​(String indentation)
        Description copied from interface: IFormattingStrategy
        Informs the strategy about the start of a formatting process in which it will participate.
        Specified by:
        formatterStarts in interface IFormattingStrategy
        indentation - the indent string of the first line at which the overall formatting process starts.
      • getPreferences

        public final Map<String,​String> getPreferences()
        Returns the preferences used for the current formatting step.
        The preferences for the current formatting step