From 64c502ac27c5b2f58450080872b8b4991c6e568f Mon Sep 17 00:00:00 2001 From: Jonah Graham Date: Thu, 10 Nov 2022 20:08:49 -0500 Subject: [PATCH] Delete dead code. --- .../core/ManagedBuildManager.java | 69 ------------------- 1 file changed, 69 deletions(-) diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ManagedBuildManager.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ManagedBuildManager.java index cc72be5feab..0b30d850a50 100644 --- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ManagedBuildManager.java +++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ManagedBuildManager.java @@ -30,7 +30,6 @@ import java.util.HashSet; import java.util.LinkedHashSet; import java.util.List; -import java.util.ListIterator; import java.util.Map; import java.util.Map.Entry; import java.util.Random; @@ -61,8 +60,6 @@ import org.eclipse.cdt.core.language.settings.providers.LanguageSettingsManager; import org.eclipse.cdt.core.model.CoreModel; import org.eclipse.cdt.core.model.CoreModelUtil; -import org.eclipse.cdt.core.parser.IScannerInfo; -import org.eclipse.cdt.core.parser.IScannerInfoChangeListener; import org.eclipse.cdt.core.settings.model.ICConfigurationDescription; import org.eclipse.cdt.core.settings.model.ICMultiConfigDescription; import org.eclipse.cdt.core.settings.model.ICProjectDescription; @@ -72,7 +69,6 @@ import org.eclipse.cdt.core.settings.model.extension.CConfigurationData; import org.eclipse.cdt.managedbuilder.buildproperties.IBuildProperty; import org.eclipse.cdt.managedbuilder.buildproperties.IBuildPropertyManager; -import org.eclipse.cdt.managedbuilder.envvar.IEnvironmentBuildPathsChangeListener; import org.eclipse.cdt.managedbuilder.envvar.IEnvironmentVariableProvider; import org.eclipse.cdt.managedbuilder.internal.buildproperties.BuildPropertyManager; import org.eclipse.cdt.managedbuilder.internal.core.BooleanExpressionApplicabilityCalculator; @@ -251,14 +247,8 @@ public class ManagedBuildManager extends AbstractCExtension { // This map has a lifecycle corresponding to the build definitions extension loading. private static Map configElementMap; - // private static List sortedToolChains; - // private static Map builtTypeToToolChainListMap; - // Listeners interested in build model changes - private static Map> buildModelListeners; // Random number for derived object model elements private static Random randomNumber; - // Environment Build Paths Change Listener - private static IEnvironmentBuildPathsChangeListener fEnvironmentBuildPathsChangeListener; private static HashMap, List> fSortedToolChains; private static HashMap, List> fSortedTools; @@ -274,16 +264,6 @@ private static interface ISorter { void sort(); } - static { - getEnvironmentVariableProvider() - .subscribe(fEnvironmentBuildPathsChangeListener = (configuration, buildPathType) -> { - // if(buildPathType == IEnvVarBuildPath.BUILDPATH_INCLUDE){ - // initializePathEntries(configuration,null); - // notifyListeners(configuration,null); - // } - }); - } - /** * @return the next random number as a positive integer. */ @@ -860,37 +840,6 @@ public static void initializePathEntries(IResourceConfiguration resConfig, IOpti initializePathEntries(cfg, option); } - private static void notifyListeners(IResourceInfo resConfig, IOption option) { - // Continue if change is something that effect the scanreser - try { - if (resConfig.getParent().isTemporary() || (option != null && option.getValueType() != IOption.INCLUDE_PATH - && option.getValueType() != IOption.PREPROCESSOR_SYMBOLS - && option.getValueType() != IOption.INCLUDE_FILES && option.getValueType() != IOption.LIBRARY_PATHS - && option.getValueType() != IOption.LIBRARY_FILES && option.getValueType() != IOption.MACRO_FILES - && option.getValueType() != IOption.UNDEF_INCLUDE_PATH - && option.getValueType() != IOption.UNDEF_PREPROCESSOR_SYMBOLS - && option.getValueType() != IOption.UNDEF_INCLUDE_FILES - && option.getValueType() != IOption.UNDEF_LIBRARY_PATHS - && option.getValueType() != IOption.UNDEF_LIBRARY_FILES - && option.getValueType() != IOption.UNDEF_MACRO_FILES && !option.isForScannerDiscovery())) { - return; - } - } catch (BuildException e) { - return; - } - - // Figure out if there is a listener for this change - IResource resource = resConfig.getParent().getOwner(); - List listeners = getBuildModelListeners().get(resource); - if (listeners == null) { - return; - } - ListIterator iter = listeners.listIterator(); - while (iter.hasNext()) { - iter.next().changeNotification(resource, (IScannerInfo) getBuildInfo(resource)); - } - } - /** * Adds the version of the managed build system to the project * specified in the argument. @@ -964,8 +913,6 @@ public static IOption setOption(IResourceInfo resConfig, IHoldsOptions holder, I } else { // Event handling Failed. } - // initializePathEntries(resConfig,retOpt); - notifyListeners(resConfig, retOpt); } catch (BuildException e) { return null; } @@ -1030,8 +977,6 @@ public static IOption setOption(IResourceInfo resConfig, IHoldsOptions holder, I } else { // Event handling Failed. } - // initializePathEntries(resConfig,retOpt); - notifyListeners(resConfig, retOpt); } catch (BuildException e) { return null; } @@ -1096,8 +1041,6 @@ public static IOption setOption(IResourceInfo resConfig, IHoldsOptions holder, I } else { // Event handling Failed. } - // initializePathEntries(resConfig,retOpt); - notifyListeners(resConfig, retOpt); } catch (BuildException e) { return null; } @@ -1116,8 +1059,6 @@ public static IOption setOption(IResourceInfo resConfig, IHoldsOptions holder, I } else { // Event handling Failed. } - // initializePathEntries(resConfig,retOpt); - notifyListeners(resConfig, retOpt); } catch (BuildException e) { return null; } @@ -2959,16 +2900,6 @@ public static URL getURLInBuildDefinitions(DefaultManagedConfigElement element, return null; } - /* - * @return - */ - private static Map> getBuildModelListeners() { - if (buildModelListeners == null) { - buildModelListeners = new HashMap<>(); - } - return buildModelListeners; - } - private static Map getConfigElementMap() { if (!projectTypesLoading) throw new IllegalStateException();