Skip to content

Commit 2458545

Browse files
authored
Merge branch 'eclipse-platform:master' into master
2 parents 5bc3998 + d0097a0 commit 2458545

2 files changed

Lines changed: 2 additions & 16 deletions

File tree

bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/internal/WindowsDefenderConfigurator.java

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -335,21 +335,11 @@ private static boolean isWindowsDefenderActive(IProgressMonitor monitor) throws
335335

336336
public static String createAddExclusionsPowershellCommand(String extraSeparator) {
337337
List<Path> paths = getExecutablePath();
338-
// For detailed explanations about how to read existing exclusions and how to
339-
// add new ones see:
338+
// For detailed explanations about how to add new exclusions see:
340339
// https://learn.microsoft.com/en-us/powershell/module/defender/add-mppreference?view=windowsserver2019-ps
341-
// https://learn.microsoft.com/en-us/powershell/module/defender/get-mppreference?view=windowsserver2019-ps
342-
//
343-
// For .NET's stream API called LINQ see:
344-
// https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable
345340
String excludedPaths = paths.stream().map(Path::toString).map(p -> '"' + p + '"')
346341
.collect(Collectors.joining(',' + extraSeparator));
347-
final String exclusionType = "ExclusionProcess"; //$NON-NLS-1$
348-
return String.join(';' + extraSeparator, "$exclusions=@(" + extraSeparator + excludedPaths + ')', //$NON-NLS-1$
349-
"$existingExclusions=[Collections.Generic.HashSet[String]](Get-MpPreference)." + exclusionType, //$NON-NLS-1$
350-
"if($existingExclusions -eq $null) { $existingExclusions = New-Object Collections.Generic.HashSet[String] }", //$NON-NLS-1$
351-
"$exclusionsToAdd=[Linq.Enumerable]::ToArray([Linq.Enumerable]::Where($exclusions,[Func[object,bool]]{param($ex)!$existingExclusions.Contains($ex)}))", //$NON-NLS-1$
352-
"if($exclusionsToAdd.Length -gt 0){ Add-MpPreference -" + exclusionType + " $exclusionsToAdd }"); //$NON-NLS-1$ //$NON-NLS-2$
342+
return "Add-MpPreference -ExclusionProcess " + extraSeparator + excludedPaths; //$NON-NLS-1$
353343
}
354344

355345
private static void excludeDirectoryFromScanning(IProgressMonitor monitor) throws IOException {

bundles/org.eclipse.ui/src/org/eclipse/ui/internal/UIPreferenceInitializer.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,6 @@ public void initializeDefaultPreferences() {
5252
node.put(IWorkbenchPreferenceConstants.OPEN_NEW_PERSPECTIVE,
5353
IWorkbenchPreferenceConstants.OPEN_PERSPECTIVE_REPLACE);
5454

55-
// Deprecated but kept for backwards compatibility
56-
node.put(IWorkbenchPreferenceConstants.PROJECT_OPEN_NEW_PERSPECTIVE,
57-
IWorkbenchPreferenceConstants.OPEN_PERSPECTIVE_REPLACE);
58-
5955
// Although there is no longer any item on the preference pages
6056
// for setting the linking preference, since it is now a per-part
6157
// setting, it remains as a preference to allow product overrides of the

0 commit comments

Comments
 (0)