Package org.eclipse.ui.internal

# Class WindowsDefenderConfigurator

java.lang.Object
org.eclipse.ui.internal.WindowsDefenderConfigurator

All Implemented Interfaces:
  `EventHandler`

public class WindowsDefenderConfigurator extends Object implements 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

Fields
Modifier and Type
Field
Description
`static final String`
`PREFERENCE_STARTUP_CHECK_SKIP`
`static final boolean`
`PREFERENCE_STARTUP_CHECK_SKIP_DEFAULT`
`protected IPreferencesService`
`preferences`

## Constructor Summary

Constructors
Constructor
Description
`WindowsDefenderConfigurator()`

## Method Summary

Modifier and Type
Method
Description
`static String`
`bindProductName(String message)`
`static String`
`createAddExclusionsPowershellCommand(String extraSeparator)`
`static IEclipsePreferences`
`getPreference(IScopeContext instance)`
`void`
`handleEvent(Event event)`
`static Boolean`
`runCheckEnforced(IProgressMonitor m)`
Opens the dialog to run the exclusion, regardless of any preference.
`protected boolean`
`runStartupCheck()`
`static void`
`savePreference(IScopeContext scope, String key, String value)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### PREFERENCE_STARTUP_CHECK_SKIP

public static final String PREFERENCE_STARTUP_CHECK_SKIP

See Also:
  - Constant Field Values

### PREFERENCE_STARTUP_CHECK_SKIP_DEFAULT

public static final boolean PREFERENCE_STARTUP_CHECK_SKIP_DEFAULT

See Also:
  - Constant Field Values

### preferences

protected IPreferencesService preferences

## Constructor Details

### WindowsDefenderConfigurator

public WindowsDefenderConfigurator()

## Method Details

### handleEvent

public void handleEvent(Event event)

Specified by:
  `handleEvent` in interface `EventHandler`

### runStartupCheck

protected boolean runStartupCheck()

### runCheckEnforced

public static Boolean runCheckEnforced(IProgressMonitor m) throws CoreException
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

public static String bindProductName(String message)

### getPreference

public static IEclipsePreferences getPreference(IScopeContext instance)

### savePreference

public static void savePreference(IScopeContext scope, String key, String value) throws CoreException

Throws:
  `CoreException`

### createAddExclusionsPowershellCommand

public static String createAddExclusionsPowershellCommand(String extraSeparator)