Skip to main content
summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorJonah Graham2018-11-20 11:20:42 -0500
committerJonah Graham2018-11-22 16:55:36 -0500
commitcaf2292768deccd885b5b6989b731742e2e5edf4 (patch)
tree711a6088f2e17c7e31ebb51af1eadc1af00768e5 /core
parent8844a8f9f22802fedffa3cb2a8a21b041aa64b74 (diff)
downloadorg.eclipse.cdt-caf2292768deccd885b5b6989b731742e2e5edf4.tar.gz
org.eclipse.cdt-caf2292768deccd885b5b6989b731742e2e5edf4.tar.xz
org.eclipse.cdt-caf2292768deccd885b5b6989b731742e2e5edf4.zip
Bug 540373: Cleanup: Remove redundant type arguments
This was done by selecting all projects in Eclipse then Source -> Clean Up... -> choosing: - Remove redundant type arguments and completing the wizard Change-Id: Iaecc7010f097b4b1fabd29ccaa34ccb23a716fbf
Diffstat (limited to 'core')
-rw-r--r--core/org.eclipse.cdt.core.native/src/org/eclipse/cdt/utils/spawner/EnvironmentReader.java2
-rw-r--r--core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/ErrorParserEfsFileMatchingTest.java2
-rw-r--r--core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/ErrorParserFileMatchingTest.java2
-rw-r--r--core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/ErrorParserManagerTest.java2
-rw-r--r--core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/GenericErrorParserTests.java2
-rw-r--r--core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/RegexErrorParserTests.java2
-rw-r--r--core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/resources/tests/RefreshScopeTests.java2
-rw-r--r--core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/utils/StorableCdtVariablesTest.java4
-rw-r--r--core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/utils/WeakHashSetTest.java4
-rw-r--r--core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/language/settings/providers/LanguageSettingsExtensionsTests.java22
-rw-r--r--core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/language/settings/providers/LanguageSettingsListenersTests.java86
-rw-r--r--core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/language/settings/providers/LanguageSettingsManagerTests.java68
-rw-r--r--core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/language/settings/providers/LanguageSettingsPersistenceProjectTests.java70
-rw-r--r--core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/language/settings/providers/LanguageSettingsProviderReferencedProjectsTests.java10
-rw-r--r--core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/language/settings/providers/LanguageSettingsScannerInfoProviderTests.java54
-rw-r--r--core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/language/settings/providers/LanguageSettingsSerializableProviderTests.java98
-rw-r--r--core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/language/settings/providers/MockListenerRegisterer.java2
-rw-r--r--core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/TranslationUnitTests.java2
-rw-r--r--core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/settings/model/CConfigurationDescriptionExportSettings.java10
-rw-r--r--core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/settings/model/CProjectDescriptionDeltaTests.java12
-rw-r--r--core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/settings/model/CProjectDescriptionStorageTests.java2
-rw-r--r--core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/settings/model/ExternalSettingsProviderTests.java4
-rw-r--r--core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2CPPAttributeTests.java2
-rw-r--r--core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2SpecTestBase.java4
-rw-r--r--core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/CharArrayMapTest.java12
-rw-r--r--core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/prefix/CompletionTestBase.java2
-rw-r--r--core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/RewriteTester.java6
-rw-r--r--core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/astwriter/SourceRewriteTester.java2
-rw-r--r--core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/comenthandler/CommentHandlingTest.java2
-rw-r--r--core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/scanner/PreprocessorTests.java2
-rw-r--r--core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexBugsTests.java4
-rw-r--r--core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexCompositeTests.java8
-rw-r--r--core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexUpdateTests.java2
-rw-r--r--core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/FileManager.java2
-rw-r--r--core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/Main.java2
-rw-r--r--core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/NewMain.java2
-rw-r--r--core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/ResourceHelper.java4
-rw-r--r--core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/util/TestSourceReader.java2
-rw-r--r--core/org.eclipse.cdt.core/browser/org/eclipse/cdt/core/browser/TypeSearchScope.java8
-rw-r--r--core/org.eclipse.cdt.core/browser/org/eclipse/cdt/core/browser/TypeUtil.java8
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/language/ProjectLanguageConfiguration.java14
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/language/WorkspaceLanguageConfiguration.java4
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/language/settings/providers/LanguageSettingsBaseProvider.java14
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/language/settings/providers/LanguageSettingsManager.java6
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/language/settings/providers/LanguageSettingsSerializableProvider.java8
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/language/settings/providers/LanguageSettingsStorage.java18
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/language/settings/providers/ScannerDiscoveryLegacySupport.java2
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/CoreModelUtil.java6
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/LanguageManager.java20
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/CExternalSetting.java4
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/extension/impl/CDefaultConfigurationData.java2
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/extension/impl/CDefaultFolderData.java2
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/extension/impl/CResourceDataContainer.java2
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/AbstractEntryStorage.java2
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/CDataUtil.java2
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/CEntriesSet.java2
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/EntryStore.java16
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/LanguageSettingEntriesSerializer.java2
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/ListComparator.java4
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/PathEntryTranslator.java96
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/PathSettingsContainer.java8
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/PatternNameMap.java10
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/ResourceChangeHandlerBase.java2
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/SettingsSet.java18
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/ThreadLocalMap.java4
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/UserAndDiscoveredEntryDataSerializer.java2
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/UserAndDiscoveredEntryLanguageData.java8
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/UserAndDiscoveredEntryStorage.java2
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/XmlStorageElement.java6
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/language/LanguageMappingResolver.java2
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/language/LanguageMappingStore.java10
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/language/settings/providers/LanguageSettingsDelta.java2
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/language/settings/providers/LanguageSettingsExtensionManager.java10
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/language/settings/providers/LanguageSettingsProvidersSerializer.java42
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/language/settings/providers/LanguageSettingsScannerInfoProvider.java16
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/language/settings/providers/LanguageSettingsSerializableStorage.java6
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/language/settings/providers/PathEntryScannerInfoLanguageSettingsProvider.java8
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/language/settings/providers/ReferencedProjectsLanguageSettingsProvider.java4
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/language/settings/providers/ScannerInfoExtensionLanguageSettingsProvider.java4
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/APathEntry.java4
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/AsmModelBuilder.java6
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/Binary.java2
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/BinaryContainer.java2
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/Buffer.java2
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/BufferManager.java2
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CContainerInfo.java2
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CElement.java2
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CElementDelta.java4
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CElementDeltaBuilder.java10
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CElementInfo.java2
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CModelBuilder2.java4
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CModelCache.java8
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CModelOperation.java6
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CProject.java4
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CProjectInfo.java2
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/ContentTypeProcessor.java2
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CopyResourceElementsOperation.java4
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/DefaultPathEntryStore.java2
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/DeleteElementsOperation.java2
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/ElementCache.java2
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/IncludeReference.java2
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/MultiOperation.java6
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/Parent.java2
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/PathEntryContainerUpdatesOperation.java2
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/PathEntryUtil.java4
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/Region.java6
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/SetPathEntriesOperation.java2
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/SourceManipulation.java2
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/Structure.java6
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/ext/StructureTemplateHandle.java2
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/AbstractCProjectDescriptionStorage.java2
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CConfigurationDataProviderDescriptor.java2
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CConfigurationDescription.java4
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CConfigurationDescriptionCache.java2
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CConfigurationSpecSettings.java30
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CExternalSettingsDeltaProcessor.java4
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CExternalSettingsHolder.java6
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CExternalSettingsManager.java12
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CExternalSettinsDeltaCalculator.java18
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CLanguageSetting.java4
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CProjectConverterDesciptor.java2
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CProjectDescription.java2
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CProjectDescriptionDelta.java2
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CProjectDescriptionManager.java44
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CProjectDescriptionStorageManager.java6
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CSettingsRefInfo.java6
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CfgExportSettingContainerFactory.java8
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CfgProxyCache.java2
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/ConfigBasedPathEntryStore.java12
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/DescriptionScannerInfoProvider.java4
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/EntriesNamesContainer.java6
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/ExtensionContainerFactory.java14
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/MapProxyCache.java2
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/MultiConfigDescription.java8
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/PathEntryConfigurationDataProvider.java2
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/ResourceChangeHandler.java8
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/ResourceDescriptionHolder.java4
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/ScannerInfoProviderProxy.java4
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/xml/XmlProjectDescriptionStorage.java6
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/xml/XmlStorage.java2
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/xml/XmlStorageElement.java8
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/xml2/XmlProjectDescriptionStorage2.java6
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/util/LRUCache.java8
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/util/OverflowingLRUCache.java10
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/parser/AbstractCLikeLanguage.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/parser/AbstractScannerExtensionConfiguration.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/parser/CLanguageKeywords.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/index/export/ExternalExportProjectProvider.java10
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/parser/util/ArrayUtil.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/parser/util/CharArrayMap.java8
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/parser/util/CharTable.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/parser/util/CollectionUtils.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/parser/util/ObjectTable.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/ast/tag/TagManager.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTNodeSelector.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTProblem.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/AbstractGNUSourceCodeParser.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/CStringValue.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ChildCollector.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/GCCBuiltinSymbolProvider.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/SizeofCalculator.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CScope.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CStructMapper.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTAmbiguousTemplateArgument.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTQualifiedName.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPNamespace.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPScopeMapper.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPSemantics.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalUtil.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/ASTModificationStore.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/DeclarationGeneratorImpl.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/astwriter/ContainerNode.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/astwriter/MacroExpansionHandler.java8
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/changegenerator/ASTModificationHelper.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/commenthandler/NodeCommentMap.java22
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/commenthandler/NodeCommenter.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/CIndex.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/IndexBasedFileContentProvider.java28
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/IndexFactory.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/AbstractCompositeFactory.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPClassSpecialization.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeInstanceCache.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/provider/IndexProviderManager.java12
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/provider/PDOMCache.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/provider/ReadOnlyPDOMProviderBridge.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/indexer/FileEncodingRegistry.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/indexer/StandaloneIndexer.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/indexer/StandaloneIndexerInputAdapter.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/EmptyIterator.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/ASTPreprocessorNode.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/LazyCharArray.java8
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/MacroExpander.java8
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/MacroExpansionTracker.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/MultiMacroExpansionExplorer.java8
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/ScannerContext.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/SingleMacroExpansionExplorer.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/token/KeywordSets.java64
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/util/Profiler.java10
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/Checksums.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/IndexUpdatePolicy.java6
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/LanguageSettingsChangeListener.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/PDOM.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/PDOMASTProcessorManager.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/PDOMProxy.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/TeamPDOMExportOperation.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/WaitForRefreshJobs.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/WritablePDOM.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/db/DBProperties.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/db/PDOMStringSet.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/MacroContainerCollector.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/MacroContainerPatternCollector.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/PDOMFile.java12
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/PDOMLinkage.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/c/PDOMCEnumeration.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPClassTemplate.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPEnumScope.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPLinkage.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPUsingDeclarationSpecialization.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/export/CLIUtil.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/export/GeneratePDOMApplication.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/indexer/DeltaAnalyzer.java6
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/indexer/IndexerASTVisitor.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/indexer/PDOMUpdateTask.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/indexer/ProjectIndexerIncludeResolutionHeuristics.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/indexer/ProjectIndexerInputAdapter.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/tag/PDOMTagIndex.java4
-rw-r--r--core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/CProjectNature.java2
-rw-r--r--core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/ErrorParserManager.java6
-rw-r--r--core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/ProblemMarkerInfo.java2
-rw-r--r--core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/build/CBuildConfiguration.java2
-rw-r--r--core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/errorparsers/RegexErrorParser.java2
-rw-r--r--core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/formatter/CodeFormatterApplication.java4
-rw-r--r--core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/formatter/DefaultCodeFormatterOptions.java2
-rw-r--r--core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/formatter/IndentManipulation.java2
-rw-r--r--core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/resources/RefreshExclusion.java6
-rw-r--r--core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/resources/RefreshScopeManager.java26
-rw-r--r--core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/resources/ScannerProvider.java6
-rw-r--r--core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/BuildRunnerHelper.java8
-rw-r--r--core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/CConfigBasedDescriptor.java4
-rw-r--r--core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/CConfigBasedDescriptorManager.java12
-rw-r--r--core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/CExtensionInfo.java2
-rw-r--r--core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/CdtVarPathEntryVariableManager.java4
-rw-r--r--core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/PositionTrackerManager.java6
-rw-r--r--core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/ProblemMarkerFilterManager.java6
-rw-r--r--core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/cdtvariables/EclipseVariablesVariableSupplier.java2
-rw-r--r--core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/cdtvariables/StorableCdtVariable.java2
-rw-r--r--core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/cdtvariables/StorableCdtVariables.java8
-rw-r--r--core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/cdtvariables/UserDefinedVariableSupplier.java6
-rw-r--r--core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/envvar/ContributedEnvironment.java2
-rw-r--r--core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/envvar/EnvVarCollector.java4
-rw-r--r--core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/envvar/EnvironmentVariableManager.java6
-rw-r--r--core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/envvar/UserDefinedEnvironmentSupplier.java2
-rw-r--r--core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/resources/ResourceExclusion.java2
-rw-r--r--core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/resources/ResourceLookupTree.java18
-rw-r--r--core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/errorparsers/ErrorParserExtensionManager.java26
-rw-r--r--core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/formatter/CCodeFormatter.java2
-rw-r--r--core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/formatter/CodeFormatterVisitor.java10
-rw-r--r--core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/formatter/scanner/ScannerContext.java2
-rw-r--r--core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/formatter/scanner/SimpleScanner.java2
-rw-r--r--core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/SharedDefaults.java6
-rw-r--r--core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/TemplateCore.java4
-rw-r--r--core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/TemplateDescriptor.java6
-rw-r--r--core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/TemplateEngine.java26
-rw-r--r--core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/ConditionalProcessGroup.java12
-rw-r--r--core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/Process.java4
-rw-r--r--core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/ProcessArgument.java8
-rw-r--r--core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/ProcessHelper.java2
-rw-r--r--core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/ProcessRunnerFactory.java4
-rw-r--r--core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/TemplateProcessHandler.java6
-rw-r--r--core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/processes/CreateSourceFolder.java4
-rw-r--r--core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/processes/SetEnvironmentVariable.java2
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/internal/core/SafeStringInterner.java6
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/internal/core/UNCPathConverterImpl.java2
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/internal/core/WeakHashSet.java6
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/AR.java4
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/CommandLineUtil.java4
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/EFSExtensionManager.java2
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/NM.java8
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/Objdump.java2
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/cdtvariables/CdtVariableResolver.java2
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/cdtvariables/SupplierBasedCdtVariableManager.java4
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/cdtvariables/SupplierBasedCdtVariableSubstitutor.java8
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/coff/CodeViewReader.java2
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/coff/Coff.java2
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/coff/PEArchive.java4
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/coff/parser/CygwinPEBinaryObject.java2
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/coff/parser/PEBinaryArchive.java2
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/coff/parser/PEBinaryObject.java2
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/dwarf/Dwarf.java12
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/dwarf/DwarfReader.java26
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/stabs/Stabs.java4
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/stabs/StabsReader.java2
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/tools/DebugSymsRequestor.java2
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/elf/AR.java4
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/elf/Elf.java6
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/elf/ElfHelper.java14
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/elf/parser/ElfBinaryArchive.java2
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/elf/parser/ElfBinaryObject.java2
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/envvar/EnvironmentCollector.java2
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/envvar/PrefsStorableEnvironment.java10
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/envvar/StorableEnvironment.java4
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/macho/AR.java4
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/macho/MachO.java14
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/macho/MachO64.java14
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/macho/MachOHelper.java14
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/macho/MachOHelper64.java14
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/macho/parser/MachOBinaryArchive.java2
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/macho/parser/MachOBinaryArchive64.java2
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/macho/parser/MachOBinaryObject.java2
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/macho/parser/MachOBinaryObject64.java2
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/som/AR.java4
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/som/SOM.java2
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/som/parser/SOMBinaryArchive.java2
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/som/parser/SOMBinaryObject.java2
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/xcoff/AR.java4
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/xcoff/XCoff32.java2
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/xcoff/parser/XCOFFBinaryArchive.java2
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/xcoff/parser/XCOFFBinaryObject.java2
-rw-r--r--core/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/testplugin/Main.java2
-rw-r--r--core/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/testplugin/ResourceTestHelper.java4
-rw-r--r--core/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/testplugin/util/StringAsserts.java8
-rw-r--r--core/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/tests/DOMAST/DOMASTNodeLeaf.java4
-rw-r--r--core/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/tests/DOMAST/FindIASTNameDialog.java4
-rw-r--r--core/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/tests/DOMAST/FindIASTNameTarget.java2
-rw-r--r--core/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/tests/templateengine/TemplateEngineTestsHelper.java2
-rw-r--r--core/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/tests/templateengine/TestTemplateEngineBugs.java2
-rw-r--r--core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/BaseUITestCase.java2
-rw-r--r--core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/callhierarchy/extension/CHOpenListener.java2
-rw-r--r--core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/chelp/CHelpProviderTester.java2
-rw-r--r--core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/misc/LanguageVerifierTests.java2
-rw-r--r--core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/quickfix/AssistQuickFixTest.java4
-rw-r--r--core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/AbstractAutoEditTest.java2
-rw-r--r--core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/CAutoIndentTest.java12
-rw-r--r--core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/CPartitionScanner.java2
-rw-r--r--core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/CodeFormatterTest.java2
-rw-r--r--core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/FoldingTestBase.java2
-rw-r--r--core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/SemanticHighlightingTest.java4
-rw-r--r--core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/TemplateFormatterTest.java2
-rw-r--r--core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTests.java2
-rw-r--r--core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/doctools/DocCommentHighlightingTest.java4
-rw-r--r--core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/ui/browser/typeinfo/TypeSelectionDialog.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/codemanipulation/StubUtility.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/fix/LinkedProposalModel.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/fix/LinkedProposalPositionGroup.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/refactoring/code/flow/BranchFlowInfo.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/refactoring/code/flow/FlowAnalyzer.java6
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/refactoring/code/flow/FlowContext.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/refactoring/code/flow/FlowInfo.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/refactoring/code/flow/LocalVariableIndex.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/template/c/CFormatter.java6
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/template/c/FileTemplateContextType.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/util/Resources.java6
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/BaseCElementContentProvider.java28
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/CPluginImages.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/LineBackgroundPainter.java8
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/MembersGrouping.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/actions/AbstractUpdateIndexAction.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/actions/AddBlockCommentAction.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/actions/CreateParserLogAction.java18
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/actions/DeleteResConfigsHandler.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/actions/ExcludeFromBuildHandler.java6
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/actions/OpenActionUtil.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/actions/RemoveBlockCommentAction.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/actions/SelectionConverter.java6
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/BuildConsoleManager.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/callhierarchy/CElementSet.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/callhierarchy/CHContentProvider.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/callhierarchy/CHEProviderSettings.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/callhierarchy/CHHistoryListAction.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/callhierarchy/CHLabelProvider.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/callhierarchy/CHNode.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/callhierarchy/CHProviderManager.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/callhierarchy/CHQueries.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/callhierarchy/CallHierarchyUI.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/callhierarchy/ReferenceVisitor.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/compare/CStructureCreatorVisitor.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/BuildGroup.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/CView.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/CViewContentProvider.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/CViewMoveAction.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/LibraryRefContainer.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/SelectionTransferDropAdapter.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/SelectionList.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/TextFieldNavigationHandler.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/AbstractPathOptionBlock.java8
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPElement.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPElementGroup.java12
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPElementSorter.java6
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathBasePage.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathContainerDefaultPage.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathContainerDescriptor.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathContainerEntryPage.java6
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathContainerWizard.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathFilterPage.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathIncludeSymbolEntryPage.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathIncludeSymbolEntryPerFilePage.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathLibraryEntryPage.java6
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathOutputEntryPage.java10
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathProjectsEntryPage.java8
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathSourceEntryPage.java10
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathTabBlock.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/ExclusionPatternDialog.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/MultipleFolderSelectionDialog.java6
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/ProjectContainerPage.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/SourceAttachmentBlock.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dnd/DelegatingDragAdapter.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dnd/FileTransferDragAdapter.java6
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dnd/ResourceTransferDragAdapter.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dnd/ResourceTransferDropAdapter.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CContentOutlinerProvider.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CDocumentProvider.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CEditor.java8
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CElementIncludeResolver.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CSourceViewer.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/DocumentAdapter.java6
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/EclipsePreferencesAdapter.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/InactiveCodeHighlighting.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/InteractiveHeaderChooser.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/OverrideIndicatorManager.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/SelectionHistory.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/SelectionToDeclarationJob.java6
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/SemanticHighlightingManager.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/SemanticHighlightingPresenter.java6
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/SemanticHighlightingReconciler.java6
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/SemanticHighlightings.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/SourceHeaderPartnerFinder.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/ToggleCommentAction.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/asm/AsmCodeScanner.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/asm/AsmPreprocessorScanner.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/filters/CustomFiltersDialog.java8
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/filters/FilterDescriptor.java6
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/help/CFunctionSummary.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/help/CHelpBook.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/help/CHelpEntry.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/help/CHelpProvider.java6
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/includebrowser/IBContentProvider.java10
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/includebrowser/IBConversions.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/includebrowser/IBDragSourceListener.java6
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/includebrowser/IBHistoryListAction.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/includebrowser/IBLabelProvider.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/includebrowser/IBViewPart.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/indexview/IndexView.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/language/ContentTypeMappingDialog.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/language/FileLanguageMappingPropertyPage.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/language/LanguageMappingWidget.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/language/LanguageVerifier.java8
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/language/ProjectContentTypeMappingDialog.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/language/ProjectLanguageMappingWidget.java6
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/language/WorkspaceLanguageMappingWidget.java6
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/language/settings/providers/LanguageSettingsEntriesTab.java18
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/language/settings/providers/LanguageSettingsProviderAssociationManager.java18
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/language/settings/providers/LanguageSettingsProviderTab.java14
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/navigator/CNavigatorContentProvider.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/navigator/CNavigatorDragAdapterAssistant.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/navigator/CNavigatorDropAdapterAssistant.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/AbstractConfigurationBlock.java10
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/AbstractMixedPreferencePage.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/CEditorColoringConfigurationBlock.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/CEditorHoverConfigurationBlock.java8
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/CFileTypeDialog.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/CFileTypesPreferenceBlock.java6
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/CFileTypesPropertyPage.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/CPluginPreferencePage.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/CodeAssistAdvancedConfigurationBlock.java8
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/CodeTemplateBlock.java10
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/EditTemplateDialog.java8
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/FoldingConfigurationBlock.java8
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/HeaderSubstitutionBlock.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/HeaderSubstitutionMapEditDialog.java6
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/IncludeCategoriesBlock.java8
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/IncludeOrderBlock.java12
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/IncludeStyleBlock.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/MarkOccurrencesConfigurationBlock.java6
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/NameStyleBlock.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/OptionsConfigurationBlock.java16
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/PropertyAndPreferencePage.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/ProposalFilterPreferencesUtil.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/SaveActionsPreferencePage.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/ScalabilityPreferencePage.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/SpellingConfigurationBlock.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/TabConfigurationBlock.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/TodoTaskConfigurationBlock.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/TodoTaskInputDialog.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/WorkInProgressPreferencePage.java6
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/formatter/CreateProfileDialog.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/formatter/FormatterProfileManager.java6
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/formatter/LineWrappingTabPage.java16
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/formatter/ModifyDialog.java10
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/formatter/ModifyDialogTabPage.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/formatter/ProfileConfigurationBlock.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/formatter/ProfileManager.java10
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/formatter/ProfileStore.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/formatter/SnippetPreview.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/formatter/TranslationUnitPreview.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/formatter/WhiteSpaceOptions.java12
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/formatter/WhiteSpaceTabPage.java10
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/CRefactoring.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/ChangeParametersControl.java12
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/ChangeTreeSet.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/DocumentAdapter.java6
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/NodeContainer.java10
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/VariableNameInformation.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/dialogs/ValidatingLabeledTextField.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/extractfunction/ExpressionExtractor.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/extractfunction/ExtractFunctionInformation.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/extractfunction/ExtractFunctionRefactoring.java14
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/extractfunction/SimilarFinderVisitor.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/extractlocalvariable/ExtractLocalVariableRefactoring.java10
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/gettersandsetters/FieldDescriptor.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/gettersandsetters/GenerateGettersAndSettersRefactoring.java8
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/gettersandsetters/GetterSetterContext.java12
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/gettersandsetters/GetterSetterNameGenerator.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/hidemethod/HideMethodRefactoring.java8
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/implementmethod/ImplementMethodData.java4
-rwxr-xr-xcore/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/implementmethod/ImplementMethodRefactoring.java6
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/implementmethod/ImplementMethodWizard.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/implementmethod/MethodDefinitionInsertLocationFinder.java6
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/implementmethod/ParameterHandler.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/includes/HeaderSubstitutionMap.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/includes/IncludeGroupStyle.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/includes/IncludeMap.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/includes/SymbolExportMap.java20
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/rename/CRefactory.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/rename/TextSearchWrapper.java12
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/togglefunction/InsertionPointFinder.java6
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/togglefunction/ToggleFromInHeaderToImplementationStrategy.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/togglefunction/ToggleNodeHelper.java6
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/utils/ASTHelper.java12
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/utils/DefinitionFinder.java8
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/utils/ExpressionFinder.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/utils/PseudoNameGenerator.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/resources/ResourceExclusionContributor.java8
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/CSearchListContentProvider.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/CSearchPage.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/CSearchPatternQuery.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/CSearchProviderManager.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/CSearchTreeContentProvider.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/LRUWorkingSets.java6
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/LineSearchElement.java8
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/LinkedNamesFinder.java8
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/actions/DeclarationsSearchGroup.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/actions/FindInWorkingSetAction.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/actions/ReferencesSearchGroup.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/CCodeScanner.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/CHelpProviderDescriptor.java6
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/CHelpSettings.java6
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/CPreprocessorScanner.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/CombinedWordRule.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/TaskTagRule.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/TokenStore.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/c/hover/BestMatchHover.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/c/hover/CEditorTextHoverDescriptor.java6
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/c/hover/CMacroExpansionExplorationControl.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/c/hover/CMacroExpansionInput.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/c/hover/ProblemHover.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/contentassist/CompletionProposalComputerDescriptor.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/contentassist/CompletionProposalComputerRegistry.java24
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/contentassist/ContentAssistComputerParameter.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/contentassist/HelpCompletionProposalComputer.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/contentassist/InclusionProposalComputer.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/contentassist/KeywordCompletionProposalComputer.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/contentassist/ParsingBasedProposalComputer.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/correction/CCorrectionAssistant.java6
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/correction/CCorrectionProcessor.java10
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/correction/ContributedProcessorDescriptor.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/correction/CorrectionCommandHandler.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/correction/CorrectionCommandInstaller.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/correction/QuickAssistProcessor.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/doctools/DocCommentOwnerManager.java6
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/doctools/EditorReopener.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/doctools/ProjectMap.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/folding/CFoldingStructureProviderRegistry.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/folding/DefaultCFoldingPreferenceBlock.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/folding/DefaultCFoldingStructureProvider.java28
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/spelling/CSpellingProblem.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/spelling/SpellCheckEngine.java6
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/spelling/SpellCheckIterator.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/spelling/SpellingEngineDispatcher.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/spelling/WordCompletionProposalComputer.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/spelling/WordQuickFixProcessor.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/spelling/engine/AbstractSpellDictionary.java10
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/spelling/engine/DefaultSpellChecker.java12
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/template/TemplateEngine.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/template/TemplateVariableProcessor.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/typehierarchy/THHistoryListAction.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/typehierarchy/THLabelProvider.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/typehierarchy/THViewPart.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/util/AbstractResourceActionHandler.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/util/CHelpDisplayContext.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/util/DeleteIProblemMarkerAction.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/util/DeleteTaskAction.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/util/ImageDescriptorRegistry.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/util/ProblemMarkerManager.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/util/ProblemTableViewer.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/util/ProblemTreeViewer.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/util/RemoteTreeContentManager.java6
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/util/RemoteTreeViewer.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/util/ResourceToItemsMapper.java6
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/util/StringMatcher.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/util/TableLayoutComposite.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/viewsupport/AdaptingSelectionProvider.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/viewsupport/AsyncTreeContentProvider.java12
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/viewsupport/CDTContextActivator.java6
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/viewsupport/CUILabelProvider.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/viewsupport/ColoredViewersManager.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/viewsupport/IndexedFilesCache.java8
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/viewsupport/ProblemsLabelDecorator.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/viewsupport/ProjectTemplateStore.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/viewsupport/SelectionListenerWithASTManager.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/viewsupport/SelectionProviderMediator.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/viewsupport/StorageLabelProvider.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/viewsupport/WorkingSetFilter.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/viewsupport/WorkingSetFilterUI.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/CWizardRegistry.java16
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/classwizard/NewBaseClassSelectionDialog.java6
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/classwizard/NewClassCodeGenerator.java16
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/classwizard/SourceFileSelectionDialog.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/dialogfields/CheckedListDialogField.java6
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/dialogfields/ListDialogField.java14
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/dialogfields/TreeListDialogField.java14
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/filewizard/AbstractFileCreationWizardPage.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/filewizard/WizardNewFileFromTemplateCreationPage.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/indexwizards/TeamProjectIndexExportWizardPage.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/settingswizards/IncludePathsSettingsProcessor.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/settingswizards/MacroSettingsProcessor.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/settingswizards/ProjectSettingsImportStrategy.java6
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/settingswizards/ProjectSettingsWizardPage.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/settingswizards/SettingsProcessor.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/settingswizards/XMLUtils.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/workingsets/AbstractWorkingSetConfigsContribution.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/workingsets/AbstractWorkingSetsContribution.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/workingsets/BuildJob.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/workingsets/CElementWorkingSetPage.java6
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/workingsets/CElementWorkingSetPageContentProvider.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/workingsets/CElementWorkingSetUpdater.java6
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/workingsets/IWorkingSetProjectConfigurationFactory.java10
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/workingsets/ProjectConfigsController.java6
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/workingsets/ProjectConfigurationController.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/workingsets/WorkingSetConfigsController.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/workingsets/WorkingSetConfiguration.java8
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/workingsets/WorkingSetConfigurationBlock.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/workingsets/WorkingSetConfigurationManager.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/workingsets/WorkingSetProxy.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/workingsets/WorkspaceSnapshot.java6
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/CDTUIImages.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/CElementContentProvider.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/CUIPlugin.java6
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/NamespacesGrouping.java8
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/SharedImagesFactory.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/actions/ChangeBuildConfigActionBase.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/actions/CustomFiltersActionGroup.java24
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/actions/DeleteResConfigsAction.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/actions/ExcludeFromBuildAction.java6
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/actions/FormatAllAction.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/actions/GenerateActionGroup.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/actions/MemberFilterActionGroup.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/AbstractBinaryParserPage.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/AbstractErrorParserBlock.java8
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/BinaryParserBlock.java12
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/CHelpConfigurationPropertyPage.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/DocCommentOwnerCombo.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/IndexerBlock.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/ReferenceBlock.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/RegexErrorParserOptionPage.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/TabFolderOptionBlock.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/AbstractExportTab.java10
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/AbstractLangsListTab.java8
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/AbstractPage.java8
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/BinaryParsTab.java6
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/CDTPrefUtil.java8
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/CDTPropertyManager.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/CLocationTab.java6
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/EnvironmentTab.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/ErrorParsTab.java10
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/ExPatternDialog.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/ManageConfigSelector.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/RefsTab.java10
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/StringListModeControl.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/refactoring/actions/CRefactoringActionGroup.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/resources/RefreshExclusionContributionManager.java6
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/text/AbstractCScanner.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/text/doctools/doxygen/DoxygenHelper.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/text/doctools/doxygen/DoxygenMultilineAutoEditStrategy.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/text/doctools/generic/GenericTagCommentScanner.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/text/doctools/generic/GenericTagCompletionProposalComputer.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/wizards/CDTCommonProjectWizard.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/wizards/CDTMainWizardPage.java8
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/wizards/conversion/ConvertProjectWizardPage.java2
-rw-r--r--core/org.eclipse.cdt.ui/templateengine/org/eclipse/cdt/ui/internal/templateengine/wizard/TemplateCNewWizard.java2
-rw-r--r--core/org.eclipse.cdt.ui/templateengine/org/eclipse/cdt/ui/templateengine/ProjectSelectionPage.java2
-rw-r--r--core/org.eclipse.cdt.ui/templateengine/org/eclipse/cdt/ui/templateengine/Template.java4
-rw-r--r--core/org.eclipse.cdt.ui/templateengine/org/eclipse/cdt/ui/templateengine/TemplateClassWizard.java2
-rw-r--r--core/org.eclipse.cdt.ui/templateengine/org/eclipse/cdt/ui/templateengine/TemplateDrivenWizard.java4
-rw-r--r--core/org.eclipse.cdt.ui/templateengine/org/eclipse/cdt/ui/templateengine/TemplateEngineUI.java4
-rw-r--r--core/org.eclipse.cdt.ui/templateengine/org/eclipse/cdt/ui/templateengine/TemplatesChoiceWizard.java6
-rw-r--r--core/org.eclipse.cdt.ui/templateengine/org/eclipse/cdt/ui/templateengine/pages/NewProjectCreationPage.java2
-rw-r--r--core/org.eclipse.cdt.ui/templateengine/org/eclipse/cdt/ui/templateengine/pages/UIPagesProvider.java6
-rw-r--r--core/org.eclipse.cdt.ui/templateengine/org/eclipse/cdt/ui/templateengine/pages/UIWizardPage.java2
-rw-r--r--core/org.eclipse.cdt.ui/templateengine/org/eclipse/cdt/ui/templateengine/uitree/GenericUIElementGroup.java4
-rw-r--r--core/org.eclipse.cdt.ui/templateengine/org/eclipse/cdt/ui/templateengine/uitree/uiwidgets/UIBooleanWidget.java2
-rw-r--r--core/org.eclipse.cdt.ui/templateengine/org/eclipse/cdt/ui/templateengine/uitree/uiwidgets/UIComposite.java2
-rw-r--r--core/org.eclipse.cdt.ui/templateengine/org/eclipse/cdt/ui/templateengine/uitree/uiwidgets/UISelectWidget.java2
-rw-r--r--core/org.eclipse.cdt.ui/templateengine/org/eclipse/cdt/ui/templateengine/uitree/uiwidgets/UIStringListWidget.java4
-rw-r--r--core/org.eclipse.cdt.ui/templateengine/org/eclipse/cdt/ui/templateengine/uitree/uiwidgets/UITextWidget.java2
-rw-r--r--core/org.eclipse.cdt.ui/utils.ui/org/eclipse/cdt/utils/ui/controls/FileListControl.java2
-rw-r--r--core/org.eclipse.cdt.ui/utils.ui/org/eclipse/cdt/utils/ui/controls/RadioButtonsArea.java2
706 files changed, 2003 insertions, 2003 deletions
diff --git a/core/org.eclipse.cdt.core.native/src/org/eclipse/cdt/utils/spawner/EnvironmentReader.java b/core/org.eclipse.cdt.core.native/src/org/eclipse/cdt/utils/spawner/EnvironmentReader.java
index 8ba9529945..6e0adcf8a8 100644
--- a/core/org.eclipse.cdt.core.native/src/org/eclipse/cdt/utils/spawner/EnvironmentReader.java
+++ b/core/org.eclipse.cdt.core.native/src/org/eclipse/cdt/utils/spawner/EnvironmentReader.java
@@ -39,7 +39,7 @@ public class EnvironmentReader {
} else {
envVarsNormalized = envVars;
}
- rawVars = new ArrayList<String>();
+ rawVars = new ArrayList<>();
Map<String, String> envMap = System.getenv();
for (String var : envMap.keySet()) {
String value = envMap.get(var);
diff --git a/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/ErrorParserEfsFileMatchingTest.java b/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/ErrorParserEfsFileMatchingTest.java
index 0286d70cad..27c808c29b 100644
--- a/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/ErrorParserEfsFileMatchingTest.java
+++ b/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/ErrorParserEfsFileMatchingTest.java
@@ -96,7 +96,7 @@ public class ErrorParserEfsFileMatchingTest extends TestCase {
Assert.assertNotNull(fProject);
mockErrorParserId = addErrorParserExtension("MockErrorParser", MockErrorParser.class);
}
- errorList = new ArrayList<ProblemMarkerInfo>();
+ errorList = new ArrayList<>();
}
@Override
diff --git a/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/ErrorParserFileMatchingTest.java b/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/ErrorParserFileMatchingTest.java
index 32a588f517..0d7797fd1b 100644
--- a/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/ErrorParserFileMatchingTest.java
+++ b/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/ErrorParserFileMatchingTest.java
@@ -99,7 +99,7 @@ public class ErrorParserFileMatchingTest extends TestCase {
Assert.assertNotNull(fProject);
mockErrorParserId = addErrorParserExtension("MockErrorParser", MockErrorParser.class);
}
- errorList = new ArrayList<ProblemMarkerInfo>();
+ errorList = new ArrayList<>();
}
@Override
diff --git a/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/ErrorParserManagerTest.java b/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/ErrorParserManagerTest.java
index e9cc8dc713..60b1e601d2 100644
--- a/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/ErrorParserManagerTest.java
+++ b/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/ErrorParserManagerTest.java
@@ -96,7 +96,7 @@ public class ErrorParserManagerTest extends TestCase {
desc.setAutoBuilding(false);
workspace.setDescription(desc);
- errorList = new ArrayList<ProblemMarkerInfo>();
+ errorList = new ArrayList<>();
cProject = createProject("errorparsersanity");
markerGenerator = new IMarkerGenerator() {
@Override
diff --git a/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/GenericErrorParserTests.java b/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/GenericErrorParserTests.java
index c4e6282622..d7f3eeba67 100644
--- a/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/GenericErrorParserTests.java
+++ b/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/GenericErrorParserTests.java
@@ -222,7 +222,7 @@ public abstract class GenericErrorParserTests extends TestCase {
numWarnings = 0;
numInfos = 0;
uniqFiles = new ArrayList(0);
- descriptions = new ArrayList<String>(0);
+ descriptions = new ArrayList<>(0);
fFileNameComparator = new FileNameComparator();
}
}
diff --git a/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/RegexErrorParserTests.java b/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/RegexErrorParserTests.java
index 68cb5cad54..1ac765f5d2 100644
--- a/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/RegexErrorParserTests.java
+++ b/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/RegexErrorParserTests.java
@@ -91,7 +91,7 @@ public class RegexErrorParserTests extends TestCase {
protected void setUp() throws Exception {
fProject = ResourceHelper.createCDTProject(TEST_PROJECT_NAME);
assertNotNull(fProject);
- errorList = new ArrayList<ProblemMarkerInfo>();
+ errorList = new ArrayList<>();
}
@Override
diff --git a/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/resources/tests/RefreshScopeTests.java b/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/resources/tests/RefreshScopeTests.java
index eb0861a06d..eec00efd37 100644
--- a/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/resources/tests/RefreshScopeTests.java
+++ b/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/resources/tests/RefreshScopeTests.java
@@ -225,7 +225,7 @@ public class RefreshScopeTests extends TestCase {
RefreshScopeManager manager = RefreshScopeManager.getInstance();
manager.clearAllData();
- HashMap<IResource, List<RefreshExclusion>> config1_resourceMap = new HashMap<IResource, List<RefreshExclusion>>();
+ HashMap<IResource, List<RefreshExclusion>> config1_resourceMap = new HashMap<>();
config1_resourceMap.put(fFolder1, new LinkedList<RefreshExclusion>());
config1_resourceMap.put(fFolder2, new LinkedList<RefreshExclusion>());
manager.setResourcesToExclusionsMap(fProject, config1, config1_resourceMap);
diff --git a/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/utils/StorableCdtVariablesTest.java b/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/utils/StorableCdtVariablesTest.java
index 75ff556d43..7164599266 100644
--- a/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/utils/StorableCdtVariablesTest.java
+++ b/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/utils/StorableCdtVariablesTest.java
@@ -67,7 +67,7 @@ public class StorableCdtVariablesTest extends TestCase {
}
{
ICdtVariable[] vars = supplier.getMacros(desc);
- List<String> macroStrings = new ArrayList<String>();
+ List<String> macroStrings = new ArrayList<>();
for (ICdtVariable var : vars) {
macroStrings.add(var.getName() + '=' + var.getStringValue());
}
@@ -85,7 +85,7 @@ public class StorableCdtVariablesTest extends TestCase {
}
{
ICdtVariable[] vars = supplier.getMacros(desc);
- List<String> macroStrings = new ArrayList<String>();
+ List<String> macroStrings = new ArrayList<>();
for (ICdtVariable var : vars) {
macroStrings.add(var.getName() + '=' + var.getStringValue());
}
diff --git a/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/utils/WeakHashSetTest.java b/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/utils/WeakHashSetTest.java
index f128e32bd6..ddddf7ad05 100644
--- a/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/utils/WeakHashSetTest.java
+++ b/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/utils/WeakHashSetTest.java
@@ -59,7 +59,7 @@ public class WeakHashSetTest extends TestCase {
*/
public void testHashSetBasic() {
// create sample objects
- WeakHashSet<MockClass> weakSet = new WeakHashSet<MockClass>();
+ WeakHashSet<MockClass> weakSet = new WeakHashSet<>();
MockClass a1 = new MockClass("a");
MockClass a2 = new MockClass("a");
@@ -103,7 +103,7 @@ public class WeakHashSetTest extends TestCase {
* Note that regular {@link WeakHashSet} would fail the test.
*/
public void testHashSetSyncronization() throws Exception {
- final WeakHashSet<Integer> weakSet = new WeakHashSetSynchronized<Integer>(1);
+ final WeakHashSet<Integer> weakSet = new WeakHashSetSynchronized<>(1);
Thread[] threads = new Thread[5000];
for (int i = 0; i < threads.length; i++) {
diff --git a/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/language/settings/providers/LanguageSettingsExtensionsTests.java b/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/language/settings/providers/LanguageSettingsExtensionsTests.java
index a3232678a0..ead0274c84 100644
--- a/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/language/settings/providers/LanguageSettingsExtensionsTests.java
+++ b/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/language/settings/providers/LanguageSettingsExtensionsTests.java
@@ -114,7 +114,7 @@ public class LanguageSettingsExtensionsTests extends BaseTestCase {
{
// test provider defined as an extension
List<ILanguageSettingsProvider> providers = LanguageSettingsManager.getWorkspaceProviders();
- List<String> ids = new ArrayList<String>();
+ List<String> ids = new ArrayList<>();
for (ILanguageSettingsProvider provider : providers) {
ids.add(provider.getId());
}
@@ -153,7 +153,7 @@ public class LanguageSettingsExtensionsTests extends BaseTestCase {
assertNull(provider.getSettingEntries(null, FILE_0, LANG_ID));
// benchmarks matching extension point definition
- List<ICLanguageSettingEntry> entriesExt = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entriesExt = new ArrayList<>();
entriesExt.add(new CIncludePathEntry("/usr/include/", ICSettingEntry.BUILTIN | ICSettingEntry.LOCAL
| ICSettingEntry.RESOLVED | ICSettingEntry.VALUE_WORKSPACE_PATH | ICSettingEntry.UNDEFINED));
entriesExt.add(new CMacroEntry("TEST_DEFINE", "100", 0));
@@ -193,7 +193,7 @@ public class LanguageSettingsExtensionsTests extends BaseTestCase {
assertNull(provider.getLanguageScope());
// benchmarks matching extension point definition
- List<ICLanguageSettingEntry> entriesExt = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entriesExt = new ArrayList<>();
entriesExt.add(new CIncludePathEntry("/usr/include/", ICSettingEntry.BUILTIN));
// retrieve entries from extension point
@@ -229,9 +229,9 @@ public class LanguageSettingsExtensionsTests extends BaseTestCase {
*/
public void testBaseProvider() throws Exception {
// define benchmarks
- List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entries = new ArrayList<>();
entries.add(new CIncludePathEntry("path0", 0));
- List<String> languages = new ArrayList<String>(2);
+ List<String> languages = new ArrayList<>(2);
languages.add("bogus.language.id");
languages.add(LANG_ID);
@@ -264,16 +264,16 @@ public class LanguageSettingsExtensionsTests extends BaseTestCase {
*/
public void testBaseProviderConfigure() throws Exception {
// sample entries
- List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entries = new ArrayList<>();
entries.add(new CIncludePathEntry("/usr/include/", 0));
- List<String> languages = new ArrayList<String>();
+ List<String> languages = new ArrayList<>();
languages.add(LANG_ID);
// create LanguageSettingsBaseProvider
LanguageSettingsBaseProvider provider1 = new LanguageSettingsBaseProvider();
LanguageSettingsBaseProvider provider2 = new LanguageSettingsBaseProvider();
{
// configure provider1
- Map<String, String> properties = new HashMap<String, String>();
+ Map<String, String> properties = new HashMap<>();
properties.put("key1", "value1");
properties.put("key2", null);
properties.put("key3", "");
@@ -293,7 +293,7 @@ public class LanguageSettingsExtensionsTests extends BaseTestCase {
}
{
// configure provider2
- Map<String, String> properties = new HashMap<String, String>();
+ Map<String, String> properties = new HashMap<>();
properties.put("key1", "value1");
provider2.configureProvider(PROVIDER_0, PROVIDER_NAME_0, languages, entries, properties);
assertEquals(PROVIDER_0, provider2.getId());
@@ -314,7 +314,7 @@ public class LanguageSettingsExtensionsTests extends BaseTestCase {
public void testBaseProviderCantReconfigure() throws Exception {
// create LanguageSettingsBaseProvider
LanguageSettingsBaseProvider provider = new LanguageSettingsBaseProvider();
- List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entries = new ArrayList<>();
entries.add(new CIncludePathEntry("/usr/include/", 0));
// configure it
provider.configureProvider("test.id", "test.name", null, entries, null);
@@ -347,7 +347,7 @@ public class LanguageSettingsExtensionsTests extends BaseTestCase {
assertEquals(null, provider.getLanguageScope());
assertEquals("", provider.getProperty(EXTENSION_SERIALIZABLE_PROVIDER_MISSING_PARAMETER));
- List<ICLanguageSettingEntry> expected = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> expected = new ArrayList<>();
expected.add(EXTENSION_EDITABLE_PROVIDER_ENTRY);
assertEquals(expected, provider.getSettingEntries(null, null, null));
}
diff --git a/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/language/settings/providers/LanguageSettingsListenersTests.java b/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/language/settings/providers/LanguageSettingsListenersTests.java
index 858a4274b4..062014dafd 100644
--- a/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/language/settings/providers/LanguageSettingsListenersTests.java
+++ b/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/language/settings/providers/LanguageSettingsListenersTests.java
@@ -157,7 +157,7 @@ public class LanguageSettingsListenersTests extends BaseTestCase {
// create a provider
ILanguageSettingsProvider mockProvider = new MockListenerRegisterer(PROVIDER_1, PROVIDER_NAME_1);
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ List<ILanguageSettingsProvider> providers = new ArrayList<>();
providers.add(mockProvider);
((ILanguageSettingsProvidersKeeper) cfgDescription).setLanguageSettingProviders(providers);
List<ILanguageSettingsProvider> storedProviders = ((ILanguageSettingsProvidersKeeper) cfgDescription)
@@ -210,7 +210,7 @@ public class LanguageSettingsListenersTests extends BaseTestCase {
{
// create a provider 1
ILanguageSettingsProvider mockProvider = new MockListenerRegisterer(PROVIDER_1, PROVIDER_NAME_1);
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ List<ILanguageSettingsProvider> providers = new ArrayList<>();
providers.add(mockProvider);
((ILanguageSettingsProvidersKeeper) cfgDescription1).setLanguageSettingProviders(providers);
List<ILanguageSettingsProvider> storedProviders = ((ILanguageSettingsProvidersKeeper) cfgDescription1)
@@ -220,7 +220,7 @@ public class LanguageSettingsListenersTests extends BaseTestCase {
{
// create a provider 2
ILanguageSettingsProvider mockProvider = new MockListenerRegisterer(PROVIDER_1, PROVIDER_NAME_1);
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ List<ILanguageSettingsProvider> providers = new ArrayList<>();
providers.add(mockProvider);
((ILanguageSettingsProvidersKeeper) cfgDescription2).setLanguageSettingProviders(providers);
List<ILanguageSettingsProvider> storedProviders = ((ILanguageSettingsProvidersKeeper) cfgDescription2)
@@ -271,7 +271,7 @@ public class LanguageSettingsListenersTests extends BaseTestCase {
// add global provider
ILanguageSettingsProvider workspaceProvider = LanguageSettingsManager
.getWorkspaceProvider(EXTENSION_REGISTERER_PROVIDER_ID);
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ List<ILanguageSettingsProvider> providers = new ArrayList<>();
providers.add(workspaceProvider);
((ILanguageSettingsProvidersKeeper) cfgDescription).setLanguageSettingProviders(providers);
List<ILanguageSettingsProvider> storedProviders = ((ILanguageSettingsProvidersKeeper) cfgDescription)
@@ -326,7 +326,7 @@ public class LanguageSettingsListenersTests extends BaseTestCase {
{
// add global provider to configuration 1
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ List<ILanguageSettingsProvider> providers = new ArrayList<>();
providers.add(workspaceProvider);
((ILanguageSettingsProvidersKeeper) cfgDescription1).setLanguageSettingProviders(providers);
List<ILanguageSettingsProvider> storedProviders = ((ILanguageSettingsProvidersKeeper) cfgDescription1)
@@ -335,7 +335,7 @@ public class LanguageSettingsListenersTests extends BaseTestCase {
}
{
// add global provider to configuration 2
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ List<ILanguageSettingsProvider> providers = new ArrayList<>();
providers.add(workspaceProvider);
((ILanguageSettingsProvidersKeeper) cfgDescription2).setLanguageSettingProviders(providers);
List<ILanguageSettingsProvider> storedProviders = ((ILanguageSettingsProvidersKeeper) cfgDescription2)
@@ -389,7 +389,7 @@ public class LanguageSettingsListenersTests extends BaseTestCase {
{
// add global provider to configuration 1
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ List<ILanguageSettingsProvider> providers = new ArrayList<>();
providers.add(workspaceProvider);
((ILanguageSettingsProvidersKeeper) cfgDescription1).setLanguageSettingProviders(providers);
List<ILanguageSettingsProvider> storedProviders = ((ILanguageSettingsProvidersKeeper) cfgDescription1)
@@ -398,7 +398,7 @@ public class LanguageSettingsListenersTests extends BaseTestCase {
}
{
// add global provider to configuration 2
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ List<ILanguageSettingsProvider> providers = new ArrayList<>();
providers.add(workspaceProvider);
((ILanguageSettingsProvidersKeeper) cfgDescription2).setLanguageSettingProviders(providers);
List<ILanguageSettingsProvider> storedProviders = ((ILanguageSettingsProvidersKeeper) cfgDescription2)
@@ -426,7 +426,7 @@ public class LanguageSettingsListenersTests extends BaseTestCase {
{
// remove global provider from configuration 1
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ List<ILanguageSettingsProvider> providers = new ArrayList<>();
((ILanguageSettingsProvidersKeeper) cfgDescription1).setLanguageSettingProviders(providers);
List<ILanguageSettingsProvider> storedProviders = ((ILanguageSettingsProvidersKeeper) cfgDescription1)
.getLanguageSettingProviders();
@@ -463,7 +463,7 @@ public class LanguageSettingsListenersTests extends BaseTestCase {
// add global provider
ILanguageSettingsProvider workspaceProvider = LanguageSettingsManager
.getWorkspaceProvider(EXTENSION_REGISTERER_PROVIDER_ID);
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ List<ILanguageSettingsProvider> providers = new ArrayList<>();
providers.add(workspaceProvider);
((ILanguageSettingsProvidersKeeper) cfgDescription).setLanguageSettingProviders(providers);
List<ILanguageSettingsProvider> storedProviders = ((ILanguageSettingsProvidersKeeper) cfgDescription)
@@ -491,7 +491,7 @@ public class LanguageSettingsListenersTests extends BaseTestCase {
// add global provider
ILanguageSettingsProvider workspaceProvider = LanguageSettingsManager
.getWorkspaceProvider(EXTENSION_REGISTERER_PROVIDER_ID);
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ List<ILanguageSettingsProvider> providers = new ArrayList<>();
providers.add(workspaceProvider);
((ILanguageSettingsProvidersKeeper) cfgDescription).setLanguageSettingProviders(providers);
List<ILanguageSettingsProvider> storedProviders = ((ILanguageSettingsProvidersKeeper) cfgDescription)
@@ -534,7 +534,7 @@ public class LanguageSettingsListenersTests extends BaseTestCase {
// add global provider which is not engaged
ILanguageSettingsProvider provider = new MockListenerRegisterer(PROVIDER_CUSTOM_GLOBAL,
PROVIDER_CUSTOM_GLOBAL_NAME);
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>(
+ List<ILanguageSettingsProvider> providers = new ArrayList<>(
workspaceProvidersOriginal);
providers.add(provider);
LanguageSettingsManager.setWorkspaceProviders(providers);
@@ -542,7 +542,7 @@ public class LanguageSettingsListenersTests extends BaseTestCase {
}
{
// remove global provider and restore original list
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>(
+ List<ILanguageSettingsProvider> providers = new ArrayList<>(
workspaceProvidersOriginal);
LanguageSettingsManager.setWorkspaceProviders(providers);
assertEquals(0, MockListenerRegisterer.getCount(PROVIDER_CUSTOM_GLOBAL));
@@ -577,7 +577,7 @@ public class LanguageSettingsListenersTests extends BaseTestCase {
assertTrue(cfgDescription instanceof ILanguageSettingsProvidersKeeper);
// add global provider
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ List<ILanguageSettingsProvider> providers = new ArrayList<>();
providers.add(workspaceProvider);
((ILanguageSettingsProvidersKeeper) cfgDescription).setLanguageSettingProviders(providers);
List<ILanguageSettingsProvider> storedProviders = ((ILanguageSettingsProvidersKeeper) cfgDescription)
@@ -594,14 +594,14 @@ public class LanguageSettingsListenersTests extends BaseTestCase {
// add global provider
ILanguageSettingsProvider provider = new MockListenerRegisterer(PROVIDER_CUSTOM_GLOBAL,
PROVIDER_CUSTOM_GLOBAL_NAME);
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ List<ILanguageSettingsProvider> providers = new ArrayList<>();
providers.add(provider);
LanguageSettingsManager.setWorkspaceProviders(providers);
assertEquals(1, MockListenerRegisterer.getCount(PROVIDER_CUSTOM_GLOBAL));
}
{
// remove global provider
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>(
+ List<ILanguageSettingsProvider> providers = new ArrayList<>(
workspaceProvidersOriginal);
LanguageSettingsManager.setWorkspaceProviders(providers);
assertEquals(0, MockListenerRegisterer.getCount(PROVIDER_CUSTOM_GLOBAL));
@@ -636,7 +636,7 @@ public class LanguageSettingsListenersTests extends BaseTestCase {
assertTrue(cfgDescription instanceof ILanguageSettingsProvidersKeeper);
// clear providers
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ List<ILanguageSettingsProvider> providers = new ArrayList<>();
((ILanguageSettingsProvidersKeeper) cfgDescription).setLanguageSettingProviders(providers);
List<ILanguageSettingsProvider> storedProviders = ((ILanguageSettingsProvidersKeeper) cfgDescription)
.getLanguageSettingProviders();
@@ -665,7 +665,7 @@ public class LanguageSettingsListenersTests extends BaseTestCase {
// create a provider and add to cfgDescription
ILanguageSettingsProvider mockProvider = new MockLanguageSettingsEditableProvider(PROVIDER_1,
PROVIDER_NAME_1);
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ List<ILanguageSettingsProvider> providers = new ArrayList<>();
providers.add(mockProvider);
((ILanguageSettingsProvidersKeeper) cfgDescription).setLanguageSettingProviders(providers);
List<ILanguageSettingsProvider> storedProviders = ((ILanguageSettingsProvidersKeeper) cfgDescription)
@@ -700,7 +700,7 @@ public class LanguageSettingsListenersTests extends BaseTestCase {
assertTrue(cfgDescription instanceof ILanguageSettingsProvidersKeeper);
// clear providers
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ List<ILanguageSettingsProvider> providers = new ArrayList<>();
((ILanguageSettingsProvidersKeeper) cfgDescription).setLanguageSettingProviders(providers);
List<ILanguageSettingsProvider> storedProviders = ((ILanguageSettingsProvidersKeeper) cfgDescription)
.getLanguageSettingProviders();
@@ -730,10 +730,10 @@ public class LanguageSettingsListenersTests extends BaseTestCase {
// create a provider and add entries
MockLanguageSettingsEditableProvider mockProvider = new MockLanguageSettingsEditableProvider(PROVIDER_1,
PROVIDER_NAME_1);
- List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entries = new ArrayList<>();
entries.add(SAMPLE_LSE);
mockProvider.setSettingEntries(cfgDescription, project, null, entries);
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ List<ILanguageSettingsProvider> providers = new ArrayList<>();
providers.add(mockProvider);
((ILanguageSettingsProvidersKeeper) cfgDescription).setLanguageSettingProviders(providers);
List<ILanguageSettingsProvider> storedProviders = ((ILanguageSettingsProvidersKeeper) cfgDescription)
@@ -774,7 +774,7 @@ public class LanguageSettingsListenersTests extends BaseTestCase {
assertTrue(cfgDescription instanceof ILanguageSettingsProvidersKeeper);
// create a provider and add to cfgDescription
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ List<ILanguageSettingsProvider> providers = new ArrayList<>();
providers.add(new MockLanguageSettingsEditableProvider(PROVIDER_1, PROVIDER_NAME_1));
((ILanguageSettingsProvidersKeeper) cfgDescription).setLanguageSettingProviders(providers);
List<ILanguageSettingsProvider> storedProviders = ((ILanguageSettingsProvidersKeeper) cfgDescription)
@@ -804,7 +804,7 @@ public class LanguageSettingsListenersTests extends BaseTestCase {
String cfgDescriptionId = cfgDescription.getId();
// Add entries
- List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entries = new ArrayList<>();
entries.add(SAMPLE_LSE);
List<ILanguageSettingsProvider> providers = ((ILanguageSettingsProvidersKeeper) cfgDescription)
.getLanguageSettingProviders();
@@ -848,7 +848,7 @@ public class LanguageSettingsListenersTests extends BaseTestCase {
assertTrue(cfgDescription instanceof ILanguageSettingsProvidersKeeper);
// create a provider and add to cfgDescription
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ List<ILanguageSettingsProvider> providers = new ArrayList<>();
providers.add(new MockLanguageSettingsEditableProvider(PROVIDER_1, PROVIDER_NAME_1));
((ILanguageSettingsProvidersKeeper) cfgDescription).setLanguageSettingProviders(providers);
List<ILanguageSettingsProvider> storedProviders = ((ILanguageSettingsProvidersKeeper) cfgDescription)
@@ -882,7 +882,7 @@ public class LanguageSettingsListenersTests extends BaseTestCase {
String cfgDescriptionId = cfgDescription.getId();
// Add entries
- List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entries = new ArrayList<>();
entries.add(SAMPLE_LSE);
List<ILanguageSettingsProvider> providers = ((ILanguageSettingsProvidersKeeper) cfgDescription)
.getLanguageSettingProviders();
@@ -915,7 +915,7 @@ public class LanguageSettingsListenersTests extends BaseTestCase {
String cfgDescriptionId = cfgDescription.getId();
// Add same entries
- List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entries = new ArrayList<>();
entries.add(SAMPLE_LSE);
List<ILanguageSettingsProvider> providers = ((ILanguageSettingsProvidersKeeper) cfgDescription)
.getLanguageSettingProviders();
@@ -957,7 +957,7 @@ public class LanguageSettingsListenersTests extends BaseTestCase {
assertTrue(cfgDescription instanceof ILanguageSettingsProvidersKeeper);
// clear providers
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ List<ILanguageSettingsProvider> providers = new ArrayList<>();
((ILanguageSettingsProvidersKeeper) cfgDescription).setLanguageSettingProviders(providers);
List<ILanguageSettingsProvider> storedProviders = ((ILanguageSettingsProvidersKeeper) cfgDescription)
.getLanguageSettingProviders();
@@ -993,7 +993,7 @@ public class LanguageSettingsListenersTests extends BaseTestCase {
((MockLanguageSettingsEditableProvider) rawProvider).clear();
assertEquals(null, wspProvider.getSettingEntries(cfgDescription, project, null));
// add the provider to cfgDescription
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ List<ILanguageSettingsProvider> providers = new ArrayList<>();
providers.add(wspProvider);
((ILanguageSettingsProvidersKeeper) cfgDescription).setLanguageSettingProviders(providers);
List<ILanguageSettingsProvider> storedProviders = ((ILanguageSettingsProvidersKeeper) cfgDescription)
@@ -1028,7 +1028,7 @@ public class LanguageSettingsListenersTests extends BaseTestCase {
assertTrue(cfgDescription instanceof ILanguageSettingsProvidersKeeper);
// clear providers
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ List<ILanguageSettingsProvider> providers = new ArrayList<>();
((ILanguageSettingsProvidersKeeper) cfgDescription).setLanguageSettingProviders(providers);
List<ILanguageSettingsProvider> storedProviders = ((ILanguageSettingsProvidersKeeper) cfgDescription)
.getLanguageSettingProviders();
@@ -1064,13 +1064,13 @@ public class LanguageSettingsListenersTests extends BaseTestCase {
assertTrue(rawProvider instanceof MockLanguageSettingsEditableProvider);
((MockLanguageSettingsEditableProvider) rawProvider).clear();
// add entries
- List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entries = new ArrayList<>();
entries.add(SAMPLE_LSE);
((MockLanguageSettingsEditableProvider) rawProvider).setSettingEntries(cfgDescription, project, null,
entries);
assertEquals(SAMPLE_LSE, wspProvider.getSettingEntries(cfgDescription, project, null).get(0));
// add the provider to cfgDescription
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ List<ILanguageSettingsProvider> providers = new ArrayList<>();
providers.add(wspProvider);
((ILanguageSettingsProvidersKeeper) cfgDescription).setLanguageSettingProviders(providers);
List<ILanguageSettingsProvider> storedProviders = ((ILanguageSettingsProvidersKeeper) cfgDescription)
@@ -1123,7 +1123,7 @@ public class LanguageSettingsListenersTests extends BaseTestCase {
((MockLanguageSettingsEditableProvider) rawProvider).clear();
assertEquals(null, wspProvider.getSettingEntries(cfgDescription, project, null));
// add the provider to cfgDescription
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ List<ILanguageSettingsProvider> providers = new ArrayList<>();
providers.add(wspProvider);
((ILanguageSettingsProvidersKeeper) cfgDescription).setLanguageSettingProviders(providers);
List<ILanguageSettingsProvider> storedProviders = ((ILanguageSettingsProvidersKeeper) cfgDescription)
@@ -1144,7 +1144,7 @@ public class LanguageSettingsListenersTests extends BaseTestCase {
assertTrue(rawProvider instanceof MockLanguageSettingsEditableProvider);
((MockLanguageSettingsEditableProvider) rawProvider).clear();
// add entries
- List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entries = new ArrayList<>();
entries.add(SAMPLE_LSE);
((MockLanguageSettingsEditableProvider) rawProvider).setSettingEntries(null, project, null, entries);
assertEquals(SAMPLE_LSE, wspProvider.getSettingEntries(null, project, null).get(0));
@@ -1279,7 +1279,7 @@ public class LanguageSettingsListenersTests extends BaseTestCase {
assertTrue(cfgDescription instanceof ILanguageSettingsProvidersKeeper);
// add mock provider to cfgDescription
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ List<ILanguageSettingsProvider> providers = new ArrayList<>();
MockLanguageSettingsEditableProvider mockProvider = new MockLanguageSettingsEditableProvider(PROVIDER_1,
PROVIDER_NAME_1);
providers.add(mockProvider);
@@ -1315,7 +1315,7 @@ public class LanguageSettingsListenersTests extends BaseTestCase {
assertEquals(1, providers.size());
MockLanguageSettingsEditableProvider mockProvider = (MockLanguageSettingsEditableProvider) providers.get(0);
- List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entries = new ArrayList<>();
entries.add(SAMPLE_LSE);
mockProvider.setSettingEntries(cfgDescription, project, null, entries);
mockProvider.serializeLanguageSettings(cfgDescription);
@@ -1355,7 +1355,7 @@ public class LanguageSettingsListenersTests extends BaseTestCase {
assertTrue(cfgDescription instanceof ILanguageSettingsProvidersKeeper);
// add mock provider to cfgDescription
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ List<ILanguageSettingsProvider> providers = new ArrayList<>();
MockLanguageSettingsEditableProvider mockProvider = new MockLanguageSettingsEditableProvider(PROVIDER_1,
PROVIDER_NAME_1);
providers.add(mockProvider);
@@ -1391,7 +1391,7 @@ public class LanguageSettingsListenersTests extends BaseTestCase {
assertEquals(1, providers.size());
MockLanguageSettingsEditableProvider mockProvider = (MockLanguageSettingsEditableProvider) providers.get(0);
- List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entries = new ArrayList<>();
entries.add(SAMPLE_LSE);
mockProvider.setSettingEntries(cfgDescription, null, null, entries);
mockProvider.serializeLanguageSettings(cfgDescription);
@@ -1432,7 +1432,7 @@ public class LanguageSettingsListenersTests extends BaseTestCase {
assertTrue(cfgDescription instanceof ILanguageSettingsProvidersKeeper);
// add mock provider to cfgDescription
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ List<ILanguageSettingsProvider> providers = new ArrayList<>();
MockLanguageSettingsEditableProvider mockProvider = new MockLanguageSettingsEditableProvider(PROVIDER_1,
PROVIDER_NAME_1);
providers.add(mockProvider);
@@ -1468,7 +1468,7 @@ public class LanguageSettingsListenersTests extends BaseTestCase {
assertEquals(1, providers.size());
MockLanguageSettingsEditableProvider mockProvider = (MockLanguageSettingsEditableProvider) providers.get(0);
- List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entries = new ArrayList<>();
entries.add(SAMPLE_LSE);
mockProvider.setSettingEntries(cfgDescription, folder, null, entries);
mockProvider.serializeLanguageSettings(cfgDescription);
@@ -1509,7 +1509,7 @@ public class LanguageSettingsListenersTests extends BaseTestCase {
assertTrue(cfgDescription instanceof ILanguageSettingsProvidersKeeper);
// add mock provider to cfgDescription
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ List<ILanguageSettingsProvider> providers = new ArrayList<>();
MockLanguageSettingsEditableProvider mockProvider = new MockLanguageSettingsEditableProvider(PROVIDER_1,
PROVIDER_NAME_1);
providers.add(mockProvider);
@@ -1545,7 +1545,7 @@ public class LanguageSettingsListenersTests extends BaseTestCase {
assertEquals(1, providers.size());
MockLanguageSettingsEditableProvider mockProvider = (MockLanguageSettingsEditableProvider) providers.get(0);
- List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entries = new ArrayList<>();
entries.add(SAMPLE_LSE);
mockProvider.setSettingEntries(cfgDescription, file, null, entries);
mockProvider.serializeLanguageSettings(cfgDescription);
@@ -1589,7 +1589,7 @@ public class LanguageSettingsListenersTests extends BaseTestCase {
assertTrue(cfgDescription instanceof ILanguageSettingsProvidersKeeper);
// add mock provider to cfgDescription
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ List<ILanguageSettingsProvider> providers = new ArrayList<>();
MockLanguageSettingsEditableProvider mockProvider = new MockLanguageSettingsEditableProvider(PROVIDER_1,
PROVIDER_NAME_1);
providers.add(mockProvider);
@@ -1625,7 +1625,7 @@ public class LanguageSettingsListenersTests extends BaseTestCase {
assertEquals(1, providers.size());
MockLanguageSettingsEditableProvider mockProvider = (MockLanguageSettingsEditableProvider) providers.get(0);
- List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entries = new ArrayList<>();
entries.add(SAMPLE_LSE);
mockProvider.setSettingEntries(cfgDescription, folder, null, entries);
mockProvider.setSettingEntries(cfgDescription, file1, null, entries);
diff --git a/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/language/settings/providers/LanguageSettingsManagerTests.java b/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/language/settings/providers/LanguageSettingsManagerTests.java
index 83071da50c..687b151cac 100644
--- a/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/language/settings/providers/LanguageSettingsManagerTests.java
+++ b/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/language/settings/providers/LanguageSettingsManagerTests.java
@@ -67,7 +67,7 @@ public class LanguageSettingsManagerTests extends BaseTestCase {
*/
class MockConfigurationDescription extends CModelMock.DummyCConfigurationDescription
implements ILanguageSettingsProvidersKeeper {
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ List<ILanguageSettingsProvider> providers = new ArrayList<>();
String[] defaultProvidersIds = null;
public MockConfigurationDescription(String id) {
@@ -76,7 +76,7 @@ public class LanguageSettingsManagerTests extends BaseTestCase {
@Override
public void setLanguageSettingProviders(List<? extends ILanguageSettingsProvider> providers) {
- this.providers = new ArrayList<ILanguageSettingsProvider>(providers);
+ this.providers = new ArrayList<>(providers);
}
@Override
@@ -159,7 +159,7 @@ public class LanguageSettingsManagerTests extends BaseTestCase {
// set providers
ILanguageSettingsProvider provider1 = new MockProvider(PROVIDER_1, PROVIDER_NAME_1, null);
ILanguageSettingsProvider provider2 = new MockProvider(PROVIDER_2, PROVIDER_NAME_2, null);
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ List<ILanguageSettingsProvider> providers = new ArrayList<>();
providers.add(provider1);
providers.add(provider2);
cfgDescription.setLanguageSettingProviders(providers);
@@ -197,7 +197,7 @@ public class LanguageSettingsManagerTests extends BaseTestCase {
MockProvider dupe1 = new MockProvider(PROVIDER_0, PROVIDER_NAME_1, null);
MockProvider dupe2 = new MockProvider(PROVIDER_0, PROVIDER_NAME_2, null);
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ List<ILanguageSettingsProvider> providers = new ArrayList<>();
providers.add(dupe1);
providers.add(dupe2);
@@ -218,7 +218,7 @@ public class LanguageSettingsManagerTests extends BaseTestCase {
// set impolite provider returning null by getSettingEntries()
ILanguageSettingsProvider providerNull = new MockProvider(PROVIDER_1, PROVIDER_NAME_1, null);
{
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ List<ILanguageSettingsProvider> providers = new ArrayList<>();
providers.add(providerNull);
cfgDescription.setLanguageSettingProviders(providers);
}
@@ -245,7 +245,7 @@ public class LanguageSettingsManagerTests extends BaseTestCase {
}
});
{
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ List<ILanguageSettingsProvider> providers = new ArrayList<>();
providers.add(providerNull);
cfgDescription.setLanguageSettingProviders(providers);
}
@@ -292,10 +292,10 @@ public class LanguageSettingsManagerTests extends BaseTestCase {
public void testProvider_Basic() throws Exception {
final MockConfigurationDescription modelCfgDescription = new MockConfigurationDescription(CFG_ID);
- final List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ final List<ICLanguageSettingEntry> entries = new ArrayList<>();
entries.add(new CIncludePathEntry("path0", 0));
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ List<ILanguageSettingsProvider> providers = new ArrayList<>();
// define provider returning entries when configuration id matches and null otherwise
ILanguageSettingsProvider providerYes = new MockProvider(PROVIDER_0, PROVIDER_NAME_0, null) {
@Override
@@ -347,18 +347,18 @@ public class LanguageSettingsManagerTests extends BaseTestCase {
MockConfigurationDescription cfgDescription = new MockConfigurationDescription(CFG_ID);
// create couple of providers
- List<ICLanguageSettingEntry> entries1 = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entries1 = new ArrayList<>();
entries1.add(new CIncludePathEntry("value1", 1));
entries1.add(new CIncludePathEntry("value2", 2));
- List<ICLanguageSettingEntry> entries2 = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entries2 = new ArrayList<>();
entries2.add(new CIncludePathEntry("value1", 1));
entries2.add(new CIncludePathEntry("value2", 2));
entries2.add(new CIncludePathEntry("value3", 2));
ILanguageSettingsProvider provider1 = new MockProvider(PROVIDER_1, PROVIDER_NAME_1, entries1);
ILanguageSettingsProvider provider2 = new MockProvider(PROVIDER_2, PROVIDER_NAME_2, entries2);
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ List<ILanguageSettingsProvider> providers = new ArrayList<>();
providers.add(provider1);
providers.add(provider2);
cfgDescription.setLanguageSettingProviders(providers);
@@ -412,9 +412,9 @@ public class LanguageSettingsManagerTests extends BaseTestCase {
assertNotNull(emptySettingsPath);
// store the entries in parent folder
- final List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ final List<ICLanguageSettingEntry> entries = new ArrayList<>();
entries.add(new CIncludePathEntry("path0", 0));
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ List<ILanguageSettingsProvider> providers = new ArrayList<>();
ILanguageSettingsProvider provider = new MockProvider(PROVIDER_0, PROVIDER_NAME_0, null) {
@Override
public List<ICLanguageSettingEntry> getSettingEntries(ICConfigurationDescription cfgDescription,
@@ -423,7 +423,7 @@ public class LanguageSettingsManagerTests extends BaseTestCase {
return entries;
}
if (rc != null && rc.equals(emptySettingsPath)) {
- return new ArrayList<ICLanguageSettingEntry>(0);
+ return new ArrayList<>(0);
}
return null;
}
@@ -480,9 +480,9 @@ public class LanguageSettingsManagerTests extends BaseTestCase {
assertNotNull(emptySettingsPath);
// store the entries as default entries
- final List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ final List<ICLanguageSettingEntry> entries = new ArrayList<>();
entries.add(new CIncludePathEntry("path0", 0));
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ List<ILanguageSettingsProvider> providers = new ArrayList<>();
ILanguageSettingsProvider provider = new MockProvider(PROVIDER_0, PROVIDER_NAME_0, null) {
@Override
public List<ICLanguageSettingEntry> getSettingEntries(ICConfigurationDescription cfgDescription,
@@ -515,7 +515,7 @@ public class LanguageSettingsManagerTests extends BaseTestCase {
MockConfigurationDescription cfgDescription = new MockConfigurationDescription(CFG_ID);
// contribute the entries
- List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entries = new ArrayList<>();
entries.add(new CIncludePathEntry("path0", 0));
entries.add(new CMacroEntry("MACRO0", "value0", 0));
entries.add(new CIncludePathEntry("path1", 0));
@@ -523,7 +523,7 @@ public class LanguageSettingsManagerTests extends BaseTestCase {
entries.add(new CIncludePathEntry("path2", 0));
ILanguageSettingsProvider provider0 = new MockProvider(PROVIDER_0, PROVIDER_NAME_0, entries);
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ List<ILanguageSettingsProvider> providers = new ArrayList<>();
providers.add(provider0);
cfgDescription.setLanguageSettingProviders(providers);
@@ -549,13 +549,13 @@ public class LanguageSettingsManagerTests extends BaseTestCase {
MockConfigurationDescription cfgDescription = new MockConfigurationDescription(CFG_ID);
// contribute the entries
- List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entries = new ArrayList<>();
entries.add(new CIncludePathEntry("path", ICSettingEntry.BUILTIN));
entries.add(new CIncludePathEntry("path", ICSettingEntry.UNDEFINED));
entries.add(new CIncludePathEntry("path", 0));
ILanguageSettingsProvider provider0 = new MockProvider(PROVIDER_0, PROVIDER_NAME_0, entries);
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ List<ILanguageSettingsProvider> providers = new ArrayList<>();
providers.add(provider0);
cfgDescription.setLanguageSettingProviders(providers);
@@ -573,12 +573,12 @@ public class LanguageSettingsManagerTests extends BaseTestCase {
MockConfigurationDescription cfgDescription = new MockConfigurationDescription(CFG_ID);
// contribute the entries
- List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entries = new ArrayList<>();
entries.add(new CIncludePathEntry("path", ICSettingEntry.UNDEFINED));
entries.add(new CIncludePathEntry("path", 0));
ILanguageSettingsProvider provider0 = new MockProvider(PROVIDER_0, PROVIDER_NAME_0, entries);
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ List<ILanguageSettingsProvider> providers = new ArrayList<>();
providers.add(provider0);
cfgDescription.setLanguageSettingProviders(providers);
@@ -595,14 +595,14 @@ public class LanguageSettingsManagerTests extends BaseTestCase {
MockConfigurationDescription cfgDescription = new MockConfigurationDescription(CFG_ID);
// contribute the entries
- List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entries = new ArrayList<>();
CIncludePathEntry localIncludeEntry = new CIncludePathEntry("path-local", ICSettingEntry.LOCAL);
CIncludePathEntry systemIncludeEntry = new CIncludePathEntry("path-system", 0);
entries.add(localIncludeEntry);
entries.add(systemIncludeEntry);
ILanguageSettingsProvider provider0 = new MockProvider(PROVIDER_0, PROVIDER_NAME_0, entries);
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ List<ILanguageSettingsProvider> providers = new ArrayList<>();
providers.add(provider0);
cfgDescription.setLanguageSettingProviders(providers);
@@ -639,10 +639,10 @@ public class LanguageSettingsManagerTests extends BaseTestCase {
MockConfigurationDescription cfgDescription = new MockConfigurationDescription(CFG_ID);
// contribute the entries
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ List<ILanguageSettingsProvider> providers = new ArrayList<>();
// contribute the higher ranked entries
- List<ICLanguageSettingEntry> entriesHigh = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entriesHigh = new ArrayList<>();
entriesHigh.add(new CIncludePathEntry("path0", ICSettingEntry.RESOLVED));
entriesHigh.add(new CIncludePathEntry("path1", 0));
entriesHigh.add(new CIncludePathEntry("path2", ICSettingEntry.UNDEFINED));
@@ -650,7 +650,7 @@ public class LanguageSettingsManagerTests extends BaseTestCase {
providers.add(highRankProvider);
// contribute the lower ranked entries
- List<ICLanguageSettingEntry> entriesLow = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entriesLow = new ArrayList<>();
entriesLow.add(new CIncludePathEntry("path0", ICSettingEntry.BUILTIN));
entriesLow.add(new CIncludePathEntry("path1", ICSettingEntry.UNDEFINED));
entriesLow.add(new CIncludePathEntry("path2", 0));
@@ -680,7 +680,7 @@ public class LanguageSettingsManagerTests extends BaseTestCase {
MockConfigurationDescription cfgDescription = new MockConfigurationDescription(CFG_ID);
// contribute the entries
- List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entries = new ArrayList<>();
entries.add(new CIncludePathEntry("path0", 0));
entries.add(new CMacroEntry("MACRO0", "value0", 0));
entries.add(new CIncludePathEntry("path1", 0));
@@ -690,7 +690,7 @@ public class LanguageSettingsManagerTests extends BaseTestCase {
entries.add(new CIncludeFileEntry("include-path-file", 0));
ILanguageSettingsProvider provider0 = new MockProvider(PROVIDER_0, PROVIDER_NAME_0, entries);
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ List<ILanguageSettingsProvider> providers = new ArrayList<>();
providers.add(provider0);
cfgDescription.setLanguageSettingProviders(providers);
@@ -735,7 +735,7 @@ public class LanguageSettingsManagerTests extends BaseTestCase {
}
{
// set test provider
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ List<ILanguageSettingsProvider> providers = new ArrayList<>();
providers.add(workspaceProvider);
((ILanguageSettingsProvidersKeeper) cfgDescription).setLanguageSettingProviders(providers);
}
@@ -797,7 +797,7 @@ public class LanguageSettingsManagerTests extends BaseTestCase {
{
// set new entries to the raw provider
- List<ICLanguageSettingEntry> newEntries = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> newEntries = new ArrayList<>();
newEntries.add(new CIncludePathEntry("path0", 0));
newEntries.add(new CIncludePathEntry("path1", 0));
((LanguageSettingsSerializableProvider) rawProvider).setSettingEntries(null, null, null, newEntries);
@@ -834,14 +834,14 @@ public class LanguageSettingsManagerTests extends BaseTestCase {
}
// define new entries for the raw provider
- List<ICLanguageSettingEntry> newEntries = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> newEntries = new ArrayList<>();
newEntries.add(new CIncludePathEntry("path0", 0));
newEntries.add(new CIncludePathEntry("path1", 0));
newEntries.add(new CIncludePathEntry("path2", 0));
{
// replace raw provider
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ List<ILanguageSettingsProvider> providers = new ArrayList<>();
LanguageSettingsSerializableProvider newRawProvider = new LanguageSettingsSerializableProvider(
EXTENSION_EDITABLE_PROVIDER_ID, PROVIDER_NAME_0);
newRawProvider.setSettingEntries(null, null, null, newEntries);
@@ -868,7 +868,7 @@ public class LanguageSettingsManagerTests extends BaseTestCase {
assertNotSame(provider, rawProvider);
// attempt to "replace" with workspace provider (which is a wrapper around raw provider), should be NOOP
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ List<ILanguageSettingsProvider> providers = new ArrayList<>();
providers.add(provider);
LanguageSettingsManager.setWorkspaceProviders(providers);
ILanguageSettingsProvider newRawProvider = LanguageSettingsManager.getRawProvider(provider);
diff --git a/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/language/settings/providers/LanguageSettingsPersistenceProjectTests.java b/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/language/settings/providers/LanguageSettingsPersistenceProjectTests.java
index 682ef3dc6d..9ff5fd507b 100644
--- a/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/language/settings/providers/LanguageSettingsPersistenceProjectTests.java
+++ b/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/language/settings/providers/LanguageSettingsPersistenceProjectTests.java
@@ -82,7 +82,7 @@ public class LanguageSettingsPersistenceProjectTests extends BaseTestCase {
@Override
public void setLanguageSettingProviders(List<? extends ILanguageSettingsProvider> providers) {
- this.providers = new ArrayList<ILanguageSettingsProvider>(providers);
+ this.providers = new ArrayList<>(providers);
}
@Override
@@ -227,7 +227,7 @@ public class LanguageSettingsPersistenceProjectTests extends BaseTestCase {
// create new provider list
LanguageSettingsSerializableProvider mockProvider = new MockLanguageSettingsEditableProvider(PROVIDER_0,
PROVIDER_NAME_0);
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>(originalProviders);
+ List<ILanguageSettingsProvider> providers = new ArrayList<>(originalProviders);
providers.add(mockProvider);
assertTrue(originalSize != providers.size());
@@ -254,7 +254,7 @@ public class LanguageSettingsPersistenceProjectTests extends BaseTestCase {
// try to write to it providers
try {
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ List<ILanguageSettingsProvider> providers = new ArrayList<>();
((ILanguageSettingsProvidersKeeper) cfgDescriptionReadOnly).setLanguageSettingProviders(providers);
fail("WriteAccessException was expected but it was not throw.");
} catch (WriteAccessException e) {
@@ -271,7 +271,7 @@ public class LanguageSettingsPersistenceProjectTests extends BaseTestCase {
}
}
- List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entries = new ArrayList<>();
entries.add(new CIncludePathEntry("path0", 0));
{
@@ -290,7 +290,7 @@ public class LanguageSettingsPersistenceProjectTests extends BaseTestCase {
PROVIDER_NAME_1);
LanguageSettingsManager.setStoringEntriesInProjectArea(mockProvider, true);
mockProvider.setSettingEntries(cfgDescriptionWritable, null, null, entries);
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ List<ILanguageSettingsProvider> providers = new ArrayList<>();
providers.add(mockProvider);
((ILanguageSettingsProvidersKeeper) cfgDescriptionWritable).setLanguageSettingProviders(providers);
List<ILanguageSettingsProvider> storedProviders = ((ILanguageSettingsProvidersKeeper) cfgDescriptionWritable)
@@ -368,7 +368,7 @@ public class LanguageSettingsPersistenceProjectTests extends BaseTestCase {
* Persist and reload a customized provider defined in the workspace.
*/
public void testWorkspacePersistence_ModifiedExtensionProvider() throws Exception {
- List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entries = new ArrayList<>();
entries.add(new CIncludePathEntry("path0", 0));
{
@@ -417,7 +417,7 @@ public class LanguageSettingsPersistenceProjectTests extends BaseTestCase {
* Check persistence of unmodified extension provider in the workspace.
*/
public void testWorkspacePersistence_UnmodifiedExtensionProvider() throws Exception {
- List<ICLanguageSettingEntry> extensionEntries = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> extensionEntries = new ArrayList<>();
extensionEntries.add(EXTENSION_SERIALIZABLE_PROVIDER_ENTRY);
{
// test initial state of the extension provider
@@ -451,7 +451,7 @@ public class LanguageSettingsPersistenceProjectTests extends BaseTestCase {
// replace entries
assertTrue(rawProvider instanceof LanguageSettingsSerializableProvider);
- List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entries = new ArrayList<>();
entries.add(new CIncludePathEntry("path0", 0));
((LanguageSettingsSerializableProvider) rawProvider).setSettingEntries(null, null, null, entries);
@@ -479,7 +479,7 @@ public class LanguageSettingsPersistenceProjectTests extends BaseTestCase {
}
{
// save workspace provider (as opposed to raw provider)
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ List<ILanguageSettingsProvider> providers = new ArrayList<>();
ILanguageSettingsProvider provider = LanguageSettingsManager
.getWorkspaceProvider(EXTENSION_SERIALIZABLE_PROVIDER_ID);
providers.add(provider);
@@ -513,7 +513,7 @@ public class LanguageSettingsPersistenceProjectTests extends BaseTestCase {
// replace extension provider
ILanguageSettingsProvider provider = new MockLanguageSettingsSerializableProvider(
EXTENSION_BASE_PROVIDER_ID, PROVIDER_NAME_0);
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ List<ILanguageSettingsProvider> providers = new ArrayList<>();
providers.add(provider);
// note that this will also serialize workspace providers
LanguageSettingsManager.setWorkspaceProviders(providers);
@@ -572,7 +572,7 @@ public class LanguageSettingsPersistenceProjectTests extends BaseTestCase {
public void testProjectPersistence_SerializableProviderDOM() throws Exception {
Element rootElement = null;
- List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entries = new ArrayList<>();
entries.add(new CIncludePathEntry("path0", 0));
{
@@ -590,7 +590,7 @@ public class LanguageSettingsPersistenceProjectTests extends BaseTestCase {
serializableProvider.setSettingEntries(null, null, null, entries);
LanguageSettingsManager.setStoringEntriesInProjectArea(serializableProvider, true);
- ArrayList<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ ArrayList<ILanguageSettingsProvider> providers = new ArrayList<>();
providers.add(serializableProvider);
((ILanguageSettingsProvidersKeeper) cfgDescription).setLanguageSettingProviders(providers);
@@ -634,7 +634,7 @@ public class LanguageSettingsPersistenceProjectTests extends BaseTestCase {
public void testProjectPersistence_UserProviderDOM() throws Exception {
Element rootElement = null;
- List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entries = new ArrayList<>();
entries.add(new CIncludePathEntry("path0", 0));
{
@@ -653,7 +653,7 @@ public class LanguageSettingsPersistenceProjectTests extends BaseTestCase {
serializableProvider.setSettingEntries(null, null, null, entries);
LanguageSettingsManager.setStoringEntriesInProjectArea(serializableProvider, true);
- ArrayList<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ ArrayList<ILanguageSettingsProvider> providers = new ArrayList<>();
providers.add(serializableProvider);
((ILanguageSettingsProvidersKeeper) cfgDescription).setLanguageSettingProviders(providers);
@@ -698,9 +698,9 @@ public class LanguageSettingsPersistenceProjectTests extends BaseTestCase {
public void testProjectPersistence_TwoConfigurationsDOM() throws Exception {
Element rootElement = null;
- List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entries = new ArrayList<>();
entries.add(new CIncludePathEntry("path0", 0));
- List<ICLanguageSettingEntry> entries2 = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entries2 = new ArrayList<>();
entries2.add(new CIncludePathEntry("path2", 0));
{
@@ -722,7 +722,7 @@ public class LanguageSettingsPersistenceProjectTests extends BaseTestCase {
PROVIDER_0, PROVIDER_NAME_0);
LanguageSettingsManager.setStoringEntriesInProjectArea(provider1, true);
provider1.setSettingEntries(null, null, null, entries);
- ArrayList<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ ArrayList<ILanguageSettingsProvider> providers = new ArrayList<>();
providers.add(provider1);
((ILanguageSettingsProvidersKeeper) cfgDescription1).setLanguageSettingProviders(providers);
}
@@ -737,7 +737,7 @@ public class LanguageSettingsPersistenceProjectTests extends BaseTestCase {
PROVIDER_0, PROVIDER_NAME_0);
LanguageSettingsManager.setStoringEntriesInProjectArea(provider2, true);
provider2.setSettingEntries(null, null, null, entries2);
- ArrayList<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ ArrayList<ILanguageSettingsProvider> providers = new ArrayList<>();
providers.add(provider2);
((ILanguageSettingsProvidersKeeper) cfgDescription2).setLanguageSettingProviders(providers);
}
@@ -840,7 +840,7 @@ public class LanguageSettingsPersistenceProjectTests extends BaseTestCase {
public void testProjectPersistence_SubclassedSerializableProviderDOM() throws Exception {
Element rootElement = null;
- List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entries = new ArrayList<>();
entries.add(new CIncludePathEntry("path0", 0));
{
@@ -858,7 +858,7 @@ public class LanguageSettingsPersistenceProjectTests extends BaseTestCase {
serializableProvider.setSettingEntries(null, null, null, entries);
LanguageSettingsManager.setStoringEntriesInProjectArea(serializableProvider, true);
- ArrayList<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ ArrayList<ILanguageSettingsProvider> providers = new ArrayList<>();
providers.add(serializableProvider);
((ILanguageSettingsProvidersKeeper) cfgDescription).setLanguageSettingProviders(providers);
@@ -915,7 +915,7 @@ public class LanguageSettingsPersistenceProjectTests extends BaseTestCase {
assertTrue(cfgDescription instanceof ILanguageSettingsProvidersKeeper);
// populate with provider defined as extension
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ List<ILanguageSettingsProvider> providers = new ArrayList<>();
providers.add(providerExt);
((ILanguageSettingsProvidersKeeper) cfgDescription).setLanguageSettingProviders(providers);
@@ -973,7 +973,7 @@ public class LanguageSettingsPersistenceProjectTests extends BaseTestCase {
MockLanguageSettingsSerializableProvider providerOverride = new MockLanguageSettingsSerializableProvider(
idExt, PROVIDER_NAME_0);
LanguageSettingsManager.setStoringEntriesInProjectArea(providerOverride, true);
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ List<ILanguageSettingsProvider> providers = new ArrayList<>();
providers.add(providerOverride);
((ILanguageSettingsProvidersKeeper) cfgDescription).setLanguageSettingProviders(providers);
@@ -1016,10 +1016,10 @@ public class LanguageSettingsPersistenceProjectTests extends BaseTestCase {
public void testProjectPersistence_MixedProvidersDOM() throws Exception {
Element rootElement = null;
- List<ICLanguageSettingEntry> entries_31 = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entries_31 = new ArrayList<>();
entries_31.add(new CIncludePathEntry("path0", 0));
- List<ICLanguageSettingEntry> entries_32 = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entries_32 = new ArrayList<>();
entries_32.add(new CIncludePathEntry("path2", 0));
ILanguageSettingsProvider providerExt;
@@ -1048,7 +1048,7 @@ public class LanguageSettingsPersistenceProjectTests extends BaseTestCase {
LanguageSettingsManager.setStoringEntriesInProjectArea(mockProvider2, true);
mockProvider2.setSettingEntries(null, null, null, entries_32);
- ArrayList<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ ArrayList<ILanguageSettingsProvider> providers = new ArrayList<>();
providers.add(providerExt);
providers.add(mockProvider1);
providers.add(mockProvider2);
@@ -1112,7 +1112,7 @@ public class LanguageSettingsPersistenceProjectTests extends BaseTestCase {
IFile xmlStorageFilePrj = project.getFile(LANGUAGE_SETTINGS_PROJECT_XML);
String xmlPrjOutOfTheWay;
- List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entries = new ArrayList<>();
entries.add(new CIncludePathEntry("path0", 0));
{
@@ -1131,7 +1131,7 @@ public class LanguageSettingsPersistenceProjectTests extends BaseTestCase {
PROVIDER_NAME_0);
LanguageSettingsManager.setStoringEntriesInProjectArea(mockProvider, true);
mockProvider.setSettingEntries(cfgDescriptionWritable, null, null, entries);
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ List<ILanguageSettingsProvider> providers = new ArrayList<>();
providers.add(mockProvider);
((ILanguageSettingsProvidersKeeper) cfgDescriptionWritable).setLanguageSettingProviders(providers);
List<ILanguageSettingsProvider> storedProviders = ((ILanguageSettingsProvidersKeeper) cfgDescriptionWritable)
@@ -1270,7 +1270,7 @@ public class LanguageSettingsPersistenceProjectTests extends BaseTestCase {
Element prjStorageElement = null;
Element wspStorageElement = null;
- List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entries = new ArrayList<>();
entries.add(new CIncludePathEntry("path0", 0));
{
@@ -1289,7 +1289,7 @@ public class LanguageSettingsPersistenceProjectTests extends BaseTestCase {
// do not store entries inside project
LanguageSettingsManager.setStoringEntriesInProjectArea(serializableProvider, false);
- ArrayList<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ ArrayList<ILanguageSettingsProvider> providers = new ArrayList<>();
providers.add(serializableProvider);
((ILanguageSettingsProvidersKeeper) cfgDescription).setLanguageSettingProviders(providers);
@@ -1350,7 +1350,7 @@ public class LanguageSettingsPersistenceProjectTests extends BaseTestCase {
String xmlStorageFileWspLocation;
String xmlWspOutOfTheWay;
- List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entries = new ArrayList<>();
entries.add(new CIncludePathEntry("path0", 0));
{
@@ -1369,7 +1369,7 @@ public class LanguageSettingsPersistenceProjectTests extends BaseTestCase {
PROVIDER_NAME_0);
LanguageSettingsManager.setStoringEntriesInProjectArea(mockProvider, false);
mockProvider.setSettingEntries(cfgDescriptionWritable, null, null, entries);
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ List<ILanguageSettingsProvider> providers = new ArrayList<>();
providers.add(mockProvider);
((ILanguageSettingsProvidersKeeper) cfgDescriptionWritable).setLanguageSettingProviders(providers);
List<ILanguageSettingsProvider> storedProviders = ((ILanguageSettingsProvidersKeeper) cfgDescriptionWritable)
@@ -1543,7 +1543,7 @@ public class LanguageSettingsPersistenceProjectTests extends BaseTestCase {
assertNotNull(cfgDescription);
assertTrue(cfgDescription instanceof ILanguageSettingsProvidersKeeper);
- ArrayList<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ ArrayList<ILanguageSettingsProvider> providers = new ArrayList<>();
providers.add(providerExt);
((ILanguageSettingsProvidersKeeper) cfgDescription).setLanguageSettingProviders(providers);
@@ -1600,7 +1600,7 @@ public class LanguageSettingsPersistenceProjectTests extends BaseTestCase {
assertNotNull(cfgDescription);
assertTrue(cfgDescription instanceof ILanguageSettingsProvidersKeeper);
- ArrayList<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ ArrayList<ILanguageSettingsProvider> providers = new ArrayList<>();
providers.add(providerExt);
((ILanguageSettingsProvidersKeeper) cfgDescription).setLanguageSettingProviders(providers);
@@ -1654,8 +1654,8 @@ public class LanguageSettingsPersistenceProjectTests extends BaseTestCase {
* Test serialization of global providers exactly equal extension in workspace area.
*/
public void testWorkspacePersistence_ProviderExtensionCopy() throws Exception {
- List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ List<ICLanguageSettingEntry> entries = new ArrayList<>();
+ List<ILanguageSettingsProvider> providers = new ArrayList<>();
entries.add(new CIncludePathEntry("path0", 0));
{
// get extension provider
diff --git a/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/language/settings/providers/LanguageSettingsProviderReferencedProjectsTests.java b/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/language/settings/providers/LanguageSettingsProviderReferencedProjectsTests.java
index dca7af1c99..cf6b679525 100644
--- a/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/language/settings/providers/LanguageSettingsProviderReferencedProjectsTests.java
+++ b/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/language/settings/providers/LanguageSettingsProviderReferencedProjectsTests.java
@@ -122,7 +122,7 @@ public class LanguageSettingsProviderReferencedProjectsTests extends BaseTestCas
ICConfigurationDescription cfgDescription = cfgDescriptions[0];
Map<String, String> refs = cfgDescription.getReferenceInfo();
assertEquals(1, refs.size());
- Set<String> referencedProjectsNames = new LinkedHashSet<String>(refs.keySet());
+ Set<String> referencedProjectsNames = new LinkedHashSet<>(refs.keySet());
assertEquals(projectReferenced.getName(), referencedProjectsNames.toArray()[0]);
}
@@ -184,7 +184,7 @@ public class LanguageSettingsProviderReferencedProjectsTests extends BaseTestCas
assertEquals(ScannerDiscoveryLegacySupport.USER_LANGUAGE_SETTINGS_PROVIDER_ID, userProviderNonRef.getId());
assertTrue(userProviderNonRef instanceof LanguageSettingsGenericProvider);
// add sample entries
- ArrayList<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ ArrayList<ICLanguageSettingEntry> entries = new ArrayList<>();
entries.add(nonRefEntry);
((LanguageSettingsGenericProvider) userProviderNonRef).setSettingEntries(null, null, null, entries);
}
@@ -207,7 +207,7 @@ public class LanguageSettingsProviderReferencedProjectsTests extends BaseTestCas
assertEquals(ScannerDiscoveryLegacySupport.USER_LANGUAGE_SETTINGS_PROVIDER_ID, userProviderRef.getId());
assertTrue(userProviderRef instanceof LanguageSettingsGenericProvider);
// add sample entries
- ArrayList<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ ArrayList<ICLanguageSettingEntry> entries = new ArrayList<>();
CIncludePathEntry refEntryNotExported = CDataUtil.createCIncludePathEntry("referenced-not-exported", 0);
entries.add(refEntry);
entries.add(refEntryNotExported);
@@ -276,7 +276,7 @@ public class LanguageSettingsProviderReferencedProjectsTests extends BaseTestCas
assertEquals(ScannerDiscoveryLegacySupport.USER_LANGUAGE_SETTINGS_PROVIDER_ID, userProviderRef.getId());
assertTrue(userProviderRef instanceof LanguageSettingsGenericProvider);
// add sample entries
- ArrayList<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ ArrayList<ICLanguageSettingEntry> entries = new ArrayList<>();
entries.add(entryExportedA);
entries.add(entryNotExportedA);
((LanguageSettingsGenericProvider) userProviderRef).setSettingEntries(null, null, null, entries);
@@ -296,7 +296,7 @@ public class LanguageSettingsProviderReferencedProjectsTests extends BaseTestCas
assertEquals(ScannerDiscoveryLegacySupport.USER_LANGUAGE_SETTINGS_PROVIDER_ID, userProviderRef.getId());
assertTrue(userProviderRef instanceof LanguageSettingsGenericProvider);
// add sample entries
- ArrayList<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ ArrayList<ICLanguageSettingEntry> entries = new ArrayList<>();
entries.add(entryExportedB);
entries.add(entryNotExportedB);
((LanguageSettingsGenericProvider) userProviderRef).setSettingEntries(null, null, null, entries);
diff --git a/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/language/settings/providers/LanguageSettingsScannerInfoProviderTests.java b/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/language/settings/providers/LanguageSettingsScannerInfoProviderTests.java
index 3c6ac45f6d..a33b3fbb76 100644
--- a/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/language/settings/providers/LanguageSettingsScannerInfoProviderTests.java
+++ b/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/language/settings/providers/LanguageSettingsScannerInfoProviderTests.java
@@ -255,7 +255,7 @@ public class LanguageSettingsScannerInfoProviderTests extends BaseTestCase {
CIncludeFileEntry includeFileEntry = new CIncludeFileEntry(includeFile, 0);
CMacroFileEntry macroFileEntry = new CMacroFileEntry(macroFile, 0);
- List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entries = new ArrayList<>();
entries.add(includePathEntry);
entries.add(includeLocalPathEntry);
entries.add(macroEntry);
@@ -264,7 +264,7 @@ public class LanguageSettingsScannerInfoProviderTests extends BaseTestCase {
// add provider to the configuration
ILanguageSettingsProvider provider = new MockProvider(PROVIDER_ID, PROVIDER_NAME, entries);
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ List<ILanguageSettingsProvider> providers = new ArrayList<>();
providers.add(provider);
((ILanguageSettingsProvidersKeeper) cfgDescription).setLanguageSettingProviders(providers);
@@ -320,7 +320,7 @@ public class LanguageSettingsScannerInfoProviderTests extends BaseTestCase {
CIncludePathEntry includeLocalPathEntry2 = new CIncludePathEntry(incFolder2, ICSettingEntry.LOCAL); // #include "..."
CIncludePathEntry includePathEntry2 = new CIncludePathEntry(incFolder2, 0);
- List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entries = new ArrayList<>();
entries.add(includePathEntry);
entries.add(includeLocalPathEntry);
// reverse order for incPath2
@@ -329,7 +329,7 @@ public class LanguageSettingsScannerInfoProviderTests extends BaseTestCase {
// add provider to the configuration
ILanguageSettingsProvider provider = new MockProvider(PROVIDER_ID, PROVIDER_NAME, entries);
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ List<ILanguageSettingsProvider> providers = new ArrayList<>();
providers.add(provider);
((ILanguageSettingsProvidersKeeper) cfgDescription).setLanguageSettingProviders(providers);
@@ -371,12 +371,12 @@ public class LanguageSettingsScannerInfoProviderTests extends BaseTestCase {
IFolder frameworkFolder = ResourceHelper.createFolder(project, "Fmwk");
CIncludePathEntry frameworkPathEntry = new CIncludePathEntry(frameworkFolder, ICSettingEntry.FRAMEWORKS_MAC);
- List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entries = new ArrayList<>();
entries.add(frameworkPathEntry);
// add provider to the configuration
ILanguageSettingsProvider provider = new MockProvider(PROVIDER_ID, PROVIDER_NAME, entries);
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ List<ILanguageSettingsProvider> providers = new ArrayList<>();
providers.add(provider);
((ILanguageSettingsProvidersKeeper) cfgDescription).setLanguageSettingProviders(providers);
@@ -418,7 +418,7 @@ public class LanguageSettingsScannerInfoProviderTests extends BaseTestCase {
CIncludePathEntry includePathEntry2 = new CIncludePathEntry(incFolder, 0);
CIncludePathEntry includeLocalPathEntry2 = new CIncludePathEntry(incFolder, ICSettingEntry.LOCAL); // #include "..."
- List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entries = new ArrayList<>();
entries.add(includePathEntry);
entries.add(includeLocalPathEntry);
entries.add(includePathEntry2);
@@ -426,7 +426,7 @@ public class LanguageSettingsScannerInfoProviderTests extends BaseTestCase {
// add provider to the configuration
ILanguageSettingsProvider provider = new MockProvider(PROVIDER_ID, PROVIDER_NAME, entries);
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ List<ILanguageSettingsProvider> providers = new ArrayList<>();
providers.add(provider);
((ILanguageSettingsProvidersKeeper) cfgDescription).setLanguageSettingProviders(providers);
@@ -488,7 +488,7 @@ public class LanguageSettingsScannerInfoProviderTests extends BaseTestCase {
ICSettingEntry.VALUE_WORKSPACE_PATH);
CIncludePathEntry incFilesystemEntry = new CIncludePathEntry(incFilesystem, 0);
- List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entries = new ArrayList<>();
entries.add(incWorkspaceEntry_1);
entries.add(incWorkspaceEntry_2);
entries.add(incWorkspaceEntry_3);
@@ -497,7 +497,7 @@ public class LanguageSettingsScannerInfoProviderTests extends BaseTestCase {
// add provider to the configuration
ILanguageSettingsProvider provider = new MockProvider(PROVIDER_ID, PROVIDER_NAME, entries);
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ List<ILanguageSettingsProvider> providers = new ArrayList<>();
providers.add(provider);
((ILanguageSettingsProvidersKeeper) cfgDescription).setLanguageSettingProviders(providers);
@@ -546,12 +546,12 @@ public class LanguageSettingsScannerInfoProviderTests extends BaseTestCase {
// no-drive-letter folder defined by absolute path on the filesystem
IPath incFilesystem = ResourceHelper.createWorkspaceFolder("includeFilesystem").setDevice(null);
CIncludePathEntry incFilesystemEntry = new CIncludePathEntry(incFilesystem, 0);
- List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entries = new ArrayList<>();
entries.add(incFilesystemEntry);
// add provider to the configuration
ILanguageSettingsProvider provider = new MockProvider(PROVIDER_ID, PROVIDER_NAME, entries);
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ List<ILanguageSettingsProvider> providers = new ArrayList<>();
providers.add(provider);
((ILanguageSettingsProvidersKeeper) cfgDescription).setLanguageSettingProviders(providers);
@@ -601,14 +601,14 @@ public class LanguageSettingsScannerInfoProviderTests extends BaseTestCase {
CIncludePathEntry incProjNameEntry = new CIncludePathEntry(new Path("${ProjName}"), 0);
CIncludePathEntry incProjNameMarkedResolvedEntry = new CIncludePathEntry(
new Path("${ProjName}" + markedResolved), ICSettingEntry.RESOLVED);
- List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entries = new ArrayList<>();
entries.add(incRelativeEntry);
entries.add(incProjNameEntry);
entries.add(incProjNameMarkedResolvedEntry);
// add provider to the configuration
ILanguageSettingsProvider provider = new MockProvider(PROVIDER_ID, PROVIDER_NAME, entries);
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ List<ILanguageSettingsProvider> providers = new ArrayList<>();
providers.add(provider);
((ILanguageSettingsProvidersKeeper) cfgDescription).setLanguageSettingProviders(providers);
@@ -682,7 +682,7 @@ public class LanguageSettingsScannerInfoProviderTests extends BaseTestCase {
CIncludePathEntry incRelativeEntry_dot_slash = new CIncludePathEntry(new Path(relativePath_dot_slash),
ICSettingEntry.LOCAL);
- List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entries = new ArrayList<>();
entries.add(incRelativeEntry_dot);
entries.add(incRelativeEntry_dot_slash);
entries.add(incRelativeEntry_dot_slash_path);
@@ -693,7 +693,7 @@ public class LanguageSettingsScannerInfoProviderTests extends BaseTestCase {
// add provider to the configuration
ILanguageSettingsProvider provider = new MockProvider(PROVIDER_ID, PROVIDER_NAME, entries);
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ List<ILanguageSettingsProvider> providers = new ArrayList<>();
providers.add(provider);
((ILanguageSettingsProvidersKeeper) cfgDescription).setLanguageSettingProviders(providers);
@@ -758,12 +758,12 @@ public class LanguageSettingsScannerInfoProviderTests extends BaseTestCase {
// contribute the entries
CIncludePathEntry incRelativeEntry = new CIncludePathEntry(envPathStr, 0);
- List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entries = new ArrayList<>();
entries.add(incRelativeEntry);
// add provider to the configuration
ILanguageSettingsProvider provider = new MockProvider(PROVIDER_ID, PROVIDER_NAME, entries);
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ List<ILanguageSettingsProvider> providers = new ArrayList<>();
providers.add(provider);
((ILanguageSettingsProvidersKeeper) cfgDescription).setLanguageSettingProviders(providers);
@@ -819,7 +819,7 @@ public class LanguageSettingsScannerInfoProviderTests extends BaseTestCase {
IFolder incFolder = ResourceHelper.createFolder(project, "include");
CIncludePathEntry includePathEntry = new CIncludePathEntry(incFolder, 0);
- List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entries = new ArrayList<>();
entries.add(includePathEntry);
// add provider for parent folder
@@ -827,7 +827,7 @@ public class LanguageSettingsScannerInfoProviderTests extends BaseTestCase {
assertNull(provider.getSettingEntries(cfgDescription, file, null));
assertEquals(includePathEntry, provider.getSettingEntries(cfgDescription, parentFolder, null).get(0));
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ List<ILanguageSettingsProvider> providers = new ArrayList<>();
providers.add(provider);
((ILanguageSettingsProvidersKeeper) cfgDescription).setLanguageSettingProviders(providers);
@@ -865,12 +865,12 @@ public class LanguageSettingsScannerInfoProviderTests extends BaseTestCase {
// contribute the entries
CIncludePathEntry incRelativeEntry = new CIncludePathEntry(envPathStr, ICSettingEntry.RESOLVED);
- List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entries = new ArrayList<>();
entries.add(incRelativeEntry);
// add provider to the configuration
ILanguageSettingsProvider provider = new MockProvider(PROVIDER_ID, PROVIDER_NAME, entries);
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ List<ILanguageSettingsProvider> providers = new ArrayList<>();
providers.add(provider);
((ILanguageSettingsProvidersKeeper) cfgDescription).setLanguageSettingProviders(providers);
@@ -897,7 +897,7 @@ public class LanguageSettingsScannerInfoProviderTests extends BaseTestCase {
ICLanguageSetting[] langSettings = rcDes.getLanguageSettings();
assertNotNull(langSettings);
- List<String> languageIds = new ArrayList<String>();
+ List<String> languageIds = new ArrayList<>();
for (ICLanguageSetting ls : langSettings) {
String langId = ls.getLanguageId();
if (langId != null && !languageIds.contains(langId)) {
@@ -926,7 +926,7 @@ public class LanguageSettingsScannerInfoProviderTests extends BaseTestCase {
IResource rc, String languageId) {
if (langId == null || langId.equals(languageId))
return entries;
- return new ArrayList<ICLanguageSettingEntry>();
+ return new ArrayList<>();
}
}
@@ -956,17 +956,17 @@ public class LanguageSettingsScannerInfoProviderTests extends BaseTestCase {
CIncludePathEntry incEntryA = new CIncludePathEntry(incFolderA, 0);
CIncludePathEntry incEntryB = new CIncludePathEntry(incFolderB, 0);
CIncludePathEntry incEntryC = new CIncludePathEntry(incFolderC, 0);
- List<ICLanguageSettingEntry> entries1 = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entries1 = new ArrayList<>();
entries1.add(incEntryA);
entries1.add(incEntryB);
- List<ICLanguageSettingEntry> entries2 = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entries2 = new ArrayList<>();
entries2.add(incEntryC);
entries2.add(incEntryB);
// add providers to the configuration
ILanguageSettingsProvider provider1 = new MockProviderLang(PROVIDER_ID, PROVIDER_NAME, langId1, entries1);
ILanguageSettingsProvider provider2 = new MockProviderLang(PROVIDER_ID_2, PROVIDER_NAME, langId2, entries2);
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ List<ILanguageSettingsProvider> providers = new ArrayList<>();
providers.add(provider1);
providers.add(provider2);
((ILanguageSettingsProvidersKeeper) cfgDescription).setLanguageSettingProviders(providers);
diff --git a/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/language/settings/providers/LanguageSettingsSerializableProviderTests.java b/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/language/settings/providers/LanguageSettingsSerializableProviderTests.java
index 115cbd80d0..0eba63f364 100644
--- a/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/language/settings/providers/LanguageSettingsSerializableProviderTests.java
+++ b/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/language/settings/providers/LanguageSettingsSerializableProviderTests.java
@@ -108,9 +108,9 @@ public class LanguageSettingsSerializableProviderTests extends BaseTestCase {
*/
public void testProvider_SettersGetters() throws Exception {
// benchmark data
- List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entries = new ArrayList<>();
entries.add(new CIncludePathEntry("path0", 0));
- List<String> languages = new ArrayList<String>();
+ List<String> languages = new ArrayList<>();
languages.add(LANG_ID);
// create a provider
@@ -170,11 +170,11 @@ public class LanguageSettingsSerializableProviderTests extends BaseTestCase {
LanguageSettingsManager.setStoringEntriesInProjectArea(provider, true);
provider.setProperty(ATTR_PARAMETER, VALUE_PARAMETER);
- List<String> languageScope = new ArrayList<String>();
+ List<String> languageScope = new ArrayList<>();
languageScope.add(LANG_ID);
provider.setLanguageScope(languageScope);
- List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entries = new ArrayList<>();
entries.add(new CIncludePathEntry("path0", 1));
provider.setSettingEntries(null, null, null, entries);
@@ -219,11 +219,11 @@ public class LanguageSettingsSerializableProviderTests extends BaseTestCase {
LanguageSettingsManager.setStoringEntriesInProjectArea(provider, true);
provider.setProperty(ATTR_PARAMETER, VALUE_PARAMETER);
- List<String> languageScope = new ArrayList<String>();
+ List<String> languageScope = new ArrayList<>();
languageScope.add(LANG_ID);
provider.setLanguageScope(languageScope);
- List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entries = new ArrayList<>();
entries.add(new CIncludePathEntry("path0", 1));
provider.setSettingEntries(null, null, null, entries);
@@ -268,11 +268,11 @@ public class LanguageSettingsSerializableProviderTests extends BaseTestCase {
LanguageSettingsManager.setStoringEntriesInProjectArea(provider, true);
provider.setProperty(ATTR_PARAMETER, VALUE_PARAMETER);
- List<String> languageScope = new ArrayList<String>();
+ List<String> languageScope = new ArrayList<>();
languageScope.add(LANG_ID);
provider.setLanguageScope(languageScope);
- List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entries = new ArrayList<>();
entries.add(new CIncludePathEntry("path0", 1));
provider.setSettingEntries(null, null, null, entries);
@@ -396,7 +396,7 @@ public class LanguageSettingsSerializableProviderTests extends BaseTestCase {
* Test serialization of language scope.
*/
public void testLanguagesDOM() throws Exception {
- List<String> expectedLanguageIds = new ArrayList<String>();
+ List<String> expectedLanguageIds = new ArrayList<>();
expectedLanguageIds.add(LANG_ID);
expectedLanguageIds.add(LANG_ID_1);
@@ -433,11 +433,11 @@ public class LanguageSettingsSerializableProviderTests extends BaseTestCase {
*/
public void testLanguageScopeDOM() throws Exception {
// benchmark entries
- List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entries = new ArrayList<>();
entries.add(new CIncludePathEntry("path0", 0));
// define the scope
- List<String> expectedLanguageIds = new ArrayList<String>();
+ List<String> expectedLanguageIds = new ArrayList<>();
expectedLanguageIds.add(LANG_ID);
expectedLanguageIds.add(LANG_ID_1);
@@ -521,7 +521,7 @@ public class LanguageSettingsSerializableProviderTests extends BaseTestCase {
public void testNullConfigurationDOM() throws Exception {
// provider/configuration/language/resource/settingEntry
Element elementProvider;
- List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entries = new ArrayList<>();
entries.add(new CIncludePathEntry("path0", 0));
{
// create a provider and serialize its settings
@@ -552,7 +552,7 @@ public class LanguageSettingsSerializableProviderTests extends BaseTestCase {
public void testNullLanguageDOM() throws Exception {
// provider/configuration/language/resource/settingEntry
Element elementProvider;
- List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entries = new ArrayList<>();
entries.add(new CIncludePathEntry("path0", 0));
{
// create a provider and serialize its settings
@@ -582,9 +582,9 @@ public class LanguageSettingsSerializableProviderTests extends BaseTestCase {
*/
public void testNullLanguageScopeDOM() throws Exception {
// define benchmark entries
- List<ICLanguageSettingEntry> entriesNullLanguage = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entriesNullLanguage = new ArrayList<>();
entriesNullLanguage.add(new CIncludePathEntry("path_null", 0));
- List<ICLanguageSettingEntry> entriesLanguage = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entriesLanguage = new ArrayList<>();
entriesLanguage.add(new CIncludePathEntry("path", 0));
Element elementProvider;
@@ -660,7 +660,7 @@ public class LanguageSettingsSerializableProviderTests extends BaseTestCase {
public void testNullResourceDOM() throws Exception {
// provider/configuration/language/resource/settingEntry
Element elementProvider;
- List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entries = new ArrayList<>();
entries.add(new CIncludePathEntry("path0", 0));
{
// create a provider and serialize its settings
@@ -691,7 +691,7 @@ public class LanguageSettingsSerializableProviderTests extends BaseTestCase {
public void testNullConfigurationLanguageDOM() throws Exception {
// provider/configuration/language/resource/settingEntry
Element elementProvider;
- List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entries = new ArrayList<>();
entries.add(new CIncludePathEntry("path0", 0));
{
// create a provider and serialize its settings
@@ -723,7 +723,7 @@ public class LanguageSettingsSerializableProviderTests extends BaseTestCase {
public void testNullConfigurationResourceDOM() throws Exception {
// provider/configuration/language/resource/settingEntry
Element elementProvider;
- List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entries = new ArrayList<>();
entries.add(new CIncludePathEntry("path0", 0));
{
// create a provider and serialize its settings
@@ -755,7 +755,7 @@ public class LanguageSettingsSerializableProviderTests extends BaseTestCase {
public void testNullLanguageResourceDOM() throws Exception {
// provider/configuration/language/resource/settingEntry
Element elementProvider;
- List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entries = new ArrayList<>();
entries.add(new CIncludePathEntry("path0", 0));
{
// create a provider and serialize its settings
@@ -787,7 +787,7 @@ public class LanguageSettingsSerializableProviderTests extends BaseTestCase {
public void testNullConfigurationLanguageResourceFlagDOM() throws Exception {
// provider/configuration/language/resource/settingEntry
Element elementProvider;
- List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entries = new ArrayList<>();
int flag = 0;
entries.add(new CIncludePathEntry("path0", flag));
{
@@ -821,7 +821,7 @@ public class LanguageSettingsSerializableProviderTests extends BaseTestCase {
*/
public void testCIncludePathEntryDOM() throws Exception {
Element elementProvider;
- List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entries = new ArrayList<>();
entries.add(new CIncludePathEntry("path0", 1));
{
// create a provider and serialize its settings
@@ -856,7 +856,7 @@ public class LanguageSettingsSerializableProviderTests extends BaseTestCase {
*/
public void testCIncludeFileEntryDOM() throws Exception {
Element elementProvider;
- List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entries = new ArrayList<>();
entries.add(new CIncludeFileEntry("a-path", 1));
{
// create a provider and serialize its settings
@@ -890,7 +890,7 @@ public class LanguageSettingsSerializableProviderTests extends BaseTestCase {
*/
public void testCMacroEntryDOM() throws Exception {
Element elementProvider;
- List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entries = new ArrayList<>();
entries.add(new CMacroEntry("MACRO0", "value0", 1));
{
// create a provider and serialize its settings
@@ -924,7 +924,7 @@ public class LanguageSettingsSerializableProviderTests extends BaseTestCase {
*/
public void testCMacroFileEntryDOM() throws Exception {
Element elementProvider;
- List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entries = new ArrayList<>();
entries.add(new CMacroFileEntry("a-path", 1));
{
// create a provider and serialize its settings
@@ -958,7 +958,7 @@ public class LanguageSettingsSerializableProviderTests extends BaseTestCase {
*/
public void testCLibraryPathEntryDOM() throws Exception {
Element elementProvider;
- List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entries = new ArrayList<>();
entries.add(new CLibraryPathEntry("a-path", 1));
{
// create a provider and serialize its settings
@@ -992,7 +992,7 @@ public class LanguageSettingsSerializableProviderTests extends BaseTestCase {
*/
public void testCLibraryFileEntryDOM() throws Exception {
Element elementProvider;
- List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entries = new ArrayList<>();
entries.add(new CLibraryFileEntry("a-path", 1));
{
// create a provider and serialize its settings
@@ -1026,7 +1026,7 @@ public class LanguageSettingsSerializableProviderTests extends BaseTestCase {
*/
public void testMixedSettingEntriesDOM() throws Exception {
Element elementProvider;
- List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entries = new ArrayList<>();
entries.add(new CIncludePathEntry("path0", 1));
entries.add(new CIncludePathEntry("path1", 1));
entries.add(new CMacroEntry("MACRO0", "value0", 1));
@@ -1058,7 +1058,7 @@ public class LanguageSettingsSerializableProviderTests extends BaseTestCase {
*/
public void testEntryFlagsDOM() throws Exception {
Element elementProvider;
- List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entries = new ArrayList<>();
entries.add(new CIncludePathEntry("path0",
ICSettingEntry.BUILTIN | ICSettingEntry.READONLY | ICSettingEntry.LOCAL
| ICSettingEntry.VALUE_WORKSPACE_PATH | ICSettingEntry.RESOLVED | ICSettingEntry.UNDEFINED
@@ -1097,9 +1097,9 @@ public class LanguageSettingsSerializableProviderTests extends BaseTestCase {
public void testLanguageAndNullDOM() throws Exception {
Element elementProvider = null;
- List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entries = new ArrayList<>();
entries.add(new CIncludePathEntry("path0", 0));
- List<ICLanguageSettingEntry> entries2 = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entries2 = new ArrayList<>();
entries2.add(new CIncludePathEntry("path2", 0));
{
@@ -1135,9 +1135,9 @@ public class LanguageSettingsSerializableProviderTests extends BaseTestCase {
public void testTwoLanguagesDOM() throws Exception {
Element elementProvider = null;
- List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entries = new ArrayList<>();
entries.add(new CIncludePathEntry("path0", 0));
- List<ICLanguageSettingEntry> entries2 = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entries2 = new ArrayList<>();
entries2.add(new CIncludePathEntry("path2", 0));
{
@@ -1183,9 +1183,9 @@ public class LanguageSettingsSerializableProviderTests extends BaseTestCase {
Element elementProvider = null;
- List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entries = new ArrayList<>();
entries.add(new CIncludePathEntry("path0", 0));
- List<ICLanguageSettingEntry> entries2 = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entries2 = new ArrayList<>();
entries2.add(new CIncludePathEntry("path2", 0));
{
@@ -1235,7 +1235,7 @@ public class LanguageSettingsSerializableProviderTests extends BaseTestCase {
PROVIDER_NAME_1);
// store the entries in parent folder
- List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entries = new ArrayList<>();
entries.add(new CIncludePathEntry("path0", 0));
provider.setSettingEntries(null, parentFolder, LANG_ID, entries);
provider.setSettingEntries(null, emptySettingsPath, LANG_ID, new ArrayList<ICLanguageSettingEntry>());
@@ -1276,16 +1276,16 @@ public class LanguageSettingsSerializableProviderTests extends BaseTestCase {
*/
public void testEquals() throws Exception {
// create sample entries
- List<ICLanguageSettingEntry> sampleEntries_1 = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> sampleEntries_1 = new ArrayList<>();
sampleEntries_1.add(new CMacroEntry("MACRO0", "value0", 1));
sampleEntries_1.add(new CIncludePathEntry("path0", 1));
sampleEntries_1.add(new CIncludePathEntry("path1", 1));
- List<ICLanguageSettingEntry> sampleEntries_2 = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> sampleEntries_2 = new ArrayList<>();
sampleEntries_2.add(new CIncludePathEntry("path0", 1));
// create sample languages
- List<String> sampleLanguages = new ArrayList<String>();
+ List<String> sampleLanguages = new ArrayList<>();
sampleLanguages.add(LANG_ID);
// create a model provider
@@ -1317,7 +1317,7 @@ public class LanguageSettingsSerializableProviderTests extends BaseTestCase {
assertTrue(provider1.hashCode() == provider2.hashCode());
assertTrue(provider1.equals(provider2));
// replace languages
- List<String> sampleLanguages2 = new ArrayList<String>();
+ List<String> sampleLanguages2 = new ArrayList<>();
sampleLanguages2.add(LANG_ID_1);
provider2.setLanguageScope(sampleLanguages2);
assertFalse(provider1.hashCode() == provider2.hashCode());
@@ -1359,7 +1359,7 @@ public class LanguageSettingsSerializableProviderTests extends BaseTestCase {
assertTrue(provider1.hashCode() == provider2.hashCode());
assertTrue(provider1.equals(provider2));
// replace entries
- List<ICLanguageSettingEntry> changedEntries = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> changedEntries = new ArrayList<>();
changedEntries.add(new CMacroEntry("MACROX", "valueX", 1));
provider2.setSettingEntries(MOCK_CFG, MOCK_RC, LANG_ID, changedEntries);
assertFalse(provider1.hashCode() == provider2.hashCode());
@@ -1374,7 +1374,7 @@ public class LanguageSettingsSerializableProviderTests extends BaseTestCase {
assertTrue(provider1.hashCode() == provider2.hashCode());
assertTrue(provider1.equals(provider2));
// replace default entries
- List<ICLanguageSettingEntry> changedEntries = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> changedEntries = new ArrayList<>();
changedEntries.add(new CIncludePathEntry("pathX", 1));
provider2.setSettingEntries(null, null, LANG_ID, changedEntries);
assertFalse(provider1.hashCode() == provider2.hashCode());
@@ -1450,15 +1450,15 @@ public class LanguageSettingsSerializableProviderTests extends BaseTestCase {
*/
public void testClone() throws Exception {
// define sample data
- List<ICLanguageSettingEntry> sampleEntries_1 = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> sampleEntries_1 = new ArrayList<>();
sampleEntries_1.add(new CIncludePathEntry("path0", 1));
sampleEntries_1.add(new CIncludePathEntry("path1", 1));
sampleEntries_1.add(new CMacroEntry("MACRO0", "value0", 1));
- List<ICLanguageSettingEntry> sampleEntries_2 = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> sampleEntries_2 = new ArrayList<>();
sampleEntries_2.add(new CIncludePathEntry("path0", 1));
- List<String> sampleLanguages = new ArrayList<String>();
+ List<String> sampleLanguages = new ArrayList<>();
sampleLanguages.add(LANG_ID);
// create a model provider
@@ -1520,7 +1520,7 @@ public class LanguageSettingsSerializableProviderTests extends BaseTestCase {
*/
public void testCloneShallow() throws Exception {
// define sample data
- List<String> sampleLanguages = new ArrayList<String>();
+ List<String> sampleLanguages = new ArrayList<>();
sampleLanguages.add(LANG_ID);
// create a model provider
@@ -1541,7 +1541,7 @@ public class LanguageSettingsSerializableProviderTests extends BaseTestCase {
assertEquals(false, LanguageSettingsManager.isStoringEntriesInProjectArea(provider1));
LanguageSettingsManager.setStoringEntriesInProjectArea(provider1, true);
- List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entries = new ArrayList<>();
entries.add(new CIncludePathEntry("path", 1));
provider1.setSettingEntries(null, null, null, entries);
@@ -1578,7 +1578,7 @@ public class LanguageSettingsSerializableProviderTests extends BaseTestCase {
CLibraryFileEntry libraryFileEntry2 = new CLibraryFileEntry("file2", 0);
// place entries in unsorted list
- List<ICLanguageSettingEntry> unsortedEntries = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> unsortedEntries = new ArrayList<>();
unsortedEntries.add(macroEntry1);
unsortedEntries.add(macroFileEntry1);
unsortedEntries.add(macroEntry2);
@@ -1635,7 +1635,7 @@ public class LanguageSettingsSerializableProviderTests extends BaseTestCase {
CLibraryFileEntry libraryFileEntry2 = new CLibraryFileEntry("file_A", 0);
// place entries in unsorted list
- List<ICLanguageSettingEntry> unsortedEntries = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> unsortedEntries = new ArrayList<>();
// macros will be sorted by name
unsortedEntries.add(macroEntry2);
unsortedEntries.add(macroEntry1);
@@ -1687,7 +1687,7 @@ public class LanguageSettingsSerializableProviderTests extends BaseTestCase {
CMacroEntry macroEntry3 = new CMacroEntry("MACRO_3", null, 0);
// place entries in unsorted list
- List<ICLanguageSettingEntry> unsortedEntries = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> unsortedEntries = new ArrayList<>();
// macros will be sorted by name and keep order for the same name
unsortedEntries.add(macroEntry2A);
unsortedEntries.add(macroEntry3);
diff --git a/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/language/settings/providers/MockListenerRegisterer.java b/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/language/settings/providers/MockListenerRegisterer.java
index e2111b0597..f3edf1fb73 100644
--- a/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/language/settings/providers/MockListenerRegisterer.java
+++ b/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/language/settings/providers/MockListenerRegisterer.java
@@ -38,7 +38,7 @@ public class MockListenerRegisterer extends LanguageSettingsSerializableProvider
}
}
- private List<ListenerCount> register = new ArrayList<ListenerCount>();
+ private List<ListenerCount> register = new ArrayList<>();
public void registerListener(MockListenerRegisterer listener) {
for (ListenerCount lc : register) {
diff --git a/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/TranslationUnitTests.java b/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/TranslationUnitTests.java
index 955989c44f..c7778bdbe2 100644
--- a/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/TranslationUnitTests.java
+++ b/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/TranslationUnitTests.java
@@ -78,7 +78,7 @@ public class TranslationUnitTests extends TranslationUnitBaseTest {
* Simple sanity tests for the getElement() call
*/
public void testGetElement() throws Exception {
- Deque<String> missing = new ArrayDeque<String>();
+ Deque<String> missing = new ArrayDeque<>();
ITranslationUnit tu = CProjectHelper.findTranslationUnit(testProject, "exetest.c");
for (int x = 0; x < expectedStringList.length; x++) {
diff --git a/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/settings/model/CConfigurationDescriptionExportSettings.java b/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/settings/model/CConfigurationDescriptionExportSettings.java
index 09416a40c6..a5a3751e86 100644
--- a/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/settings/model/CConfigurationDescriptionExportSettings.java
+++ b/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/settings/model/CConfigurationDescriptionExportSettings.java
@@ -79,11 +79,11 @@ public class CConfigurationDescriptionExportSettings extends BaseTestCase {
assertEquals(extSettings.length, 1);
checkEquivContents(extSettings[0].getEntries(), entries);
- List<ICLanguageSettingEntry> list = new ArrayList<ICLanguageSettingEntry>(Arrays.asList(entries));
+ List<ICLanguageSettingEntry> list = new ArrayList<>(Arrays.asList(entries));
list.remove(3);
list.remove(2);
checkEquivContents(extSettings[0].getEntries(ICSettingEntry.MACRO), list.toArray());
- list = new ArrayList<ICLanguageSettingEntry>(Arrays.asList(entries));
+ list = new ArrayList<>(Arrays.asList(entries));
list.remove(0);
list.remove(0);
checkEquivContents(extSettings[0].getEntries(ICSettingEntry.INCLUDE_PATH), list.toArray());
@@ -93,11 +93,11 @@ public class CConfigurationDescriptionExportSettings extends BaseTestCase {
assertEquals(extSettings.length, 1);
checkEquivContents(extSettings[0].getEntries(), entries);
- list = new ArrayList<ICLanguageSettingEntry>(Arrays.asList(entries));
+ list = new ArrayList<>(Arrays.asList(entries));
list.remove(3);
list.remove(2);
checkEquivContents(extSettings[0].getEntries(ICSettingEntry.MACRO), list.toArray());
- list = new ArrayList<ICLanguageSettingEntry>(Arrays.asList(entries));
+ list = new ArrayList<>(Arrays.asList(entries));
list.remove(0);
list.remove(0);
checkEquivContents(extSettings[0].getEntries(ICSettingEntry.INCLUDE_PATH), list.toArray());
@@ -110,7 +110,7 @@ public class CConfigurationDescriptionExportSettings extends BaseTestCase {
assertFalse(Arrays.asList(macros).contains(entries[1]));
assertFalse(Arrays.asList(includes).contains(entries[2]));
assertFalse(Arrays.asList(includes).contains(entries[3]));
- Map<String, String> map = new HashMap<String, String>();
+ Map<String, String> map = new HashMap<>();
map.put(projectName5, "");
dess[0].setReferenceInfo(map);
ICLanguageSettingEntry updatedMacros[] = ls.getSettingEntries(ICSettingEntry.MACRO);
diff --git a/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/settings/model/CProjectDescriptionDeltaTests.java b/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/settings/model/CProjectDescriptionDeltaTests.java
index fec70dc650..9e55ac3dca 100644
--- a/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/settings/model/CProjectDescriptionDeltaTests.java
+++ b/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/settings/model/CProjectDescriptionDeltaTests.java
@@ -94,7 +94,7 @@ public class CProjectDescriptionDeltaTests extends BaseTestCase {
}
private static List<ICDescriptionDelta> findDeltas(ICDescriptionDelta delta, int type) {
- List<ICDescriptionDelta> list = new ArrayList<ICDescriptionDelta>();
+ List<ICDescriptionDelta> list = new ArrayList<>();
if ((delta.getChangeFlags() & type) != 0) {
list.add(delta);
}
@@ -598,7 +598,7 @@ public class CProjectDescriptionDeltaTests extends BaseTestCase {
assertNotNull(cfgDescription);
// Modification SOURCE_ADDED
- List<ICSourceEntry> sourceEntries = new ArrayList<ICSourceEntry>(
+ List<ICSourceEntry> sourceEntries = new ArrayList<>(
Arrays.asList(cfgDescription.getSourceEntries()));
ICSourceEntry testSourceEntry = new CSourceEntry(project.getFullPath().append("test_src"), null,
ICSettingEntry.RESOLVED);
@@ -648,7 +648,7 @@ public class CProjectDescriptionDeltaTests extends BaseTestCase {
ICConfigurationDescription cfgDescription = prjDescription.getConfigurations()[0];
assertNotNull(cfgDescription);
- List<ICSourceEntry> sourceEntries = new ArrayList<ICSourceEntry>(
+ List<ICSourceEntry> sourceEntries = new ArrayList<>(
Arrays.asList(cfgDescription.getSourceEntries()));
sourceEntries.add(testSourceEntry);
cfgDescription.setSourceEntries(sourceEntries.toArray(new ICSourceEntry[0]));
@@ -819,7 +819,7 @@ public class CProjectDescriptionDeltaTests extends BaseTestCase {
// Modification CFG_REF_ADDED
String testKey = "key";
String testValue = "value";
- Map<String, String> refs = new HashMap<String, String>();
+ Map<String, String> refs = new HashMap<>();
refs.put(testKey, testValue);
cfgDescription.setReferenceInfo(refs);
@@ -867,7 +867,7 @@ public class CProjectDescriptionDeltaTests extends BaseTestCase {
ICConfigurationDescription cfgDescription = prjDescription.getConfigurations()[0];
assertNotNull(cfgDescription);
- Map<String, String> refs = new HashMap<String, String>();
+ Map<String, String> refs = new HashMap<>();
refs.put(testKey, testValue);
cfgDescription.setReferenceInfo(refs);
mngr.setProjectDescription(project, prjDescription);
@@ -1027,7 +1027,7 @@ public class CProjectDescriptionDeltaTests extends BaseTestCase {
// Modification LANGUAGE_SETTINGS_PROVIDERS
ILanguageSettingsProvider provider = new LanguageSettingsSerializableProvider("test.id", "test.name");
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ List<ILanguageSettingsProvider> providers = new ArrayList<>();
providers.add(provider);
((ILanguageSettingsProvidersKeeper) cfgDescription).setLanguageSettingProviders(providers);
diff --git a/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/settings/model/CProjectDescriptionStorageTests.java b/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/settings/model/CProjectDescriptionStorageTests.java
index 07dfa8fc3a..2f895030f4 100644
--- a/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/settings/model/CProjectDescriptionStorageTests.java
+++ b/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/settings/model/CProjectDescriptionStorageTests.java
@@ -465,7 +465,7 @@ public class CProjectDescriptionStorageTests extends BaseTestCase {
*/
private static class OurResourceChangeListener implements IResourceChangeListener {
boolean changeDetected;
- private Set<IPath> filesToWatch = new HashSet<IPath>();
+ private Set<IPath> filesToWatch = new HashSet<>();
@Override
public synchronized void resourceChanged(IResourceChangeEvent event) {
diff --git a/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/settings/model/ExternalSettingsProviderTests.java b/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/settings/model/ExternalSettingsProviderTests.java
index b32f161bae..2a352d6987 100644
--- a/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/settings/model/ExternalSettingsProviderTests.java
+++ b/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/settings/model/ExternalSettingsProviderTests.java
@@ -356,7 +356,7 @@ public class ExternalSettingsProviderTests extends BaseTestCase {
des = model.getProjectDescription(project, false);
cfgDes = des.getConfigurations()[0];
ICFolderDescription root = cfgDes.getRootFolderDescription();
- HashMap<String, ICLanguageSetting> languageSettingsById = new HashMap<String, ICLanguageSetting>();
+ HashMap<String, ICLanguageSetting> languageSettingsById = new HashMap<>();
for (ICLanguageSetting s : root.getLanguageSettings()) {
languageSettingsById.put(s.getLanguageId(), s);
}
@@ -388,7 +388,7 @@ public class ExternalSettingsProviderTests extends BaseTestCase {
des = model.getProjectDescription(project, false);
cfgDes = des.getConfigurations()[0];
root = cfgDes.getRootFolderDescription();
- languageSettingsById = new HashMap<String, ICLanguageSetting>();
+ languageSettingsById = new HashMap<>();
for (ICLanguageSetting s : root.getLanguageSettings()) {
languageSettingsById.put(s.getLanguageId(), s);
}
diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2CPPAttributeTests.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2CPPAttributeTests.java
index 48be53ec17..4ac1c542fc 100644
--- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2CPPAttributeTests.java
+++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2CPPAttributeTests.java
@@ -113,7 +113,7 @@ public class AST2CPPAttributeTests extends AST2TestBase {
shouldVisitAttributes = true;
}
- private List<IASTAttributeSpecifier> specifiers = new ArrayList<IASTAttributeSpecifier>();
+ private List<IASTAttributeSpecifier> specifiers = new ArrayList<>();
public List<IASTAttributeSpecifier> getAttributes() {
return specifiers;
diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2SpecTestBase.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2SpecTestBase.java
index cd08241332..bf22f18a41 100644
--- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2SpecTestBase.java
+++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2SpecTestBase.java
@@ -175,8 +175,8 @@ public class AST2SpecTestBase extends AST2TestBase {
shouldVisitNames = true;
}
- public List<IASTName> nameList = new ArrayList<IASTName>();
- public List<String> problemBindings = new ArrayList<String>();
+ public List<IASTName> nameList = new ArrayList<>();
+ public List<String> problemBindings = new ArrayList<>();
public int numNullBindings = 0;
@Override
diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/CharArrayMapTest.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/CharArrayMapTest.java
index f3412ab002..a996799ed4 100644
--- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/CharArrayMapTest.java
+++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/CharArrayMapTest.java
@@ -68,7 +68,7 @@ public class CharArrayMapTest extends TestCase {
private static long timeMap(char[][] keys) {
long start = System.currentTimeMillis();
- CharArrayMap<Integer> map = new CharArrayMap<Integer>(keys.length);
+ CharArrayMap<Integer> map = new CharArrayMap<>(keys.length);
for (int i = 0; i < keys.length; i++) {
map.put(keys[i], i);
}
@@ -98,7 +98,7 @@ public class CharArrayMapTest extends TestCase {
char[] key3 = "third key".toCharArray();
char[] key4 = "forth key".toCharArray();
- CharArrayMap<Integer> map = new CharArrayMap<Integer>();
+ CharArrayMap<Integer> map = new CharArrayMap<>();
assertTrue(map.isEmpty());
assertEquals(0, map.size());
@@ -125,7 +125,7 @@ public class CharArrayMapTest extends TestCase {
assertTrue(map.containsValue(3));
assertTrue(map.containsValue(4));
- Set<Integer> values = new HashSet<Integer>();
+ Set<Integer> values = new HashSet<>();
values.add(1);
values.add(2);
values.add(3);
@@ -178,7 +178,7 @@ public class CharArrayMapTest extends TestCase {
"metallica".toCharArray(), "in flames".toCharArray(), "lamb of god".toCharArray(),
"carcass".toCharArray() };
- CharArrayMap<Integer> map = new CharArrayMap<Integer>();
+ CharArrayMap<Integer> map = new CharArrayMap<>();
assertTrue(map.isEmpty());
assertEquals(0, map.size());
@@ -200,7 +200,7 @@ public class CharArrayMapTest extends TestCase {
assertTrue(map.containsValue(i));
}
- Set<Integer> values = new HashSet<Integer>();
+ Set<Integer> values = new HashSet<>();
for (int i = 0; i < keys.length; i++) {
values.add(i);
}
@@ -267,7 +267,7 @@ public class CharArrayMapTest extends TestCase {
public void testProperFail() {
char[] hello = "hello".toCharArray();
- CharArrayMap<Integer> map = new CharArrayMap<Integer>();
+ CharArrayMap<Integer> map = new CharArrayMap<>();
Integer value = 9;
try {
diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/prefix/CompletionTestBase.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/prefix/CompletionTestBase.java
index 3ecb8f8d81..9bd10dbe9d 100644
--- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/prefix/CompletionTestBase.java
+++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/prefix/CompletionTestBase.java
@@ -140,7 +140,7 @@ public class CompletionTestBase extends BaseTestCase {
}
protected List<IBinding> proposeBindings(IASTCompletionNode completionNode, boolean isPrefix) {
- List<IBinding> proposals = new ArrayList<IBinding>();
+ List<IBinding> proposals = new ArrayList<>();
boolean handleMacros = false;
IASTName[] names = completionNode.getNames();
diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/RewriteTester.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/RewriteTester.java
index d3ac75ce15..1d4bbdeaba 100644
--- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/RewriteTester.java
+++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/RewriteTester.java
@@ -64,10 +64,10 @@ public class RewriteTester extends TestSuite {
private static ArrayList<RewriteBaseTest> createTests(BufferedReader inputReader) throws Exception {
String line;
- List<TestSourceFile> files = new ArrayList<TestSourceFile>();
+ List<TestSourceFile> files = new ArrayList<>();
TestSourceFile actFile = null;
MatcherState matcherState = MatcherState.skip;
- ArrayList<RewriteBaseTest> testCases = new ArrayList<RewriteBaseTest>();
+ ArrayList<RewriteBaseTest> testCases = new ArrayList<>();
String testName = null;
String className = null;
boolean bevorFirstTest = true;
@@ -77,7 +77,7 @@ public class RewriteTester extends TestSuite {
if (!bevorFirstTest) {
RewriteBaseTest test = createTestClass(className, testName, files);
testCases.add(test);
- files = new ArrayList<TestSourceFile>();
+ files = new ArrayList<>();
className = null;
testName = null;
}
diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/astwriter/SourceRewriteTester.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/astwriter/SourceRewriteTester.java
index e537e6c0ef..384f4f0add 100644
--- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/astwriter/SourceRewriteTester.java
+++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/astwriter/SourceRewriteTester.java
@@ -91,7 +91,7 @@ public class SourceRewriteTester extends TestSuite {
private static ArrayList<RewriteBaseTest> createTests(BufferedReader inputReader) throws Exception {
ASTWriterTestSourceFile file = null;
MatcherState matcherState = MatcherState.skip;
- ArrayList<RewriteBaseTest> testCases = new ArrayList<RewriteBaseTest>();
+ ArrayList<RewriteBaseTest> testCases = new ArrayList<>();
String line;
while ((line = inputReader.readLine()) != null) {
diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/comenthandler/CommentHandlingTest.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/comenthandler/CommentHandlingTest.java
index 549742c906..68f0ad6571 100644
--- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/comenthandler/CommentHandlingTest.java
+++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/comenthandler/CommentHandlingTest.java
@@ -143,7 +143,7 @@ public class CommentHandlingTest extends RewriteBaseTest {
}
private String getCommentMapResult(Map<IASTNode, List<IASTComment>> map) {
- TreeSet<IASTNode> keyTree = new TreeSet<IASTNode>(new NodeOffsetComparator());
+ TreeSet<IASTNode> keyTree = new TreeSet<>(new NodeOffsetComparator());
keyTree.addAll(map.keySet());
StringBuilder output = new StringBuilder();
for (IASTNode actNode : keyTree) {
diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/scanner/PreprocessorTests.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/scanner/PreprocessorTests.java
index c7cb3b143c..c048701ad1 100644
--- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/scanner/PreprocessorTests.java
+++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/scanner/PreprocessorTests.java
@@ -1283,7 +1283,7 @@ public class PreprocessorTests extends PreprocessorTestsBase {
public void testC99_6_7_5_3_5_Bug104869() throws Exception {
initializeScanner();
// read in expected tokens
- List<IToken> expect = new ArrayList<IToken>();
+ List<IToken> expect = new ArrayList<>();
IToken t = fScanner.nextToken();
while (t.getType() != IToken.tDECR) {
expect.add(t);
diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexBugsTests.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexBugsTests.java
index a4578fdf5e..6389b0884d 100644
--- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexBugsTests.java
+++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexBugsTests.java
@@ -2424,8 +2424,8 @@ public class IndexBugsTests extends BaseTestCase {
}
// Collect files and folders
- final Set<IFile> files = new HashSet<IFile>();
- final Set<IFolder> folders = new HashSet<IFolder>();
+ final Set<IFile> files = new HashSet<>();
+ final Set<IFolder> folders = new HashSet<>();
folders.add(root);
root.accept(new IResourceVisitor() {
@Override
diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexCompositeTests.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexCompositeTests.java
index 0c81275956..f0e678d6ed 100644
--- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexCompositeTests.java
+++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexCompositeTests.java
@@ -83,7 +83,7 @@ public class IndexCompositeTests extends BaseTestCase {
// class B {};
public void testPairDisjointContent() throws Exception {
CharSequence[] contents = getContentsForTest(2);
- List<ICProject> projects = new ArrayList<ICProject>();
+ List<ICProject> projects = new ArrayList<>();
try {
ProjectBuilder pb = new ProjectBuilder("projB_" + getName(), true);
@@ -139,7 +139,7 @@ public class IndexCompositeTests extends BaseTestCase {
// namespace X { class A2 {}; B2 b; C2 c; }
public void testTripleLinear() throws Exception {
CharSequence[] contents = getContentsForTest(3);
- List<ICProject> projects = new ArrayList<ICProject>();
+ List<ICProject> projects = new ArrayList<>();
try {
ProjectBuilder pb = new ProjectBuilder("projC_" + getName(), true);
@@ -255,7 +255,7 @@ public class IndexCompositeTests extends BaseTestCase {
// void foo(C1 c) {}
public void testTripleUpwardV() throws Exception {
CharSequence[] contents = getContentsForTest(3);
- List<ICProject> projects = new ArrayList<ICProject>();
+ List<ICProject> projects = new ArrayList<>();
try {
ProjectBuilder pb = new ProjectBuilder("projB_" + getName(), true);
@@ -353,7 +353,7 @@ public class IndexCompositeTests extends BaseTestCase {
// namespace X { class A2 {}; }
public void testTripleDownwardV() throws Exception {
CharSequence[] contents = getContentsForTest(3);
- List<ICProject> projects = new ArrayList<ICProject>();
+ List<ICProject> projects = new ArrayList<>();
try {
ProjectBuilder pb = new ProjectBuilder("projC_" + getName(), true);
diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexUpdateTests.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexUpdateTests.java
index 6ceee77a9f..188ff78928 100644
--- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexUpdateTests.java
+++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexUpdateTests.java
@@ -1503,7 +1503,7 @@ public class IndexUpdateTests extends IndexTestBase {
//}
public void testDependentProjectGetsUpdated_Bug310837() throws Exception {
CharSequence[] contents = getContentsForTest(2);
- List<ICProject> projects = new ArrayList<ICProject>();
+ List<ICProject> projects = new ArrayList<>();
try {
ProjectBuilder projectABuilder = new ProjectBuilder("projA_" + getName(), true);
diff --git a/core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/FileManager.java b/core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/FileManager.java
index 2eba23a7e0..d61b1e25a7 100644
--- a/core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/FileManager.java
+++ b/core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/FileManager.java
@@ -36,7 +36,7 @@ public class FileManager {
HashSet<IFile> fileHandles;
public FileManager() {
- fileHandles = new HashSet<IFile>();
+ fileHandles = new HashSet<>();
}
public void addFile(IFile file) {
diff --git a/core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/Main.java b/core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/Main.java
index b91171cfd7..c4aa1f9c4f 100644
--- a/core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/Main.java
+++ b/core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/Main.java
@@ -414,7 +414,7 @@ public class Main {
* @exception Exception thrown if a problem occurs during launching
*/
public static void main(String argString) throws Exception {
- List<String> list = new ArrayList<String>(5);
+ List<String> list = new ArrayList<>(5);
for (StringTokenizer tokens = new StringTokenizer(argString, " "); tokens.hasMoreElements();)
list.add((String) tokens.nextElement());
main(list.toArray(new String[list.size()]));
diff --git a/core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/NewMain.java b/core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/NewMain.java
index 18e90e520f..e73344924d 100644
--- a/core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/NewMain.java
+++ b/core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/NewMain.java
@@ -53,7 +53,7 @@ public class NewMain extends Main {
* a scrapbook (i.e., swip-and-doit facility).
*/
public static void main(String argString) throws Exception {
- List<String> list = new ArrayList<String>(5);
+ List<String> list = new ArrayList<>(5);
for (StringTokenizer tokens = new StringTokenizer(argString, " "); tokens.hasMoreElements();)
list.add((String) tokens.nextElement());
main(list.toArray(new String[list.size()]));
diff --git a/core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/ResourceHelper.java b/core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/ResourceHelper.java
index 3d5ca50c19..e665e994f9 100644
--- a/core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/ResourceHelper.java
+++ b/core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/ResourceHelper.java
@@ -72,8 +72,8 @@ public class ResourceHelper {
private final static IProgressMonitor NULL_MONITOR = new NullProgressMonitor();
private static final int MAX_RETRY = 5;
- private final static Set<String> externalFilesCreated = new HashSet<String>();
- private final static Set<IResource> resourcesCreated = new HashSet<IResource>();
+ private final static Set<String> externalFilesCreated = new HashSet<>();
+ private final static Set<IResource> resourcesCreated = new HashSet<>();
/**
* Creates CDT project in a specific path in workspace and opens it.
diff --git a/core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/util/TestSourceReader.java b/core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/util/TestSourceReader.java
index 4111030de0..5fe92d9187 100644
--- a/core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/util/TestSourceReader.java
+++ b/core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/util/TestSourceReader.java
@@ -152,7 +152,7 @@ public class TestSourceReader {
BufferedReader br = new BufferedReader(new InputStreamReader(in));
try {
// Read the java file collecting comments until we encounter the test method.
- List<StringBuilder> contents = new ArrayList<StringBuilder>();
+ List<StringBuilder> contents = new ArrayList<>();
StringBuilder content = new StringBuilder();
for (String line = br.readLine(); line != null; line = br.readLine()) {
line = line.replaceFirst("^\\s*", ""); // Replace leading whitespace, preserve trailing
diff --git a/core/org.eclipse.cdt.core/browser/org/eclipse/cdt/core/browser/TypeSearchScope.java b/core/org.eclipse.cdt.core/browser/org/eclipse/cdt/core/browser/TypeSearchScope.java
index 0e8c3ca06f..8c892b30d1 100644
--- a/core/org.eclipse.cdt.core/browser/org/eclipse/cdt/core/browser/TypeSearchScope.java
+++ b/core/org.eclipse.cdt.core/browser/org/eclipse/cdt/core/browser/TypeSearchScope.java
@@ -34,10 +34,10 @@ import org.eclipse.core.runtime.Path;
*/
public class TypeSearchScope implements ITypeSearchScope {
- private Set<IPath> fPathSet = new HashSet<IPath>();
- private Set<IPath> fContainerSet = new HashSet<IPath>();
- private Set<ICProject> fProjectSet = new HashSet<ICProject>();
- private Set<ICProject> fEnclosingProjectSet = new HashSet<ICProject>();
+ private Set<IPath> fPathSet = new HashSet<>();
+ private Set<IPath> fContainerSet = new HashSet<>();
+ private Set<ICProject> fProjectSet = new HashSet<>();
+ private Set<ICProject> fEnclosingProjectSet = new HashSet<>();
private boolean fWorkspaceScope = false;
// cached arrays
diff --git a/core/org.eclipse.cdt.core/browser/org/eclipse/cdt/core/browser/TypeUtil.java b/core/org.eclipse.cdt.core/browser/org/eclipse/cdt/core/browser/TypeUtil.java
index 3ccdb65179..212f4c0dd0 100644
--- a/core/org.eclipse.cdt.core/browser/org/eclipse/cdt/core/browser/TypeUtil.java
+++ b/core/org.eclipse.cdt.core/browser/org/eclipse/cdt/core/browser/TypeUtil.java
@@ -110,7 +110,7 @@ public class TypeUtil {
* exception occurs while accessing its corresponding resource
*/
public static ICElement[] getTypes(ITranslationUnit tu) throws CModelException {
- List<ICElement> typeList = new ArrayList<ICElement>();
+ List<ICElement> typeList = new ArrayList<>();
ICElement[] children = tu.getChildren();
for (int i = 0; i < children.length; ++i) {
if (isDeclaringType(children[i]))
@@ -131,8 +131,8 @@ public class TypeUtil {
*/
public static ICElement[] getAllTypes(ITranslationUnit tu) throws CModelException {
ICElement[] types = getTypes(tu);
- ArrayList<ICElement> allTypes = new ArrayList<ICElement>(types.length);
- ArrayList<ICElement> typesToTraverse = new ArrayList<ICElement>(types.length);
+ ArrayList<ICElement> allTypes = new ArrayList<>(types.length);
+ ArrayList<ICElement> typesToTraverse = new ArrayList<>(types.length);
for (ICElement type : types) {
typesToTraverse.add(type);
}
@@ -158,7 +158,7 @@ public class TypeUtil {
* @return the immediate member types declared by this type
*/
public static ICElement[] getTypes(ICElement elem) throws CModelException {
- List<ICElement> typeList = new ArrayList<ICElement>();
+ List<ICElement> typeList = new ArrayList<>();
if (isDeclaringType(elem) && elem instanceof IParent) {
ICElement[] children = ((IParent) elem).getChildren();
for (int i = 0; i < children.length; ++i) {
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/language/ProjectLanguageConfiguration.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/language/ProjectLanguageConfiguration.java
index b26fe8b42a..14afe48544 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/language/ProjectLanguageConfiguration.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/language/ProjectLanguageConfiguration.java
@@ -54,8 +54,8 @@ public class ProjectLanguageConfiguration {
* language mappings defined.
*/
public ProjectLanguageConfiguration() {
- fConfigurationContentTypeMappings = new TreeMap<String, Map<String, String>>();
- fFileConfigurationMappings = new TreeMap<String, Map<String, String>>();
+ fConfigurationContentTypeMappings = new TreeMap<>();
+ fFileConfigurationMappings = new TreeMap<>();
}
/**
@@ -114,7 +114,7 @@ public class ProjectLanguageConfiguration {
String configurationId = getId(configuration);
Map<String, String> contentTypeMappings = fConfigurationContentTypeMappings.get(configurationId);
if (contentTypeMappings == null) {
- contentTypeMappings = new TreeMap<String, String>();
+ contentTypeMappings = new TreeMap<>();
fConfigurationContentTypeMappings.put(configurationId, contentTypeMappings);
}
contentTypeMappings.put(contentType, language);
@@ -161,7 +161,7 @@ public class ProjectLanguageConfiguration {
public void addFileMapping(ICConfigurationDescription configuration, String filePath, String language) {
Map<String, String> configurationMappings = fFileConfigurationMappings.get(filePath);
if (configurationMappings == null) {
- configurationMappings = new TreeMap<String, String>();
+ configurationMappings = new TreeMap<>();
fFileConfigurationMappings.put(filePath, configurationMappings);
}
String configurationId = getId(configuration);
@@ -245,12 +245,12 @@ public class ProjectLanguageConfiguration {
*/
public void setFileMappings(IFile file, Map<String, String> mappings) {
fFileConfigurationMappings.put(file.getProjectRelativePath().toPortableString(),
- new TreeMap<String, String>(mappings));
+ new TreeMap<>(mappings));
}
private Map<String, Map<String, String>> copyLanguageMappings(Map<String, Map<String, String>> mappings,
boolean isReadOnly) {
- Map<String, Map<String, String>> result = new TreeMap<String, Map<String, String>>();
+ Map<String, Map<String, String>> result = new TreeMap<>();
Iterator<Entry<String, Map<String, String>>> entries = mappings.entrySet().iterator();
while (entries.hasNext()) {
Entry<String, Map<String, String>> entry = entries.next();
@@ -258,7 +258,7 @@ public class ProjectLanguageConfiguration {
if (isReadOnly) {
map = Collections.unmodifiableMap(map);
} else {
- map = new TreeMap<String, String>(map);
+ map = new TreeMap<>(map);
}
result.put(entry.getKey(), map);
}
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/language/WorkspaceLanguageConfiguration.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/language/WorkspaceLanguageConfiguration.java
index c3a9991d43..807885e59b 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/language/WorkspaceLanguageConfiguration.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/language/WorkspaceLanguageConfiguration.java
@@ -35,7 +35,7 @@ public class WorkspaceLanguageConfiguration {
* language mappings defined.
*/
public WorkspaceLanguageConfiguration() {
- fMappings = new TreeMap<String, String>();
+ fMappings = new TreeMap<>();
}
/**
@@ -62,7 +62,7 @@ public class WorkspaceLanguageConfiguration {
* @param mappings
*/
public void setWorkspaceMappings(Map<String, String> mappings) {
- fMappings = new TreeMap<String, String>(mappings);
+ fMappings = new TreeMap<>(mappings);
}
/**
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/language/settings/providers/LanguageSettingsBaseProvider.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/language/settings/providers/LanguageSettingsBaseProvider.java
index 9003a70a82..3f9ee6728b 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/language/settings/providers/LanguageSettingsBaseProvider.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/language/settings/providers/LanguageSettingsBaseProvider.java
@@ -42,7 +42,7 @@ public class LanguageSettingsBaseProvider extends AbstractExecutableExtensionBas
protected List<String> languageScope = null;
/** Provider-specific properties */
- protected Map<String, String> properties = new HashMap<String, String>();
+ protected Map<String, String> properties = new HashMap<>();
/** List of entries defined by this provider. */
private List<ICLanguageSettingEntry> entries = null;
@@ -78,7 +78,7 @@ public class LanguageSettingsBaseProvider extends AbstractExecutableExtensionBas
public LanguageSettingsBaseProvider(String id, String name, List<String> languages,
List<ICLanguageSettingEntry> entries) {
super(id, name);
- this.languageScope = languages != null ? new ArrayList<String>(languages) : null;
+ this.languageScope = languages != null ? new ArrayList<>(languages) : null;
this.entries = getPooledList(entries);
}
@@ -97,10 +97,10 @@ public class LanguageSettingsBaseProvider extends AbstractExecutableExtensionBas
public LanguageSettingsBaseProvider(String id, String name, List<String> languages,
List<ICLanguageSettingEntry> entries, Map<String, String> properties) {
super(id, name);
- this.languageScope = languages != null ? new ArrayList<String>(languages) : null;
+ this.languageScope = languages != null ? new ArrayList<>(languages) : null;
this.entries = getPooledList(entries);
if (properties != null)
- this.properties = new HashMap<String, String>(properties);
+ this.properties = new HashMap<>(properties);
}
/**
@@ -130,10 +130,10 @@ public class LanguageSettingsBaseProvider extends AbstractExecutableExtensionBas
setId(id);
setName(name);
- this.languageScope = languages != null ? new ArrayList<String>(languages) : null;
+ this.languageScope = languages != null ? new ArrayList<>(languages) : null;
this.entries = getPooledList(entries);
if (properties != null)
- this.properties = new HashMap<String, String>(properties);
+ this.properties = new HashMap<>(properties);
}
/**
@@ -272,7 +272,7 @@ public class LanguageSettingsBaseProvider extends AbstractExecutableExtensionBas
return false;
} else {
// The trouble to ensure default properties are equal to missing ones.
- Set<String> keys = new HashSet<String>(properties.keySet());
+ Set<String> keys = new HashSet<>(properties.keySet());
keys.addAll(other.properties.keySet());
for (String key : keys) {
String value = properties.get(key);
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/language/settings/providers/LanguageSettingsManager.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/language/settings/providers/LanguageSettingsManager.java
index 784382f746..2fc760c77a 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/language/settings/providers/LanguageSettingsManager.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/language/settings/providers/LanguageSettingsManager.java
@@ -229,7 +229,7 @@ public class LanguageSettingsManager {
languageSettings = ((ICFolderDescription) rcDescription).getLanguageSettings();
}
- List<String> languageIds = new ArrayList<String>();
+ List<String> languageIds = new ArrayList<>();
if (languageSettings != null) {
for (ICLanguageSetting languageSetting : languageSettings) {
if (languageSetting != null) {
@@ -255,7 +255,7 @@ public class LanguageSettingsManager {
* Never returns {@code null} but empty list if no languages can be found.
*/
public static List<String> getLanguages(IResource resource, ICConfigurationDescription cfgDescription) {
- List<String> languageIds = new ArrayList<String>();
+ List<String> languageIds = new ArrayList<>();
IPath prjRelPath = resource.getProjectRelativePath();
if (resource instanceof IFile) {
String langId = null;
@@ -397,7 +397,7 @@ public class LanguageSettingsManager {
* @since 5.5
*/
public static List<ILanguageSettingsProvider> createLanguageSettingsProviders(String[] ids) {
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ List<ILanguageSettingsProvider> providers = new ArrayList<>();
for (String id : ids) {
ILanguageSettingsProvider provider = null;
if (!isPreferShared(id)) {
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/language/settings/providers/LanguageSettingsSerializableProvider.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/language/settings/providers/LanguageSettingsSerializableProvider.java
index 71509923e2..a11e4a7903 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/language/settings/providers/LanguageSettingsSerializableProvider.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/language/settings/providers/LanguageSettingsSerializableProvider.java
@@ -223,7 +223,7 @@ public class LanguageSettingsSerializableProvider extends LanguageSettingsBasePr
*/
public Element serializeAttributes(Element parentElement) {
// Keeps pairs: key, value. See JavaDoc XmlUtil.appendElement(Node, String, String[]).
- List<String> attributes = new ArrayList<String>();
+ List<String> attributes = new ArrayList<>();
attributes.add(ATTR_ID);
attributes.add(getId());
@@ -346,7 +346,7 @@ public class LanguageSettingsSerializableProvider extends LanguageSettingsBasePr
*/
private void loadLanguageScopeElement(Node parentNode) {
if (languageScope == null) {
- languageScope = new ArrayList<String>();
+ languageScope = new ArrayList<>();
}
String id = XmlUtil.determineAttributeValue(parentNode, ATTR_ID);
languageScope.add(id);
@@ -435,8 +435,8 @@ public class LanguageSettingsSerializableProvider extends LanguageSettingsBasePr
private LanguageSettingsSerializableProvider cloneShallowInternal() throws CloneNotSupportedException {
LanguageSettingsSerializableProvider clone = (LanguageSettingsSerializableProvider) super.clone();
if (languageScope != null)
- clone.languageScope = new ArrayList<String>(languageScope);
- clone.properties = new HashMap<String, String>(properties);
+ clone.languageScope = new ArrayList<>(languageScope);
+ clone.properties = new HashMap<>(properties);
clone.fStorage = new LanguageSettingsSerializableStorage();
return clone;
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/language/settings/providers/LanguageSettingsStorage.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/language/settings/providers/LanguageSettingsStorage.java
index 6ba0f67f3b..d533e2e6c2 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/language/settings/providers/LanguageSettingsStorage.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/language/settings/providers/LanguageSettingsStorage.java
@@ -37,14 +37,14 @@ public class LanguageSettingsStorage implements Cloneable {
/** Storage to keep settings entries. */
protected Map<String, // languageId
Map<String, // resource project path
- List<ICLanguageSettingEntry>>> fStorage = new HashMap<String, Map<String, List<ICLanguageSettingEntry>>>();
+ List<ICLanguageSettingEntry>>> fStorage = new HashMap<>();
/**
* Pool of LSE lists implemented as WeakHashSet. That allows to gain memory savings
* at the expense of CPU time. WeakHashSet handles garbage collection when a list is not
* referenced anywhere else. See JavaDoc {@link java.lang.ref.WeakReference} about weak reference objects.
*/
- private static WeakHashSet<List<ICLanguageSettingEntry>> listPool = new WeakHashSetSynchronized<List<ICLanguageSettingEntry>>();
+ private static WeakHashSet<List<ICLanguageSettingEntry>> listPool = new WeakHashSetSynchronized<>();
/**
* Returns the list of setting entries for the given resource and language.
@@ -108,7 +108,7 @@ public class LanguageSettingsStorage implements Cloneable {
if (entries != null) {
Map<String, List<ICLanguageSettingEntry>> langMap = fStorage.get(languageId);
if (langMap == null) {
- langMap = new HashMap<String, List<ICLanguageSettingEntry>>();
+ langMap = new HashMap<>();
fStorage.put(languageId, langMap);
}
List<ICLanguageSettingEntry> sortedEntries = getPooledList(sortEntries(entries), false);
@@ -148,7 +148,7 @@ public class LanguageSettingsStorage implements Cloneable {
* of the provider, so the set can contain {@code null}.
*/
public Set<String> getLanguages() {
- return new HashSet<String>(fStorage.keySet());
+ return new HashSet<>(fStorage.keySet());
}
/**
@@ -162,9 +162,9 @@ public class LanguageSettingsStorage implements Cloneable {
public Set<String> getResourcePaths(String languageId) {
Map<String, List<ICLanguageSettingEntry>> rcPathsMap = fStorage.get(languageId);
if (rcPathsMap == null) {
- return new HashSet<String>();
+ return new HashSet<>();
}
- return new HashSet<String>(rcPathsMap.keySet());
+ return new HashSet<>(rcPathsMap.keySet());
}
/**
@@ -189,7 +189,7 @@ public class LanguageSettingsStorage implements Cloneable {
}
if (copy) {
- entries = new ArrayList<ICLanguageSettingEntry>(entries);
+ entries = new ArrayList<>(entries);
}
pooledList = Collections.unmodifiableList(entries);
return listPool.add(pooledList);
@@ -222,13 +222,13 @@ public class LanguageSettingsStorage implements Cloneable {
@Override
public LanguageSettingsStorage clone() throws CloneNotSupportedException {
LanguageSettingsStorage storageClone = (LanguageSettingsStorage) super.clone();
- storageClone.fStorage = new HashMap<String, Map<String, List<ICLanguageSettingEntry>>>();
+ storageClone.fStorage = new HashMap<>();
synchronized (fStorage) {
Set<Entry<String, Map<String, List<ICLanguageSettingEntry>>>> entrySetLang = fStorage.entrySet();
for (Entry<String, Map<String, List<ICLanguageSettingEntry>>> entryLang : entrySetLang) {
String langId = entryLang.getKey();
Map<String, List<ICLanguageSettingEntry>> mapRc = entryLang.getValue();
- Map<String, List<ICLanguageSettingEntry>> mapRcClone = new HashMap<String, List<ICLanguageSettingEntry>>();
+ Map<String, List<ICLanguageSettingEntry>> mapRcClone = new HashMap<>();
Set<Entry<String, List<ICLanguageSettingEntry>>> entrySetRc = mapRc.entrySet();
for (Entry<String, List<ICLanguageSettingEntry>> entryRc : entrySetRc) {
String rcProjectPath = entryRc.getKey();
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/language/settings/providers/ScannerDiscoveryLegacySupport.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/language/settings/providers/ScannerDiscoveryLegacySupport.java
index 9a6c6fb9e2..e9307f90d9 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/language/settings/providers/ScannerDiscoveryLegacySupport.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/language/settings/providers/ScannerDiscoveryLegacySupport.java
@@ -282,7 +282,7 @@ public class ScannerDiscoveryLegacySupport {
@SuppressWarnings("nls")
public static String getDeprecatedLegacyProfiles(String id) {
if (legacyProfiles == null) {
- legacyProfiles = new HashMap<String, String>();
+ legacyProfiles = new HashMap<>();
// InputTypes
legacyProfiles.put("cdt.managedbuild.tool.gnu.c.compiler.input",
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/CoreModelUtil.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/CoreModelUtil.java
index c100e8681d..41da830fcd 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/CoreModelUtil.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/CoreModelUtil.java
@@ -695,7 +695,7 @@ public class CoreModelUtil {
public static ICConfigurationDescription[] getReferencedConfigurationDescriptions(ICConfigurationDescription cfgDes,
boolean writable) {
- List<ICConfigurationDescription> result = new ArrayList<ICConfigurationDescription>();
+ List<ICConfigurationDescription> result = new ArrayList<>();
if (cfgDes != null) {
Map<String, String> map = cfgDes.getReferenceInfo();
@@ -749,7 +749,7 @@ public class CoreModelUtil {
*/
public static ICConfigurationDescription[] getReferencingConfigurationDescriptions(
ICConfigurationDescription cfgDes, boolean writable) {
- List<ICConfigurationDescription> result = new ArrayList<ICConfigurationDescription>();
+ List<ICConfigurationDescription> result = new ArrayList<>();
if (cfgDes != null) {
CoreModel core = CoreModel.getDefault();
@@ -784,7 +784,7 @@ public class CoreModelUtil {
public static String[] getBinaryParserIds(ICConfigurationDescription[] cfgs) {
if (cfgs == null || cfgs.length == 0)
return null;
- ArrayList<String> pids = new ArrayList<String>();
+ ArrayList<String> pids = new ArrayList<>();
for (ICConfigurationDescription cfg : cfgs) {
ICTargetPlatformSetting tps = cfg.getTargetPlatformSetting();
String[] ids = tps.getBinaryParserIds();
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/LanguageManager.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/LanguageManager.java
index 514b562631..a963a4b0f4 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/LanguageManager.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/LanguageManager.java
@@ -64,10 +64,10 @@ public class LanguageManager {
private static final String ATTRIBUTE_ID = "id"; //$NON-NLS-1$
private static LanguageManager instance;
- private Map<String, ILanguage> fLanguageCache = new HashMap<String, ILanguage>();
- private Map<String, IPDOMLinkageFactory> fPDOMLinkageFactoryCache = new HashMap<String, IPDOMLinkageFactory>();
- private Map<String, ILanguage> fContentTypeToLanguageCache = new HashMap<String, ILanguage>();
- private Map<IProject, ProjectLanguageConfiguration> fLanguageConfigurationCache = new HashMap<IProject, ProjectLanguageConfiguration>();
+ private Map<String, ILanguage> fLanguageCache = new HashMap<>();
+ private Map<String, IPDOMLinkageFactory> fPDOMLinkageFactoryCache = new HashMap<>();
+ private Map<String, ILanguage> fContentTypeToLanguageCache = new HashMap<>();
+ private Map<IProject, ProjectLanguageConfiguration> fLanguageConfigurationCache = new HashMap<>();
private boolean fIsFullyCached;
private HashMap<String, ILanguageDescriptor> fIdToLanguageDescriptorCache;//= new HashMap();
private HashMap<String, List<ILanguageDescriptor>> fContentTypeToDescriptorListCache;
@@ -99,7 +99,7 @@ public class LanguageManager {
}
private HashMap<String, ILanguageDescriptor> createDescriptorCache() {
- HashMap<String, ILanguageDescriptor> map = new HashMap<String, ILanguageDescriptor>();
+ HashMap<String, ILanguageDescriptor> map = new HashMap<>();
IConfigurationElement[] configs = Platform.getExtensionRegistry()
.getConfigurationElementsFor(LANGUAGE_EXTENSION_POINT_ID);
for (int j = 0; j < configs.length; ++j) {
@@ -120,7 +120,7 @@ public class LanguageManager {
}
public Map<String, ILanguageDescriptor[]> getContentTypeIdToLanguageDescriptionsMap() {
- HashMap<String, ILanguageDescriptor[]> map = new HashMap<String, ILanguageDescriptor[]>();
+ HashMap<String, ILanguageDescriptor[]> map = new HashMap<>();
Map<String, List<ILanguageDescriptor>> cache = getContentTypeToDescriptorCache();
for (Entry<String, List<ILanguageDescriptor>> entry : cache.entrySet()) {
@@ -135,7 +135,7 @@ public class LanguageManager {
}
private HashMap<String, List<ILanguageDescriptor>> createContentTypeToDescriptorCache() {
- HashMap<String, List<ILanguageDescriptor>> map = new HashMap<String, List<ILanguageDescriptor>>();
+ HashMap<String, List<ILanguageDescriptor>> map = new HashMap<>();
Map<String, ILanguageDescriptor> dc = getDescriptorCache();
List<ILanguageDescriptor> list;
@@ -146,7 +146,7 @@ public class LanguageManager {
id = type.getId();
list = map.get(id);
if (list == null) {
- list = new ArrayList<ILanguageDescriptor>();
+ list = new ArrayList<>();
map.put(id, list);
}
list.add(des);
@@ -230,7 +230,7 @@ public class LanguageManager {
*/
@Deprecated
public ArrayList<String> getAllContentTypes() {
- ArrayList<String> allTypes = new ArrayList<String>();
+ ArrayList<String> allTypes = new ArrayList<>();
allTypes.add(CCorePlugin.CONTENT_TYPE_ASMSOURCE);
allTypes.add(CCorePlugin.CONTENT_TYPE_CHEADER);
allTypes.add(CCorePlugin.CONTENT_TYPE_CSOURCE);
@@ -264,7 +264,7 @@ public class LanguageManager {
}
private Set<String> collectContentTypeIds() {
- HashSet<String> allTypes = new HashSet<String>();
+ HashSet<String> allTypes = new HashSet<>();
allTypes.add(CCorePlugin.CONTENT_TYPE_ASMSOURCE);
allTypes.add(CCorePlugin.CONTENT_TYPE_CHEADER);
allTypes.add(CCorePlugin.CONTENT_TYPE_CSOURCE);
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/CExternalSetting.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/CExternalSetting.java
index 0fd02f1d17..1da84e73e5 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/CExternalSetting.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/CExternalSetting.java
@@ -22,7 +22,7 @@ import org.eclipse.cdt.core.settings.model.util.KindBasedStore;
public final class CExternalSetting implements ICExternalSetting {
// private EntryStore fEntryStore = new EntryStore();
- private KindBasedStore<CEntriesSet> fStore = new KindBasedStore<CEntriesSet>(false);
+ private KindBasedStore<CEntriesSet> fStore = new KindBasedStore<>(false);
private String[] fContentTypeIds;
private String[] fLanguageIds;
private String[] fExtensions;
@@ -123,7 +123,7 @@ public final class CExternalSetting implements ICExternalSetting {
@Override
public ICSettingEntry[] getEntries() {
- List<ICSettingEntry> result = new ArrayList<ICSettingEntry>();
+ List<ICSettingEntry> result = new ArrayList<>();
int kinds[] = KindBasedStore.getAllEntryKinds();
for (int i = 0; i < kinds.length; i++) {
CEntriesSet list = getEntriesSet(kinds[i], false);
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/extension/impl/CDefaultConfigurationData.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/extension/impl/CDefaultConfigurationData.java
index 97a3e75a60..8fb734c174 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/extension/impl/CDefaultConfigurationData.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/extension/impl/CDefaultConfigurationData.java
@@ -34,7 +34,7 @@ import org.eclipse.core.runtime.Path;
public class CDefaultConfigurationData extends CConfigurationData {
protected String fDescription;
- private HashMap<IPath, CResourceData> fResourceDataMap = new HashMap<IPath, CResourceData>();
+ private HashMap<IPath, CResourceData> fResourceDataMap = new HashMap<>();
protected CFolderData fRootFolderData;
protected String fName;
protected String fId;
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/extension/impl/CDefaultFolderData.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/extension/impl/CDefaultFolderData.java
index 28d9339c44..61949266b7 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/extension/impl/CDefaultFolderData.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/extension/impl/CDefaultFolderData.java
@@ -25,7 +25,7 @@ import org.eclipse.core.runtime.IPath;
public class CDefaultFolderData extends CFolderData {
protected IPath fPath;
// protected boolean fIsExcluded;
- protected List<CLanguageData> fLanguageDatas = new ArrayList<CLanguageData>();
+ protected List<CLanguageData> fLanguageDatas = new ArrayList<>();
protected String fName;
protected String fId;
protected CConfigurationData fCfg;
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/extension/impl/CResourceDataContainer.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/extension/impl/CResourceDataContainer.java
index ef9afb0c75..13f653b777 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/extension/impl/CResourceDataContainer.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/extension/impl/CResourceDataContainer.java
@@ -70,7 +70,7 @@ public class CResourceDataContainer {
}
public List<CResourceData> getRcDataList(final int kind) {
- final List<CResourceData> list = new ArrayList<CResourceData>();
+ final List<CResourceData> list = new ArrayList<>();
fRcDataContainer.accept(new IPathSettingsContainerVisitor() {
@Override
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/AbstractEntryStorage.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/AbstractEntryStorage.java
index 35009d6bf4..aa10fed668 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/AbstractEntryStorage.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/AbstractEntryStorage.java
@@ -36,7 +36,7 @@ public abstract class AbstractEntryStorage {
public List<ICLanguageSettingEntry> getEntries(List<ICLanguageSettingEntry> list) {
SettingsSet settings = initCache();
if (list == null)
- list = new ArrayList<ICLanguageSettingEntry>();
+ list = new ArrayList<>();
ICLanguageSettingEntry entries[] = settings.getEntries();
list.addAll(Arrays.asList(entries));
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/CDataUtil.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/CDataUtil.java
index 52e14aac75..8009577192 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/CDataUtil.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/CDataUtil.java
@@ -818,7 +818,7 @@ public class CDataUtil {
for (int i = 0; i < includeList.size(); i++) {
ICSourceEntry oldEntry = includeList.get(i);
- List<IPath> tmp = new ArrayList<IPath>(1);
+ List<IPath> tmp = new ArrayList<>(1);
tmp.add(path);
ICSourceEntry newEntry = addExcludePaths(oldEntry, tmp, true);
if (newEntry != null)
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/CEntriesSet.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/CEntriesSet.java
index ed54f6ce13..68a8e80ea5 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/CEntriesSet.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/CEntriesSet.java
@@ -19,7 +19,7 @@ import java.util.List;
import org.eclipse.cdt.core.settings.model.ICSettingEntry;
public class CEntriesSet {
- private LinkedHashMap<Object, ICSettingEntry> fEntriesMap = new LinkedHashMap<Object, ICSettingEntry>();
+ private LinkedHashMap<Object, ICSettingEntry> fEntriesMap = new LinkedHashMap<>();
public CEntriesSet() {
}
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/EntryStore.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/EntryStore.java
index c68408c7e5..c72ed3a756 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/EntryStore.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/EntryStore.java
@@ -29,7 +29,7 @@ import org.eclipse.cdt.core.settings.model.ICMacroFileEntry;
import org.eclipse.cdt.core.settings.model.ICSettingEntry;
public class EntryStore {
- private KindBasedStore<ArrayList<ICLanguageSettingEntry>> fStore = new KindBasedStore<ArrayList<ICLanguageSettingEntry>>();
+ private KindBasedStore<ArrayList<ICLanguageSettingEntry>> fStore = new KindBasedStore<>();
private boolean fPreserveReadOnly;
public EntryStore() {
@@ -51,7 +51,7 @@ public class EntryStore {
}
public ICLanguageSettingEntry[] getEntries() {
- List<ICLanguageSettingEntry> result = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> result = new ArrayList<>();
List<ICLanguageSettingEntry> list;
for (int k : KindBasedStore.getLanguageEntryKinds()) {
list = fStore.get(k);
@@ -69,7 +69,7 @@ public class EntryStore {
public ICLanguageSettingEntry[] getEntries(int kind) {
List<ICLanguageSettingEntry> list = getEntriesList(kind);
if (list == null)
- list = new ArrayList<ICLanguageSettingEntry>(0);
+ list = new ArrayList<>(0);
switch (kind) {
case ICSettingEntry.INCLUDE_PATH:
return list.toArray(new ICIncludePathEntry[list.size()]);
@@ -91,8 +91,8 @@ public class EntryStore {
public List<ICLanguageSettingEntry> getEntriesList(int kind) {
List<ICLanguageSettingEntry> list = getEntriesList(kind, false);
if (list != null)
- return new ArrayList<ICLanguageSettingEntry>(list);
- return new ArrayList<ICLanguageSettingEntry>(0);
+ return new ArrayList<>(list);
+ return new ArrayList<>(0);
}
private void setEntriesList(int kind, ArrayList<ICLanguageSettingEntry> list) {
@@ -102,7 +102,7 @@ public class EntryStore {
private ArrayList<ICLanguageSettingEntry> getEntriesList(int kind, boolean create) {
ArrayList<ICLanguageSettingEntry> list = fStore.get(kind);
if (list == null && create) {
- fStore.put(kind, list = new ArrayList<ICLanguageSettingEntry>());
+ fStore.put(kind, list = new ArrayList<>());
}
return list;
}
@@ -130,7 +130,7 @@ public class EntryStore {
}
public void storeEntries(int kind, List<ICLanguageSettingEntry> list) {
- ArrayList<ICLanguageSettingEntry> newList = new ArrayList<ICLanguageSettingEntry>(list);
+ ArrayList<ICLanguageSettingEntry> newList = new ArrayList<>(list);
// newList.addAll(Arrays.asList(entries));
if (fPreserveReadOnly) {
List<ICLanguageSettingEntry> oldList = getEntriesList(kind, false);
@@ -147,7 +147,7 @@ public class EntryStore {
}
private Set<ICLanguageSettingEntry> getReadOnlySet(List<ICLanguageSettingEntry> entries) {
- Set<ICLanguageSettingEntry> set = new HashSet<ICLanguageSettingEntry>();
+ Set<ICLanguageSettingEntry> set = new HashSet<>();
for (ICLanguageSettingEntry entry : entries) {
if (entry.isReadOnly())
set.add(entry);
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/LanguageSettingEntriesSerializer.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/LanguageSettingEntriesSerializer.java
index a0610b511f..558a82fc13 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/LanguageSettingEntriesSerializer.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/LanguageSettingEntriesSerializer.java
@@ -77,7 +77,7 @@ public class LanguageSettingEntriesSerializer {
public static List<ICSettingEntry> loadEntriesList(ICStorageElement el, int kindFilter) {
ICStorageElement children[] = el.getChildren();
ICStorageElement child;
- List<ICSettingEntry> list = new ArrayList<ICSettingEntry>();
+ List<ICSettingEntry> list = new ArrayList<>();
ICSettingEntry entry;
for (int i = 0; i < children.length; i++) {
child = children[i];
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/ListComparator.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/ListComparator.java
index 305aabd615..9fc4ee17c8 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/ListComparator.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/ListComparator.java
@@ -50,14 +50,14 @@ public class ListComparator {
if (a1 == null || a1.length == 0)
return null;
if (a2 == null || a2.length == 0) {
- List<Object> list = new ArrayList<Object>(a1.length);
+ List<Object> list = new ArrayList<>(a1.length);
for (int i = 0; i < a1.length; i++) {
list.add(a1[i]);
}
return list;
}
- List<Object> list = new ArrayList<Object>(a1.length);
+ List<Object> list = new ArrayList<>(a1.length);
Object o1;
for (int i = 0; i < a1.length; i++) {
o1 = a1[i];
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/PathEntryTranslator.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/PathEntryTranslator.java
index 69b0fcab2d..f17b6f2b0f 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/PathEntryTranslator.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/PathEntryTranslator.java
@@ -121,7 +121,7 @@ public class PathEntryTranslator {
private IProject fProject;
private CConfigurationData fCfgData;
private PathSettingsContainer fTranslatedFilters;
- private Map<IPath, ResourceInfo> fResourceMap = new HashMap<IPath, ResourceInfo>();
+ private Map<IPath, ResourceInfo> fResourceMap = new HashMap<>();
private IWorkspaceRoot fRoot = ResourcesPlugin.getWorkspace().getRoot();
private static class VarSubstitutor extends CoreVariableSubstitutor {
@@ -171,13 +171,13 @@ public class PathEntryTranslator {
public Map<String, String> getRefProjectsMap() {
if (fRefProjPaths != null && fRefProjPaths.length != 0) {
- Map<String, String> map = new HashMap<String, String>(fRefProjPaths.length);
+ Map<String, String> map = new HashMap<>(fRefProjPaths.length);
for (IPath fRefProjPath : fRefProjPaths) {
map.put(fRefProjPath.segment(0), ""); //$NON-NLS-1$
}
return map;
}
- return new HashMap<String, String>(0);
+ return new HashMap<>(0);
}
public ICExternalSetting[] getExternalSettings() {
@@ -263,14 +263,14 @@ public class PathEntryTranslator {
KindBasedStore<List<LangEntryInfo>> fLangEntries;
private RcDesInfo(ResourceInfo rcInfo) {
- fResolvedEntries = new ArrayList<ResolvedEntry>();
- fLangEntries = new KindBasedStore<List<LangEntryInfo>>();
+ fResolvedEntries = new ArrayList<>();
+ fLangEntries = new KindBasedStore<>();
}
public void add(LangEntryInfo info) {
List<LangEntryInfo> list = fLangEntries.get(info.fLangEntry.getKind());
if (list == null) {
- list = new ArrayList<LangEntryInfo>();
+ list = new ArrayList<>();
fLangEntries.put(info.fLangEntry.getKind(), list);
}
list.add(info);
@@ -546,7 +546,7 @@ public class PathEntryTranslator {
if (rcInfo.fRc.getType() == IResource.FILE) {
fFilterInfos = new ResourceInfo[0];
} else {
- List<ResourceInfo> list = new ArrayList<ResourceInfo>();
+ List<ResourceInfo> list = new ArrayList<>();
for (IPath path : paths) {
list.addAll(Arrays.asList(processFilter((IContainer) rcInfo.fRc, path)));
}
@@ -616,7 +616,7 @@ public class PathEntryTranslator {
fProject = project;
IPath[] exclusions = entry.getExclusionPatterns();
if (exclusions.length != 0) {
- fFiltersSet = new HashSet<IPath>(exclusions.length);
+ fFiltersSet = new HashSet<>(exclusions.length);
fFiltersSet.addAll(Arrays.asList(entry.getExclusionPatterns()));
}
}
@@ -631,7 +631,7 @@ public class PathEntryTranslator {
public void addFilter(IPath path) {
if (fFiltersSet == null)
- fFiltersSet = new HashSet<IPath>();
+ fFiltersSet = new HashSet<>();
fFiltersSet.add(path);
}
@@ -802,8 +802,8 @@ public class PathEntryTranslator {
private PathEntryCollector(IProject project/*, ICConfigurationDescription cfgDescription*/) {
fStorage = PathSettingsContainer.createRootContainer();
fStorage.setValue(this);
- fStore = new KindBasedStore<LinkedHashMap<ICSettingEntry, PathEntryComposer>>(false);
- fNameKeyMapStore = new KindBasedStore<LinkedHashMap<EntryNameKey, PathEntryComposer>>(false);
+ fStore = new KindBasedStore<>(false);
+ fNameKeyMapStore = new KindBasedStore<>(false);
fProject = project;
}
@@ -812,7 +812,7 @@ public class PathEntryTranslator {
IProject project/*, ICConfigurationDescription cfgDescription*/) {
fStorage = container;
fStore = store;
- fNameKeyMapStore = new KindBasedStore<LinkedHashMap<EntryNameKey, PathEntryComposer>>(false);
+ fNameKeyMapStore = new KindBasedStore<>(false);
fProject = project;
}
@@ -837,7 +837,7 @@ public class PathEntryTranslator {
if (paths == null || paths.length == 0) {
fRefProjMap = null;
} else {
- fRefProjMap = new LinkedHashMap<IPath, PathEntryComposer>();
+ fRefProjMap = new LinkedHashMap<>();
for (IPath path : paths) {
PathEntryComposer cs = new PathEntryComposer(path, fProject/*, fCfg*/);
IPath composerPath = cs.getPath();
@@ -885,7 +885,7 @@ public class PathEntryTranslator {
HashSet<ICSettingEntry> parentSet = getEntriesSetCopy(kind);
@SuppressWarnings("unchecked")
HashSet<ICSettingEntry> removedParentSet = (HashSet<ICSettingEntry>) parentSet.clone();
- HashSet<ICLanguageSettingEntry> addedThisSet = new HashSet<ICLanguageSettingEntry>(Arrays.asList(entries));
+ HashSet<ICLanguageSettingEntry> addedThisSet = new HashSet<>(Arrays.asList(entries));
removedParentSet.removeAll(addedThisSet);
addedThisSet.removeAll(parentSet);
@@ -926,7 +926,7 @@ public class PathEntryTranslator {
private LinkedHashMap<ICSettingEntry, PathEntryComposer> getEntriesMap(int kind, boolean create) {
LinkedHashMap<ICSettingEntry, PathEntryComposer> map = fStore.get(kind);
if (map == null && create) {
- map = new LinkedHashMap<ICSettingEntry, PathEntryComposer>();
+ map = new LinkedHashMap<>();
fStore.put(kind, map);
}
return map;
@@ -935,7 +935,7 @@ public class PathEntryTranslator {
private LinkedHashMap<EntryNameKey, PathEntryComposer> getEntriesNameKeyMap(int kind, boolean create) {
LinkedHashMap<EntryNameKey, PathEntryComposer> map = fNameKeyMapStore.get(kind);
if (map == null && create) {
- map = new LinkedHashMap<EntryNameKey, PathEntryComposer>();
+ map = new LinkedHashMap<>();
fNameKeyMapStore.put(kind, map);
}
return map;
@@ -962,14 +962,14 @@ public class PathEntryTranslator {
private HashSet<ICSettingEntry> getEntriesSetCopy(int kind) {
Map<ICSettingEntry, PathEntryComposer> map = getEntriesMap(kind, false);
if (map != null) {
- return new HashSet<ICSettingEntry>(map.keySet());
+ return new HashSet<>(map.keySet());
}
- return new HashSet<ICSettingEntry>(0);
+ return new HashSet<>(0);
}
private List<PathEntryComposer> getCollectedEntriesList(final int kind) {
- final List<PathEntryComposer> list = new ArrayList<PathEntryComposer>();
- final Set<PathEntryComposer> set = new HashSet<PathEntryComposer>();
+ final List<PathEntryComposer> list = new ArrayList<>();
+ final Set<PathEntryComposer> set = new HashSet<>();
fStorage.accept(new IPathSettingsContainerVisitor() {
@Override
@@ -999,7 +999,7 @@ public class PathEntryTranslator {
public List<IPathEntry> getEntries(int peKind, List<IPathEntry> list, int flags,
ICConfigurationDescription cfgDescription) {
- Set<IPathEntry> set = new LinkedHashSet<IPathEntry>();
+ Set<IPathEntry> set = new LinkedHashSet<>();
int sKind = peKindToSettingKind(peKind);
List<PathEntryComposer> composerList = null;
@@ -1007,7 +1007,7 @@ public class PathEntryTranslator {
composerList = getCollectedEntriesList(sKind);
} else if (peKind == IPathEntry.CDT_PROJECT) {
if (fRefProjMap != null && fRefProjMap.size() != 0) {
- composerList = new ArrayList<PathEntryComposer>(fRefProjMap.values());
+ composerList = new ArrayList<>(fRefProjMap.values());
}
}
if (composerList != null) {
@@ -1020,7 +1020,7 @@ public class PathEntryTranslator {
String name = entry.getName();
Map<String, IPathEntry> map = store.get(peKind);
if (map == null) {
- map = new HashMap<String, IPathEntry>();
+ map = new HashMap<>();
store.put(peKind, map);
}
if (!map.containsKey(name)) {
@@ -1042,7 +1042,7 @@ public class PathEntryTranslator {
}
if (list == null) {
- list = new ArrayList<IPathEntry>(set);
+ list = new ArrayList<>(set);
} else {
list.addAll(set);
}
@@ -1068,7 +1068,7 @@ public class PathEntryTranslator {
public List<IPathEntry> getEntries(List<IPathEntry> list, int flags,
ICConfigurationDescription cfgDescription) {
if (list == null)
- list = new ArrayList<IPathEntry>();
+ list = new ArrayList<>();
int peKinds[] = PathEntryKyndStore.getSupportedKinds();
for (int peKind : peKinds) {
getEntries(peKind, list, flags, cfgDescription);
@@ -1162,10 +1162,10 @@ public class PathEntryTranslator {
private ReferenceSettingsInfo addPathEntries(ResolvedEntry[] rEntries, int op) {
PathSettingsContainer cr = PathSettingsContainer.createRootContainer();
cr.setValue(new RcDesInfo(new ResourceInfo(fProject, true)));
- List<IPathEntry> srcList = new ArrayList<IPathEntry>();
- List<IPathEntry> outList = new ArrayList<IPathEntry>();
- List<ResolvedEntry> projList = new ArrayList<ResolvedEntry>();
- List<ResolvedEntry> exportSettingsList = new ArrayList<ResolvedEntry>();
+ List<IPathEntry> srcList = new ArrayList<>();
+ List<IPathEntry> outList = new ArrayList<>();
+ List<ResolvedEntry> projList = new ArrayList<>();
+ List<ResolvedEntry> exportSettingsList = new ArrayList<>();
ICSourceEntry srcEntries[] = null;
ICOutputEntry outEntries[] = null;
ResourceInfo rcInfo;
@@ -1224,7 +1224,7 @@ public class PathEntryTranslator {
ICExternalSetting extSettings[];
if (exportSettingsList.size() != 0) {
extSettings = new ICExternalSetting[1];
- List<ICLanguageSettingEntry> list = new ArrayList<ICLanguageSettingEntry>(exportSettingsList.size());
+ List<ICLanguageSettingEntry> list = new ArrayList<>(exportSettingsList.size());
for (int i = 0; i < exportSettingsList.size(); i++) {
ResolvedEntry re = exportSettingsList.get(i);
ICLanguageSettingEntry le = createLangEntry(re);
@@ -1273,7 +1273,7 @@ public class PathEntryTranslator {
}
private static ICSettingEntry[] replaceUserEntries(ICSettingEntry[] oldEntries, ICSettingEntry[] newUsrEntries) {
- Set<ICSettingEntry> set = new LinkedHashSet<ICSettingEntry>();
+ Set<ICSettingEntry> set = new LinkedHashSet<>();
Class<?> componentType = null;
if (newUsrEntries != null) {
@@ -1311,7 +1311,7 @@ public class PathEntryTranslator {
switch (op) {
case OP_ADD:
if (entries != null && entries.length != 0) {
- Set<ICSourceEntry> set = new LinkedHashSet<ICSourceEntry>();
+ Set<ICSourceEntry> set = new LinkedHashSet<>();
set.addAll(Arrays.asList(oldEntries));
set.addAll(Arrays.asList(entries));
fCfgData.setSourceEntries(set.toArray(new ICSourceEntry[set.size()]));
@@ -1319,7 +1319,7 @@ public class PathEntryTranslator {
break;
case OP_REMOVE:
if (entries != null && entries.length != 0) {
- Set<ICSourceEntry> set = new HashSet<ICSourceEntry>();
+ Set<ICSourceEntry> set = new HashSet<>();
set.addAll(Arrays.asList(oldEntries));
set.removeAll(Arrays.asList(entries));
fCfgData.setSourceEntries(set.toArray(new ICSourceEntry[set.size()]));
@@ -1351,7 +1351,7 @@ public class PathEntryTranslator {
switch (op) {
case OP_ADD:
if (entries != null && entries.length != 0) {
- Set<ICOutputEntry> set = new LinkedHashSet<ICOutputEntry>();
+ Set<ICOutputEntry> set = new LinkedHashSet<>();
set.addAll(Arrays.asList(oldEntries));
set.addAll(Arrays.asList(entries));
bData.setOutputDirectories(set.toArray(new ICOutputEntry[set.size()]));
@@ -1359,7 +1359,7 @@ public class PathEntryTranslator {
break;
case OP_REMOVE:
if (entries != null && entries.length != 0) {
- Set<ICOutputEntry> set = new HashSet<ICOutputEntry>();
+ Set<ICOutputEntry> set = new HashSet<>();
set.addAll(Arrays.asList(oldEntries));
set.removeAll(Arrays.asList(entries));
bData.setOutputDirectories(set.toArray(new ICOutputEntry[set.size()]));
@@ -1402,7 +1402,7 @@ public class PathEntryTranslator {
private CResourceData[] getResourceDatas() {
PathSettingsContainer crs[] = fRcDataHolder.getChildren(true);
- List<CResourceData> list = new ArrayList<CResourceData>(crs.length);
+ List<CResourceData> list = new ArrayList<>(crs.length);
for (PathSettingsContainer cur : crs) {
list.add((CResourceData) cur.getValue());
}
@@ -1478,8 +1478,8 @@ public class PathEntryTranslator {
ICLanguageSettingEntry result[];
switch (op) {
case OP_ADD: {
- Set<ICLanguageSettingEntry> oldSet = new HashSet<ICLanguageSettingEntry>(Arrays.asList(oldEntries));
- Set<ICLanguageSettingEntry> newSet = new HashSet<ICLanguageSettingEntry>(Arrays.asList(newEntries));
+ Set<ICLanguageSettingEntry> oldSet = new HashSet<>(Arrays.asList(oldEntries));
+ Set<ICLanguageSettingEntry> newSet = new HashSet<>(Arrays.asList(newEntries));
newSet.removeAll(oldSet);
if (newSet.size() == 0) {
result = oldEntries;
@@ -1491,8 +1491,8 @@ public class PathEntryTranslator {
break;
}
case OP_REMOVE: {
- Set<ICLanguageSettingEntry> oldSet = new HashSet<ICLanguageSettingEntry>(Arrays.asList(oldEntries));
- Set<ICLanguageSettingEntry> newSet = new HashSet<ICLanguageSettingEntry>(Arrays.asList(newEntries));
+ Set<ICLanguageSettingEntry> oldSet = new HashSet<>(Arrays.asList(oldEntries));
+ Set<ICLanguageSettingEntry> newSet = new HashSet<>(Arrays.asList(newEntries));
oldSet.removeAll(newSet);
if (oldSet.size() == 0) {
result = new ICLanguageSettingEntry[0];
@@ -1521,7 +1521,7 @@ public class PathEntryTranslator {
RcDesInfo rcDes = (RcDesInfo) cr.getValue();
if (rcDes != null) {
List<ResolvedEntry> rEntries = rcDes.fResolvedEntries;
- List<LangEntryInfo> curLanfInfos = new ArrayList<LangEntryInfo>(rEntries.size() + langEntryInfoList.size());
+ List<LangEntryInfo> curLanfInfos = new ArrayList<>(rEntries.size() + langEntryInfoList.size());
for (ResolvedEntry re : rEntries) {
LangEntryInfo li = createLangEntryInfo(re);
if (li != null) {
@@ -1544,7 +1544,7 @@ public class PathEntryTranslator {
}
private void filterAndPropagate(PathSettingsContainer cr, List<LangEntryInfo> list) {
- list = new ArrayList<LangEntryInfo>(list);
+ list = new ArrayList<>(list);
IPath path = cr.getPath();
for (Iterator<LangEntryInfo> iter = list.iterator(); iter.hasNext();) {
LangEntryInfo li = iter.next();
@@ -1613,7 +1613,7 @@ public class PathEntryTranslator {
private ResolvedEntry[] getResolvedEntries(PathEntryResolveInfo info) {
PathEntryResolveInfoElement els[] = info.getElements();
- List<ResolvedEntry> list = new ArrayList<ResolvedEntry>();
+ List<ResolvedEntry> list = new ArrayList<>();
for (PathEntryResolveInfoElement el : els) {
getResolvedEntries(el, list);
}
@@ -1622,7 +1622,7 @@ public class PathEntryTranslator {
private List<ResolvedEntry> getResolvedEntries(PathEntryResolveInfoElement el, List<ResolvedEntry> list) {
if (list == null)
- list = new ArrayList<ResolvedEntry>();
+ list = new ArrayList<>();
IPathEntry[] rpEntries = el.getResolvedEntries();
ResolvedEntry resolvedE;
@@ -1733,7 +1733,7 @@ public class PathEntryTranslator {
private ResourceInfo[] performTranslation(IPath basePath, ResourceInfo[] baseInfos, String seg) {
IPath filterFullPath = basePath.append(seg);
boolean needsParsing = hasSpecChars(seg);
- List<ResourceInfo> list = new ArrayList<ResourceInfo>();
+ List<ResourceInfo> list = new ArrayList<>();
char[] segChars = seg.toCharArray();
for (ResourceInfo baseInfo : baseInfos) {
IResource baseRc = baseInfo.fRc;
@@ -1828,7 +1828,7 @@ public class PathEntryTranslator {
}
public static IPathEntry[] decodePathEntries(IProject project, ICStorageElement el) {
- ArrayList<IPathEntry> pathEntries = new ArrayList<IPathEntry>();
+ ArrayList<IPathEntry> pathEntries = new ArrayList<>();
ICStorageElement children[] = el.getChildren();
for (ICStorageElement child : children) {
if (child.getName().equals(PATH_ENTRY)) {
@@ -2011,7 +2011,7 @@ public class PathEntryTranslator {
for (CConfigurationData allData : allDatas) {
addOutputEntries(collector, allData);
}
- final HashSet<ICSettingEntry> exportedSettings = new HashSet<ICSettingEntry>();
+ final HashSet<ICSettingEntry> exportedSettings = new HashSet<>();
collector.setRefProjects(refInfo.getReferencedProjectsPaths());
ICExternalSetting[] settings = refInfo.getExternalSettings();
for (ICExternalSetting setting : settings) {
@@ -2026,7 +2026,7 @@ public class PathEntryTranslator {
if (rcData != null) {
PathEntryCollector child = collector.createChild(container.getPath());
for (int kind : kinds) {
- Set<ICLanguageSettingEntry> set = new LinkedHashSet<ICLanguageSettingEntry>();
+ Set<ICLanguageSettingEntry> set = new LinkedHashSet<>();
if (collectResourceDataEntries(cfgDescription, kind, rcData, set)) {
ICLanguageSettingEntry[] entries = set.toArray(new ICLanguageSettingEntry[set.size()]);
child.setEntries(kind, entries, exportedSettings);
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/PathSettingsContainer.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/PathSettingsContainer.java
index 8685a98ccd..a9d5e91152 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/PathSettingsContainer.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/PathSettingsContainer.java
@@ -145,7 +145,7 @@ public final class PathSettingsContainer {
private List<IPathSettingsContainerListener> getListenersList(boolean create) {
if (fListeners == null && create)
- fListeners = new ArrayList<IPathSettingsContainerListener>();
+ fListeners = new ArrayList<>();
return fListeners;
}
@@ -182,7 +182,7 @@ public final class PathSettingsContainer {
}
public PathSettingsContainer[] getChildren(final boolean includeThis) {
- final List<PathSettingsContainer> list = new ArrayList<PathSettingsContainer>();
+ final List<PathSettingsContainer> list = new ArrayList<>();
accept(new IPathSettingsContainerVisitor() {
@Override
@@ -247,7 +247,7 @@ public final class PathSettingsContainer {
PatternNameMap pMap = getPatternChildrenMap(false);
if (pMap != null) {
if (list == null)
- list = new ArrayList<PathSettingsContainer>();
+ list = new ArrayList<>();
for (PathSettingsContainer cr : pMap.values()) {
if (cr.fValue == INEXISTENT_VALUE) {
cr.doGetDirectChildren(list);
@@ -260,7 +260,7 @@ public final class PathSettingsContainer {
}
public Object[] getValues(final boolean includeThis) {
- final List<Object> list = new ArrayList<Object>();
+ final List<Object> list = new ArrayList<>();
accept(new IPathSettingsContainerVisitor() {
@Override
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/PatternNameMap.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/PatternNameMap.java
index ba34583ad7..9dbabb3137 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/PatternNameMap.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/PatternNameMap.java
@@ -172,7 +172,7 @@ public class PatternNameMap {
if (hasPatternsMap()) {
List<PathSettingsContainer> list;
if (val != null) {
- list = new ArrayList<PathSettingsContainer>(3);
+ list = new ArrayList<>(3);
list.add(val);
} else {
list = null;
@@ -187,13 +187,13 @@ public class PatternNameMap {
strCA = entry.getKey();
if (CoreModelUtil.match(strCA.getCharArray(), nameCharArray, true)) {
if (list == null)
- list = new ArrayList<PathSettingsContainer>(2);
+ list = new ArrayList<>(2);
list.add(entry.getValue());
}
}
return list;
} else if (val != null) {
- List<PathSettingsContainer> list = new ArrayList<PathSettingsContainer>(1);
+ List<PathSettingsContainer> list = new ArrayList<>(1);
list.add(val);
return list;
}
@@ -214,7 +214,7 @@ public class PatternNameMap {
PathSettingsContainer oldValue;
if (fChildrenMap == null) {
- fChildrenMap = new HashMap<String, PathSettingsContainer>();
+ fChildrenMap = new HashMap<>();
oldValue = null;
} else {
oldValue = fChildrenMap.get(name);
@@ -227,7 +227,7 @@ public class PatternNameMap {
} else if (isPatternName(name)) {
StringCharArray strCA = new StringCharArray(name);
if (fPatternMap == null)
- fPatternMap = new HashMap<StringCharArray, PathSettingsContainer>();
+ fPatternMap = new HashMap<>();
fPatternMap.put(strCA, value);
}
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/ResourceChangeHandlerBase.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/ResourceChangeHandlerBase.java
index ee2a358106..c8e110e1c1 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/ResourceChangeHandlerBase.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/ResourceChangeHandlerBase.java
@@ -62,7 +62,7 @@ public abstract class ResourceChangeHandlerBase implements IResourceChangeListen
private class DeltaVisitor implements IResourceDeltaVisitor {
// private IResourceDelta fRootDelta;
- private Map<IResource, IResource> fMoveMap = new HashMap<IResource, IResource>();
+ private Map<IResource, IResource> fMoveMap = new HashMap<>();
private IResourceMoveHandler fHandler;
public DeltaVisitor(IResourceMoveHandler handler, IResourceDelta rootDelta) {
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/SettingsSet.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/SettingsSet.java
index f7b8e06dfd..85f4c27028 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/SettingsSet.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/SettingsSet.java
@@ -41,7 +41,7 @@ public class SettingsSet {
private Object fContext;
private SettingLevel() {
- fEntries = new LinkedHashMap<EntryNameKey, EntryInfo>();
+ fEntries = new LinkedHashMap<>();
}
public boolean isReadOnly() {
@@ -88,7 +88,7 @@ public class SettingsSet {
public Set<String> getOverrideSet() {
if (fOverrideSet != null)
return (HashSet<String>) fOverrideSet.clone();
- return new HashSet<String>();
+ return new HashSet<>();
}
public void addEntries(ICLanguageSettingEntry entries[]) {
@@ -116,7 +116,7 @@ public class SettingsSet {
public void addOverrideName(String name) {
if (fOverrideSet == null)
- fOverrideSet = new HashSet<String>();
+ fOverrideSet = new HashSet<>();
fOverrideSet.add(name);
}
@@ -127,7 +127,7 @@ public class SettingsSet {
if (fOverrideSet != null) {
fOverrideSet.addAll(set);
} else if (set.size() != 0) {
- fOverrideSet = new HashSet<String>(set);
+ fOverrideSet = new HashSet<>(set);
}
}
@@ -148,7 +148,7 @@ public class SettingsSet {
public Map<EntryNameKey, EntryInfo> clearAndGetMap() {
Map<EntryNameKey, EntryInfo> map = fEntries;
- fEntries = new LinkedHashMap<EntryNameKey, EntryInfo>();
+ fEntries = new LinkedHashMap<>();
fOverrideSet = null;
return map;
}
@@ -168,7 +168,7 @@ public class SettingsSet {
}
public List<ICLanguageSettingEntry> getEntriesList(boolean includeOverridden) {
- List<ICLanguageSettingEntry> list = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> list = new ArrayList<>();
EntryInfo infos[] = getInfos();
for (EntryInfo info : infos) {
if (includeOverridden || !info.isOverridden())
@@ -234,7 +234,7 @@ public class SettingsSet {
}
public void adjustOverrideState() {
- Set<String> set = new HashSet<String>();
+ Set<String> set = new HashSet<>();
SettingLevel level;
for (int i = 0; i < fLevels.length; i++) {
level = fLevels[i];
@@ -260,7 +260,7 @@ public class SettingsSet {
public ICLanguageSettingEntry[] getEntries(int types) {
adjustOverrideState();
- List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entries = new ArrayList<>();
for (SettingLevel sl : fLevels) {
if (isCompatible(sl, types))
getEntries(sl, entries);
@@ -366,7 +366,7 @@ public class SettingsSet {
}
public HashMap<EntryNameKey, Object[]> getEntryLevelMap(int types) {
- HashMap<EntryNameKey, Object[]> map = new HashMap<EntryNameKey, Object[]>();
+ HashMap<EntryNameKey, Object[]> map = new HashMap<>();
for (int i = 0; i < fLevels.length; i++) {
if (isCompatible(fLevels[i], types))
addLevelInfoToMap(fLevels[i], i, map);
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/ThreadLocalMap.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/ThreadLocalMap.java
index ff26ae88d3..a320320b14 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/ThreadLocalMap.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/ThreadLocalMap.java
@@ -17,7 +17,7 @@ import java.util.HashMap;
import java.util.Map;
public class ThreadLocalMap {
- private ThreadLocal<Map<Object, Object>> fLocal = new ThreadLocal<Map<Object, Object>>();
+ private ThreadLocal<Map<Object, Object>> fLocal = new ThreadLocal<>();
public Object get(Object key) {
Map<Object, Object> map = getMap(false);
@@ -45,7 +45,7 @@ public class ThreadLocalMap {
private Map<Object, Object> getMap(boolean create) {
Map<Object, Object> map = fLocal.get();
if (map == null && create) {
- map = new HashMap<Object, Object>();
+ map = new HashMap<>();
fLocal.set(map);
}
return map;
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/UserAndDiscoveredEntryDataSerializer.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/UserAndDiscoveredEntryDataSerializer.java
index 68fce9de84..b7a50c67ea 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/UserAndDiscoveredEntryDataSerializer.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/UserAndDiscoveredEntryDataSerializer.java
@@ -72,7 +72,7 @@ public class UserAndDiscoveredEntryDataSerializer extends CDataSerializer {
if (tmp != null) {
Set<String> set = lData.getDisabledSet(kind);
if (set == null)
- set = new HashSet<String>();
+ set = new HashSet<>();
set.add(tmp);
lData.setDisabledSet(kind, set);
}
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/UserAndDiscoveredEntryLanguageData.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/UserAndDiscoveredEntryLanguageData.java
index 99b0c68485..beb3bf3968 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/UserAndDiscoveredEntryLanguageData.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/UserAndDiscoveredEntryLanguageData.java
@@ -47,7 +47,7 @@ public abstract class UserAndDiscoveredEntryLanguageData extends EntryStorageBas
kind = kinds[i];
set = fDisabledNameSetStore.get(kind);
if (set != null) {
- set = new HashSet<String>(set);
+ set = new HashSet<>(set);
fDisabledNameSetStore.put(kind, set);
}
}
@@ -108,7 +108,7 @@ public abstract class UserAndDiscoveredEntryLanguageData extends EntryStorageBas
}
protected void removeInexistent(ICLanguageSettingEntry[] entries, Set<String> set) {
- Set<String> copy = new HashSet<String>(set);
+ Set<String> copy = new HashSet<>(set);
for (int i = 0; i < entries.length; i++) {
copy.remove(entries[i].getName());
}
@@ -123,7 +123,7 @@ public abstract class UserAndDiscoveredEntryLanguageData extends EntryStorageBas
}
protected void setDisabledDiscoveredNames(int kind, Set<String> disabledNameSet) {
- setDisabledSet(kind, disabledNameSet != null ? new HashSet<String>(disabledNameSet) : null);
+ setDisabledSet(kind, disabledNameSet != null ? new HashSet<>(disabledNameSet) : null);
}
protected Set<String> getDisabledSet(int kind) {
@@ -140,7 +140,7 @@ public abstract class UserAndDiscoveredEntryLanguageData extends EntryStorageBas
}
} else {
if (fDisabledNameSetStore == null)
- fDisabledNameSetStore = new KindBasedStore<Set<String>>();
+ fDisabledNameSetStore = new KindBasedStore<>();
fDisabledNameSetStore.put(kind, set);
}
}
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/UserAndDiscoveredEntryStorage.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/UserAndDiscoveredEntryStorage.java
index ce53616f1f..abec6f1dd3 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/UserAndDiscoveredEntryStorage.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/UserAndDiscoveredEntryStorage.java
@@ -71,7 +71,7 @@ public abstract class UserAndDiscoveredEntryStorage extends AbstractEntryStorage
level.addEntries(getUserEntries());
break;
case DISCOVERY_ENTRIES_LEVEL:
- HashSet<String> set = new HashSet<String>();
+ HashSet<String> set = new HashSet<>();
ICLanguageSettingEntry[] entries = getDiscoveredEntries(set);
level.addEntries(entries);
if (set.size() != 0)
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/XmlStorageElement.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/XmlStorageElement.java
index 300ab223a4..54ab28b1a5 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/XmlStorageElement.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/XmlStorageElement.java
@@ -39,7 +39,7 @@ public class XmlStorageElement implements ICStorageElement {
Element fElement;
private ICStorageElement fParent;
- private List<XmlStorageElement> fChildList = new ArrayList<XmlStorageElement>();
+ private List<XmlStorageElement> fChildList = new ArrayList<>();
private boolean fChildrenCreated;
private String[] fAttributeFilters;
private String[] fChildFilters;
@@ -355,7 +355,7 @@ public class XmlStorageElement implements ICStorageElement {
return false;
if (attrs.length != 0) {
- Set<String> set = new HashSet<String>(Arrays.asList(attrs));
+ Set<String> set = new HashSet<>(Arrays.asList(attrs));
set.removeAll(Arrays.asList(otherAttrs));
if (set.size() != 0)
return false;
@@ -397,7 +397,7 @@ public class XmlStorageElement implements ICStorageElement {
public String[] getAttributeNames() {
NamedNodeMap nodeMap = fElement.getAttributes();
int length = nodeMap.getLength();
- List<String> list = new ArrayList<String>(length);
+ List<String> list = new ArrayList<>(length);
for (int i = 0; i < length; i++) {
Node node = nodeMap.item(i);
String name = node.getNodeName();
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/language/LanguageMappingResolver.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/language/LanguageMappingResolver.java
index 7f6383920c..aa63835680 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/language/LanguageMappingResolver.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/language/LanguageMappingResolver.java
@@ -55,7 +55,7 @@ public class LanguageMappingResolver {
public static LanguageMapping[] computeLanguage(IProject project, String filePath,
ICConfigurationDescription configuration, String contentTypeId, boolean fetchAll) throws CoreException {
LanguageManager manager = LanguageManager.getInstance();
- List<LanguageMapping> inheritedLanguages = new LinkedList<LanguageMapping>();
+ List<LanguageMapping> inheritedLanguages = new LinkedList<>();
if (project != null) {
ProjectLanguageConfiguration mappings = manager.getLanguageConfiguration(project);
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/language/LanguageMappingStore.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/language/LanguageMappingStore.java
index 99238ff6e7..2d61d250bf 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/language/LanguageMappingStore.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/language/LanguageMappingStore.java
@@ -95,7 +95,7 @@ public class LanguageMappingStore {
}
private Map<String, Map<String, String>> decodeProjectContentTypeMappings(ICStorageElement rootElement) {
- Map<String, Map<String, String>> decodedMappings = new TreeMap<String, Map<String, String>>();
+ Map<String, Map<String, String>> decodedMappings = new TreeMap<>();
ICStorageElement[] mappingElements = rootElement.getChildrenByName(CONTENT_TYPE_MAPPING);
for (int j = 0; j < mappingElements.length; j++) {
ICStorageElement mapping = mappingElements[j];
@@ -103,7 +103,7 @@ public class LanguageMappingStore {
Map<String, String> contentTypeMappings = decodedMappings.get(configuration);
if (contentTypeMappings == null) {
- contentTypeMappings = new TreeMap<String, String>();
+ contentTypeMappings = new TreeMap<>();
decodedMappings.put(configuration, contentTypeMappings);
}
String contentType = mapping.getAttribute(ATTRIBUTE_CONTENT_TYPE);
@@ -122,7 +122,7 @@ public class LanguageMappingStore {
}
private Map<String, Map<String, String>> decodeFileMappings(ICStorageElement rootElement) throws CoreException {
- Map<String, Map<String, String>> decodedMappings = new TreeMap<String, Map<String, String>>();
+ Map<String, Map<String, String>> decodedMappings = new TreeMap<>();
ICStorageElement[] mappingElements = rootElement.getChildrenByName(FILE_MAPPING);
for (int j = 0; j < mappingElements.length; j++) {
ICStorageElement mapping = mappingElements[j];
@@ -130,7 +130,7 @@ public class LanguageMappingStore {
Map<String, String> configurationMappings = decodedMappings.get(path);
if (configurationMappings == null) {
- configurationMappings = new TreeMap<String, String>();
+ configurationMappings = new TreeMap<>();
decodedMappings.put(path, configurationMappings);
}
String configuration = mapping.getAttribute(ATTRIBUTE_CONFIGURATION);
@@ -141,7 +141,7 @@ public class LanguageMappingStore {
}
private Map<String, String> decodeMappings(Element rootElement, String category, String keyName, String valueName) {
- Map<String, String> decodedMappings = new TreeMap<String, String>();
+ Map<String, String> decodedMappings = new TreeMap<>();
NodeList mappingElements = rootElement.getElementsByTagName(category);
for (int j = 0; j < mappingElements.getLength(); j++) {
Element mapping = (Element) mappingElements.item(j);
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/language/settings/providers/LanguageSettingsDelta.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/language/settings/providers/LanguageSettingsDelta.java
index 5af2239927..60fb2fb8e8 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/language/settings/providers/LanguageSettingsDelta.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/language/settings/providers/LanguageSettingsDelta.java
@@ -64,7 +64,7 @@ public class LanguageSettingsDelta {
return paths;
}
- paths = new TreeSet<String>();
+ paths = new TreeSet<>();
LanguageSettingsStorage oldCombinedStorage = combineStorage(oldLanguageSettingsState);
LanguageSettingsStorage newCombinedStorage = combineStorage(newLanguageSettingsState);
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/language/settings/providers/LanguageSettingsExtensionManager.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/language/settings/providers/LanguageSettingsExtensionManager.java
index cf204c4383..2e3fae4694 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/language/settings/providers/LanguageSettingsExtensionManager.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/language/settings/providers/LanguageSettingsExtensionManager.java
@@ -68,7 +68,7 @@ public class LanguageSettingsExtensionManager {
* Extension providers loaded once and used for equality only.
* Those who request extension provider will get copy rather than real instance.
*/
- private static final LinkedHashMap<String, ILanguageSettingsProvider> fExtensionProviders = new LinkedHashMap<String, ILanguageSettingsProvider>();
+ private static final LinkedHashMap<String, ILanguageSettingsProvider> fExtensionProviders = new LinkedHashMap<>();
/**
* Providers loaded initially via static initializer.
@@ -85,7 +85,7 @@ public class LanguageSettingsExtensionManager {
* Load language settings providers contributed via the extension point.
*/
synchronized private static void loadProviderExtensions() {
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ List<ILanguageSettingsProvider> providers = new ArrayList<>();
loadProviderExtensions(Platform.getExtensionRegistry(), providers);
// sort by name - the providers defined via extensions are kept in separate list sorted by name
@@ -168,7 +168,7 @@ public class LanguageSettingsExtensionManager {
private static void configureExecutableProvider(ILanguageSettingsProvider provider, IConfigurationElement ce) {
String ceId = determineAttributeValue(ce, ATTR_ID);
String ceName = determineAttributeValue(ce, ATTR_NAME);
- Map<String, String> ceAttributes = new HashMap<String, String>();
+ Map<String, String> ceAttributes = new HashMap<>();
List<String> languages = null;
List<ICLanguageSettingEntry> entries = null;
@@ -182,7 +182,7 @@ public class LanguageSettingsExtensionManager {
String langId = determineAttributeValue(ceLang, ATTR_ID);
if (langId.length() > 0) {
if (languages == null) {
- languages = new ArrayList<String>();
+ languages = new ArrayList<>();
}
languages.add(langId);
}
@@ -206,7 +206,7 @@ public class LanguageSettingsExtensionManager {
entryValue, null, flags);
if (entries == null) {
- entries = new ArrayList<ICLanguageSettingEntry>();
+ entries = new ArrayList<>();
}
entries.add(entry);
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/language/settings/providers/LanguageSettingsProvidersSerializer.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/language/settings/providers/LanguageSettingsProvidersSerializer.java
index 41e9861f44..194f82d042 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/language/settings/providers/LanguageSettingsProvidersSerializer.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/language/settings/providers/LanguageSettingsProvidersSerializer.java
@@ -110,9 +110,9 @@ public class LanguageSettingsProvidersSerializer {
private static final String VALUE_COPY_OF_EXTENSION = "extension"; //$NON-NLS-1$
/** Cache of true (raw) workspace providers */
- private static Map<String, ILanguageSettingsProvider> rawGlobalWorkspaceProviders = new HashMap<String, ILanguageSettingsProvider>();
+ private static Map<String, ILanguageSettingsProvider> rawGlobalWorkspaceProviders = new HashMap<>();
/** Cache of workspace providers wrappers */
- private static Map<String, ILanguageSettingsProvider> globalWorkspaceProviders = new HashMap<String, ILanguageSettingsProvider>();
+ private static Map<String, ILanguageSettingsProvider> globalWorkspaceProviders = new HashMap<>();
private static ListenerList<ILanguageSettingsChangeListener> fLanguageSettingsChangeListeners = new ListenerList<>(
ListenerList.IDENTITY);
@@ -267,7 +267,7 @@ public class LanguageSettingsProvidersSerializer {
*/
private static class LanguageSettingsChangeEvent implements ILanguageSettingsChangeEvent {
private String projectName = null;
- private Map<String/*cfg*/, LanguageSettingsDelta> deltaMap = new HashMap<String, LanguageSettingsDelta>();
+ private Map<String/*cfg*/, LanguageSettingsDelta> deltaMap = new HashMap<>();
/**
* The act of creating event resets internal delta count in configuration state.
@@ -337,7 +337,7 @@ public class LanguageSettingsProvidersSerializer {
Set<String> paths = delta.getAffectedResourcePaths();
if (!paths.isEmpty()) {
IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
- Set<IResource> resources = new HashSet<IResource>();
+ Set<IResource> resources = new HashSet<>();
for (String path : paths) {
IResource rc = project.findMember(path);
if (rc != null) {
@@ -428,7 +428,7 @@ public class LanguageSettingsProvidersSerializer {
* is passed user defined providers are cleared.
*/
private static void setWorkspaceProvidersInternal(List<ILanguageSettingsProvider> providers) {
- Map<String, ILanguageSettingsProvider> rawNewProviders = new HashMap<String, ILanguageSettingsProvider>();
+ Map<String, ILanguageSettingsProvider> rawNewProviders = new HashMap<>();
// add given providers
if (providers != null) {
@@ -513,9 +513,9 @@ public class LanguageSettingsProvidersSerializer {
*/
private static List<LanguageSettingsChangeEvent> createLanguageSettingsChangeEvents(
List<ILanguageSettingsBroadcastingProvider> providers) {
- List<LanguageSettingsChangeEvent> events = new ArrayList<LanguageSettingsChangeEvent>();
+ List<LanguageSettingsChangeEvent> events = new ArrayList<>();
- List<String> providerIds = new ArrayList<String>();
+ List<String> providerIds = new ArrayList<>();
for (ILanguageSettingsBroadcastingProvider provider : providers) {
providerIds.add(provider.getId());
}
@@ -552,8 +552,8 @@ public class LanguageSettingsProvidersSerializer {
*/
public static void serializeLanguageSettingsWorkspace() throws CoreException {
URI uriStoreWsp = getStoreInWorkspaceArea(STORAGE_WORKSPACE_LANGUAGE_SETTINGS);
- List<ILanguageSettingsBroadcastingProvider> broadcastingWorkspaceProviders = new ArrayList<ILanguageSettingsBroadcastingProvider>();
- List<LanguageSettingsSerializableProvider> serializingWorkspaceProviders = new ArrayList<LanguageSettingsSerializableProvider>();
+ List<ILanguageSettingsBroadcastingProvider> broadcastingWorkspaceProviders = new ArrayList<>();
+ List<LanguageSettingsSerializableProvider> serializingWorkspaceProviders = new ArrayList<>();
for (ILanguageSettingsProvider provider : rawGlobalWorkspaceProviders.values()) {
if (provider instanceof ILanguageSettingsBroadcastingProvider) {
broadcastingWorkspaceProviders.add((ILanguageSettingsBroadcastingProvider) provider);
@@ -687,8 +687,8 @@ public class LanguageSettingsProvidersSerializer {
Element rootElement = doc.getDocumentElement();
NodeList providerNodes = rootElement.getElementsByTagName(ELEM_PROVIDER);
- List<String> userDefinedProvidersIds = new ArrayList<String>(providerNodes.getLength());
- providers = new ArrayList<ILanguageSettingsProvider>(providerNodes.getLength());
+ List<String> userDefinedProvidersIds = new ArrayList<>(providerNodes.getLength());
+ providers = new ArrayList<>(providerNodes.getLength());
for (int i = 0; i < providerNodes.getLength(); i++) {
Node providerNode = providerNodes.item(i);
@@ -1019,7 +1019,7 @@ public class LanguageSettingsProvidersSerializer {
continue;
}
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ List<ILanguageSettingsProvider> providers = new ArrayList<>();
String cfgId = XmlUtil.determineAttributeValue(cfgNode, ATTR_ID);
NodeList extensionNodes = cfgNode.getChildNodes();
@@ -1208,7 +1208,7 @@ public class LanguageSettingsProvidersSerializer {
String[] ids = ((ILanguageSettingsProvidersKeeper) cfgDescription)
.getDefaultLanguageSettingsProvidersIds();
if (ids != null) {
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>(
+ List<ILanguageSettingsProvider> providers = new ArrayList<>(
ids.length);
for (String id : ids) {
if (LanguageSettingsExtensionManager.isPreferShared(id)) {
@@ -1267,7 +1267,7 @@ public class LanguageSettingsProvidersSerializer {
* @return list of workspace providers.
*/
public static List<ILanguageSettingsProvider> getWorkspaceProviders() {
- ArrayList<ILanguageSettingsProvider> workspaceProviders = new ArrayList<ILanguageSettingsProvider>();
+ ArrayList<ILanguageSettingsProvider> workspaceProviders = new ArrayList<>();
for (ILanguageSettingsProvider rawProvider : rawGlobalWorkspaceProviders.values()) {
workspaceProviders.add(getWorkspaceProvider(rawProvider.getId()));
}
@@ -1317,7 +1317,7 @@ public class LanguageSettingsProvidersSerializer {
* for a given project description - collecting from all configurations.
*/
private static List<ICListenerAgent> getListeners(ICProjectDescription prjDescription) {
- List<ICListenerAgent> listeners = new ArrayList<ICListenerAgent>();
+ List<ICListenerAgent> listeners = new ArrayList<>();
if (prjDescription != null) {
for (ICConfigurationDescription cfgDescription : prjDescription.getConfigurations()) {
if (cfgDescription instanceof ILanguageSettingsProvidersKeeper) {
@@ -1341,7 +1341,7 @@ public class LanguageSettingsProvidersSerializer {
* Pick from the list providers which are listeners, i.e. instances of type {@link ICListenerAgent}.
*/
private static List<ICListenerAgent> selectListeners(Collection<ILanguageSettingsProvider> values) {
- List<ICListenerAgent> listeners = new ArrayList<ICListenerAgent>();
+ List<ICListenerAgent> listeners = new ArrayList<>();
for (ILanguageSettingsProvider provider : values) {
if (provider instanceof ICListenerAgent)
listeners.add((ICListenerAgent) provider);
@@ -1354,7 +1354,7 @@ public class LanguageSettingsProvidersSerializer {
* for a given project description - collecting from all configurations.
*/
private static List<ListenerAssociation> getListenersAssociations(ICProjectDescription prjDescription) {
- List<ListenerAssociation> associations = new ArrayList<ListenerAssociation>();
+ List<ListenerAssociation> associations = new ArrayList<>();
if (prjDescription != null) {
for (ICConfigurationDescription cfgDescription : prjDescription.getConfigurations()) {
if (cfgDescription instanceof ILanguageSettingsProvidersKeeper) {
@@ -1552,8 +1552,8 @@ public class LanguageSettingsProvidersSerializer {
return null;
}
- List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
- List<String> alreadyAdded = new ArrayList<String>();
+ List<ICLanguageSettingEntry> entries = new ArrayList<>();
+ List<String> alreadyAdded = new ArrayList<>();
List<ILanguageSettingsProvider> providers = ((ILanguageSettingsProvidersKeeper) cfgDescription)
.getLanguageSettingProviders();
@@ -1657,7 +1657,7 @@ public class LanguageSettingsProvidersSerializer {
* @return newly cloned list.
*/
public static List<ILanguageSettingsProvider> cloneProviders(List<ILanguageSettingsProvider> baseProviders) {
- List<ILanguageSettingsProvider> newProviders = new ArrayList<ILanguageSettingsProvider>();
+ List<ILanguageSettingsProvider> newProviders = new ArrayList<>();
for (ILanguageSettingsProvider provider : baseProviders) {
if (provider instanceof ILanguageSettingsEditableProvider) {
ILanguageSettingsEditableProvider newProvider = LanguageSettingsManager
@@ -1668,7 +1668,7 @@ public class LanguageSettingsProvidersSerializer {
}
newProviders.add(provider);
}
- return new ArrayList<ILanguageSettingsProvider>(newProviders);
+ return new ArrayList<>(newProviders);
}
}
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/language/settings/providers/LanguageSettingsScannerInfoProvider.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/language/settings/providers/LanguageSettingsScannerInfoProvider.java
index 5260c67aa4..f19a013f9c 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/language/settings/providers/LanguageSettingsScannerInfoProvider.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/language/settings/providers/LanguageSettingsScannerInfoProvider.java
@@ -94,11 +94,11 @@ public class LanguageSettingsScannerInfoProvider implements IScannerInfoProvider
return DUMMY_SCANNER_INFO;
}
- LinkedHashSet<ICLanguageSettingEntry> includePathEntries = new LinkedHashSet<ICLanguageSettingEntry>();
- LinkedHashSet<ICLanguageSettingEntry> includePathLocalEntries = new LinkedHashSet<ICLanguageSettingEntry>();
- LinkedHashSet<ICLanguageSettingEntry> includeFileEntries = new LinkedHashSet<ICLanguageSettingEntry>();
- LinkedHashSet<ICLanguageSettingEntry> macroFileEntries = new LinkedHashSet<ICLanguageSettingEntry>();
- LinkedHashSet<ICLanguageSettingEntry> macroEntries = new LinkedHashSet<ICLanguageSettingEntry>();
+ LinkedHashSet<ICLanguageSettingEntry> includePathEntries = new LinkedHashSet<>();
+ LinkedHashSet<ICLanguageSettingEntry> includePathLocalEntries = new LinkedHashSet<>();
+ LinkedHashSet<ICLanguageSettingEntry> includeFileEntries = new LinkedHashSet<>();
+ LinkedHashSet<ICLanguageSettingEntry> macroFileEntries = new LinkedHashSet<>();
+ LinkedHashSet<ICLanguageSettingEntry> macroEntries = new LinkedHashSet<>();
for (String langId : languageIds) {
List<ICLanguageSettingEntry> incSys = LanguageSettingsProvidersSerializer
@@ -127,7 +127,7 @@ public class LanguageSettingsScannerInfoProvider implements IScannerInfoProvider
String[] includeFiles = convertToLocations(includeFileEntries, cfgDescription);
String[] macroFiles = convertToLocations(macroFileEntries, cfgDescription);
- Map<String, String> definedMacros = new HashMap<String, String>();
+ Map<String, String> definedMacros = new HashMap<>();
for (ICLanguageSettingEntry entry : macroEntries) {
ICMacroEntry macroEntry = (ICMacroEntry) entry;
String name = macroEntry.getName();
@@ -252,7 +252,7 @@ public class LanguageSettingsScannerInfoProvider implements IScannerInfoProvider
*/
private String[] convertToLocations(LinkedHashSet<ICLanguageSettingEntry> entriesPath,
ICConfigurationDescription cfgDescription) {
- List<String> locations = new ArrayList<String>(entriesPath.size());
+ List<String> locations = new ArrayList<>(entriesPath.size());
for (ICLanguageSettingEntry entry : entriesPath) {
ICPathEntry entryPath = (ICPathEntry) entry;
if (entryPath.isValueWorkspacePath()) {
@@ -321,7 +321,7 @@ public class LanguageSettingsScannerInfoProvider implements IScannerInfoProvider
IProject project = resource.getProject();
List<IScannerInfoChangeListener> list = listenersMap.get(project);
if (list == null) {
- list = new Vector<IScannerInfoChangeListener>();
+ list = new Vector<>();
listenersMap.put(project, list);
}
if (!list.contains(listener)) {
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/language/settings/providers/LanguageSettingsSerializableStorage.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/language/settings/providers/LanguageSettingsSerializableStorage.java
index 8beadf3880..f022e47201 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/language/settings/providers/LanguageSettingsSerializableStorage.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/language/settings/providers/LanguageSettingsSerializableStorage.java
@@ -114,7 +114,7 @@ public class LanguageSettingsSerializableStorage extends LanguageSettingsStorage
* @param providerNode - parent XML element "provider" where entries are defined.
*/
public void loadEntries(Element providerNode) {
- List<ICLanguageSettingEntry> settings = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> settings = new ArrayList<>();
NodeList nodes = providerNode.getChildNodes();
for (int i = 0; i < nodes.getLength(); i++) {
Node elementNode = nodes.item(i);
@@ -176,7 +176,7 @@ public class LanguageSettingsSerializableStorage extends LanguageSettingsStorage
langId = null;
}
- List<ICLanguageSettingEntry> settings = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> settings = new ArrayList<>();
NodeList nodes = parentNode.getChildNodes();
for (int i = 0; i < nodes.getLength(); i++) {
Node elementNode = nodes.item(i);
@@ -204,7 +204,7 @@ public class LanguageSettingsSerializableStorage extends LanguageSettingsStorage
private void loadResourceElement(Node parentNode, String cfgId, String langId) {
String rcProjectPath = XmlUtil.determineAttributeValue(parentNode, ATTR_PROJECT_PATH);
- List<ICLanguageSettingEntry> settings = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> settings = new ArrayList<>();
NodeList nodes = parentNode.getChildNodes();
for (int i = 0; i < nodes.getLength(); i++) {
Node elementNode = nodes.item(i);
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/language/settings/providers/PathEntryScannerInfoLanguageSettingsProvider.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/language/settings/providers/PathEntryScannerInfoLanguageSettingsProvider.java
index 7bf729f006..0c10b45932 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/language/settings/providers/PathEntryScannerInfoLanguageSettingsProvider.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/language/settings/providers/PathEntryScannerInfoLanguageSettingsProvider.java
@@ -69,10 +69,10 @@ public class PathEntryScannerInfoLanguageSettingsProvider extends LanguageSettin
IPath projectPath = cproject.getPath();
// using map of sets to support specific ordering of entries
- LinkedHashMap<Integer, Set<IPathEntry>> pathEntriesMap = new LinkedHashMap<Integer, Set<IPathEntry>>();
+ LinkedHashMap<Integer, Set<IPathEntry>> pathEntriesMap = new LinkedHashMap<>();
pathEntriesMap.put(IPathEntry.CDT_INCLUDE, new LinkedHashSet<IPathEntry>());
// keep macros sorted
- pathEntriesMap.put(IPathEntry.CDT_MACRO, new TreeSet<IPathEntry>(new Comparator<IPathEntry>() {
+ pathEntriesMap.put(IPathEntry.CDT_MACRO, new TreeSet<>(new Comparator<IPathEntry>() {
@Override
public int compare(IPathEntry macro1, IPathEntry macro2) {
if (macro1 instanceof IMacroEntry && macro2 instanceof IMacroEntry) {
@@ -120,7 +120,7 @@ public class PathEntryScannerInfoLanguageSettingsProvider extends LanguageSettin
CCorePlugin.log(e);
}
- Set<ICLanguageSettingEntry> lsEntries = new LinkedHashSet<ICLanguageSettingEntry>();
+ Set<ICLanguageSettingEntry> lsEntries = new LinkedHashSet<>();
for (Entry<Integer, Set<IPathEntry>> entrySet : pathEntriesMap.entrySet()) {
Set<IPathEntry> pathEntries = entrySet.getValue();
for (IPathEntry pathEntry : pathEntries) {
@@ -131,7 +131,7 @@ public class PathEntryScannerInfoLanguageSettingsProvider extends LanguageSettin
}
}
- return LanguageSettingsSerializableStorage.getPooledList(new ArrayList<ICLanguageSettingEntry>(lsEntries));
+ return LanguageSettingsSerializableStorage.getPooledList(new ArrayList<>(lsEntries));
}
private void collectPathEntry(LinkedHashMap<Integer, Set<IPathEntry>> pathEntriesMap, IPath projectPath,
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/language/settings/providers/ReferencedProjectsLanguageSettingsProvider.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/language/settings/providers/ReferencedProjectsLanguageSettingsProvider.java
index ccb4a97247..7a6f688bbc 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/language/settings/providers/ReferencedProjectsLanguageSettingsProvider.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/language/settings/providers/ReferencedProjectsLanguageSettingsProvider.java
@@ -61,7 +61,7 @@ public class ReferencedProjectsLanguageSettingsProvider extends LanguageSettings
try {
recursiveCallIndicator.set(true);
- List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entries = new ArrayList<>();
ICConfigurationDescription[] refCfgDescriptions = CoreModelUtil
.getReferencedConfigurationDescriptions(cfgDescription, false);
for (ICConfigurationDescription refCfgDescription : refCfgDescriptions) {
@@ -78,7 +78,7 @@ public class ReferencedProjectsLanguageSettingsProvider extends LanguageSettings
}
}
- return LanguageSettingsStorage.getPooledList(new ArrayList<ICLanguageSettingEntry>(entries));
+ return LanguageSettingsStorage.getPooledList(new ArrayList<>(entries));
} finally {
recursiveCallIndicator.set(false);
}
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/language/settings/providers/ScannerInfoExtensionLanguageSettingsProvider.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/language/settings/providers/ScannerInfoExtensionLanguageSettingsProvider.java
index c5bcf874bc..408b8e152a 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/language/settings/providers/ScannerInfoExtensionLanguageSettingsProvider.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/language/settings/providers/ScannerInfoExtensionLanguageSettingsProvider.java
@@ -42,7 +42,7 @@ public class ScannerInfoExtensionLanguageSettingsProvider extends LanguageSettin
@Override
public List<ICLanguageSettingEntry> getSettingEntries(ICConfigurationDescription cfgDescription, IResource rc,
String languageId) {
- List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entries = new ArrayList<>();
IScannerInfoProvider scannerInfoProvider = getScannerInfoProvider(cfgDescription);
if (scannerInfoProvider != null) {
IScannerInfo si = scannerInfoProvider.getScannerInformation(rc);
@@ -128,7 +128,7 @@ public class ScannerInfoExtensionLanguageSettingsProvider extends LanguageSettin
private void addDefinedSymbols(List<ICLanguageSettingEntry> entries, IScannerInfo si) {
Map<String, String> definedSymbols = si.getDefinedSymbols();
if (definedSymbols != null) {
- for (Entry<String, String> entry : new TreeMap<String, String>(definedSymbols).entrySet()) {
+ for (Entry<String, String> entry : new TreeMap<>(definedSymbols).entrySet()) {
String name = entry.getKey();
String value = entry.getValue();
entries.add(CDataUtil.createCMacroEntry(name, value, 0));
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/APathEntry.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/APathEntry.java
index cc70db9410..f2ad6204b4 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/APathEntry.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/APathEntry.java
@@ -108,8 +108,8 @@ public abstract class APathEntry extends PathEntry {
return false;
}
- Set<String> excludeSet = new HashSet<String>();
- Set<String> otherSet = new HashSet<String>();
+ Set<String> excludeSet = new HashSet<>();
+ Set<String> otherSet = new HashSet<>();
for (int i = 0; i < excludeLength; i++) {
if (exclusionPatterns[i] != otherExcludes[i]) {
// compare toStrings instead of IPaths
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/AsmModelBuilder.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/AsmModelBuilder.java
index ac29cacc6d..8ee6b8a08c 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/AsmModelBuilder.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/AsmModelBuilder.java
@@ -61,7 +61,7 @@ public class AsmModelBuilder implements IContributedModelBuilder {
private static final Map<String, AsmDirective> fgDirectives;
static {
- fgDirectives = new HashMap<String, AsmDirective>();
+ fgDirectives = new HashMap<>();
fgDirectives.put("globl", AsmDirective.GLOBAL); //$NON-NLS-1$
fgDirectives.put("global", AsmDirective.GLOBAL); //$NON-NLS-1$
fgDirectives.put("ascii", AsmDirective.DATA); //$NON-NLS-1$
@@ -124,8 +124,8 @@ public class AsmModelBuilder implements IContributedModelBuilder {
* @throws CModelException
*/
private void buildModel(final char[] source) throws CModelException {
- fGlobals = new HashMap<String, Counter>();
- fLabels = new HashMap<String, Counter>();
+ fGlobals = new HashMap<>();
+ fLabels = new HashMap<>();
fLastLabel = null;
fLastGlobalLabel = null;
fLastLabelEndOffset = 0;
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/Binary.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/Binary.java
index a05d15d106..7c4df0ef18 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/Binary.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/Binary.java
@@ -283,7 +283,7 @@ public class Binary extends Openable implements IBinary {
boolean computeChildren(OpenableInfo info, IResource res) throws CModelException {
boolean ok = false;
if (isObject() || isExecutable() || isSharedLib()) {
- Map<IPath, BinaryModule> hash = new HashMap<IPath, BinaryModule>();
+ Map<IPath, BinaryModule> hash = new HashMap<>();
IBinaryObject obj = getBinaryObject();
if (obj != null) {
// First check if we can get the list of source
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/BinaryContainer.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/BinaryContainer.java
index 1937853448..291a9eaa18 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/BinaryContainer.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/BinaryContainer.java
@@ -45,7 +45,7 @@ public class BinaryContainer extends Openable implements IBinaryContainer {
public IBinary[] getBinaries() throws CModelException {
sync();
ICElement[] e = getChildren();
- ArrayList<IBinary> list = new ArrayList<IBinary>(e.length);
+ ArrayList<IBinary> list = new ArrayList<>(e.length);
for (ICElement element : e) {
if (element instanceof IBinary) {
IBinary bin = (IBinary) element;
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/Buffer.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/Buffer.java
index c88a7cd7eb..ca6e39bc08 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/Buffer.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/Buffer.java
@@ -67,7 +67,7 @@ public class Buffer implements IBuffer {
@Override
public void addBufferChangedListener(IBufferChangedListener listener) {
if (this.changeListeners == null) {
- this.changeListeners = new ArrayList<IBufferChangedListener>(5);
+ this.changeListeners = new ArrayList<>(5);
}
if (!this.changeListeners.contains(listener)) {
this.changeListeners.add(listener);
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/BufferManager.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/BufferManager.java
index 8af4399b4b..5b43c3f64d 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/BufferManager.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/BufferManager.java
@@ -68,7 +68,7 @@ public class BufferManager implements IBufferFactory {
*/
@Override
protected OverflowingLRUCache<K, IBuffer> newInstance(int size, int overflow) {
- return new BufferCache<K>(size, overflow);
+ return new BufferCache<>(size, overflow);
}
}
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CContainerInfo.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CContainerInfo.java
index c4cc163d82..ebf9aca82d 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CContainerInfo.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CContainerInfo.java
@@ -46,7 +46,7 @@ public class CContainerInfo extends OpenableInfo {
if (nonCResources != null)
return nonCResources;
- ArrayList<IResource> notChildren = new ArrayList<IResource>();
+ ArrayList<IResource> notChildren = new ArrayList<>();
ICElement celement = getElement();
ICProject cproject = celement.getCProject();
// move back to the sourceroot.
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CElement.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CElement.java
index c6dc5c8860..00e7fce0bf 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CElement.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CElement.java
@@ -172,7 +172,7 @@ public abstract class CElement extends PlatformObject implements ICElement {
*/
protected ICElement[] getSourceElementsAtOffset(int offset) throws CModelException {
if (this instanceof ISourceReference && this instanceof Parent) {
- ArrayList<Object> list = new ArrayList<Object>();
+ ArrayList<Object> list = new ArrayList<>();
ICElement[] children = ((Parent) this).getChildren();
for (ICElement aChild : children) {
if (aChild instanceof ISourceReference) {
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CElementDelta.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CElementDelta.java
index 0e97ccaa5d..46867c6aaf 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CElementDelta.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CElementDelta.java
@@ -356,7 +356,7 @@ public class CElementDelta implements ICElementDelta {
if (parent == null) {
return null;
}
- ArrayList<ICElement> parents = new ArrayList<ICElement>();
+ ArrayList<ICElement> parents = new ArrayList<>();
while (!parent.equals(fChangedElement)) {
parents.add(parent);
parent = parent.getParent();
@@ -384,7 +384,7 @@ public class CElementDelta implements ICElementDelta {
if (length == 0) {
return new ICElementDelta[] {};
}
- ArrayList<ICElementDelta> children = new ArrayList<ICElementDelta>(length);
+ ArrayList<ICElementDelta> children = new ArrayList<>(length);
for (int i = 0; i < length; i++) {
if (fAffectedChildren[i].getKind() == type) {
children.add(fAffectedChildren[i]);
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CElementDeltaBuilder.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CElementDeltaBuilder.java
index f5b2b3a6e2..8fdfe6f64c 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CElementDeltaBuilder.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CElementDeltaBuilder.java
@@ -245,9 +245,9 @@ public class CElementDeltaBuilder {
}
private void initialize() {
- this.infos = new HashMap<ICElement, CElementInfo>(20);
- this.oldPositions = new HashMap<ICElement, ListItem>(20);
- this.newPositions = new HashMap<ICElement, ListItem>(20);
+ this.infos = new HashMap<>(20);
+ this.oldPositions = new HashMap<>(20);
+ this.newPositions = new HashMap<>(20);
this.putOldPosition(this.cElement, new ListItem(null, null));
this.putNewPosition(this.cElement, new ListItem(null, null));
this.delta = new CElementDelta(cElement);
@@ -258,8 +258,8 @@ public class CElementDeltaBuilder {
this.delta.fineGrained();
}
- this.added = new ArrayList<ICElement>(5);
- this.removed = new ArrayList<ICElement>(5);
+ this.added = new ArrayList<>(5);
+ this.removed = new ArrayList<>(5);
}
/**
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CElementInfo.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CElementInfo.java
index 0e4666f334..8e0e70f69e 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CElementInfo.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CElementInfo.java
@@ -51,7 +51,7 @@ public class CElementInfo {
protected CElementInfo(CElement element) {
this.element = element;
// Array list starts with size = 0
- fChildren = new Vector<ICElement>(0);
+ fChildren = new Vector<>(0);
}
protected CElement getElement() {
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CModelBuilder2.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CModelBuilder2.java
index 4974e7f6b7..a8749c1b25 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CModelBuilder2.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CModelBuilder2.java
@@ -206,8 +206,8 @@ public class CModelBuilder2 implements IContributedModelBuilder {
* @throws DOMException
*/
private void buildModel(IASTTranslationUnit ast) throws CModelException, DOMException {
- fVisibilityStack = new Stack<ASTAccessVisibility>();
- fEqualElements = new HashMap<ISourceReference, int[]>();
+ fVisibilityStack = new Stack<>();
+ fEqualElements = new HashMap<>();
// includes
final IASTPreprocessorIncludeStatement[] includeDirectives = ast.getIncludeDirectives();
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CModelCache.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CModelCache.java
index 53203d6561..0e365f14c1 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CModelCache.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CModelCache.java
@@ -52,10 +52,10 @@ public class CModelCache {
protected Map<ICElement, Object> childrenCache;
public CModelCache() {
- this.projectAndRootCache = new HashMap<ICElement, Object>(PROJ_CACHE_SIZE);
- this.folderCache = new HashMap<ICElement, Object>(FOLDER_CACHE_SIZE);
- this.fileCache = new ElementCache<Object>(FILE_CACHE_SIZE);
- this.childrenCache = new HashMap<ICElement, Object>(CHILDREN_CACHE_SIZE); // average 20 children per openable
+ this.projectAndRootCache = new HashMap<>(PROJ_CACHE_SIZE);
+ this.folderCache = new HashMap<>(FOLDER_CACHE_SIZE);
+ this.fileCache = new ElementCache<>(FILE_CACHE_SIZE);
+ this.childrenCache = new HashMap<>(CHILDREN_CACHE_SIZE); // average 20 children per openable
}
public double openableFillingRatio() {
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CModelOperation.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CModelOperation.java
index 7630adaf62..d84956234b 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CModelOperation.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CModelOperation.java
@@ -110,7 +110,7 @@ public abstract class CModelOperation implements IWorkspaceRunnable, IProgressMo
/*
* A per thread stack of java model operations (PerThreadObject of ArrayList).
*/
- protected final static ThreadLocal<ArrayList<CModelOperation>> operationStacks = new ThreadLocal<ArrayList<CModelOperation>>();
+ protected final static ThreadLocal<ArrayList<CModelOperation>> operationStacks = new ThreadLocal<>();
protected CModelOperation() {
}
@@ -170,7 +170,7 @@ public abstract class CModelOperation implements IWorkspaceRunnable, IProgressMo
*/
protected void addDelta(ICElementDelta delta) {
if (fDeltas == null)
- fDeltas = new LinkedList<ICElementDelta>();
+ fDeltas = new LinkedList<>();
fDeltas.add(delta);
}
@@ -558,7 +558,7 @@ public abstract class CModelOperation implements IWorkspaceRunnable, IProgressMo
protected ArrayList<CModelOperation> getCurrentOperationStack() {
ArrayList<CModelOperation> stack = operationStacks.get();
if (stack == null) {
- stack = new ArrayList<CModelOperation>();
+ stack = new ArrayList<>();
operationStacks.set(stack);
}
return stack;
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CProject.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CProject.java
index fac227a15c..102c888304 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CProject.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CProject.java
@@ -280,7 +280,7 @@ public class CProject extends Openable implements ICProject {
@Override
public Map<String, String> getOptions(boolean inheritCCoreOptions) {
// initialize to the defaults from CCorePlugin options pool
- Map<String, String> options = inheritCCoreOptions ? CCorePlugin.getOptions() : new HashMap<String, String>(5);
+ Map<String, String> options = inheritCCoreOptions ? CCorePlugin.getOptions() : new HashMap<>(5);
IEclipsePreferences preferences = getPreferences();
if (preferences == null)
@@ -629,7 +629,7 @@ public class CProject extends Openable implements ICProject {
protected boolean computeChildren(OpenableInfo info, IResource res) throws CModelException {
List<ISourceRoot> sourceRoots = computeSourceRoots();
- List<ICContainer> children = new ArrayList<ICContainer>(sourceRoots.size());
+ List<ICContainer> children = new ArrayList<>(sourceRoots.size());
children.addAll(sourceRoots);
boolean projectIsSourceRoot = false;
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CProjectInfo.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CProjectInfo.java
index 82c4d57b86..81e121da42 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CProjectInfo.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CProjectInfo.java
@@ -72,7 +72,7 @@ class CProjectInfo extends OpenableInfo {
if (nonCResources != null)
return nonCResources;
- List<IResource> notChildren = new ArrayList<IResource>();
+ List<IResource> notChildren = new ArrayList<>();
try {
if (res instanceof IContainer) {
ICProject cproject = getElement().getCProject();
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/ContentTypeProcessor.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/ContentTypeProcessor.java
index b4c0c6c49a..66016df44a 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/ContentTypeProcessor.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/ContentTypeProcessor.java
@@ -324,7 +324,7 @@ public class ContentTypeProcessor extends CModelOperation {
}
}
// Assume a workspace resolver
- List<ICProject> list = new ArrayList<ICProject>(cprojects.length);
+ List<ICProject> list = new ArrayList<>(cprojects.length);
for (int i = 0; i < cprojects.length; ++i) {
list.add(cprojects[i]);
}
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CopyResourceElementsOperation.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CopyResourceElementsOperation.java
index dd8b8584ea..a3f1f420af 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CopyResourceElementsOperation.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CopyResourceElementsOperation.java
@@ -60,7 +60,7 @@ public class CopyResourceElementsOperation extends MultiOperation {
* copied/moved/renamed. Keyed by elements' project(s), and
* values are the corresponding deltas.
*/
- protected Map<ICProject, CElementDelta> fDeltasPerProject = new HashMap<ICProject, CElementDelta>(1);
+ protected Map<ICProject, CElementDelta> fDeltasPerProject = new HashMap<>(1);
public CopyResourceElementsOperation(ICElement[] src, ICElement[] dst, boolean force) {
super(src, dst, force);
@@ -208,7 +208,7 @@ public class CopyResourceElementsOperation extends MultiOperation {
*/
@Override
protected void processElements() throws CModelException {
- fCreatedElements = new ArrayList<ICElement>(fElementsToProcess.length);
+ fCreatedElements = new ArrayList<>(fElementsToProcess.length);
try {
super.processElements();
} catch (CModelException cme) {
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/DefaultPathEntryStore.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/DefaultPathEntryStore.java
index 883e0633c2..a1f6ebd2cd 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/DefaultPathEntryStore.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/DefaultPathEntryStore.java
@@ -91,7 +91,7 @@ public class DefaultPathEntryStore implements IPathEntryStore, ICDescriptorListe
public IPathEntry[] getRawPathEntries() throws CoreException {
ICDescriptor cdesc = CCorePlugin.getDefault().getCProjectDescription(fProject, false);
if (cdesc != null) {
- ArrayList<IPathEntry> pathEntries = new ArrayList<IPathEntry>();
+ ArrayList<IPathEntry> pathEntries = new ArrayList<>();
ICStorageElement entry = cdesc.getProjectStorageElement(PATH_ENTRY_ID);
for (ICStorageElement childNode : entry.getChildrenByName(PATH_ENTRY))
pathEntries.add(decodePathEntry(fProject, childNode));
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/DeleteElementsOperation.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/DeleteElementsOperation.java
index 0358ac92ef..dabe76562c 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/DeleteElementsOperation.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/DeleteElementsOperation.java
@@ -65,7 +65,7 @@ public class DeleteElementsOperation extends MultiOperation {
* duplicates specified in elements to be processed.
*/
protected void groupElements() throws CModelException {
- fChildrenToRemove = new HashMap<ITranslationUnit, IRegion>(1);
+ fChildrenToRemove = new HashMap<>(1);
int uniqueTUs = 0;
for (ICElement e : fElementsToProcess) {
ITranslationUnit tu = getTranslationUnitFor(e);
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/ElementCache.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/ElementCache.java
index 7a05694c60..6e92a8040c 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/ElementCache.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/ElementCache.java
@@ -64,6 +64,6 @@ public class ElementCache<T> extends OverflowingLRUCache<IOpenable, T> {
*/
@Override
protected OverflowingLRUCache<IOpenable, T> newInstance(int size, int overflow) {
- return new ElementCache<T>(size, overflow);
+ return new ElementCache<>(size, overflow);
}
}
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/IncludeReference.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/IncludeReference.java
index 7234d0cbd6..c9b0e3960d 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/IncludeReference.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/IncludeReference.java
@@ -117,7 +117,7 @@ public class IncludeReference extends Openable implements IIncludeReference {
* @see org.eclipse.cdt.internal.core.model.CContainer#computeChildren(org.eclipse.cdt.internal.core.model.OpenableInfo, org.eclipse.core.resources.IResource)
*/
protected boolean computeChildren(OpenableInfo info, IProgressMonitor pm, IResource res) throws CModelException {
- ArrayList<ICElement> vChildren = new ArrayList<ICElement>();
+ ArrayList<ICElement> vChildren = new ArrayList<>();
IPath filePath = null;
if (fPath != null) {
filePath = fPath;
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/MultiOperation.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/MultiOperation.java
index 59d8fda1cf..4e81eee74b 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/MultiOperation.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/MultiOperation.java
@@ -55,7 +55,7 @@ public abstract class MultiOperation extends CModelOperation {
* values are the corresponding insertion point.
* @see #processElements()
*/
- protected Map<ICElement, ICElement> fInsertBeforeElements = new HashMap<ICElement, ICElement>(1);
+ protected Map<ICElement, ICElement> fInsertBeforeElements = new HashMap<>(1);
/**
* This table presents the data in <code>fRenamingList</code> in a more
@@ -68,7 +68,7 @@ public abstract class MultiOperation extends CModelOperation {
*/
protected MultiOperation(ICElement[] elementsToProcess, ICElement[] parentElements, boolean force) {
super(elementsToProcess, parentElements, force);
- fParentElements = new HashMap<ICElement, ICElement>(elementsToProcess.length);
+ fParentElements = new HashMap<>(elementsToProcess.length);
if (elementsToProcess.length == parentElements.length) {
for (int i = 0; i < elementsToProcess.length; i++) {
fParentElements.put(elementsToProcess[i], parentElements[i]);
@@ -142,7 +142,7 @@ public abstract class MultiOperation extends CModelOperation {
*/
private void initializeRenamings() {
if (fRenamingsList != null && fRenamingsList.length == fElementsToProcess.length) {
- fRenamings = new HashMap<ICElement, String>(fRenamingsList.length);
+ fRenamings = new HashMap<>(fRenamingsList.length);
for (int i = 0; i < fRenamingsList.length; i++) {
if (fRenamingsList[i] != null) {
fRenamings.put(fElementsToProcess[i], fRenamingsList[i]);
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/Parent.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/Parent.java
index 5b41d0e7d6..d0e17faee2 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/Parent.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/Parent.java
@@ -68,7 +68,7 @@ public abstract class Parent extends CElement {
public List<ICElement> getChildrenOfType(int type) throws CModelException {
ICElement[] children = getChildren();
int size = children.length;
- ArrayList<ICElement> list = new ArrayList<ICElement>(size);
+ ArrayList<ICElement> list = new ArrayList<>(size);
for (int i = 0; i < size; ++i) {
CElement elt = (CElement) children[i];
if (elt.getElementType() == type) {
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/PathEntryContainerUpdatesOperation.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/PathEntryContainerUpdatesOperation.java
index 71af870827..a47678f25b 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/PathEntryContainerUpdatesOperation.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/PathEntryContainerUpdatesOperation.java
@@ -49,7 +49,7 @@ public class PathEntryContainerUpdatesOperation extends CModelOperation {
@Override
protected void executeOperation() throws CModelException {
PathEntryManager pathEntryManager = PathEntryManager.getDefault();
- ArrayList<CElementDelta> list = new ArrayList<CElementDelta>(events.length);
+ ArrayList<CElementDelta> list = new ArrayList<>(events.length);
for (int i = 0; i < events.length; ++i) {
PathEntryContainerChanged event = events[i];
ICElement celement = CoreModel.getDefault().create(event.getPath());
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/PathEntryUtil.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/PathEntryUtil.java
index 853fea14d8..9c065a6d58 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/PathEntryUtil.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/PathEntryUtil.java
@@ -339,7 +339,7 @@ public class PathEntryUtil {
public static ICModelStatus validatePathEntry(ICProject cProject, IPathEntry[] entries) {
// Check duplication.
- Set<IPathEntry> entrySet = new HashSet<IPathEntry>(entries.length);
+ Set<IPathEntry> entrySet = new HashSet<>(entries.length);
for (IPathEntry entry : entries) {
if (entry != null) {
if (entrySet.contains(entry)) {
@@ -543,7 +543,7 @@ public class PathEntryUtil {
}
public static List<IPathEntry> checkForDuplication(List<IPathEntry> pathEntries, int type) {
- List<IPathEntry> duplicate = new ArrayList<IPathEntry>(pathEntries.size());
+ List<IPathEntry> duplicate = new ArrayList<>(pathEntries.size());
for (int i = 0; i < pathEntries.size(); ++i) {
IPathEntry pathEntry = pathEntries.get(i);
if (pathEntry.getEntryKind() == type) {
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/Region.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/Region.java
index 7afb9cfb84..70208c187e 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/Region.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/Region.java
@@ -38,7 +38,7 @@ public class Region implements IRegion {
* @see IRegion
*/
public Region() {
- fRootElements = new ArrayList<ICElement>(1);
+ fRootElements = new ArrayList<>(1);
}
/**
@@ -84,7 +84,7 @@ public class Region implements IRegion {
*
*/
private ArrayList<ICElement> getAncestors(ICElement element) {
- ArrayList<ICElement> parents = new ArrayList<ICElement>();
+ ArrayList<ICElement> parents = new ArrayList<>();
ICElement parent = element.getParent();
while (parent != null) {
parents.add(parent);
@@ -127,7 +127,7 @@ public class Region implements IRegion {
*/
private void removeAllChildren(ICElement element) {
if (element instanceof IParent) {
- ArrayList<ICElement> newRootElements = new ArrayList<ICElement>();
+ ArrayList<ICElement> newRootElements = new ArrayList<>();
for (int i = 0, size = fRootElements.size(); i < size; i++) {
ICElement currentRoot = fRootElements.get(i);
// walk the current root hierarchy
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/SetPathEntriesOperation.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/SetPathEntriesOperation.java
index f234a20f02..c59adee051 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/SetPathEntriesOperation.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/SetPathEntriesOperation.java
@@ -73,7 +73,7 @@ public class SetPathEntriesOperation extends CModelOperation {
IProjectDescription description = projectResource.getDescription();
IProject[] projectReferences = description.getReferencedProjects();
- HashSet<String> oldReferences = new HashSet<String>(projectReferences.length);
+ HashSet<String> oldReferences = new HashSet<>(projectReferences.length);
for (IProject projectReference : projectReferences) {
String projectName = projectReference.getName();
oldReferences.add(projectName);
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/SourceManipulation.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/SourceManipulation.java
index ad529c61f4..9428f320a0 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/SourceManipulation.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/SourceManipulation.java
@@ -279,7 +279,7 @@ public class SourceManipulation extends Parent implements ISourceManipulation, I
// optional: parameters
String[] mementoParams = {};
if (memento.hasMoreTokens()) {
- List<String> params = new ArrayList<String>();
+ List<String> params = new ArrayList<>();
do {
token = memento.nextToken();
if (token.charAt(0) != CEM_PARAMETER) {
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/Structure.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/Structure.java
index f1dde496fa..615814e81b 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/Structure.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/Structure.java
@@ -26,7 +26,7 @@ import org.eclipse.cdt.core.model.IStructure;
import org.eclipse.cdt.core.parser.ast.ASTAccessVisibility;
public class Structure extends StructureDeclaration implements IStructure {
- Map<String, ASTAccessVisibility> superClassesNames = new TreeMap<String, ASTAccessVisibility>();
+ Map<String, ASTAccessVisibility> superClassesNames = new TreeMap<>();
public Structure(ICElement parent, int kind, String name) {
super(parent, name, kind);
@@ -34,7 +34,7 @@ public class Structure extends StructureDeclaration implements IStructure {
@Override
public IField[] getFields() throws CModelException {
- List<ICElement> fields = new ArrayList<ICElement>();
+ List<ICElement> fields = new ArrayList<>();
fields.addAll(getChildrenOfType(ICElement.C_FIELD));
return fields.toArray(new IField[fields.size()]);
}
@@ -55,7 +55,7 @@ public class Structure extends StructureDeclaration implements IStructure {
@Override
public IMethodDeclaration[] getMethods() throws CModelException {
- List<ICElement> methods = new ArrayList<ICElement>();
+ List<ICElement> methods = new ArrayList<>();
methods.addAll(getChildrenOfType(ICElement.C_METHOD_DECLARATION));
methods.addAll(getChildrenOfType(ICElement.C_METHOD));
return methods.toArray(new IMethodDeclaration[methods.size()]);
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/ext/StructureTemplateHandle.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/ext/StructureTemplateHandle.java
index fa5830e56f..34a032a556 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/ext/StructureTemplateHandle.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/ext/StructureTemplateHandle.java
@@ -63,7 +63,7 @@ public class StructureTemplateHandle extends StructureHandle implements IStructu
fTemplate = new Template(classBinding.getName());
ICPPTemplateParameterMap map = classBinding.getTemplateParameterMap();
ICPPTemplateParameter[] tpars = ct.getTemplateParameters();
- List<String> args = new ArrayList<String>(tpars.length);
+ List<String> args = new ArrayList<>(tpars.length);
for (ICPPTemplateParameter par : tpars) {
if (par.isParameterPack()) {
ICPPTemplateArgument[] pack = map.getPackExpansion(par);
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/AbstractCProjectDescriptionStorage.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/AbstractCProjectDescriptionStorage.java
index 4a6e8d9beb..98af3dbeb9 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/AbstractCProjectDescriptionStorage.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/AbstractCProjectDescriptionStorage.java
@@ -78,7 +78,7 @@ public abstract class AbstractCProjectDescriptionStorage {
/** Before the description is fully applied / loaded, consumers of CProjectDescriptionEvent and CProjectDescription.applyDatas()
* assume that getProjectDescription(...) will return the writable project description in the process of being created / modified...
* Cached temporarily in a thread local variable for this very purpose. */
- final private ThreadLocal<ICProjectDescription> currentThreadProjectDescription = new ThreadLocal<ICProjectDescription>();
+ final private ThreadLocal<ICProjectDescription> currentThreadProjectDescription = new ThreadLocal<>();
/**
* @param type CProjectDescriptionStorageTypeProxy
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CConfigurationDataProviderDescriptor.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CConfigurationDataProviderDescriptor.java
index 76648d25e5..090423377a 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CConfigurationDataProviderDescriptor.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CConfigurationDataProviderDescriptor.java
@@ -66,7 +66,7 @@ public class CConfigurationDataProviderDescriptor {
StringTokenizer t = new StringTokenizer(value, DELIMITER);
int num = t.countTokens();
- List<String> list = new ArrayList<String>(num);
+ List<String> list = new ArrayList<>(num);
for (int i = 0; i < num; i++) {
String v = t.nextToken().trim();
if (v.length() != 0)
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CConfigurationDescription.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CConfigurationDescription.java
index c3dfbb5697..76f9b4c5a9 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CConfigurationDescription.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CConfigurationDescription.java
@@ -299,7 +299,7 @@ public class CConfigurationDescription extends CDataProxyContainer
@Override
public CDataObject[] getChildren() {
CConfigurationData data = getConfigurationData(false);
- List<CDataObject> list = new ArrayList<CDataObject>();
+ List<CDataObject> list = new ArrayList<>();
CResourceData rcDatas[] = data.getResourceDatas();
for (int i = 0; i < rcDatas.length; i++) {
list.add(rcDatas[i]);
@@ -610,7 +610,7 @@ public class CConfigurationDescription extends CDataProxyContainer
return specs.getReferenceInfo();
} catch (CoreException e) {
}
- return new HashMap<String, String>(0);
+ return new HashMap<>(0);
}
@Override
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CConfigurationDescriptionCache.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CConfigurationDescriptionCache.java
index 000706552b..1e542c0043 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CConfigurationDescriptionCache.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CConfigurationDescriptionCache.java
@@ -102,7 +102,7 @@ public class CConfigurationDescriptionCache extends CDefaultConfigurationData
private CProjectDescription fParent;
private PathSettingsContainer fPathSettingContainer = PathSettingsContainer.createRootContainer();
private ResourceDescriptionHolder fRcHolder = new ResourceDescriptionHolder(fPathSettingContainer, true);
- private List<ICSettingObject> fChildList = new ArrayList<ICSettingObject>();
+ private List<ICSettingObject> fChildList = new ArrayList<>();
private CConfigurationSpecSettings fSpecSettings;
private CConfigurationData fData;
private CConfigurationDescriptionCache fBaseCache;
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CConfigurationSpecSettings.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CConfigurationSpecSettings.java
index 302cd4d672..05b3a6ad49 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CConfigurationSpecSettings.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CConfigurationSpecSettings.java
@@ -95,14 +95,14 @@ public class CConfigurationSpecSettings implements ICSettingsStorage, ILanguageS
private boolean fIsModified;
private HashMap<QualifiedName, Object> fSessionPropertiesMap;
private HashMap<String, CConfigExtensionReference[]> fExtMap;
- private HashMap<CConfigExtensionReference, CExtensionInfo> fExtInfoMap = new HashMap<CConfigExtensionReference, CExtensionInfo>();
+ private HashMap<CConfigExtensionReference, CExtensionInfo> fExtInfoMap = new HashMap<>();
private String fOwnerId;
private COwner fOwner;
// private CConfigBasedDescriptor fDescriptor;
// private Map fExternalSettingsProviderMap;
private List<ILanguageSettingsProvider> fLanguageSettingsProviders = null;
- private LinkedHashMap<String /*provider*/, LanguageSettingsStorage> lspPersistedState = new LinkedHashMap<String, LanguageSettingsStorage>();
+ private LinkedHashMap<String /*provider*/, LanguageSettingsStorage> lspPersistedState = new LinkedHashMap<>();
private String[] defaultLanguageSettingsProvidersIds = null;
private class DeltaSet {
@@ -466,7 +466,7 @@ public class CConfigurationSpecSettings implements ICSettingsStorage, ILanguageS
return CfgExportSettingContainerFactory.getReferenceMap(fCfg);
if (fRefMapCache == null)
fRefMapCache = CfgExportSettingContainerFactory.getReferenceMap(fCfg);
- return new LinkedHashMap<String, String>(fRefMapCache);
+ return new LinkedHashMap<>(fRefMapCache);
// if(fRefInfoMap == null || fRefInfoMap.size() == 0)
// return new HashMap(0);
//
@@ -582,7 +582,7 @@ public class CConfigurationSpecSettings implements ICSettingsStorage, ILanguageS
private Map<QualifiedName, Object> getSessionPropertiesMap(boolean create) {
if (fSessionPropertiesMap == null && create)
- fSessionPropertiesMap = new HashMap<QualifiedName, Object>();
+ fSessionPropertiesMap = new HashMap<>();
return fSessionPropertiesMap;
}
@@ -605,7 +605,7 @@ public class CConfigurationSpecSettings implements ICSettingsStorage, ILanguageS
//extension reference info
private HashMap<String, CConfigExtensionReference[]> getExtMap() {
if (fExtMap == null)
- fExtMap = new HashMap<String, CConfigExtensionReference[]>();
+ fExtMap = new HashMap<>();
return fExtMap;
}
@@ -958,26 +958,26 @@ public class CConfigurationSpecSettings implements ICSettingsStorage, ILanguageS
if (refs == null || refs.length == 0) {
if (extIds == null || extIds.length == 0)
return null;
- return new DeltaSet(null, new HashSet<String>(Arrays.asList(extIds)));
+ return new DeltaSet(null, new HashSet<>(Arrays.asList(extIds)));
} else if (extIds == null || extIds.length == 0) {
Map<String, ICConfigExtensionReference> map = createRefMap(refs);
- return new DeltaSet(new HashSet<ICConfigExtensionReference>(map.values()), null);
+ return new DeltaSet(new HashSet<>(map.values()), null);
}
- Set<String> idSet = new HashSet<String>(Arrays.asList(extIds));
- Set<String> idSetCopy = new HashSet<String>(idSet);
+ Set<String> idSet = new HashSet<>(Arrays.asList(extIds));
+ Set<String> idSetCopy = new HashSet<>(idSet);
Map<String, ICConfigExtensionReference> refsMap = createRefMap(refs);
idSet.removeAll(refsMap.keySet());
refsMap.keySet().removeAll(idSetCopy);
- Set<ICConfigExtensionReference> extSet = new HashSet<ICConfigExtensionReference>(refsMap.values());
+ Set<ICConfigExtensionReference> extSet = new HashSet<>(refsMap.values());
return new DeltaSet(extSet, idSet);
}
private Map<String, ICConfigExtensionReference> createRefMap(ICConfigExtensionReference refs[]) {
- Map<String, ICConfigExtensionReference> refsMap = new HashMap<String, ICConfigExtensionReference>(refs.length);
+ Map<String, ICConfigExtensionReference> refsMap = new HashMap<>(refs.length);
for (ICConfigExtensionReference ref : refs) {
refsMap.put(ref.getID(), ref);
}
@@ -1030,8 +1030,8 @@ public class CConfigurationSpecSettings implements ICSettingsStorage, ILanguageS
*/
@Override
public void setLanguageSettingProviders(List<? extends ILanguageSettingsProvider> providers) {
- fLanguageSettingsProviders = new ArrayList<ILanguageSettingsProvider>(0);
- Set<String> ids = new HashSet<String>();
+ fLanguageSettingsProviders = new ArrayList<>(0);
+ Set<String> ids = new HashSet<>();
for (ILanguageSettingsProvider provider : providers) {
String id = provider.getId();
if (provider == LanguageSettingsProvidersSerializer.getRawWorkspaceProvider(id)) {
@@ -1052,7 +1052,7 @@ public class CConfigurationSpecSettings implements ICSettingsStorage, ILanguageS
@Override
public List<ILanguageSettingsProvider> getLanguageSettingProviders() {
List<ILanguageSettingsProvider> providers = isLanguageSettingProvidersLoaded() ? fLanguageSettingsProviders
- : new ArrayList<ILanguageSettingsProvider>(0);
+ : new ArrayList<>(0);
return Collections.unmodifiableList(providers);
}
@@ -1082,7 +1082,7 @@ public class CConfigurationSpecSettings implements ICSettingsStorage, ILanguageS
*/
public LanguageSettingsDelta dropDelta() {
LanguageSettingsDelta languageSettingsDelta = null;
- LinkedHashMap<String, LanguageSettingsStorage> newState = new LinkedHashMap<String, LanguageSettingsStorage>();
+ LinkedHashMap<String, LanguageSettingsStorage> newState = new LinkedHashMap<>();
for (ILanguageSettingsProvider provider : fLanguageSettingsProviders) {
if (LanguageSettingsManager.isWorkspaceProvider(provider)) {
provider = LanguageSettingsManager.getRawProvider(provider);
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CExternalSettingsDeltaProcessor.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CExternalSettingsDeltaProcessor.java
index 800d151570..62a77b6347 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CExternalSettingsDeltaProcessor.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CExternalSettingsDeltaProcessor.java
@@ -208,7 +208,7 @@ public class CExternalSettingsDeltaProcessor {
private static <T extends ICSettingEntry> List<T> calculateUpdatedEntries(T current[], ICSettingEntry added[],
ICSettingEntry removed[]) {
- LinkedHashMap<EntryContentsKey, ICSettingEntry> map = new LinkedHashMap<EntryContentsKey, ICSettingEntry>();
+ LinkedHashMap<EntryContentsKey, ICSettingEntry> map = new LinkedHashMap<>();
boolean changed = false;
if (added != null) {
CDataUtil.fillEntriesMapByContentsKey(map, added);
@@ -235,7 +235,7 @@ public class CExternalSettingsDeltaProcessor {
}
@SuppressWarnings("unchecked")
Collection<T> values = (Collection<T>) map.values();
- return changed ? new ArrayList<T>(values) : null;
+ return changed ? new ArrayList<>(values) : null;
}
private static boolean isSettingCompatible(ICLanguageSetting setting, CExternalSetting provider) {
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CExternalSettingsHolder.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CExternalSettingsHolder.java
index 51a496ca43..4f3c222e70 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CExternalSettingsHolder.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CExternalSettingsHolder.java
@@ -48,7 +48,7 @@ public class CExternalSettingsHolder extends CExternalSettingsContainer {
if (CExternalSettingSerializer.ELEMENT_SETTING_INFO.equals(name)) {
if (externalSettingList == null)
- externalSettingList = new ArrayList<CExternalSetting>();
+ externalSettingList = new ArrayList<>();
CExternalSetting setting = CExternalSettingSerializer.load(child);
externalSettingList.add(setting);
@@ -66,7 +66,7 @@ public class CExternalSettingsHolder extends CExternalSettingsContainer {
CExternalSettingsHolder(CExternalSettingsHolder base) {
if (base.fSettingsMap != null)
- fSettingsMap = new HashMap<ExtSettingMapKey, CExternalSetting>(base.fSettingsMap);
+ fSettingsMap = new HashMap<>(base.fSettingsMap);
}
@Override
@@ -113,7 +113,7 @@ public class CExternalSettingsHolder extends CExternalSettingsContainer {
fSettingsMap.put(key, newSetting);
} else {
newSetting = new CExternalSetting(setting);
- fSettingsMap = new HashMap<ExtSettingMapKey, CExternalSetting>();
+ fSettingsMap = new HashMap<>();
fSettingsMap.put(key, newSetting);
}
fIsModified = true;
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CExternalSettingsManager.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CExternalSettingsManager.java
index f8467b3668..cbf8541b80 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CExternalSettingsManager.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CExternalSettingsManager.java
@@ -51,7 +51,7 @@ public class CExternalSettingsManager implements ICExternalSettingsListener, ICP
"externalSettings"); //$NON-NLS-1$
private static final String EXTERNAL_SETTING_STORAGE_ID = CCorePlugin.PLUGIN_ID + ".externalSettings"; //$NON-NLS-1$
- private Map<String, FactoryDescriptor> fFactoryMap = new HashMap<String, FactoryDescriptor>();
+ private Map<String, FactoryDescriptor> fFactoryMap = new HashMap<>();
private static CExternalSettingsManager fInstance;
private CExternalSettingsManager() {
@@ -147,7 +147,7 @@ public class CExternalSettingsManager implements ICExternalSettingsListener, ICP
fContainer = fFactoryDr.getFactory().createContainer(containerId, project, cfgDes, previousSettings);
} catch (CoreException e) {
if (failingProvidersMessages == null)
- failingProvidersMessages = new HashSet<String>();
+ failingProvidersMessages = new HashSet<>();
// only report the error once per session
if (!failingProvidersMessages.contains(e.getMessage()))
CCorePlugin.log(e.getMessage());
@@ -314,7 +314,7 @@ public class CExternalSettingsManager implements ICExternalSettingsListener, ICP
*/
private static class ProjDesCfgList {
private ICProjectDescription fProjDes;
- private List<ICConfigurationDescription> fCfgList = new ArrayList<ICConfigurationDescription>();
+ private List<ICConfigurationDescription> fCfgList = new ArrayList<>();
public ProjDesCfgList(ICProjectDescription des, Set<String> idSet) {
fProjDes = des;
@@ -442,7 +442,7 @@ public class CExternalSettingsManager implements ICExternalSettingsListener, ICP
}
private List<ICProjectDescription> getModifiedProjDesList(ProjDesCfgList[] lists) {
- List<ICProjectDescription> list = new ArrayList<ICProjectDescription>();
+ List<ICProjectDescription> list = new ArrayList<>();
for (int i = 0; i < lists.length; i++) {
if (lists[i].isWritable())
list.add(lists[i].fProjDes);
@@ -461,7 +461,7 @@ public class CExternalSettingsManager implements ICExternalSettingsListener, ICP
Set<String> set = null;
if (project != null) {
if (cfgId != null) {
- set = new HashSet<String>();
+ set = new HashSet<>();
set.add(cfgId);
}
ProjDesCfgList l = createCfgList(project, set);
@@ -472,7 +472,7 @@ public class CExternalSettingsManager implements ICExternalSettingsListener, ICP
} else {
// Project is null -- add all CDT projects & configs in the workspace
IProject[] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects();
- List<ProjDesCfgList> list = new ArrayList<ProjDesCfgList>();
+ List<ProjDesCfgList> list = new ArrayList<>();
for (IProject p : projects) {
ProjDesCfgList l = createCfgList(p, set);
if (l != null)
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CExternalSettinsDeltaCalculator.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CExternalSettinsDeltaCalculator.java
index c86001b0c3..ef4681a7ec 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CExternalSettinsDeltaCalculator.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CExternalSettinsDeltaCalculator.java
@@ -52,7 +52,7 @@ class CExternalSettinsDeltaCalculator {
ExtSettingsDelta(CExternalSetting setting) {
fSetting = setting;
- fEntryChangeStore = new KindBasedStore<ICSettingEntry[][]>(false);
+ fEntryChangeStore = new KindBasedStore<>(false);
}
ExtSettingsDelta(CExternalSetting setting, boolean added) {
@@ -90,8 +90,8 @@ class CExternalSettinsDeltaCalculator {
ICSettingEntry[][] getEntriesDelta() {
int kinds[] = KindBasedStore.getLanguageEntryKinds();
- List<ICSettingEntry> added = new ArrayList<ICSettingEntry>();
- List<ICSettingEntry> removed = new ArrayList<ICSettingEntry>();
+ List<ICSettingEntry> added = new ArrayList<>();
+ List<ICSettingEntry> removed = new ArrayList<>();
for (int kind : kinds) {
ICSettingEntry[][] d = getEntriesDelta(kind);
if (d == null)
@@ -172,7 +172,7 @@ class CExternalSettinsDeltaCalculator {
.fillEntriesMapByContentsKey(new LinkedHashMap<EntryContentsKey, ICSettingEntry>(), entries1);
Map<EntryContentsKey, ICSettingEntry> map2 = CDataUtil
.fillEntriesMapByContentsKey(new LinkedHashMap<EntryContentsKey, ICSettingEntry>(), entries2);
- Map<EntryContentsKey, ICSettingEntry> map1Copy = new LinkedHashMap<EntryContentsKey, ICSettingEntry>(map1);
+ Map<EntryContentsKey, ICSettingEntry> map1Copy = new LinkedHashMap<>(map1);
// Set set1 = new HashSet(Arrays.asList(entries1));
// Set set2 = new HashSet(Arrays.asList(entries2));
// Set set1Copy = new HashSet(set1);
@@ -220,7 +220,7 @@ class CExternalSettinsDeltaCalculator {
}
private static Map<ExtSettingMapKey, ICExternalSetting> toSettingsKeyMap(ICExternalSetting[] settings) {
- Map<ExtSettingMapKey, ICExternalSetting> map = new HashMap<ExtSettingMapKey, ICExternalSetting>();
+ Map<ExtSettingMapKey, ICExternalSetting> map = new HashMap<>();
for (ICExternalSetting setting : settings) {
if (map.put(new ExtSettingMapKey(setting), setting) != null)
throw new IllegalArgumentException();
@@ -235,7 +235,7 @@ class CExternalSettinsDeltaCalculator {
if (oldSettings == null || oldSettings.length == 0)
return createDeltas(newSettings, true);
- LinkedList<ExtSettingsDelta> deltaList = new LinkedList<ExtSettingsDelta>();
+ LinkedList<ExtSettingsDelta> deltaList = new LinkedList<>();
Map<ExtSettingMapKey, ICExternalSetting> newMap = toSettingsKeyMap(newSettings);
Map<ExtSettingMapKey, ICExternalSetting> oldMap = toSettingsKeyMap(oldSettings);
@@ -279,7 +279,7 @@ class CExternalSettinsDeltaCalculator {
Set<ICSettingEntry> calculateUpdatedEntries(ICSettingEntry current[], ICSettingEntry added[],
ICSettingEntry removed[]) {
// EntryComparator comparator = new EntryComparator();
- LinkedHashSet<ICSettingEntry> set = new LinkedHashSet<ICSettingEntry>();
+ LinkedHashSet<ICSettingEntry> set = new LinkedHashSet<>();
set.addAll(Arrays.asList(current));
set.addAll(Arrays.asList(added));
set.removeAll(Arrays.asList(removed));
@@ -291,8 +291,8 @@ class CExternalSettinsDeltaCalculator {
if (deltas == null || deltas.length == 0)
return null;
- Map<EntryNameKey, ICSettingEntry> addedMap = new LinkedHashMap<EntryNameKey, ICSettingEntry>();
- Map<EntryNameKey, ICSettingEntry> removedMap = new LinkedHashMap<EntryNameKey, ICSettingEntry>();
+ Map<EntryNameKey, ICSettingEntry> addedMap = new LinkedHashMap<>();
+ Map<EntryNameKey, ICSettingEntry> removedMap = new LinkedHashMap<>();
for (ExtSettingsDelta delta : deltas) {
ICSettingEntry[][] change = delta.getEntriesDelta(kind);
if (change == null)
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CLanguageSetting.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CLanguageSetting.java
index 8159e24dc5..f018807edd 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CLanguageSetting.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CLanguageSetting.java
@@ -73,8 +73,8 @@ public class CLanguageSetting extends CDataProxy implements ICLanguageSetting {
CLanguageData data = getCLanguageData(false);
ICLanguageSettingEntry entries[] = data.getEntries(kind);
if (entries != null)
- return new ArrayList<ICLanguageSettingEntry>(Arrays.asList(entries));
- return new ArrayList<ICLanguageSettingEntry>();
+ return new ArrayList<>(Arrays.asList(entries));
+ return new ArrayList<>();
}
@Override
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CProjectConverterDesciptor.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CProjectConverterDesciptor.java
index 6dad880f1b..18acc9ff31 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CProjectConverterDesciptor.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CProjectConverterDesciptor.java
@@ -102,7 +102,7 @@ public class CProjectConverterDesciptor {
if (supportedIds != null) {
IProjectDescription eDes = project.getDescription();
String natures[] = eDes.getNatureIds();
- Set<String> natureSet = new HashSet<String>(Arrays.asList(natures));
+ Set<String> natureSet = new HashSet<>(Arrays.asList(natures));
natureSet.removeAll(Arrays.asList(supportedIds));
if (natureSet.size() == natures.length)
return false;
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CProjectDescription.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CProjectDescription.java
index 7062f241e1..e614894f93 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CProjectDescription.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CProjectDescription.java
@@ -52,7 +52,7 @@ public class CProjectDescription implements ICProjectDescription, ICDataProxyCon
private volatile IProject fProject;
private final ICSettingsStorage fStorage;
private final ICStorageElement fRootStorageElement;
- private final HashMap<String, ICConfigurationDescription> fCfgMap = new LinkedHashMap<String, ICConfigurationDescription>();
+ private final HashMap<String, ICConfigurationDescription> fCfgMap = new LinkedHashMap<>();
private boolean fIsReadOnly;
private boolean fIsModified;
private Map<QualifiedName, Object> fPropertiesMap;
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CProjectDescriptionDelta.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CProjectDescriptionDelta.java
index f8935edd5f..8ae0ed0011 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CProjectDescriptionDelta.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CProjectDescriptionDelta.java
@@ -20,7 +20,7 @@ import org.eclipse.cdt.core.settings.model.ICDescriptionDelta;
import org.eclipse.cdt.core.settings.model.ICSettingObject;
public class CProjectDescriptionDelta implements ICDescriptionDelta {
- private List<CProjectDescriptionDelta> fChildList = new ArrayList<CProjectDescriptionDelta>();
+ private List<CProjectDescriptionDelta> fChildList = new ArrayList<>();
private CProjectDescriptionDelta fParent;
private ICSettingObject fSetting;
private ICSettingObject fOldSetting;
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CProjectDescriptionManager.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CProjectDescriptionManager.java
index 444cb57411..67a6c5cc21 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CProjectDescriptionManager.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CProjectDescriptionManager.java
@@ -236,8 +236,8 @@ public class CProjectDescriptionManager implements ICProjectDescriptionManager {
private volatile Map<String, CConfigurationDataProviderDescriptor> fProviderMap;
private volatile CProjectConverterDesciptor fConverters[];
/** Set of Listeners listening for Project Description Deltas */
- private Set<ListenerDescriptor> fListeners = new CopyOnWriteArraySet<ListenerDescriptor>();
- private Map<String, CConfigurationDescriptionCache> fPreferenceMap = new HashMap<String, CConfigurationDescriptionCache>();
+ private Set<ListenerDescriptor> fListeners = new CopyOnWriteArraySet<>();
+ private Map<String, CConfigurationDescriptionCache> fPreferenceMap = new HashMap<>();
private volatile CConfigBasedDescriptorManager fDescriptorManager;
private ResourceChangeHandler fRcChangeHandler;
private CProjectDescriptionWorkspacePreferences fPreferences;
@@ -284,7 +284,7 @@ public class CProjectDescriptionManager implements ICProjectDescriptionManager {
}
private void disposeAssociatedListeners(IProject project) {
- List<ScannerInfoProviderProxy> proxyListeners = new ArrayList<ScannerInfoProviderProxy>();
+ List<ScannerInfoProviderProxy> proxyListeners = new ArrayList<>();
for (ListenerDescriptor ldescriptor : fListeners) {
if (ldescriptor.fListener instanceof ScannerInfoProviderProxy)
proxyListeners.add((ScannerInfoProviderProxy) ldescriptor.fListener);
@@ -681,9 +681,9 @@ public class CProjectDescriptionManager implements ICProjectDescriptionManager {
private Collection<IProject> projSetFromProjNameSet(Collection<String> projNames) {
if (projNames.size() == 0)
- return new HashSet<IProject>(0);
+ return new HashSet<>(0);
- Set<IProject> set = new LinkedHashSet<IProject>();
+ Set<IProject> set = new LinkedHashSet<>();
IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
for (String sproj : projNames)
@@ -710,21 +710,21 @@ public class CProjectDescriptionManager implements ICProjectDescriptionManager {
return false;
// We're still looking at the same configuration - any refs removed?
- HashSet<String> removedRefs = new HashSet<String>();
+ HashSet<String> removedRefs = new HashSet<>();
if (oldCfg != null && oldCfg.getId().equals(newCfg.getId())) {
removedRefs.addAll(oldMap.keySet());
removedRefs.removeAll(newMap.keySet());
}
// Get the full set of references from all configuration
- LinkedHashSet<String> allRefs = new LinkedHashSet<String>();
+ LinkedHashSet<String> allRefs = new LinkedHashSet<>();
for (ICConfigurationDescription cfg : newCDesc.getConfigurations())
allRefs.addAll(cfg.getReferenceInfo().keySet());
// Don't remove a reference if it's referenced by any configuration in the project description
removedRefs.removeAll(allRefs);
- Collection<IProject> oldProjects = new LinkedHashSet<IProject>(Arrays.asList(des.getReferencedProjects()));
+ Collection<IProject> oldProjects = new LinkedHashSet<>(Arrays.asList(des.getReferencedProjects()));
Collection<IProject> newProjects = projSetFromProjNameSet(allRefs);
// If there are no changes, just return
@@ -787,11 +787,11 @@ public class CProjectDescriptionManager implements ICProjectDescriptionManager {
final String[] natureIds = des.getNatureIds();
// Get the set of items to remove ({oldNatures} - {newNatures}) + conflictingNatures
- Set<String> toRemove = new HashSet<String>(oldNatures);
+ Set<String> toRemove = new HashSet<>(oldNatures);
toRemove.removeAll(newNatures); // Don't remove items we're re-adding
toRemove.addAll(conflictingNatures); // Add conflicting natures for removal
// Modify an ordered set of the existing natures with the changes
- final LinkedHashSet<String> cur = new LinkedHashSet<String>(Arrays.asList(natureIds));
+ final LinkedHashSet<String> cur = new LinkedHashSet<>(Arrays.asList(natureIds));
cur.addAll(newNatures);
cur.removeAll(toRemove);
@@ -1010,7 +1010,7 @@ public class CProjectDescriptionManager implements ICProjectDescriptionManager {
if (cType != null) {
String[] exts = cType.getFileSpecs(IContentType.FILE_EXTENSION_SPEC);
if (exts != null && exts.length != 0) {
- List<ICLanguageSetting> list = new ArrayList<ICLanguageSetting>();
+ List<ICLanguageSetting> list = new ArrayList<>();
ICLanguageSetting setting;
for (String ext : exts) {
setting = findLanguageSettingForExtension(ext, settings/*, src*/);
@@ -1055,7 +1055,7 @@ public class CProjectDescriptionManager implements ICProjectDescriptionManager {
* @throws CoreException
*/
Map<String, ICStorageElement> createCfgStorages(ICProjectDescription des) throws CoreException {
- LinkedHashMap<String, ICStorageElement> map = new LinkedHashMap<String, ICStorageElement>();
+ LinkedHashMap<String, ICStorageElement> map = new LinkedHashMap<>();
ICStorageElement rootElement = des.getStorage(MODULE_ID, false);
if (rootElement != null) {
ICStorageElement children[] = rootElement.getChildren();
@@ -1204,7 +1204,7 @@ public class CProjectDescriptionManager implements ICProjectDescriptionManager {
IExtensionPoint extensionPoint = Platform.getExtensionRegistry()
.getExtensionPoint(CConfigurationDataProviderDescriptor.DATA_PROVIDER_EXTPOINT_ID);
IExtension exts[] = extensionPoint.getExtensions();
- fProviderMap = new HashMap<String, CConfigurationDataProviderDescriptor>(exts.length);
+ fProviderMap = new HashMap<>(exts.length);
for (IExtension ext : exts) {
CConfigurationDataProviderDescriptor des = new CConfigurationDataProviderDescriptor(ext);
@@ -1443,8 +1443,8 @@ public class CProjectDescriptionManager implements ICProjectDescriptionManager {
break;
}
- Set<CConfigExtensionReference> newSet = new HashSet<CConfigExtensionReference>(Arrays.asList(newRefs));
- Set<CConfigExtensionReference> oldSet = new HashSet<CConfigExtensionReference>(Arrays.asList(oldRefs));
+ Set<CConfigExtensionReference> newSet = new HashSet<>(Arrays.asList(newRefs));
+ Set<CConfigExtensionReference> oldSet = new HashSet<>(Arrays.asList(oldRefs));
if (newSet.size() != oldSet.size()) {
flags |= ICDescriptionDelta.EXT_REF;
break;
@@ -1671,8 +1671,8 @@ public class CProjectDescriptionManager implements ICProjectDescriptionManager {
if (delta.getDeltaKind() == ICDescriptionDelta.CHANGED) {
ICLanguageSetting newLss[] = newFo.getLanguageSettings();
ICLanguageSetting oldLss[] = oldFo.getLanguageSettings();
- List<ICLanguageSetting> newList = new ArrayList<ICLanguageSetting>(Arrays.asList(newLss));
- List<ICLanguageSetting> oldList = new ArrayList<ICLanguageSetting>(Arrays.asList(oldLss));
+ List<ICLanguageSetting> newList = new ArrayList<>(Arrays.asList(newLss));
+ List<ICLanguageSetting> oldList = new ArrayList<>(Arrays.asList(oldLss));
List<ICLanguageSetting[]> matched = sortSettings(newList, oldList);
for (ICLanguageSetting[] match : matched) {
@@ -1721,7 +1721,7 @@ public class CProjectDescriptionManager implements ICProjectDescriptionManager {
List<ICLanguageSetting> settings2) {
ICLanguageSetting setting1;
ICLanguageSetting setting2;
- List<ICLanguageSetting[]> result = new ArrayList<ICLanguageSetting[]>();
+ List<ICLanguageSetting[]> result = new ArrayList<>();
for (Iterator<ICLanguageSetting> iter1 = settings1.iterator(); iter1.hasNext();) {
setting1 = iter1.next();
for (Iterator<ICLanguageSetting> iter2 = settings2.iterator(); iter2.hasNext();) {
@@ -1887,8 +1887,8 @@ public class CProjectDescriptionManager implements ICProjectDescriptionManager {
newEntries = EMPTY_LANGUAGE_SETTINGS_ENTRIES_ARRAY;
}
- Set<ICLanguageSettingEntry> newEntrySet = new HashSet<ICLanguageSettingEntry>(Arrays.asList(newEntries));
- Set<ICLanguageSettingEntry> oldEntrySet = new HashSet<ICLanguageSettingEntry>(Arrays.asList(oldEntries));
+ Set<ICLanguageSettingEntry> newEntrySet = new HashSet<>(Arrays.asList(newEntries));
+ Set<ICLanguageSettingEntry> oldEntrySet = new HashSet<>(Arrays.asList(oldEntries));
// Check the removed entries.
for (ICLanguageSettingEntry oldEntry : oldEntries) {
@@ -1988,7 +1988,7 @@ public class CProjectDescriptionManager implements ICProjectDescriptionManager {
indexDelta = createDelta(indexCfg, oldIndexCfg);
}
if (indexDelta != null) {
- List<CElementDelta> list = new ArrayList<CElementDelta>();
+ List<CElementDelta> list = new ArrayList<>();
generateCElementDeltasFromCfgDelta(cProject, indexDelta, list);
return list.toArray(new ICElementDelta[list.size()]);
}
@@ -2567,7 +2567,7 @@ public class CProjectDescriptionManager implements ICProjectDescriptionManager {
for (CLanguageData lData : lDatas) {
String[] exts = CDataUtil.getSourceExtensions(project, lData);
- HashSet<String> set = new HashSet<String>(Arrays.asList(exts));
+ HashSet<String> set = new HashSet<>(Arrays.asList(exts));
map.put(set, lData);
}
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CProjectDescriptionStorageManager.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CProjectDescriptionStorageManager.java
index 7c4756d9ea..4a07bbb340 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CProjectDescriptionStorageManager.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CProjectDescriptionStorageManager.java
@@ -93,7 +93,7 @@ public class CProjectDescriptionStorageManager {
/** Map of StorageType ID -> List of StorageTypes */
private volatile Map<String, List<CProjectDescriptionStorageTypeProxy>> storageTypeMap;
/** Map from IProject -> AbstractCProjectDescriptionStorage which is responsible for (de)serializing the project */
- private ConcurrentHashMap<IProject, AbstractCProjectDescriptionStorage> fDescriptionStorageMap = new ConcurrentHashMap<IProject, AbstractCProjectDescriptionStorage>();
+ private ConcurrentHashMap<IProject, AbstractCProjectDescriptionStorage> fDescriptionStorageMap = new ConcurrentHashMap<>();
private volatile static CProjectDescriptionStorageManager instance;
@@ -342,7 +342,7 @@ public class CProjectDescriptionStorageManager {
private synchronized void initExtensionPoints() {
if (storageTypeMap != null)
return;
- Map<String, List<CProjectDescriptionStorageTypeProxy>> m = new HashMap<String, List<CProjectDescriptionStorageTypeProxy>>();
+ Map<String, List<CProjectDescriptionStorageTypeProxy>> m = new HashMap<>();
IExtensionPoint extpoint = Platform.getExtensionRegistry().getExtensionPoint(CCorePlugin.PLUGIN_ID,
CPROJ_DESC_STORAGE_EXT_ID);
for (IExtension extension : extpoint.getExtensions()) {
@@ -413,7 +413,7 @@ public class CProjectDescriptionStorageManager {
resource.setResourceAttributes(resAttr);
}
IResource[] members = ((IContainer) resource).members();
- List<IFile> files = new ArrayList<IFile>(members.length);
+ List<IFile> files = new ArrayList<>(members.length);
for (IResource member : members) {
if (member instanceof IFile && member.getResourceAttributes().isReadOnly()) {
files.add((IFile) member);
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CSettingsRefInfo.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CSettingsRefInfo.java
index ac320cc6e7..cfd9258c2c 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CSettingsRefInfo.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CSettingsRefInfo.java
@@ -32,7 +32,7 @@ class CSettingsRefInfo {
/** External Settings Holder Map
* From references container -> to concrete held settings */
- private HashMap<CContainerRef, CRefSettingsHolder> fESHolderMap = new LinkedHashMap<CContainerRef, CRefSettingsHolder>();
+ private HashMap<CContainerRef, CRefSettingsHolder> fESHolderMap = new LinkedHashMap<>();
CSettingsRefInfo() {
}
@@ -59,7 +59,7 @@ class CSettingsRefInfo {
}
CContainerRef[] getReferences(String factoryId) {
- List<CContainerRef> list = new ArrayList<CContainerRef>();
+ List<CContainerRef> list = new ArrayList<>();
for (CContainerRef r : fESHolderMap.keySet()) {
if (r.getFactoryId().equals(factoryId))
list.add(r);
@@ -104,7 +104,7 @@ class CSettingsRefInfo {
}
ICSettingEntry[] getAllEntries(int kind) {
- Map<EntryNameKey, ICSettingEntry> map = new LinkedHashMap<EntryNameKey, ICSettingEntry>();
+ Map<EntryNameKey, ICSettingEntry> map = new LinkedHashMap<>();
for (CRefSettingsHolder h : fESHolderMap.values()) {
CExternalSetting[] settings = h.getExternalSettings();
for (int i = 0; i < settings.length; i++) {
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CfgExportSettingContainerFactory.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CfgExportSettingContainerFactory.java
index e5af2854dd..6bf9ebd4cf 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CfgExportSettingContainerFactory.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CfgExportSettingContainerFactory.java
@@ -54,7 +54,7 @@ public class CfgExportSettingContainerFactory extends CExternalSettingContainerF
private static final char DELIMITER = ';';
/** Cache the external settings exported by project configurations */
- private static final ConcurrentHashMap<String, CExternalSetting[]> cachedSettings = new ConcurrentHashMap<String, CExternalSetting[]>();
+ private static final ConcurrentHashMap<String, CExternalSetting[]> cachedSettings = new ConcurrentHashMap<>();
private static CfgExportSettingContainerFactory fInstance;
@@ -152,7 +152,7 @@ public class CfgExportSettingContainerFactory extends CExternalSettingContainerF
public static Map<String, String> getReferenceMap(ICConfigurationDescription cfg) {
CContainerRef[] refs = CExternalSettingsManager.getInstance().getReferences(cfg, FACTORY_ID);
- Map<String, String> map = new LinkedHashMap<String, String>();
+ Map<String, String> map = new LinkedHashMap<>();
for (int i = 0; i < refs.length; i++) {
try {
String[] r = parseId(refs[i].getContainerId());
@@ -166,7 +166,7 @@ public class CfgExportSettingContainerFactory extends CExternalSettingContainerF
public static void setReferenceMap(ICConfigurationDescription cfg, Map<String, String> map) {
Map<String, String> oldRefs = getReferenceMap(cfg);
- Map<String, String> newRefs = new LinkedHashMap<String, String>(map);
+ Map<String, String> newRefs = new LinkedHashMap<>(map);
// We need to preserve order. The API we have with the external settings manager allows us to
// add and remove individual items.
@@ -283,7 +283,7 @@ public class CfgExportSettingContainerFactory extends CExternalSettingContainerF
return new String[0];
int deltaKind = delta.getDeltaKind();
- Set<String> cfgIds = new HashSet<String>();
+ Set<String> cfgIds = new HashSet<>();
switch (deltaKind) {
case ICDescriptionDelta.ADDED:
case ICDescriptionDelta.REMOVED:
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CfgProxyCache.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CfgProxyCache.java
index 28ec87f9f6..e51f9d7bfd 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CfgProxyCache.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CfgProxyCache.java
@@ -23,7 +23,7 @@ import org.eclipse.cdt.core.settings.model.util.PathSettingsContainer;
import org.eclipse.core.runtime.IPath;
public class CfgProxyCache implements IProxyCache {
- private HashMap<String, CDataProxy> fProxyMap = new HashMap<String, CDataProxy>();
+ private HashMap<String, CDataProxy> fProxyMap = new HashMap<>();
private PathSettingsContainer fPathContainer;
CfgProxyCache(PathSettingsContainer pathDesContainer) {
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/ConfigBasedPathEntryStore.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/ConfigBasedPathEntryStore.java
index 201b0e88e6..26af7a19ed 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/ConfigBasedPathEntryStore.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/ConfigBasedPathEntryStore.java
@@ -124,7 +124,7 @@ public class ConfigBasedPathEntryStore implements IPathEntryStore, ICProjectDesc
ICConfigurationDescription cfg = getIndexCfg(fProject);
List<IPathEntry>[] es = getEntries(fProject, cfg);
if (es != null) {
- List<IPathEntry> list = new ArrayList<IPathEntry>(es[0].size() + 1);
+ List<IPathEntry> list = new ArrayList<>(es[0].size() + 1);
list.addAll(es[0]);
list.add(CoreModel.newContainerEntry(ConfigBasedPathEntryContainer.CONTAINER_PATH));
return list.toArray(new IPathEntry[list.size()]);
@@ -139,7 +139,7 @@ public class ConfigBasedPathEntryStore implements IPathEntryStore, ICProjectDesc
if (es != null) {
List<IPathEntry> sysList = es[1];
List<IPathEntry> usrList = es[0];
- List<IPathEntry> newUsrList = new ArrayList<IPathEntry>(entries.length);
+ List<IPathEntry> newUsrList = new ArrayList<>(entries.length);
for (IPathEntry entry : entries) {
if (entry.getEntryKind() != IPathEntry.CDT_CONTAINER)
newUsrList.add(entry);
@@ -253,10 +253,10 @@ public class ConfigBasedPathEntryStore implements IPathEntryStore, ICProjectDesc
private static List<IPathEntry>[] createEntriesList(ICConfigurationDescription cfgDes, PathEntryCollector cr) {
@SuppressWarnings("unchecked")
ArrayList<IPathEntry>[] es = new ArrayList[2];
- es[0] = new ArrayList<IPathEntry>();
+ es[0] = new ArrayList<>();
cr.getEntries(es[0], PathEntryTranslator.INCLUDE_USER, cfgDes);
es[0].trimToSize();
- es[1] = new ArrayList<IPathEntry>();
+ es[1] = new ArrayList<>();
cr.getEntries(es[1], PathEntryTranslator.INCLUDE_BUILT_INS, cfgDes);
es[1].trimToSize();
@@ -288,7 +288,7 @@ public class ConfigBasedPathEntryStore implements IPathEntryStore, ICProjectDesc
ICProjectDescription des = CCorePlugin.getDefault().getProjectDescription(project, false);
if (des != null)
return getContainerEntries(des);
- return new ArrayList<IPathEntry>(0);
+ return new ArrayList<>(0);
}
private static List<IPathEntry> getContainerEntries(ICProjectDescription des) {
@@ -296,7 +296,7 @@ public class ConfigBasedPathEntryStore implements IPathEntryStore, ICProjectDesc
List<IPathEntry> es[] = getEntries(des.getProject(), cfg);
if (es != null)
return es[1];
- return new ArrayList<IPathEntry>(0);
+ return new ArrayList<>(0);
}
public static ConfigBasedPathEntryContainer createContainer(IProject project) {
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/DescriptionScannerInfoProvider.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/DescriptionScannerInfoProvider.java
index 5ef8c27abb..d944fd9181 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/DescriptionScannerInfoProvider.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/DescriptionScannerInfoProvider.java
@@ -190,7 +190,7 @@ public class DescriptionScannerInfoProvider implements IScannerInfoProvider, ICP
}
private LinkedHashSet<ICLanguageSettingEntry> getEntriesSet(int kind, ICLanguageSetting[] settings) {
- LinkedHashSet<ICLanguageSettingEntry> set = new LinkedHashSet<ICLanguageSettingEntry>();
+ LinkedHashSet<ICLanguageSettingEntry> set = new LinkedHashSet<>();
ICLanguageSettingEntry[] langEntries;
for (ICLanguageSetting setting : settings) {
langEntries = setting.getResolvedSettingEntries(kind);
@@ -221,7 +221,7 @@ public class DescriptionScannerInfoProvider implements IScannerInfoProvider, ICP
}
private Map<String, String> getValues(ICMacroEntry macroEntries[]) {
- Map<String, String> macrosMap = new HashMap<String, String>(macroEntries.length);
+ Map<String, String> macrosMap = new HashMap<>(macroEntries.length);
String name;
String value;
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/EntriesNamesContainer.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/EntriesNamesContainer.java
index f584d72567..db8ddfa327 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/EntriesNamesContainer.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/EntriesNamesContainer.java
@@ -21,7 +21,7 @@ import org.eclipse.cdt.core.settings.model.util.KindBasedStore;
class EntriesNamesContainer {
// private String fLanguageSettingsId;
- private KindBasedStore<Set<String>> fRemovedEntryNamesStore = new KindBasedStore<Set<String>>();
+ private KindBasedStore<Set<String>> fRemovedEntryNamesStore = new KindBasedStore<>();
// EntriesNamesContainer(ICLanguageSetting setting) {
// fLanguageSettingsId = setting.getId();
@@ -37,7 +37,7 @@ class EntriesNamesContainer {
for (int i = 0; i < infos.length; i++) {
Set<String> set = infos[i].getInfo();
if (set != null)
- fRemovedEntryNamesStore.put(infos[i].getKind(), new HashSet<String>(set));
+ fRemovedEntryNamesStore.put(infos[i].getKind(), new HashSet<>(set));
}
}
@@ -48,7 +48,7 @@ class EntriesNamesContainer {
private Set<String> getRemovedNamesSet(int kind, boolean create) {
Set<String> set = fRemovedEntryNamesStore.get(kind);
if (set == null && create) {
- set = new HashSet<String>();
+ set = new HashSet<>();
fRemovedEntryNamesStore.put(kind, set);
}
return set;
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/ExtensionContainerFactory.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/ExtensionContainerFactory.java
index 92a958d04b..9ee0b4d74a 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/ExtensionContainerFactory.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/ExtensionContainerFactory.java
@@ -153,7 +153,7 @@ public class ExtensionContainerFactory extends CExternalSettingContainerFactoryW
IExtensionPoint extensionPoint = Platform.getExtensionRegistry().getExtensionPoint(EXTENSION_ID);
IExtension exts[] = extensionPoint.getExtensions();
- fDescriptorMap = new HashMap<String, CExtensionSettingProviderDescriptor>();
+ fDescriptorMap = new HashMap<>();
for (IExtension ext : exts) {
CExtensionSettingProviderDescriptor dr = new CExtensionSettingProviderDescriptor(ext);
@@ -200,9 +200,9 @@ public class ExtensionContainerFactory extends CExternalSettingContainerFactoryW
}
public static void setReferencedProviderIds(ICConfigurationDescription cfg, String ids[]) {
- Set<String> newIdsSet = new HashSet<String>(Arrays.asList(ids));
- Set<String> oldIdsSet = new HashSet<String>(Arrays.asList(getReferencedProviderIds(cfg)));
- Set<String> newIdsSetCopy = new HashSet<String>(newIdsSet);
+ Set<String> newIdsSet = new HashSet<>(Arrays.asList(ids));
+ Set<String> oldIdsSet = new HashSet<>(Arrays.asList(getReferencedProviderIds(cfg)));
+ Set<String> newIdsSetCopy = new HashSet<>(newIdsSet);
newIdsSet.removeAll(oldIdsSet);
oldIdsSet.removeAll(newIdsSetCopy);
@@ -236,9 +236,9 @@ public class ExtensionContainerFactory extends CExternalSettingContainerFactoryW
}
public static void updateReferencedProviderIds(ICConfigurationDescription cfg, String ids[]) {
- Set<String> newIdsSet = new HashSet<String>(Arrays.asList(ids));
- Set<String> oldIdsSet = new HashSet<String>(Arrays.asList(getReferencedProviderIds(cfg)));
- Set<String> newIdsSetCopy = new HashSet<String>(newIdsSet);
+ Set<String> newIdsSet = new HashSet<>(Arrays.asList(ids));
+ Set<String> oldIdsSet = new HashSet<>(Arrays.asList(getReferencedProviderIds(cfg)));
+ Set<String> newIdsSetCopy = new HashSet<>(newIdsSet);
newIdsSetCopy.removeAll(oldIdsSet);
newIdsSet.removeAll(newIdsSetCopy);
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/MapProxyCache.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/MapProxyCache.java
index 86dfa7dd6b..5049f82ef8 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/MapProxyCache.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/MapProxyCache.java
@@ -25,7 +25,7 @@ public class MapProxyCache implements IProxyCache {
private HashMap<String, CDataProxy> getMap(boolean create) {
if (fMap == null && create)
- fMap = new HashMap<String, CDataProxy>();
+ fMap = new HashMap<>();
return fMap;
}
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/MultiConfigDescription.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/MultiConfigDescription.java
index 11fff5c690..f5c521e5bf 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/MultiConfigDescription.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/MultiConfigDescription.java
@@ -211,7 +211,7 @@ public class MultiConfigDescription extends MultiItemsHolder implements ICMultiC
*/
@Override
public ICFileDescription[] getFileDescriptions() {
- ArrayList<ICFileDescription> lst = new ArrayList<ICFileDescription>();
+ ArrayList<ICFileDescription> lst = new ArrayList<>();
for (int i = 0; i < fCfgs.length; i++)
lst.addAll(Arrays.asList(fCfgs[i].getFileDescriptions()));
return lst.toArray(new ICFileDescription[lst.size()]);
@@ -222,7 +222,7 @@ public class MultiConfigDescription extends MultiItemsHolder implements ICMultiC
*/
@Override
public ICFolderDescription[] getFolderDescriptions() {
- ArrayList<ICFolderDescription> lst = new ArrayList<ICFolderDescription>();
+ ArrayList<ICFolderDescription> lst = new ArrayList<>();
for (int i = 0; i < fCfgs.length; i++)
lst.addAll(Arrays.asList(fCfgs[i].getFolderDescriptions()));
return lst.toArray(new ICFolderDescription[lst.size()]);
@@ -275,7 +275,7 @@ public class MultiConfigDescription extends MultiItemsHolder implements ICMultiC
*/
@Override
public ICResourceDescription getResourceDescription(IPath path, boolean isForFolder) {
- ArrayList<ICResourceDescription> lst = new ArrayList<ICResourceDescription>();
+ ArrayList<ICResourceDescription> lst = new ArrayList<>();
for (int i = 0; i < fCfgs.length; i++) {
ICResourceDescription rd = fCfgs[i].getResourceDescription(path, false);
if (!path.equals(rd.getPath())) {
@@ -305,7 +305,7 @@ public class MultiConfigDescription extends MultiItemsHolder implements ICMultiC
*/
@Override
public ICResourceDescription[] getResourceDescriptions() {
- ArrayList<ICResourceDescription> lst = new ArrayList<ICResourceDescription>();
+ ArrayList<ICResourceDescription> lst = new ArrayList<>();
for (int i = 0; i < fCfgs.length; i++)
lst.addAll(Arrays.asList(fCfgs[i].getResourceDescriptions()));
return lst.toArray(new ICResourceDescription[lst.size()]);
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/PathEntryConfigurationDataProvider.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/PathEntryConfigurationDataProvider.java
index d0e334abd7..b1284eb5ee 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/PathEntryConfigurationDataProvider.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/PathEntryConfigurationDataProvider.java
@@ -247,7 +247,7 @@ public class PathEntryConfigurationDataProvider extends CConfigurationDataProvid
ICProject cproject = manager.create(project);
IPathEntry[] curRawEntries = PathEntryManager.getDefault().getRawPathEntries(cproject);
- List<IPathEntry> list = new ArrayList<IPathEntry>();
+ List<IPathEntry> list = new ArrayList<>();
list.addAll(Arrays.asList(entries));
for (int i = 0; i < curRawEntries.length; i++) {
if (curRawEntries[i].getEntryKind() == IPathEntry.CDT_CONTAINER) {
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/ResourceChangeHandler.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/ResourceChangeHandler.java
index 0425b850e6..abbe02ab4b 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/ResourceChangeHandler.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/ResourceChangeHandler.java
@@ -73,11 +73,11 @@ public class ResourceChangeHandler extends ResourceChangeHandlerBase implements
CProjectDescriptionManager fMngr = CProjectDescriptionManager.getInstance();
/** Map of modified project descriptions to update */
- Map<IProject, ICProjectDescription> fProjDesMap = new HashMap<IProject, ICProjectDescription>();
+ Map<IProject, ICProjectDescription> fProjDesMap = new HashMap<>();
/** Set of removed resources */
- Collection<IProject> fRemovedProjects = new HashSet<IProject>();
+ Collection<IProject> fRemovedProjects = new HashSet<>();
/** Map of moved & removed resources: 'from' -> 'to'; 'to' may be null for removed resources */
- Map<IResource, IResource> fMovedResources = new HashMap<IResource, IResource>();
+ Map<IResource, IResource> fMovedResources = new HashMap<>();
@Override
public void handleProjectClose(IProject project) {
@@ -116,7 +116,7 @@ public class ResourceChangeHandler extends ResourceChangeHandlerBase implements
for (ICSourceEntry entrie : entries) {
if (entrie.getFullPath().equals(rcFullPath)) {
if (updatedList == null) {
- updatedList = new ArrayList<ICSourceEntry>(Arrays.asList(entries));
+ updatedList = new ArrayList<>(Arrays.asList(entries));
}
updatedList.remove(num);
} else {
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/ResourceDescriptionHolder.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/ResourceDescriptionHolder.java
index 4d1a47bd4e..b6014db414 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/ResourceDescriptionHolder.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/ResourceDescriptionHolder.java
@@ -55,7 +55,7 @@ public class ResourceDescriptionHolder {
}
public ICResourceDescription[] getResourceDescriptions(final int kind) {
- final List<ICResourceDescription> list = new ArrayList<ICResourceDescription>();
+ final List<ICResourceDescription> list = new ArrayList<>();
fPathSettingContainer.accept(new IPathSettingsContainerVisitor() {
@Override
@@ -79,7 +79,7 @@ public class ResourceDescriptionHolder {
}
public ICResourceDescription[] getResourceDescriptions() {
- final List<Object> list = new ArrayList<Object>();
+ final List<Object> list = new ArrayList<>();
fPathSettingContainer.accept(new IPathSettingsContainerVisitor() {
@Override
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/ScannerInfoProviderProxy.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/ScannerInfoProviderProxy.java
index 26b8ecc2b4..9c872709dc 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/ScannerInfoProviderProxy.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/ScannerInfoProviderProxy.java
@@ -71,7 +71,7 @@ public class ScannerInfoProviderProxy extends AbstractCExtensionProxy
List<IScannerInfoChangeListener> list = map.get(project);
if (list == null) {
// Create a new list
- list = new ArrayList<IScannerInfoChangeListener>();
+ list = new ArrayList<>();
map.put(project, list);
}
if (!list.contains(listener)) {
@@ -85,7 +85,7 @@ public class ScannerInfoProviderProxy extends AbstractCExtensionProxy
*/
private Map<IProject, List<IScannerInfoChangeListener>> getListeners() {
if (listeners == null) {
- listeners = new HashMap<IProject, List<IScannerInfoChangeListener>>();
+ listeners = new HashMap<>();
}
return listeners;
}
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/xml/XmlProjectDescriptionStorage.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/xml/XmlProjectDescriptionStorage.java
index a90b2951fd..de82650c68 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/xml/XmlProjectDescriptionStorage.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/xml/XmlProjectDescriptionStorage.java
@@ -190,7 +190,7 @@ public class XmlProjectDescriptionStorage extends AbstractCProjectDescriptionSto
/** A soft reference to the read-only project description
* Volatile provides a memory barrier in Java 5+ */
- private volatile Reference<ICProjectDescription> fProjectDescription = new SoftReference<ICProjectDescription>(
+ private volatile Reference<ICProjectDescription> fProjectDescription = new SoftReference<>(
null);
/** The last modification stamp of the .cproject project description file */
private volatile long projectModificaitonStamp = IResource.NULL_STAMP;
@@ -379,14 +379,14 @@ public class XmlProjectDescriptionStorage extends AbstractCProjectDescriptionSto
ICProjectDescription oldDes = fProjectDescription.get();
if (des != null) {
if (project.exists() && project.isOpen()) {
- fProjectDescription = new SoftReference<ICProjectDescription>(des);
+ fProjectDescription = new SoftReference<>(des);
} else {
IStatus status = new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID, -1,
SettingsModelMessages.getString("CProjectDescriptionManager.16"), null); //$NON-NLS-1$
CCorePlugin.log(new CoreException(status));
}
} else {
- fProjectDescription = new SoftReference<ICProjectDescription>(null);
+ fProjectDescription = new SoftReference<>(null);
}
LanguageSettingsProvidersSerializer.reRegisterListeners(oldDes, fProjectDescription.get());
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/xml/XmlStorage.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/xml/XmlStorage.java
index 1bc325ca92..94a11a360e 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/xml/XmlStorage.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/xml/XmlStorage.java
@@ -40,7 +40,7 @@ public class XmlStorage implements ICSettingsStorage {
// Lock to prevent concurrent access to XML DOM which isn't thread-safe for read (Bug 319245)
final Object fLock;
public Element fElement;
- private Map<String, InternalXmlStorageElement> fStorageElementMap = new HashMap<String, InternalXmlStorageElement>();
+ private Map<String, InternalXmlStorageElement> fStorageElementMap = new HashMap<>();
private volatile boolean fChildrenInited;
private boolean fIsReadOnly;
private boolean fIsDirty;
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/xml/XmlStorageElement.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/xml/XmlStorageElement.java
index 02d247533b..45e6cec2b5 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/xml/XmlStorageElement.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/xml/XmlStorageElement.java
@@ -50,7 +50,7 @@ public class XmlStorageElement implements ICStorageElement {
final Object fLock;
public Element fElement;
private ICStorageElement fParent;
- protected List<ICStorageElement> fChildList = new ArrayList<ICStorageElement>();
+ protected List<ICStorageElement> fChildList = new ArrayList<>();
private volatile boolean fChildrenCreated;
private String[] fAttributeFilters;
private String[] fChildFilters;
@@ -142,7 +142,7 @@ public class XmlStorageElement implements ICStorageElement {
public ICStorageElement[] getChildrenByName(String name) {
synchronized (fLock) {
createChildren();
- ArrayList<ICStorageElement> children = new ArrayList<ICStorageElement>();
+ ArrayList<ICStorageElement> children = new ArrayList<>();
for (ICStorageElement child : fChildList)
if (name.equals(child.getName()))
children.add(child);
@@ -397,7 +397,7 @@ public class XmlStorageElement implements ICStorageElement {
return false;
if (attrs.length != 0) {
- Set<String> set = new HashSet<String>(Arrays.asList(attrs));
+ Set<String> set = new HashSet<>(Arrays.asList(attrs));
set.removeAll(Arrays.asList(otherAttrs));
if (set.size() != 0)
return false;
@@ -440,7 +440,7 @@ public class XmlStorageElement implements ICStorageElement {
synchronized (fLock) {
NamedNodeMap nodeMap = fElement.getAttributes();
int length = nodeMap.getLength();
- List<String> list = new ArrayList<String>(length);
+ List<String> list = new ArrayList<>(length);
for (int i = 0; i < length; i++) {
Node node = nodeMap.item(i);
String name = node.getNodeName();
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/xml2/XmlProjectDescriptionStorage2.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/xml2/XmlProjectDescriptionStorage2.java
index 1bfdba7375..4a18b9e7e1 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/xml2/XmlProjectDescriptionStorage2.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/xml2/XmlProjectDescriptionStorage2.java
@@ -125,7 +125,7 @@ public class XmlProjectDescriptionStorage2 extends XmlProjectDescriptionStorage
InternalXmlStorageElement el = super.createStorage(container, fileName, reCreate, createEmptyIfNotFound,
readOnly);
- Queue<ICStorageElement> nodesToCheck = new LinkedList<ICStorageElement>();
+ Queue<ICStorageElement> nodesToCheck = new LinkedList<>();
nodesToCheck.addAll(Arrays.asList(el.getChildren()));
while (!nodesToCheck.isEmpty()) {
ICStorageElement currEl = nodesToCheck.remove();
@@ -182,7 +182,7 @@ public class XmlProjectDescriptionStorage2 extends XmlProjectDescriptionStorage
// Copy the original passed in element, as we're going to re-write the children
InternalXmlStorageElement copy = copyElement(element, false);
// Map containing external CConfiguration elements to be serialized
- Map<String, InternalXmlStorageElement> externalStorageElements = new HashMap<String, InternalXmlStorageElement>();
+ Map<String, InternalXmlStorageElement> externalStorageElements = new HashMap<>();
// Iterate through the initial children
for (ICStorageElement el : copy.getChildren()) {
@@ -190,7 +190,7 @@ public class XmlProjectDescriptionStorage2 extends XmlProjectDescriptionStorage
if (!CProjectDescriptionManager.MODULE_ID.equals(el.getAttribute(XmlStorage.MODULE_ID_ATTRIBUTE)))
continue;
- Queue<ICStorageElement> configStorages = new LinkedList<ICStorageElement>();
+ Queue<ICStorageElement> configStorages = new LinkedList<>();
configStorages.addAll(Arrays.asList(el.getChildren()));
while (!configStorages.isEmpty()) {
InternalXmlStorageElement iEl = (InternalXmlStorageElement) configStorages.remove();
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/util/LRUCache.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/util/LRUCache.java
index 9ce152cef6..fb369f248d 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/util/LRUCache.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/util/LRUCache.java
@@ -143,7 +143,7 @@ public class LRUCache<K, T> implements Cloneable {
public LRUCache(int size) {
fTimestampCounter = fCurrentSpace = 0;
fEntryQueue = fEntryQueueTail = null;
- fEntryTable = new Hashtable<K, LRUCacheEntry<K, T>>(size);
+ fEntryTable = new Hashtable<>(size);
fSpaceLimit = size;
}
@@ -172,7 +172,7 @@ public class LRUCache<K, T> implements Cloneable {
public void flush() {
fCurrentSpace = 0;
LRUCacheEntry<K, T> entry = fEntryQueueTail; // Remember last entry
- fEntryTable = new Hashtable<K, LRUCacheEntry<K, T>>(); // Clear it out
+ fEntryTable = new Hashtable<>(); // Clear it out
fEntryQueue = fEntryQueueTail = null;
while (entry != null) { // send deletion notifications in LRU order
privateNotifyDeletionFromCache(entry);
@@ -272,14 +272,14 @@ public class LRUCache<K, T> implements Cloneable {
* Returns a new LRUCache instance
*/
protected LRUCache<K, T> newInstance(int size) {
- return new LRUCache<K, T>(size);
+ return new LRUCache<>(size);
}
/**
* Adds an entry for the given key/value/space.
*/
protected void privateAdd(K key, T value, int space) {
- LRUCacheEntry<K, T> entry = new LRUCacheEntry<K, T>(key, value, space);
+ LRUCacheEntry<K, T> entry = new LRUCacheEntry<>(key, value, space);
this.privateAddEntry(entry, false);
}
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/util/OverflowingLRUCache.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/util/OverflowingLRUCache.java
index e15fd6492b..343b16eced 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/util/OverflowingLRUCache.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/util/OverflowingLRUCache.java
@@ -129,18 +129,18 @@ public abstract class OverflowingLRUCache<K, T> extends LRUCache<K, T> {
*/
public Enumeration<T> elements() {
if (fEntryQueue == null)
- return new LRUCacheEnumerator<T>(null);
- LRUCacheEnumerator.LRUEnumeratorElement<T> head = new LRUCacheEnumerator.LRUEnumeratorElement<T>(
+ return new LRUCacheEnumerator<>(null);
+ LRUCacheEnumerator.LRUEnumeratorElement<T> head = new LRUCacheEnumerator.LRUEnumeratorElement<>(
fEntryQueue._fValue);
LRUCacheEntry<K, T> currentEntry = fEntryQueue._fNext;
LRUCacheEnumerator.LRUEnumeratorElement<T> currentElement = head;
while (currentEntry != null) {
- currentElement.fNext = new LRUCacheEnumerator.LRUEnumeratorElement<T>(currentEntry._fValue);
+ currentElement.fNext = new LRUCacheEnumerator.LRUEnumeratorElement<>(currentEntry._fValue);
currentElement = currentElement.fNext;
currentEntry = currentEntry._fNext;
}
- return new LRUCacheEnumerator<T>(head);
+ return new LRUCacheEnumerator<>(head);
}
public double fillingRatio() {
@@ -268,7 +268,7 @@ public abstract class OverflowingLRUCache<K, T> extends LRUCache<K, T> {
return "Class: " + fClass + " has " + fCount + " entries."; //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-1$
}
}
- java.util.HashMap<Class<?>, Temp> h = new java.util.HashMap<Class<?>, Temp>();
+ java.util.HashMap<Class<?>, Temp> h = new java.util.HashMap<>();
while (keys.hasMoreElements()) {
entry = fEntryTable.get(keys.nextElement());
Class<?> key = entry._fValue.getClass();
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/parser/AbstractCLikeLanguage.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/parser/AbstractCLikeLanguage.java
index aea50a97ef..38de308e65 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/parser/AbstractCLikeLanguage.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/parser/AbstractCLikeLanguage.java
@@ -70,7 +70,7 @@ public abstract class AbstractCLikeLanguage extends AbstractLanguage implements
shouldVisitNames = true;
}
- private List<IASTName> nameList = new ArrayList<IASTName>();
+ private List<IASTName> nameList = new ArrayList<>();
@Override
public int visit(IASTName name) {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/parser/AbstractScannerExtensionConfiguration.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/parser/AbstractScannerExtensionConfiguration.java
index a69b8f69a3..810288e77a 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/parser/AbstractScannerExtensionConfiguration.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/parser/AbstractScannerExtensionConfiguration.java
@@ -163,7 +163,7 @@ public abstract class AbstractScannerExtensionConfiguration implements IScannerE
*/
protected void addMacro(String signature, String value) {
if (fAddMacroList == null) {
- fAddMacroList = new ArrayList<IMacro>();
+ fAddMacroList = new ArrayList<>();
}
fAddMacroList.add(new MacroDefinition(signature.toCharArray(), value.toCharArray()));
fAddMacros = null;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/parser/CLanguageKeywords.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/parser/CLanguageKeywords.java
index aa6be5e53d..0fc68f3bae 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/parser/CLanguageKeywords.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/parser/CLanguageKeywords.java
@@ -55,7 +55,7 @@ public class CLanguageKeywords implements ICLanguageKeywords {
@Override
public String[] getKeywords() {
if (keywords == null) {
- Set<String> keywordSet = new HashSet<String>(KeywordSets.getKeywords(KeywordSetKey.KEYWORDS, language));
+ Set<String> keywordSet = new HashSet<>(KeywordSets.getKeywords(KeywordSetKey.KEYWORDS, language));
CharArrayIntMap additionalKeywords = config.getAdditionalKeywords();
if (additionalKeywords != null) {
for (Iterator<char[]> iterator = additionalKeywords.toList().iterator(); iterator.hasNext();) {
@@ -80,7 +80,7 @@ public class CLanguageKeywords implements ICLanguageKeywords {
@Override
public String[] getPreprocessorKeywords() {
if (preprocessorKeywords == null) {
- Set<String> keywords = new HashSet<String>(KeywordSets.getKeywords(KeywordSetKey.PP_DIRECTIVE, language));
+ Set<String> keywords = new HashSet<>(KeywordSets.getKeywords(KeywordSetKey.PP_DIRECTIVE, language));
CharArrayIntMap additionalKeywords = config.getAdditionalPreprocessorKeywords();
if (additionalKeywords != null) {
for (Iterator<char[]> iterator = additionalKeywords.toList().iterator(); iterator.hasNext();) {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/index/export/ExternalExportProjectProvider.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/index/export/ExternalExportProjectProvider.java
index e6c17afcd3..daffd9eb83 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/index/export/ExternalExportProjectProvider.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/index/export/ExternalExportProjectProvider.java
@@ -90,13 +90,13 @@ public class ExternalExportProjectProvider extends AbstractExportProjectProvider
}
// -include
- List<String> includeFiles = new ArrayList<String>();
+ List<String> includeFiles = new ArrayList<>();
if (isPresent(OPT_INCLUDE)) {
includeFiles.addAll(getParameters(OPT_INCLUDE));
}
// -exclude
- List<String> excludeFiles = new ArrayList<String>();
+ List<String> excludeFiles = new ArrayList<>();
if (isPresent(OPT_EXCLUDE)) {
excludeFiles.addAll(getParameters(OPT_EXCLUDE));
}
@@ -157,7 +157,7 @@ public class ExternalExportProjectProvider extends AbstractExportProjectProvider
content.createLink(new Path(location.getAbsolutePath()), IResource.NONE, null);
// Setup path entries
- List<IPathEntry> entries = new ArrayList<IPathEntry>(
+ List<IPathEntry> entries = new ArrayList<>(
Arrays.asList(CoreModel.getRawPathEntries(cproject)));
// pre-include files
@@ -192,7 +192,7 @@ public class ExternalExportProjectProvider extends AbstractExportProjectProvider
* @return a list of additional entries to add to the project
*/
protected List<IPathEntry> getAdditionalRawEntries() {
- List<IPathEntry> entries = new ArrayList<IPathEntry>();
+ List<IPathEntry> entries = new ArrayList<>();
entries.add(CoreModel.newIncludeEntry(content.getProjectRelativePath(), null, content.getLocation(), true));
return entries;
}
@@ -218,7 +218,7 @@ public class ExternalExportProjectProvider extends AbstractExportProjectProvider
*/
@Override
public Map<String, String> getExportProperties() {
- Map<String, String> properties = new HashMap<String, String>();
+ Map<String, String> properties = new HashMap<>();
Date now = Calendar.getInstance().getTime();
properties.put(ORG_ECLIPSE_CDT_CORE_INDEX_EXPORT_DATESTAMP,
DateFormat.getDateInstance().format(now) + " " + DateFormat.getTimeInstance().format(now)); //$NON-NLS-1$
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/parser/util/ArrayUtil.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/parser/util/ArrayUtil.java
index 6fbc94ec14..f1262a972f 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/parser/util/ArrayUtil.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/parser/util/ArrayUtil.java
@@ -707,7 +707,7 @@ public abstract class ArrayUtil {
public static <T> T[] removeDuplicates(T[] array) {
int k = 0;
if (array.length >= 16) {
- HashSet<T> set = new HashSet<T>(array.length);
+ HashSet<T> set = new HashSet<>(array.length);
for (int i = 0; i < array.length; i++) {
T obj = array[i];
if (obj != null && set.add(obj)) {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/parser/util/CharArrayMap.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/parser/util/CharArrayMap.java
index 3d089c53ba..e0cc6898a2 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/parser/util/CharArrayMap.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/parser/util/CharArrayMap.java
@@ -141,7 +141,7 @@ public final class CharArrayMap<V> {
* Constructs an empty CharArrayMap with default initial capacity.
*/
public CharArrayMap() {
- map = new HashMap<Key, V>();
+ map = new HashMap<>();
}
/**
@@ -152,7 +152,7 @@ public final class CharArrayMap<V> {
*/
public static <V> CharArrayMap<V> createOrderedMap() {
// TreeMap does not have a constructor that takes an initial capacity
- return new CharArrayMap<V>(new TreeMap<Key, V>());
+ return new CharArrayMap<>(new TreeMap<Key, V>());
}
private CharArrayMap(Map<Key, V> map) {
@@ -165,7 +165,7 @@ public final class CharArrayMap<V> {
* @throws IllegalArgumentException if the initial capacity is negative
*/
public CharArrayMap(int initialCapacity) {
- map = new HashMap<Key, V>(initialCapacity);
+ map = new HashMap<>(initialCapacity);
}
/**
@@ -267,7 +267,7 @@ public final class CharArrayMap<V> {
*/
public Collection<char[]> keys() {
Set<Key> keys = map.keySet();
- ArrayList<char[]> r = new ArrayList<char[]>(keys.size());
+ ArrayList<char[]> r = new ArrayList<>(keys.size());
for (Key key : keys) {
r.add(CharArrayUtils.extract(key.buffer, key.start, key.length));
}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/parser/util/CharTable.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/parser/util/CharTable.java
index dba19db4a4..b50721b427 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/parser/util/CharTable.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/parser/util/CharTable.java
@@ -119,7 +119,7 @@ public class CharTable extends HashTable {
}
public List<char[]> toList() {
- List<char[]> list = new ArrayList<char[]>(size());
+ List<char[]> list = new ArrayList<>(size());
int size = size();
for (int i = 0; i < size; i++) {
list.add(keyAt(i));
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/parser/util/CollectionUtils.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/parser/util/CollectionUtils.java
index 982dcf0100..850435cb8a 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/parser/util/CollectionUtils.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/parser/util/CollectionUtils.java
@@ -152,7 +152,7 @@ public final class CollectionUtils {
public static <T, U> List<U> listMapGet(Map<T, List<U>> m, T t) {
List<U> result = m.get(t);
if (result == null) {
- result = new ArrayList<U>();
+ result = new ArrayList<>();
m.put(t, result);
}
return result;
@@ -175,7 +175,7 @@ public final class CollectionUtils {
++n;
}
} else if (result == null) {
- result = new ArrayList<T>(collection.size() - 1);
+ result = new ArrayList<>(collection.size() - 1);
for (T u : collection) {
if (--n < 0)
break;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/parser/util/ObjectTable.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/parser/util/ObjectTable.java
index 84e917d1e4..331aa7ba87 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/parser/util/ObjectTable.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/parser/util/ObjectTable.java
@@ -47,7 +47,7 @@ public abstract class ObjectTable<T> extends HashTable implements Iterable<T> {
public List<T> toList() {
int size = size();
- List<T> list = new ArrayList<T>(size);
+ List<T> list = new ArrayList<>(size);
for (int i = 0; i < size; i++) {
list.add(keyAt(i));
}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/ast/tag/TagManager.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/ast/tag/TagManager.java
index 83602c9d2f..a7042ac4e0 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/ast/tag/TagManager.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/ast/tag/TagManager.java
@@ -47,7 +47,7 @@ public class TagManager {
}
private static Map<String, TaggerDescriptor> loadExtensions() {
- Map<String, TaggerDescriptor> taggers = new HashMap<String, TaggerDescriptor>();
+ Map<String, TaggerDescriptor> taggers = new HashMap<>();
// Load the extensions
IConfigurationElement[] elements = Platform.getExtensionRegistry()
@@ -75,7 +75,7 @@ public class TagManager {
/** Provides an opportunity for all enabled taggers to process the given values. */
public Iterable<ITag> process(ITagWriter tagWriter, IBinding binding, IASTName ast) {
- List<ITag> tags = new LinkedList<ITag>();
+ List<ITag> tags = new LinkedList<>();
for (TaggerDescriptor desc : taggers.values()) {
IBindingTagger tagger = desc.getBindingTaggerFor(binding, ast);
if (tagger != null) {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTNodeSelector.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTNodeSelector.java
index e7d9ec8565..27b07a1789 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTNodeSelector.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTNodeSelector.java
@@ -84,7 +84,7 @@ public class ASTNodeSelector implements IASTNodeSelector {
}
}
}
- final ASTNodeSpecification<T> nodeSpec = new ASTNodeSpecification<T>(relation, requiredClass, offsetInFile,
+ final ASTNodeSpecification<T> nodeSpec = new ASTNodeSpecification<>(relation, requiredClass, offsetInFile,
lengthInFile);
nodeSpec.setRangeInSequence(sequenceNumber, sequenceLength, false);
nodeSpec.setSearchInExpansion(searchInExpansion);
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTProblem.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTProblem.java
index 6e1db9ca82..92c0d3149d 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTProblem.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTProblem.java
@@ -32,7 +32,7 @@ import com.ibm.icu.text.MessageFormat;
public class ASTProblem extends ASTNode implements IASTProblem {
protected static final Map<Integer, String> errorMessages;
static {
- errorMessages = new HashMap<Integer, String>();
+ errorMessages = new HashMap<>();
errorMessages.put(Integer.valueOf(PREPROCESSOR_POUND_ERROR),
ParserMessages.getString("ScannerProblemFactory.error.preproc.error")); //$NON-NLS-1$
errorMessages.put(Integer.valueOf(PREPROCESSOR_POUND_WARNING),
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/AbstractGNUSourceCodeParser.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/AbstractGNUSourceCodeParser.java
index b80211fb16..7b9d8ba756 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/AbstractGNUSourceCodeParser.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/AbstractGNUSourceCodeParser.java
@@ -2449,12 +2449,12 @@ public abstract class AbstractGNUSourceCodeParser implements ISourceCodeParser {
final int lt = LTcatchEOF(1);
if (allowAttrib && (lt == IGCCToken.t__attribute__)) {
if (result == null) {
- result = new ArrayList<IASTAttributeSpecifier>();
+ result = new ArrayList<>();
}
result.add(__attribute__());
} else if (allowDeclspec && (lt == IGCCToken.t__declspec)) {
if (result == null) {
- result = new ArrayList<IASTAttributeSpecifier>();
+ result = new ArrayList<>();
}
result.add(__declspec());
} else {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/CStringValue.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/CStringValue.java
index a20e86ec9f..6aa59fb0cf 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/CStringValue.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/CStringValue.java
@@ -27,7 +27,7 @@ import org.eclipse.core.runtime.CoreException;
public final class CStringValue implements IValue {
private static final Map<Character, Character> escapeSequences;
static {
- Map<Character, Character> map = new HashMap<Character, Character>();
+ Map<Character, Character> map = new HashMap<>();
map.put('\'', '\'');
map.put('"', '"');
map.put('?', '?');
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ChildCollector.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ChildCollector.java
index 74264b0fa3..40fd93139b 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ChildCollector.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ChildCollector.java
@@ -44,7 +44,7 @@ class ChildCollector extends ASTGenericVisitor {
if (fNodes == null) {
if (child == fNode)
return PROCESS_CONTINUE;
- fNodes = new ArrayList<IASTNode>();
+ fNodes = new ArrayList<>();
}
fNodes.add(child);
return PROCESS_SKIP;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/GCCBuiltinSymbolProvider.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/GCCBuiltinSymbolProvider.java
index a6529b1955..9cdbc3a49f 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/GCCBuiltinSymbolProvider.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/GCCBuiltinSymbolProvider.java
@@ -66,7 +66,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
public static final ASTNodeProperty BUILTIN_GCC_SYMBOL = new ASTNodeProperty(
"GCCBuiltinSymbolProvider.BUILTIN_GCC_SYMBOL - built-in GCC symbol"); //$NON-NLS-1$
- private static final Map<String, char[]> CHAR_ARRAYS = new HashMap<String, char[]>();
+ private static final Map<String, char[]> CHAR_ARRAYS = new HashMap<>();
private IBinding[] fBindings;
private IScope fScope;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/SizeofCalculator.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/SizeofCalculator.java
index e9bc40364e..2b29f562aa 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/SizeofCalculator.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/SizeofCalculator.java
@@ -110,7 +110,7 @@ public class SizeofCalculator {
public SizeofCalculator(IASTTranslationUnit ast) {
this.ast = ast;
int maxAlignment = 32;
- Map<String, String> sizeofMacros = new HashMap<String, String>();
+ Map<String, String> sizeofMacros = new HashMap<>();
for (IASTPreprocessorMacroDefinition macro : ast.getBuiltinMacroDefinitions()) {
String name = macro.getName().toString();
if ("__BIGGEST_ALIGNMENT__".equals(name)) { //$NON-NLS-1$
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CScope.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CScope.java
index 7b7ead2be1..3f8a13aa10 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CScope.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CScope.java
@@ -205,7 +205,7 @@ public class CScope implements ICScope, IASTInternalScope {
@SuppressWarnings("unchecked")
CharArrayObjectMap<Object> map = (CharArrayObjectMap<Object>) mapsToNameOrBinding[type];
if (map == CharArrayObjectMap.EMPTY_MAP)
- mapsToNameOrBinding[type] = map = new CharArrayObjectMap<Object>(1);
+ mapsToNameOrBinding[type] = map = new CharArrayObjectMap<>(1);
Object o = map.get(nchars);
if (o instanceof IASTName) {
@@ -643,7 +643,7 @@ public class CScope implements ICScope, IASTInternalScope {
@SuppressWarnings("unchecked")
CharArrayObjectMap<Object> map = (CharArrayObjectMap<Object>) mapsToNameOrBinding[type];
if (map == CharArrayObjectMap.EMPTY_MAP)
- mapsToNameOrBinding[type] = map = new CharArrayObjectMap<Object>(2);
+ mapsToNameOrBinding[type] = map = new CharArrayObjectMap<>(2);
map.put(binding.getNameCharArray(), binding);
}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CStructMapper.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CStructMapper.java
index 69bf58513b..7e182fd188 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CStructMapper.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CStructMapper.java
@@ -60,7 +60,7 @@ public class CStructMapper {
public ICompositeType mapToAST(ICompositeType type) {
if (fStructs == null) {
- fStructs = new CharArrayMap<IASTName>();
+ fStructs = new CharArrayMap<>();
fTranslationUnit.accept(new Visitor());
}
IASTName name = fStructs.get(type.getNameCharArray());
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTAmbiguousTemplateArgument.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTAmbiguousTemplateArgument.java
index b8b6fd8225..29590cb6bc 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTAmbiguousTemplateArgument.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTAmbiguousTemplateArgument.java
@@ -44,7 +44,7 @@ public class CPPASTAmbiguousTemplateArgument extends ASTAmbiguousNode implements
* or {@link ICPPASTPackExpansionExpression}.
*/
public CPPASTAmbiguousTemplateArgument(IASTNode... nodes) {
- fNodes = new ArrayList<IASTNode>(2);
+ fNodes = new ArrayList<>(2);
for (IASTNode node : nodes) {
if (node instanceof IASTTypeId || node instanceof IASTExpression) {
fNodes.add(node);
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTQualifiedName.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTQualifiedName.java
index b897151414..8b894b7912 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTQualifiedName.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTQualifiedName.java
@@ -398,7 +398,7 @@ public class CPPASTQualifiedName extends CPPASTNameBase implements ICPPASTQualif
private List<IBinding> filterClassScopeBindings(ICPPClassType classType, IBinding[] bindings,
final boolean isDeclaration) {
- List<IBinding> filtered = new ArrayList<IBinding>();
+ List<IBinding> filtered = new ArrayList<>();
final boolean allowNonstatic = canBeFieldAccess(classType) || isAddressOf() || inUsingDecl();
final IBinding templateDefinition = (classType instanceof ICPPTemplateInstance)
? ((ICPPTemplateInstance) classType).getTemplateDefinition()
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPNamespace.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPNamespace.java
index 8b12c6387a..1022c0ec96 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPNamespace.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPNamespace.java
@@ -143,7 +143,7 @@ public class CPPNamespace extends PlatformObject implements ICPPNamespace, ICPPI
}
static private class NamespaceMemberCollector extends ASTVisitor {
- public ObjectSet<IBinding> members = new ObjectSet<IBinding>(8);
+ public ObjectSet<IBinding> members = new ObjectSet<>(8);
public NamespaceMemberCollector() {
shouldVisitNamespaces = true;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPScopeMapper.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPScopeMapper.java
index 947cb7c687..e20ccb8291 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPScopeMapper.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPScopeMapper.java
@@ -304,7 +304,7 @@ public class CPPScopeMapper {
final String name = getReverseQualifiedName(container);
List<UsingDirectiveWrapper> list = fPerName.get(name);
if (list == null) {
- list = new LinkedList<UsingDirectiveWrapper>();
+ list = new LinkedList<>();
fPerName.put(name, list);
}
list.add(new UsingDirectiveWrapper(offset, ud));
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPSemantics.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPSemantics.java
index a2a87d0368..d4e6b667c6 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPSemantics.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPSemantics.java
@@ -1537,7 +1537,7 @@ public class CPPSemantics {
if (listOfNominated == null) {
listOfNominated = new ArrayList<>(1);
if (data.usingDirectives.isEmpty()) {
- data.usingDirectives = new HashMap<ICPPNamespaceScope, List<ICPPNamespaceScope>>();
+ data.usingDirectives = new HashMap<>();
}
data.usingDirectives.put((ICPPNamespaceScope) appearsIn, listOfNominated);
}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalUtil.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalUtil.java
index 3c18ebdc69..67ed6a80cf 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalUtil.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalUtil.java
@@ -130,7 +130,7 @@ public class EvalUtil {
fixed = fixed.computeForFunctionCall(record, context);
}
}
- return new Pair<ICPPEvaluation, ICPPEvaluation>(updateable, fixed);
+ return new Pair<>(updateable, fixed);
}
public static class Pair<T1, T2> {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/ASTModificationStore.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/ASTModificationStore.java
index d8753d270e..43c9ad8b83 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/ASTModificationStore.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/ASTModificationStore.java
@@ -24,7 +24,7 @@ public class ASTModificationStore {
private HashMap<ASTModification, ASTModificationMap> fNestedModMaps;
public ASTModificationStore() {
- fNestedModMaps = new HashMap<ASTModification, ASTModificationMap>();
+ fNestedModMaps = new HashMap<>();
}
/**
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/DeclarationGeneratorImpl.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/DeclarationGeneratorImpl.java
index b6325f2651..4dd516b0cf 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/DeclarationGeneratorImpl.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/DeclarationGeneratorImpl.java
@@ -141,7 +141,7 @@ public class DeclarationGeneratorImpl extends DeclarationGenerator {
try {
// Addition of pointer operators has to be in reverse order, so it's deferred until
// the end.
- Map<IASTDeclarator, LinkedList<IASTPointerOperator>> pointerOperatorMap = new HashMap<IASTDeclarator, LinkedList<IASTPointerOperator>>();
+ Map<IASTDeclarator, LinkedList<IASTPointerOperator>> pointerOperatorMap = new HashMap<>();
// If the type is an array of something, create a declaration of a pointer to something
// instead (to allow assignment, etc).
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/astwriter/ContainerNode.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/astwriter/ContainerNode.java
index 2e6010d005..578c1816b1 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/astwriter/ContainerNode.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/astwriter/ContainerNode.java
@@ -31,7 +31,7 @@ import org.eclipse.cdt.internal.core.dom.parser.ASTNode;
* @author Emanuel Graf IFS
*/
public class ContainerNode extends ASTNode {
- private final ArrayList<IASTNode> nodes = new ArrayList<IASTNode>();
+ private final ArrayList<IASTNode> nodes = new ArrayList<>();
public ContainerNode(IASTNode... nodes) {
Collections.addAll(this.nodes, nodes);
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/astwriter/MacroExpansionHandler.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/astwriter/MacroExpansionHandler.java
index 1b6fdeabf6..c63e660c8c 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/astwriter/MacroExpansionHandler.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/astwriter/MacroExpansionHandler.java
@@ -47,7 +47,7 @@ public class MacroExpansionHandler {
private final Scribe scribe;
private int lastMacroExpOffset;
private IASTTranslationUnit ast;
- private Map<String, List<IIndexName>> macroExpansion = new TreeMap<String, List<IIndexName>>();
+ private Map<String, List<IIndexName>> macroExpansion = new TreeMap<>();
public MacroExpansionHandler(Scribe scribe) {
this.scribe = scribe;
@@ -189,10 +189,10 @@ public class MacroExpansionHandler {
ast = unit;
IIndex index = ast.getIndex();
if (index != null) {
- macroExpansion = new TreeMap<String, List<IIndexName>>();
+ macroExpansion = new TreeMap<>();
IASTPreprocessorMacroDefinition[] md = ast.getMacroDefinitions();
- TreeSet<String> paths = new TreeSet<String>();
+ TreeSet<String> paths = new TreeSet<>();
for (IASTPreprocessorIncludeStatement is : ast.getIncludeDirectives()) {
if (!is.isSystemInclude()) {
paths.add(is.getContainingFilename());
@@ -212,7 +212,7 @@ public class MacroExpansionHandler {
List<IIndexName> fileList = macroExpansion.get(filename);
if (paths.contains(filename)) {
if (fileList == null) {
- fileList = new ArrayList<IIndexName>();
+ fileList = new ArrayList<>();
macroExpansion.put(filename, fileList);
}
fileList.add(iIndexName);
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/changegenerator/ASTModificationHelper.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/changegenerator/ASTModificationHelper.java
index cf6bcc39ed..15b2491370 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/changegenerator/ASTModificationHelper.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/changegenerator/ASTModificationHelper.java
@@ -40,7 +40,7 @@ public class ASTModificationHelper {
public <T extends IASTNode> T[] createModifiedChildArray(IASTNode parent, T[] unmodifiedChildren, Class<T> clazz,
NodeCommentMap commentMap) {
- ArrayList<T> modifiedChildren = new ArrayList<T>(Arrays.asList(unmodifiedChildren));
+ ArrayList<T> modifiedChildren = new ArrayList<>(Arrays.asList(unmodifiedChildren));
for (ASTModification parentModification : modificationsForNode(parent)) {
switch (parentModification.getKind()) {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/commenthandler/NodeCommentMap.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/commenthandler/NodeCommentMap.java
index f8f0d14d34..8753023c21 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/commenthandler/NodeCommentMap.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/commenthandler/NodeCommentMap.java
@@ -34,10 +34,10 @@ import org.eclipse.cdt.internal.core.dom.rewrite.util.ASTNodes;
* @author Guido Zgraggen IFS
*/
public class NodeCommentMap {
- protected final Map<IASTNode, List<IASTComment>> leadingMap = new HashMap<IASTNode, List<IASTComment>>();
- protected final Map<IASTNode, List<IASTComment>> trailingMap = new HashMap<IASTNode, List<IASTComment>>();
- protected final Map<IASTNode, List<IASTComment>> freestandingMap = new HashMap<IASTNode, List<IASTComment>>();
- protected final List<IASTTranslationUnit> coveredUnits = new ArrayList<IASTTranslationUnit>();
+ protected final Map<IASTNode, List<IASTComment>> leadingMap = new HashMap<>();
+ protected final Map<IASTNode, List<IASTComment>> trailingMap = new HashMap<>();
+ protected final Map<IASTNode, List<IASTComment>> freestandingMap = new HashMap<>();
+ protected final List<IASTTranslationUnit> coveredUnits = new ArrayList<>();
/**
* Add a comment to the map with the trailing comments.
@@ -47,7 +47,7 @@ public class NodeCommentMap {
public void addTrailingCommentToNode(IASTNode node, IASTComment comment) {
List<IASTComment> comments = trailingMap.get(node);
if (comments == null) {
- comments = new ArrayList<IASTComment>();
+ comments = new ArrayList<>();
}
comments.add(comment);
trailingMap.put(node, comments);
@@ -62,7 +62,7 @@ public class NodeCommentMap {
*/
public List<IASTComment> getTrailingCommentsForNode(IASTNode node) {
List<IASTComment> list = trailingMap.get(node);
- return list != null ? list : new ArrayList<IASTComment>();
+ return list != null ? list : new ArrayList<>();
}
/**
@@ -73,7 +73,7 @@ public class NodeCommentMap {
public void addLeadingCommentToNode(IASTNode node, IASTComment comment) {
List<IASTComment> comments = leadingMap.get(node);
if (comments == null) {
- comments = new ArrayList<IASTComment>();
+ comments = new ArrayList<>();
}
comments.add(comment);
leadingMap.put(node, comments);
@@ -88,7 +88,7 @@ public class NodeCommentMap {
*/
public List<IASTComment> getLeadingCommentsForNode(IASTNode node) {
List<IASTComment> list = leadingMap.get(node);
- return list != null ? list : new ArrayList<IASTComment>();
+ return list != null ? list : new ArrayList<>();
}
/**
@@ -99,7 +99,7 @@ public class NodeCommentMap {
public void addFreestandingCommentToNode(IASTNode node, IASTComment comment) {
List<IASTComment> comments = freestandingMap.get(node);
if (comments == null) {
- comments = new ArrayList<IASTComment>();
+ comments = new ArrayList<>();
}
comments.add(comment);
freestandingMap.put(node, comments);
@@ -114,7 +114,7 @@ public class NodeCommentMap {
*/
public List<IASTComment> getFreestandingCommentsForNode(IASTNode node) {
List<IASTComment> list = freestandingMap.get(node);
- return list != null ? list : new ArrayList<IASTComment>();
+ return list != null ? list : new ArrayList<>();
}
/**
@@ -149,7 +149,7 @@ public class NodeCommentMap {
* @return List
*/
public List<IASTComment> getAllCommentsForNode(IASTNode node) {
- List<IASTComment> comment = new ArrayList<IASTComment>();
+ List<IASTComment> comment = new ArrayList<>();
comment.addAll(getFreestandingCommentsForNode(node));
comment.addAll(getLeadingCommentsForNode(node));
comment.addAll(getTrailingCommentsForNode(node));
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/commenthandler/NodeCommenter.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/commenthandler/NodeCommenter.java
index 378f98c5cc..65f9aac1c0 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/commenthandler/NodeCommenter.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/commenthandler/NodeCommenter.java
@@ -73,7 +73,7 @@ public class NodeCommenter {
this.visitor = visitor;
this.commentHandler = commHandler;
this.commentMap = commentMap;
- this.children = new ArrayList<IASTNode>();
+ this.children = new ArrayList<>();
}
protected void writeNodeList(IASTNode[] nodes) {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/CIndex.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/CIndex.java
index 530bf307be..a95f8b3e64 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/CIndex.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/CIndex.java
@@ -322,7 +322,7 @@ public class CIndex implements IIndex {
Collection<IIndexFile> in = Collections.singletonList(file);
Set<FileContentKey> handled = new HashSet<>();
while (true) {
- Collection<IIndexFile> nextLevel = depth != 0 ? new ArrayDeque<IIndexFile>() : null;
+ Collection<IIndexFile> nextLevel = depth != 0 ? new ArrayDeque<>() : null;
for (IIndexFile indexFile : in) {
IIndexFragmentFile file1 = (IIndexFragmentFile) indexFile;
for (IIndexFragment fragment : fFragments) {
@@ -362,7 +362,7 @@ public class CIndex implements IIndex {
Collection<IIndexFile> in = Collections.singletonList(file);
Set<Object> handled = new HashSet<>();
while (true) {
- Collection<IIndexFile> nextLevel = depth != 0 ? new ArrayDeque<IIndexFile>() : null;
+ Collection<IIndexFile> nextLevel = depth != 0 ? new ArrayDeque<>() : null;
for (IIndexFile indexFile : in) {
IIndexFragmentFile file1 = (IIndexFragmentFile) indexFile;
IIndexInclude[] includes = file1.getIncludes();
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/IndexBasedFileContentProvider.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/IndexBasedFileContentProvider.java
index bc7d040d14..374d75bdc5 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/IndexBasedFileContentProvider.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/IndexBasedFileContentProvider.java
@@ -63,7 +63,7 @@ public final class IndexBasedFileContentProvider extends InternalFileContentProv
private final AbstractIndexerTask fRelatedIndexerTask;
private long fFileSizeLimit = 0;
private IIndexFile[] fContextToHeaderGap;
- private final Map<IIndexFileLocation, IFileNomination> fPragmaOnce = new HashMap<IIndexFileLocation, IFileNomination>();
+ private final Map<IIndexFileLocation, IFileNomination> fPragmaOnce = new HashMap<>();
private Set<String> fHeadersToIndexAllVersions = Collections.emptySet();
private boolean fIndexAllHeaderVersions;
@@ -133,11 +133,11 @@ public final class IndexBasedFileContentProvider extends InternalFileContentProv
IIndexFile file = selectIndexFile(macroDictionary, ifl);
if (file != null) {
try {
- List<IIndexFile> files = new ArrayList<IIndexFile>();
- List<IIndexMacro> macros = new ArrayList<IIndexMacro>();
- List<ICPPUsingDirective> directives = new ArrayList<ICPPUsingDirective>();
- Map<IIndexFileLocation, IFileNomination> newPragmaOnce = new HashMap<IIndexFileLocation, IFileNomination>();
- LinkedHashSet<IIndexFile> preLoaded = new LinkedHashSet<IIndexFile>();
+ List<IIndexFile> files = new ArrayList<>();
+ List<IIndexMacro> macros = new ArrayList<>();
+ List<ICPPUsingDirective> directives = new ArrayList<>();
+ Map<IIndexFileLocation, IFileNomination> newPragmaOnce = new HashMap<>();
+ LinkedHashSet<IIndexFile> preLoaded = new LinkedHashSet<>();
collectFileContent(file, null, newPragmaOnce, preLoaded, files, macros, directives, null);
// Report pragma once inclusions, only if no exception was thrown.
fPragmaOnce.putAll(newPragmaOnce);
@@ -164,7 +164,7 @@ public final class IndexBasedFileContentProvider extends InternalFileContentProv
}
public List<String> toPathList(Collection<IIndexFileLocation> newPragmaOnce) {
- List<String> newPragmaOncePaths = new ArrayList<String>(newPragmaOnce.size());
+ List<String> newPragmaOncePaths = new ArrayList<>(newPragmaOnce.size());
for (IIndexFileLocation l : newPragmaOnce) {
newPragmaOncePaths.add(fPathResolver.getASTPath(l));
}
@@ -207,7 +207,7 @@ public final class IndexBasedFileContentProvider extends InternalFileContentProv
if (fPragmaOnce.containsKey(ifl))
return false;
} else {
- preventRecursion = new HashSet<IIndexFile>();
+ preventRecursion = new HashSet<>();
}
if (!preventRecursion.add(file))
return false;
@@ -267,11 +267,11 @@ public final class IndexBasedFileContentProvider extends InternalFileContentProv
if (contextFile == null || targetFile == null || contextFile == targetFile)
return null;
- Map<IIndexFileLocation, IFileNomination> newPragmaOnce = new HashMap<IIndexFileLocation, IFileNomination>();
- List<IIndexFile> filesIncluded = new ArrayList<IIndexFile>();
- ArrayList<IIndexMacro> macros = new ArrayList<IIndexMacro>();
- ArrayList<ICPPUsingDirective> directives = new ArrayList<ICPPUsingDirective>();
- LinkedHashSet<IIndexFile> preLoaded = new LinkedHashSet<IIndexFile>();
+ Map<IIndexFileLocation, IFileNomination> newPragmaOnce = new HashMap<>();
+ List<IIndexFile> filesIncluded = new ArrayList<>();
+ ArrayList<IIndexMacro> macros = new ArrayList<>();
+ ArrayList<ICPPUsingDirective> directives = new ArrayList<>();
+ LinkedHashSet<IIndexFile> preLoaded = new LinkedHashSet<>();
if (!collectFileContent(contextFile, targetFile, newPragmaOnce, preLoaded, filesIncluded, macros,
directives, new HashSet<IIndexFile>())) {
return null;
@@ -287,7 +287,7 @@ public final class IndexBasedFileContentProvider extends InternalFileContentProv
}
private List<FileVersion> toList(LinkedHashSet<IIndexFile> preLoaded) throws CoreException {
- List<FileVersion> result = new ArrayList<InternalFileContent.FileVersion>(preLoaded.size());
+ List<FileVersion> result = new ArrayList<>(preLoaded.size());
for (IIndexFile file : preLoaded) {
String path = fPathResolver.getASTPath(file.getLocation());
result.add(new FileVersion(path, file.getSignificantMacros()));
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/IndexFactory.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/IndexFactory.java
index b8bd5f7b64..46e70ee569 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/IndexFactory.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/IndexFactory.java
@@ -77,7 +77,7 @@ public class IndexFactory {
Collection<ICProject> indexProjects = getProjects(projects, addDependencies, addDependent,
new HashSet<IProject>());
- HashMap<String, IIndexFragment> fragments = new LinkedHashMap<String, IIndexFragment>();
+ HashMap<String, IIndexFragment> fragments = new LinkedHashMap<>();
for (ICProject cproject : indexProjects) {
IIndexFragment pdom = fPDOMManager.getPDOM(cproject);
if (pdom != null) {
@@ -106,7 +106,7 @@ public class IndexFactory {
private Collection<ICProject> getProjects(ICProject[] projects, boolean addDependencies, boolean addDependent,
Set<IProject> handled) {
- List<ICProject> result = new ArrayList<ICProject>();
+ List<ICProject> result = new ArrayList<>();
for (ICProject cproject : projects) {
checkAddProject(cproject, handled, result);
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/AbstractCompositeFactory.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/AbstractCompositeFactory.java
index 7be14caaa5..c16920c819 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/AbstractCompositeFactory.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/AbstractCompositeFactory.java
@@ -93,7 +93,7 @@ public abstract class AbstractCompositeFactory implements ICompositesFactory {
* @return an array of unique bindings
*/
protected IIndexFragmentBinding[] mergeBindingArrays(IIndexFragmentBinding[][] fragmentBindings) {
- TreeSet<IIndexFragmentBinding> ts = new TreeSet<IIndexFragmentBinding>(fragmentComparator);
+ TreeSet<IIndexFragmentBinding> ts = new TreeSet<>(fragmentComparator);
for (IIndexFragmentBinding[] array : fragmentBindings) {
if (array != null) {
for (IIndexFragmentBinding element : array) {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPClassSpecialization.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPClassSpecialization.java
index 9c1c38b431..37f0da7e43 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPClassSpecialization.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPClassSpecialization.java
@@ -48,7 +48,7 @@ public class CompositeCPPClassSpecialization extends CompositeCPPClassType imple
private final ThreadLocal<Set<IBinding>> fInProgress = new ThreadLocal<Set<IBinding>>() {
@Override
protected Set<IBinding> initialValue() {
- return new HashSet<IBinding>();
+ return new HashSet<>();
}
};
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeInstanceCache.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeInstanceCache.java
index 244d093482..3dd1afca19 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeInstanceCache.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeInstanceCache.java
@@ -47,7 +47,7 @@ public class CompositeInstanceCache {
private ICPPDeferredClassInstance fDeferredInstance;
public CompositeInstanceCache() {
- fMap = new HashMap<String, ICPPTemplateInstance>();
+ fMap = new HashMap<>();
}
synchronized public final void addInstance(ICPPTemplateArgument[] arguments, ICPPTemplateInstance instance) {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/provider/IndexProviderManager.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/provider/IndexProviderManager.java
index 40a227bb81..20c66dac25 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/provider/IndexProviderManager.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/provider/IndexProviderManager.java
@@ -101,14 +101,14 @@ public final class IndexProviderManager implements IElementChangedListener {
*/
public void reset(VersionRange pdomVersionRange) {
this.fragmentProviders = new IIndexFragmentProvider[0];
- this.provisionMap = new HashMap<ProvisionMapKey, Boolean>();
+ this.provisionMap = new HashMap<>();
this.pdomVersionRange = pdomVersionRange;
- this.compatibleFragmentUnavailable = new HashSet<String>();
+ this.compatibleFragmentUnavailable = new HashSet<>();
}
public void startup() {
- List<IIndexFragmentProvider> providers = new ArrayList<IIndexFragmentProvider>();
- List<IConfigurationElement[]> usageSpecifications = new ArrayList<IConfigurationElement[]>();
+ List<IIndexFragmentProvider> providers = new ArrayList<>();
+ List<IConfigurationElement[]> usageSpecifications = new ArrayList<>();
IExtensionRegistry registry = Platform.getExtensionRegistry();
IExtensionPoint indexProviders = registry.getExtensionPoint(CCorePlugin.INDEX_UNIQ_ID);
for (IExtension extension : indexProviders.getExtensions()) {
@@ -189,7 +189,7 @@ public final class IndexProviderManager implements IElementChangedListener {
*/
public IIndexFragment[] getProvidedIndexFragments(ICConfigurationDescription config, int usage)
throws CoreException {
- Map<String, IIndexFragment> id2fragment = new HashMap<String, IIndexFragment>();
+ Map<String, IIndexFragment> id2fragment = new HashMap<>();
IProject project = config.getProjectDescription().getProject();
for (int i = 0; i < fragmentProviders.length; i++) {
@@ -215,7 +215,7 @@ public final class IndexProviderManager implements IElementChangedListener {
}
// Make log entries for any fragments which have no compatible equivalents
- List<IIndexFragment> preresult = new ArrayList<IIndexFragment>();
+ List<IIndexFragment> preresult = new ArrayList<>();
for (Map.Entry<String, IIndexFragment> entry : id2fragment.entrySet()) {
if (entry.getValue() == null) {
String key = entry.getKey();
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/provider/PDOMCache.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/provider/PDOMCache.java
index e10ec6a912..ad7a40789c 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/provider/PDOMCache.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/provider/PDOMCache.java
@@ -35,7 +35,7 @@ class PDOMCache {
private static Object singletonMutex = new Object();
private PDOMCache() {
- this.path2pdom = new HashMap<File, PDOM>();
+ this.path2pdom = new HashMap<>();
}
/**
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/provider/ReadOnlyPDOMProviderBridge.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/provider/ReadOnlyPDOMProviderBridge.java
index f1f1a7657d..0f7404f924 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/provider/ReadOnlyPDOMProviderBridge.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/provider/ReadOnlyPDOMProviderBridge.java
@@ -36,7 +36,7 @@ public class ReadOnlyPDOMProviderBridge implements IIndexFragmentProvider {
@Override
public IIndexFragment[] getIndexFragments(ICConfigurationDescription config) throws CoreException {
- List<PDOM> result = new ArrayList<PDOM>();
+ List<PDOM> result = new ArrayList<>();
IPDOMDescriptor[] descriptions = provider.getDescriptors(config);
if (descriptions != null) {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/indexer/FileEncodingRegistry.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/indexer/FileEncodingRegistry.java
index 8934321f93..24e905984d 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/indexer/FileEncodingRegistry.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/indexer/FileEncodingRegistry.java
@@ -34,7 +34,7 @@ public class FileEncodingRegistry implements Serializable {
public FileEncodingRegistry(String defaultEncoding) {
this.defaultEncoding = defaultEncoding;
- fFilePathToEncodingMap = new TreeMap<String, String>();
+ fFilePathToEncodingMap = new TreeMap<>();
}
public void setDefaultEncoding(String newDefaultEncoding) {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/indexer/StandaloneIndexer.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/indexer/StandaloneIndexer.java
index a8a4d2a818..9e958f3e5b 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/indexer/StandaloneIndexer.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/indexer/StandaloneIndexer.java
@@ -435,7 +435,7 @@ public abstract class StandaloneIndexer {
* @return
*/
private List<String> getFilesAdded(List<String> tus) {
- List<String> added = new ArrayList<String>();
+ List<String> added = new ArrayList<>();
FilenameFilter filter = getExclusionFilter();
if (filter == null) {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/indexer/StandaloneIndexerInputAdapter.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/indexer/StandaloneIndexerInputAdapter.java
index 4a244ba0eb..064a34a992 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/indexer/StandaloneIndexerInputAdapter.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/indexer/StandaloneIndexerInputAdapter.java
@@ -39,7 +39,7 @@ import org.eclipse.core.runtime.Path;
* @since 5.0
*/
public class StandaloneIndexerInputAdapter extends IndexerInputAdapter {
- private final HashMap<String, IIndexFileLocation> fIflCache = new HashMap<String, IIndexFileLocation>();
+ private final HashMap<String, IIndexFileLocation> fIflCache = new HashMap<>();
private final FileExistsCache fExistsCache;
private final StandaloneIndexer fIndexer;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/EmptyIterator.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/EmptyIterator.java
index 40c40ea7ef..cf4d162444 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/EmptyIterator.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/EmptyIterator.java
@@ -17,7 +17,7 @@ import java.util.Iterator;
import java.util.NoSuchElementException;
public final class EmptyIterator<T> implements Iterator<T> {
- public static final EmptyIterator<?> EMPTY_ITERATOR = new EmptyIterator<Object>();
+ public static final EmptyIterator<?> EMPTY_ITERATOR = new EmptyIterator<>();
@SuppressWarnings("unchecked")
public static <T> EmptyIterator<T> empty() {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/ASTPreprocessorNode.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/ASTPreprocessorNode.java
index 19997ccd30..4716f38abe 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/ASTPreprocessorNode.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/ASTPreprocessorNode.java
@@ -708,7 +708,7 @@ class ASTInclusionNode implements IASTInclusionNode {
@Override
public IASTInclusionNode[] getNestedInclusions() {
if (fInclusions == null) {
- ArrayList<IASTInclusionNode> result = new ArrayList<IASTInclusionNode>();
+ ArrayList<IASTInclusionNode> result = new ArrayList<>();
fLocationCtx.getInclusions(result);
fInclusions = result.toArray(new IASTInclusionNode[result.size()]);
}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/LazyCharArray.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/LazyCharArray.java
index e4c98e7dc7..7aa2f983a0 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/LazyCharArray.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/LazyCharArray.java
@@ -38,12 +38,12 @@ public abstract class LazyCharArray extends AbstractCharArray {
fCharEndOffset = charOffset + chars.length;
fSourceOffset = sourceOffset;
fSourceEndOffset = sourceEndOffset;
- fCharsReference = new SoftReference<char[]>(chars);
+ fCharsReference = new SoftReference<>(chars);
}
}
private int fLength = -1;
- private List<Chunk> fChunks = new ArrayList<Chunk>();
+ private List<Chunk> fChunks = new ArrayList<>();
private StreamHasher fHasher;
private long fHash64;
// Make a reference to the currently used char[], such that it is not collected.
@@ -182,7 +182,7 @@ public abstract class LazyCharArray extends AbstractCharArray {
if (data == null) {
data = new char[chunk.fCharEndOffset - chunk.fCharOffset];
rereadChunkData(chunk, data);
- chunk.fCharsReference = new SoftReference<char[]>(data);
+ chunk.fCharsReference = new SoftReference<>(data);
}
return fCurrentChars = data;
}
@@ -198,7 +198,7 @@ public abstract class LazyCharArray extends AbstractCharArray {
*/
public void testClearData() {
for (Chunk chunk : fChunks) {
- chunk.fCharsReference = new SoftReference<char[]>(null);
+ chunk.fCharsReference = new SoftReference<>(null);
}
if (fCurrentChars != null)
fCurrentChars = null;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/MacroExpander.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/MacroExpander.java
index 3fad817a9b..a292c8bd94 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/MacroExpander.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/MacroExpander.java
@@ -130,8 +130,8 @@ public class MacroExpander {
private final CharArrayMap<PreprocessorMacro> fDictionary;
private final LocationMap fLocationMap;
private final LexerOptions fLexOptions;
- private ArrayList<IASTName> fImplicitMacroExpansions = new ArrayList<IASTName>();
- private ArrayList<ImageLocationInfo> fImageLocationInfos = new ArrayList<ImageLocationInfo>();
+ private ArrayList<IASTName> fImplicitMacroExpansions = new ArrayList<>();
+ private ArrayList<ImageLocationInfo> fImageLocationInfos = new ArrayList<>();
private boolean fCompletionMode;
private int fStartOffset;
private int fEndOffset;
@@ -173,7 +173,7 @@ public class MacroExpander {
fEndOffset = identifier.getEndOffset();
fCompletionMode = completionMode;
- IdentityHashMap<PreprocessorMacro, PreprocessorMacro> forbidden = new IdentityHashMap<PreprocessorMacro, PreprocessorMacro>();
+ IdentityHashMap<PreprocessorMacro, PreprocessorMacro> forbidden = new IdentityHashMap<>();
// setup input sequence
TokenSource input = new TokenSource(lexer);
@@ -232,7 +232,7 @@ public class MacroExpander {
fStartOffset = identifier.getOffset();
fEndOffset = identifier.getEndOffset();
fCompletionMode = false;
- IdentityHashMap<PreprocessorMacro, PreprocessorMacro> forbidden = new IdentityHashMap<PreprocessorMacro, PreprocessorMacro>();
+ IdentityHashMap<PreprocessorMacro, PreprocessorMacro> forbidden = new IdentityHashMap<>();
// setup input sequence
TokenSource input = new TokenSource(lexer);
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/MacroExpansionTracker.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/MacroExpansionTracker.java
index 44de7cc5ac..0f55e98f95 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/MacroExpansionTracker.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/MacroExpansionTracker.java
@@ -26,7 +26,7 @@ import org.eclipse.text.edits.ReplaceEdit;
public class MacroExpansionTracker {
public class MacroInfo {
private TokenList fMacroCall = new TokenList();
- private ArrayList<TokenList> fArguments = new ArrayList<TokenList>();
+ private ArrayList<TokenList> fArguments = new ArrayList<>();
public MacroInfo(Token identifier) {
fMacroCall.append(identifier);
@@ -46,7 +46,7 @@ public class MacroExpansionTracker {
private char[] fInput;
private String fReplacementText = ""; //$NON-NLS-1$
- private LinkedList<MacroInfo> fMacroStack = new LinkedList<MacroInfo>();
+ private LinkedList<MacroInfo> fMacroStack = new LinkedList<>();
private IToken fReplaceFrom;
private IToken fReplaceTo;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/MultiMacroExpansionExplorer.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/MultiMacroExpansionExplorer.java
index 92ff75e22a..6005cfd371 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/MultiMacroExpansionExplorer.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/MultiMacroExpansionExplorer.java
@@ -119,7 +119,7 @@ public class MultiMacroExpansionExplorer extends MacroExpansionExplorer {
for (IASTPreprocessorMacroExpansion expansion : expansions) {
IASTName ref = expansion.getMacroReference();
if (ref != null) {
- ArrayList<IASTName> refs = new ArrayList<IASTName>();
+ ArrayList<IASTName> refs = new ArrayList<>();
refs.add(ref);
refs.addAll(Arrays.asList(expansion.getNestedMacroReferences()));
IASTFileLocation refLoc = expansion.getFileLocation();
@@ -166,7 +166,7 @@ public class MultiMacroExpansionExplorer extends MacroExpansionExplorer {
}
private Map<IMacroBinding, IASTFileLocation> getMacroLocations(final ILocationResolver resolver) {
- final Map<IMacroBinding, IASTFileLocation> result = new HashMap<IMacroBinding, IASTFileLocation>();
+ final Map<IMacroBinding, IASTFileLocation> result = new HashMap<>();
addLocations(resolver.getBuiltinMacroDefinitions(), result);
addLocations(resolver.getMacroDefinitions(), result);
return result;
@@ -203,7 +203,7 @@ public class MultiMacroExpansionExplorer extends MacroExpansionExplorer {
* Combines the replace edits of the leading delegates.
*/
private List<ReplaceEdit> combineReplaceEdits(int count) {
- ArrayList<ReplaceEdit> edits = new ArrayList<ReplaceEdit>();
+ ArrayList<ReplaceEdit> edits = new ArrayList<>();
for (int i = 0; i < count; i++) {
IMacroExpansionStep step = fDelegates[i].getFullExpansion();
shiftAndAddEdits(fBoundaries[2 * i], step.getReplacements(), edits);
@@ -264,7 +264,7 @@ public class MultiMacroExpansionExplorer extends MacroExpansionExplorer {
before.append(dresult.getCodeBeforeStep());
before.append(fSource, end, fSource.length - end);
- List<ReplaceEdit> replacements = new ArrayList<ReplaceEdit>();
+ List<ReplaceEdit> replacements = new ArrayList<>();
shiftAndAddEdits(shift, dresult.getReplacements(), replacements);
fCachedStep = new MacroExpansionStep(before.toString(), dresult.getExpandedMacro(),
dresult.getLocationOfExpandedMacroDefinition(),
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/ScannerContext.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/ScannerContext.java
index e3b822970e..9afbae833b 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/ScannerContext.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/ScannerContext.java
@@ -126,7 +126,7 @@ final class ScannerContext {
*/
public final Conditional newBranch(BranchKind branchKind, boolean withinExpansion) {
if (fConditionals == null) {
- fConditionals = new ArrayList<Conditional>();
+ fConditionals = new ArrayList<>();
}
Conditional result;
@@ -325,7 +325,7 @@ final class ScannerContext {
public void trackSignificantMacros() {
fInternalModifications = new CharArraySet(5);
- fSignificantMacros = new CharArrayObjectMap<char[]>(5);
+ fSignificantMacros = new CharArrayObjectMap<>(5);
}
public void setPragmaOnce(boolean val) {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/SingleMacroExpansionExplorer.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/SingleMacroExpansionExplorer.java
index e0d7b0b1f2..2ab2723bcb 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/SingleMacroExpansionExplorer.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/SingleMacroExpansionExplorer.java