Package org.eclipse.ui.internal
Class WindowsDefenderConfigurator
java.lang.Object
org.eclipse.ui.internal.WindowsDefenderConfigurator
- All Implemented Interfaces:
EventHandler
A start-up event handler that, if running on Windows, suggests the user to
exclude the current installation directory from being scanned by the Windows
Defender, if it is active on the computer.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final boolean
protected IPreferencesService
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
bindProductName
(String message) static String
createAddExclusionsPowershellCommand
(String extraSeparator) static IEclipsePreferences
getPreference
(IScopeContext instance) void
handleEvent
(Event event) static Boolean
Opens the dialog to run the exclusion, regardless of any preference.protected boolean
static void
savePreference
(IScopeContext scope, String key, String value)
-
Field Details
-
PREFERENCE_STARTUP_CHECK_SKIP
- See Also:
-
PREFERENCE_STARTUP_CHECK_SKIP_DEFAULT
public static final boolean PREFERENCE_STARTUP_CHECK_SKIP_DEFAULT- See Also:
-
preferences
-
-
Constructor Details
-
WindowsDefenderConfigurator
public WindowsDefenderConfigurator()
-
-
Method Details
-
handleEvent
- Specified by:
handleEvent
in interfaceEventHandler
-
runStartupCheck
protected boolean runStartupCheck() -
runCheckEnforced
Opens the dialog to run the exclusion, regardless of any preference.- Returns:
true
if this installation is now excluded,false
if Windows Defender is inactive and null if the process was aborted.- Throws:
CoreException
-
bindProductName
-
getPreference
-
savePreference
public static void savePreference(IScopeContext scope, String key, String value) throws CoreException - Throws:
CoreException
-
createAddExclusionsPowershellCommand
-