From e251799b11fcbb91abcd4b63d24d37ee8fe58d9b Mon Sep 17 00:00:00 2001 From: Waleed Yaseen Date: Sun, 12 Jan 2025 04:04:07 +0300 Subject: [PATCH] Update required sdk version to 2024.3 --- CHANGELOG.md | 4 ++++ gradle.properties | 4 ++-- .../RsGosubParameterInfoProvider.kt | 2 +- .../RsInlayParameterHintsProvider.kt | 2 +- .../plugin/ide/folding/RsFoldingBuilder.kt | 4 ++-- .../ide/highlight/RsHighlightingAnnotator.kt | 4 ++-- ...RuneScriptMissingScriptSymbolInspection.kt | 4 ++-- .../neptune/NeptuneSystemSettingsControl.kt | 9 +++++--- .../ide/projectWizard/NeptuneModuleBuilder.kt | 2 +- .../RsSearchEverywhereContributor.kt | 21 ++++++++----------- .../RsTriggerFilterCollector.java | 10 --------- .../psi/mixin/RsConstantExpressionMixin.kt | 2 +- .../mixin/RsLocalVariableExpressionMixin.kt | 2 +- .../mixin/RsScopedVariableExpressionMixin.kt | 2 +- .../plugin/lang/psi/mixin/RsScriptMixin.kt | 2 +- .../mixin/RsStringLiteralExpressionMixin.kt | 2 +- .../type/inference/RsTypeInferenceVisitor.kt | 2 +- .../symbollang/psi/mixin/RsSymSymbolMixin.kt | 2 +- 18 files changed, 37 insertions(+), 43 deletions(-) delete mode 100644 src/main/kotlin/io/runescript/plugin/ide/searchEverywhere/RsTriggerFilterCollector.java diff --git a/CHANGELOG.md b/CHANGELOG.md index 81f89a7..d06e7c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## [Unreleased] +### Changed + +- Update required IntelliJ version to 2024.3. + ## [1.7.0] - 2024-12-16 ### Added diff --git a/gradle.properties b/gradle.properties index b4f015c..16e1851 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,11 +3,11 @@ pluginName = RuneScript pluginRepositoryUrl = https://github.com/waleedyaseen/intellij-runescript pluginVersion = 1.7.0 -pluginSinceBuild = 232 +pluginSinceBuild = 243 pluginUntilBuild = 243.* platformType = IC -platformVersion = 2023.2 +platformVersion = 2024.3 platformPlugins = platformBundledPlugins = com.intellij.java,org.toml.lang diff --git a/src/main/kotlin/io/runescript/plugin/ide/codeInsight/RsGosubParameterInfoProvider.kt b/src/main/kotlin/io/runescript/plugin/ide/codeInsight/RsGosubParameterInfoProvider.kt index 375dacc..f547569 100644 --- a/src/main/kotlin/io/runescript/plugin/ide/codeInsight/RsGosubParameterInfoProvider.kt +++ b/src/main/kotlin/io/runescript/plugin/ide/codeInsight/RsGosubParameterInfoProvider.kt @@ -6,7 +6,7 @@ import com.intellij.lang.parameterInfo.ParameterInfoUIContext import com.intellij.lang.parameterInfo.UpdateParameterInfoContext import com.intellij.psi.tree.IElementType import com.intellij.psi.util.parentOfType -import com.intellij.refactoring.suggested.startOffset +import com.intellij.psi.util.startOffset import io.runescript.plugin.lang.psi.* class RsGosubParameterInfoProvider : ParameterInfoHandlerWithTabActionSupport { diff --git a/src/main/kotlin/io/runescript/plugin/ide/codeInsight/RsInlayParameterHintsProvider.kt b/src/main/kotlin/io/runescript/plugin/ide/codeInsight/RsInlayParameterHintsProvider.kt index 466eba8..e46c532 100644 --- a/src/main/kotlin/io/runescript/plugin/ide/codeInsight/RsInlayParameterHintsProvider.kt +++ b/src/main/kotlin/io/runescript/plugin/ide/codeInsight/RsInlayParameterHintsProvider.kt @@ -3,7 +3,7 @@ package io.runescript.plugin.ide.codeInsight import com.intellij.codeInsight.hints.InlayInfo import com.intellij.codeInsight.hints.InlayParameterHintsProvider import com.intellij.psi.PsiElement -import com.intellij.refactoring.suggested.startOffset +import com.intellij.psi.util.startOffset import io.runescript.plugin.lang.psi.* @Suppress("UnstableApiUsage") diff --git a/src/main/kotlin/io/runescript/plugin/ide/folding/RsFoldingBuilder.kt b/src/main/kotlin/io/runescript/plugin/ide/folding/RsFoldingBuilder.kt index 959d091..6268130 100644 --- a/src/main/kotlin/io/runescript/plugin/ide/folding/RsFoldingBuilder.kt +++ b/src/main/kotlin/io/runescript/plugin/ide/folding/RsFoldingBuilder.kt @@ -9,8 +9,8 @@ import com.intellij.openapi.util.TextRange import com.intellij.psi.PsiComment import com.intellij.psi.PsiElement import com.intellij.psi.util.PsiTreeUtil -import com.intellij.refactoring.suggested.endOffset -import com.intellij.refactoring.suggested.startOffset +import com.intellij.psi.util.endOffset +import com.intellij.psi.util.startOffset import io.runescript.plugin.lang.psi.* class RsFoldingBuilder : FoldingBuilderEx(), DumbAware { diff --git a/src/main/kotlin/io/runescript/plugin/ide/highlight/RsHighlightingAnnotator.kt b/src/main/kotlin/io/runescript/plugin/ide/highlight/RsHighlightingAnnotator.kt index e6c1ffb..c18fb29 100644 --- a/src/main/kotlin/io/runescript/plugin/ide/highlight/RsHighlightingAnnotator.kt +++ b/src/main/kotlin/io/runescript/plugin/ide/highlight/RsHighlightingAnnotator.kt @@ -6,8 +6,8 @@ import com.intellij.lang.annotation.Annotator import com.intellij.openapi.editor.colors.TextAttributesKey import com.intellij.openapi.util.TextRange import com.intellij.psi.PsiElement -import com.intellij.refactoring.suggested.endOffset -import com.intellij.refactoring.suggested.startOffset +import com.intellij.psi.util.endOffset +import com.intellij.psi.util.startOffset import io.runescript.plugin.lang.psi.* import io.runescript.plugin.symbollang.psi.RsSymSymbol diff --git a/src/main/kotlin/io/runescript/plugin/ide/inspections/RuneScriptMissingScriptSymbolInspection.kt b/src/main/kotlin/io/runescript/plugin/ide/inspections/RuneScriptMissingScriptSymbolInspection.kt index 4fdccb5..235147f 100644 --- a/src/main/kotlin/io/runescript/plugin/ide/inspections/RuneScriptMissingScriptSymbolInspection.kt +++ b/src/main/kotlin/io/runescript/plugin/ide/inspections/RuneScriptMissingScriptSymbolInspection.kt @@ -5,8 +5,8 @@ import com.intellij.codeInspection.ProblemHighlightType import com.intellij.codeInspection.ProblemsHolder import com.intellij.openapi.util.TextRange import com.intellij.psi.PsiElementVisitor -import com.intellij.refactoring.suggested.endOffset -import com.intellij.refactoring.suggested.startOffset +import com.intellij.psi.util.endOffset +import com.intellij.psi.util.startOffset import io.runescript.plugin.ide.RsBundle import io.runescript.plugin.lang.psi.* import io.runescript.plugin.lang.psi.type.RsPrimitiveType diff --git a/src/main/kotlin/io/runescript/plugin/ide/neptune/NeptuneSystemSettingsControl.kt b/src/main/kotlin/io/runescript/plugin/ide/neptune/NeptuneSystemSettingsControl.kt index 9dba04e..3eef6ef 100644 --- a/src/main/kotlin/io/runescript/plugin/ide/neptune/NeptuneSystemSettingsControl.kt +++ b/src/main/kotlin/io/runescript/plugin/ide/neptune/NeptuneSystemSettingsControl.kt @@ -79,9 +79,12 @@ class NeptuneSystemSettingsControl(private val settings: NeptuneSettings) : val fileChooserDescriptor = FileChooserDescriptorFactory.createSingleFolderDescriptor() .withPathToTextConvertor(::getPresentablePath) .withTextToPathConvertor(::getCanonicalPath) - @Suppress("UnstableApiUsage") - textFieldWithBrowseButton("Neptune Home:", null, fileChooserDescriptor) - .bindText(neptuneHomeProperty.toUiPathProperty()) + .withTitle("Neptune Home:") + textFieldWithBrowseButton( + fileChooserDescriptor = fileChooserDescriptor, + project = null, + fileChosen = null + ).bindText(neptuneHomeProperty.toUiPathProperty()) .trimmedTextValidation(CHECK_NON_EMPTY, CHECK_DIRECTORY) .validationInfo { validateNeptuneHome() } .align(AlignX.FILL) diff --git a/src/main/kotlin/io/runescript/plugin/ide/projectWizard/NeptuneModuleBuilder.kt b/src/main/kotlin/io/runescript/plugin/ide/projectWizard/NeptuneModuleBuilder.kt index 7991f55..af256e3 100644 --- a/src/main/kotlin/io/runescript/plugin/ide/projectWizard/NeptuneModuleBuilder.kt +++ b/src/main/kotlin/io/runescript/plugin/ide/projectWizard/NeptuneModuleBuilder.kt @@ -68,7 +68,7 @@ class NeptuneModuleBuilder : RsProjectTemplate.generateTemplate(module, moduleContentEntry, modelContentRootDir) } - override fun createProject(name: String?, path: String?): Project? { + override fun createProject(name: String, path: String): Project? { creatingNewProject = true return super.createProject(name, path) } diff --git a/src/main/kotlin/io/runescript/plugin/ide/searchEverywhere/RsSearchEverywhereContributor.kt b/src/main/kotlin/io/runescript/plugin/ide/searchEverywhere/RsSearchEverywhereContributor.kt index 7113fcc..6c94cf4 100644 --- a/src/main/kotlin/io/runescript/plugin/ide/searchEverywhere/RsSearchEverywhereContributor.kt +++ b/src/main/kotlin/io/runescript/plugin/ide/searchEverywhere/RsSearchEverywhereContributor.kt @@ -33,7 +33,7 @@ class RsSearchEverywhereContributor(event: AnActionEvent) : AbstractGotoSEContri } override fun getActions(onChanged: Runnable): List { - return doGetActions(filter, RsTriggerFilterCollector(), onChanged) + return doGetActions(filter, null, onChanged) } override fun isEmptyPatternSupported(): Boolean { @@ -46,7 +46,14 @@ class RsSearchEverywhereContributor(event: AnActionEvent) : AbstractGotoSEContri } override fun createExtendedInfo(): ExtendedInfo { - return createPsiExtendedInfo() + return createPsiExtendedInfo(psiElement = { null }) + } + + override fun createRightActions( + registerShortcut: (AnAction) -> Unit, + onChanged: Runnable + ): List { + return ContainerUtil.emptyList() } class Factory : SearchEverywhereContributorFactory { @@ -59,16 +66,6 @@ class RsSearchEverywhereContributor(event: AnActionEvent) : AbstractGotoSEContri } } - override fun createRightActions(pattern: String, onChanged: Runnable): List { - return ContainerUtil.emptyList(); - } - - @Suppress("unused") - fun createRightActions(registerShortcut: (AnAction) -> Unit, onChanged: Runnable): List { - // For compatability with 241 - return ContainerUtil.emptyList(); - } - companion object { fun createTriggerFilter(project: Project): PersistentSearchEverywhereContributorFilter { val items = RsTriggerRef.forAllTriggers() diff --git a/src/main/kotlin/io/runescript/plugin/ide/searchEverywhere/RsTriggerFilterCollector.java b/src/main/kotlin/io/runescript/plugin/ide/searchEverywhere/RsTriggerFilterCollector.java deleted file mode 100644 index cc42204..0000000 --- a/src/main/kotlin/io/runescript/plugin/ide/searchEverywhere/RsTriggerFilterCollector.java +++ /dev/null @@ -1,10 +0,0 @@ -package io.runescript.plugin.ide.searchEverywhere; - -import com.intellij.ide.actions.searcheverywhere.SearchEverywhereFiltersStatisticsCollector; - -public class RsTriggerFilterCollector extends SearchEverywhereFiltersStatisticsCollector.BaseFilterStatisticsCollector { - - @Override - public void elementMarkChanged(RsTriggerRef element, boolean isMarked) { - } -} \ No newline at end of file diff --git a/src/main/kotlin/io/runescript/plugin/lang/psi/mixin/RsConstantExpressionMixin.kt b/src/main/kotlin/io/runescript/plugin/lang/psi/mixin/RsConstantExpressionMixin.kt index 0a7ef71..d89e066 100644 --- a/src/main/kotlin/io/runescript/plugin/lang/psi/mixin/RsConstantExpressionMixin.kt +++ b/src/main/kotlin/io/runescript/plugin/lang/psi/mixin/RsConstantExpressionMixin.kt @@ -4,7 +4,7 @@ import com.intellij.extapi.psi.ASTWrapperPsiElement import com.intellij.lang.ASTNode import com.intellij.psi.PsiElement import com.intellij.psi.PsiReference -import com.intellij.refactoring.suggested.startOffset +import com.intellij.psi.util.startOffset import io.runescript.plugin.lang.psi.RsConstantExpression import io.runescript.plugin.lang.psi.RsPsiImplUtil import io.runescript.plugin.lang.psi.refs.RsConstantReference diff --git a/src/main/kotlin/io/runescript/plugin/lang/psi/mixin/RsLocalVariableExpressionMixin.kt b/src/main/kotlin/io/runescript/plugin/lang/psi/mixin/RsLocalVariableExpressionMixin.kt index 7cf62ac..eb130ee 100644 --- a/src/main/kotlin/io/runescript/plugin/lang/psi/mixin/RsLocalVariableExpressionMixin.kt +++ b/src/main/kotlin/io/runescript/plugin/lang/psi/mixin/RsLocalVariableExpressionMixin.kt @@ -9,7 +9,7 @@ import com.intellij.psi.search.SearchScope import com.intellij.psi.stubs.IStubElementType import com.intellij.psi.tree.IElementType import com.intellij.psi.util.parentOfType -import com.intellij.refactoring.suggested.startOffset +import com.intellij.psi.util.startOffset import io.runescript.plugin.ide.doc.findDoc import io.runescript.plugin.lang.psi.* import io.runescript.plugin.lang.psi.refs.RsLocalVariableReference diff --git a/src/main/kotlin/io/runescript/plugin/lang/psi/mixin/RsScopedVariableExpressionMixin.kt b/src/main/kotlin/io/runescript/plugin/lang/psi/mixin/RsScopedVariableExpressionMixin.kt index a5c8b71..85a77d8 100644 --- a/src/main/kotlin/io/runescript/plugin/lang/psi/mixin/RsScopedVariableExpressionMixin.kt +++ b/src/main/kotlin/io/runescript/plugin/lang/psi/mixin/RsScopedVariableExpressionMixin.kt @@ -9,7 +9,7 @@ import com.intellij.psi.search.GlobalSearchScope import com.intellij.psi.search.SearchScope import com.intellij.psi.stubs.IStubElementType import com.intellij.psi.tree.IElementType -import com.intellij.refactoring.suggested.startOffset +import com.intellij.psi.util.startOffset import io.runescript.plugin.lang.psi.RsPsiImplUtil import io.runescript.plugin.lang.psi.RsScopedVariableExpression import io.runescript.plugin.lang.psi.refs.RsScopedVariableReference diff --git a/src/main/kotlin/io/runescript/plugin/lang/psi/mixin/RsScriptMixin.kt b/src/main/kotlin/io/runescript/plugin/lang/psi/mixin/RsScriptMixin.kt index 53f424e..21dd5d1 100644 --- a/src/main/kotlin/io/runescript/plugin/lang/psi/mixin/RsScriptMixin.kt +++ b/src/main/kotlin/io/runescript/plugin/lang/psi/mixin/RsScriptMixin.kt @@ -14,7 +14,7 @@ import com.intellij.psi.stubs.IStubElementType import com.intellij.psi.tree.IElementType import com.intellij.psi.util.CachedValueProvider import com.intellij.psi.util.CachedValuesManager -import com.intellij.refactoring.suggested.startOffset +import com.intellij.psi.util.startOffset import io.runescript.plugin.ide.RsIcons import io.runescript.plugin.ide.codeInsight.controlFlow.RsControlFlow import io.runescript.plugin.ide.codeInsight.controlFlow.RsControlFlowBuilder diff --git a/src/main/kotlin/io/runescript/plugin/lang/psi/mixin/RsStringLiteralExpressionMixin.kt b/src/main/kotlin/io/runescript/plugin/lang/psi/mixin/RsStringLiteralExpressionMixin.kt index 4d791ce..ef5522e 100644 --- a/src/main/kotlin/io/runescript/plugin/lang/psi/mixin/RsStringLiteralExpressionMixin.kt +++ b/src/main/kotlin/io/runescript/plugin/lang/psi/mixin/RsStringLiteralExpressionMixin.kt @@ -3,7 +3,7 @@ package io.runescript.plugin.lang.psi.mixin import com.intellij.extapi.psi.ASTWrapperPsiElement import com.intellij.lang.ASTNode import com.intellij.psi.PsiElement -import com.intellij.refactoring.suggested.startOffset +import com.intellij.psi.util.startOffset import io.runescript.plugin.lang.psi.RsElementGenerator import io.runescript.plugin.lang.psi.RsStringLiteralExpression import io.runescript.plugin.lang.psi.isHookExpression diff --git a/src/main/kotlin/io/runescript/plugin/lang/psi/type/inference/RsTypeInferenceVisitor.kt b/src/main/kotlin/io/runescript/plugin/lang/psi/type/inference/RsTypeInferenceVisitor.kt index a88a376..f2426b1 100644 --- a/src/main/kotlin/io/runescript/plugin/lang/psi/type/inference/RsTypeInferenceVisitor.kt +++ b/src/main/kotlin/io/runescript/plugin/lang/psi/type/inference/RsTypeInferenceVisitor.kt @@ -4,7 +4,7 @@ import com.intellij.lang.injection.InjectedLanguageManager import com.intellij.psi.PsiElement import com.intellij.psi.util.findParentOfType import com.intellij.psi.util.parentOfType -import com.intellij.refactoring.suggested.startOffset +import com.intellij.psi.util.startOffset import com.intellij.util.SmartList import io.runescript.plugin.ide.RsBundle import io.runescript.plugin.lang.psi.* diff --git a/src/main/kotlin/io/runescript/plugin/symbollang/psi/mixin/RsSymSymbolMixin.kt b/src/main/kotlin/io/runescript/plugin/symbollang/psi/mixin/RsSymSymbolMixin.kt index ac46edd..5420d77 100644 --- a/src/main/kotlin/io/runescript/plugin/symbollang/psi/mixin/RsSymSymbolMixin.kt +++ b/src/main/kotlin/io/runescript/plugin/symbollang/psi/mixin/RsSymSymbolMixin.kt @@ -8,7 +8,7 @@ import com.intellij.psi.search.GlobalSearchScope import com.intellij.psi.search.SearchScope import com.intellij.psi.stubs.IStubElementType import com.intellij.psi.tree.IElementType -import com.intellij.refactoring.suggested.startOffset +import com.intellij.psi.util.startOffset import io.runescript.plugin.symbollang.psi.RsSymPsiImplUtil import io.runescript.plugin.symbollang.psi.RsSymSymbol import io.runescript.plugin.symbollang.psi.isConstantFile