Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding 'Don't show again' button to ef core tools warning, resolves #213 #216

Open
wants to merge 58 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
429bac0
Adding 'Don't show again' button to ef core tools warning, resolves #213
Nepp3r Mar 27, 2024
00b5308
Update src/rider/main/kotlin/com/jetbrains/rider/plugins/efcore/featu…
Nepp3r Mar 28, 2024
174a571
Update src/rider/main/kotlin/com/jetbrains/rider/plugins/efcore/start…
Nepp3r Mar 28, 2024
060bdea
Change get/set functions with field and removing unnecessary description
Nepp3r Mar 28, 2024
7d3d6ae
Update src/rider/main/kotlin/com/jetbrains/rider/plugins/efcore/state…
Nepp3r Mar 28, 2024
5bc3079
Update src/rider/main/kotlin/com/jetbrains/rider/plugins/efcore/state…
Nepp3r Mar 28, 2024
c669795
Update src/rider/main/kotlin/com/jetbrains/rider/plugins/efcore/featu…
Nepp3r Mar 28, 2024
0ed0b5d
Fix typo
Nepp3r Apr 1, 2024
eda611a
Use Product.Root file as an indication that we are in the internal build
denis417 Apr 3, 2024
6d669f8
[RIDER] Change update thread for actions related on project model inf…
Apr 17, 2024
a9f347a
migrate rider-efcore to new rdgen approach
mfilippov Apr 18, 2024
80aef57
fix .gitignore and cleanup
mfilippov Apr 18, 2024
9fe352e
cleanup fotTea plugin
mfilippov Apr 18, 2024
09aad3a
unify efcore plugin settings
mfilippov Apr 18, 2024
ea5a723
Rider EFCore plugin: move the generated sources
ForNeVeR Apr 23, 2024
ca2baa4
Rider EFCore plugin: new way of detecting internal builds
ForNeVeR Apr 23, 2024
ba7321a
Rider EFCore plugin: migrate to IntelliJ Platform Gradle Plugin v2
ForNeVeR May 6, 2024
21558e6
[dotnet] Update help topic IDs
dmimat May 7, 2024
5e40749
[nuget]: Bump NuGet libs version
seclerp May 7, 2024
4921917
Update src/rider/main/kotlin/com/jetbrains/rider/plugins/efcore/start…
Nepp3r May 20, 2024
af3dfa3
IJPL-149476 remove unneeded and not correct "<idea-version since-buil…
develar May 13, 2024
8bf799d
Rider EFCore Plugin: fix plugin.xml inspections
ForNeVeR May 15, 2024
4b6a828
Rider EFCore: enable JBR for OSS builds
ForNeVeR May 20, 2024
9f89c88
[rider] Add RiderTestDataMarker with testData paths in every module w…
Konstantin343 May 31, 2024
fba2aea
[rider] Move intellij.rider.plugins.efCore testData
Konstantin343 Jun 3, 2024
75bb9dc
reindent all project files
mfilippov Jun 9, 2024
4cbf86d
unify ProjectReference item group
mfilippov Jun 9, 2024
14a87cd
reformat PackageReference item group
mfilippov Jun 9, 2024
bd3a883
Bump constants to 243
Jun 25, 2024
07ce676
[ef-core]: Fix incorrect service retrieval for `JsonSerializer`
seclerp Jul 16, 2024
a55afa6
Cleanup PropertyGroup elements in project files
mfilippov Jul 11, 2024
d8b3c8b
rider-efcore: migrate to IntelliJ Platform Gradle Plugin v2 beta 8
ForNeVeR Jul 16, 2024
726d8d4
rider-efcore: Gradle cleanup
ForNeVeR Jul 16, 2024
e3b75f5
Update rd
Iliya-usov Jul 12, 2024
7ae507a
NuGet 6.9.20240506.130 -> 6.10.20240726.136
Rizzen Jul 25, 2024
4ffae4f
[ef-core]: Fix RIDER-112371: Relax rules for `appsettings.json` and `…
seclerp Aug 6, 2024
975a723
[dotnet] obsolete default ctor of SolutionComponentAttribute
Aug 5, 2024
21f5726
migrate `ActionPlaces.isPopupPlace` usages
gregsh Aug 22, 2024
6149860
drop `ActionPlaces.isMainToolbar` usages
gregsh Aug 26, 2024
a8e866f
[project] pruning `FileChooserDescriptor` overrides (IJPL-150176 prer…
trespasserw Sep 4, 2024
5d29f17
autofix
Rizzen Sep 18, 2024
5af946d
IJ-CR-146078 extract intellij.platform.bootstrap
develar Oct 4, 2024
3e40c23
Upgrade JetBrains.NuGet.* to v6.12.20241007.141 (NP-1760)
Oct 7, 2024
dda3d82
Bump NuGet.Client 6.12.20241007.141 -> 6.12.20241010.144
Rizzen Oct 10, 2024
f05004f
.NET: update Rd to 2024.3.0
ForNeVeR Oct 9, 2024
1fb1020
Remove obsolete marketplace badge from the README
seclerp Oct 12, 2024
fe794a9
Bump constants to 251
Oct 15, 2024
a155d33
[efcore]: Fix RIDER-118684: Support .NET 9 projects
seclerp Oct 15, 2024
4ce98e2
Adding 'Don't show again' button to ef core tools warning, resolves #213
Nepp3r Nov 18, 2024
b39956c
Update src/rider/main/kotlin/com/jetbrains/rider/plugins/efcore/featu…
Nepp3r Mar 28, 2024
1ff4e9a
Update src/rider/main/kotlin/com/jetbrains/rider/plugins/efcore/start…
Nepp3r Mar 28, 2024
fab6d52
Change get/set functions with field and removing unnecessary description
Nepp3r Mar 28, 2024
02f1a16
Update src/rider/main/kotlin/com/jetbrains/rider/plugins/efcore/state…
Nepp3r Mar 28, 2024
7f3871d
Update src/rider/main/kotlin/com/jetbrains/rider/plugins/efcore/state…
Nepp3r Mar 28, 2024
32d712b
Update src/rider/main/kotlin/com/jetbrains/rider/plugins/efcore/featu…
Nepp3r Mar 28, 2024
c6a4307
Fix typo
Nepp3r Apr 1, 2024
28bd964
Update src/rider/main/kotlin/com/jetbrains/rider/plugins/efcore/start…
Nepp3r May 20, 2024
2dc2998
Merge branch 'DisEfCoreToolsNot' of github.com:Nepp3r/rider-efcore in…
Nepp3r Nov 18, 2024
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
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,8 @@ tasks {
}

patchPluginXml {
sinceBuild.set("233.0")
untilBuild.set("233.*")
sinceBuild.set("242.0")
untilBuild.set("242.*")
val latestChangelog = try {
changelog.getUnreleased()
} catch (_: MissingVersionException) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package com.jetbrains.rider.plugins.efcore.features.eftools

import com.intellij.notification.Notification
import com.intellij.openapi.actionSystem.AnAction
import com.intellij.openapi.actionSystem.AnActionEvent
import com.jetbrains.rider.plugins.efcore.EfCoreUiBundle
import com.jetbrains.rider.plugins.efcore.state.CommonOptionsStateService

class SuppressEfCoreToolsInstallation(private val notification : Notification) : AnAction(EfCoreUiBundle.message("action.install.ignore")) {
private val commonOptionsStateService by lazy { CommonOptionsStateService.getInstance() }
override fun actionPerformed(actionEvent: AnActionEvent) {
commonOptionsStateService.ProjectToolsInstallationSupressed = true
Nepp3r marked this conversation as resolved.
Show resolved Hide resolved
notification.hideBalloon()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,32 @@ import com.jetbrains.rd.util.lifetime.Lifetime
import com.jetbrains.rider.plugins.efcore.EfCoreUiBundle
import com.jetbrains.rider.plugins.efcore.KnownNotificationGroups
import com.jetbrains.rider.plugins.efcore.features.eftools.InstallDotnetEfAction
import com.jetbrains.rider.plugins.efcore.features.eftools.SuppressEfCoreToolsInstallation
import com.jetbrains.rider.plugins.efcore.rd.RiderEfCoreModel
import com.jetbrains.rider.plugins.efcore.state.CommonOptionsStateService

@Suppress("UnstableApiUsage")
class EfCoreStartupListener : SolutionExtListener<RiderEfCoreModel> {
private val commonOptionsStateService by lazy { CommonOptionsStateService.getInstance() }
override fun extensionCreated(lifetime: Lifetime, session: ClientProjectSession, model: RiderEfCoreModel) {
model.onMissingEfCoreToolsDetected.set { _, unit ->
NotificationGroupManager
.getInstance()
.getNotificationGroup(KnownNotificationGroups.efCore)
.createNotification(
EfCoreUiBundle.message("notification.title.ef.core.tools.required"),
EfCoreUiBundle.message("notification.content.ef.core.tools.are.required.to.execute.this.action"),
NotificationType.WARNING
)
.addAction(InstallDotnetEfAction())
.notify(session.project)
if(!commonOptionsStateService.ProjectToolsInstallationSupressed) {
model.onMissingEfCoreToolsDetected.set { _, unit ->
NotificationGroupManager
.getInstance()
.getNotificationGroup(KnownNotificationGroups.efCore)
.createNotification(
EfCoreUiBundle.message("notification.title.ef.core.tools.required"),
EfCoreUiBundle.message("notification.content.ef.core.tools.are.required.to.execute.this.action"),
NotificationType.WARNING
)
.addAction(InstallDotnetEfAction())
.apply{
addAction(SuppressEfCoreToolsInstallation(this))
}
Nepp3r marked this conversation as resolved.
Show resolved Hide resolved
.notify(session.project)

RdTask.fromResult(unit)
RdTask.fromResult(unit)
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ class CommonOptionsState {
var solutionLevelOptions: MutableMap<String, String> = mutableMapOf()
var migrationsToStartupProjects: MutableMap<String, String> = mutableMapOf()
var startupToMigrationsProjects: MutableMap<String, String> = mutableMapOf()
var toolsInstallationSupressed: Boolean = false
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package com.jetbrains.rider.plugins.efcore.state

import com.intellij.openapi.components.*
import com.intellij.openapi.project.Project
import com.jetbrains.rider.plugins.efcore.features.shared.services.PreferredProjectsManager
import java.util.*

@Service
Expand Down Expand Up @@ -59,4 +57,16 @@ class CommonOptionsStateService : PersistentStateComponent<CommonOptionsState> {
myState.solutionLevelOptions[MIGRATIONS_PROJECT_KEY] = migrationsProjectId.toString()
myState.solutionLevelOptions[STARTUP_PROJECT_KEY] = startupProjectId.toString()
}

fun setProjectToolsInstallationSupressed(newState : Boolean) {
myState.toolsInstallationSupressed = newState
}
fun getProjectToolsInstallationSupressed() : Boolean {
return myState.toolsInstallationSupressed
}
Nepp3r marked this conversation as resolved.
Show resolved Hide resolved
Nepp3r marked this conversation as resolved.
Show resolved Hide resolved
var ProjectToolsInstallationSupressed : Boolean
Nepp3r marked this conversation as resolved.
Show resolved Hide resolved
get() = myState.toolsInstallationSupressed
set(value : Boolean){
myState.toolsInstallationSupressed = value
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ tab.ef.core.command=EF Core Command
#
# Install EF Core tools
action.install.text=Install
action.install.ignore=Don't show again
ef.core.global.tools.have.been.successfully.installed=EF Core global tools have been successfully installed
progress.title.getting.dotnet.ef.version=Getting dotnet-ef version\u2026
notification.content.ef.core.tools.are.required.to.execute.this.action=To use EF Core in the IDE, install dotnet-ef as a global tool
Expand Down