Skip to content

Commit

Permalink
refactor: add replaceWith field in Compatibility annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
lppedd committed Nov 10, 2020
1 parent 3d163d0 commit d4dbb5e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/main/kotlin/com/github/lppedd/cc/CCExtensions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ import kotlin.math.min

// region LookupImpl

@Compatibility(minVersionForRemoval = "193.5096.12")
@Compatibility(
minVersionForRemoval = "193.5096.12",
replaceWith = "LookupImpl#setLookupFocusDegree(LookupFocusDegree)",
)
internal fun LookupImpl.setLookupFocusDegree(focusDegree: String) {
// Unfortunately this is required to maintain compatibility with versions prior to 193.5096.
// setLookupFocusDegree and LookupFocusDegree don't exist in those versions.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,11 @@ internal annotation class Compatibility(
* The minimum supported IDE version that is required
* for removing the annotated element.
*/
val minVersionForRemoval: String,
val minVersionForRemoval: String = "?",

/**
* A suggestion for replacing the annotated element
* when it's time to remove it.
*/
val replaceWith: String = "",
)

0 comments on commit d4dbb5e

Please sign in to comment.