diff --git a/.github/workflows/prepare-build-environment/action.yml b/.github/workflows/prepare-build-environment/action.yml index 3078dd3..605c3af 100644 --- a/.github/workflows/prepare-build-environment/action.yml +++ b/.github/workflows/prepare-build-environment/action.yml @@ -19,5 +19,5 @@ runs: - name: Setup .NET SDK uses: actions/setup-dotnet@v4 with: - dotnet-version: '8.0.x' + dotnet-version: '10.0.x' dotnet-quality: 'ga' \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c61911..2625e23 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## [1.3.0] +- Added service name to the generation tab title +- Dropped hardcoded NuGet source +- Updated to .NET 10 + ## [1.2.1] - Added scroll to dialog - Improved validation diff --git a/README.md b/README.md index 079598a..bcb2761 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,7 @@ | Plugin version | odata-cli version | |----------------|-------------------| +| 1.3.0 | 0.3.1, 0.3.0 | | 1.2.1 | 0.3.1, 0.3.0 | | 1.2.0 | 0.3.1, 0.3.0 | | 1.1.0 | 0.3.1, 0.3.0 | diff --git a/build.gradle.kts b/build.gradle.kts index 636c51d..3914131 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -50,7 +50,7 @@ dependencies { } tasks.wrapper { - gradleVersion = "8.8" + gradleVersion = "9.4.0" distributionType = Wrapper.DistributionType.ALL distributionUrl = "https://cache-redirector.jetbrains.com/services.gradle.org/distributions/gradle-${gradleVersion}-all.zip" } @@ -78,15 +78,14 @@ tasks.compileKotlin { intellijPlatform { pluginVerification { - cliPath = File("/libs/verifier-cli-1.398-all.jar") // https://github.com/JetBrains/intellij-plugin-verifier + cliPath = File("./libs/verifier-cli-1.401-all.jar") // https://github.com/JetBrains/intellij-plugin-verifier/releases ides { - create(IntelliJPlatformType.Rider, "2025.3") - create(IntelliJPlatformType.Rider, "2025.3.0.1") + create(IntelliJPlatformType.Rider, "2026.1") } } signing { - cliPath = File("./libs/marketplace-zip-signer-cli-0.1.43.jar") // https://github.com/JetBrains/marketplace-zip-signer + cliPath = File("./libs/marketplace-zip-signer-cli-0.1.43.jar") // https://github.com/JetBrains/marketplace-zip-signer/releases certificateChain = providers.environmentVariable("CERTIFICATE_CHAIN") privateKey = providers.environmentVariable("PRIVATE_KEY") password = providers.environmentVariable("PRIVATE_KEY_PASSWORD") diff --git a/gradle.properties b/gradle.properties index 3dd811c..27a79d4 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,7 +4,7 @@ DotnetPluginId=ReSharperPlugin.ODataCliUi DotnetSolution=ReSharperPlugin.ODataCliUi.sln RiderPluginId=ru.ellizio.odatacliui -PluginVersion=1.2.1-2025.3 +PluginVersion=1.3.0-2026.1 BuildConfiguration=Debug @@ -17,7 +17,7 @@ PublishToken="_PLACEHOLDER_" # Release: 2020.2 # EAP: 2020.3-EAP2-SNAPSHOT # Nightly: 2020.3-SNAPSHOT -ProductVersion=2025.3 +ProductVersion=2026.1 # Kotlin 1.4 will bundle the stdlib dependency by default, causing problems with the version bundled with the IDE # https://blog.jetbrains.com/kotlin/2020/07/kotlin-1-4-rc-released/#stdlib-default diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index e663fd2..eae5b2c 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,7 +1,7 @@ [versions] -kotlin = "2.1.20" # https://plugins.jetbrains.com/docs/intellij/using-kotlin.html#kotlin-standard-library -rdGen = "2025.3.1" # https://github.com/JetBrains/rd/releases -intellijPlatform = "2.10.4" # https://github.com/JetBrains/intellij-platform-gradle-plugin/releases +kotlin = "2.3.10" # https://plugins.jetbrains.com/docs/intellij/using-kotlin.html#kotlin-standard-library https://github.com/jetbrains/kotlin/releases +rdGen = "2026.1.3" # https://github.com/JetBrains/rd/releases +intellijPlatform = "2.13.1" # https://github.com/JetBrains/intellij-platform-gradle-plugin/releases gradleJvmWrapper = "0.15.0" # https://github.com/mfilippov/gradle-jvm-wrapper [libraries] diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 6def616..fb49328 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://cache-redirector.jetbrains.com/services.gradle.org/distributions/gradle-8.13-all.zip +distributionUrl=https\://cache-redirector.jetbrains.com/services.gradle.org/distributions/gradle-9.4.0-all.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/libs/verifier-cli-1.398-all.jar b/libs/verifier-cli-1.401-all.jar similarity index 92% rename from libs/verifier-cli-1.398-all.jar rename to libs/verifier-cli-1.401-all.jar index a0ba3dc..2f0cfc8 100644 Binary files a/libs/verifier-cli-1.398-all.jar and b/libs/verifier-cli-1.401-all.jar differ diff --git a/src/dotnet/Directory.Build.props b/src/dotnet/Directory.Build.props index 828a440..3542615 100644 --- a/src/dotnet/Directory.Build.props +++ b/src/dotnet/Directory.Build.props @@ -1,7 +1,7 @@ - net8.0 + net10.0 Latest MSB3277 true diff --git a/src/dotnet/Plugin.props b/src/dotnet/Plugin.props index ed8b86e..b60e4d2 100644 --- a/src/dotnet/Plugin.props +++ b/src/dotnet/Plugin.props @@ -3,7 +3,7 @@ - 2025.3.0 + 2026.1.0 OData CLI UI Description diff --git a/src/dotnet/ReSharperPlugin.ODataCliUi.Tests/TestEnvironment.cs b/src/dotnet/ReSharperPlugin.ODataCliUi.Tests/TestEnvironment.cs index 485919d..601e739 100644 --- a/src/dotnet/ReSharperPlugin.ODataCliUi.Tests/TestEnvironment.cs +++ b/src/dotnet/ReSharperPlugin.ODataCliUi.Tests/TestEnvironment.cs @@ -9,14 +9,13 @@ [assembly: Apartment(ApartmentState.STA)] -namespace ReSharperPlugin.ODataCliUi.Tests -{ - [ZoneDefinition] - public class ODataCliUiTestEnvironmentZone : ITestsEnvZone, IRequire, IRequire { } +namespace ReSharperPlugin.ODataCliUi.Tests; - [ZoneMarker] - public class ZoneMarker : IRequire, IRequire, IRequire { } +[ZoneDefinition] +public class ODataCliUiTestEnvironmentZone : ITestsEnvZone, IRequire, IRequire; - [SetUpFixture] - public class ODataCliUiTestsAssembly : ExtensionTestEnvironmentAssembly { } -} +[ZoneMarker] +public class ZoneMarker : IRequire, IRequire, IRequire; + +[SetUpFixture] +public class ODataCliUiTestsAssembly : ExtensionTestEnvironmentAssembly; \ No newline at end of file diff --git a/src/dotnet/ReSharperPlugin.ODataCliUi/IODataCliUiZone.cs b/src/dotnet/ReSharperPlugin.ODataCliUi/IODataCliUiZone.cs index 104057d..4c1eb4e 100644 --- a/src/dotnet/ReSharperPlugin.ODataCliUi/IODataCliUiZone.cs +++ b/src/dotnet/ReSharperPlugin.ODataCliUi/IODataCliUiZone.cs @@ -2,10 +2,7 @@ using JetBrains.ProjectModel; using JetBrains.ProjectModel.NuGet; -namespace ReSharperPlugin.ODataCliUi -{ - [ZoneDefinition] - public interface IODataCliUiZone : IZone, - IRequire, - IRequire; -} +namespace ReSharperPlugin.ODataCliUi; + +[ZoneDefinition] +public interface IODataCliUiZone : IZone, IRequire, IRequire; \ No newline at end of file diff --git a/src/dotnet/ReSharperPlugin.ODataCliUi/PluginHost.cs b/src/dotnet/ReSharperPlugin.ODataCliUi/PluginHost.cs index 3457de9..dbf936d 100644 --- a/src/dotnet/ReSharperPlugin.ODataCliUi/PluginHost.cs +++ b/src/dotnet/ReSharperPlugin.ODataCliUi/PluginHost.cs @@ -32,7 +32,9 @@ public PluginHost(ISolution solution, DotnetToolsTracker dotnetToolsTracker) dotnetToolsTracker.DotnetToolsCacheChanged += OnDotnetToolsCacheChanged; dotnetToolsTracker.Start(); } - + + private DotnetToolDefinition GetODataCliTool(Lifetime lifetime, Unit unit) => _odataCliTool; + private Task AddEmbeddedResourceAsync(Lifetime lifetime, EmbeddedResourceDefinition definition) { IProject project; @@ -41,15 +43,13 @@ private Task AddEmbeddedResourceAsync(Lifetime lifetime, EmbeddedResourceDefinit if (project is null) return Task.CompletedTask; - + var modifier = new ProjectModifier(project); modifier.AddEmbeddedResource(definition.Include); return Task.CompletedTask; } - private DotnetToolDefinition GetODataCliTool(Lifetime lifetime, Unit unit) => _odataCliTool; - private void OnDotnetToolsCacheChanged(DotNetToolCache cache) { var tool = cache.ToolGlobalCache.GetGlobalTool(Constants.MicrosoftODataCliPackageId)?.FirstOrDefault(); @@ -58,9 +58,5 @@ private void OnDotnetToolsCacheChanged(DotNetToolCache cache) : new DotnetToolDefinition(true, new DotnetToolVersionDefinition(tool.Version.Major, tool.Version.Minor, tool.Version.Patch)); } - public void Dispose() - { - if (_dotnetToolsTracker is not null) - _dotnetToolsTracker.DotnetToolsCacheChanged -= OnDotnetToolsCacheChanged; - } + public void Dispose() => _dotnetToolsTracker?.DotnetToolsCacheChanged -= OnDotnetToolsCacheChanged; } \ No newline at end of file diff --git a/src/rider/main/kotlin/ru/ellizio/odatacliui/Constants.kt b/src/rider/main/kotlin/ru/ellizio/odatacliui/Constants.kt index f053ddd..d9770b3 100644 --- a/src/rider/main/kotlin/ru/ellizio/odatacliui/Constants.kt +++ b/src/rider/main/kotlin/ru/ellizio/odatacliui/Constants.kt @@ -6,7 +6,5 @@ object Constants { const val MICROSOFT_ODATA_EDM_PACKAGE_ID = "Microsoft.OData.Edm" const val MICROSOFT_SPATIAL_PACKAGE_ID = "Microsoft.Spatial" - const val NUGET_SOURCE = "https://api.nuget.org/v3/index.json" - const val PLUGIN_NAME = "OData CLI UI" } \ No newline at end of file diff --git a/src/rider/main/kotlin/ru/ellizio/odatacliui/UiBundle.kt b/src/rider/main/kotlin/ru/ellizio/odatacliui/UiBundle.kt index 338df5c..fcfcb36 100644 --- a/src/rider/main/kotlin/ru/ellizio/odatacliui/UiBundle.kt +++ b/src/rider/main/kotlin/ru/ellizio/odatacliui/UiBundle.kt @@ -5,6 +5,8 @@ import org.jetbrains.annotations.PropertyKey private const val BUNDLE = "UiBundle" -object UiBundle : DynamicBundle(BUNDLE) { - fun text(@PropertyKey(resourceBundle = BUNDLE) key: String, vararg params: Any): String = getMessage(key, *params) +object UiBundle { + private val instance = DynamicBundle(UiBundle::class.java, BUNDLE) + + fun text(@PropertyKey(resourceBundle = BUNDLE) key: String, vararg params: Any): String = instance.getMessage(key, *params) } \ No newline at end of file diff --git a/src/rider/main/kotlin/ru/ellizio/odatacliui/actions/OpenCliDialogAction.kt b/src/rider/main/kotlin/ru/ellizio/odatacliui/actions/OpenCliDialogAction.kt index f994d6f..cd34b46 100644 --- a/src/rider/main/kotlin/ru/ellizio/odatacliui/actions/OpenCliDialogAction.kt +++ b/src/rider/main/kotlin/ru/ellizio/odatacliui/actions/OpenCliDialogAction.kt @@ -59,7 +59,7 @@ class OpenCliDialogAction : AnAction() { { var consoleView: ConsoleView? withContext(Dispatchers.EDT) { - consoleView = CliToolWindowManager.getInstance(project).instantiateConsole() + consoleView = CliToolWindowManager.getInstance(project).instantiateConsole(model.serviceName.get()) } val odataCliCommand = model.buildODataCliCommand() diff --git a/src/rider/main/kotlin/ru/ellizio/odatacliui/extensions/AnActionEventEx.kt b/src/rider/main/kotlin/ru/ellizio/odatacliui/extensions/AnActionEventEx.kt index 99341c1..21b4099 100644 --- a/src/rider/main/kotlin/ru/ellizio/odatacliui/extensions/AnActionEventEx.kt +++ b/src/rider/main/kotlin/ru/ellizio/odatacliui/extensions/AnActionEventEx.kt @@ -33,7 +33,7 @@ fun AnActionEvent.toMetadata(): ActionMetadata? { throw IllegalStateException("Selected item not supported") } - val projectPath = (descriptor.location as RdCustomLocation).customLocation + val projectPath = (descriptor.location as RdCustomLocation).customLocation.value return ActionMetadata(descriptor.name, projectPath) } \ No newline at end of file diff --git a/src/rider/main/kotlin/ru/ellizio/odatacliui/extensions/BatchCommandLineBuilderEx.kt b/src/rider/main/kotlin/ru/ellizio/odatacliui/extensions/BatchCommandLineBuilderEx.kt index c9d9396..a0bc484 100644 --- a/src/rider/main/kotlin/ru/ellizio/odatacliui/extensions/BatchCommandLineBuilderEx.kt +++ b/src/rider/main/kotlin/ru/ellizio/odatacliui/extensions/BatchCommandLineBuilderEx.kt @@ -1,6 +1,5 @@ package ru.ellizio.odatacliui.extensions -import ru.ellizio.odatacliui.Constants import ru.ellizio.odatacliui.terminal.builders.BatchCommandLineBuilder fun BatchCommandLineBuilder.dotnetAddPackageCommand(dotnetExePath: String?, csprojPath: String, packageId: String): BatchCommandLineBuilder { @@ -8,5 +7,4 @@ fun BatchCommandLineBuilder.dotnetAddPackageCommand(dotnetExePath: String?, cspr .withParameter(csprojPath) .withParameter("package") .withParameter(packageId) - .withParameter("-s", Constants.NUGET_SOURCE) } \ No newline at end of file diff --git a/src/rider/main/kotlin/ru/ellizio/odatacliui/models/CliDialogModel.kt b/src/rider/main/kotlin/ru/ellizio/odatacliui/models/CliDialogModel.kt index 7fb843c..d0fdaf9 100644 --- a/src/rider/main/kotlin/ru/ellizio/odatacliui/models/CliDialogModel.kt +++ b/src/rider/main/kotlin/ru/ellizio/odatacliui/models/CliDialogModel.kt @@ -27,7 +27,7 @@ class CliDialogModel(project: Project, private val actionMetadata: ActionMetadat init { odataCliTool = project.solution.protocolModel.getODataCliTool.sync(Unit) - dotnetCliPath = project.solution.dotNetActiveRuntimeModel.activeRuntime.valueOrNull?.dotNetCliExePath + dotnetCliPath = project.solution.dotNetActiveRuntimeModel.activeRuntime.valueOrNull?.dotNetCliExePath?.value atLeast031 = odataCliTool.version?.greaterOrEquals(0, 3, 1) ?: false } diff --git a/src/rider/main/kotlin/ru/ellizio/odatacliui/toolwindows/CliToolWindowManager.kt b/src/rider/main/kotlin/ru/ellizio/odatacliui/toolwindows/CliToolWindowManager.kt index 1f19de2..358beb1 100644 --- a/src/rider/main/kotlin/ru/ellizio/odatacliui/toolwindows/CliToolWindowManager.kt +++ b/src/rider/main/kotlin/ru/ellizio/odatacliui/toolwindows/CliToolWindowManager.kt @@ -25,14 +25,16 @@ class CliToolWindowManager(private val project: Project) { } } - fun instantiateConsole(): ConsoleView { + fun instantiateConsole(serviceName: String): ConsoleView { val consoleView = TextConsoleBuilderFactory.getInstance().createBuilder(project).console - val content = toolWindow.contentManager.factory.createContent(consoleView.component, UiBundle.text("cli.tab.generate"), true) - content.setDisposer(consoleView); + val content = toolWindow.contentManager.factory.createContent(consoleView.component, UiBundle.text("cli.tab.generate", serviceName), true) + content.setDisposer(consoleView) + toolWindow.contentManager.addContent(content) toolWindow.activate { toolWindow.contentManager.setSelectedContent(content) } + return consoleView } } \ No newline at end of file diff --git a/src/rider/main/resources/META-INF/plugin.xml b/src/rider/main/resources/META-INF/plugin.xml index b5bbf49..126681c 100644 --- a/src/rider/main/resources/META-INF/plugin.xml +++ b/src/rider/main/resources/META-INF/plugin.xml @@ -3,7 +3,7 @@ OData CLI UI _PLACEHOLDER_ ellizio - + com.intellij.modules.rider org.jetbrains.plugins.terminal UiBundle diff --git a/src/rider/main/resources/UiBundle.properties b/src/rider/main/resources/UiBundle.properties index aff2d93..156355b 100644 --- a/src/rider/main/resources/UiBundle.properties +++ b/src/rider/main/resources/UiBundle.properties @@ -33,4 +33,4 @@ cli.proxy.comment=Proxy settings cli.ok-action-button.tooltip.not-installed=OData CLI not installed # ToolWindow -cli.tab.generate=Generate +cli.tab.generate=Generate: {0}