Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/prepare-build-environment/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
9 changes: 4 additions & 5 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down Expand Up @@ -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")
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Binary file not shown.
2 changes: 1 addition & 1 deletion src/dotnet/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<LangVersion>Latest</LangVersion>
<NoWarn>MSB3277</NoWarn>
<NoPackageAnalysis>true</NoPackageAnalysis>
Expand Down
2 changes: 1 addition & 1 deletion src/dotnet/Plugin.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<!-- See https://www.nuget.org/packages/JetBrains.ReSharper.SDK -->
<!-- Keep in sync with ProductVersion in gradle.properties -->
<SdkVersion>2025.3.0</SdkVersion>
<SdkVersion>2026.1.0</SdkVersion>

<Title>OData CLI UI</Title>
<Description>Description</Description>
Expand Down
17 changes: 8 additions & 9 deletions src/dotnet/ReSharperPlugin.ODataCliUi.Tests/TestEnvironment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,13 @@

[assembly: Apartment(ApartmentState.STA)]

namespace ReSharperPlugin.ODataCliUi.Tests
{
[ZoneDefinition]
public class ODataCliUiTestEnvironmentZone : ITestsEnvZone, IRequire<PsiFeatureTestZone>, IRequire<IODataCliUiZone> { }
namespace ReSharperPlugin.ODataCliUi.Tests;

[ZoneMarker]
public class ZoneMarker : IRequire<ICodeEditingZone>, IRequire<ILanguageCSharpZone>, IRequire<ODataCliUiTestEnvironmentZone> { }
[ZoneDefinition]
public class ODataCliUiTestEnvironmentZone : ITestsEnvZone, IRequire<PsiFeatureTestZone>, IRequire<IODataCliUiZone>;

[SetUpFixture]
public class ODataCliUiTestsAssembly : ExtensionTestEnvironmentAssembly<ODataCliUiTestEnvironmentZone> { }
}
[ZoneMarker]
public class ZoneMarker : IRequire<ICodeEditingZone>, IRequire<ILanguageCSharpZone>, IRequire<ODataCliUiTestEnvironmentZone>;

[SetUpFixture]
public class ODataCliUiTestsAssembly : ExtensionTestEnvironmentAssembly<ODataCliUiTestEnvironmentZone>;
11 changes: 4 additions & 7 deletions src/dotnet/ReSharperPlugin.ODataCliUi/IODataCliUiZone.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@
using JetBrains.ProjectModel;
using JetBrains.ProjectModel.NuGet;

namespace ReSharperPlugin.ODataCliUi
{
[ZoneDefinition]
public interface IODataCliUiZone : IZone,
IRequire<IProjectModelZone>,
IRequire<INuGetZone>;
}
namespace ReSharperPlugin.ODataCliUi;

[ZoneDefinition]
public interface IODataCliUiZone : IZone, IRequire<IProjectModelZone>, IRequire<INuGetZone>;
14 changes: 5 additions & 9 deletions src/dotnet/ReSharperPlugin.ODataCliUi/PluginHost.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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();
Expand All @@ -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;
}
2 changes: 0 additions & 2 deletions src/rider/main/kotlin/ru/ellizio/odatacliui/Constants.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
6 changes: 4 additions & 2 deletions src/rider/main/kotlin/ru/ellizio/odatacliui/UiBundle.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
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 {
return addCommand(dotnetExePath ?: "dotnet", "add")
.withParameter(csprojPath)
.withParameter("package")
.withParameter(packageId)
.withParameter("-s", Constants.NUGET_SOURCE)
}
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
2 changes: 1 addition & 1 deletion src/rider/main/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<name>OData CLI UI</name>
<version>_PLACEHOLDER_</version>
<vendor url="https://github.com/ellizio/odata-cli-ui">ellizio</vendor>
<idea-version since-build="253" until-build="253.*" />
<idea-version since-build="261" until-build="261.*" />
<depends>com.intellij.modules.rider</depends>
<depends>org.jetbrains.plugins.terminal</depends>
<resource-bundle>UiBundle</resource-bundle>
Expand Down
2 changes: 1 addition & 1 deletion src/rider/main/resources/UiBundle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Loading