Skip to content

Commit

Permalink
Hotfix for missing methods in the new DSL v2 and disabled control val…
Browse files Browse the repository at this point in the history
…idation
  • Loading branch information
seclerp committed Jan 24, 2022
1 parent 177dc98 commit e35af90
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 10 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
<h2>1.2.1</h2>
<p>
<ul>
<li>Fix: NoSuchMethodError using the new DSL v2</li>
<li>Fix: Disabled optional fields require validation</li>
</ul>
</p>
<h2>1.2.0</h2>
<p>
<ul>
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ import org.apache.tools.ant.taskdefs.condition.Os
plugins {
id 'java'
id 'org.jetbrains.kotlin.jvm' version '1.5.30'
id 'org.jetbrains.intellij' version '1.2.0' // https://github.com/JetBrains/gradle-intellij-plugin/releases
id 'org.jetbrains.intellij' version '1.3.1' // https://github.com/JetBrains/gradle-intellij-plugin/releases
id 'com.jetbrains.rdgen' version '0.213.391' // https://www.myget.org/feed/rd-snapshots/package/maven/com.jetbrains.rd/rd-gen
}

ext {
isWindows = Os.isFamily(Os.FAMILY_WINDOWS)
rdLibDirectory = {
new File(intellij.getIdeaDependency(project).classes, "lib/rd")
new File(setupDependencies.idea.get().classes, "lib/rd")
}
}

Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ javaVersion=11
DotnetPluginId=Rider.Plugins.EfCore
DotnetSolution=Rider.Plugins.EfCore.sln
RiderPluginId=me.seclerp.rider.plugins.efcore
PluginVersion=1.2.0
PluginVersion=1.2.1

BuildConfiguration=Debug

Expand All @@ -19,7 +19,7 @@ RiderSdkVersion=2021.3.0
# Release: 2020.2
# Nightly: 2020.3-SNAPSHOT
# EAP: 2020.3-EAP2-SNAPSHOT
ProductVersion=2021.3
ProductVersion=2021.3.2

# 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
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ class UpdateDatabaseDialogWrapper(
.bindText(model::connection)
.validationOnInput(validator.connectionValidation())
.validationOnApply(validator.connectionValidation())
}.enabledIf(useDefaultConnectionCheckbox!!.selected.not())
.enabledIf(useDefaultConnectionCheckbox!!.selected.not())
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class UpdateDatabaseValidator(
}

fun connectionValidation(): ValidationInfoBuilder.(JBTextField) -> ValidationInfo? = {
if (it.text.isEmpty())
if (it.isEnabled && it.text.isEmpty())
error("Connection could not be empty")
else null
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,14 @@ class EfCoreDialogValidator(
}

fun buildConfigurationValidation(): ValidationInfoBuilder.(ComboBox<BuildConfigurationItem>) -> ValidationInfo? = {
if (commonOptions.buildConfiguration == null || availableBuildConfigurations.isEmpty())
if (it.isEnabled && (commonOptions.buildConfiguration == null || availableBuildConfigurations.isEmpty()))
error("Solution doesn't have any build configurations")
else
null
}

fun targetFrameworkValidation(): ValidationInfoBuilder.(ComboBox<BaseTargetFrameworkItem>) -> ValidationInfo? = {
if (commonOptions.targetFramework == null || targetFrameworkModel.size == 0)
if (it.isEnabled && (commonOptions.targetFramework == null || targetFrameworkModel.size == 0))
error("Startup project should have at least 1 supported target framework")
else
null
Expand Down
4 changes: 2 additions & 2 deletions src/rider/main/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<idea-plugin require-restart="true">
<id>me.seclerp.rider.plugins.efcore</id>
<name>Entity Framework Core UI</name>
<version>1.2.0</version>
<version>1.2.1</version>
<vendor url="https://github.com/seclerp">Andrew Rublyov</vendor>
<idea-version since-build="2021.3" />
<idea-version since-build="2021.3.2" />
<depends>com.intellij.modules.rider</depends>

<description>
Expand Down

0 comments on commit e35af90

Please sign in to comment.