Skip to content

Commit

Permalink
Merge branch 'master' into feat/preview_panel
Browse files Browse the repository at this point in the history
  • Loading branch information
Pakisan committed Sep 6, 2024
2 parents dce6aa5 + 21ffe88 commit 6ba163f
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 40 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,5 @@ gradle-app.setting
# End of https://www.toptal.com/developers/gitignore/api/gradle,intellij

.DS_Store
/.idea
.intellijPlatform
.kotlin
1 change: 1 addition & 0 deletions .idea/icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

This file was deleted.

29 changes: 4 additions & 25 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
14 changes: 12 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -55,6 +62,8 @@ intellijPlatform {
<h3>Added</h3>
<ul>
<li>IDEA 2024.2</li>
<li>Yaml single quoted references handling - '#/components/messages/welcomeMessage', '../common/messages/welcomeMessage.yml'</li>
<li><code>.yml</code> file recognition</li>
</ul>
""".trimIndent()
}
Expand Down Expand Up @@ -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"
))
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<YAMLQuotedText> {
Expand All @@ -33,7 +34,7 @@ class AsyncAPISpecificationReferenceContributor: PsiReferenceContributor() {
return expectedChild.withParent(expectedParent)
}

private fun fileReferencePattern(): PsiElementPattern.Capture<YAMLQuotedText> {
private fun yamlFileReferencePattern(): PsiElementPattern.Capture<YAMLQuotedText> {
val expectedChild = PlatformPatterns.psiElement(YAMLQuotedText::class.java)
.withText(StandardPatterns.string().contains(".yaml"))

Expand All @@ -44,4 +45,15 @@ class AsyncAPISpecificationReferenceContributor: PsiReferenceContributor() {
return expectedChild.withParent(expectedParent)
}

private fun ymlFileReferencePattern(): PsiElementPattern.Capture<YAMLQuotedText> {
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)
}

}

0 comments on commit 6ba163f

Please sign in to comment.