diff --git a/.gitignore b/.gitignore
index 4d352d4..822703c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -127,6 +127,5 @@ gradle-app.setting
# End of https://www.toptal.com/developers/gitignore/api/gradle,intellij
.DS_Store
-/.idea
.intellijPlatform
.kotlin
\ No newline at end of file
diff --git a/.idea/icon.svg b/.idea/icon.svg
new file mode 100755
index 0000000..9eea85b
--- /dev/null
+++ b/.idea/icon.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/.intellijPlatform/localPlatformArtifacts/bundledPlugin-org.jetbrains.plugins.yaml-2024.2.0.2+665.xml b/.intellijPlatform/localPlatformArtifacts/bundledPlugin-org.jetbrains.plugins.yaml-2024.2.0.2+665.xml
deleted file mode 100644
index 77e3488..0000000
--- a/.intellijPlatform/localPlatformArtifacts/bundledPlugin-org.jetbrains.plugins.yaml-2024.2.0.2+665.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/CHANGELOG.md b/CHANGELOG.md
index de268b6..93ba97c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,35 +2,14 @@
## 2.6.0+jre21
published to:
-- [JetBrains marketplace](https://plugins.jetbrains.com/plugin/15673-asyncapi/versions/stable/520779)
-- [GitHub](https://github.com/asyncapi/jasyncapi-idea-plugin/releases/tag/2.5.0%2Bjre17)
+- [JetBrains marketplace](https://plugins.jetbrains.com/plugin/15673-asyncapi/edit/versions/stable/596939)
+- [GitHub](https://github.com/asyncapi/jasyncapi-idea-plugin/releases/new?tag=2.6.0%2Bjre17)
### Added
- IDEA 2024.2
-
-### Fixed
-
-- No fixes included
-
-### Changed
-
-- bump actions/checkout from 3 to 4
-- bump actions/setup-node from 3 to 4
-- bump actions/stale from 5.2.0 to 9.0.0
-- bump amannn/action-semantic-pull-request from 5.2.0 to 5.5.3
-- bump com.fasterxml.jackson.core:jackson-core from 2.15.0 to 2.17.2
-- bump com.fasterxml.jackson.dataformat:jackson-dataformat-yaml from 2.15.0 to 2.17.2
-- bump com.fasterxml.jackson.module:jackson-module-kotlin from 2.15.0 to 2.17.2
-- bump hmarr/auto-approve-action from 3.2.1 to 4.0.0
-- bump jvm from 1.9.23 to 2.0.20
-- bump marocchino/sticky-pull-request-comment from 2.5.0 to 2.9.0
-- bump org.jetbrains.intellij from 1.17.3 to 1.17.4
-- bump org.junit.jupiter:junit-jupiter-api from 5.9.2 to 5.11.0
-- bump org.junit.jupiter:junit-jupiter-engine from 5.9.2 to 5.11.0
-- bump org.junit.vintage:junit-vintage-engine from 5.9.2 to 5.11.0
-- bump pascalgn/automerge-action from 0.15.6 to 0.16.3
-
+- Yaml single quoted references handling - '#/components/messages/welcomeMessage'
+- `.yml` file recognition
## 2.5.0+jre17
published to:
diff --git a/build.gradle.kts b/build.gradle.kts
index 96135d2..0fbfb97 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -20,7 +20,14 @@ repositories {
dependencies {
intellijPlatform {
- intellijIdeaCommunity("2024.2.0.2", useInstaller = false)
+ /*
+ Our developers believe that you likely built the plugin against version 2024.2, which includes
+ a companion object in this class. As a result, the generated bytecode references it. To ensure compatibility,
+ the plugin should be built against the lowest supported version, which in this case is 2022.3.
+
+ Please adjust the IntelliJ version to 2022.3 in the Gradle build script and try building the plugin again.
+ */
+ intellijIdeaCommunity("2022.3", useInstaller = false) // MUST NOT be changed
// Plugin Dependencies. Uses `platformBundledPlugins` property from the gradle.properties file for bundled IntelliJ Platform plugins.
bundledPlugins(listOf(
@@ -55,6 +62,8 @@ intellijPlatform {
Added
IDEA 2024.2
+
Yaml single quoted references handling - '#/components/messages/welcomeMessage', '../common/messages/welcomeMessage.yml'
+
.yml file recognition
""".trimIndent()
}
@@ -101,7 +110,8 @@ intellijPlatform {
"2024.1.6",
"2024.2",
"2024.2.0.1",
- "2024.2.0.2"
+ "2024.2.0.2",
+ "2024.2.1"
))
}
}
diff --git a/src/main/kotlin/com/asyncapi/plugin/idea/extensions/psi/reference/contributor/yaml/AsyncAPISpecificationReferenceContributor.kt b/src/main/kotlin/com/asyncapi/plugin/idea/extensions/psi/reference/contributor/yaml/AsyncAPISpecificationReferenceContributor.kt
index 25a59f9..31c792d 100644
--- a/src/main/kotlin/com/asyncapi/plugin/idea/extensions/psi/reference/contributor/yaml/AsyncAPISpecificationReferenceContributor.kt
+++ b/src/main/kotlin/com/asyncapi/plugin/idea/extensions/psi/reference/contributor/yaml/AsyncAPISpecificationReferenceContributor.kt
@@ -18,7 +18,8 @@ class AsyncAPISpecificationReferenceContributor: PsiReferenceContributor() {
override fun registerReferenceProviders(registrar: PsiReferenceRegistrar) {
registrar.registerReferenceProvider(localReferencePattern(), AsyncAPILocalReferenceProvider())
- registrar.registerReferenceProvider(fileReferencePattern(), AsyncAPIFileReferenceProvider())
+ registrar.registerReferenceProvider(yamlFileReferencePattern(), AsyncAPIFileReferenceProvider())
+ registrar.registerReferenceProvider(ymlFileReferencePattern(), AsyncAPIFileReferenceProvider())
}
private fun localReferencePattern(): PsiElementPattern.Capture {
@@ -33,7 +34,7 @@ class AsyncAPISpecificationReferenceContributor: PsiReferenceContributor() {
return expectedChild.withParent(expectedParent)
}
- private fun fileReferencePattern(): PsiElementPattern.Capture {
+ private fun yamlFileReferencePattern(): PsiElementPattern.Capture {
val expectedChild = PlatformPatterns.psiElement(YAMLQuotedText::class.java)
.withText(StandardPatterns.string().contains(".yaml"))
@@ -44,4 +45,15 @@ class AsyncAPISpecificationReferenceContributor: PsiReferenceContributor() {
return expectedChild.withParent(expectedParent)
}
+ private fun ymlFileReferencePattern(): PsiElementPattern.Capture {
+ val expectedChild = PlatformPatterns.psiElement(YAMLQuotedText::class.java)
+ .withText(StandardPatterns.string().contains(".yml"))
+
+ val expectedParent = PlatformPatterns.psiElement(YAMLKeyValue::class.java)
+ .withName("\$ref")
+ .withChild(expectedChild)
+
+ return expectedChild.withParent(expectedParent)
+ }
+
}
\ No newline at end of file