Compare commits

..
6 Commits
4 changed files with 12 additions and 18 deletions
+3 -4
View File
@@ -1,5 +1,4 @@
# Cajon - Concise AssertJ Optimizing Nitpicker [![Build Status](https://travis-ci.com/chrisly42/cajon-plugin.svg?branch=master)](https://travis-ci.com/chrisly42/cajon-plugin) [![Coverage Status](https://coveralls.io/repos/github/chrisly42/cajon-plugin/badge.svg?branch=master)](https://coveralls.io/github/chrisly42/cajon-plugin?branch=master) # Cajon - Concise AssertJ Optimizing Nitpicker [![Build Status](https://app.travis-ci.com/chrisly42/cajon-plugin.svg?branch=master)](https://app.travis-ci.com/chrisly42/cajon-plugin) [![Coverage Status](https://coveralls.io/repos/github/chrisly42/cajon-plugin/badge.svg?branch=master)](https://coveralls.io/github/chrisly42/cajon-plugin?branch=master)
Cajon is an IntelliJ IDEA Plugin for shortening and optimizing [AssertJ](https://assertj.github.io/doc/) assertions. Cajon is an IntelliJ IDEA Plugin for shortening and optimizing [AssertJ](https://assertj.github.io/doc/) assertions.
## Purpose ## Purpose
@@ -835,11 +834,11 @@ Feel free to use the code (in package ```de.platon42.intellij.jupiter```) for yo
## Changelog ## Changelog
### V1.13 (15-Aug-22) ### V1.13 (18-Aug-22)
- API change in IntelliJ platforms now requires minimum version 2019.3.1. Sorry, giving up to maintain compatibilty after four attempts.
- 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.
- Added workaround for upcoming API change in IntelliJ breaking older releases.
- Added AssertThatIsZeroOne inspection demanded by issue #5. - Added AssertThatIsZeroOne inspection demanded by issue #5.
- Fix for wrongly joining statements that cannot be trivially joined (e.g. with filteredOn). Fixes issue #6. - Fix for wrongly joining statements that cannot be trivially joined (e.g. with filteredOn). Fixes issue #6.
+6 -5
View File
@@ -28,6 +28,7 @@ dependencies {
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.9.0' testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.9.0'
testImplementation "org.jetbrains.kotlin:kotlin-test" testImplementation "org.jetbrains.kotlin:kotlin-test"
testImplementation "org.jetbrains.kotlin:kotlin-reflect" testImplementation "org.jetbrains.kotlin:kotlin-reflect"
testImplementation 'org.junit.platform:junit-platform-launcher:1.9.0'
// testImplementation "org.jetbrains.kotlin:kotlin-test-junit" // testImplementation "org.jetbrains.kotlin:kotlin-test-junit"
} }
@@ -47,17 +48,17 @@ intellij {
} }
runPluginVerifier { runPluginVerifier {
ideVersions = ["IC-193.5662.53", "IC-222.3345.118"] // 2020.3 - 2022.2 ideVersions = ["IC-193.5662.53", "IC-222.3345.118"] // 2019.3.1 - 2022.2
downloadDir = System.getProperty("user.home") + "/.gradle/caches/modules-2/files-2.1/com.jetbrains.intellij.idea/verifier" downloadDir = System.getProperty("user.home") + "/.gradle/caches/modules-2/files-2.1/com.jetbrains.intellij.idea/verifier"
} }
patchPluginXml { patchPluginXml {
setChangeNotes(""" setChangeNotes("""
<h4>V1.13 (15-Aug-22)</h4> <h4>V1.13 (18-Aug-22)</h4>
<ul> <ul>
<li>API change in IntelliJ platforms now requires minimum version 2019.3.1. Sorry, giving up to maintain compatibilty after four attempts.
<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.
<li>Added workaround for upcoming API change in IntelliJ breaking older releases.
<li>Added AssertThatIsZeroOne inspection demanded by issue #5. <li>Added AssertThatIsZeroOne inspection demanded by issue #5.
<li>Fix for wrongly joining statements that cannot be trivially joined (e.g. with filteredOn). Fixes issue #6. <li>Fix for wrongly joining statements that cannot be trivially joined (e.g. with filteredOn). Fixes issue #6.
</ul> </ul>
@@ -72,8 +73,8 @@ test {
} }
} }
tasks.test { tasks.coveralls {
systemProperty("idea.force.use.core.classloader", "true") dependsOn jacocoTestReport
} }
jacoco { jacoco {
@@ -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)
} }
+1 -1
View File
@@ -14,7 +14,7 @@
<a href="https://github.com/chrisly42/cajon-plugin/blob/master/README.md">Full documentation here...</a> <a href="https://github.com/chrisly42/cajon-plugin/blob/master/README.md">Full documentation here...</a>
]]></description> ]]></description>
<idea-version since-build="173.2696.26"/> <idea-version since-build="193.5662.53"/>
<depends>com.intellij.modules.lang</depends> <depends>com.intellij.modules.lang</depends>
<depends>com.intellij.modules.platform</depends> <depends>com.intellij.modules.platform</depends>