in src/main/kotlin/mobi/hsz/idea/gitignore/codeInspection/IgnoreRelativeEntryFix.kt [19:29]
override fun invoke(project: Project, psiFile: PsiFile, startElement: PsiElement, endElement: PsiElement) {
if (startElement is IgnoreEntry) {
val document = PsiDocumentManager.getInstance(project).getDocument(psiFile)
if (document != null) {
val start = startElement.getStartOffsetInParent()
val text = startElement.getText()
val fixed = getFixedPath(text)
document.replaceString(start, start + text.length, fixed)
}
}
}