From 21ecab3e0a50be297d400abc934a2a22fe32e671 Mon Sep 17 00:00:00 2001 From: Roman Shevchenko Date: Thu, 2 Mar 2023 14:10:30 +0100 Subject: [PATCH] [ui] following Defender rebranding in corresponding notifications (IDEA-298058) GitOrigin-RevId: a13525c886b59bab9b19a92d005b5bbe2eb3da63 --- bin/win/defender-exclusions.ps1 | 2 +- .../messages/DiagnosticBundle.properties | 15 ++++++++------- .../diagnostic/WindowsDefenderChecker.java | 8 ++++---- .../src/messages/ActionsBundle.properties | 2 +- 4 files changed, 14 insertions(+), 13 deletions(-) diff --git a/bin/win/defender-exclusions.ps1 b/bin/win/defender-exclusions.ps1 index 6568bc7c97f0..db635725bea8 100644 --- a/bin/win/defender-exclusions.ps1 +++ b/bin/win/defender-exclusions.ps1 @@ -1,5 +1,5 @@ <# - The script adds paths, given as parameters, to the Windows Defender folder exclusion list, + The script adds paths, given as parameters, to the Microsoft Defender folder exclusion list, unless they are already excluded. #> diff --git a/platform/platform-impl/resources/messages/DiagnosticBundle.properties b/platform/platform-impl/resources/messages/DiagnosticBundle.properties index aeb80d04c658..d777c57965b3 100644 --- a/platform/platform-impl/resources/messages/DiagnosticBundle.properties +++ b/platform/platform-impl/resources/messages/DiagnosticBundle.properties @@ -157,13 +157,13 @@ change.memory.apply=Save and Restart change.memory.exit=Save and Exit change.memory.low=The value should be greater than {0} -notification.group.defender.config=Windows Defender configuration -defender.config.prompt=The IDE has detected Windows Defender with Real-Time Protection enabled. \ +notification.group.defender.config=Microsoft Defender configuration +defender.config.prompt=The IDE has detected Microsoft Defender with Real-Time Protection enabled. \ It might severely degrade IDE performance. \ It is recommended to add following paths to the Defender folder exclusion list:
{0}

\ Choose "{1}" to run a script that excludes these paths (note: Windows will ask for administrative privileges). \ Choose "{2}" to see Defender configuration instructions. -defender.config.prompt.no.script=The IDE has detected Windows Defender with Real-Time Protection enabled. \ +defender.config.prompt.no.script=The IDE has detected Microsoft Defender with Real-Time Protection enabled. \ It might severely degrade IDE performance. \ It is recommended to add following paths to the Defender folder exclusion list:
{0}

defender.config.auto=Automatically @@ -171,9 +171,9 @@ defender.config.manual=Manually defender.config.instructions=See instructions defender.config.suppress1=Ignore for this project defender.config.suppress2=Never ask again -defender.config.progress=Updating Windows Defender configuration -defender.config.success=Project paths were successfully added to the Windows Defender exclusion list -defender.config.failed=Windows Defender configuration script failed. Please look for "WindowsDefenderChecker" records in the log. +defender.config.progress=Updating Microsoft Defender configuration +defender.config.success=Project paths were successfully added to the Microsoft Defender exclusion list +defender.config.failed=Microsoft Defender configuration script failed. Please look for "WindowsDefenderChecker" records in the log. defender.config.restore=OK. If you change your mind, please use "{0}" action. label.issue.type=Issue Type: @@ -204,7 +204,8 @@ hprof.analysis.progress.details.create.object.graph.files=Create object graph fi plugin.conflict.use.by.vendor.label={0, choice, 0#Use |1#}{1}{2, choice, 0# by {3}|1#} hprof.analysis.progress=Processing: {0} {1} -wsl.firewall.settings.prompt=The IDE will now change the Windows Defender Firewall settings to allow connections from WSL environments to the IDE instance. If you're using a different firewall product, this action won't resolve the problem and you shouldn't execute it. Do you wish to continue? +wsl.firewall.settings.prompt=The IDE will now change the Microsoft Defender Firewall settings to allow connections from WSL environments to the IDE instance. \ + If you're using a different firewall product, this action won't resolve the problem and you shouldn't execute it. Do you wish to continue? wsl.firewall.settings.failure=Failed to update firewall settings. Please refer to https://jb.gg/wsl-firewall to update the settings manually. wsl.firewall.settings.success=Firewall settings successfully updated notification.group.performance.watcher=JVM performance issues detected diff --git a/platform/platform-impl/src/com/intellij/diagnostic/WindowsDefenderChecker.java b/platform/platform-impl/src/com/intellij/diagnostic/WindowsDefenderChecker.java index b87f82738076..ed4ee21e3443 100644 --- a/platform/platform-impl/src/com/intellij/diagnostic/WindowsDefenderChecker.java +++ b/platform/platform-impl/src/com/intellij/diagnostic/WindowsDefenderChecker.java @@ -111,7 +111,7 @@ public class WindowsDefenderChecker { for (var i = 0; i < avResult.getResultCount(); i++) { var name = avResult.getValue(AntivirusProduct.DisplayName, i); if (LOG.isDebugEnabled()) LOG.debug("DisplayName[" + i + "]: " + name + " (" + name.getClass().getName() + ')'); - if (name instanceof String s && s.contains("Windows Defender")) { + if (name instanceof String s && (s.contains("Windows Defender") || s.contains("Microsoft Defender"))) { var state = avResult.getValue(AntivirusProduct.ProductState, i); if (LOG.isDebugEnabled()) LOG.debug("ProductState: " + state + " (" + state.getClass().getName() + ')'); var enabled = state instanceof Integer intState && (intState.intValue() & 0x1000) != 0; @@ -129,15 +129,15 @@ public class WindowsDefenderChecker { return Boolean.TRUE.equals(rtProtection); } catch (COMException e) { - if (e.matchesErrorCode(Wbemcli.WBEM_E_INVALID_NAMESPACE)) return false; // Windows Defender not installed - var message = "WMI Windows Defender check failed"; + if (e.matchesErrorCode(Wbemcli.WBEM_E_INVALID_NAMESPACE)) return false; // Microsoft Defender not installed + var message = "WMI Microsoft Defender check failed"; var hresult = e.getHresult(); if (hresult != null) message += " [0x" + Integer.toHexString(hresult.intValue()) + ']'; LOG.warn(message, e); return null; } catch (Exception e) { - LOG.warn("WMI Windows Defender check failed", e); + LOG.warn("WMI Microsoft Defender check failed", e); return null; } } diff --git a/platform/platform-resources-en/src/messages/ActionsBundle.properties b/platform/platform-resources-en/src/messages/ActionsBundle.properties index c14fd359039a..646e33ed0dc0 100644 --- a/platform/platform-resources-en/src/messages/ActionsBundle.properties +++ b/platform/platform-resources-en/src/messages/ActionsBundle.properties @@ -2613,7 +2613,7 @@ action.ActivateHierarchyToolWindow.text=Hierarchy group.RunContextGroupMore.text=More Run/Debug group.RevealGroup.text=Open In group.OpenInBrowserGroup.EditorTabPopup.text=Browser -action.ResetWindowsDefenderNotification.text=Reset Windows Defender Notification +action.ResetWindowsDefenderNotification.text=Reset Microsoft Defender Notification action.FindSelectionInPath.text=Find in Files group.Internal.Trust.text=Source security