Interface NewTextEdit


  • public interface NewTextEdit
    Describe a text edit for a NewInputFileEdit as a replacement text for a given TextRange
    Since:
    9.13
    • Method Detail

      • at

        NewTextEdit at​(TextRange range)
        Parameters:
        range - the range on which to apply this edit
        Returns:
        the modified edit
      • withNewText

        NewTextEdit withNewText​(java.lang.String newText)
        Prior to 6.4, line returns had to be represented with the '\n' character. From 6.4 on, analyzers can use any EOL character they see fit, SonarLint takes care of adapting this to the one expected by the IDE. To remove code, use the empty string (""). When removing some code from the source file, make sure that no lines consisting only of whitespaces remain. If after the code is removed a non-whitespace character remains, place it at the same indentation level as the removed code.
        Parameters:
        newText - the replacement text.
        Returns:
        the modified edit