Skip to content
This repository has been archived by the owner on Dec 22, 2024. It is now read-only.

Commit

Permalink
Bump org.jetbrains.intellij.platform to v2.0.0-RC1
Browse files Browse the repository at this point in the history
  • Loading branch information
InSyncWithFoo committed Jul 20, 2024
1 parent 92b21bb commit d019e09
Show file tree
Hide file tree
Showing 8 changed files with 45 additions and 43 deletions.
2 changes: 1 addition & 1 deletion .run/Run IDE for UI Tests.run.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</option>
<option name="taskNames">
<list>
<option value="testIdeUi"/>
<option value="runIdeForUiTests"/>
</list>
</option>
<option name="vmOptions"/>
Expand Down
33 changes: 22 additions & 11 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import org.jetbrains.changelog.Changelog
import org.jetbrains.changelog.markdownToHTML
import org.jetbrains.intellij.platform.gradle.Constants.Constraints
import org.jetbrains.intellij.platform.gradle.TestFrameworkType

fun properties(key: String) = providers.gradleProperty(key)
fun environment(key: String) = providers.environmentVariable(key)

plugins {
alias(libs.plugins.kotlin)
alias(libs.plugins.intellijPlatform)
alias(libs.plugins.intelliJPlatform)
alias(libs.plugins.changelog)
alias(libs.plugins.qodana)
alias(libs.plugins.kover)
Expand All @@ -33,7 +34,7 @@ repositories {

// Dependencies are managed with Gradle version catalog - read more: https://docs.gradle.org/current/userguide/platforms.html#sub:version-catalog
dependencies {
testImplementation(kotlin("test"))
testImplementation(libs.junit)

// IntelliJ Platform Gradle Plugin Dependencies Extension - read more: https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-dependencies-extension.html
intellijPlatform {
Expand Down Expand Up @@ -141,16 +142,26 @@ tasks {
gradleVersion = properties("gradleVersion").get()
}

// Configure UI tests plugin
// Read more: https://github.com/JetBrains/intellij-ui-test-robot
testIdeUi {
systemProperty("robot-server.port", "8082")
systemProperty("ide.mac.message.dialogs.as.sheets", "false")
systemProperty("jb.privacy.policy.text", "<!--999.999-->")
systemProperty("jb.consents.confirmation.enabled", "false")
}

publishPlugin {
dependsOn(patchChangelog)
}
}

// Configure UI tests plugin
// Read more: https://github.com/JetBrains/intellij-ui-test-robot
val runIdeForUiTests by intellijPlatformTesting.runIde.registering {
task {
jvmArgumentProviders += CommandLineArgumentProvider {
listOf(
"-Drobot-server.port=8082",
"-Dide.mac.message.dialogs.as.sheets=false",
"-Djb.privacy.policy.text=<!--999.999-->",
"-Djb.consents.confirmation.enabled=false",
)
}
}

plugins {
robotServerPlugin(Constraints.LATEST_VERSION)
}
}
16 changes: 0 additions & 16 deletions docs/assets/icon-outline.svg

This file was deleted.

1 change: 1 addition & 0 deletions docs/assets/icon-outline.svg
2 changes: 1 addition & 1 deletion docs/how-to.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## How to install the Pyright executables

Choose one that works for you (or one you like the most):
Choose one that works for you:

```shell
$ pip install pyright
Expand Down
12 changes: 9 additions & 3 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
[versions]
# libraries
annotations = "24.1.0"
junit = "4.13.2"

# plugins
changelog = "2.2.1"
intellijPlatform = "2.0.0-beta9"
intelliJPlatform = "2.0.0-RC1"
kotlin = "2.0.0"
kover = "0.8.2"
qodana = "2024.1.5"
Expand All @@ -14,13 +15,18 @@ group = "org.jetbrains"
name = "annotations"
version.ref = "annotations"

[libraries.junit]
group = "junit"
name = "junit"
version.ref = "junit"

[plugins.changelog]
id = "org.jetbrains.changelog"
version.ref = "changelog"

[plugins.intellijPlatform]
[plugins.intelliJPlatform]
id = "org.jetbrains.intellij.platform"
version.ref = "intellijPlatform"
version.ref = "intelliJPlatform"

[plugins.kotlin]
id = "org.jetbrains.kotlin.jvm"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ internal fun Row.reactiveLabel(property: ObservableMutableProperty<String>) =
comment("").bindText(property)


internal class ExecutablePathHintState(private val makeValidPathHint: (Path) -> Hint) {
internal class PathHintState(private val makeValidPathHint: (Path) -> Hint) {

private val propertyGraph = PropertyGraph()

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.insyncwithfoo.pyrightls.configuration.application

import com.insyncwithfoo.pyrightls.configuration.ExecutablePathHintState
import com.insyncwithfoo.pyrightls.configuration.Hint
import com.insyncwithfoo.pyrightls.configuration.PathHintState
import com.insyncwithfoo.pyrightls.configuration.executablePathResolvingHint
import com.insyncwithfoo.pyrightls.configuration.makeFlexible
import com.insyncwithfoo.pyrightls.configuration.reactiveLabel
Expand All @@ -22,8 +22,8 @@ import com.intellij.ui.dsl.builder.toNonNullableProperty
import com.intellij.ui.dsl.builder.toNullableProperty


private fun relativePathHint() =
Hint.error(message("configurations.hint.globalMustBeAbsolute"))
private val relativePathHint: Hint
get() = Hint.error(message("configurations.hint.globalMustBeAbsolute"))


private fun Row.makeAlwaysUseGlobalInput(block: Cell<JBCheckBox>.() -> Unit) =
Expand Down Expand Up @@ -102,9 +102,9 @@ private fun Row.makeMonkeypatchTrailingQuoteBugInput(block: Cell<JBCheckBox>.()

@Suppress("DialogTitleCapitalization")
internal fun configurationPanel(state: Configurations) = panel {
val executablePathHintState = ExecutablePathHintState { path ->
val executablePathHintState = PathHintState { path ->
when {
!path.isAbsolute -> relativePathHint()
!path.isAbsolute -> relativePathHint
else -> executablePathResolvingHint(path)
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.insyncwithfoo.pyrightls.configuration.project

import com.insyncwithfoo.pyrightls.configuration.ExecutablePathHintState
import com.insyncwithfoo.pyrightls.configuration.Hint
import com.insyncwithfoo.pyrightls.configuration.PathHintState
import com.insyncwithfoo.pyrightls.configuration.executablePathResolvingHint
import com.insyncwithfoo.pyrightls.configuration.makeFlexible
import com.insyncwithfoo.pyrightls.configuration.reactiveLabel
Expand All @@ -24,8 +24,8 @@ import com.intellij.ui.dsl.builder.toNonNullableProperty
import com.intellij.ui.dsl.builder.toNullableProperty


private fun unresolvablePathHint() =
Hint.error(message("configurations.hint.unresolvablePath"))
private val unresolvablePathHint: Hint
get() = Hint.error(message("configurations.hint.unresolvablePath"))


private fun Row.makeProjectExecutableInput(block: Cell<TextFieldWithBrowseButton>.() -> Unit) =
Expand Down Expand Up @@ -67,9 +67,9 @@ private fun Row.makeAutoSearchPathsInput(block: Cell<JBCheckBox>.() -> Unit) =


internal fun Configurable.configurationPanel(state: Configurations) = panel {
val executablePathHintState = ExecutablePathHintState { path ->
val executablePathHintState = PathHintState { path ->
when {
project.path == null && !path.isAbsolute -> unresolvablePathHint()
project.path == null && !path.isAbsolute -> unresolvablePathHint
else -> executablePathResolvingHint(path.resolvedAgainst(project.path))
}
}
Expand Down

0 comments on commit d019e09

Please sign in to comment.