Skip to content

Commit 64c502a

Browse files
committed
Delete dead code.
1 parent f5be755 commit 64c502a

File tree

1 file changed

+0
-69
lines changed

1 file changed

+0
-69
lines changed

build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ManagedBuildManager.java

Lines changed: 0 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
import java.util.HashSet;
3131
import java.util.LinkedHashSet;
3232
import java.util.List;
33-
import java.util.ListIterator;
3433
import java.util.Map;
3534
import java.util.Map.Entry;
3635
import java.util.Random;
@@ -61,8 +60,6 @@
6160
import org.eclipse.cdt.core.language.settings.providers.LanguageSettingsManager;
6261
import org.eclipse.cdt.core.model.CoreModel;
6362
import org.eclipse.cdt.core.model.CoreModelUtil;
64-
import org.eclipse.cdt.core.parser.IScannerInfo;
65-
import org.eclipse.cdt.core.parser.IScannerInfoChangeListener;
6663
import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
6764
import org.eclipse.cdt.core.settings.model.ICMultiConfigDescription;
6865
import org.eclipse.cdt.core.settings.model.ICProjectDescription;
@@ -72,7 +69,6 @@
7269
import org.eclipse.cdt.core.settings.model.extension.CConfigurationData;
7370
import org.eclipse.cdt.managedbuilder.buildproperties.IBuildProperty;
7471
import org.eclipse.cdt.managedbuilder.buildproperties.IBuildPropertyManager;
75-
import org.eclipse.cdt.managedbuilder.envvar.IEnvironmentBuildPathsChangeListener;
7672
import org.eclipse.cdt.managedbuilder.envvar.IEnvironmentVariableProvider;
7773
import org.eclipse.cdt.managedbuilder.internal.buildproperties.BuildPropertyManager;
7874
import org.eclipse.cdt.managedbuilder.internal.core.BooleanExpressionApplicabilityCalculator;
@@ -251,14 +247,8 @@ public class ManagedBuildManager extends AbstractCExtension {
251247
// This map has a lifecycle corresponding to the build definitions extension loading.
252248
private static Map<IBuildObject, IManagedConfigElement> configElementMap;
253249

254-
// private static List sortedToolChains;
255-
// private static Map builtTypeToToolChainListMap;
256-
// Listeners interested in build model changes
257-
private static Map<IResource, List<IScannerInfoChangeListener>> buildModelListeners;
258250
// Random number for derived object model elements
259251
private static Random randomNumber;
260-
// Environment Build Paths Change Listener
261-
private static IEnvironmentBuildPathsChangeListener fEnvironmentBuildPathsChangeListener;
262252

263253
private static HashMap<MatchKey<ToolChain>, List<ToolChain>> fSortedToolChains;
264254
private static HashMap<MatchKey<Tool>, List<Tool>> fSortedTools;
@@ -274,16 +264,6 @@ private static interface ISorter {
274264
void sort();
275265
}
276266

277-
static {
278-
getEnvironmentVariableProvider()
279-
.subscribe(fEnvironmentBuildPathsChangeListener = (configuration, buildPathType) -> {
280-
// if(buildPathType == IEnvVarBuildPath.BUILDPATH_INCLUDE){
281-
// initializePathEntries(configuration,null);
282-
// notifyListeners(configuration,null);
283-
// }
284-
});
285-
}
286-
287267
/**
288268
* @return the next random number as a positive integer.
289269
*/
@@ -860,37 +840,6 @@ public static void initializePathEntries(IResourceConfiguration resConfig, IOpti
860840
initializePathEntries(cfg, option);
861841
}
862842

863-
private static void notifyListeners(IResourceInfo resConfig, IOption option) {
864-
// Continue if change is something that effect the scanreser
865-
try {
866-
if (resConfig.getParent().isTemporary() || (option != null && option.getValueType() != IOption.INCLUDE_PATH
867-
&& option.getValueType() != IOption.PREPROCESSOR_SYMBOLS
868-
&& option.getValueType() != IOption.INCLUDE_FILES && option.getValueType() != IOption.LIBRARY_PATHS
869-
&& option.getValueType() != IOption.LIBRARY_FILES && option.getValueType() != IOption.MACRO_FILES
870-
&& option.getValueType() != IOption.UNDEF_INCLUDE_PATH
871-
&& option.getValueType() != IOption.UNDEF_PREPROCESSOR_SYMBOLS
872-
&& option.getValueType() != IOption.UNDEF_INCLUDE_FILES
873-
&& option.getValueType() != IOption.UNDEF_LIBRARY_PATHS
874-
&& option.getValueType() != IOption.UNDEF_LIBRARY_FILES
875-
&& option.getValueType() != IOption.UNDEF_MACRO_FILES && !option.isForScannerDiscovery())) {
876-
return;
877-
}
878-
} catch (BuildException e) {
879-
return;
880-
}
881-
882-
// Figure out if there is a listener for this change
883-
IResource resource = resConfig.getParent().getOwner();
884-
List<IScannerInfoChangeListener> listeners = getBuildModelListeners().get(resource);
885-
if (listeners == null) {
886-
return;
887-
}
888-
ListIterator<IScannerInfoChangeListener> iter = listeners.listIterator();
889-
while (iter.hasNext()) {
890-
iter.next().changeNotification(resource, (IScannerInfo) getBuildInfo(resource));
891-
}
892-
}
893-
894843
/**
895844
* Adds the version of the managed build system to the project
896845
* specified in the argument.
@@ -964,8 +913,6 @@ public static IOption setOption(IResourceInfo resConfig, IHoldsOptions holder, I
964913
} else {
965914
// Event handling Failed.
966915
}
967-
// initializePathEntries(resConfig,retOpt);
968-
notifyListeners(resConfig, retOpt);
969916
} catch (BuildException e) {
970917
return null;
971918
}
@@ -1030,8 +977,6 @@ public static IOption setOption(IResourceInfo resConfig, IHoldsOptions holder, I
1030977
} else {
1031978
// Event handling Failed.
1032979
}
1033-
// initializePathEntries(resConfig,retOpt);
1034-
notifyListeners(resConfig, retOpt);
1035980
} catch (BuildException e) {
1036981
return null;
1037982
}
@@ -1096,8 +1041,6 @@ public static IOption setOption(IResourceInfo resConfig, IHoldsOptions holder, I
10961041
} else {
10971042
// Event handling Failed.
10981043
}
1099-
// initializePathEntries(resConfig,retOpt);
1100-
notifyListeners(resConfig, retOpt);
11011044
} catch (BuildException e) {
11021045
return null;
11031046
}
@@ -1116,8 +1059,6 @@ public static IOption setOption(IResourceInfo resConfig, IHoldsOptions holder, I
11161059
} else {
11171060
// Event handling Failed.
11181061
}
1119-
// initializePathEntries(resConfig,retOpt);
1120-
notifyListeners(resConfig, retOpt);
11211062
} catch (BuildException e) {
11221063
return null;
11231064
}
@@ -2959,16 +2900,6 @@ public static URL getURLInBuildDefinitions(DefaultManagedConfigElement element,
29592900
return null;
29602901
}
29612902

2962-
/*
2963-
* @return
2964-
*/
2965-
private static Map<IResource, List<IScannerInfoChangeListener>> getBuildModelListeners() {
2966-
if (buildModelListeners == null) {
2967-
buildModelListeners = new HashMap<>();
2968-
}
2969-
return buildModelListeners;
2970-
}
2971-
29722903
private static Map<IBuildObject, IManagedConfigElement> getConfigElementMap() {
29732904
if (!projectTypesLoading)
29742905
throw new IllegalStateException();

0 commit comments

Comments
 (0)