Changed workaround according to recommendation by Jetbrains.
This commit is contained in:
parent
1ee532b577
commit
f3bc2c1a0b
@ -834,7 +834,7 @@ Feel free to use the code (in package ```de.platon42.intellij.jupiter```) for yo
|
|||||||
|
|
||||||
## Changelog
|
## Changelog
|
||||||
|
|
||||||
### V1.13 (15-Aug-22)
|
### V1.13 (17-Aug-22)
|
||||||
|
|
||||||
- Maintenance. Updated various dependencies (Kotlin 1.7.10) and AssertJ 3.23.1 and AssertJ-Guava 3.5.0.
|
- Maintenance. Updated various dependencies (Kotlin 1.7.10) and AssertJ 3.23.1 and AssertJ-Guava 3.5.0.
|
||||||
- Tried to fix unreproducible issue #9.
|
- Tried to fix unreproducible issue #9.
|
||||||
|
@ -54,7 +54,7 @@ runPluginVerifier {
|
|||||||
|
|
||||||
patchPluginXml {
|
patchPluginXml {
|
||||||
setChangeNotes("""
|
setChangeNotes("""
|
||||||
<h4>V1.13 (15-Aug-22)</h4>
|
<h4>V1.13 (17-Aug-22)</h4>
|
||||||
<ul>
|
<ul>
|
||||||
<li>Maintenance. Updated various dependencies (Kotlin 1.7.10) and AssertJ 3.23.1 and AssertJ-Guava 3.5.0.
|
<li>Maintenance. Updated various dependencies (Kotlin 1.7.10) and AssertJ 3.23.1 and AssertJ-Guava 3.5.0.
|
||||||
<li>Tried to fix unreproducible issue #9.
|
<li>Tried to fix unreproducible issue #9.
|
||||||
|
@ -56,14 +56,8 @@ class JoinStatementsQuickFix(private val separateLineLimit: Int) : AbstractCommo
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun addLineBreak(project: Project, lastElementBeforeConcat: PsiElement) {
|
private fun addLineBreak(project: Project, lastElementBeforeConcat: PsiElement) {
|
||||||
val newLineNode = try {
|
// was PsiParserFacade.getInstance(project).createWhiteSpaceFromText("\n\t"), changed due to breaking API changes
|
||||||
PsiParserFacade.getInstance(project).createWhiteSpaceFromText("\n\t")
|
val newLineNode = project.getService(PsiParserFacade::class.java).createWhiteSpaceFromText("\n\t")
|
||||||
} catch (ex: NoSuchMethodError) {
|
|
||||||
// scheduled for removal, but alternate version not even available in 2020.3.
|
|
||||||
// So keep it here until we run into a problem.
|
|
||||||
// Changing the min version from 2017.3 to 2021.x is a major thing.
|
|
||||||
PsiParserFacade.SERVICE.getInstance(project).createWhiteSpaceFromText("\n\t")
|
|
||||||
}
|
|
||||||
lastElementBeforeConcat.addAfter(newLineNode, lastElementBeforeConcat.firstChild)
|
lastElementBeforeConcat.addAfter(newLineNode, lastElementBeforeConcat.firstChild)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user