Skip to content

Commit

Permalink
Update intellij plugin structure library
Browse files Browse the repository at this point in the history
Fixes #674
  • Loading branch information
zolotov committed Jul 12, 2021
1 parent 82de9ec commit cc403f1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## 1.1.3, not published

- Fixed dependency on `JavaScript` plugin [#674](../../issues/674)
- Fixed `releaseType` resolving for Rider versions in `-EAP#-SNAPSHOT` format.
- `runPluginVerifier`: verify required Java 11 environment for Plugin Verifier `1.260+`
- `pluginVerifier` – remove support for old versions `< 1.255` hosted on Bintray
Expand Down
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ dependencies {
exclude(group = "org.jetbrains.kotlin")
}
implementation("org.jetbrains:annotations:21.0.0")
implementation("org.jetbrains.intellij.plugins:structure-base:3.192") {
implementation("org.jetbrains.intellij.plugins:structure-base:3.194") {
exclude(group = "org.jetbrains.kotlin")
}
implementation("org.jetbrains.intellij.plugins:structure-intellij:3.192") {
implementation("org.jetbrains.intellij.plugins:structure-intellij:3.194") {
exclude(group = "org.jetbrains.kotlin")
}
implementation("javax.xml.bind:jaxb-api:2.3.1")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@ import java.io.File
import java.io.Serializable

class BuiltinPluginsRegistry(private val pluginsDirectory: File, private val context: String?) : Serializable {

private val plugins = mutableMapOf<String, PluginsCachePlugin>()
private val directoryNameMapping = mutableMapOf<String, String>()

@Transient
private val extractor = XmlExtractor<PluginsCache>()

companion object {
const val version = 1

fun fromDirectory(pluginsDirectory: File, context: String?) =
BuiltinPluginsRegistry(pluginsDirectory, context).apply {
if (!fillFromCache()) {
Expand Down Expand Up @@ -62,7 +63,7 @@ class BuiltinPluginsRegistry(private val pluginsDirectory: File, private val con
}
}

private fun cacheFile() = File(pluginsDirectory, "builtinRegistry.xml")
private fun cacheFile() = File(pluginsDirectory, "builtinRegistry-$version.xml")

fun findPlugin(name: String): File? {
val plugin = plugins[name] ?: plugins[directoryNameMapping[name]] ?: return null
Expand Down

0 comments on commit cc403f1

Please sign in to comment.