Package org.sonar.python.quickfix
Class PythonTextEdit
- java.lang.Object
-
- org.sonar.python.quickfix.PythonTextEdit
-
public class PythonTextEdit extends Object
For internal use only. Can not be used outside SonarPython analyzer.
-
-
Constructor Summary
Constructors Constructor Description PythonTextEdit(String message, int startLine, int startLineOffset, int endLine, int endLineOffset)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intendLine()intendLineOffset()static PythonTextEditinsertAfter(Tree tree, String textToInsert)static PythonTextEditinsertBefore(Tree tree, String textToInsert)static PythonTextEditinsertLineBefore(Tree tree, String textToInsert)Insert a line with the same offset as the given tree, before the given tree.static PythonTextEditremove(Tree toRemove)static PythonTextEditreplace(Tree toReplace, String replacementText)StringreplacementText()static PythonTextEditreplaceRange(Tree start, Tree end, String replacementText)intstartLine()intstartLineOffset()
-
-
-
Constructor Detail
-
PythonTextEdit
public PythonTextEdit(String message, int startLine, int startLineOffset, int endLine, int endLineOffset)
-
-
Method Detail
-
insertLineBefore
public static PythonTextEdit insertLineBefore(Tree tree, String textToInsert)
Insert a line with the same offset as the given tree, before the given tree. Offset is applied to multiline insertions.
-
insertBefore
public static PythonTextEdit insertBefore(Tree tree, String textToInsert)
-
insertAfter
public static PythonTextEdit insertAfter(Tree tree, String textToInsert)
-
replace
public static PythonTextEdit replace(Tree toReplace, String replacementText)
-
replaceRange
public static PythonTextEdit replaceRange(Tree start, Tree end, String replacementText)
-
remove
public static PythonTextEdit remove(Tree toRemove)
-
replacementText
public String replacementText()
-
startLine
public int startLine()
-
startLineOffset
public int startLineOffset()
-
endLine
public int endLine()
-
endLineOffset
public int endLineOffset()
-
-