1
0
mirror of https://github.com/chylex/IntelliJ-AceJump.git synced 2025-05-05 02:34:03 +02:00

update to latest IDE version

This commit is contained in:
breandan 2022-11-30 19:43:24 -05:00
parent 6a2b5dd422
commit c070b211e3
7 changed files with 40 additions and 46 deletions
CHANGES.mdbuild.gradle.kts
src
main/kotlin/org/acejump
test/kotlin
ExternalUsageTest.kt
org/acejump/test/util

View File

@ -5,6 +5,7 @@
## 3.8.9
- Add ids to editor action handlers, [#410](https://github.com/acejump/AceJump/pull/410), thanks to [@AlexPl292](https://github.com/AlexPl292)
- Update API to IJ-2022.3 and JDK to 17
## 3.8.8

View File

@ -1,12 +1,12 @@
import org.jetbrains.changelog.*
import org.jetbrains.changelog.Changelog.OutputType.HTML
import org.jetbrains.intellij.tasks.*
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
idea apply true
kotlin("jvm") version "1.8.0-Beta"
id("org.jetbrains.intellij") version "1.10.0"
id("org.jetbrains.changelog") version "1.3.1"
id("org.jetbrains.changelog") version "2.0.0"
id("com.github.ben-manes.versions") version "0.44.0"
}
@ -31,9 +31,9 @@ tasks {
}
patchPluginXml {
sinceBuild.set("213.5744.223")
sinceBuild.set("223.7571.182")
changeNotes.set(provider {
changelog.getAll().values.take(2).last().toHTML()
changelog.renderItem(changelog.getAll().values.take(2).last(), HTML)
})
}
@ -76,7 +76,7 @@ dependencies {
}
intellij {
version.set("2022.2")
version.set("2022.3")
pluginName.set("AceJump")
updateSinceUntilBuild.set(false)
plugins.set(listOf("java"))

View File

@ -29,7 +29,7 @@ sealed class AceAction: DumbAwareAction() {
if (project != null) {
try {
val openEditors = FileEditorManagerEx.getInstanceEx(project).splitters.selectedEditors
val openEditors = FileEditorManagerEx.getInstanceEx(project).splitters.getSelectedEditors()
.mapNotNull { (it as? TextEditor)?.editor }
.sortedBy { if (it === editor) 0 else 1 }
invoke(SessionManager.start(editor, openEditors))

View File

@ -100,7 +100,7 @@ internal class TagJumper(private val mode: JumpMode, private val searchProcessor
val project = editor.project ?: return
val fem = FileEditorManagerEx.getInstanceEx(project)
val window = fem.windows.firstOrNull { (it.selectedEditor?.selectedWithProvider?.fileEditor as? TextEditor)?.editor === editor }
val window = fem.windows.firstOrNull { (it.getSelectedComposite(true)?.fileEditorManager?.selectedTextEditor) === editor }
if (window != null && window !== fem.currentWindow) {
fem.currentWindow = window
}

View File

@ -5,17 +5,14 @@ import com.intellij.ui.ColorPanel
import com.intellij.ui.components.JBCheckBox
import com.intellij.ui.components.JBTextArea
import com.intellij.ui.components.JBTextField
import com.intellij.ui.layout.Cell
import com.intellij.ui.layout.GrowPolicy.MEDIUM_TEXT
import com.intellij.ui.layout.GrowPolicy.SHORT_TEXT
import com.intellij.ui.layout.panel
import com.intellij.ui.dsl.builder.*
import org.acejump.input.JumpMode
import org.acejump.input.KeyLayout
import java.awt.Color
import java.awt.Font
import javax.swing.JCheckBox
import javax.swing.JComponent
import javax.swing.JPanel
import javax.swing.JTextArea
import javax.swing.text.JTextComponent
import kotlin.reflect.KProperty
@ -54,45 +51,41 @@ internal class AceSettingsPanel {
}
internal val rootPanel: JPanel = panel {
fun Cell.short(component: JComponent) = component(growPolicy = SHORT_TEXT)
fun Cell.medium(component: JComponent) = component(growPolicy = MEDIUM_TEXT)
titledRow("Characters and Layout") {
row("Allowed characters in tags:") { medium(tagCharsField) }
row("Keyboard layout:") { short(keyboardLayoutCombo) }
row("Keyboard design:") { short(keyboardLayoutArea) }
group("Characters and Layout") {
row("Allowed characters in tags:") { cell(tagCharsField).columns(COLUMNS_LARGE) }
row("Keyboard layout:") { cell(keyboardLayoutCombo).columns(COLUMNS_SHORT) }
row("Keyboard design:") { cell(keyboardLayoutArea).columns(COLUMNS_SHORT) }
}
titledRow("Modes") {
row("Cycle order:") { cell { cycleModeCombo1() } }
group("Modes") {
row("Cycle order:") { cycleModeCombo1 }
row("") {
cell(isVerticalFlow = true) {
cycleModeCombo2()
cycleModeCombo3()
cycleModeCombo4()
}
cycleModeCombo2
cycleModeCombo3
cycleModeCombo4
}
}
titledRow("Colors") {
row("Jump mode caret background:") { short(jumpModeColorWheel) }
row("Jump to End mode caret background:") { short(jumpEndModeColorWheel) }
row("Target mode caret background:") { short(targetModeColorWheel) }
row("Definition mode caret background:") { short(definitionModeColorWheel) }
row("Searched text background:") { short(textHighlightColorWheel) }
row("Tag foreground:") { short(tagForegroundColorWheel) }
row("Tag background:") { short(tagBackgroundColorWheel) }
group("Colors") {
row("Jump mode caret background:") { cell(jumpModeColorWheel) }
row("Jump to End mode caret background:") { cell(jumpEndModeColorWheel) }
row("Target mode caret background:") { cell(targetModeColorWheel) }
row("Definition mode caret background:") { cell(definitionModeColorWheel) }
row("Searched text background:") { cell(textHighlightColorWheel) }
row("Tag foreground:") { cell(tagForegroundColorWheel) }
row("Tag background:") { cell(tagBackgroundColorWheel) }
}
titledRow("Behavior") {
row { short(searchWholeFileCheckBox.apply { text = "Search whole file" }) }
row("Minimum typed characters (1-10):") { short(minQueryLengthField) }
group("Behavior") {
row { cell(searchWholeFileCheckBox.apply { text = "Search whole file" }) }
row("Minimum typed characters (1-10):") { cell(minQueryLengthField) }
}
titledRow("Language Settings") {
row { short(mapToASCIICheckBox.apply { text = "Map unicode to ASCII" }) }
group("Language Settings") {
row { cell(mapToASCIICheckBox.apply { text = "Map unicode to ASCII" }) }
}
titledRow("Visual") {
row { short(showSearchNotificationCheckBox.apply { text = "Show hint with search text" }) }
group("Visual") {
row { cell(showSearchNotificationCheckBox.apply { text = "Show hint with search text" }) }
}
}

View File

@ -43,12 +43,12 @@ class ExternalUsageTest: BaseTest() {
fun `test externally tagged results with multiple editors`() {
val fileA = MockVirtualFile("a.txt", "first file")
val fileB = MockVirtualFile("b.txt", "second file with more markers")
myManager.openFile(fileA, true)
myManager.openFile(fileB, false)
manager?.openFile(fileA, true)
manager?.openFile(fileB, false)
val mainEditor = (myManager.selectedEditor as TextEditor).editor
val editorA = (myManager.getEditors(fileA).single() as TextEditor).editor
val editorB = (myManager.getEditors(fileB).single() as TextEditor).editor
val mainEditor = (manager?.selectedEditor as TextEditor).editor
val editorA = (manager?.getEditors(fileA)?.single() as TextEditor).editor
val editorB = (manager?.getEditors(fileB)?.single() as TextEditor).editor
val session = SessionManager.start(mainEditor, listOf(editorA, editorB))

View File

@ -38,7 +38,7 @@ abstract class BaseTest: FileEditorManagerTestCase() {
UIUtil.dispatchAllInvocationEvents()
assertEmpty(it.markupModel.allHighlighters)
}
myManager.closeAllFiles()
manager?.closeAllFiles()
}
fun typeAndWaitForResults(string: String) {