Skip to content

Commit f06f8a3

Browse files
authored
Merge pull request #386 from FWDekker/java11
Drop support for Java 8, fix modifier checks
2 parents 13dbfef + e7b5d5a commit f06f8a3

File tree

4 files changed

+23
-23
lines changed

4 files changed

+23
-23
lines changed

gradle.properties

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
group = com.fwdekker
2-
version = 2.7.2
2+
version = 2.7.3-dev
33

44
# Compatibility
55
# * If latest is 20xx.y, then support at least [20xx-1].[y+1].
66
# e.g., if latest is 2020.3, support at least 2019.4 (aka 2020.1).
77
# See also https://data.services.jetbrains.com/products?fields=name,releases.version,releases.build&code=IC,CL.
8-
pluginSinceBuild = 202.0
9-
intellijVersion = 2021.1
10-
pluginVerifierIdeVersions = IC-2020.2.4, IC-2020.3.4, IC-2021.1.1, CL-2021.1.1
8+
pluginSinceBuild = 203.0
9+
intellijVersion = 2021.2
10+
pluginVerifierIdeVersions = IC-2020.3.4, IC-2021.1.3, IC-2021.2, CL-2020.3.4, CL-2021.1.3, CL-2021.2
1111

1212
# Targets
1313
# * `javaVersion` is the same as `jvmVersion`.
1414
# * Kotlin should also be updated in `plugins` block.
15-
javaVersion = 8
16-
jvmVersion = 1.8
15+
javaVersion = 11
16+
jvmVersion = 11
1717
kotlinVersion = 1.5
1818
kotlinApiVersion = 1.5
1919

src/main/kotlin/com/fwdekker/randomness/DataActions.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import com.intellij.openapi.options.ShowSettingsUtil
1616
import com.intellij.openapi.project.DumbAwareAction
1717
import com.intellij.openapi.project.Project
1818
import icons.RandomnessIcons
19-
import java.awt.event.InputEvent
19+
import java.awt.event.ActionEvent
2020
import java.util.concurrent.ExecutionException
2121
import java.util.concurrent.Executors
2222
import java.util.concurrent.TimeUnit
@@ -99,11 +99,11 @@ abstract class DataGroupAction(private val icon: Icon = RandomnessIcons.Data.Bas
9999
* @param event carries information on the invocation place
100100
*/
101101
override fun actionPerformed(event: AnActionEvent) {
102-
// alt behavior is handled by implementation of `actionPerformed`
103-
val altPressed = event.modifiers and (InputEvent.ALT_MASK or InputEvent.ALT_DOWN_MASK) != 0
104-
val ctrlPressed = event.modifiers and (InputEvent.CTRL_MASK or InputEvent.CTRL_DOWN_MASK) != 0
105-
val shiftPressed = event.modifiers and (InputEvent.SHIFT_MASK or InputEvent.SHIFT_DOWN_MASK) != 0
102+
val altPressed = event.modifiers and ActionEvent.ALT_MASK != 0
103+
val ctrlPressed = event.modifiers and ActionEvent.CTRL_MASK != 0
104+
val shiftPressed = event.modifiers and ActionEvent.SHIFT_MASK != 0
106105

106+
// alt behavior is handled by implementation of `actionPerformed`
107107
when {
108108
altPressed && ctrlPressed && shiftPressed -> quickSwitchArraySchemeAction.actionPerformed(event)
109109
altPressed && ctrlPressed -> quickSwitchSchemeAction.actionPerformed(event)

src/main/kotlin/com/fwdekker/randomness/PopupAction.kt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import com.intellij.openapi.ui.popup.JBPopupFactory
2121
import com.intellij.ui.popup.list.ListPopupImpl
2222
import icons.RandomnessIcons
2323
import java.awt.event.ActionEvent
24-
import java.awt.event.InputEvent
2524

2625

2726
/**
@@ -83,9 +82,9 @@ class PopupAction : AnAction() {
8382
@Suppress("ComplexMethod") // Cannot be simplified
8483
private fun captionModifier(event: ActionEvent?): String {
8584
val modifiers = event?.modifiers ?: 0
86-
val altPressed = modifiers and (InputEvent.ALT_MASK or InputEvent.ALT_DOWN_MASK) != 0
87-
val ctrlPressed = modifiers and (InputEvent.CTRL_MASK or InputEvent.CTRL_DOWN_MASK) != 0
88-
val shiftPressed = modifiers and (InputEvent.SHIFT_MASK or InputEvent.SHIFT_DOWN_MASK) != 0
85+
val altPressed = modifiers and ActionEvent.ALT_MASK != 0
86+
val ctrlPressed = modifiers and ActionEvent.CTRL_MASK != 0
87+
val shiftPressed = modifiers and ActionEvent.SHIFT_MASK != 0
8988

9089
return when {
9190
altPressed && ctrlPressed && shiftPressed -> ALT_CTRL_SHIFT_TITLE
Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
<!--<b>Breaking changes</b>
1+
<b>Breaking changes</b>
22
<p>
3-
Placeholder.
4-
(<a href="https://github.com/FWDekker/intellij-randomness/pull/num">#num</a>)
3+
Minimum IDE version has been increased to 2020.3.
4+
(<a href="https://github.com/FWDekker/intellij-randomness/issues/358">#358</a>)
5+
(<a href="https://github.com/FWDekker/intellij-randomness/pull/386">#386</a>)
56
</p>
6-
<br />-->
7+
<br />
78
<!--<b>New features</b>
89
<ul>
910
<li>
@@ -12,11 +13,11 @@
1213
</li>
1314
</ul>
1415
<br />-->
15-
<b>Fixes</b>
16+
<!--<b>Fixes</b>
1617
<p>
17-
Prevent symbol set settings from being truncated after restarting IDE.
18-
(<a href="https://github.com/FWDekker/intellij-randomness/issues/382">#382</a>)
18+
Placeholder.
19+
(<a href="/FWDekker/intellij-randomness/issues/num">#num</a>)
1920
</p>
20-
<br />
21+
<br />-->
2122
Change notes of previous updates can be found on the
2223
<a href="https://plugins.jetbrains.com/plugin/9836-randomness/versions">plugin repository</a>.

0 commit comments

Comments
 (0)