Skip to content

Commit

Permalink
Prepare 231.0.0-eap01 release, fix deprecated usages of UI DSL alig…
Browse files Browse the repository at this point in the history
…nment functions
  • Loading branch information
seclerp committed Jan 19, 2023
1 parent bed0aff commit 9a73bd7
Show file tree
Hide file tree
Showing 14 changed files with 39 additions and 51 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [231.0.0-eap01] - 2023-01-19
### Added
- Enable support for Rider 2023.1 EAP 1

## [223.3.0] - 2023-01-10
### Changed
- Use .NET CLI from Rider's settings instead of global "dotnet" one
Expand Down Expand Up @@ -135,7 +139,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Suggesting installing dotnet `ef command` line tools if not installed (when opening solution that contains EF Core related projects)
- Deleting used database

[Unreleased]: https://github.com/seclerp/rider-efcore/compare/v223.3.0...HEAD
[Unreleased]: https://github.com/seclerp/rider-efcore/compare/v231.0.0-eap01...HEAD
[231.0.0-eap01]: https://github.com/seclerp/rider-efcore/compare/v223.2.0...v231.0.0-eap01
[223.3.0]: https://github.com/seclerp/rider-efcore/compare/v223.2.0...v223.3.0
[223.2.0]: https://github.com/seclerp/rider-efcore/compare/v223.1.0...v223.2.0
[223.1.0]: https://github.com/seclerp/rider-efcore/compare/v223.0.0...v223.1.0
Expand Down
11 changes: 1 addition & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ There are a couple of UI stuff for:

#### Using marketplace:

> **For EAP users**: you should add `https://plugins.jetbrains.com/plugins/eap/list` to your plugin repositories list before installing
1. Go to `Settings` / `Plugins` / `Marketplace`
1. Search for "Entity Framework Core UI"
1. Click `Install`, then `Save`
Expand Down Expand Up @@ -70,7 +68,7 @@ More about features and available dialogs you could read in [**the blog post**](
- `netstandard2.1` (only for Migrations projects)
- `netstandard2.0` (only for Migrations projects)

- EF Core global tools (`dotnet ef`) **5.0+** installed
- EF Core tools (`dotnet ef`) **5.0+** installed

> **Note**: Projects with older versions of EF Core might work, but with issues
Expand All @@ -84,15 +82,8 @@ More about features and available dialogs you could read in [**the blog post**](

#### Building plugin parts

- for stable version of Rider:

`./gradlew buildPlugin`


- for EAP version of Rider:

`./gradlew buildPlugin -PRiderSdkVersion=2022.3.0-eap01 -PProductVersion=2022.3-EAP1-SNAPSHOT`

It will build both frontend and backend parts.

#### Running
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import java.text.SimpleDateFormat
plugins {
id 'java'
id 'org.jetbrains.kotlin.jvm' version '1.6.21'
id 'org.jetbrains.intellij' version '1.11.0' // https://github.com/JetBrains/gradle-intellij-plugin/releases
id 'com.jetbrains.rdgen' version '2023.1.1' // https://www.myget.org/feed/rd-snapshots/package/maven/com.jetbrains.rd/rd-gen
id 'org.jetbrains.intellij' version '1.12.0' // https://github.com/JetBrains/gradle-intellij-plugin/releases
id 'com.jetbrains.rdgen' version '2023.1.1' // https://github.com/JetBrains/rd/releases
id 'org.jetbrains.changelog' version '2.0.0'
}

Expand Down
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ javaVersion=17
DotnetPluginId=Rider.Plugins.EfCore
DotnetSolution=Rider.Plugins.EfCore.sln
RiderPluginId=me.seclerp.rider.plugins.efcore
PluginVersion=223.3.0
PluginVersion=231.0.0-eap01

BuildConfiguration=Debug

Expand All @@ -15,12 +15,12 @@ PublishChannel=default
# Possible values:
# Release: 2021.2.0
# EAP: 2022.2.0-eap04
RiderSdkVersion=2022.3.1
RiderSdkVersion=2023.1.0-eap01
# Possible values (minor is omitted):
# Release: 2020.2
# Nightly: 2020.3-SNAPSHOT
# EAP: 2020.3-EAP2-SNAPSHOT
ProductVersion=2022.3.1
ProductVersion=2023.1-EAP1-SNAPSHOT

# 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
2 changes: 1 addition & 1 deletion src/dotnet/Plugin.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>

<PropertyGroup>
<SdkVersion Condition=" '$(SdkVersion)' == '' ">2022.3.1</SdkVersion>
<SdkVersion Condition=" '$(SdkVersion)' == '' ">2023.1.0-eap01</SdkVersion>

<Title>Entity Framework Core</Title>
<Description>JetBrains Rider plugin for Entity Framework Core</Description>
Expand Down
6 changes: 3 additions & 3 deletions src/dotnet/Rider.Plugins.EfCore/Tracking/SolutionTracker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public class SolutionTracker
private readonly NugetDependenciesListener _nugetListener;
private readonly SolutionStructureChangedListener _solutionListener;
private readonly ISolutionLoadTasksScheduler _solutionLoadScheduler;
private readonly NuGetDotnetToolsTracker _dotnetToolsTracker;
private readonly SolutionDotnetToolsTracker _dotnetToolsTracker;
private readonly ILogger _logger;

private readonly JetFastSemiReenterableRWLock _lock = new JetFastSemiReenterableRWLock();
Expand All @@ -31,7 +31,7 @@ public SolutionTracker(
NugetDependenciesListener nugetListener,
SolutionStructureChangedListener solutionListener,
ISolutionLoadTasksScheduler solutionLoadScheduler,
NuGetDotnetToolsTracker dotnetToolsTracker,
SolutionDotnetToolsTracker dotnetToolsTracker,
ILogger logger)
{
_lifetime = lifetime;
Expand All @@ -51,7 +51,7 @@ public void Setup()

var cache = args.New;

_logger.LogFlow($"{nameof(NuGetDotnetToolsTracker)}.DotNetToolCache.Change",
_logger.LogFlow($"{nameof(SolutionDotnetToolsTracker)}.DotNetToolCache.Change",
$"Calling {nameof(OnAfterToolsCacheUpdate)}");

OnAfterToolsCacheUpdate?.Invoke(cache);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import com.intellij.ui.TextFieldWithAutoCompletion
import com.intellij.ui.components.JBCheckBox
import com.intellij.ui.components.JBTextField
import com.intellij.ui.dsl.builder.*
import com.intellij.ui.dsl.gridLayout.HorizontalAlign
import com.intellij.util.textCompletion.TextFieldWithCompletion
import me.seclerp.observables.Observable
import me.seclerp.observables.ObservableProperty
Expand Down Expand Up @@ -39,7 +38,7 @@ fun <T : IconItem<*>> Row.iconComboBox(

return comboBox(model, IconComboBoxRendererAdapter())
.bindItem(selectedItemProperty.getter, selectedItemProperty.setter)
.horizontalAlign(HorizontalAlign.FILL)
.align(AlignX.FILL)
.applyToComponent {
// Setter provided above called only on submit, so we need additional change detection
addItemListener {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import com.intellij.openapi.components.service
import com.intellij.openapi.project.Project
import com.intellij.ui.components.JBCheckBox
import com.intellij.ui.dsl.builder.*
import com.intellij.ui.dsl.gridLayout.HorizontalAlign
import com.intellij.ui.layout.not
import com.intellij.ui.layout.selected
import me.seclerp.observables.bind
Expand All @@ -17,7 +16,6 @@ import me.seclerp.observables.ui.dsl.iconComboBox
import me.seclerp.rider.plugins.efcore.cli.api.DatabaseCommandFactory
import me.seclerp.rider.plugins.efcore.cli.api.models.DotnetEfVersion
import me.seclerp.rider.plugins.efcore.features.shared.dialog.CommonDialogWrapper
import me.seclerp.rider.plugins.efcore.ui.*
import me.seclerp.rider.plugins.efcore.ui.items.MigrationItem
import java.util.*

Expand Down Expand Up @@ -82,7 +80,7 @@ class UpdateDatabaseDialogWrapper(
.validationOnApply(validator.targetMigrationValidation())
.validationOnInput(validator.targetMigrationValidation())
.comment("Use <code>0</code> as a target migration to undo all applied migrations")
.horizontalAlign(HorizontalAlign.FILL)
.align(AlignX.FILL)
.focused()
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ import com.intellij.ui.ToolbarDecorator
import com.intellij.ui.components.JBCheckBox
import com.intellij.ui.components.JBTabbedPane
import com.intellij.ui.dsl.builder.*
import com.intellij.ui.dsl.gridLayout.HorizontalAlign
import com.intellij.ui.dsl.gridLayout.VerticalAlign
import com.intellij.ui.layout.not
import com.intellij.ui.layout.selected
import com.intellij.ui.table.JBTable
Expand Down Expand Up @@ -115,8 +113,7 @@ class ScaffoldDbContextDialogWrapper(
return panel {
row {
cell(tabbedPane)
.horizontalAlign(HorizontalAlign.FILL)
.verticalAlign(VerticalAlign.FILL)
.align(Align.FILL)
}.resizableRow()
}.apply {
registerIntegratedPanel(mainTab)
Expand All @@ -133,15 +130,15 @@ class ScaffoldDbContextDialogWrapper(
row("Connection:") {
textField()
.bindText(dataCtx.connection)
.horizontalAlign(HorizontalAlign.FILL)
.align(AlignX.FILL)
.validationOnInput(validator.connectionValidation())
.validationOnApply(validator.connectionValidation())
}

row("Provider:") {
textField()
.bindText(dataCtx.provider)
.horizontalAlign(HorizontalAlign.FILL)
.align(AlignX.FILL)
.validationOnInput(validator.providerValidation())
.validationOnApply(validator.providerValidation())
}
Expand All @@ -155,7 +152,7 @@ class ScaffoldDbContextDialogWrapper(
intellijProject,
"Select Output Folder")
.bindText(dataCtx.outputFolder)
.horizontalAlign(HorizontalAlign.FILL)
.align(AlignX.FILL)
.validationOnInput(validator.outputFolderValidation())
.validationOnApply(validator.outputFolderValidation())
.applyToComponent { dataCtx.migrationsProject.afterChange { this.isEnabled = it != null } }
Expand Down Expand Up @@ -189,7 +186,7 @@ class ScaffoldDbContextDialogWrapper(
row("Generated DbContext name:") {
textField()
.bindText(dataCtx.dbContextName)
.horizontalAlign(HorizontalAlign.FILL)
.align(AlignX.FILL)
.validationOnInput(validator.dbContextNameValidation())
.validationOnInput(validator.dbContextNameValidation())
}
Expand All @@ -200,7 +197,7 @@ class ScaffoldDbContextDialogWrapper(
intellijProject,
"Select Generated DbContext Folder")
.bindText(dataCtx.dbContextFolder)
.horizontalAlign(HorizontalAlign.FILL)
.align(AlignX.FILL)
.validationOnInput(validator.dbContextFolderValidation())
.validationOnInput(validator.dbContextFolderValidation())
.applyToComponent { dataCtx.migrationsProject.afterChange { this.isEnabled = it != null } }
Expand Down Expand Up @@ -250,8 +247,7 @@ class ScaffoldDbContextDialogWrapper(

row {
cell(tablePanel)
.horizontalAlign(HorizontalAlign.FILL)
.verticalAlign(VerticalAlign.FILL)
.align(Align.FILL)
.enabledIf(enabledCheckbox!!.selected.not())
}.resizableRow()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import com.intellij.execution.configurations.GeneralCommandLine
import com.intellij.openapi.components.service
import com.intellij.openapi.project.Project
import com.intellij.ui.components.JBTextField
import com.intellij.ui.dsl.builder.AlignX
import com.intellij.ui.dsl.builder.Panel
import com.intellij.ui.dsl.gridLayout.HorizontalAlign
import me.seclerp.observables.bind
import me.seclerp.observables.observable
import me.seclerp.observables.withLogger
Expand Down Expand Up @@ -72,7 +72,7 @@ class AddMigrationDialogWrapper(
row("Migration name:") {
textField()
.bindText(dataCtx.migrationName)
.horizontalAlign(HorizontalAlign.FILL)
.align(AlignX.FILL)
.validationOnInput(validator.migrationNameValidation())
.validationOnApply(validator.migrationNameValidation())
.focused()
Expand All @@ -87,7 +87,7 @@ class AddMigrationDialogWrapper(
row("Migrations folder:") {
textFieldForRelativeFolder(migrationProjectFolder.getter, intellijProject, "Select Migrations Folder")
.bindText(dataCtx.migrationsOutputFolder)
.horizontalAlign(HorizontalAlign.FILL)
.align(AlignX.FILL)
.validationOnInput(validator.migrationsOutputFolderValidation())
.validationOnApply(validator.migrationsOutputFolderValidation())
.applyToComponent {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import com.intellij.execution.configurations.GeneralCommandLine
import com.intellij.openapi.components.service
import com.intellij.openapi.project.Project
import com.intellij.ui.dsl.builder.*
import com.intellij.ui.dsl.gridLayout.HorizontalAlign
import me.seclerp.observables.bind
import me.seclerp.observables.observable
import me.seclerp.observables.observableList
Expand Down Expand Up @@ -117,13 +116,13 @@ class GenerateScriptDialogWrapper(
.validationOnApply(validator.fromMigrationValidation())
.validationOnInput(validator.fromMigrationValidation())
.comment("'0' means before the first migration")
.horizontalAlign(HorizontalAlign.FILL)
.align(AlignX.FILL)
.focused()
}

row("To migration:") {
iconComboBox(toMigrationView, toMigrationsView)
.horizontalAlign(HorizontalAlign.FILL)
.align(AlignX.FILL)
.focused()
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package me.seclerp.rider.plugins.efcore.features.preview

import com.intellij.execution.configurations.GeneralCommandLine
import com.intellij.openapi.ui.DialogWrapper
import com.intellij.ui.dsl.builder.AlignX
import com.intellij.ui.dsl.builder.panel
import com.intellij.ui.dsl.gridLayout.HorizontalAlign
import me.seclerp.rider.plugins.efcore.ui.readonlyExpandableTextField
import java.awt.Dimension
import javax.swing.Action
Expand All @@ -22,12 +22,12 @@ class CommandPreviewDialogWrapper(
override fun createCenterPanel(): JComponent = panel {
row("Working directory:") {
readonlyExpandableTextField { cliCommand.workDirectory.path }
.horizontalAlign(HorizontalAlign.FILL)
.align(AlignX.FILL)
}

row("Command:") {
readonlyExpandableTextField { cliCommand.commandLineString }
.horizontalAlign(HorizontalAlign.FILL)
.align(AlignX.FILL)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import com.intellij.openapi.components.service
import com.intellij.openapi.project.Project
import com.intellij.openapi.ui.DialogPanel
import com.intellij.ui.components.JBCheckBox
import com.intellij.ui.dsl.builder.AlignX
import com.intellij.ui.dsl.builder.Panel
import com.intellij.ui.dsl.builder.panel
import com.intellij.ui.dsl.gridLayout.HorizontalAlign
import com.intellij.ui.layout.not
import com.intellij.ui.layout.selected
import com.jetbrains.rd.util.reactive.hasValue
Expand Down Expand Up @@ -330,7 +330,7 @@ abstract class CommonDialogWrapper<TContext : CommonDataContext>(
if (efCoreVersion.major >= 5) {
row("Additional arguments:") {
simpleExpandableTextField(dataCtx.additionalArguments)
.horizontalAlign(HorizontalAlign.FILL)
.align(AlignX.FILL)
}
}
row("EF Core tools:") {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package me.seclerp.rider.plugins.efcore.settings

import com.intellij.openapi.options.BoundConfigurable
import com.intellij.ui.dsl.builder.AlignX
import com.intellij.ui.dsl.builder.bindSelected
import com.intellij.ui.dsl.builder.panel
import com.intellij.ui.dsl.gridLayout.HorizontalAlign
import me.seclerp.rider.plugins.efcore.state.DialogsStateService

class EfCoreUiConfigurable : BoundConfigurable("EF Core UI") {
Expand All @@ -14,13 +14,13 @@ class EfCoreUiConfigurable : BoundConfigurable("EF Core UI") {
row {
checkBox("Use previously selected options in dialogs")
.bindSelected(settingsStateService::usePreviouslySelectedOptionsInDialogs)
.horizontalAlign(HorizontalAlign.FILL)
.align(AlignX.FILL)
.comment("<b>Experimental</b>: If enabled, next opened dialog instance will reuse data from a previous one")
}
row {
checkBox("Store sensitive data in a secure store")
.bindSelected(settingsStateService::storeSensitiveData)
.horizontalAlign(HorizontalAlign.FILL)
.align(AlignX.FILL)
.comment("If enabled, plugin will securely store data that may contain credentials, such as \"Additional arguments\" or \"Connection\" fields<br/>" +
"<b>Please use this option carefully</b>, as it could lead to accidents on non-local environments")
}
Expand All @@ -34,7 +34,7 @@ class EfCoreUiConfigurable : BoundConfigurable("EF Core UI") {
row {
checkBox("Execute commands in terminal")
.bindSelected(settingsStateService::useTerminalExecution)
.horizontalAlign(HorizontalAlign.FILL)
.align(AlignX.FILL)
.comment("If enabled, command will be executed in the terminal with full output available")
}
}
Expand Down

0 comments on commit 9a73bd7

Please sign in to comment.