Skip to main content
summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorJonah Graham2018-11-20 11:20:42 -0500
committerJonah Graham2018-11-22 16:55:36 -0500
commitcaf2292768deccd885b5b6989b731742e2e5edf4 (patch)
tree711a6088f2e17c7e31ebb51af1eadc1af00768e5 /build
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 'build')
-rw-r--r--build/org.eclipse.cdt.make.core.tests/src/org/eclipse/cdt/make/scannerdiscovery/TestScannerInfoCollector.java6
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakeBuilder.java4
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakeCorePlugin.java8
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakeScannerInfo.java6
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakeScannerProvider.java6
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/scannerconfig/DiscoveredScannerInfo.java20
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/scannerconfig/DiscoveredScannerInfoProvider.java2
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/scannerconfig/PathInfo.java6
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/BuildInfoFactory.java2
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/MakeProject.java2
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/MakeTargetManager.java8
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/ProjectTargets.java6
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/AbstractMakefile.java24
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/Parent.java4
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/Rule.java2
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/GNUMakefile.java6
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/GNUMakefileChecker.java2
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/posix/PosixMakefileUtil.java2
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/CDataDiscoveredInfoCalculator.java40
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/DiscoveredPathContainer.java2
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/DiscoveredPathInfo.java16
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/DiscoveredPathManager.java6
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/DiscoveredScannerInfoStore.java4
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/PerFileDiscoveredPathContainer.java2
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/ScannerConfigUtil.java10
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/AbstractGCCBOPConsoleParser.java4
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/AbstractGCCBOPConsoleParserUtility.java4
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/GCCPerFileBOPConsoleParser.java4
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/GCCPerFileBOPConsoleParserUtility.java14
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/GCCPerFileSIPConsoleParser.java8
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/GCCScannerInfoConsoleParser.java12
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/GCCSpecsConsoleParser.java6
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/ScannerInfoConsoleParserUtility.java8
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/util/CCommandDSC.java22
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/util/CygpathTranslator.java2
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/util/SymbolEntry.java6
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/DefaultRunSIProvider.java4
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/PerFileSICollector.java38
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/PerProjectSICollector.java18
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/SCMarkerGenerator.java2
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/ScannerConfigInfoFactory2.java30
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/ScannerConfigProfile.java4
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/ScannerConfigProfileManager.java10
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/MakeEnvironmentBlock.java6
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/MultipleInputDialog.java8
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/dnd/FileTransferDropTargetListener.java2
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/dnd/LocalTransferDropTargetListener.java2
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/dnd/MakeTargetDndUtil.java2
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/dnd/MakeTargetTransferData.java4
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/dnd/TextTransferDropTargetListener.java2
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/AddBuildTargetAction.java2
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/MakefileContentOutlinePage.java2
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/MakefileToggleCommentAction.java2
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/NotifyingReconciler.java2
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/OpenIncludeAction.java2
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/ProjectionMakefileUpdater.java16
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/WorkingCopyManager.java2
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/preferences/AbstractMakefileEditorPreferencePage.java6
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/preferences/MakefileEditorPreferencePage.java4
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/scannerconfig/DiscoveredElement.java4
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/text/ColorManager.java2
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/text/makefile/AbstractMakefileCodeScanner.java2
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/text/makefile/MakefileCodeScanner.java2
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/text/makefile/MakefileCompletionProcessor.java14
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/text/makefile/MakefilePartitionScanner.java2
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/MakeContentProvider.java10
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/TargetBuild.java2
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/actions/UpdateMakeProjectAction.java4
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/dialogs/AbstractDiscoveryOptionsBlock.java4
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/dialogs/DiscoveredPathContainerPage.java16
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/dialogs/DiscoveryOptionsBlock.java4
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core.tests/suite/org/eclipse/cdt/managedbuilder/testplugin/AbstractBuilderTest.java6
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core.tests/suite/org/eclipse/cdt/managedbuilder/testplugin/BuildSystemTestHelper.java4
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core.tests/suite/org/eclipse/cdt/managedbuilder/testplugin/ManagedBuildTestHelper.java14
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core.tests/suite/org/eclipse/cdt/managedbuilder/testplugin/ResourceDeltaVerifier.java8
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core.tests/suite/org/eclipse/cdt/managedbuilder/tests/suite/Preconditions.java4
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/regressions/Bug_303953.java2
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/BuildDescriptionModelTests.java18
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/BuildSystem40Tests.java18
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/DefaultFortranDependencyCalculator.java10
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ManagedBuildCoreTests.java10
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ManagedBuildDependencyCalculatorTests.java4
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ManagedBuildDependencyLibsTests.java2
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ManagedBuildMacrosTests.java6
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ManagedProject21MakefileTests.java4
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ManagedProjectUpdateTests.java2
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/MultiVersionSupportTests.java2
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/TestConfigElement.java4
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ToolChainModificationTests.java20
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/language/settings/providers/tests/BuiltinSpecsDetectorTest.java18
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/language/settings/providers/tests/GCCBuildCommandParserTest.java18
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/language/settings/providers/tests/GCCBuiltinSpecsDetectorTest.java2
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/templateengine/tests/TemplateEngineTestsHelper.java4
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/projectmodel/tests/BackwardCompatiblityTests.java2
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/projectmodel/tests/OptionStringListValueTests.java12
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/projectmodel/tests/ProjectModelTests.java2
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/build/internal/core/scannerconfig/CfgDiscoveredPathManager.java2
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/build/internal/core/scannerconfig/CfgScannerConfigUtil.java6
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/build/internal/core/scannerconfig/PerFileSettingsCalculator.java40
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/build/internal/core/scannerconfig2/CfgScannerConfigInfoFactory2.java6
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/buildmodel/BuildDescriptionManager.java8
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ExternalBuildRunner.java6
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/InternalBuildRunner.java2
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ManagedBuildManager.java62
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ManagedCProjectNature.java4
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ResourceChangeHandler2.java8
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/BuildCommand.java4
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/BuildDescription.java42
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/BuildGroup.java2
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/BuildIOType.java2
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/BuildProcessManager.java4
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/BuildResource.java4
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/BuildStep.java18
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/CommandBuilder.java2
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/ConfigurationBuildState.java8
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/DbgUtil.java2
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/DescriptionBuilder.java2
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/GenDirInfo.java2
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/ParallelBuilder.java8
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/ProjectBuildState.java4
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildproperties/BuildProperties.java6
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildproperties/BuildPropertyManager.java6
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildproperties/BuildPropertyType.java2
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/AdditionalInput.java2
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/BooleanExpressionApplicabilityCalculator.java2
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/BuildObjectProperties.java4
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/BuildSettingsUtil.java8
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Builder.java16
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/BuilderFactory.java8
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/CommonBuilder.java18
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Configuration.java32
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ConfigurationV2.java10
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ConverterInfo.java6
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/FolderInfo.java52
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/GeneratedMakefileBuilder.java18
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/HeadlessBuilder.java18
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/HeadlessBuilderExternalSettingsProvider.java4
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/HoldsOptions.java16
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/InputType.java26
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ManagedBuildInfo.java18
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ManagedConfigStorageElement.java4
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ManagedProject.java8
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/MapStorageElement.java16
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ModificationStatus.java6
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/MultiConfiguration.java2
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/NotificationManager.java2
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Option.java42
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/OptionCategory.java2
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/OptionReference.java10
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ProjectType.java10
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/PropertyManager.java2
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ResourceChangeHandler.java8
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ResourceConfiguration.java8
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ResourceInfoContainer.java2
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/SupportedProperties.java8
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Target.java22
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/TargetPlatform.java24
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Tool.java72
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ToolChain.java46
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ToolChainModificationHelper.java18
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ToolListModificationInfo.java26
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ToolReference.java6
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/dataprovider/BuildEntryStorage.java12
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/dataprovider/BuildEnvironmentContributor.java2
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/dataprovider/BuildLanguageData.java16
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/dataprovider/BuildSystemSpecificVariableSubstitutor.java6
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/dataprovider/ConfigurationDataProvider.java8
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/dataprovider/ProjectConverter.java14
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/dataprovider/ResourcePropertyHolder.java4
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/enablement/AdjustmentContext.java4
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/enablement/CompositeExpression.java4
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/enablement/OptionEnablementExpression.java2
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/envvar/EnvironmentVariableProvider.java4
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/envvar/MbsEnvironmentSupplier.java2
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/envvar/StoredBuildPathEnvironmentContainer.java2
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/language/settings/providers/MBSLanguageSettingsProvider.java2
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/macros/BuildMacroProvider.java2
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/macros/BuildfileMacroSubstitutor.java4
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/macros/ExplicitFileMacroCollector.java2
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/macros/FileContextBuildMacroValues.java4
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/scannerconfig/ManagedBuildCPathEntryContainer.java2
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/ConfigurationModification.java6
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/ConflictSet.java10
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/FileInfoModification.java2
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/FolderInfoModification.java20
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/ObjectSet.java2
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/PathComparator.java8
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/PerTypeMapStorage.java4
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/PerTypeSetStorage.java4
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/TcModificationUtil.java46
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/ToolChainModificationManager.java10
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/ToolListMap.java4
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/ToolListModification.java22
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/extension/MatchObjectElement.java10
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/extension/RulesManager.java14
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/language/settings/providers/AbstractBuildCommandParser.java2
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/language/settings/providers/AbstractBuiltinSpecsDetector.java12
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/language/settings/providers/AbstractLanguageSettingsOutputScanner.java8
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/language/settings/providers/GCCBuiltinSpecsDetector.java2
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/language/settings/providers/ToolchainBuiltinSpecsDetector.java2
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/makegen/gnu/DefaultGCCDependencyCalculatorPreBuildCommands.java2
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/makegen/gnu/GnuMakefileGenerator.java96
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/makegen/gnu/ManagedBuildGnuToolInfo.java66
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/pdomdepgen/PDOMDependencyCalculator.java2
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/projectconverter/UpdateManagedProject12.java14
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/projectconverter/UpdateManagedProject20.java2
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/projectconverter/UpdateManagedProjectManager.java4
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/templateengine/ProjectCreatedActions.java4
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/templateengine/processes/ExcludeResources.java4
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/newmake/core/MakeScannerInfo.java6
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/newmake/core/MakeScannerProvider.java6
-rw-r--r--build/org.eclipse.cdt.managedbuilder.gnu.ui/src/org/eclipse/cdt/managedbuilder/gnu/cygwin/CygwinPathResolver.java2
-rw-r--r--build/org.eclipse.cdt.managedbuilder.gnu.ui/src/org/eclipse/cdt/managedbuilder/gnu/templates/SimpleMakefileGenerator.java2
-rw-r--r--build/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/TestCustomPageManager.java18
-rw-r--r--build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/internal/ui/commands/BuildFilesHandler.java2
-rw-r--r--build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/internal/ui/commands/ConvertTargetDialog.java2
-rw-r--r--build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ArtifactTab.java6
-rw-r--r--build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BuildOptionSettingsUI.java16
-rw-r--r--build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BuildStepsTab.java10
-rw-r--r--build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BuildToolSettingUI.java18
-rw-r--r--build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/CPropertyVarsTab.java6
-rw-r--r--build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/DiscoveryTab.java14
-rw-r--r--build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/FileListControlFieldEditor.java2
-rw-r--r--build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/NewCfgDialog.java10
-rw-r--r--build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/RefreshPolicyExceptionDialog.java2
-rw-r--r--build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/RefreshPolicyTab.java22
-rw-r--r--build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ToolChainEditTab.java6
-rw-r--r--build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ToolListContentProvider.java4
-rw-r--r--build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ToolListElement.java2
-rw-r--r--build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ToolSelectionDialog.java10
-rw-r--r--build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ToolSettingsTab.java10
-rw-r--r--build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/CDTConfigWizardPage.java4
-rw-r--r--build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/CfgHolder.java4
-rw-r--r--build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/MBSWizardHandler.java20
-rw-r--r--build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/ManagedBuildWizard.java2
-rw-r--r--build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/NewMakeProjFromExistingPage.java4
236 files changed, 1135 insertions, 1135 deletions
diff --git a/build/org.eclipse.cdt.make.core.tests/src/org/eclipse/cdt/make/scannerdiscovery/TestScannerInfoCollector.java b/build/org.eclipse.cdt.make.core.tests/src/org/eclipse/cdt/make/scannerdiscovery/TestScannerInfoCollector.java
index 475721ecdc..9e6d56178d 100644
--- a/build/org.eclipse.cdt.make.core.tests/src/org/eclipse/cdt/make/scannerdiscovery/TestScannerInfoCollector.java
+++ b/build/org.eclipse.cdt.make.core.tests/src/org/eclipse/cdt/make/scannerdiscovery/TestScannerInfoCollector.java
@@ -28,8 +28,8 @@ import org.eclipse.cdt.make.internal.core.scannerconfig.util.CCommandDSC;
@SuppressWarnings({ "rawtypes", "unchecked" })
final class TestScannerInfoCollector implements IScannerInfoCollector {
- private HashMap<ScannerInfoTypes, List> fInfoMap = new HashMap<ScannerInfoTypes, List>();
- private HashMap<Object, Map<ScannerInfoTypes, List>> fResourceToInfoMap = new HashMap<Object, Map<ScannerInfoTypes, List>>();
+ private HashMap<ScannerInfoTypes, List> fInfoMap = new HashMap<>();
+ private HashMap<Object, Map<ScannerInfoTypes, List>> fResourceToInfoMap = new HashMap<>();
@Override
public void contributeToScannerConfig(Object resource, Map scannerInfo0) {
@@ -57,7 +57,7 @@ final class TestScannerInfoCollector implements IScannerInfoCollector {
private void addTo(ScannerInfoTypes type, List<String> col) {
List<String> target = fInfoMap.get(type);
if (target == null) {
- target = new ArrayList<String>();
+ target = new ArrayList<>();
fInfoMap.put(type, target);
}
target.addAll(col);
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakeBuilder.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakeBuilder.java
index d991fe8007..c39621de9e 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakeBuilder.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakeBuilder.java
@@ -199,7 +199,7 @@ public class MakeBuilder extends ACBuilder {
String[] errorParsers = info.getErrorParsers();
ErrorParserManager epm = new ErrorParserManager(getProject(), workingDirectoryURI, this, errorParsers);
- List<IConsoleParser> parsers = new ArrayList<IConsoleParser>();
+ List<IConsoleParser> parsers = new ArrayList<>();
if (!isOnlyClean) {
ICProjectDescription prjDescription = CoreModel.getDefault().getProjectDescription(project);
if (prjDescription != null) {
@@ -249,7 +249,7 @@ public class MakeBuilder extends ACBuilder {
private HashMap<String, String> getEnvironment(ICommandLauncher launcher, IMakeBuilderInfo info)
throws CoreException {
- HashMap<String, String> envMap = new HashMap<String, String>();
+ HashMap<String, String> envMap = new HashMap<>();
if (info.appendEnvironment()) {
@SuppressWarnings({ "unchecked", "rawtypes" })
Map<String, String> env = (Map) launcher.getEnvironment();
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakeCorePlugin.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakeCorePlugin.java
index 80d4ede4d3..26ffe7a00a 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakeCorePlugin.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakeCorePlugin.java
@@ -183,7 +183,7 @@ public class MakeCorePlugin extends Plugin {
public String[] getMakefileDirs() {
String stringList = getPluginPreferences().getString(MAKEFILE_DIRS);
StringTokenizer st = new StringTokenizer(stringList, File.pathSeparator + "\n\r");//$NON-NLS-1$
- ArrayList<String> v = new ArrayList<String>();
+ ArrayList<String> v = new ArrayList<>();
while (st.hasMoreElements()) {
v.add(st.nextToken());
}
@@ -198,7 +198,7 @@ public class MakeCorePlugin extends Plugin {
IMakefile makefile;
if (isGnuStyle) {
GNUMakefile gnu = new GNUMakefile();
- ArrayList<String> includeList = new ArrayList<String>();
+ ArrayList<String> includeList = new ArrayList<>();
includeList.add(new Path(file.getAbsolutePath()).removeLastSegments(1).toOSString());
includeList.addAll(Arrays.asList(gnu.getIncludeDirectories()));
includeList.addAll(Arrays.asList(makefileDirs));
@@ -246,7 +246,7 @@ public class MakeCorePlugin extends Plugin {
IMakefile makefile;
if (isGnuStyle) {
GNUMakefile gnu = new GNUMakefile();
- ArrayList<String> includeList = new ArrayList<String>();
+ ArrayList<String> includeList = new ArrayList<>();
includeList.add(new Path(fileURI.getPath()).removeLastSegments(1).toString());
includeList.addAll(Arrays.asList(gnu.getIncludeDirectories()));
includeList.addAll(Arrays.asList(makefileDirs));
@@ -372,7 +372,7 @@ public class MakeCorePlugin extends Plugin {
SI_CONSOLE_PARSER_SIMPLE_ID);
if (extension != null) {
IExtension[] extensions = extension.getExtensions();
- List<String> parserIds = new ArrayList<String>(extensions.length);
+ List<String> parserIds = new ArrayList<>(extensions.length);
for (int i = 0; i < extensions.length; i++) {
String parserId = extensions[i].getUniqueIdentifier();
if (parserId != null) {
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakeScannerInfo.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakeScannerInfo.java
index e863373c99..aed84fdf98 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakeScannerInfo.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakeScannerInfo.java
@@ -89,7 +89,7 @@ public class MakeScannerInfo implements IScannerInfo {
@Override
public synchronized Map<String, String> getDefinedSymbols() {
// Return the defined symbols for the default configuration
- HashMap<String, String> symbols = new HashMap<String, String>();
+ HashMap<String, String> symbols = new HashMap<>();
String[] symbolList = getPreprocessorSymbols();
for (int i = 0; i < symbolList.length; ++i) {
String symbol = symbolList[i];
@@ -112,7 +112,7 @@ public class MakeScannerInfo implements IScannerInfo {
protected List<String> getPathList() {
if (pathList == null) {
- pathList = new ArrayList<String>();
+ pathList = new ArrayList<>();
}
return pathList;
}
@@ -123,7 +123,7 @@ public class MakeScannerInfo implements IScannerInfo {
protected List<String> getSymbolList() {
if (symbolList == null) {
- symbolList = new ArrayList<String>();
+ symbolList = new ArrayList<>();
}
return symbolList;
}
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakeScannerProvider.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakeScannerProvider.java
index b398e6f089..b606691605 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakeScannerProvider.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakeScannerProvider.java
@@ -123,8 +123,8 @@ public class MakeScannerProvider extends ScannerProvider {
ICDescriptor descriptor = CCorePlugin.getDefault().getCProjectDescription(project);
ICStorageElement storage = descriptor.getProjectStorageElement(CDESCRIPTOR_ID);
- ArrayList<String> includes = new ArrayList<String>();
- ArrayList<String> symbols = new ArrayList<String>();
+ ArrayList<String> includes = new ArrayList<>();
+ ArrayList<String> symbols = new ArrayList<>();
for (ICStorageElement child : storage.getChildren()) {
if (child.getName().equals(INCLUDE_PATH)) {
// Add the path to the property list
@@ -145,7 +145,7 @@ public class MakeScannerProvider extends ScannerProvider {
String[] includes = info.getIncludePaths();
ICProject cProject = CoreModel.getDefault().create(info.getProject());
IPathEntry[] entries = cProject.getRawPathEntries();
- List<IPathEntry> cPaths = new ArrayList<IPathEntry>(Arrays.asList(entries));
+ List<IPathEntry> cPaths = new ArrayList<>(Arrays.asList(entries));
Iterator<IPathEntry> cpIter = cPaths.iterator();
while (cpIter.hasNext()) {
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/scannerconfig/DiscoveredScannerInfo.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/scannerconfig/DiscoveredScannerInfo.java
index e28c031c2b..1528b4d77b 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/scannerconfig/DiscoveredScannerInfo.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/scannerconfig/DiscoveredScannerInfo.java
@@ -87,13 +87,13 @@ public class DiscoveredScannerInfo implements IScannerInfo {
public LinkedHashMap<String, Boolean> getDiscoveredIncludePaths() {
if (discoveredPaths == null) {
- return new LinkedHashMap<String, Boolean>();
+ return new LinkedHashMap<>();
}
- return new LinkedHashMap<String, Boolean>(discoveredPaths);
+ return new LinkedHashMap<>(discoveredPaths);
}
public synchronized void setDiscoveredIncludePaths(LinkedHashMap<String, Boolean> paths) {
- discoveredPaths = new LinkedHashMap<String, Boolean>(paths);
+ discoveredPaths = new LinkedHashMap<>(paths);
createPathLists();
}
@@ -119,13 +119,13 @@ public class DiscoveredScannerInfo implements IScannerInfo {
public LinkedHashMap<String, SymbolEntry> getDiscoveredSymbolDefinitions() {
if (discoveredSymbols == null) {
- return new LinkedHashMap<String, SymbolEntry>();
+ return new LinkedHashMap<>();
}
- return new LinkedHashMap<String, SymbolEntry>(discoveredSymbols);
+ return new LinkedHashMap<>(discoveredSymbols);
}
public synchronized void setDiscoveredSymbolDefinitions(LinkedHashMap<String, SymbolEntry> symbols) {
- discoveredSymbols = new LinkedHashMap<String, SymbolEntry>(symbols);
+ discoveredSymbols = new LinkedHashMap<>(symbols);
createSymbolsLists();
}
@@ -184,28 +184,28 @@ public class DiscoveredScannerInfo implements IScannerInfo {
private List<String> getActivePathList() {
if (activePaths == null) {
- activePaths = new ArrayList<String>();
+ activePaths = new ArrayList<>();
}
return activePaths;
}
private List<String> getRemovedPathList() {
if (removedPaths == null) {
- removedPaths = new ArrayList<String>();
+ removedPaths = new ArrayList<>();
}
return removedPaths;
}
private List<String> getActiveSymbolsList() {
if (activeSymbols == null) {
- activeSymbols = new ArrayList<String>();
+ activeSymbols = new ArrayList<>();
}
return activeSymbols;
}
private List<String> getRemovedSymbolsList() {
if (removedSymbols == null) {
- removedSymbols = new ArrayList<String>();
+ removedSymbols = new ArrayList<>();
}
return removedSymbols;
}
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/scannerconfig/DiscoveredScannerInfoProvider.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/scannerconfig/DiscoveredScannerInfoProvider.java
index 6b0a8d642a..d97f7a58e8 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/scannerconfig/DiscoveredScannerInfoProvider.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/scannerconfig/DiscoveredScannerInfoProvider.java
@@ -117,7 +117,7 @@ public class DiscoveredScannerInfoProvider extends ScannerProvider {
ICProject cProject = CoreModel.getDefault().create(project);
if (cProject != null) {
IPathEntry[] entries = cProject.getRawPathEntries();
- List<IPathEntry> newEntries = new ArrayList<IPathEntry>(Arrays.asList(entries));
+ List<IPathEntry> newEntries = new ArrayList<>(Arrays.asList(entries));
if (!newEntries.contains(container)) {
newEntries.add(container);
cProject.setRawPathEntries(newEntries.toArray(new IPathEntry[newEntries.size()]), null);
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/scannerconfig/PathInfo.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/scannerconfig/PathInfo.java
index 920947af76..762dc37182 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/scannerconfig/PathInfo.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/scannerconfig/PathInfo.java
@@ -46,7 +46,7 @@ public final class PathInfo {
? (IPath[]) quoteIncludePaths.clone()
: EMPTY_PATH_ARRAY;
fSymbols = symbols != null && symbols.size() != 0 ? getInternedHashMap(symbols)
- : new HashMap<String, String>(0);
+ : new HashMap<>(0);
fIncludeFiles = includeFiles != null && includeFiles.length != 0 ? (IPath[]) includeFiles.clone()
: EMPTY_PATH_ARRAY;
fMacroFiles = macroFiles != null && macroFiles.length != 0 ? (IPath[]) macroFiles.clone() : EMPTY_PATH_ARRAY;
@@ -63,9 +63,9 @@ public final class PathInfo {
return null;
if (oldMap.isEmpty())
- return new HashMap<String, String>(oldMap);
+ return new HashMap<>(oldMap);
- HashMap<String, String> newMap = new HashMap<String, String>(oldMap.size());
+ HashMap<String, String> newMap = new HashMap<>(oldMap.size());
for (String key : oldMap.keySet()) {
newMap.put(SafeStringInterner.safeIntern(key), SafeStringInterner.safeIntern(oldMap.get(key)));
}
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/BuildInfoFactory.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/BuildInfoFactory.java
index 50507fe40a..162cdeb122 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/BuildInfoFactory.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/BuildInfoFactory.java
@@ -114,7 +114,7 @@ public class BuildInfoFactory {
@Override
public Map<String, String> getExpandedEnvironment() {
Map<String, String> env = getEnvironment();
- HashMap<String, String> envMap = new HashMap<String, String>(env.entrySet().size());
+ HashMap<String, String> envMap = new HashMap<>(env.entrySet().size());
boolean win32 = Platform.getOS().equals(Constants.OS_WIN32);
for (Map.Entry<String, String> entry : env.entrySet()) {
String key = entry.getKey();
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/MakeProject.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/MakeProject.java
index aff4b2830a..8c44527379 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/MakeProject.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/MakeProject.java
@@ -73,7 +73,7 @@ public class MakeProject implements ICOwner {
private String[] parseStringToArray(String syms) {
if (syms != null && syms.length() > 0) {
StringTokenizer tok = new StringTokenizer(syms, ";"); //$NON-NLS-1$
- ArrayList<String> list = new ArrayList<String>(tok.countTokens());
+ ArrayList<String> list = new ArrayList<>(tok.countTokens());
while (tok.hasMoreElements()) {
list.add(tok.nextToken());
}
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/MakeTargetManager.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/MakeTargetManager.java
index ef8a33ccb6..bff6029ada 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/MakeTargetManager.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/MakeTargetManager.java
@@ -51,9 +51,9 @@ public class MakeTargetManager implements IMakeTargetManager, IResourceChangeLis
private static String TARGETS_EXT = "targets"; //$NON-NLS-1$
private final ListenerList listeners = new ListenerList();
- private final Map<IProject, ProjectTargets> projectMap = new HashMap<IProject, ProjectTargets>();
+ private final Map<IProject, ProjectTargets> projectMap = new HashMap<>();
private HashMap<String, String> builderMap;
- protected Vector<IProject> fProjects = new Vector<IProject>();
+ protected Vector<IProject> fProjects = new Vector<>();
public MakeTargetManager() {
}
@@ -181,7 +181,7 @@ public class MakeTargetManager implements IMakeTargetManager, IResourceChangeLis
public String[] getTargetBuilders(IProject project) {
if (fProjects.contains(project) || hasTargetBuilder(project)) {
try {
- Vector<String> ids = new Vector<String>();
+ Vector<String> ids = new Vector<>();
IProjectDescription description = project.getDescription();
ICommand commands[] = description.getBuildSpec();
for (ICommand command : commands) {
@@ -334,7 +334,7 @@ public class MakeTargetManager implements IMakeTargetManager, IResourceChangeLis
}
protected void initializeBuilders() {
- builderMap = new HashMap<String, String>();
+ builderMap = new HashMap<>();
IExtensionPoint point = Platform.getExtensionRegistry().getExtensionPoint(MakeCorePlugin.PLUGIN_ID,
MakeTargetManager.TARGET_BUILD_EXT);
IExtension[] extensions = point.getExtensions();
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/ProjectTargets.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/ProjectTargets.java
index 47258024a0..1a53a4004b 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/ProjectTargets.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/ProjectTargets.java
@@ -59,7 +59,7 @@ public class ProjectTargets {
private static final String BAD_TARGET = "buidlTarget"; //$NON-NLS-1$
private static final String TARGET = "buildTarget"; //$NON-NLS-1$
- private HashMap<IContainer, List<IMakeTarget>> targetMap = new HashMap<IContainer, List<IMakeTarget>>();
+ private HashMap<IContainer, List<IMakeTarget>> targetMap = new HashMap<>();
private IProject project;
@@ -111,7 +111,7 @@ public class ProjectTargets {
}
public void set(IContainer container, IMakeTarget[] targets) throws CoreException {
- List<IMakeTarget> newList = new ArrayList<IMakeTarget>();
+ List<IMakeTarget> newList = new ArrayList<>();
for (IMakeTarget target : targets) {
target.setContainer(container);
if (newList.contains(target)) {
@@ -142,7 +142,7 @@ public class ProjectTargets {
MakeMessages.getString("MakeTargetManager.target_exists"), null)); //$NON-NLS-1$
}
if (list == null) {
- list = new ArrayList<IMakeTarget>();
+ list = new ArrayList<>();
targetMap.put(target.getContainer(), list);
}
list.add(target);
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/AbstractMakefile.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/AbstractMakefile.java
index d61d5947e5..4dfc52dece 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/AbstractMakefile.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/AbstractMakefile.java
@@ -61,7 +61,7 @@ public abstract class AbstractMakefile extends Parent implements IMakefile {
@Override
public IRule[] getRules() {
IDirective[] stmts = getDirectives(true);
- List<IDirective> array = new ArrayList<IDirective>(stmts.length);
+ List<IDirective> array = new ArrayList<>(stmts.length);
for (IDirective stmt : stmts) {
if (stmt instanceof IRule) {
array.add(stmt);
@@ -73,7 +73,7 @@ public abstract class AbstractMakefile extends Parent implements IMakefile {
@Override
public IRule[] getRules(String target) {
IRule[] rules = getRules();
- List<IRule> array = new ArrayList<IRule>(rules.length);
+ List<IRule> array = new ArrayList<>(rules.length);
for (IRule rule : rules) {
if (rule.getTarget().equals(target)) {
array.add(rule);
@@ -85,7 +85,7 @@ public abstract class AbstractMakefile extends Parent implements IMakefile {
@Override
public IInferenceRule[] getInferenceRules() {
IRule[] rules = getRules();
- List<IRule> array = new ArrayList<IRule>(rules.length);
+ List<IRule> array = new ArrayList<>(rules.length);
for (IRule rule : rules) {
if (rule instanceof IInferenceRule) {
array.add(rule);
@@ -97,7 +97,7 @@ public abstract class AbstractMakefile extends Parent implements IMakefile {
@Override
public IInferenceRule[] getInferenceRules(String target) {
IInferenceRule[] irules = getInferenceRules();
- List<IInferenceRule> array = new ArrayList<IInferenceRule>(irules.length);
+ List<IInferenceRule> array = new ArrayList<>(irules.length);
for (IInferenceRule irule : irules) {
if (irule.getTarget().equals(target)) {
array.add(irule);
@@ -109,7 +109,7 @@ public abstract class AbstractMakefile extends Parent implements IMakefile {
@Override
public ITargetRule[] getTargetRules() {
IRule[] trules = getRules();
- List<IRule> array = new ArrayList<IRule>(trules.length);
+ List<IRule> array = new ArrayList<>(trules.length);
for (IRule trule : trules) {
if (trule instanceof ITargetRule) {
array.add(trule);
@@ -121,7 +121,7 @@ public abstract class AbstractMakefile extends Parent implements IMakefile {
@Override
public ITargetRule[] getTargetRules(String target) {
ITargetRule[] trules = getTargetRules();
- List<ITargetRule> array = new ArrayList<ITargetRule>(trules.length);
+ List<ITargetRule> array = new ArrayList<>(trules.length);
for (ITargetRule trule : trules) {
if (trule.getTarget().equals(target)) {
array.add(trule);
@@ -133,7 +133,7 @@ public abstract class AbstractMakefile extends Parent implements IMakefile {
@Override
public IMacroDefinition[] getMacroDefinitions() {
IDirective[] stmts = getDirectives(true);
- List<IDirective> array = new ArrayList<IDirective>(stmts.length);
+ List<IDirective> array = new ArrayList<>(stmts.length);
for (IDirective stmt : stmts) {
if (stmt instanceof IMacroDefinition) {
array.add(stmt);
@@ -145,7 +145,7 @@ public abstract class AbstractMakefile extends Parent implements IMakefile {
@Override
public IMacroDefinition[] getMacroDefinitions(String name) {
IMacroDefinition[] variables = getMacroDefinitions();
- List<IMacroDefinition> array = new ArrayList<IMacroDefinition>(variables.length);
+ List<IMacroDefinition> array = new ArrayList<>(variables.length);
for (IMacroDefinition variable : variables) {
if (variable.getName().equals(name)) {
array.add(variable);
@@ -157,7 +157,7 @@ public abstract class AbstractMakefile extends Parent implements IMakefile {
@Override
public IMacroDefinition[] getBuiltinMacroDefinitions() {
IDirective[] stmts = getBuiltins();
- List<IDirective> array = new ArrayList<IDirective>(stmts.length);
+ List<IDirective> array = new ArrayList<>(stmts.length);
for (IDirective stmt : stmts) {
if (stmt instanceof IMacroDefinition) {
array.add(stmt);
@@ -169,7 +169,7 @@ public abstract class AbstractMakefile extends Parent implements IMakefile {
@Override
public IMacroDefinition[] getBuiltinMacroDefinitions(String name) {
IMacroDefinition[] variables = getBuiltinMacroDefinitions();
- List<IMacroDefinition> array = new ArrayList<IMacroDefinition>(variables.length);
+ List<IMacroDefinition> array = new ArrayList<>(variables.length);
for (IMacroDefinition variable : variables) {
if (variable.getName().equals(name)) {
array.add(variable);
@@ -180,7 +180,7 @@ public abstract class AbstractMakefile extends Parent implements IMakefile {
public IInferenceRule[] getBuiltinInferenceRules() {
IDirective[] stmts = getBuiltins();
- List<IDirective> array = new ArrayList<IDirective>(stmts.length);
+ List<IDirective> array = new ArrayList<>(stmts.length);
for (IDirective stmt : stmts) {
if (stmt instanceof IInferenceRule) {
array.add(stmt);
@@ -191,7 +191,7 @@ public abstract class AbstractMakefile extends Parent implements IMakefile {
public IInferenceRule[] getBuiltinInferenceRules(String target) {
IInferenceRule[] irules = getBuiltinInferenceRules();
- List<IInferenceRule> array = new ArrayList<IInferenceRule>(irules.length);
+ List<IInferenceRule> array = new ArrayList<>(irules.length);
for (IInferenceRule irule : irules) {
if (irule.getTarget().equals(target)) {
array.add(irule);
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/Parent.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/Parent.java
index daec5744e0..83e9b5f69f 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/Parent.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/Parent.java
@@ -26,7 +26,7 @@ import org.eclipse.cdt.make.core.makefile.IParent;
public abstract class Parent extends Directive implements IParent {
- ArrayList<Directive> children = new ArrayList<Directive>();
+ ArrayList<Directive> children = new ArrayList<>();
public Parent(Directive parent) {
super(parent);
@@ -34,7 +34,7 @@ public abstract class Parent extends Directive implements IParent {
public IDirective[] getDirectives(boolean expand) {
if (expand) {
- List<IDirective> directives = new ArrayList<IDirective>();
+ List<IDirective> directives = new ArrayList<>();
getDirectives(); // populates children for class Include
for (IDirective directive : children) {
directives.add(directive);
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/Rule.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/Rule.java
index 92fd011472..74955e027f 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/Rule.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/Rule.java
@@ -37,7 +37,7 @@ public abstract class Rule extends Parent implements IRule {
@Override
public ICommand[] getCommands() {
IDirective[] directives = getDirectives();
- ArrayList<IDirective> cmds = new ArrayList<IDirective>(directives.length);
+ ArrayList<IDirective> cmds = new ArrayList<>(directives.length);
for (int i = 0; i < directives.length; i++) {
if (directives[i] instanceof ICommand) {
cmds.add(directives[i]);
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/GNUMakefile.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/GNUMakefile.java
index c173fe8aee..198f2ce6f6 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/GNUMakefile.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/GNUMakefile.java
@@ -169,8 +169,8 @@ public class GNUMakefile extends AbstractMakefile implements IGNUMakefile {
protected void parse(URI fileURI, MakefileReader reader) throws IOException {
String line;
Rule[] rules = null;
- Stack<Directive> conditions = new Stack<Directive>();
- Stack<VariableDefinition> defines = new Stack<VariableDefinition>();
+ Stack<Directive> conditions = new Stack<>();
+ Stack<VariableDefinition> defines = new Stack<>();
int startLine = 0;
int endLine = 0;
@@ -585,7 +585,7 @@ public class GNUMakefile extends AbstractMakefile implements IGNUMakefile {
String[] directories;
StringTokenizer st = new StringTokenizer(line);
int count = st.countTokens();
- List<String> dirs = new ArrayList<String>(count);
+ List<String> dirs = new ArrayList<>(count);
if (count > 0) {
for (int i = 0; i < count; i++) {
if (count == 0) {
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/GNUMakefileChecker.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/GNUMakefileChecker.java
index c22fa966e3..8390bd2bce 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/GNUMakefileChecker.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/GNUMakefileChecker.java
@@ -61,7 +61,7 @@ public class GNUMakefileChecker extends ACBuilder {
}
}
- protected Map<IProject, IMakefileValidator> validatorMap = new HashMap<IProject, IMakefileValidator>();
+ protected Map<IProject, IMakefileValidator> validatorMap = new HashMap<>();
public GNUMakefileChecker() {
}
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/posix/PosixMakefileUtil.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/posix/PosixMakefileUtil.java
index 9e73295b69..ee010717af 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/posix/PosixMakefileUtil.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/posix/PosixMakefileUtil.java
@@ -28,7 +28,7 @@ public class PosixMakefileUtil {
}
public static String[] findTargets(String line) {
- List<String> aList = new ArrayList<String>();
+ List<String> aList = new ArrayList<>();
int space;
// Trim away trailing and prepending spaces.
line = line.trim();
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/CDataDiscoveredInfoCalculator.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/CDataDiscoveredInfoCalculator.java
index 68e7bbfb37..5700e094e0 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/CDataDiscoveredInfoCalculator.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/CDataDiscoveredInfoCalculator.java
@@ -100,7 +100,7 @@ public class CDataDiscoveredInfoCalculator {
void add(ILangSettingInfo info) {
if (fLangInfoList == null)
- fLangInfoList = new ArrayList<ILangSettingInfo>();
+ fLangInfoList = new ArrayList<>();
fLangInfoList.add(info);
}
}
@@ -140,9 +140,9 @@ public class CDataDiscoveredInfoCalculator {
}
public void add(int index, PathFilePathInfo value) {
- List<PathFilePathInfo> list = checkResize(index) ? new ArrayList<PathFilePathInfo>() : fStore[index];
+ List<PathFilePathInfo> list = checkResize(index) ? new ArrayList<>() : fStore[index];
if (list == null) {
- list = new ArrayList<PathFilePathInfo>();
+ list = new ArrayList<>();
fStore[index] = list;
}
@@ -168,7 +168,7 @@ public class CDataDiscoveredInfoCalculator {
public List<PathFilePathInfo>[] getLists() {
int size = fMaxIndex + 1;
- List<List<PathFilePathInfo>> list = new ArrayList<List<PathFilePathInfo>>(size);
+ List<List<PathFilePathInfo>> list = new ArrayList<>(size);
List<PathFilePathInfo> l;
for (int i = 0; i < size; i++) {
l = fStore[i];
@@ -222,13 +222,13 @@ public class CDataDiscoveredInfoCalculator {
public void add(PathFilePathInfo pInfo) {
if (fPathFilePathInfoMap == null)
- fPathFilePathInfoMap = new HashMap<PathInfo, List<PathFilePathInfo>>(3);
+ fPathFilePathInfoMap = new HashMap<>(3);
PathInfo fileInfo = pInfo.fInfo;
List<PathFilePathInfo> list = fileInfo == fMaxMatchInfo ? fMaxMatchInfoList
: fPathFilePathInfoMap.get(fileInfo);
if (list == null) {
- list = new ArrayList<PathFilePathInfo>();
+ list = new ArrayList<>();
fPathFilePathInfoMap.put(fileInfo, list);
if (fMaxMatchInfo == null) {
fMaxMatchInfo = fileInfo;
@@ -342,7 +342,7 @@ public class CDataDiscoveredInfoCalculator {
private HashSet<String> calcExtsSet() {
if (fExtsSet == null)
- fExtsSet = new HashSet<String>(Arrays.asList(fExts));
+ fExtsSet = new HashSet<>(Arrays.asList(fExts));
return fExtsSet;
}
@@ -468,7 +468,7 @@ public class CDataDiscoveredInfoCalculator {
void internalAdd(ExtsSetSettings setting) {
if (fExtsSetToExtsSetSettingsMap == null) {
- fExtsSetToExtsSetSettingsMap = new HashMap<ExtsSet, ExtsSetSettings>();
+ fExtsSetToExtsSetSettingsMap = new HashMap<>();
}
ExtsSetSettings cur = fExtsSetToExtsSetSettingsMap.get(setting.fExtsSet);
@@ -497,7 +497,7 @@ public class CDataDiscoveredInfoCalculator {
}
public RcSetSettings[] getChildren(final boolean includeCurrent) {
- final List<Object> list = new ArrayList<Object>();
+ final List<Object> list = new ArrayList<>();
fContainer.accept(new IPathSettingsContainerVisitor() {
@Override
@@ -561,7 +561,7 @@ public class CDataDiscoveredInfoCalculator {
String[] exts = setting.fExtsSet.fExts;
String ext;
if (map == null) {
- map = new HashMap<String, ExtsSetSettings>();
+ map = new HashMap<>();
forceAdd = true;
}
@@ -600,7 +600,7 @@ public class CDataDiscoveredInfoCalculator {
path = rcData.getPath();
curRcSet = rcSet.createChild(path, rcData, false);
if (rcData.getType() == ICSettingBase.SETTING_FILE) {
- fileMap = new HashMap<ExtsSet, ExtsSetSettings>(1);
+ fileMap = new HashMap<>(1);
fileSetting = createExtsSetSettings(path, (CFileData) rcData);
fileMap.put(fileSetting.fExtsSet, fileSetting);
curRcSet.internalSetSettingsMap(fileMap);
@@ -672,7 +672,7 @@ public class CDataDiscoveredInfoCalculator {
private static void addLanguageInfos(RcSettingInfo rcInfo, CLanguageData[] lDatas, PathInfo info) {
ArrayList<ILangSettingInfo> list = rcInfo.fLangInfoList;
if (list == null) {
- list = new ArrayList<ILangSettingInfo>(lDatas.length);
+ list = new ArrayList<>(lDatas.length);
rcInfo.fLangInfoList = list;
} else {
list.ensureCapacity(lDatas.length);
@@ -690,7 +690,7 @@ public class CDataDiscoveredInfoCalculator {
IPath projRelPath;
CResourceData rcData;
// RcSetSettings dataSetting;
- List<RcSettingInfo> list = new ArrayList<RcSettingInfo>(pfpis.length);
+ List<RcSettingInfo> list = new ArrayList<>(pfpis.length);
RcSettingInfo rcInfo;
ILangSettingInfo lInfo;
CLanguageData lData;
@@ -731,7 +731,7 @@ public class CDataDiscoveredInfoCalculator {
if (rcInfo == null) {
rcInfo = new RcSettingInfo(rootData);
- tmpList = new ArrayList<ILangSettingInfo>(lDatas.length - k);
+ tmpList = new ArrayList<>(lDatas.length - k);
rcInfo.fLangInfoList = tmpList;
}
@@ -785,7 +785,7 @@ public class CDataDiscoveredInfoCalculator {
if (lData != null) {
rcInfo = new RcSettingInfo(rcData);
lInfo = new LangSettingInfo(lData, pInfo);
- tmpList = new ArrayList<ILangSettingInfo>(1);
+ tmpList = new ArrayList<>(1);
tmpList.add(lInfo);
rcInfo.fLangInfoList = tmpList;
list.add(rcInfo);
@@ -814,7 +814,7 @@ public class CDataDiscoveredInfoCalculator {
RcSetSettings settings[] = rootSetting.getChildren(true);
RcSetSettings setting;
CResourceData rcData;
- List<IRcSettingInfo> resultList = new ArrayList<IRcSettingInfo>();
+ List<IRcSettingInfo> resultList = new ArrayList<>();
LangSettingInfo langInfo;
RcSettingInfo rcInfo;
PathInfo pathInfo;
@@ -846,7 +846,7 @@ public class CDataDiscoveredInfoCalculator {
if (pathInfo != null) {
langInfo = new LangSettingInfo(extSetting.fBaseLangData, pathInfo);
rcInfo = new RcSettingInfo(rcData);
- rcInfo.fLangInfoList = new ArrayList<ILangSettingInfo>(1);
+ rcInfo.fLangInfoList = new ArrayList<>(1);
rcInfo.fLangInfoList.add(langInfo);
resultList.add(rcInfo);
}
@@ -854,7 +854,7 @@ public class CDataDiscoveredInfoCalculator {
} else {
if (setting.fExtsSetToExtsSetSettingsMap.size() != 0) {
rcInfo = new RcSettingInfo(rcData);
- rcInfo.fLangInfoList = new ArrayList<ILangSettingInfo>(setting.fExtsSetToExtsSetSettingsMap.size());
+ rcInfo.fLangInfoList = new ArrayList<>(setting.fExtsSetToExtsSetSettingsMap.size());
resultList.add(rcInfo);
Collection<ExtsSetSettings> extSettings = setting.fExtsSetToExtsSetSettingsMap.values();
@@ -1015,7 +1015,7 @@ public class CDataDiscoveredInfoCalculator {
private static HashMap<ExtsSet, ExtsSetSettings> createExtsSetSettingsMap(CFolderData data) {
CLanguageData[] lDatas = data.getLanguageDatas();
- HashMap<ExtsSet, ExtsSetSettings> map = new HashMap<ExtsSet, ExtsSetSettings>(lDatas.length);
+ HashMap<ExtsSet, ExtsSetSettings> map = new HashMap<>(lDatas.length);
ExtsSetSettings settings;
if (lDatas.length != 0) {
@@ -1032,7 +1032,7 @@ public class CDataDiscoveredInfoCalculator {
private static PathFilePathInfo[] createOrderedInfo(Map<IResource, PathInfo> map) {
ListIndexStore store = new ListIndexStore(10);
- HashMap<PathInfo, PathInfo> infoMap = new HashMap<PathInfo, PathInfo>();
+ HashMap<PathInfo, PathInfo> infoMap = new HashMap<>();
// LinkedHashMap result;
Set<Entry<IResource, PathInfo>> entries = map.entrySet();
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/DiscoveredPathContainer.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/DiscoveredPathContainer.java
index 4fccc0ade9..d37fd8cf44 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/DiscoveredPathContainer.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/DiscoveredPathContainer.java
@@ -79,7 +79,7 @@ public class DiscoveredPathContainer implements IPathEntryContainer {
IDiscoveredPathInfo info = MakeCorePlugin.getDefault().getDiscoveryManager().getDiscoveredInfo(fProject);
IPath[] includes = info.getIncludePaths();
Map<String, String> syms = info.getSymbols();
- List<IPathEntry> entries = new ArrayList<IPathEntry>(includes.length + syms.size());
+ List<IPathEntry> entries = new ArrayList<>(includes.length + syms.size());
for (IPath inc : includes) {
entries.add(CoreModel.newIncludeEntry(Path.EMPTY, Path.EMPTY, inc, true));
}
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/DiscoveredPathInfo.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/DiscoveredPathInfo.java
index 308a6564a3..00a1321943 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/DiscoveredPathInfo.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/DiscoveredPathInfo.java
@@ -49,8 +49,8 @@ public class DiscoveredPathInfo implements IPerProjectDiscoveredPathInfo, IDisco
public DiscoveredPathInfo(IProject project) {
this.project = project;
- discoveredPaths = new LinkedHashMap<String, Boolean>();
- discoveredSymbols = new LinkedHashMap<String, SymbolEntry>();
+ discoveredPaths = new LinkedHashMap<>();
+ discoveredSymbols = new LinkedHashMap<>();
}
@Override
@@ -77,12 +77,12 @@ public class DiscoveredPathInfo implements IPerProjectDiscoveredPathInfo, IDisco
@Override
public LinkedHashMap<String, Boolean> getIncludeMap() {
- return new LinkedHashMap<String, Boolean>(discoveredPaths);
+ return new LinkedHashMap<>(discoveredPaths);
}
@Override
public synchronized void setIncludeMap(LinkedHashMap<String, Boolean> paths) {
- discoveredPaths = SafeStringInterner.safeIntern(new LinkedHashMap<String, Boolean>(paths));
+ discoveredPaths = SafeStringInterner.safeIntern(new LinkedHashMap<>(paths));
activePaths = null;
}
@@ -104,12 +104,12 @@ public class DiscoveredPathInfo implements IPerProjectDiscoveredPathInfo, IDisco
@Override
public LinkedHashMap<String, SymbolEntry> getSymbolMap() {
- return new LinkedHashMap<String, SymbolEntry>(discoveredSymbols);
+ return new LinkedHashMap<>(discoveredSymbols);
}
@Override
public synchronized void setSymbolMap(LinkedHashMap<String, SymbolEntry> symbols) {
- discoveredSymbols = SafeStringInterner.safeIntern(new LinkedHashMap<String, SymbolEntry>(symbols));
+ discoveredSymbols = SafeStringInterner.safeIntern(new LinkedHashMap<>(symbols));
activeSymbols = null;
}
@@ -125,14 +125,14 @@ public class DiscoveredPathInfo implements IPerProjectDiscoveredPathInfo, IDisco
private List<Path> getActivePathList() {
if (activePaths == null) {
- activePaths = new ArrayList<Path>();
+ activePaths = new ArrayList<>();
}
return activePaths;
}
private Map<String, String> getActiveSymbolsMap() {
if (activeSymbols == null) {
- activeSymbols = new HashMap<String, String>();
+ activeSymbols = new HashMap<>();
}
return activeSymbols;
}
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/DiscoveredPathManager.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/DiscoveredPathManager.java
index 61800a1a04..02e79c7cfc 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/DiscoveredPathManager.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/DiscoveredPathManager.java
@@ -52,7 +52,7 @@ import org.eclipse.core.runtime.Status;
public class DiscoveredPathManager implements IDiscoveredPathManager, IResourceChangeListener {
- private Map<IProject, DiscoveredInfoHolder> fDiscoveredInfoHolderMap = new HashMap<IProject, DiscoveredInfoHolder>();
+ private Map<IProject, DiscoveredInfoHolder> fDiscoveredInfoHolderMap = new HashMap<>();
private List<IDiscoveredInfoListener> listeners = Collections
.synchronizedList(new ArrayList<IDiscoveredInfoListener>());
@@ -60,7 +60,7 @@ public class DiscoveredPathManager implements IDiscoveredPathManager, IResourceC
private static final int INFO_REMOVED = 2;
private static class DiscoveredInfoHolder {
- Map<InfoContext, IDiscoveredPathInfo> fInfoMap = new HashMap<InfoContext, IDiscoveredPathInfo>();
+ Map<InfoContext, IDiscoveredPathInfo> fInfoMap = new HashMap<>();
// PathSettingsContainer fContainer = PathSettingsContainer.createRootContainer();
public IDiscoveredPathInfo getInfo(InfoContext context) {
@@ -339,7 +339,7 @@ public class DiscoveredPathManager implements IDiscoveredPathManager, IResourceC
PerFileDiscoveredPathContainer container = new PerFileDiscoveredPathContainer(project);
CoreModel.setPathEntryContainer(new ICProject[] { cProject }, container, null);
if (changedResources != null) {
- List<PathEntryContainerChanged> changeDelta = new ArrayList<PathEntryContainerChanged>(
+ List<PathEntryContainerChanged> changeDelta = new ArrayList<>(
changedResources.size());
for (IResource resource : changedResources) {
IPath path = resource.getFullPath();
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/DiscoveredScannerInfoStore.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/DiscoveredScannerInfoStore.java
index f8a2707ccc..8d21940641 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/DiscoveredScannerInfoStore.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/DiscoveredScannerInfoStore.java
@@ -76,7 +76,7 @@ public final class DiscoveredScannerInfoStore {
/**
* Caches scanner config XML Documents per project using soft references.
*/
- private final Map<IProject, Reference<Document>> fDocumentCache = new HashMap<IProject, Reference<Document>>();
+ private final Map<IProject, Reference<Document>> fDocumentCache = new HashMap<>();
public static DiscoveredScannerInfoStore getInstance() {
if (instance == null) {
@@ -179,7 +179,7 @@ public final class DiscoveredScannerInfoStore {
rootElement.setAttribute(ID_ATTR, CDESCRIPTOR_ID);
document.appendChild(rootElement);
}
- fDocumentCache.put(project, new SoftReference<Document>(document));
+ fDocumentCache.put(project, new SoftReference<>(document));
} catch (IOException e) {
MakeCorePlugin.log(e);
throw new CoreException(new Status(IStatus.ERROR, MakeCorePlugin.getUniqueIdentifier(), -1,
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/PerFileDiscoveredPathContainer.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/PerFileDiscoveredPathContainer.java
index 94f53c116e..dbb4d03c2b 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/PerFileDiscoveredPathContainer.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/PerFileDiscoveredPathContainer.java
@@ -37,7 +37,7 @@ public class PerFileDiscoveredPathContainer extends DiscoveredPathContainer impl
@Override
public IPathEntry[] getPathEntries(IPath path, int mask) {
- ArrayList<IPathEntry> entries = new ArrayList<IPathEntry>();
+ ArrayList<IPathEntry> entries = new ArrayList<>();
try {
IDiscoveredPathInfo info = MakeCorePlugin.getDefault().getDiscoveryManager().getDiscoveredInfo(fProject);
if (info instanceof IPerFileDiscoveredPathInfo) {
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/ScannerConfigUtil.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/ScannerConfigUtil.java
index a03c3b98cc..f76e7e378c 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/ScannerConfigUtil.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/ScannerConfigUtil.java
@@ -66,7 +66,7 @@ public final class ScannerConfigUtil {
*/
public static List<String> scSymbolsSymbolEntryMap2List(Map<String, SymbolEntry> sumSymbols, boolean active) {
Set<Entry<String, SymbolEntry>> symbols = sumSymbols.entrySet();
- List<String> rv = new ArrayList<String>(symbols.size());
+ List<String> rv = new ArrayList<>(symbols.size());
for (Entry<String, SymbolEntry> symbol : symbols) {
SymbolEntry sEntry = symbol.getValue();
if (active) {
@@ -85,7 +85,7 @@ public final class ScannerConfigUtil {
* @return - active symbols as a plain Map
*/
public static Map<String, String> scSymbolEntryMap2Map(Map<String, SymbolEntry> sumSymbols) {
- Map<String, String> rv = new HashMap<String, String>();
+ Map<String, String> rv = new HashMap<>();
Set<String> keys = sumSymbols.keySet();
for (String key : keys) {
SymbolEntry entries = sumSymbols.get(key);
@@ -216,13 +216,13 @@ public final class ScannerConfigUtil {
if (index1 == index2 || !(index1 >= 0 && index1 < size && index2 >= 0 && index2 < size)) {
return sumPaths;
}
- ArrayList<String> pathKeyList = new ArrayList<String>(sumPaths.keySet());
+ ArrayList<String> pathKeyList = new ArrayList<>(sumPaths.keySet());
String temp1 = pathKeyList.get(index1);
String temp2 = pathKeyList.get(index2);
pathKeyList.set(index1, temp2);
pathKeyList.set(index2, temp1);
- LinkedHashMap<String, SymbolEntry> newSumPaths = new LinkedHashMap<String, SymbolEntry>(sumPaths.size());
+ LinkedHashMap<String, SymbolEntry> newSumPaths = new LinkedHashMap<>(sumPaths.size());
for (String key : pathKeyList) {
newSumPaths.put(key, sumPaths.get(key));
}
@@ -233,7 +233,7 @@ public final class ScannerConfigUtil {
* Tokenizes string with quotes
*/
public static String[] tokenizeStringWithQuotes(String line, String quoteStyle) {
- ArrayList<String> allTokens = new ArrayList<String>();
+ ArrayList<String> allTokens = new ArrayList<>();
String[] tokens = line.split(quoteStyle);
for (int i = 0; i < tokens.length; ++i) {
if (i % 2 == 0) { // even tokens need further tokenization
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/AbstractGCCBOPConsoleParser.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/AbstractGCCBOPConsoleParser.java
index e869b3a798..f900025c97 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/AbstractGCCBOPConsoleParser.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/AbstractGCCBOPConsoleParser.java
@@ -187,8 +187,8 @@ public abstract class AbstractGCCBOPConsoleParser implements IScannerInfoConsole
* @return array of commands
*/
protected String[][] tokenize(String line, boolean escapeInsideDoubleQuotes) {
- ArrayList<String[]> commands = new ArrayList<String[]>();
- ArrayList<String> tokens = new ArrayList<String>();
+ ArrayList<String[]> commands = new ArrayList<>();
+ ArrayList<String> tokens = new ArrayList<>();
StringBuilder token = new StringBuilder();
final char[] input = line.toCharArray();
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/AbstractGCCBOPConsoleParserUtility.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/AbstractGCCBOPConsoleParserUtility.java
index f6abd11f19..9b6eb9b988 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/AbstractGCCBOPConsoleParserUtility.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/AbstractGCCBOPConsoleParserUtility.java
@@ -42,8 +42,8 @@ public abstract class AbstractGCCBOPConsoleParserUtility {
*/
public AbstractGCCBOPConsoleParserUtility(IProject project, IPath workingDirectory,
IMarkerGenerator markerGenerator) {
- fDirectoryStack = new Vector<IPath>();
- fErrors = new ArrayList<Problem>();
+ fDirectoryStack = new Vector<>();
+ fErrors = new ArrayList<>();
this.project = project;
fBaseDirectory = new Path(EFSExtensionManager.getDefault().getPathFromURI(project.getLocationURI()));
if (workingDirectory != null) {
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/GCCPerFileBOPConsoleParser.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/GCCPerFileBOPConsoleParser.java
index 354248e07e..0f4ab75ea4 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/GCCPerFileBOPConsoleParser.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/GCCPerFileBOPConsoleParser.java
@@ -138,9 +138,9 @@ public class GCCPerFileBOPConsoleParser extends AbstractGCCBOPConsoleParser {
}
if (file != null) {
CCommandDSC cmd = fUtil.getNewCCommandDSC(tokens, compilerInvocationIndex, extensionsIndex > 0);
- List<CCommandDSC> cmdList = new CopyOnWriteArrayList<CCommandDSC>();
+ List<CCommandDSC> cmdList = new CopyOnWriteArrayList<>();
cmdList.add(cmd);
- Map<ScannerInfoTypes, List<CCommandDSC>> sc = new HashMap<ScannerInfoTypes, List<CCommandDSC>>(1);
+ Map<ScannerInfoTypes, List<CCommandDSC>> sc = new HashMap<>(1);
sc.put(ScannerInfoTypes.COMPILER_COMMAND, cmdList);
getCollector().contributeToScannerConfig(file, sc);
} else
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/GCCPerFileBOPConsoleParserUtility.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/GCCPerFileBOPConsoleParserUtility.java
index 51774fab88..e550d21800 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/GCCPerFileBOPConsoleParserUtility.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/GCCPerFileBOPConsoleParserUtility.java
@@ -61,7 +61,7 @@ public class GCCPerFileBOPConsoleParserUtility extends AbstractGCCBOPConsolePars
String workingDir = getWorkingDirectory().toString();
List<Map<String, List<String>>> directoryCommandList = directoryCommandListMap.get(workingDir);
if (directoryCommandList == null) {
- directoryCommandList = new CopyOnWriteArrayList<Map<String, List<String>>>();
+ directoryCommandList = new CopyOnWriteArrayList<>();
directoryCommandListMap.put(workingDir, directoryCommandList);
++workingDirsN;
}
@@ -77,10 +77,10 @@ public class GCCPerFileBOPConsoleParserUtility extends AbstractGCCBOPConsolePars
return;
}
}
- command21FileListMap = new HashMap<String, List<String>>(1);
+ command21FileListMap = new HashMap<>(1);
directoryCommandList.add(command21FileListMap);
++commandsN;
- List<String> fileList = new CopyOnWriteArrayList<String>();
+ List<String> fileList = new CopyOnWriteArrayList<>();
command21FileListMap.put(genericCommand, fileList);
fileList.add(longFileName);
++filesN;
@@ -123,8 +123,8 @@ public class GCCPerFileBOPConsoleParserUtility extends AbstractGCCBOPConsolePars
* @return CCommandDSC compile command description
*/
public CCommandDSC getNewCCommandDSC(String[] tokens, final int idxOfCompilerCommand, boolean cppFileType) {
- CopyOnWriteArrayList<KVStringPair> dirafter = new CopyOnWriteArrayList<KVStringPair>();
- CopyOnWriteArrayList<String> includes = new CopyOnWriteArrayList<String>();
+ CopyOnWriteArrayList<KVStringPair> dirafter = new CopyOnWriteArrayList<>();
+ CopyOnWriteArrayList<String> includes = new CopyOnWriteArrayList<>();
CCommandDSC command = new CCommandDSC(cppFileType, getProject());
command.addSCOption(new KVStringPair(SCDOptionsEnum.COMMAND.toString(), tokens[idxOfCompilerCommand]));
for (int i = idxOfCompilerCommand + 1; i < tokens.length; ++i) {
@@ -161,7 +161,7 @@ public class GCCPerFileBOPConsoleParserUtility extends AbstractGCCBOPConsolePars
KVStringPair pair = new KVStringPair(SCDOptionsEnum.IQUOTE.toString(), option);
command.addSCOption(pair);
}
- includes = new CopyOnWriteArrayList<String>();
+ includes = new CopyOnWriteArrayList<>();
// -I- has no parameter
} else {
// ex. -I /dir
@@ -279,7 +279,7 @@ public class GCCPerFileBOPConsoleParserUtility extends AbstractGCCBOPConsolePars
* @return List of CCommandDSC
*/
public List<CCommandDSC> getCCommandDSCList() {
- return new CopyOnWriteArrayList<CCommandDSC>(commandsList2);
+ return new CopyOnWriteArrayList<>(commandsList2);
}
}
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/GCCPerFileSIPConsoleParser.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/GCCPerFileSIPConsoleParser.java
index 32d2ed6f4b..58264bc0da 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/GCCPerFileSIPConsoleParser.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/GCCPerFileSIPConsoleParser.java
@@ -71,11 +71,11 @@ public class GCCPerFileSIPConsoleParser implements IScannerInfoConsoleParser {
if (line.startsWith(COMMAND_ID_BEGIN)) {
commandId = Integer.parseInt(line.substring(COMMAND_ID_BEGIN.length()));
- symbols = new ArrayList<String>();
- includes = new ArrayList<String>();
- quoteIncludes = new ArrayList<String>();
+ symbols = new ArrayList<>();
+ includes = new ArrayList<>();
+ quoteIncludes = new ArrayList<>();
} else if (line.startsWith(COMMAND_ID_END)) {
- Map<ScannerInfoTypes, List<String>> scannerInfo = new HashMap<ScannerInfoTypes, List<String>>();
+ Map<ScannerInfoTypes, List<String>> scannerInfo = new HashMap<>();
scannerInfo.put(ScannerInfoTypes.INCLUDE_PATHS, includes);
scannerInfo.put(ScannerInfoTypes.QUOTE_INCLUDE_PATHS, quoteIncludes);
scannerInfo.put(ScannerInfoTypes.SYMBOL_DEFINITIONS, symbols);
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/GCCScannerInfoConsoleParser.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/GCCScannerInfoConsoleParser.java
index e834b093a0..ee008d9357 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/GCCScannerInfoConsoleParser.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/GCCScannerInfoConsoleParser.java
@@ -74,9 +74,9 @@ public class GCCScannerInfoConsoleParser extends AbstractGCCBOPConsoleParser {
}
// Recognized gcc or g++ compiler invocation
- List<String> includes = new CopyOnWriteArrayList<String>();
- List<String> symbols = new CopyOnWriteArrayList<String>();
- List<String> targetSpecificOptions = new CopyOnWriteArrayList<String>();
+ List<String> includes = new CopyOnWriteArrayList<>();
+ List<String> symbols = new CopyOnWriteArrayList<>();
+ List<String> targetSpecificOptions = new CopyOnWriteArrayList<>();
String fileName = null;
for (int j = compilerInvocationIdx + 1; j < tokens.length; j++) {
@@ -165,7 +165,7 @@ public class GCCScannerInfoConsoleParser extends AbstractGCCBOPConsoleParser {
IProject project = getProject();
IFile file = null;
- List<String> translatedIncludes = new LinkedList<String>();
+ List<String> translatedIncludes = new LinkedList<>();
translatedIncludes.addAll(includes);
if (includes.size() > 0) {
if (fUtil != null) {
@@ -188,11 +188,11 @@ public class GCCScannerInfoConsoleParser extends AbstractGCCBOPConsoleParser {
}
}
- CopyOnWriteArrayList<String> translatedIncludesToPut = new CopyOnWriteArrayList<String>(translatedIncludes);
+ CopyOnWriteArrayList<String> translatedIncludesToPut = new CopyOnWriteArrayList<>(translatedIncludes);
// Contribute discovered includes and symbols to the ScannerInfoCollector
if (translatedIncludesToPut.size() > 0 || symbols.size() > 0) {
- Map<ScannerInfoTypes, List<String>> scannerInfo = new HashMap<ScannerInfoTypes, List<String>>();
+ Map<ScannerInfoTypes, List<String>> scannerInfo = new HashMap<>();
scannerInfo.put(ScannerInfoTypes.INCLUDE_PATHS, translatedIncludesToPut);
scannerInfo.put(ScannerInfoTypes.SYMBOL_DEFINITIONS, symbols);
scannerInfo.put(ScannerInfoTypes.TARGET_SPECIFIC_OPTION, targetSpecificOptions);
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/GCCSpecsConsoleParser.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/GCCSpecsConsoleParser.java
index 48c69b6953..53e791fc04 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/GCCSpecsConsoleParser.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/GCCSpecsConsoleParser.java
@@ -44,8 +44,8 @@ public class GCCSpecsConsoleParser implements IScannerInfoConsoleParser {
protected IScannerInfoCollector fCollector = null;
private boolean expectingIncludes = false;
- protected List<String> symbols = new ArrayList<String>();
- protected List<String> includes = new ArrayList<String>();
+ protected List<String> symbols = new ArrayList<>();
+ protected List<String> includes = new ArrayList<>();
@Override
public void startup(IProject project, IPath workingDirectory, IScannerInfoCollector collector,
@@ -120,7 +120,7 @@ public class GCCSpecsConsoleParser implements IScannerInfoConsoleParser {
*/
@Override
public void shutdown() {
- Map<ScannerInfoTypes, List<String>> scannerInfo = new HashMap<ScannerInfoTypes, List<String>>();
+ Map<ScannerInfoTypes, List<String>> scannerInfo = new HashMap<>();
scannerInfo.put(ScannerInfoTypes.INCLUDE_PATHS, includes);
scannerInfo.put(ScannerInfoTypes.SYMBOL_DEFINITIONS, symbols);
if (fCollector != null) {
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/ScannerInfoConsoleParserUtility.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/ScannerInfoConsoleParserUtility.java
index 0e270d2c62..11ab1e24c8 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/ScannerInfoConsoleParserUtility.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/ScannerInfoConsoleParserUtility.java
@@ -53,9 +53,9 @@ public class ScannerInfoConsoleParserUtility extends AbstractGCCBOPConsoleParser
public ScannerInfoConsoleParserUtility(IProject project, IPath workingDirectory, IMarkerGenerator markerGenerator) {
super(project, workingDirectory, markerGenerator);
- fFilesInProject = new HashMap<String, IFile>();
- fCollectedFiles = new ArrayList<IResource>();
- fNameConflicts = new ArrayList<String>();
+ fFilesInProject = new HashMap<>();
+ fCollectedFiles = new ArrayList<>();
+ fNameConflicts = new ArrayList<>();
collectFiles(getProject(), fCollectedFiles);
@@ -188,7 +188,7 @@ public class ScannerInfoConsoleParserUtility extends AbstractGCCBOPConsoleParser
}
public List<String> translateRelativePaths(IFile file, String fileName, List<String> includes) {
- List<String> translatedIncludes = new ArrayList<String>(includes.size());
+ List<String> translatedIncludes = new ArrayList<>(includes.size());
for (String include : includes) {
IPath includePath = new Path(include);
if (includePath.isUNC()) {
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/util/CCommandDSC.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/util/CCommandDSC.java
index c8ec3492bf..6270731096 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/util/CCommandDSC.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/util/CCommandDSC.java
@@ -63,13 +63,13 @@ public class CCommandDSC {
}
public CCommandDSC(boolean cppFileType, IProject project) {
- compilerCommand = new ArrayList<KVStringPair>();
+ compilerCommand = new ArrayList<>();
discovered = false;
this.cppFileType = cppFileType;
- symbols = new ArrayList<String>();
- includes = new ArrayList<String>();
- quoteIncludes = new ArrayList<String>();
+ symbols = new ArrayList<>();
+ includes = new ArrayList<>();
+ quoteIncludes = new ArrayList<>();
this.project = project;
}
@@ -181,7 +181,7 @@ public class CCommandDSC {
* @return list of strings
*/
public List<String> getImacrosFile() {
- List<String> imacrosFiles = new ArrayList<String>();
+ List<String> imacrosFiles = new ArrayList<>();
for (Iterator<KVStringPair> i = compilerCommand.iterator(); i.hasNext();) {
KVStringPair optionPair = i.next();
if (optionPair.getKey().equals(SCDOptionsEnum.IMACROS_FILE.toString())) {
@@ -195,7 +195,7 @@ public class CCommandDSC {
* @return list of strings
*/
public List<String> getIncludeFile() {
- List<String> includeFiles = new ArrayList<String>();
+ List<String> includeFiles = new ArrayList<>();
for (Iterator<KVStringPair> i = compilerCommand.iterator(); i.hasNext();) {
KVStringPair optionPair = i.next();
if (optionPair.getKey().equals(SCDOptionsEnum.INCLUDE_FILE.toString())) {
@@ -362,9 +362,9 @@ public class CCommandDSC {
public void resolveOptions(IProject project) {
if (!isDiscovered()) {
// that's wrong for sure, options cannot be resolved fron the optionPairs??
- ArrayList<String> symbols = new ArrayList<String>();
- ArrayList<String> includes = new ArrayList<String>();
- ArrayList<String> quoteincludes = new ArrayList<String>();
+ ArrayList<String> symbols = new ArrayList<>();
+ ArrayList<String> includes = new ArrayList<>();
+ ArrayList<String> quoteincludes = new ArrayList<>();
for (Iterator<KVStringPair> options = compilerCommand.iterator(); options.hasNext();) {
KVStringPair optionPair = options.next();
String key = optionPair.getKey();
@@ -410,7 +410,7 @@ public class CCommandDSC {
}
public static List<String> makeRelative(IProject project, List<String> paths) {
- List<String> list = new ArrayList<String>(paths.size());
+ List<String> list = new ArrayList<>(paths.size());
for (Iterator<String> iter = paths.iterator(); iter.hasNext();) {
String path = iter.next();
path = makeRelative(project, new Path(path)).toOSString();
@@ -439,7 +439,7 @@ public class CCommandDSC {
}
public static List<String> makeAbsolute(IProject project, List<String> paths) {
- List<String> list = new ArrayList<String>(paths.size());
+ List<String> list = new ArrayList<>(paths.size());
for (Iterator<String> iter = paths.iterator(); iter.hasNext();) {
String path = iter.next();
path = makeAbsolute(project, path);
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/util/CygpathTranslator.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/util/CygpathTranslator.java
index 5ed1a7e566..4ece541085 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/util/CygpathTranslator.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/util/CygpathTranslator.java
@@ -111,7 +111,7 @@ public class CygpathTranslator {
useCygwinFromPath = Cygwin.isAvailable(envPath);
}
- List<String> translatedIncludePaths = new ArrayList<String>();
+ List<String> translatedIncludePaths = new ArrayList<>();
for (Iterator<String> i = sumIncludes.iterator(); i.hasNext();) {
String includePath = i.next();
IPath realPath = new Path(includePath);
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/util/SymbolEntry.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/util/SymbolEntry.java
index 9b01afc671..46e0097125 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/util/SymbolEntry.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/util/SymbolEntry.java
@@ -37,7 +37,7 @@ public class SymbolEntry {
public SymbolEntry(String name, String value, boolean active) {
this.name = SafeStringInterner.safeIntern(name);
if (values == null) {
- values = new LinkedHashMap<String, Boolean>(1);
+ values = new LinkedHashMap<>(1);
}
values.put(SafeStringInterner.safeIntern(value), Boolean.valueOf(active));
}
@@ -88,7 +88,7 @@ public class SymbolEntry {
* @return List
*/
private List<String> get(boolean format, boolean subset, boolean active) {
- List<String> rv = new ArrayList<String>(values.size());
+ List<String> rv = new ArrayList<>(values.size());
for (String val : values.keySet()) {
if (subset && (values.get(val)).booleanValue() != active)
continue;
@@ -106,7 +106,7 @@ public class SymbolEntry {
* @return List
*/
public List<String> getValuesOnly(boolean active) {
- List<String> rv = new ArrayList<String>(values.size());
+ List<String> rv = new ArrayList<>(values.size());
for (Object element : values.keySet()) {
String val = (String) element;
if ((values.get(val)).booleanValue() == active) {
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/DefaultRunSIProvider.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/DefaultRunSIProvider.java
index fb3e725896..6bc426ebaf 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/DefaultRunSIProvider.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/DefaultRunSIProvider.java
@@ -131,7 +131,7 @@ public class DefaultRunSIProvider implements IExternalScannerInfoProvider {
ErrorParserManager epm = new ErrorParserManager(project, markerGenerator,
new String[] { GMAKE_ERROR_PARSER_ID });
- List<IConsoleParser> parsers = new ArrayList<IConsoleParser>();
+ List<IConsoleParser> parsers = new ArrayList<>();
IConsoleParser parser = ScannerInfoConsoleParserFactory.getESIConsoleParser(project, context,
providerId, buildInfo, collector, markerGenerator);
if (parser != null) {
@@ -229,7 +229,7 @@ public class DefaultRunSIProvider implements IExternalScannerInfoProvider {
protected String[] setEnvironment(ICommandLauncher launcher, Properties initialEnv) {
Properties props = getEnvMap(launcher, initialEnv);
String[] env = null;
- ArrayList<String> envList = new ArrayList<String>();
+ ArrayList<String> envList = new ArrayList<>();
Enumeration<?> names = props.propertyNames();
if (names != null) {
while (names.hasMoreElements()) {
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/PerFileSICollector.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/PerFileSICollector.java
index 07793c7211..2fb9bb3202 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/PerFileSICollector.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/PerFileSICollector.java
@@ -75,9 +75,9 @@ public class PerFileSICollector implements IScannerInfoCollector3, IScannerInfoC
protected final Map<Integer, CCommandDSC> commandIdCommandMap; // map of all commands
public ScannerInfoData() {
- commandIdCommandMap = new LinkedHashMap<Integer, CCommandDSC>(); // [commandId, command]
- fileToCommandIdMap = new HashMap<IFile, Integer>(); // [file, commandId]
- commandIdToFilesMap = new HashMap<Integer, Set<IFile>>(); // [commandId, set of files]
+ commandIdCommandMap = new LinkedHashMap<>(); // [commandId, command]
+ fileToCommandIdMap = new HashMap<>(); // [file, commandId]
+ commandIdToFilesMap = new HashMap<>(); // [commandId, set of files]
}
/* (non-Javadoc)
@@ -88,7 +88,7 @@ public class PerFileSICollector implements IScannerInfoCollector3, IScannerInfoC
synchronized (PerFileSICollector.this.fLock) {
Document doc = collectorElem.getOwnerDocument();
- List<Integer> commandIds = new ArrayList<Integer>(commandIdCommandMap.keySet());
+ List<Integer> commandIds = new ArrayList<>(commandIdCommandMap.keySet());
Collections.sort(commandIds);
for (Integer commandId : commandIds) {
CCommandDSC command = commandIdCommandMap.get(commandId);
@@ -201,10 +201,10 @@ public class PerFileSICollector implements IScannerInfoCollector3, IScannerInfoC
sid = new ScannerInfoData();
// siChangedForFileList = new ArrayList();
- siChangedForFileMap = new HashMap<IFile, Integer>();
- siChangedForCommandIdList = new ArrayList<Integer>();
+ siChangedForFileMap = new HashMap<>();
+ siChangedForCommandIdList = new ArrayList<>();
- freeCommandIdPool = new TreeSet<Integer>();
+ freeCommandIdPool = new TreeSet<>();
}
/* (non-Javadoc)
@@ -300,7 +300,7 @@ public class PerFileSICollector implements IScannerInfoCollector3, IScannerInfoC
protected void addCompilerCommand(IFile file, CCommandDSC cmd) {
assert Thread.holdsLock(fLock);
- List<CCommandDSC> existingCommands = new ArrayList<CCommandDSC>(sid.commandIdCommandMap.values());
+ List<CCommandDSC> existingCommands = new ArrayList<>(sid.commandIdCommandMap.values());
int index = existingCommands.indexOf(cmd);
if (index != -1) {
cmd = existingCommands.get(index);
@@ -344,7 +344,7 @@ public class PerFileSICollector implements IScannerInfoCollector3, IScannerInfoC
// update sid.commandIdToFilesMap
Set<IFile> fileSet = sid.commandIdToFilesMap.get(commandId);
if (fileSet == null) {
- fileSet = new HashSet<IFile>();
+ fileSet = new HashSet<>();
sid.commandIdToFilesMap.put(commandId, fileSet);
CCommandDSC cmd = sid.commandIdCommandMap.get(commandId);
if (cmd != null) {
@@ -435,7 +435,7 @@ public class PerFileSICollector implements IScannerInfoCollector3, IScannerInfoC
if (scannerInfoChanged()) {
applyFileDeltas();
removeUnusedCommands();
- changedResources = new ArrayList<IResource>(siChangedForFileMap.keySet());
+ changedResources = new ArrayList<>(siChangedForFileMap.keySet());
siChangedForFileMap.clear();
}
siChangedForCommandIdList.clear();
@@ -480,7 +480,7 @@ public class PerFileSICollector implements IScannerInfoCollector3, IScannerInfoC
*/
@Override
public List<CCommandDSC> getCollectedScannerInfo(Object resource, ScannerInfoTypes type) {
- List<CCommandDSC> rv = new ArrayList<CCommandDSC>();
+ List<CCommandDSC> rv = new ArrayList<>();
// check the resource
String errorMessage = null;
if (resource == null) {
@@ -628,7 +628,7 @@ public class PerFileSICollector implements IScannerInfoCollector3, IScannerInfoC
if (includepaths == null || includepaths.length == 0) {
return quotepaths;
}
- ArrayList<IPath> result = new ArrayList<IPath>(includepaths.length + quotepaths.length);
+ ArrayList<IPath> result = new ArrayList<>(includepaths.length + quotepaths.length);
result.addAll(Arrays.asList(includepaths));
result.addAll(Arrays.asList(quotepaths));
return result.toArray(new IPath[result.size()]);
@@ -693,7 +693,7 @@ public class PerFileSICollector implements IScannerInfoCollector3, IScannerInfoC
CCommandDSC cmd = getCommand(path);
if (cmd != null && cmd.isDiscovered()) {
List<String> symbols = cmd.getSymbols();
- Map<String, String> definedSymbols = new HashMap<String, String>(symbols.size());
+ Map<String, String> definedSymbols = new HashMap<>(symbols.size());
for (String symbol : symbols) {
String key = SafeStringInterner.safeIntern(ScannerConfigUtil.getSymbolKey(symbol));
String value = SafeStringInterner.safeIntern(ScannerConfigUtil.getSymbolValue(symbol));
@@ -789,7 +789,7 @@ public class PerFileSICollector implements IScannerInfoCollector3, IScannerInfoC
protected Map<IResource, PathInfo> calculatePathInfoMap() {
assert Thread.holdsLock(fLock);
- Map<IResource, PathInfo> map = new HashMap<IResource, PathInfo>(sid.fileToCommandIdMap.size() + 1);
+ Map<IResource, PathInfo> map = new HashMap<>(sid.fileToCommandIdMap.size() + 1);
Set<Entry<IFile, Integer>> entrySet = sid.fileToCommandIdMap.entrySet();
for (Entry<IFile, Integer> entry : entrySet) {
IFile file = entry.getKey();
@@ -821,7 +821,7 @@ public class PerFileSICollector implements IScannerInfoCollector3, IScannerInfoC
IPath[] incFiles = stringListToPathArray(cmd.getIncludeFile());
IPath[] macroFiles = stringListToPathArray(cmd.getImacrosFile());
List<String> symbols = cmd.getSymbols();
- Map<String, String> definedSymbols = new HashMap<String, String>(symbols.size());
+ Map<String, String> definedSymbols = new HashMap<>(symbols.size());
for (String symbol : symbols) {
String key = ScannerConfigUtil.getSymbolKey(symbol);
String value = ScannerConfigUtil.getSymbolValue(symbol);
@@ -862,7 +862,7 @@ public class PerFileSICollector implements IScannerInfoCollector3, IScannerInfoC
* @return list of IPath(s).
*/
protected IPath[] getAllIncludePaths(int type) {
- List<String> allIncludes = new ArrayList<String>();
+ List<String> allIncludes = new ArrayList<>();
Set<Integer> cmdIds = sid.commandIdCommandMap.keySet();
for (Integer cmdId : cmdIds) {
CCommandDSC cmd = sid.commandIdCommandMap.get(cmdId);
@@ -882,7 +882,7 @@ public class PerFileSICollector implements IScannerInfoCollector3, IScannerInfoC
discovered = cmd.getImacrosFile();
break;
default:
- discovered = new ArrayList<String>(0);
+ discovered = new ArrayList<>(0);
}
for (String include : discovered) {
// the following line degrades perfomance
@@ -899,7 +899,7 @@ public class PerFileSICollector implements IScannerInfoCollector3, IScannerInfoC
}
protected static IPath[] stringListToPathArray(List<String> discovered) {
- List<Path> allIncludes = new ArrayList<Path>(discovered.size());
+ List<Path> allIncludes = new ArrayList<>(discovered.size());
for (String include : discovered) {
if (!allIncludes.contains(include)) {
allIncludes.add(new Path(include));
@@ -910,7 +910,7 @@ public class PerFileSICollector implements IScannerInfoCollector3, IScannerInfoC
protected Map<String, String> getAllSymbols() {
assert Thread.holdsLock(fLock);
- Map<String, String> symbols = new HashMap<String, String>();
+ Map<String, String> symbols = new HashMap<>();
Set<Integer> cmdIds = sid.commandIdCommandMap.keySet();
for (Integer cmdId : cmdIds) {
CCommandDSC cmd = sid.commandIdCommandMap.get(cmdId);
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/PerProjectSICollector.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/PerProjectSICollector.java
index 63acee31c1..70b5171ddf 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/PerProjectSICollector.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/PerProjectSICollector.java
@@ -85,13 +85,13 @@ public class PerProjectSICollector implements IScannerInfoCollector3, IScannerIn
protected boolean scPersisted = false;
public PerProjectSICollector() {
- discoveredSI = new HashMap<ScannerInfoTypes, List<String>>();
+ discoveredSI = new HashMap<>();
// discoveredIncludes = new ArrayList();
// discoveredSymbols = new ArrayList();
// discoveredTSO = new ArrayList();
//
- sumDiscoveredIncludes = new ArrayList<String>();
- sumDiscoveredSymbols = new LinkedHashMap<String, SymbolEntry>();
+ sumDiscoveredIncludes = new ArrayList<>();
+ sumDiscoveredSymbols = new LinkedHashMap<>();
}
/* (non-Javadoc)
@@ -151,7 +151,7 @@ public class PerProjectSICollector implements IScannerInfoCollector3, IScannerIn
List<String> discovered = discoveredSI.get(siType);
if (discovered == null) {
- discovered = new ArrayList<String>(delta);
+ discovered = new ArrayList<>(delta);
discoveredSI.put(siType, discovered);
} else {
final boolean addSorted = !isBuiltinConfig && siType.equals(ScannerInfoTypes.INCLUDE_PATHS);
@@ -224,7 +224,7 @@ public class PerProjectSICollector implements IScannerInfoCollector3, IScannerIn
monitor.subTask(MakeMessages.getString("ScannerInfoCollector.Updating") + project.getName()); //$NON-NLS-1$
try {
// update scanner configuration
- List<IResource> resourceDelta = new ArrayList<IResource>(1);
+ List<IResource> resourceDelta = new ArrayList<>(1);
resourceDelta.add(project);
MakeCorePlugin.getDefault().getDiscoveryManager().updateDiscoveredInfo(context, pathInfo,
context.isDefaultContext(), resourceDelta);
@@ -275,12 +275,12 @@ public class PerProjectSICollector implements IScannerInfoCollector3, IScannerIn
// Step 3. Merge scanner config from steps 1 and 2
// order is important, use list to preserve it
- ArrayList<String> persistedKeyList = new ArrayList<String>(persistedIncludes.keySet());
+ ArrayList<String> persistedKeyList = new ArrayList<>(persistedIncludes.keySet());
addedIncludes = addItemsWithOrder(persistedKeyList, finalSumIncludes, true);
LinkedHashMap<String, Boolean> newPersistedIncludes;
if (addedIncludes) {
- newPersistedIncludes = new LinkedHashMap<String, Boolean>(persistedKeyList.size());
+ newPersistedIncludes = new LinkedHashMap<>(persistedKeyList.size());
for (String include : persistedKeyList) {
if (persistedIncludes.containsKey(include)) {
newPersistedIncludes.put(include, persistedIncludes.get(include));
@@ -338,7 +338,7 @@ public class PerProjectSICollector implements IScannerInfoCollector3, IScannerIn
LinkedHashMap<String, SymbolEntry> persistedSymbols = discPathInfo.getSymbolMap();
// Step 3. Merge scanner config from steps 1 and 2
- LinkedHashMap<String, SymbolEntry> candidateSymbols = new LinkedHashMap<String, SymbolEntry>(
+ LinkedHashMap<String, SymbolEntry> candidateSymbols = new LinkedHashMap<>(
persistedSymbols);
addedSymbols |= ScannerConfigUtil.scAddSymbolEntryMap2SymbolEntryMap(candidateSymbols,
sumDiscoveredSymbols);
@@ -519,7 +519,7 @@ public class PerProjectSICollector implements IScannerInfoCollector3, IScannerIn
ICProject cProject = CoreModel.getDefault().create(project);
if (cProject != null) {
IPathEntry[] entries = cProject.getRawPathEntries();
- List<IPathEntry> newEntries = new ArrayList<IPathEntry>(Arrays.asList(entries));
+ List<IPathEntry> newEntries = new ArrayList<>(Arrays.asList(entries));
if (!newEntries.contains(container)) {
newEntries.add(container);
cProject.setRawPathEntries(newEntries.toArray(new IPathEntry[newEntries.size()]), monitor);
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/SCMarkerGenerator.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/SCMarkerGenerator.java
index a062dcd0cb..81b4c16012 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/SCMarkerGenerator.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/SCMarkerGenerator.java
@@ -122,7 +122,7 @@ public class SCMarkerGenerator implements IMarkerGenerator {
try {
IMarker[] markers = file.findMarkers(ICModelMarker.C_MODEL_PROBLEM_MARKER, false, IResource.DEPTH_ONE);
if (markers != null) {
- List<IMarker> exactMarkers = new ArrayList<IMarker>();
+ List<IMarker> exactMarkers = new ArrayList<>();
for (int i = 0; i < markers.length; i++) {
IMarker marker = markers[i];
int location = ((Integer) marker.getAttribute(IMarker.LINE_NUMBER)).intValue();
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/ScannerConfigInfoFactory2.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/ScannerConfigInfoFactory2.java
index dd5d36a1ab..e7fe1a223e 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/ScannerConfigInfoFactory2.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/ScannerConfigInfoFactory2.java
@@ -218,7 +218,7 @@ public class ScannerConfigInfoFactory2 {
public void save() throws CoreException {
if (isDirty()) {
- Set<String> idSet = new HashSet<String>(fMap.size() - 1);
+ Set<String> idSet = new HashSet<>(fMap.size() - 1);
Preference pref = (Preference) fMap.get(new InfoContext(null));
pref.store();
@@ -278,7 +278,7 @@ public class ScannerConfigInfoFactory2 {
}
private static abstract class StoreSet implements IScannerConfigBuilderInfo2Set {
- protected HashMap<InfoContext, IScannerConfigBuilderInfo2> fMap = new HashMap<InfoContext, IScannerConfigBuilderInfo2>();
+ protected HashMap<InfoContext, IScannerConfigBuilderInfo2> fMap = new HashMap<>();
protected boolean fIsDirty;
StoreSet() {
@@ -363,9 +363,9 @@ public class ScannerConfigInfoFactory2 {
protected String selectedProfile = EMPTY_STRING;
/** Map from profile ID -> default ProfileOptions
* allows us to avoid storing options to .cproject when they are default .*/
- protected static Map<String, ProfileOptions> defaultProfiles = new ConcurrentHashMap<String, ProfileOptions>();
+ protected static Map<String, ProfileOptions> defaultProfiles = new ConcurrentHashMap<>();
/** Map from profile ID -> ProfileOptions */
- protected Map<String, ProfileOptions> profileOptionsMap = new LinkedHashMap<String, ProfileOptions>();
+ protected Map<String, ProfileOptions> profileOptionsMap = new LinkedHashMap<>();
static class ProfileOptions implements Cloneable {
protected boolean buildOutputFileActionEnabled;
@@ -457,7 +457,7 @@ public class ScannerConfigInfoFactory2 {
this.buildOutputFileActionEnabled = base.buildOutputFileActionEnabled;
this.buildOutputFilePath = base.buildOutputFilePath;
this.buildOutputParserEnabled = base.buildOutputParserEnabled;
- this.providerOptionsMap = new LinkedHashMap<String, ProviderOptions>(base.providerOptionsMap);
+ this.providerOptionsMap = new LinkedHashMap<>(base.providerOptionsMap);
for (Map.Entry<String, ProviderOptions> entry : providerOptionsMap.entrySet()) {
ProviderOptions basePo = entry.getValue();
entry.setValue(new ProviderOptions(basePo));
@@ -506,7 +506,7 @@ public class ScannerConfigInfoFactory2 {
try {
ProfileOptions newProfOpts = (ProfileOptions) super.clone();
if (providerOptionsMap != null) {
- newProfOpts.providerOptionsMap = new LinkedHashMap<String, ProviderOptions>();
+ newProfOpts.providerOptionsMap = new LinkedHashMap<>();
for (Map.Entry<String, ProviderOptions> e : providerOptionsMap.entrySet())
newProfOpts.providerOptionsMap.put(e.getKey(), e.getValue().clone());
}
@@ -597,7 +597,7 @@ public class ScannerConfigInfoFactory2 {
*/
@Override
public List<String> getProfileIdList() {
- return new ArrayList<String>(profileOptionsMap.keySet());
+ return new ArrayList<>(profileOptionsMap.keySet());
}
/* (non-Javadoc)
@@ -666,7 +666,7 @@ public class ScannerConfigInfoFactory2 {
@Override
public List<String> getProviderIdList() {
ProfileOptions po = profileOptionsMap.get(selectedProfile);
- return (po != null) ? new ArrayList<String>(po.providerOptionsMap.keySet()) : new ArrayList<String>(0);
+ return (po != null) ? new ArrayList<>(po.providerOptionsMap.keySet()) : new ArrayList<>(0);
}
/* (non-Javadoc)
@@ -856,7 +856,7 @@ public class ScannerConfigInfoFactory2 {
}
}
- po.providerOptionsMap = new LinkedHashMap<String, ProfileOptions.ProviderOptions>();
+ po.providerOptionsMap = new LinkedHashMap<>();
for (String providerId : configuredProfile.getSIProviderIds()) {
ProfileOptions.ProviderOptions ppo = new ProfileOptions.ProviderOptions();
ScannerInfoProvider configuredProvider = configuredProfile.getScannerInfoProviderElement(providerId);
@@ -987,10 +987,10 @@ public class ScannerConfigInfoFactory2 {
.getSCProfileConfiguration(selectedProfile);
// get the one and only provider id
String providerId = configuredProfile.getSIProviderIds().get(0);
- po.providerOptionsMap = new LinkedHashMap<String, ProfileOptions.ProviderOptions>(1);
+ po.providerOptionsMap = new LinkedHashMap<>(1);
po.providerOptionsMap.put(providerId, ppo);
- profileOptionsMap = new LinkedHashMap<String, ProfileOptions>(1);
+ profileOptionsMap = new LinkedHashMap<>(1);
profileOptionsMap.put(profileId, po);
// store migrated data
@@ -1012,7 +1012,7 @@ public class ScannerConfigInfoFactory2 {
.getSCProfileConfiguration(profileId);
List<String> providerIds = configuredProfile.getSIProviderIds();
int providerCounter = 0;
- po.providerOptionsMap = new LinkedHashMap<String, ProfileOptions.ProviderOptions>(providerIds.size());
+ po.providerOptionsMap = new LinkedHashMap<>(providerIds.size());
for (ICStorageElement child : profile.getChildren()) {
// buildOutputProvider element
@@ -1106,7 +1106,7 @@ public class ScannerConfigInfoFactory2 {
// ScannerConfigProfile configuredProfile = ScannerConfigProfileManager.getInstance().
// getSCProfileConfiguration(selectedProfile);
// List providerIds = configuredProfile.getSIProviderIds();
- List<String> providerIds = new ArrayList<String>(po.providerOptionsMap.keySet());
+ List<String> providerIds = new ArrayList<>(po.providerOptionsMap.keySet());
for (int i = 0; i < providerIds.size(); ++i) {
String providerId = providerIds.get(i);
ProfileOptions.ProviderOptions ppo = po.providerOptionsMap.get(providerId);
@@ -1221,7 +1221,7 @@ public class ScannerConfigInfoFactory2 {
.safeIntern(prefs.getDefaultString(prefix + SCANNER_CONFIG_SELECTED_PROFILE_ID_SUFFIX));
}
List<String> profileIds = ScannerConfigProfileManager.getInstance().getProfileIds(context);
- profileOptionsMap = new LinkedHashMap<String, ProfileOptions>(profileIds.size());
+ profileOptionsMap = new LinkedHashMap<>(profileIds.size());
for (String profileId : profileIds) {
ProfileOptions po = new ProfileOptions();
profileOptionsMap.put(profileId, po);
@@ -1240,7 +1240,7 @@ public class ScannerConfigInfoFactory2 {
ScannerConfigProfile configuredProfile = ScannerConfigProfileManager.getInstance()
.getSCProfileConfiguration(profileId);
List<String> providerIds = configuredProfile.getSIProviderIds();
- po.providerOptionsMap = new LinkedHashMap<String, ProfileOptions.ProviderOptions>(providerIds.size());
+ po.providerOptionsMap = new LinkedHashMap<>(providerIds.size());
for (String providerId : providerIds) {
ProfileOptions.ProviderOptions ppo = new ProfileOptions.ProviderOptions();
po.providerOptionsMap.put(providerId, ppo);
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/ScannerConfigProfile.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/ScannerConfigProfile.java
index 015e369677..ea33d5cd55 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/ScannerConfigProfile.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/ScannerConfigProfile.java
@@ -243,7 +243,7 @@ public class ScannerConfigProfile {
private ScannerInfoCollector scannerInfoCollector;
private BuildOutputProvider buildOutputProvider;
- private Map<String, ScannerInfoProvider> scannerInfoProviders = new LinkedHashMap<String, ScannerInfoProvider>();
+ private Map<String, ScannerInfoProvider> scannerInfoProviders = new LinkedHashMap<>();
private Boolean supportsContext;
@@ -296,7 +296,7 @@ public class ScannerConfigProfile {
* @return Returns the list of providerIds
*/
public List<String> getSIProviderIds() {
- return new ArrayList<String>(scannerInfoProviders.keySet());
+ return new ArrayList<>(scannerInfoProviders.keySet());
}
/**
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/ScannerConfigProfileManager.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/ScannerConfigProfileManager.java
index a65cd3f5c7..484f4a5cfc 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/ScannerConfigProfileManager.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/ScannerConfigProfileManager.java
@@ -52,7 +52,7 @@ public final class ScannerConfigProfileManager {
* Singleton pattern
*/
private ScannerConfigProfileManager() {
- projectToProfileInstanceMap = new HashMap<IProject, Map<InfoContext, Object>>();
+ projectToProfileInstanceMap = new HashMap<>();
}
private static final ScannerConfigProfileManager instance = new ScannerConfigProfileManager();
@@ -92,7 +92,7 @@ public final class ScannerConfigProfileManager {
synchronized (fLock) {
Map<InfoContext, Object> map = projectToProfileInstanceMap.get(project);
if (map == null && create) {
- map = new HashMap<InfoContext, Object>();
+ map = new HashMap<>();
projectToProfileInstanceMap.put(project, map);
}
return Collections.synchronizedMap(map);
@@ -129,7 +129,7 @@ public final class ScannerConfigProfileManager {
if (profileInstance == null || !profileInstance.getProfile().getId().equals(profileId)) {
profileInstance = new SCProfileInstance(project, context, getSCProfileConfiguration(profileId));
- map.put(context, new SoftReference<SCProfileInstance>(profileInstance));
+ map.put(context, new SoftReference<>(profileInstance));
}
return profileInstance;
}
@@ -158,7 +158,7 @@ public final class ScannerConfigProfileManager {
public List<String> getProfileIds() {
synchronized (fLock) {
if (profileIds == null) {
- profileIds = new ArrayList<String>();
+ profileIds = new ArrayList<>();
IExtensionPoint extension = Platform.getExtensionRegistry().getExtensionPoint(MakeCorePlugin.PLUGIN_ID,
ScannerConfigProfileManager.SI_PROFILE_SIMPLE_ID);
if (extension != null) {
@@ -182,7 +182,7 @@ public final class ScannerConfigProfileManager {
synchronized (fLock) {
if (contextAwareProfileIds == null) {
- contextAwareProfileIds = new ArrayList<String>();
+ contextAwareProfileIds = new ArrayList<>();
List<String> all = getProfileIds();
for (int i = 0; i < all.size(); i++) {
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/MakeEnvironmentBlock.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/MakeEnvironmentBlock.java
index 57b3d30cfc..de4e28f8d1 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/MakeEnvironmentBlock.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/MakeEnvironmentBlock.java
@@ -311,7 +311,7 @@ public class MakeEnvironmentBlock extends AbstractCOptionPage {
// Convert the table's items into a Map so that this can be saved in the
// configuration's attributes.
TableItem[] items = environmentTable.getTable().getItems();
- Map<String, String> map = new HashMap<String, String>(items.length);
+ Map<String, String> map = new HashMap<>(items.length);
for (int i = 0; i < items.length; i++) {
EnvironmentVariable var = (EnvironmentVariable) items[i].getData();
map.put(var.getName(), var.getValue());
@@ -607,7 +607,7 @@ public class MakeEnvironmentBlock extends AbstractCOptionPage {
private Map<String, EnvironmentVariable> getNativeEnvironment() {
@SuppressWarnings({ "unchecked", "rawtypes" })
Map<String, String> stringVars = (Hashtable) EnvironmentReader.getEnvVars();
- HashMap<String, EnvironmentVariable> vars = new HashMap<String, EnvironmentVariable>();
+ HashMap<String, EnvironmentVariable> vars = new HashMap<>();
for (Iterator<String> i = stringVars.keySet().iterator(); i.hasNext();) {
String key = i.next();
String value = stringVars.get(key);
@@ -713,7 +713,7 @@ public class MakeEnvironmentBlock extends AbstractCOptionPage {
}
};
- TreeMap<String, EnvironmentVariable> envVars = new TreeMap<String, EnvironmentVariable>(comparator);
+ TreeMap<String, EnvironmentVariable> envVars = new TreeMap<>(comparator);
envVars.putAll((Map<String, EnvironmentVariable>) inputElement);
elements = new EnvironmentVariable[envVars.size()];
int index = 0;
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/MultipleInputDialog.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/MultipleInputDialog.java
index 69a88e63bc..7896414156 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/MultipleInputDialog.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/MultipleInputDialog.java
@@ -51,10 +51,10 @@ public class MultipleInputDialog extends Dialog {
protected Composite panel;
- protected List<FieldSummary> fieldList = new ArrayList<FieldSummary>();
- protected List<Text> controlList = new ArrayList<Text>();
- protected List<Validator> validators = new ArrayList<Validator>();
- protected Map<Object, String> valueMap = new HashMap<Object, String>();
+ protected List<FieldSummary> fieldList = new ArrayList<>();
+ protected List<Text> controlList = new ArrayList<>();
+ protected List<Validator> validators = new ArrayList<>();
+ protected Map<Object, String> valueMap = new HashMap<>();
private String title;
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/dnd/FileTransferDropTargetListener.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/dnd/FileTransferDropTargetListener.java
index 0f7e210585..1958eebf6e 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/dnd/FileTransferDropTargetListener.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/dnd/FileTransferDropTargetListener.java
@@ -117,7 +117,7 @@ public class FileTransferDropTargetListener extends AbstractContainerAreaDropAda
*/
private static IMakeTarget[] prepareMakeTargetsFromFiles(String[] filenames, IContainer dropContainer,
Shell shell) {
- List<IMakeTarget> makeTargetsList = new ArrayList<IMakeTarget>(filenames.length);
+ List<IMakeTarget> makeTargetsList = new ArrayList<>(filenames.length);
int errorCount = 0;
int nonFileCount = 0;
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/dnd/LocalTransferDropTargetListener.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/dnd/LocalTransferDropTargetListener.java
index 97762064d7..12b5023d61 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/dnd/LocalTransferDropTargetListener.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/dnd/LocalTransferDropTargetListener.java
@@ -206,7 +206,7 @@ public class LocalTransferDropTargetListener extends AbstractContainerAreaDropAd
private static IMakeTarget[] prepareMakeTargetsFromSelection(IStructuredSelection selection,
IContainer dropContainer) {
List<?> elements = selection.toList();
- List<IMakeTarget> makeTargetsList = new ArrayList<IMakeTarget>(elements.size());
+ List<IMakeTarget> makeTargetsList = new ArrayList<>(elements.size());
for (Object element : elements) {
if (element instanceof IMakeTarget) {
makeTargetsList.add((IMakeTarget) element);
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/dnd/MakeTargetDndUtil.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/dnd/MakeTargetDndUtil.java
index a2102124d0..135321b587 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/dnd/MakeTargetDndUtil.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/dnd/MakeTargetDndUtil.java
@@ -100,7 +100,7 @@ public class MakeTargetDndUtil {
return false;
}
- List<String> names = new ArrayList<String>(selectedElements.size());
+ List<String> names = new ArrayList<>(selectedElements.size());
for (Object element : selectedElements) {
if (!(element instanceof IMakeTarget)) {
return false;
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/dnd/MakeTargetTransferData.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/dnd/MakeTargetTransferData.java
index 688ef39c68..e78f0853b0 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/dnd/MakeTargetTransferData.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/dnd/MakeTargetTransferData.java
@@ -127,7 +127,7 @@ public class MakeTargetTransferData {
*
*/
public MakeTargetTransferData() {
- makeTargetData = new ArrayList<MakeTargetData>();
+ makeTargetData = new ArrayList<>();
}
/**
@@ -175,7 +175,7 @@ public class MakeTargetTransferData {
*/
public IMakeTarget[] createMakeTargets(IProject project) {
IMakeTargetManager makeTargetManager = MakeCorePlugin.getDefault().getTargetManager();
- ArrayList<IMakeTarget> makeTargets = new ArrayList<IMakeTarget>(makeTargetData.size());
+ ArrayList<IMakeTarget> makeTargets = new ArrayList<>(makeTargetData.size());
String[] ids = makeTargetManager.getTargetBuilders(project);
String builderId = ids[0];
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/dnd/TextTransferDropTargetListener.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/dnd/TextTransferDropTargetListener.java
index 8487269cdf..2da17066ac 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/dnd/TextTransferDropTargetListener.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/dnd/TextTransferDropTargetListener.java
@@ -113,7 +113,7 @@ public class TextTransferDropTargetListener extends AbstractContainerAreaDropAda
private static IMakeTarget[] prepareMakeTargetsFromString(String multilineText, IContainer container) {
if (container != null) {
String[] lines = multilineText.split("[\n\r]"); //$NON-NLS-1$
- List<IMakeTarget> makeTargets = new ArrayList<IMakeTarget>(lines.length);
+ List<IMakeTarget> makeTargets = new ArrayList<>(lines.length);
for (String command : lines) {
command = command.trim();
if (command.length() > 0) {
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/AddBuildTargetAction.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/AddBuildTargetAction.java
index 34a9817b91..b81084ddd9 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/AddBuildTargetAction.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/AddBuildTargetAction.java
@@ -142,7 +142,7 @@ public class AddBuildTargetAction extends Action {
if (!sel.isEmpty() && sel instanceof IStructuredSelection) {
List<?> list = ((IStructuredSelection) sel).toList();
if (list.size() > 0) {
- List<ITargetRule> targets = new ArrayList<ITargetRule>(list.size());
+ List<ITargetRule> targets = new ArrayList<>(list.size());
Object[] elements = list.toArray();
for (Object element : elements) {
if (element instanceof ITargetRule) {
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/MakefileContentOutlinePage.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/MakefileContentOutlinePage.java
index c5ed626f86..b3167933b9 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/MakefileContentOutlinePage.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/MakefileContentOutlinePage.java
@@ -120,7 +120,7 @@ public class MakefileContentOutlinePage extends ContentOutlinePage {
} else {
directives = new IDirective[0];
}
- List<IDirective> list = new ArrayList<IDirective>(directives.length);
+ List<IDirective> list = new ArrayList<>(directives.length);
for (IDirective directive : directives) {
if (showMacroDefinition && directive instanceof IMacroDefinition) {
list.add(directive);
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/MakefileToggleCommentAction.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/MakefileToggleCommentAction.java
index eb31a60c99..0e4ff8ac41 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/MakefileToggleCommentAction.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/MakefileToggleCommentAction.java
@@ -335,7 +335,7 @@ public final class MakefileToggleCommentAction extends TextEditorAction {
fPrefixesMap = null;
String[] types = configuration.getConfiguredContentTypes(sourceViewer);
- Map<String, String[]> prefixesMap = new HashMap<String, String[]>(types.length);
+ Map<String, String[]> prefixesMap = new HashMap<>(types.length);
for (String type : types) {
String[] prefixes = configuration.getDefaultPrefixes(sourceViewer, type);
if (prefixes != null && prefixes.length > 0) {
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/NotifyingReconciler.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/NotifyingReconciler.java
index a3e47b2d40..a6d2290d2f 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/NotifyingReconciler.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/NotifyingReconciler.java
@@ -24,7 +24,7 @@ import org.eclipse.jface.text.reconciler.MonoReconciler;
* NotifyingReconciler
*/
public class NotifyingReconciler extends MonoReconciler {
- private ArrayList<IReconcilingParticipant> fReconcilingParticipants = new ArrayList<IReconcilingParticipant>();
+ private ArrayList<IReconcilingParticipant> fReconcilingParticipants = new ArrayList<>();
/**
* Constructor for NotifyingReconciler.
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/OpenIncludeAction.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/OpenIncludeAction.java
index 47767995b1..a6e8d9947c 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/OpenIncludeAction.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/OpenIncludeAction.java
@@ -106,7 +106,7 @@ public class OpenIncludeAction extends Action {
@SuppressWarnings("unchecked")
List<Object> list = ((IStructuredSelection) sel).toList();
if (list.size() > 0) {
- List<IInclude> includes = new ArrayList<IInclude>(list.size());
+ List<IInclude> includes = new ArrayList<>(list.size());
for (Object element : list) {
if (element instanceof IInclude) {
includes.add((IInclude) element);
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/ProjectionMakefileUpdater.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/ProjectionMakefileUpdater.java
index ee1cb015f6..a5ebc6dcd5 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/ProjectionMakefileUpdater.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/ProjectionMakefileUpdater.java
@@ -169,7 +169,7 @@ public class ProjectionMakefileUpdater implements IProjectionListener {
}
private Map<MakefileProjectionAnnotation, Position> computeAdditions(IParent parent) {
- Map<MakefileProjectionAnnotation, Position> map = new HashMap<MakefileProjectionAnnotation, Position>();
+ Map<MakefileProjectionAnnotation, Position> map = new HashMap<>();
computeAdditions(parent.getDirectives(), map);
return map;
}
@@ -242,9 +242,9 @@ public class ProjectionMakefileUpdater implements IProjectionListener {
fCachedDocument = provider.getDocument(fEditor.getEditorInput());
fAllowCollapsing = false;
- Map<MakefileProjectionAnnotation, Position> additions = new HashMap<MakefileProjectionAnnotation, Position>();
- List<MakefileProjectionAnnotation> deletions = new ArrayList<MakefileProjectionAnnotation>();
- List<MakefileProjectionAnnotation> updates = new ArrayList<MakefileProjectionAnnotation>();
+ Map<MakefileProjectionAnnotation, Position> additions = new HashMap<>();
+ List<MakefileProjectionAnnotation> deletions = new ArrayList<>();
+ List<MakefileProjectionAnnotation> updates = new ArrayList<>();
Map<MakefileProjectionAnnotation, Position> updated = computeAdditions((IParent) fInput);
Map<IDirective, List<MakefileProjectionAnnotation>> previous = createAnnotationMap(model);
@@ -306,8 +306,8 @@ public class ProjectionMakefileUpdater implements IProjectionListener {
return;
}
- List<MakefileProjectionAnnotation> newDeletions = new ArrayList<MakefileProjectionAnnotation>();
- List<MakefileProjectionAnnotation> newChanges = new ArrayList<MakefileProjectionAnnotation>();
+ List<MakefileProjectionAnnotation> newDeletions = new ArrayList<>();
+ List<MakefileProjectionAnnotation> newChanges = new ArrayList<>();
Iterator<MakefileProjectionAnnotation> deletionIterator = deletions.iterator();
outer: while (deletionIterator.hasNext()) {
@@ -369,7 +369,7 @@ public class ProjectionMakefileUpdater implements IProjectionListener {
}
private Map<IDirective, List<MakefileProjectionAnnotation>> createAnnotationMap(IAnnotationModel model) {
- Map<IDirective, List<MakefileProjectionAnnotation>> map = new HashMap<IDirective, List<MakefileProjectionAnnotation>>();
+ Map<IDirective, List<MakefileProjectionAnnotation>> map = new HashMap<>();
Iterator<?> e = model.getAnnotationIterator();
while (e.hasNext()) {
Object annotation = e.next();
@@ -377,7 +377,7 @@ public class ProjectionMakefileUpdater implements IProjectionListener {
MakefileProjectionAnnotation directive = (MakefileProjectionAnnotation) annotation;
List<MakefileProjectionAnnotation> list = map.get(directive.getElement());
if (list == null) {
- list = new ArrayList<MakefileProjectionAnnotation>(2);
+ list = new ArrayList<>(2);
map.put(directive.getElement(), list);
}
list.add(directive);
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/WorkingCopyManager.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/WorkingCopyManager.java
index 8338484579..5ba6e8cf72 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/WorkingCopyManager.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/WorkingCopyManager.java
@@ -80,7 +80,7 @@ public class WorkingCopyManager implements IWorkingCopyManager, IWorkingCopyMana
public void setWorkingCopy(IEditorInput input, IMakefile workingCopy) {
if (fDocumentProvider.getDocument(input) != null) {
if (fMap == null) {
- fMap = new HashMap<IEditorInput, IMakefile>();
+ fMap = new HashMap<>();
}
fMap.put(input, workingCopy);
}
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/preferences/AbstractMakefileEditorPreferencePage.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/preferences/AbstractMakefileEditorPreferencePage.java
index 0ead6eafac..9dfe6de71a 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/preferences/AbstractMakefileEditorPreferencePage.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/preferences/AbstractMakefileEditorPreferencePage.java
@@ -50,7 +50,7 @@ import com.ibm.icu.text.MessageFormat;
public abstract class AbstractMakefileEditorPreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
OverlayPreferenceStore fOverlayStore;
- Map<Control, String> fCheckBoxes = new HashMap<Control, String>();
+ Map<Control, String> fCheckBoxes = new HashMap<>();
private SelectionListener fCheckBoxListener = new SelectionListener() {
@Override
public void widgetDefaultSelected(SelectionEvent e) {
@@ -63,7 +63,7 @@ public abstract class AbstractMakefileEditorPreferencePage extends PreferencePag
}
};
- Map<Control, String> fTextFields = new HashMap<Control, String>();
+ Map<Control, String> fTextFields = new HashMap<>();
private ModifyListener fTextFieldListener = new ModifyListener() {
@Override
public void modifyText(ModifyEvent e) {
@@ -72,7 +72,7 @@ public abstract class AbstractMakefileEditorPreferencePage extends PreferencePag
}
};
- private Map<Text, String[]> fNumberFields = new HashMap<Text, String[]>();
+ private Map<Text, String[]> fNumberFields = new HashMap<>();
private ModifyListener fNumberFieldListener = new ModifyListener() {
@Override
public void modifyText(ModifyEvent e) {
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/preferences/MakefileEditorPreferencePage.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/preferences/MakefileEditorPreferencePage.java
index 1e25cdded3..4a353c19cf 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/preferences/MakefileEditorPreferencePage.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/preferences/MakefileEditorPreferencePage.java
@@ -60,7 +60,7 @@ public class MakefileEditorPreferencePage extends AbstractMakefileEditorPreferen
private String[][] fSyntaxColorListModel;
private TableViewer fHighlightingColorListViewer;
- private final List<HighlightingColorListItem> fHighlightingColorList = new ArrayList<HighlightingColorListItem>(7);
+ private final List<HighlightingColorListItem> fHighlightingColorList = new ArrayList<>(7);
Button fAppearanceColorDefault;
ColorSelector fSyntaxForegroundColorEditor;
@@ -208,7 +208,7 @@ public class MakefileEditorPreferencePage extends AbstractMakefileEditorPreferen
ColorManager.MAKE_MATCHING_BRACKETS_COLOR, null },
{ MakefilePreferencesMessages.getString("MakefileEditorPreferencePage.makefile_editor_default"), //$NON-NLS-1$
ColorManager.MAKE_DEFAULT_COLOR, null }, };
- ArrayList<OverlayKey> overlayKeys = new ArrayList<OverlayKey>();
+ ArrayList<OverlayKey> overlayKeys = new ArrayList<>();
overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
MakefileEditorPreferenceConstants.EDITOR_FOLDING_ENABLED));
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/scannerconfig/DiscoveredElement.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/scannerconfig/DiscoveredElement.java
index 569e93d565..139c855380 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/scannerconfig/DiscoveredElement.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/scannerconfig/DiscoveredElement.java
@@ -43,7 +43,7 @@ public class DiscoveredElement {
private String fEntry;
private int fEntryKind;
private boolean fRemoved;
- private ArrayList<DiscoveredElement> fChildren = new ArrayList<DiscoveredElement>();
+ private ArrayList<DiscoveredElement> fChildren = new ArrayList<>();
private DiscoveredElement fParent;
public DiscoveredElement(IProject project, String entry, int kind, boolean removed, boolean system) {
@@ -196,7 +196,7 @@ public class DiscoveredElement {
}
public void setChildren(DiscoveredElement[] children) {
- fChildren = new ArrayList<DiscoveredElement>(Arrays.asList(children));
+ fChildren = new ArrayList<>(Arrays.asList(children));
}
public boolean delete() {
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/text/ColorManager.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/text/ColorManager.java
index 01053c3d9a..a69e2ca3db 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/text/ColorManager.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/text/ColorManager.java
@@ -51,7 +51,7 @@ public class ColorManager implements ISharedTextColors {
return fgColorManager;
}
- protected Map<RGB, Color> fColorTable = new HashMap<RGB, Color>(10);
+ protected Map<RGB, Color> fColorTable = new HashMap<>(10);
@Override
public void dispose() {
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/text/makefile/AbstractMakefileCodeScanner.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/text/makefile/AbstractMakefileCodeScanner.java
index edd321f929..f5af261272 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/text/makefile/AbstractMakefileCodeScanner.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/text/makefile/AbstractMakefileCodeScanner.java
@@ -37,7 +37,7 @@ import org.eclipse.swt.graphics.RGB;
*/
public abstract class AbstractMakefileCodeScanner extends RuleBasedScanner {
- private Map<String, Token> fTokenMap = new HashMap<String, Token>();
+ private Map<String, Token> fTokenMap = new HashMap<>();
private String[] fPropertyNamesColor;
/**
* Preference keys for boolean preferences which are <code>true</code>,
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/text/makefile/MakefileCodeScanner.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/text/makefile/MakefileCodeScanner.java
index 8bbc6ad526..c69446ef90 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/text/makefile/MakefileCodeScanner.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/text/makefile/MakefileCodeScanner.java
@@ -89,7 +89,7 @@ public class MakefileCodeScanner extends AbstractMakefileCodeScanner {
IToken macroDefToken = getToken(ColorManager.MAKE_MACRO_DEF_COLOR);
IToken defaultToken = getToken(ColorManager.MAKE_DEFAULT_COLOR);
- List<IRule> rules = new ArrayList<IRule>();
+ List<IRule> rules = new ArrayList<>();
// Add generic whitespace rule.
rules.add(new WhitespaceRule(new IWhitespaceDetector() {
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/text/makefile/MakefileCompletionProcessor.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/text/makefile/MakefileCompletionProcessor.java
index d171ca1967..893142798d 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/text/makefile/MakefileCompletionProcessor.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/text/makefile/MakefileCompletionProcessor.java
@@ -107,7 +107,7 @@ public class MakefileCompletionProcessor implements IContentAssistProcessor {
@Override
public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int documentOffset) {
- List<ICompletionProposal> proposalList = new ArrayList<ICompletionProposal>();
+ List<ICompletionProposal> proposalList = new ArrayList<>();
IMakefile makefile = fManager.getWorkingCopy(fEditor.getEditorInput());
WordPartDetector wordPart = new WordPartDetector(viewer.getDocument(), documentOffset);
if (wordPart.isMacro()) {
@@ -139,7 +139,7 @@ public class MakefileCompletionProcessor implements IContentAssistProcessor {
private ArrayList<ICompletionProposal> createCompletionProposals(WordPartDetector wordPart,
IAutomaticVariable[] autoVars) {
- ArrayList<ICompletionProposal> proposalList = new ArrayList<ICompletionProposal>(autoVars.length);
+ ArrayList<ICompletionProposal> proposalList = new ArrayList<>(autoVars.length);
String wordPartName = wordPart.getName();
BracketHandler bracket = new BracketHandler(wordPartName);
String partialName = bracket.followingText;
@@ -165,7 +165,7 @@ public class MakefileCompletionProcessor implements IContentAssistProcessor {
private ArrayList<ICompletionProposal> createCompletionProposals(WordPartDetector wordPart,
IMacroDefinition[] macros) {
- ArrayList<ICompletionProposal> proposalList = new ArrayList<ICompletionProposal>(macros.length);
+ ArrayList<ICompletionProposal> proposalList = new ArrayList<>(macros.length);
String wordPartName = wordPart.getName();
BracketHandler bracket = new BracketHandler(wordPartName);
@@ -192,7 +192,7 @@ public class MakefileCompletionProcessor implements IContentAssistProcessor {
private ArrayList<ICompletionProposal> createCompletionProposals(WordPartDetector wordPart,
IBuiltinFunction[] builtinFuns) {
- ArrayList<ICompletionProposal> proposalList = new ArrayList<ICompletionProposal>(builtinFuns.length);
+ ArrayList<ICompletionProposal> proposalList = new ArrayList<>(builtinFuns.length);
String wordPartName = wordPart.getName();
BracketHandler bracket = new BracketHandler(wordPartName);
@@ -219,7 +219,7 @@ public class MakefileCompletionProcessor implements IContentAssistProcessor {
}
private ArrayList<ICompletionProposal> createCompletionProposals(WordPartDetector wordPart, ITargetRule[] targets) {
- ArrayList<ICompletionProposal> proposalList = new ArrayList<ICompletionProposal>(targets.length);
+ ArrayList<ICompletionProposal> proposalList = new ArrayList<>(targets.length);
String partialName = wordPart.getName();
for (ITargetRule target : targets) {
@@ -238,8 +238,8 @@ public class MakefileCompletionProcessor implements IContentAssistProcessor {
public IContextInformation[] computeContextInformation(ITextViewer viewer, int documentOffset) {
WordPartDetector wordPart = new WordPartDetector(viewer.getDocument(), documentOffset);
IMakefile makefile = fManager.getWorkingCopy(fEditor.getEditorInput());
- ArrayList<String> contextList = new ArrayList<String>();
- ArrayList<IContextInformation> contextInformationList = new ArrayList<IContextInformation>();
+ ArrayList<String> contextList = new ArrayList<>();
+ ArrayList<IContextInformation> contextInformationList = new ArrayList<>();
if (wordPart.isMacro()) {
IDirective[] statements = makefile.getMacroDefinitions();
for (IDirective statement : statements) {
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/text/makefile/MakefilePartitionScanner.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/text/makefile/MakefilePartitionScanner.java
index d6b0abc0ad..b2ae0fcc46 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/text/makefile/MakefilePartitionScanner.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/text/makefile/MakefilePartitionScanner.java
@@ -43,7 +43,7 @@ public class MakefilePartitionScanner extends RuleBasedPartitionScanner {
IToken tComment = new Token(MAKEFILE_COMMENT_PARTITION);
- List<EndOfLineRule> rules = new ArrayList<EndOfLineRule>();
+ List<EndOfLineRule> rules = new ArrayList<>();
// Add rule for single line comments.
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/MakeContentProvider.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/MakeContentProvider.java
index 8f954e3c23..298cfaecdd 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/MakeContentProvider.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/MakeContentProvider.java
@@ -95,7 +95,7 @@ public class MakeContentProvider implements ITreeContentProvider, IMakeTargetLis
}
} else if (obj instanceof IContainer) {
IContainer container = (IContainer) obj;
- ArrayList<Object> children = new ArrayList<Object>();
+ ArrayList<Object> children = new ArrayList<>();
boolean isAddingSourceRoots = !bFlatten && (container instanceof IProject)
&& CCorePlugin.showSourceRootsAtTopOfProject();
@@ -135,7 +135,7 @@ public class MakeContentProvider implements ITreeContentProvider, IMakeTargetLis
return children.toArray();
} else if (obj instanceof TargetSourceContainer) {
- ArrayList<Object> children = new ArrayList<Object>();
+ ArrayList<Object> children = new ArrayList<>();
try {
IContainer container = ((TargetSourceContainer) obj).getContainer();
IResource[] resources = container.members();
@@ -177,7 +177,7 @@ public class MakeContentProvider implements ITreeContentProvider, IMakeTargetLis
@Override
public Object[] getElements(Object obj) {
if (bFlatten) {
- List<Object> list = new ArrayList<Object>();
+ List<Object> list = new ArrayList<>();
Object[] children = getChildren(obj);
for (int i = 0; i < children.length; i++) {
list.add(children[i]);
@@ -313,7 +313,7 @@ public class MakeContentProvider implements ITreeContentProvider, IMakeTargetLis
return;
}
- Set<IProject> affectedProjects = new HashSet<IProject>();
+ Set<IProject> affectedProjects = new HashSet<>();
for (IMakeTarget target : event.getTargets()) {
IContainer container = target.getContainer();
affectedProjects.add(container.getProject());
@@ -355,7 +355,7 @@ public class MakeContentProvider implements ITreeContentProvider, IMakeTargetLis
return;
}
- Set<IProject> affectedProjects = new HashSet<IProject>();
+ Set<IProject> affectedProjects = new HashSet<>();
collectAffectedProjects(delta, affectedProjects);
// If the view is being filtered or source roots shown,
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/TargetBuild.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/TargetBuild.java
index 4540834039..fe35f2b508 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/TargetBuild.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/TargetBuild.java
@@ -62,7 +62,7 @@ public class TargetBuild {
if (!BuildAction.isSaveAllSet())
return;
- List<IProject> projects = new ArrayList<IProject>();
+ List<IProject> projects = new ArrayList<>();
for (int i = 0; i < targets.length; ++i) {
IMakeTarget target = targets[i];
projects.add(target.getProject());
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/actions/UpdateMakeProjectAction.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/actions/UpdateMakeProjectAction.java
index 94ab6051cb..82a137a7c0 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/actions/UpdateMakeProjectAction.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/actions/UpdateMakeProjectAction.java
@@ -72,7 +72,7 @@ public class UpdateMakeProjectAction implements IWorkbenchWindowActionDelegate {
public void run(IAction action) {
if (fSelection instanceof IStructuredSelection) {
Object[] elems = ((IStructuredSelection) fSelection).toArray();
- ArrayList<IProject> projects = new ArrayList<IProject>(elems.length);
+ ArrayList<IProject> projects = new ArrayList<>(elems.length);
for (int i = 0; i < elems.length; i++) {
Object elem = elems[i];
@@ -102,7 +102,7 @@ public class UpdateMakeProjectAction implements IWorkbenchWindowActionDelegate {
public static IProject[] getOldProjects() {
IProject[] project = MakeUIPlugin.getWorkspace().getRoot().getProjects();
- Vector<IProject> result = new Vector<IProject>();
+ Vector<IProject> result = new Vector<>();
try {
for (int i = 0; i < project.length; i++) {
if (isOldProject(project[i])) {
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/dialogs/AbstractDiscoveryOptionsBlock.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/dialogs/AbstractDiscoveryOptionsBlock.java
index 43c00710e9..bca65db73d 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/dialogs/AbstractDiscoveryOptionsBlock.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/dialogs/AbstractDiscoveryOptionsBlock.java
@@ -178,7 +178,7 @@ public abstract class AbstractDiscoveryOptionsBlock extends AbstractCOptionPage
*
*/
private void initializeProfilePageMap() {
- fProfilePageMap = new HashMap<String, DiscoveryProfilePageConfiguration>(5);
+ fProfilePageMap = new HashMap<>(5);
IExtensionPoint extensionPoint = Platform.getExtensionRegistry().getExtensionPoint(MakeUIPlugin.getPluginId(),
"DiscoveryProfilePage"); //$NON-NLS-1$
@@ -349,7 +349,7 @@ public abstract class AbstractDiscoveryOptionsBlock extends AbstractCOptionPage
}
protected List<String> getDiscoveryProfileIdList() {
- return new ArrayList<String>(fProfilePageMap.keySet());
+ return new ArrayList<>(fProfilePageMap.keySet());
}
protected abstract String getCurrentProfileId();
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/dialogs/DiscoveredPathContainerPage.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/dialogs/DiscoveredPathContainerPage.java
index 324cadd2c1..08acbbe32e 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/dialogs/DiscoveredPathContainerPage.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/dialogs/DiscoveredPathContainerPage.java
@@ -146,7 +146,7 @@ public class DiscoveredPathContainerPage extends WizardPage implements IPathEntr
DiscoveredContainerAdapter adapter = new DiscoveredContainerAdapter();
- fDiscoveredContainerList = new TreeListDialogField<DiscoveredElement>(adapter, buttonLabels,
+ fDiscoveredContainerList = new TreeListDialogField<>(adapter, buttonLabels,
new DiscoveredElementLabelProvider());
fDiscoveredContainerList.setDialogFieldListener(adapter);
fDiscoveredContainerList.setLabelText(MakeUIPlugin.getResourceString(CONTAINER_LIST_LABEL));
@@ -154,7 +154,7 @@ public class DiscoveredPathContainerPage extends WizardPage implements IPathEntr
fDiscoveredContainerList.setTreeExpansionLevel(2);
fDiscoveredContainerList.setViewerSorter(new DiscoveredElementSorter());
dirty = false;
- deletedEntries = new ArrayList<DiscoveredElement>();
+ deletedEntries = new ArrayList<>();
}
/* (non-Javadoc)
@@ -220,8 +220,8 @@ public class DiscoveredPathContainerPage extends WizardPage implements IPathEntr
if (info instanceof IPerProjectDiscoveredPathInfo) {
IPerProjectDiscoveredPathInfo projectPathInfo = (IPerProjectDiscoveredPathInfo) info;
- LinkedHashMap<String, Boolean> includes = new LinkedHashMap<String, Boolean>();
- LinkedHashMap<String, SymbolEntry> symbols = new LinkedHashMap<String, SymbolEntry>();
+ LinkedHashMap<String, Boolean> includes = new LinkedHashMap<>();
+ LinkedHashMap<String, SymbolEntry> symbols = new LinkedHashMap<>();
DiscoveredElement container = (DiscoveredElement) fDiscoveredContainerList.getElement(0);
if (container != null && container.getEntryKind() == DiscoveredElement.CONTAINER) {
@@ -264,7 +264,7 @@ public class DiscoveredPathContainerPage extends WizardPage implements IPathEntr
try {
// update scanner configuration
- List<IResource> resourceDelta = new ArrayList<IResource>(1);
+ List<IResource> resourceDelta = new ArrayList<>(1);
resourceDelta.add(fCProject.getProject());
MakeCorePlugin.getDefault().getDiscoveryManager().updateDiscoveredInfo(info, resourceDelta);
return true;
@@ -294,7 +294,7 @@ public class DiscoveredPathContainerPage extends WizardPage implements IPathEntr
}
if (fPathEntry != null) {
DiscoveredElement element = populateDiscoveredElements(fPathEntry);
- ArrayList<DiscoveredElement> elements = new ArrayList<DiscoveredElement>();
+ ArrayList<DiscoveredElement> elements = new ArrayList<>();
elements.add(element);
fDiscoveredContainerList.addElements(elements);
}
@@ -606,7 +606,7 @@ public class DiscoveredPathContainerPage extends WizardPage implements IPathEntr
private boolean moveDown() {
boolean rc = false;
List<Object> selElements = fDiscoveredContainerList.getSelectedElements();
- List<Object> revSelElements = new ArrayList<Object>(selElements);
+ List<Object> revSelElements = new ArrayList<>(selElements);
Collections.reverse(revSelElements);
for (Iterator<Object> i = revSelElements.iterator(); i.hasNext();) {
DiscoveredElement elem = (DiscoveredElement) i.next();
@@ -649,7 +649,7 @@ public class DiscoveredPathContainerPage extends WizardPage implements IPathEntr
private boolean deleteEntry() {
boolean rc = false;
- List<DiscoveredElement> newSelection = new ArrayList<DiscoveredElement>();
+ List<DiscoveredElement> newSelection = new ArrayList<>();
List<Object> selElements = fDiscoveredContainerList.getSelectedElements();
boolean skipIncludes = false, skipSymbols = false;
for (int i = 0; i < selElements.size(); ++i) {
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/dialogs/DiscoveryOptionsBlock.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/dialogs/DiscoveryOptionsBlock.java
index 0731352f96..3a806deba1 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/dialogs/DiscoveryOptionsBlock.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/dialogs/DiscoveryOptionsBlock.java
@@ -331,7 +331,7 @@ public class DiscoveryOptionsBlock extends AbstractDiscoveryOptionsBlock {
ICProject cProject = CoreModel.getDefault().create(project);
if (cProject != null) {
IPathEntry[] entries = cProject.getRawPathEntries();
- List<IPathEntry> newEntries = new ArrayList<IPathEntry>(Arrays.asList(entries));
+ List<IPathEntry> newEntries = new ArrayList<>(Arrays.asList(entries));
if (!newEntries.contains(container)) {
newEntries.add(container);
cProject.setRawPathEntries(newEntries.toArray(new IPathEntry[newEntries.size()]), monitor);
@@ -345,7 +345,7 @@ public class DiscoveryOptionsBlock extends AbstractDiscoveryOptionsBlock {
String profileId = getBuildInfo().getSelectedProfileId();
ScannerConfigScope profileScope = ScannerConfigProfileManager.getInstance().getSCProfileConfiguration(profileId)
.getProfileScope();
- List<IResource> changedResources = new ArrayList<IResource>();
+ List<IResource> changedResources = new ArrayList<>();
// changedResources.add(project.getFullPath());
changedResources.add(project);
MakeCorePlugin.getDefault().getDiscoveryManager().changeDiscoveredContainer(project, profileScope,
diff --git a/build/org.eclipse.cdt.managedbuilder.core.tests/suite/org/eclipse/cdt/managedbuilder/testplugin/AbstractBuilderTest.java b/build/org.eclipse.cdt.managedbuilder.core.tests/suite/org/eclipse/cdt/managedbuilder/testplugin/AbstractBuilderTest.java
index 72c1cdda6f..bc5a5db06c 100644
--- a/build/org.eclipse.cdt.managedbuilder.core.tests/suite/org/eclipse/cdt/managedbuilder/testplugin/AbstractBuilderTest.java
+++ b/build/org.eclipse.cdt.managedbuilder.core.tests/suite/org/eclipse/cdt/managedbuilder/testplugin/AbstractBuilderTest.java
@@ -213,7 +213,7 @@ public abstract class AbstractBuilderTest extends TestCase {
boolean externalBuilder) throws CoreException {
IProject project = getWorkspace().getRoot().getProject(projectName);
IFolder buildDir = project.getFolder(cfgName);
- Collection<IResource> resources = new LinkedHashSet<IResource>();
+ Collection<IResource> resources = new LinkedHashSet<>();
resources.add(buildDir);
if (externalBuilder) {
resources.add(buildDir.getFile("makefile"));
@@ -250,7 +250,7 @@ public abstract class AbstractBuilderTest extends TestCase {
protected void setWorkspace(String name) {
workspace = name;
- projects = new ArrayList<IProject>();
+ projects = new ArrayList<>();
}
protected IProject loadProject(String name) throws CoreException {
@@ -263,7 +263,7 @@ public abstract class AbstractBuilderTest extends TestCase {
}
private List<IMarker> getAllMarkers() throws CoreException {
- List<IMarker> markers = new ArrayList<IMarker>();
+ List<IMarker> markers = new ArrayList<>();
for (IProject project : projects)
markers.addAll(Arrays
.asList(project.findMarkers(ICModelMarker.C_MODEL_PROBLEM_MARKER, true, IResource.DEPTH_INFINITE)));
diff --git a/build/org.eclipse.cdt.managedbuilder.core.tests/suite/org/eclipse/cdt/managedbuilder/testplugin/BuildSystemTestHelper.java b/build/org.eclipse.cdt.managedbuilder.core.tests/suite/org/eclipse/cdt/managedbuilder/testplugin/BuildSystemTestHelper.java
index 80c2254a1f..55ff766b2d 100644
--- a/build/org.eclipse.cdt.managedbuilder.core.tests/suite/org/eclipse/cdt/managedbuilder/testplugin/BuildSystemTestHelper.java
+++ b/build/org.eclipse.cdt.managedbuilder.core.tests/suite/org/eclipse/cdt/managedbuilder/testplugin/BuildSystemTestHelper.java
@@ -125,8 +125,8 @@ public class BuildSystemTestHelper {
}
static public void checkDiff(Object[] expected, Object[] actual) {
- LinkedHashSet<? extends Object> set1 = new LinkedHashSet<Object>(Arrays.asList(expected));
- LinkedHashSet<? extends Object> set2 = new LinkedHashSet<Object>(Arrays.asList(actual));
+ LinkedHashSet<? extends Object> set1 = new LinkedHashSet<>(Arrays.asList(expected));
+ LinkedHashSet<? extends Object> set2 = new LinkedHashSet<>(Arrays.asList(actual));
LinkedHashSet<? extends Object> set1Copy = new LinkedHashSet<Object>(set1);
set1.removeAll(set2);
set2.removeAll(set1Copy);
diff --git a/build/org.eclipse.cdt.managedbuilder.core.tests/suite/org/eclipse/cdt/managedbuilder/testplugin/ManagedBuildTestHelper.java b/build/org.eclipse.cdt.managedbuilder.core.tests/suite/org/eclipse/cdt/managedbuilder/testplugin/ManagedBuildTestHelper.java
index 663709246f..58f3faecc8 100644
--- a/build/org.eclipse.cdt.managedbuilder.core.tests/suite/org/eclipse/cdt/managedbuilder/testplugin/ManagedBuildTestHelper.java
+++ b/build/org.eclipse.cdt.managedbuilder.core.tests/suite/org/eclipse/cdt/managedbuilder/testplugin/ManagedBuildTestHelper.java
@@ -516,9 +516,9 @@ public class ManagedBuildTestHelper {
ArrayList<String> testArray = mergeContinuationLines(getContents(testFile));
ArrayList<String> benchmarkArray = mergeContinuationLines(getContents(benchmarkFile));
- Set<String> testNotMatchingLines = new TreeSet<String>();
- Set<String> benchNotMatchingLines = new TreeSet<String>();
- Set<String> extraLines = new TreeSet<String>();
+ Set<String> testNotMatchingLines = new TreeSet<>();
+ Set<String> benchNotMatchingLines = new TreeSet<>();
+ Set<String> extraLines = new TreeSet<>();
for (int i = 0; i < benchmarkArray.size() || i < testArray.size(); i++) {
if (!(i < benchmarkArray.size())) {
System.err.println(testFile.lastSegment() + ": extra line =[" + testArray.get(i)
@@ -540,9 +540,9 @@ public class ManagedBuildTestHelper {
if (testLine.startsWith(" -$(RM) ")) {
// accommodate to arbitrary order of 'rm' parameters
final String DELIMITERS = "[ $]";
- String[] testMacros = new TreeSet<String>(Arrays.asList(testLine.split(DELIMITERS)))
+ String[] testMacros = new TreeSet<>(Arrays.asList(testLine.split(DELIMITERS)))
.toArray(new String[0]);
- String[] benchMacros = new TreeSet<String>(Arrays.asList(benchmarkLine.split(DELIMITERS)))
+ String[] benchMacros = new TreeSet<>(Arrays.asList(benchmarkLine.split(DELIMITERS)))
.toArray(new String[0]);
if (testMacros.length != benchMacros.length) {
return false;
@@ -697,7 +697,7 @@ public class ManagedBuildTestHelper {
}
private static ArrayList<String> getContents(IPath fullPath) {
- ArrayList<String> lines = new ArrayList<String>();
+ ArrayList<String> lines = new ArrayList<>();
try {
BufferedReader in = new BufferedReader(new FileReader(fullPath.toFile()));
String line;
@@ -1082,7 +1082,7 @@ public class ManagedBuildTestHelper {
}
public static ITool[] getRcbsTools(IResourceConfiguration rcConfig) {
- List<ITool> list = new ArrayList<ITool>();
+ List<ITool> list = new ArrayList<>();
ITool tools[] = rcConfig.getTools();
for (int i = 0; i < tools.length; i++) {
ITool tool = tools[i];
diff --git a/build/org.eclipse.cdt.managedbuilder.core.tests/suite/org/eclipse/cdt/managedbuilder/testplugin/ResourceDeltaVerifier.java b/build/org.eclipse.cdt.managedbuilder.core.tests/suite/org/eclipse/cdt/managedbuilder/testplugin/ResourceDeltaVerifier.java
index aaf764f598..bd3d60f6ef 100644
--- a/build/org.eclipse.cdt.managedbuilder.core.tests/suite/org/eclipse/cdt/managedbuilder/testplugin/ResourceDeltaVerifier.java
+++ b/build/org.eclipse.cdt.managedbuilder.core.tests/suite/org/eclipse/cdt/managedbuilder/testplugin/ResourceDeltaVerifier.java
@@ -112,7 +112,7 @@ public class ResourceDeltaVerifier extends Assert implements IResourceChangeList
/**
* Table of IPath -> ExpectedChange
*/
- private Hashtable<IPath, ExpectedChange> fExpectedChanges = new Hashtable<IPath, ExpectedChange>();
+ private Hashtable<IPath, ExpectedChange> fExpectedChanges = new Hashtable<>();
boolean fIsDeltaValid = true;
private StringBuilder fMessage = new StringBuilder();
/**
@@ -133,7 +133,7 @@ public class ResourceDeltaVerifier extends Assert implements IResourceChangeList
private static final int VERIFICATION_COMPLETE = 2;
private int fState = RECEIVING_INPUTS;
- private Set<IResource> fIgnoreResources = new HashSet<IResource>();
+ private Set<IResource> fIgnoreResources = new HashSet<>();
/**
* @see #addExpectedChange
@@ -263,7 +263,7 @@ public class ResourceDeltaVerifier extends Assert implements IResourceChangeList
IResourceDelta[] removedChildren = delta.getAffectedChildren(IResourceDelta.REMOVED,
IContainer.INCLUDE_TEAM_PRIVATE_MEMBERS | IContainer.INCLUDE_HIDDEN);
- Hashtable<IResource, IResourceDelta> h = new Hashtable<IResource, IResourceDelta>(affectedChildren.length + 1);
+ Hashtable<IResource, IResourceDelta> h = new Hashtable<>(affectedChildren.length + 1);
for (int i = 0; i < addedChildren.length; ++i) {
IResourceDelta childDelta1 = addedChildren[i];
@@ -467,7 +467,7 @@ public class ResourceDeltaVerifier extends Assert implements IResourceChangeList
* are met after iterating over a resource delta.
*/
private void finishVerification() {
- Hashtable<IPath, IPath> resourcePaths = new Hashtable<IPath, IPath>();
+ Hashtable<IPath, IPath> resourcePaths = new Hashtable<>();
Enumeration<IPath> keys = fExpectedChanges.keys();
while (keys.hasMoreElements()) {
diff --git a/build/org.eclipse.cdt.managedbuilder.core.tests/suite/org/eclipse/cdt/managedbuilder/tests/suite/Preconditions.java b/build/org.eclipse.cdt.managedbuilder.core.tests/suite/org/eclipse/cdt/managedbuilder/tests/suite/Preconditions.java
index 5854f0ae7e..7e92e4129d 100644
--- a/build/org.eclipse.cdt.managedbuilder.core.tests/suite/org/eclipse/cdt/managedbuilder/tests/suite/Preconditions.java
+++ b/build/org.eclipse.cdt.managedbuilder.core.tests/suite/org/eclipse/cdt/managedbuilder/tests/suite/Preconditions.java
@@ -49,7 +49,7 @@ public class Preconditions extends TestCase {
* changed when the tests are run.
*/
public void testContentTypes() {
- Set<String> fileExts = new TreeSet<String>();
+ Set<String> fileExts = new TreeSet<>();
IContentTypeManager manager = Platform.getContentTypeManager();
IContentType contentTypeCpp = manager.getContentType(CCorePlugin.CONTENT_TYPE_CXXSOURCE);
@@ -58,7 +58,7 @@ public class Preconditions extends TestCase {
IContentType contentTypeC = manager.getContentType(CCorePlugin.CONTENT_TYPE_CSOURCE);
fileExts.addAll(Arrays.asList(contentTypeC.getFileSpecs(IContentType.FILE_EXTENSION_SPEC)));
- Set<String> expectedExts = new TreeSet<String>(
+ Set<String> expectedExts = new TreeSet<>(
Arrays.asList(new String[] { "C", "c", "c++", "cc", "cpp", "cxx" }));
assertEquals("Precodition FAILED - Content Types do not match expected defaults.", expectedExts.toString(),
fileExts.toString());
diff --git a/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/regressions/Bug_303953.java b/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/regressions/Bug_303953.java
index 10ae142088..d032b63ecd 100644
--- a/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/regressions/Bug_303953.java
+++ b/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/regressions/Bug_303953.java
@@ -38,7 +38,7 @@ public class Bug_303953 extends AbstractBuilderTest {
setWorkspace("regressions");
final IProject app = loadProject("helloworldC");
- List<IResource> buildOutputResources = new ArrayList<IResource>();
+ List<IResource> buildOutputResources = new ArrayList<>();
buildOutputResources.addAll(getProjectBuildExeResources("helloworldC", "Debug", "src/helloworldC"));
// Ensure Debug is the active configuration
diff --git a/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/BuildDescriptionModelTests.java b/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/BuildDescriptionModelTests.java
index 477fe72da3..5cd67e38e3 100644
--- a/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/BuildDescriptionModelTests.java
+++ b/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/BuildDescriptionModelTests.java
@@ -75,7 +75,7 @@ public class BuildDescriptionModelTests extends TestCase {
private Runnable fCleaner = fCompositeCleaner;
private class CompositeCleaner implements Runnable {
- private List<Runnable> fRunnables = new ArrayList<Runnable>();
+ private List<Runnable> fRunnables = new ArrayList<>();
public void addRunnable(Runnable r) {
fRunnables.add(r);
@@ -93,7 +93,7 @@ public class BuildDescriptionModelTests extends TestCase {
}
private class ProjectCleaner implements Runnable {
- List<String> fProjList = new ArrayList<String>();
+ List<String> fProjList = new ArrayList<>();
public ProjectCleaner(IProject project) {
addProject(project);
@@ -576,8 +576,8 @@ public class BuildDescriptionModelTests extends TestCase {
}
*/
private void doTestStep(IBuildStep step, IBuildStep oStep, boolean up) {
- Map<IBuildIOType, IBuildIOType> inMap = new HashMap<IBuildIOType, IBuildIOType>();
- Map<IBuildIOType, IBuildIOType> outMap = new HashMap<IBuildIOType, IBuildIOType>();
+ Map<IBuildIOType, IBuildIOType> inMap = new HashMap<>();
+ Map<IBuildIOType, IBuildIOType> outMap = new HashMap<>();
stepsMatch(step, oStep, inMap, outMap, true);
@@ -589,7 +589,7 @@ public class BuildDescriptionModelTests extends TestCase {
}
private void doTestType(IBuildIOType type, IBuildIOType oType) {
- Map<IBuildResource, IBuildResource> map = new HashMap<IBuildResource, IBuildResource>();
+ Map<IBuildResource, IBuildResource> map = new HashMap<>();
typesMatch(type, oType, map, true);
@@ -599,7 +599,7 @@ public class BuildDescriptionModelTests extends TestCase {
}
private void doTestResource(IBuildResource rc, IBuildResource oRc, boolean up) {
- Map<IBuildIOType, IBuildIOType> outMap = new HashMap<IBuildIOType, IBuildIOType>();
+ Map<IBuildIOType, IBuildIOType> outMap = new HashMap<>();
doTestResourceMatch(rc, oRc, outMap);
@@ -607,7 +607,7 @@ public class BuildDescriptionModelTests extends TestCase {
typesMatch(rc.getProducerIOType(), oRc.getProducerIOType(), null, true);
doTestStep(rc.getProducerIOType().getStep(), oRc.getProducerIOType().getStep(), up);
} else {
- Set<IBuildStep> stepSet = new HashSet<IBuildStep>();
+ Set<IBuildStep> stepSet = new HashSet<>();
for (Entry<IBuildIOType, IBuildIOType> entry : outMap.entrySet()) {
IBuildIOType type = entry.getKey();
@@ -785,8 +785,8 @@ public class BuildDescriptionModelTests extends TestCase {
return false;
if (resourcesMatch(rcs, oRcs, rcMap)) {
- Map<IBuildIOType, IBuildIOType> inMap = new HashMap<IBuildIOType, IBuildIOType>();
- Map<IBuildIOType, IBuildIOType> outMap = new HashMap<IBuildIOType, IBuildIOType>();
+ Map<IBuildIOType, IBuildIOType> inMap = new HashMap<>();
+ Map<IBuildIOType, IBuildIOType> outMap = new HashMap<>();
if (!checkStep)
return true;
return stepsMatch(type.getStep(), oType.getStep(), inMap, outMap, false, failOnError);
diff --git a/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/BuildSystem40Tests.java b/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/BuildSystem40Tests.java
index 094e294abe..ce593337dd 100644
--- a/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/BuildSystem40Tests.java
+++ b/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/BuildSystem40Tests.java
@@ -120,7 +120,7 @@ public class BuildSystem40Tests extends TestCase {
assertTrue(Arrays.equals(modifiedValue, value));
{
- List<ICLanguageSettingEntry> list = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> list = new ArrayList<>();
list.addAll(Arrays.asList(entries));
list.add(new CIncludePathEntry(platformDependentPath("dbg 3", "E:\\tmp\\w"), 0));
entries = list.toArray(new ICLanguageSettingEntry[0]);
@@ -131,7 +131,7 @@ public class BuildSystem40Tests extends TestCase {
}
{
- ArrayList<OptionStringValue> list = new ArrayList<OptionStringValue>();
+ ArrayList<OptionStringValue> list = new ArrayList<>();
list.addAll(Arrays.asList(value));
list.add(new OptionStringValue("\"E:\\tmp\\w\""));
value = list.toArray(new OptionStringValue[0]);
@@ -185,7 +185,7 @@ public class BuildSystem40Tests extends TestCase {
BuildSystemTestHelper.checkDiff(expectedEntries, entries);
{
- ArrayList<ICLanguageSettingEntry> list = new ArrayList<ICLanguageSettingEntry>(Arrays.asList(entries));
+ ArrayList<ICLanguageSettingEntry> list = new ArrayList<>(Arrays.asList(entries));
list.remove(6); //new CIncludePathEntry("/d1_abs/path", 0),
expectedEntries = list.toArray(new ICLanguageSettingEntry[0]);
ls.setSettingEntries(ICLanguageSettingEntry.INCLUDE_PATH, list);
@@ -219,7 +219,7 @@ public class BuildSystem40Tests extends TestCase {
option = tool.getOptionsOfType(IOption.INCLUDE_PATH)[0];
{
- ArrayList<OptionStringValue> list = new ArrayList<OptionStringValue>(
+ ArrayList<OptionStringValue> list = new ArrayList<>(
Arrays.asList(option.getBasicStringListValueElements()));
assertTrue(list.remove(new OptionStringValue("${IncludeDefaults}")));
list.add(0, new OptionStringValue("${IncludeDefaults}"));
@@ -253,7 +253,7 @@ public class BuildSystem40Tests extends TestCase {
BuildSystemTestHelper.checkDiff(expectedEntries, entries);
{
- ArrayList<OptionStringValue> list = new ArrayList<OptionStringValue>(
+ ArrayList<OptionStringValue> list = new ArrayList<>(
Arrays.asList(option.getBasicStringListValueElements()));
assertTrue(list.remove(new OptionStringValue("${IncludeDefaults}")));
list.add(list.size(), new OptionStringValue("${IncludeDefaults}"));
@@ -335,7 +335,7 @@ public class BuildSystem40Tests extends TestCase {
BuildSystemTestHelper.checkDiff(expectedValue, value);
BuildSystemTestHelper.checkDiff(expectedEntries, entries);
- ArrayList<ICLanguageSettingEntry> list = new ArrayList<ICLanguageSettingEntry>();
+ ArrayList<ICLanguageSettingEntry> list = new ArrayList<>();
list.addAll(Arrays.asList(entries));
list.add(new CIncludePathEntry("/test/another/abs", 0));
expectedEntries = list.toArray(new ICLanguageSettingEntry[0]);
@@ -376,7 +376,7 @@ public class BuildSystem40Tests extends TestCase {
BuildSystemTestHelper.checkDiff(expectedValue, value);
BuildSystemTestHelper.checkDiff(expectedEntries, entries);
- list = new ArrayList<ICLanguageSettingEntry>();
+ list = new ArrayList<>();
list.addAll(Arrays.asList(entries));
list.add(new CIncludePathEntry("/another/abs", 0));
@@ -479,7 +479,7 @@ public class BuildSystem40Tests extends TestCase {
}
});
- projectList = new ArrayList<IProject>(projectZips.length);
+ projectList = new ArrayList<>(projectZips.length);
for (int i = 0; i < projectZips.length; i++) {
try {
String projectName = projectZips[i].getName();
@@ -505,7 +505,7 @@ public class BuildSystem40Tests extends TestCase {
try {
IProject project = ManagedBuildTestHelper.createProject(projName, null, location, projectTypeId);
if (project != null)
- projectList = new ArrayList<IProject>(1);
+ projectList = new ArrayList<>(1);
projectList.add(project);
} catch (Exception e) {
}
diff --git a/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/DefaultFortranDependencyCalculator.java b/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/DefaultFortranDependencyCalculator.java
index dc722ec5c0..94a925eede 100644
--- a/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/DefaultFortranDependencyCalculator.java
+++ b/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/DefaultFortranDependencyCalculator.java
@@ -47,7 +47,7 @@ public class DefaultFortranDependencyCalculator implements IManagedDependencyGen
* Return a list of the names of all modules used by a file
*/
private String[] findUsedModuleNames(File file) {
- ArrayList<String> names = new ArrayList<String>();
+ ArrayList<String> names = new ArrayList<>();
InputStream in = null;
try {
in = new BufferedInputStream(new FileInputStream(file));
@@ -88,7 +88,7 @@ public class DefaultFortranDependencyCalculator implements IManagedDependencyGen
* Return a list of the names of all modules defined in a file
*/
private String[] findModuleNames(File file) {
- ArrayList<String> names = new ArrayList<String>();
+ ArrayList<String> names = new ArrayList<>();
InputStream in = null;
try {
in = new BufferedInputStream(new FileInputStream(file));
@@ -148,7 +148,7 @@ public class DefaultFortranDependencyCalculator implements IManagedDependencyGen
*/
private IResource[] FindModulesInResources(IProject project, ITool tool, IResource resource,
IResource[] resourcesToSearch, String topBuildDir, String[] usedNames) {
- ArrayList<IResource> modRes = new ArrayList<IResource>();
+ ArrayList<IResource> modRes = new ArrayList<>();
for (int ir = 0; ir < resourcesToSearch.length; ir++) {
if (resourcesToSearch[ir].equals(resource))
continue;
@@ -199,7 +199,7 @@ public class DefaultFortranDependencyCalculator implements IManagedDependencyGen
*/
@Override
public IResource[] findDependencies(IResource resource, IProject project) {
- ArrayList<IResource> dependencies = new ArrayList<IResource>();
+ ArrayList<IResource> dependencies = new ArrayList<>();
// TODO: This method should be passed the ITool and the relative path of the top build directory
// For now we'll figure this out from the project.
@@ -268,7 +268,7 @@ public class DefaultFortranDependencyCalculator implements IManagedDependencyGen
@Override
public IPath[] getOutputNames(ITool tool, IPath[] primaryInputNames) {
// TODO: This method should be passed the relative path of the top build directory?
- ArrayList<IPath> outs = new ArrayList<IPath>();
+ ArrayList<IPath> outs = new ArrayList<>();
if (primaryInputNames.length > 0) {
// Get the names of modules created by this source file
String[] modules = findModuleNames(primaryInputNames[0].toFile());
diff --git a/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ManagedBuildCoreTests.java b/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ManagedBuildCoreTests.java
index 5c88395fcb..1bd037fb57 100644
--- a/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ManagedBuildCoreTests.java
+++ b/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ManagedBuildCoreTests.java
@@ -141,7 +141,7 @@ public class ManagedBuildCoreTests extends TestCase {
//
ITargetPlatform platform = toolChain.getTargetPlatform();
- List<String> expectedOSListarr = new ArrayList<String>();
+ List<String> expectedOSListarr = new ArrayList<>();
String[] expectedOSListTokens = expectedOSList.split(","); //$NON-NLS-1$
for (i = 0; i < expectedOSListTokens.length; ++i) {
expectedOSListarr.add(expectedOSListTokens[i].trim());
@@ -208,7 +208,7 @@ public class ManagedBuildCoreTests extends TestCase {
assertEquals(optionDefaultValue, expectedOptionIdValue1[iconfig]);
String optionEnumCmd1 = option.getEnumCommand(optionDefaultValue);
assertEquals(optionEnumCmd1, expectedOptionEnumCmd1arr[iconfig]);
- List<String> expectedEnumList1arr = new ArrayList<String>();
+ List<String> expectedEnumList1arr = new ArrayList<>();
String[] expectedEnumList1Tokens = expectedEnumList1.split(","); //$NON-NLS-1$
for (i = 0; i < expectedEnumList1Tokens.length; ++i) {
expectedEnumList1arr.add(expectedEnumList1Tokens[i].trim());
@@ -314,7 +314,7 @@ public class ManagedBuildCoreTests extends TestCase {
IToolChain toolChain = configs[iconfig].getToolChain();
assertEquals(toolChain.getName(), (expectedToolChainName[iconfig]));
- List<String> expectedOSListarr = new ArrayList<String>();
+ List<String> expectedOSListarr = new ArrayList<>();
String[] expectedOSListTokens = expectedOSList.split(","); //$NON-NLS-1$
for (i = 0; i < expectedOSListTokens.length; ++i) {
expectedOSListarr.add(expectedOSListTokens[i].trim());
@@ -502,7 +502,7 @@ public class ManagedBuildCoreTests extends TestCase {
//
IToolChain toolChain = configs[iconfig].getToolChain();
- List<String> expectedOSListarr = new ArrayList<String>();
+ List<String> expectedOSListarr = new ArrayList<>();
String[] expectedOSListTokens = expectedOSList.split(","); //$NON-NLS-1$
for (i = 0; i < expectedOSListTokens.length; ++i) {
expectedOSListarr.add(expectedOSListTokens[i].trim());
@@ -571,7 +571,7 @@ public class ManagedBuildCoreTests extends TestCase {
String optionEnumCmd1 = option.getEnumCommand(optionDefaultValue);
assertEquals(optionEnumCmd1, (expectedOptionEnumCmd1arr[iconfig]));
- List<String> expectedEnumList1arr = new ArrayList<String>();
+ List<String> expectedEnumList1arr = new ArrayList<>();
String[] expectedEnumList1Tokens = expectedEnumList1.split(","); //$NON-NLS-1$
for (i = 0; i < expectedEnumList1Tokens.length; ++i) {
expectedEnumList1arr.add(expectedEnumList1Tokens[i].trim());
diff --git a/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ManagedBuildDependencyCalculatorTests.java b/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ManagedBuildDependencyCalculatorTests.java
index aab03ada0a..f1ce25d3ac 100644
--- a/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ManagedBuildDependencyCalculatorTests.java
+++ b/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ManagedBuildDependencyCalculatorTests.java
@@ -74,7 +74,7 @@ public class ManagedBuildDependencyCalculatorTests extends TestCase {
}
});
- projectList = new ArrayList<IProject>(projectZips.length);
+ projectList = new ArrayList<>(projectZips.length);
for (int i = 0; i < projectZips.length; i++) {
try {
String projectName = projectZips[i].getName();
@@ -100,7 +100,7 @@ public class ManagedBuildDependencyCalculatorTests extends TestCase {
try {
IProject project = ManagedBuildTestHelper.createProject(projName, null, location, projectTypeId);
if (project != null)
- projectList = new ArrayList<IProject>(1);
+ projectList = new ArrayList<>(1);
projectList.add(project);
} catch (Exception e) {
}
diff --git a/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ManagedBuildDependencyLibsTests.java b/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ManagedBuildDependencyLibsTests.java
index f767c5bb99..437cbeb215 100644
--- a/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ManagedBuildDependencyLibsTests.java
+++ b/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ManagedBuildDependencyLibsTests.java
@@ -190,7 +190,7 @@ public class ManagedBuildDependencyLibsTests extends AbstractBuilderTest {
}
private long getArtifactTimeStamp(IProject project) {
- List<IFile> files = new ArrayList<IFile>();
+ List<IFile> files = new ArrayList<>();
findFiles(project, getArtefactFullName(project), files);
if (files.size() == 0) // File not exists
return 0;
diff --git a/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ManagedBuildMacrosTests.java b/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ManagedBuildMacrosTests.java
index ab280c4340..72479b0b2a 100644
--- a/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ManagedBuildMacrosTests.java
+++ b/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ManagedBuildMacrosTests.java
@@ -258,7 +258,7 @@ public class ManagedBuildMacrosTests extends TestCase {
PATH_ENV_VAR };
String[] resArr1 = { "new a", /*"test=CFGTEST",*/ "x", "y", "z", "PRJ=NewMacrosForProjectContext",
"LIST=x|y|z" };
- List<String> res1 = new ArrayList<String>(Arrays.asList(resArr1));
+ List<String> res1 = new ArrayList<>(Arrays.asList(resArr1));
try {
// Add split ${PATH} to res1
String strList = mp.resolveValue(PATH_ENV_VAR, UNKNOWN, LISTSEP, IBuildMacroProvider.CONTEXT_OPTION,
@@ -272,7 +272,7 @@ public class ManagedBuildMacrosTests extends TestCase {
opt = cfgs[0].setOption(t, opt, set1);
assertNotNull(opt);
- ArrayList<String> res2 = new ArrayList<String>(res1.size());
+ ArrayList<String> res2 = new ArrayList<>(res1.size());
for (int i = 0; i < set1.length; i++) {
try {
String[] aus = mp.resolveStringListValue(set1[i], UNKNOWN, LISTSEP,
@@ -698,7 +698,7 @@ public class ManagedBuildMacrosTests extends TestCase {
// returns a list of macro's NAMES (not values).
private String[] printMacros(IBuildMacro[] vars, String head) {
- ArrayList<String> ar = new ArrayList<String>(0);
+ ArrayList<String> ar = new ArrayList<>(0);
if (vars != null) {
if (vars.length > 0) {
for (int i = 0; i < vars.length; i++) {
diff --git a/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ManagedProject21MakefileTests.java b/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ManagedProject21MakefileTests.java
index 780bb88ac8..c0a0c68968 100644
--- a/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ManagedProject21MakefileTests.java
+++ b/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ManagedProject21MakefileTests.java
@@ -99,7 +99,7 @@ public class ManagedProject21MakefileTests extends TestCase {
}
});
- projectList = new ArrayList<IProject>(projectZips.length);
+ projectList = new ArrayList<>(projectZips.length);
for (int i = 0; i < projectZips.length; i++) {
try {
String projectName = projectZips[i].getName();
@@ -125,7 +125,7 @@ public class ManagedProject21MakefileTests extends TestCase {
try {
IProject project = ManagedBuildTestHelper.createProject(projName, null, location, projectTypeId);
if (project != null)
- projectList = new ArrayList<IProject>(1);
+ projectList = new ArrayList<>(1);
projectList.add(project);
} catch (Exception e) {
}
diff --git a/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ManagedProjectUpdateTests.java b/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ManagedProjectUpdateTests.java
index 4a315af597..72b71808cf 100644
--- a/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ManagedProjectUpdateTests.java
+++ b/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ManagedProjectUpdateTests.java
@@ -84,7 +84,7 @@ public class ManagedProjectUpdateTests extends TestCase {
}
});
- ArrayList<IProject> projectList = new ArrayList<IProject>(projectZips.length);
+ ArrayList<IProject> projectList = new ArrayList<>(projectZips.length);
for (int i = 0; i < projectZips.length; i++) {
try {
String projectName = projectZips[i].getName();
diff --git a/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/MultiVersionSupportTests.java b/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/MultiVersionSupportTests.java
index 68e0781a14..b8b42c3c01 100644
--- a/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/MultiVersionSupportTests.java
+++ b/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/MultiVersionSupportTests.java
@@ -500,7 +500,7 @@ public class MultiVersionSupportTests extends TestCase {
}
});
- ArrayList<IProject> projectList = new ArrayList<IProject>(projectZips.length);
+ ArrayList<IProject> projectList = new ArrayList<>(projectZips.length);
assertEquals(projectZips.length, 1);
try {
diff --git a/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/TestConfigElement.java b/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/TestConfigElement.java
index 7717108b62..12bcf24462 100644
--- a/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/TestConfigElement.java
+++ b/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/TestConfigElement.java
@@ -30,7 +30,7 @@ public class TestConfigElement implements IManagedConfigElement {
public TestConfigElement(String name, String[][] attributes, IManagedConfigElement[] children) {
this.name = name;
this.children = children;
- this.attributeMap = new TreeMap<String, String>();
+ this.attributeMap = new TreeMap<>();
for (int i = 0; i < attributes.length; i++) {
attributeMap.put(attributes[i][0], attributes[i][1]);
}
@@ -65,7 +65,7 @@ public class TestConfigElement implements IManagedConfigElement {
*/
@Override
public IManagedConfigElement[] getChildren(String elementName) {
- List<IManagedConfigElement> ret = new ArrayList<IManagedConfigElement>(children.length);
+ List<IManagedConfigElement> ret = new ArrayList<>(children.length);
for (int i = 0; i < children.length; i++) {
if (children[i].getName().equals(elementName)) {
ret.add(children[i]);
diff --git a/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ToolChainModificationTests.java b/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ToolChainModificationTests.java
index 383fb842bc..225c707505 100644
--- a/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ToolChainModificationTests.java
+++ b/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ToolChainModificationTests.java
@@ -72,7 +72,7 @@ public class ToolChainModificationTests extends TestCase {
assertTrue(cfgM.isBuilderCompatible());
IToolChain[] ctcs = cfgM.getCompatibleToolChains();
- HashSet<IHoldsOptions> set = new HashSet<IHoldsOptions>();
+ HashSet<IHoldsOptions> set = new HashSet<>();
FolderInfo foInfo = (FolderInfo) cfg.getRootFolderInfo();
ToolChain tc = (ToolChain) foInfo.getToolChain();
IToolChain[] allSys = ManagedBuildManager.getRealToolChains();
@@ -83,12 +83,12 @@ public class ToolChainModificationTests extends TestCase {
set.remove(incompatibleTc);
compare(Arrays.asList(ctcs), set);
- HashSet<IToolChain> incomp = new HashSet<IToolChain>(Arrays.asList(allSys));
+ HashSet<IToolChain> incomp = new HashSet<>(Arrays.asList(allSys));
incomp.removeAll(Arrays.asList(ctcs));
assertTrue(incomp.contains(incompatibleTc));
IBuilder[] cbs = cfgM.getCompatibleBuilders();
- Set<IHoldsOptions> bSet = new HashSet<IHoldsOptions>();
+ Set<IHoldsOptions> bSet = new HashSet<>();
IBuilder[] allSysB = ManagedBuildManager.getRealBuilders();
filterPropsSupported(cfg, allSysB, bSet);
IBuilder incompatibleB = ManagedBuildManager.getExtensionBuilder("tcm.tc4.b1");
@@ -97,7 +97,7 @@ public class ToolChainModificationTests extends TestCase {
bSet.remove(incompatibleB);
compare(Arrays.asList(cbs), bSet);
- HashSet<IBuilder> incompB = new HashSet<IBuilder>(Arrays.asList(allSysB));
+ HashSet<IBuilder> incompB = new HashSet<>(Arrays.asList(allSysB));
incompB.removeAll(Arrays.asList(cbs));
assertTrue(incompB.contains(incompatibleB));
@@ -115,7 +115,7 @@ public class ToolChainModificationTests extends TestCase {
}
private HashSet<IHoldsOptions> filterSupportedToolChains(IFolderInfo foInfo, IToolChain tc) {
- HashSet<IHoldsOptions> set = new HashSet<IHoldsOptions>();
+ HashSet<IHoldsOptions> set = new HashSet<>();
IToolChain[] allSys = ManagedBuildManager.getRealToolChains();
filterPropsSupported((FolderInfo) foInfo, (ToolChain) tc, allSys, set);
set.remove(ManagedBuildManager.getRealToolChain(tc));
@@ -239,7 +239,7 @@ public class ToolChainModificationTests extends TestCase {
HashSet<? extends IHoldsOptions> s1 = new HashSet<IHoldsOptions>(c1);
HashSet<? extends IHoldsOptions> s1c = new HashSet<IHoldsOptions>(s1);
- HashSet<IHoldsOptions> s2 = new HashSet<IHoldsOptions>(c2);
+ HashSet<IHoldsOptions> s2 = new HashSet<>(c2);
s1.removeAll(s2);
s2.removeAll(s1c);
@@ -267,7 +267,7 @@ public class ToolChainModificationTests extends TestCase {
private Collection<IHoldsOptions> filterPropsSupported(FolderInfo foInfo, ToolChain tc, IToolChain[] tcs,
Collection<IHoldsOptions> c) {
if (c == null)
- c = new ArrayList<IHoldsOptions>();
+ c = new ArrayList<>();
for (int i = 0; i < tcs.length; i++) {
if (foInfo.isToolChainCompatible(tc, tcs[i]))
c.add(tcs[i]);
@@ -279,7 +279,7 @@ public class ToolChainModificationTests extends TestCase {
private Collection<IHoldsOptions> filterPropsSupported(IConfiguration cfg, IBuilder[] bs,
Collection<IHoldsOptions> c) {
if (c == null)
- c = new ArrayList<IHoldsOptions>();
+ c = new ArrayList<>();
for (int i = 0; i < bs.length; i++) {
if (cfg.isBuilderCompatible(bs[i]))
c.add(bs[i]);
@@ -340,7 +340,7 @@ public class ToolChainModificationTests extends TestCase {
IModificationOperation[] ops = tm.getSupportedOperations();
ITool tool31 = ManagedBuildManager.getExtensionTool("tcm.tc3.t1");
- Set<ITool> replacement = new HashSet<ITool>();
+ Set<ITool> replacement = new HashSet<>();
boolean removable = getReplacementToolInfo(ops, replacement);
assertFalse(removable);
@@ -350,7 +350,7 @@ public class ToolChainModificationTests extends TestCase {
assertTrue(tm.isProjectTool());
ops = tm.getSupportedOperations();
- replacement = new HashSet<ITool>();
+ replacement = new HashSet<>();
removable = getReplacementToolInfo(ops, replacement);
assertFalse(removable);
diff --git a/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/language/settings/providers/tests/BuiltinSpecsDetectorTest.java b/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/language/settings/providers/tests/BuiltinSpecsDetectorTest.java
index 67ff3408e2..4252f36633 100644
--- a/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/language/settings/providers/tests/BuiltinSpecsDetectorTest.java
+++ b/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/language/settings/providers/tests/BuiltinSpecsDetectorTest.java
@@ -299,11 +299,11 @@ public class BuiltinSpecsDetectorTest extends BaseTestCase {
{
// provider configured with non-null parameters
MockBuiltinSpecsDetectorExecutedFlag provider = new MockBuiltinSpecsDetectorExecutedFlag();
- List<String> languages = new ArrayList<String>();
+ List<String> languages = new ArrayList<>();
languages.add(LANGUAGE_ID);
- Map<String, String> properties = new HashMap<String, String>();
+ Map<String, String> properties = new HashMap<>();
properties.put(ATTR_PARAMETER, CUSTOM_COMMAND_1);
- List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entries = new ArrayList<>();
ICLanguageSettingEntry entry = new CMacroEntry("MACRO", "VALUE",
ICSettingEntry.BUILTIN | ICSettingEntry.READONLY);
entries.add(entry);
@@ -349,9 +349,9 @@ public class BuiltinSpecsDetectorTest extends BaseTestCase {
// create instance to compare to
MockDetectorCloneable provider = new MockDetectorCloneable();
- List<String> languages = new ArrayList<String>();
+ List<String> languages = new ArrayList<>();
languages.add(LANGUAGE_ID);
- List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entries = new ArrayList<>();
ICLanguageSettingEntry entry = new CMacroEntry("MACRO", "VALUE",
ICSettingEntry.BUILTIN | ICSettingEntry.READONLY);
entries.add(entry);
@@ -361,7 +361,7 @@ public class BuiltinSpecsDetectorTest extends BaseTestCase {
assertTrue(provider.equals(clone0));
// configure provider
- Map<String, String> properties = new HashMap<String, String>();
+ Map<String, String> properties = new HashMap<>();
properties.put(ATTR_PARAMETER, CUSTOM_COMMAND_1);
provider.configureProvider(PROVIDER_ID, PROVIDER_NAME, languages, entries, properties);
assertEquals(false, provider.isConsoleEnabled());
@@ -410,7 +410,7 @@ public class BuiltinSpecsDetectorTest extends BaseTestCase {
// check entries
{
MockDetectorCloneable clone = provider.clone();
- List<ICLanguageSettingEntry> entries2 = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entries2 = new ArrayList<>();
entries2.add(new CMacroEntry("MACRO2", "VALUE2", ICSettingEntry.BUILTIN | ICSettingEntry.READONLY));
clone.setSettingEntries(null, null, null, entries2);
assertFalse(provider.equals(clone));
@@ -489,7 +489,7 @@ public class BuiltinSpecsDetectorTest extends BaseTestCase {
{
// create provider
MockBuiltinSpecsDetectorExecutedFlag provider = new MockBuiltinSpecsDetectorExecutedFlag();
- List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entries = new ArrayList<>();
entries.add(new CIncludePathEntry("path0", 1));
provider.setSettingEntries(null, null, null, entries);
// serialize entries
@@ -708,7 +708,7 @@ public class BuiltinSpecsDetectorTest extends BaseTestCase {
ICConfigurationDescription cfgDescriptionWritable = prjDescriptionWritable.getActiveConfiguration();
// Create provider
MockBuiltinSpecsDetectorEnvironmentChangeListener provider = new MockBuiltinSpecsDetectorEnvironmentChangeListener();
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ List<ILanguageSettingsProvider> providers = new ArrayList<>();
providers.add(provider);
((ILanguageSettingsProvidersKeeper) cfgDescriptionWritable).setLanguageSettingProviders(providers);
// Write to project description
diff --git a/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/language/settings/providers/tests/GCCBuildCommandParserTest.java b/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/language/settings/providers/tests/GCCBuildCommandParserTest.java
index fbc2f48e81..31877514bb 100644
--- a/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/language/settings/providers/tests/GCCBuildCommandParserTest.java
+++ b/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/language/settings/providers/tests/GCCBuildCommandParserTest.java
@@ -195,7 +195,7 @@ public class GCCBuildCommandParserTest extends BaseTestCase {
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]);
}
@@ -221,11 +221,11 @@ public class GCCBuildCommandParserTest extends BaseTestCase {
{
// provider configured with non-null parameters
MockBuildCommandParser provider = new MockBuildCommandParser();
- List<String> languages = new ArrayList<String>();
+ List<String> languages = new ArrayList<>();
languages.add(LANGUAGE_ID);
- Map<String, String> properties = new HashMap<String, String>();
+ Map<String, String> properties = new HashMap<>();
properties.put(ATTR_PARAMETER, CUSTOM_PARAMETER);
- List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entries = new ArrayList<>();
ICLanguageSettingEntry entry = new CMacroEntry("MACRO", "VALUE",
ICSettingEntry.BUILTIN | ICSettingEntry.READONLY);
entries.add(entry);
@@ -381,7 +381,7 @@ public class GCCBuildCommandParserTest extends BaseTestCase {
public boolean processLine(String line) {
// pretending that we parsed the line
currentResource = file;
- List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entries = new ArrayList<>();
ICLanguageSettingEntry entry = new CMacroEntry("MACRO", "VALUE", ICSettingEntry.BUILTIN);
entries.add(entry);
setSettingEntries(entries);
@@ -2089,7 +2089,7 @@ public class GCCBuildCommandParserTest extends BaseTestCase {
parser.shutdown();
// check populated entries
- List<ICLanguageSettingEntry> expected = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> expected = new ArrayList<>();
expected.add(new CIncludePathEntry("/path0", 0));
assertEquals(expected, parser.getSettingEntries(cfgDescription, file, languageId));
assertEquals(null, parser.getSettingEntries(cfgDescription, folder, languageId));
@@ -2122,7 +2122,7 @@ public class GCCBuildCommandParserTest extends BaseTestCase {
parser.shutdown();
// check populated entries
- List<ICLanguageSettingEntry> expected = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> expected = new ArrayList<>();
expected.add(new CIncludePathEntry("/path0", 0));
assertEquals(null, parser.getSettingEntries(cfgDescription, file, languageId));
assertEquals(expected, parser.getSettingEntries(cfgDescription, folder, languageId));
@@ -2155,7 +2155,7 @@ public class GCCBuildCommandParserTest extends BaseTestCase {
parser.shutdown();
// check populated entries
- List<ICLanguageSettingEntry> expected = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> expected = new ArrayList<>();
expected.add(new CIncludePathEntry("/path0", 0));
assertEquals(null, parser.getSettingEntries(cfgDescription, file, languageId));
@@ -2180,7 +2180,7 @@ public class GCCBuildCommandParserTest extends BaseTestCase {
parser.shutdown();
// check populated entries
- List<ICLanguageSettingEntry> expected = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> expected = new ArrayList<>();
expected.add(new CIncludePathEntry("/path0", 0));
assertEquals(expected, parser.getSettingEntries(null, null, LANG_CPP));
}
diff --git a/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/language/settings/providers/tests/GCCBuiltinSpecsDetectorTest.java b/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/language/settings/providers/tests/GCCBuiltinSpecsDetectorTest.java
index 8f960afda2..24ba7186a0 100644
--- a/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/language/settings/providers/tests/GCCBuiltinSpecsDetectorTest.java
+++ b/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/language/settings/providers/tests/GCCBuiltinSpecsDetectorTest.java
@@ -651,7 +651,7 @@ public class GCCBuiltinSpecsDetectorTest extends BaseTestCase {
ICConfigurationDescription[] cfgDescriptions = prjDescriptionWritable.getConfigurations();
assertTrue(cfgDescriptions.length > 0);
ICConfigurationDescription cfgDescription = cfgDescriptions[0];
- List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
+ List<ILanguageSettingsProvider> providers = new ArrayList<>();
providers.add(detector);
((ILanguageSettingsProvidersKeeper) cfgDescription).setLanguageSettingProviders(providers);
// change the default command in all the tools of the toolchain
diff --git a/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/templateengine/tests/TemplateEngineTestsHelper.java b/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/templateengine/tests/TemplateEngineTestsHelper.java
index c643f3f60b..5ade37fab6 100644
--- a/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/templateengine/tests/TemplateEngineTestsHelper.java
+++ b/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/templateengine/tests/TemplateEngineTestsHelper.java
@@ -50,8 +50,8 @@ import junit.framework.TestCase;
public class TemplateEngineTestsHelper {
public static final String LOGGER_FILE_NAME = "TemplateEngineTests"; //$NON-NLS-1$
- private static List<IProjectType> projectTypes = new ArrayList<IProjectType>();
- private static List<String> projectTypeNames = new ArrayList<String>();
+ private static List<IProjectType> projectTypes = new ArrayList<>();
+ private static List<String> projectTypeNames = new ArrayList<>();
/**
* get the url of a xml template, by passing the xml file name.
diff --git a/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/projectmodel/tests/BackwardCompatiblityTests.java b/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/projectmodel/tests/BackwardCompatiblityTests.java
index 8f43cfa5ac..c0dd5c8510 100644
--- a/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/projectmodel/tests/BackwardCompatiblityTests.java
+++ b/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/projectmodel/tests/BackwardCompatiblityTests.java
@@ -31,7 +31,7 @@ import junit.framework.TestSuite;
public class BackwardCompatiblityTests extends TestCase {
private static final String TEST_3X_STD_MAKE_PROJECTS = "test3xStdMakeProjects";
- private List<IProject> projList = new LinkedList<IProject>();
+ private List<IProject> projList = new LinkedList<>();
public static Test suite() {
return new TestSuite(BackwardCompatiblityTests.class);
diff --git a/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/projectmodel/tests/OptionStringListValueTests.java b/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/projectmodel/tests/OptionStringListValueTests.java
index 0543f0fcdb..1300fe2c34 100644
--- a/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/projectmodel/tests/OptionStringListValueTests.java
+++ b/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/projectmodel/tests/OptionStringListValueTests.java
@@ -81,7 +81,7 @@ public class OptionStringListValueTests extends TestCase {
IFolderInfo fInfo = cfg.getRootFolderInfo();
ICLanguageSetting ls = fDes.getLanguageSettingForFile("a.c");
- List<ICLanguageSettingEntry> list = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> list = new ArrayList<>();
list.add(new CIncludePathEntry("a", 0));
list.add(new CIncludePathEntry("b", 0));
list.addAll(ls.getSettingEntriesList(ICSettingEntry.INCLUDE_PATH));
@@ -129,7 +129,7 @@ public class OptionStringListValueTests extends TestCase {
ICFolderDescription fDes = cfgDes.getRootFolderDescription();
ICLanguageSetting ls = fDes.getLanguageSettingForFile("a.c");
- List<ICLanguageSettingEntry> list = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> list = new ArrayList<>();
list.add(new CLibraryFileEntry("usr_a", 0, new Path("ap"), new Path("arp"), new Path("apx")));
list.add(new CLibraryFileEntry("usr_b", 0, new Path("bp"), null, null));
list.add(new CLibraryFileEntry("usr_c", 0, new Path("cp"), new Path("crp"), null));
@@ -178,9 +178,9 @@ public class OptionStringListValueTests extends TestCase {
}
private void checkEntriesMatch(List<ICLanguageSettingEntry> list1, List<ICLanguageSettingEntry> list2) {
- Set<ICLanguageSettingEntry> set1 = new LinkedHashSet<ICLanguageSettingEntry>(list1);
+ Set<ICLanguageSettingEntry> set1 = new LinkedHashSet<>(list1);
set1.removeAll(list2);
- Set<ICLanguageSettingEntry> set2 = new LinkedHashSet<ICLanguageSettingEntry>(list2);
+ Set<ICLanguageSettingEntry> set2 = new LinkedHashSet<>(list2);
set2.removeAll(list1);
if (set1.size() != 0 || set2.size() != 0) {
fail("entries diff");
@@ -229,7 +229,7 @@ public class OptionStringListValueTests extends TestCase {
checkOptionValues(option);
- List<Object> list = new ArrayList<Object>();
+ List<Object> list = new ArrayList<>();
list.add("usr_1");
list.add("usr_2");
list.addAll(Arrays.asList(option.getBasicStringListValue()));
@@ -239,7 +239,7 @@ public class OptionStringListValueTests extends TestCase {
assertTrue(Arrays.equals(updated, option.getBasicStringListValue()));
checkOptionValues(option);
- list = new ArrayList<Object>();
+ list = new ArrayList<>();
list.add(new OptionStringValue("usr_3", false, "ap", "arp", "apx"));
list.add(new OptionStringValue("usr_4", false, null, null, null));
list.add(new OptionStringValue("usr_5", false, "cp", null, null));
diff --git a/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/projectmodel/tests/ProjectModelTests.java b/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/projectmodel/tests/ProjectModelTests.java
index d930cda60c..d473bb553e 100644
--- a/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/projectmodel/tests/ProjectModelTests.java
+++ b/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/projectmodel/tests/ProjectModelTests.java
@@ -637,7 +637,7 @@ public class ProjectModelTests extends TestCase implements IElementChangedListen
}
CMacroEntry entry = new CMacroEntry("a", "b", 0);
- List<ICLanguageSettingEntry> list = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> list = new ArrayList<>();
list.add(entry);
list.addAll(Arrays.asList(entries));
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/build/internal/core/scannerconfig/CfgDiscoveredPathManager.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/build/internal/core/scannerconfig/CfgDiscoveredPathManager.java
index 748dcdfe0f..fc41f7cb5a 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/build/internal/core/scannerconfig/CfgDiscoveredPathManager.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/build/internal/core/scannerconfig/CfgDiscoveredPathManager.java
@@ -219,7 +219,7 @@ public class CfgDiscoveredPathManager implements IResourceChangeListener {
.getSettingInfos(cInfo.fLoadContext.getConfiguration().getOwner().getProject(), data, info, true);
CResourceData rcDatas[] = data.getResourceDatas();
- Map<IPath, CResourceData> rcDataMap = new HashMap<IPath, CResourceData>();
+ Map<IPath, CResourceData> rcDataMap = new HashMap<>();
CResourceData rcData;
for (int i = 0; i < rcDatas.length; i++) {
rcData = rcDatas[i];
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/build/internal/core/scannerconfig/CfgScannerConfigUtil.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/build/internal/core/scannerconfig/CfgScannerConfigUtil.java
index 609d72722b..b0355bec95 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/build/internal/core/scannerconfig/CfgScannerConfigUtil.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/build/internal/core/scannerconfig/CfgScannerConfigUtil.java
@@ -158,7 +158,7 @@ public class CfgScannerConfigUtil {
public static Set<String> getAllScannerDiscoveryProfileIds(IToolChain toolchain) {
Assert.isNotNull(toolchain);
- Set<String> profiles = new TreeSet<String>();
+ Set<String> profiles = new TreeSet<>();
if (toolchain != null) {
String toolchainProfileId = null;
@@ -201,7 +201,7 @@ public class CfgScannerConfigUtil {
throw new UnsupportedOperationException(msg);
}
- Set<String> profiles = new TreeSet<String>();
+ Set<String> profiles = new TreeSet<>();
for (IInputType inputType : ((Tool) tool).getAllInputTypes()) {
for (String profileId : getAllScannerDiscoveryProfileIds(inputType)) {
@@ -233,7 +233,7 @@ public class CfgScannerConfigUtil {
throw new UnsupportedOperationException(msg);
}
- Set<String> profiles = new TreeSet<String>();
+ Set<String> profiles = new TreeSet<>();
String attribute = ((InputType) inputType).getLegacyDiscoveryProfileIdAttribute();
if (attribute != null) {
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/build/internal/core/scannerconfig/PerFileSettingsCalculator.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/build/internal/core/scannerconfig/PerFileSettingsCalculator.java
index a20e8e9137..e6660e7ade 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/build/internal/core/scannerconfig/PerFileSettingsCalculator.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/build/internal/core/scannerconfig/PerFileSettingsCalculator.java
@@ -87,7 +87,7 @@ public class PerFileSettingsCalculator {
void add(ILangSettingInfo info) {
if (fLangInfoList == null)
- fLangInfoList = new ArrayList<ILangSettingInfo>();
+ fLangInfoList = new ArrayList<>();
fLangInfoList.add(info);
}
}
@@ -130,9 +130,9 @@ public class PerFileSettingsCalculator {
}
public void add(int index, PathFilePathInfo value) {
- List<PathFilePathInfo> list = checkResize(index) ? new ArrayList<PathFilePathInfo>() : fStore[index];
+ List<PathFilePathInfo> list = checkResize(index) ? new ArrayList<>() : fStore[index];
if (list == null) {
- list = new ArrayList<PathFilePathInfo>();
+ list = new ArrayList<>();
fStore[index] = list;
}
@@ -157,7 +157,7 @@ public class PerFileSettingsCalculator {
public List<PathFilePathInfo>[] getLists() {
int size = fMaxIndex + 1;
- List<List<PathFilePathInfo>> list = new ArrayList<List<PathFilePathInfo>>(size);
+ List<List<PathFilePathInfo>> list = new ArrayList<>(size);
List<PathFilePathInfo> l;
for (int i = 0; i < size; i++) {
l = fStore[i];
@@ -214,13 +214,13 @@ public class PerFileSettingsCalculator {
public void add(PathFilePathInfo pInfo) {
if (fPathFilePathInfoMap == null)
- fPathFilePathInfoMap = new HashMap<PathInfo, List<PathFilePathInfo>>(3);
+ fPathFilePathInfoMap = new HashMap<>(3);
PathInfo fileInfo = pInfo.fInfo;
List<PathFilePathInfo> list = fileInfo == fMaxMatchInfo ? fMaxMatchInfoList
: fPathFilePathInfoMap.get(fileInfo);
if (list == null) {
- List<PathFilePathInfo> emptyList = new ArrayList<PathFilePathInfo>();
+ List<PathFilePathInfo> emptyList = new ArrayList<>();
fPathFilePathInfoMap.put(fileInfo, emptyList);
if (fMaxMatchInfo == null) {
fMaxMatchInfo = fileInfo;
@@ -342,7 +342,7 @@ public class PerFileSettingsCalculator {
private HashSet<String> calcExtsSet() {
if (fExtsSet == null)
- fExtsSet = new HashSet<String>(Arrays.asList(fExts));
+ fExtsSet = new HashSet<>(Arrays.asList(fExts));
return fExtsSet;
}
@@ -473,7 +473,7 @@ public class PerFileSettingsCalculator {
void internalAdd(ExtsSetSettings setting) {
if (fExtsSetToExtsSetSettingsMap == null) {
- fExtsSetToExtsSetSettingsMap = new HashMap<ExtsSet, ExtsSetSettings>();
+ fExtsSetToExtsSetSettingsMap = new HashMap<>();
}
ExtsSetSettings cur = fExtsSetToExtsSetSettingsMap.get(setting.fExtsSet);
@@ -507,7 +507,7 @@ public class PerFileSettingsCalculator {
// }
public RcSetSettings[] getChildren(final boolean includeCurrent) {
- final List<RcSetSettings> list = new ArrayList<RcSetSettings>();
+ final List<RcSetSettings> list = new ArrayList<>();
fContainer.accept(new IPathSettingsContainerVisitor() {
@Override
@@ -572,7 +572,7 @@ public class PerFileSettingsCalculator {
String[] exts = setting.fExtsSet.fExts;
String ext;
if (map == null) {
- map = new HashMap<String, ExtsSetSettings>();
+ map = new HashMap<>();
forceAdd = true;
}
@@ -611,7 +611,7 @@ public class PerFileSettingsCalculator {
path = rcData.getPath();
curRcSet = rcSet.createChild(path, rcData, false);
if (rcData.getType() == ICSettingBase.SETTING_FILE) {
- fileMap = new HashMap<ExtsSet, ExtsSetSettings>(1);
+ fileMap = new HashMap<>(1);
fileSetting = createExtsSetSettings(path, (CFileData) rcData);
fileMap.put(fileSetting.fExtsSet, fileSetting);
curRcSet.internalSetSettingsMap(fileMap);
@@ -664,7 +664,7 @@ public class PerFileSettingsCalculator {
private static void addEmptyLanguageInfos(RcSettingInfo rcInfo, CLanguageData[] lDatas) {
ArrayList<ILangSettingInfo> list = rcInfo.fLangInfoList;
if (list == null) {
- list = new ArrayList<ILangSettingInfo>(lDatas.length);
+ list = new ArrayList<>(lDatas.length);
rcInfo.fLangInfoList = list;
} else {
list.ensureCapacity(lDatas.length);
@@ -682,7 +682,7 @@ public class PerFileSettingsCalculator {
IPath projRelPath;
CResourceData rcData;
// RcSetSettings dataSetting;
- List<IRcSettingInfo> list = new ArrayList<IRcSettingInfo>(pfpis.length);
+ List<IRcSettingInfo> list = new ArrayList<>(pfpis.length);
RcSettingInfo rcInfo;
LangSettingInfo lInfo;
CLanguageData lData;
@@ -723,7 +723,7 @@ public class PerFileSettingsCalculator {
if (rcInfo == null) {
rcInfo = new RcSettingInfo(rootData);
- tmpList = new ArrayList<ILangSettingInfo>(lDatas.length - k);
+ tmpList = new ArrayList<>(lDatas.length - k);
rcInfo.fLangInfoList = tmpList;
}
@@ -777,7 +777,7 @@ public class PerFileSettingsCalculator {
if (lData != null) {
rcInfo = new RcSettingInfo(rcData);
lInfo = new LangSettingInfo(lData, pInfo);
- tmpList = new ArrayList<ILangSettingInfo>(1);
+ tmpList = new ArrayList<>(1);
tmpList.add(lInfo);
rcInfo.fLangInfoList = tmpList;
list.add(rcInfo);
@@ -806,7 +806,7 @@ public class PerFileSettingsCalculator {
RcSetSettings settings[] = rootSetting.getChildren(true);
RcSetSettings setting;
CResourceData rcData;
- List<IRcSettingInfo> resultList = new ArrayList<IRcSettingInfo>();
+ List<IRcSettingInfo> resultList = new ArrayList<>();
LangSettingInfo langInfo;
RcSettingInfo rcInfo;
PathInfo pathInfo;
@@ -838,7 +838,7 @@ public class PerFileSettingsCalculator {
if (pathInfo != null) {
langInfo = new LangSettingInfo(extSetting.fBaseLangData, pathInfo);
rcInfo = new RcSettingInfo(rcData);
- rcInfo.fLangInfoList = new ArrayList<ILangSettingInfo>(1);
+ rcInfo.fLangInfoList = new ArrayList<>(1);
rcInfo.fLangInfoList.add(langInfo);
resultList.add(rcInfo);
}
@@ -846,7 +846,7 @@ public class PerFileSettingsCalculator {
} else {
if (setting.fExtsSetToExtsSetSettingsMap.size() != 0) {
rcInfo = new RcSettingInfo(rcData);
- rcInfo.fLangInfoList = new ArrayList<ILangSettingInfo>(setting.fExtsSetToExtsSetSettingsMap.size());
+ rcInfo.fLangInfoList = new ArrayList<>(setting.fExtsSetToExtsSetSettingsMap.size());
resultList.add(rcInfo);
Collection<ExtsSetSettings> values = setting.fExtsSetToExtsSetSettingsMap.values();
@@ -1008,7 +1008,7 @@ public class PerFileSettingsCalculator {
private static HashMap<ExtsSet, ExtsSetSettings> createExtsSetSettingsMap(CFolderData data) {
CLanguageData[] lDatas = data.getLanguageDatas();
- HashMap<ExtsSet, ExtsSetSettings> map = new HashMap<ExtsSet, ExtsSetSettings>(lDatas.length);
+ HashMap<ExtsSet, ExtsSetSettings> map = new HashMap<>(lDatas.length);
ExtsSetSettings settings;
if (lDatas.length != 0) {
@@ -1028,7 +1028,7 @@ public class PerFileSettingsCalculator {
IPath path;
PathInfo info, storedInfo;
ListIndexStore store = new ListIndexStore(10);
- HashMap<PathInfo, PathInfo> infoMap = new HashMap<PathInfo, PathInfo>();
+ HashMap<PathInfo, PathInfo> infoMap = new HashMap<>();
// LinkedHashMap result;
Set<Entry<IResource, PathInfo>> entrySet = map.entrySet();
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/build/internal/core/scannerconfig2/CfgScannerConfigInfoFactory2.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/build/internal/core/scannerconfig2/CfgScannerConfigInfoFactory2.java
index 15adfbb353..ce1204f503 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/build/internal/core/scannerconfig2/CfgScannerConfigInfoFactory2.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/build/internal/core/scannerconfig2/CfgScannerConfigInfoFactory2.java
@@ -133,13 +133,13 @@ public class CfgScannerConfigInfoFactory2 {
}
if (fContainer == null) {
- fContainer = new SoftReference<IScannerConfigBuilderInfo2Set>(container);
+ fContainer = new SoftReference<>(container);
}
return container;
}
private Map<CfgInfoContext, IScannerConfigBuilderInfo2> createMap() {
- HashMap<CfgInfoContext, IScannerConfigBuilderInfo2> map = new HashMap<CfgInfoContext, IScannerConfigBuilderInfo2>();
+ HashMap<CfgInfoContext, IScannerConfigBuilderInfo2> map = new HashMap<>();
try {
IScannerConfigBuilderInfo2Set container = getContainer();
@@ -314,7 +314,7 @@ public class CfgScannerConfigInfoFactory2 {
private Map<CfgInfoContext, IScannerConfigBuilderInfo2> getConfigInfoMap(
Map<InfoContext, IScannerConfigBuilderInfo2> baseMap) {
- Map<CfgInfoContext, IScannerConfigBuilderInfo2> map = new HashMap<CfgInfoContext, IScannerConfigBuilderInfo2>();
+ Map<CfgInfoContext, IScannerConfigBuilderInfo2> map = new HashMap<>();
for (Entry<InfoContext, IScannerConfigBuilderInfo2> entry : baseMap.entrySet()) {
InfoContext baseContext = entry.getKey();
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/buildmodel/BuildDescriptionManager.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/buildmodel/BuildDescriptionManager.java
index 3468c7ded3..67a230db0c 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/buildmodel/BuildDescriptionManager.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/buildmodel/BuildDescriptionManager.java
@@ -65,7 +65,7 @@ public class BuildDescriptionManager {
*/
public static final int DEPFILES = 1 << 3;
- private Set<IBuildStep> fVisitedSteps = new HashSet<IBuildStep>();
+ private Set<IBuildStep> fVisitedSteps = new HashSet<>();
private boolean fUp;
private IBuildDescription fInfo;
@@ -168,7 +168,7 @@ public class BuildDescriptionManager {
}
public static IBuildStep[] getSteps(IBuildStep step, boolean input) {
- Set<IBuildStep> set = new HashSet<IBuildStep>();
+ Set<IBuildStep> set = new HashSet<>();
IBuildIOType args[] = input ? step.getInputIOTypes() : step.getOutputIOTypes();
@@ -194,7 +194,7 @@ public class BuildDescriptionManager {
}
public static IBuildResource[] filterGeneratedBuildResources(IBuildResource rc[], int rcState) {
- List<IBuildResource> list = new ArrayList<IBuildResource>();
+ List<IBuildResource> list = new ArrayList<>();
addBuildResources(rc, list, rcState);
return list.toArray(new IBuildResource[list.size()]);
@@ -256,7 +256,7 @@ public class BuildDescriptionManager {
*/
public static void cleanGeneratedRebuildResources(IBuildDescription des) throws CoreException {
IBuildResource bRcs[] = filterGeneratedBuildResources(des.getResources(), REMOVED | REBUILD);
- List<Object[]> failList = new ArrayList<Object[]>();
+ List<Object[]> failList = new ArrayList<>();
for (int i = 0; i < bRcs.length; i++) {
if (!bRcs[i].isProjectResource())
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ExternalBuildRunner.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ExternalBuildRunner.java
index b9e4b9edd3..395469cd3c 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ExternalBuildRunner.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ExternalBuildRunner.java
@@ -114,7 +114,7 @@ public class ExternalBuildRunner extends AbstractBuildRunner {
ErrorParserManager epm = new ErrorParserManager(project, workingDirectoryURI, markerGenerator,
errorParsers);
- List<IConsoleParser> parsers = new ArrayList<IConsoleParser>();
+ List<IConsoleParser> parsers = new ArrayList<>();
if (!isOnlyClean) {
ICConfigurationDescription cfgDescription = ManagedBuildManager
.getDescriptionForConfiguration(configuration);
@@ -199,7 +199,7 @@ public class ExternalBuildRunner extends AbstractBuildRunner {
}
protected Map<String, String> getEnvironment(IBuilder builder) throws CoreException {
- Map<String, String> envMap = new HashMap<String, String>();
+ Map<String, String> envMap = new HashMap<>();
if (builder.appendEnvironment()) {
ICConfigurationDescription cfgDes = ManagedBuildManager
.getDescriptionForConfiguration(builder.getParent().getParent());
@@ -221,7 +221,7 @@ public class ExternalBuildRunner extends AbstractBuildRunner {
@Deprecated
protected static String[] getEnvStrings(Map<String, String> env) {
// Convert into env strings
- List<String> strings = new ArrayList<String>(env.size());
+ List<String> strings = new ArrayList<>(env.size());
for (Entry<String, String> entry : env.entrySet()) {
StringBuilder buffer = new StringBuilder(entry.getKey());
buffer.append('=').append(entry.getValue());
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/InternalBuildRunner.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/InternalBuildRunner.java
index e15b95c149..b0b2e9f627 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/InternalBuildRunner.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/InternalBuildRunner.java
@@ -103,7 +103,7 @@ public class InternalBuildRunner extends AbstractBuildRunner {
ErrorParserManager epm = new ErrorParserManager(project, workingDirectoryURI, markerGenerator,
errorParsers);
- List<IConsoleParser> parsers = new ArrayList<IConsoleParser>();
+ List<IConsoleParser> parsers = new ArrayList<>();
ManagedBuildManager.collectLanguageSettingsConsoleParsers(cfgDescription, epm, parsers);
buildRunnerHelper.prepareStreams(epm, parsers, console,
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ManagedBuildManager.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ManagedBuildManager.java
index 52cee0b994..29c0bcaa53 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ManagedBuildManager.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ManagedBuildManager.java
@@ -264,7 +264,7 @@ public class ManagedBuildManager extends AbstractCExtension {
private static HashMap<MatchKey<Tool>, List<Tool>> fSortedTools;
private static HashMap<MatchKey<Builder>, List<Builder>> fSortedBuilders;
- private static Map<IProject, IManagedBuildInfo> fInfoMap = new HashMap<IProject, IManagedBuildInfo>();
+ private static Map<IProject, IManagedBuildInfo> fInfoMap = new HashMap<>();
private static ISorter fToolChainSorter = new ISorter() {
@Override
@@ -383,7 +383,7 @@ public class ManagedBuildManager extends AbstractCExtension {
} catch (BuildException e) {
}
if (projectTypeMap == null) {
- projectTypeMap = new TreeMap<String, IProjectType>();
+ projectTypeMap = new TreeMap<>();
}
return projectTypeMap;
}
@@ -393,7 +393,7 @@ public class ManagedBuildManager extends AbstractCExtension {
*/
protected static Map<String, IConfiguration> getExtensionConfigurationMap() {
if (extensionConfigurationMap == null) {
- extensionConfigurationMap = new HashMap<String, IConfiguration>();
+ extensionConfigurationMap = new HashMap<>();
}
return extensionConfigurationMap;
}
@@ -403,7 +403,7 @@ public class ManagedBuildManager extends AbstractCExtension {
*/
protected static Map<String, IResourceConfiguration> getExtensionResourceConfigurationMap() {
if (extensionResourceConfigurationMap == null) {
- extensionResourceConfigurationMap = new HashMap<String, IResourceConfiguration>();
+ extensionResourceConfigurationMap = new HashMap<>();
}
return extensionResourceConfigurationMap;
}
@@ -418,7 +418,7 @@ public class ManagedBuildManager extends AbstractCExtension {
}
if (extensionToolChainMap == null) {
- extensionToolChainMap = new TreeMap<String, ToolChain>();
+ extensionToolChainMap = new TreeMap<>();
}
return extensionToolChainMap;
}
@@ -443,7 +443,7 @@ public class ManagedBuildManager extends AbstractCExtension {
} catch (BuildException e) {
}
if (extensionToolMap == null) {
- extensionToolMap = new TreeMap<String, Tool>();
+ extensionToolMap = new TreeMap<>();
}
return extensionToolMap;
}
@@ -464,7 +464,7 @@ public class ManagedBuildManager extends AbstractCExtension {
*/
protected static Map<String, ITargetPlatform> getExtensionTargetPlatformMap() {
if (extensionTargetPlatformMap == null) {
- extensionTargetPlatformMap = new HashMap<String, ITargetPlatform>();
+ extensionTargetPlatformMap = new HashMap<>();
}
return extensionTargetPlatformMap;
}
@@ -478,7 +478,7 @@ public class ManagedBuildManager extends AbstractCExtension {
} catch (BuildException e) {
}
if (extensionBuilderMap == null) {
- extensionBuilderMap = new TreeMap<String, Builder>();
+ extensionBuilderMap = new TreeMap<>();
}
return extensionBuilderMap;
}
@@ -499,7 +499,7 @@ public class ManagedBuildManager extends AbstractCExtension {
*/
protected static Map<String, IOption> getExtensionOptionMap() {
if (extensionOptionMap == null) {
- extensionOptionMap = new HashMap<String, IOption>();
+ extensionOptionMap = new HashMap<>();
}
return extensionOptionMap;
}
@@ -509,7 +509,7 @@ public class ManagedBuildManager extends AbstractCExtension {
*/
protected static Map<String, IOptionCategory> getExtensionOptionCategoryMap() {
if (extensionOptionCategoryMap == null) {
- extensionOptionCategoryMap = new HashMap<String, IOptionCategory>();
+ extensionOptionCategoryMap = new HashMap<>();
}
return extensionOptionCategoryMap;
}
@@ -519,7 +519,7 @@ public class ManagedBuildManager extends AbstractCExtension {
*/
protected static Map<String, IInputType> getExtensionInputTypeMap() {
if (extensionInputTypeMap == null) {
- extensionInputTypeMap = new HashMap<String, IInputType>();
+ extensionInputTypeMap = new HashMap<>();
}
return extensionInputTypeMap;
}
@@ -529,7 +529,7 @@ public class ManagedBuildManager extends AbstractCExtension {
*/
protected static Map<String, IOutputType> getExtensionOutputTypeMap() {
if (extensionOutputTypeMap == null) {
- extensionOutputTypeMap = new HashMap<String, IOutputType>();
+ extensionOutputTypeMap = new HashMap<>();
}
return extensionOutputTypeMap;
}
@@ -539,7 +539,7 @@ public class ManagedBuildManager extends AbstractCExtension {
*/
protected static Map<String, ITarget> getExtensionTargetMap() {
if (extensionTargetMap == null) {
- extensionTargetMap = new HashMap<String, ITarget>();
+ extensionTargetMap = new HashMap<>();
}
return extensionTargetMap;
}
@@ -1633,7 +1633,7 @@ public class ManagedBuildManager extends AbstractCExtension {
*/
public static void addExtensionProjectType(ProjectType projectType) {
if (projectTypes == null) {
- projectTypes = new ArrayList<IProjectType>();
+ projectTypes = new ArrayList<>();
}
projectTypes.add(projectType);
@@ -2163,7 +2163,7 @@ public class ManagedBuildManager extends AbstractCExtension {
// Call the start up config extensions. These may rely on the standard elements
// having already been loaded so we wait to call them from here.
if (startUpConfigElements != null) {
- buildDefStartupList = new ArrayList<IManagedBuildDefinitionsStartup>(
+ buildDefStartupList = new ArrayList<>(
startUpConfigElements.size());
for (IManagedConfigElement startUpConfigElement : startUpConfigElements) {
@@ -2492,7 +2492,7 @@ public class ManagedBuildManager extends AbstractCExtension {
// Cache up early configuration extension elements so was can call them after
// other configuration elements have loaded.
if (startUpConfigElements == null)
- startUpConfigElements = new ArrayList<IManagedConfigElement>();
+ startUpConfigElements = new ArrayList<>();
startUpConfigElements.add(element);
}
} else {
@@ -3043,7 +3043,7 @@ public class ManagedBuildManager extends AbstractCExtension {
*/
private static Map<IResource, List<IScannerInfoChangeListener>> getBuildModelListeners() {
if (buildModelListeners == null) {
- buildModelListeners = new HashMap<IResource, List<IScannerInfoChangeListener>>();
+ buildModelListeners = new HashMap<>();
}
return buildModelListeners;
}
@@ -3053,7 +3053,7 @@ public class ManagedBuildManager extends AbstractCExtension {
throw new IllegalStateException();
if (configElementMap == null) {
- configElementMap = new HashMap<IBuildObject, IManagedConfigElement>();
+ configElementMap = new HashMap<>();
}
return configElementMap;
}
@@ -3507,7 +3507,7 @@ public class ManagedBuildManager extends AbstractCExtension {
public static Map<String, IConfigurationElement> getConversionElements(IBuildObject buildObj) {
- Map<String, IConfigurationElement> conversionTargets = new HashMap<String, IConfigurationElement>();
+ Map<String, IConfigurationElement> conversionTargets = new HashMap<>();
// Get the Converter Extension Point
IExtensionPoint extensionPoint = Platform.getExtensionRegistry().getExtensionPoint(
@@ -4002,7 +4002,7 @@ public class ManagedBuildManager extends AbstractCExtension {
// }
public static IToolChain[] getExtensionToolChains(IProjectType type) {
- List<IToolChain> result = new ArrayList<IToolChain>();
+ List<IToolChain> result = new ArrayList<>();
IConfiguration cfgs[] = type.getConfigurations();
for (IConfiguration cfg : cfgs) {
@@ -4025,7 +4025,7 @@ public class ManagedBuildManager extends AbstractCExtension {
}
public static IConfiguration[] getExtensionConfigurations(IToolChain tChain, IProjectType type) {
- List<IConfiguration> list = new ArrayList<IConfiguration>();
+ List<IConfiguration> list = new ArrayList<>();
IConfiguration cfgs[] = type.getConfigurations();
for (IConfiguration cfg : cfgs) {
IToolChain cur = cfg.getToolChain();
@@ -4057,7 +4057,7 @@ public class ManagedBuildManager extends AbstractCExtension {
String propertyValue) {
// List all = getSortedToolChains();
List<ToolChain> list = findIdenticalElements((ToolChain) tChain, fToolChainSorter);
- LinkedHashSet<IConfiguration> result = new LinkedHashSet<IConfiguration>();
+ LinkedHashSet<IConfiguration> result = new LinkedHashSet<>();
boolean tcFound = false;
if (list != null) {
for (int i = 0; i < list.size(); i++) {
@@ -4135,7 +4135,7 @@ public class ManagedBuildManager extends AbstractCExtension {
private static <T extends BuildObject & IMatchKeyProvider<T>> HashMap<MatchKey<T>, List<T>> getSortedElements(
Collection<T> elements) {
- HashMap<MatchKey<T>, List<T>> map = new HashMap<MatchKey<T>, List<T>>();
+ HashMap<MatchKey<T>, List<T>> map = new HashMap<>();
for (T p : elements) {
MatchKey<T> key = p.getMatchKey();
if (key == null)
@@ -4143,7 +4143,7 @@ public class ManagedBuildManager extends AbstractCExtension {
List<T> list = map.get(key);
if (list == null) {
- list = new ArrayList<T>();
+ list = new ArrayList<>();
map.put(key, list);
}
list.add(p);
@@ -4297,7 +4297,7 @@ public class ManagedBuildManager extends AbstractCExtension {
public static IToolChain[] getExtensionsToolChains(String propertyType, String propertyValue,
boolean supportedPropsOnly) {
HashMap<MatchKey<ToolChain>, List<ToolChain>> all = getSortedToolChains();
- List<IToolChain> result = new ArrayList<IToolChain>();
+ List<IToolChain> result = new ArrayList<>();
for (List<ToolChain> list : all.values()) {
IToolChain tc = findToolChain(list, propertyType, propertyValue, supportedPropsOnly);
if (tc != null)
@@ -4386,7 +4386,7 @@ public class ManagedBuildManager extends AbstractCExtension {
sorter.sort();
list = p.getIdenticalList();
if (list == null) {
- list = new ArrayList<T>(0);
+ list = new ArrayList<>(0);
p.setIdenticalList(list);
}
}
@@ -4409,7 +4409,7 @@ public class ManagedBuildManager extends AbstractCExtension {
ICConfigurationDescription cfgDes = getDescriptionForConfiguration(config);
if (cfgDes != null) {
ICConfigurationDescription[] descs = CoreModelUtil.getReferencedConfigurationDescriptions(cfgDes, false);
- List<IConfiguration> result = new ArrayList<IConfiguration>();
+ List<IConfiguration> result = new ArrayList<>();
for (ICConfigurationDescription desc : descs) {
IConfiguration cfg = getConfigurationForDescription(desc);
if (cfg != null) {
@@ -4483,18 +4483,18 @@ public class ManagedBuildManager extends AbstractCExtension {
}
private static Map<IProject, IConfiguration[]> sortConfigs(IConfiguration cfgs[]) {
- Map<IProject, Set<IConfiguration>> cfgSetMap = new HashMap<IProject, Set<IConfiguration>>();
+ Map<IProject, Set<IConfiguration>> cfgSetMap = new HashMap<>();
for (IConfiguration cfg : cfgs) {
IProject proj = cfg.getOwner().getProject();
Set<IConfiguration> set = cfgSetMap.get(proj);
if (set == null) {
- set = new HashSet<IConfiguration>();
+ set = new HashSet<>();
cfgSetMap.put(proj, set);
}
set.add(cfg);
}
- Map<IProject, IConfiguration[]> cfgArrayMap = new HashMap<IProject, IConfiguration[]>();
+ Map<IProject, IConfiguration[]> cfgArrayMap = new HashMap<>();
if (cfgSetMap.size() != 0) {
Set<Entry<IProject, Set<IConfiguration>>> entrySet = cfgSetMap.entrySet();
for (Entry<IProject, Set<IConfiguration>> entry : entrySet) {
@@ -4584,7 +4584,7 @@ public class ManagedBuildManager extends AbstractCExtension {
String builderName = command.getBuilderName();
Map<String, String> newArgs = null;
if (buildKind != IncrementalProjectBuilder.CLEAN_BUILD) {
- newArgs = new HashMap<String, String>(args);
+ newArgs = new HashMap<>(args);
if (!builderName.equals(CommonBuilder.BUILDER_ID)) {
newArgs.putAll(command.getArguments());
}
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ManagedCProjectNature.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ManagedCProjectNature.java
index a46c0c8a48..e6ebfb8fbc 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ManagedCProjectNature.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ManagedCProjectNature.java
@@ -59,7 +59,7 @@ public class ManagedCProjectNature implements IProjectNature {
ICommand command = commands[i];
if (command.getBuilderName().equals("org.eclipse.cdt.core.cbuilder")) { //$NON-NLS-1$
// Remove the command
- Vector<ICommand> vec = new Vector<ICommand>(Arrays.asList(commands));
+ Vector<ICommand> vec = new Vector<>(Arrays.asList(commands));
vec.removeElementAt(i);
vec.trimToSize();
ICommand[] tempCommands = vec.toArray(new ICommand[commands.length - 1]);
@@ -210,7 +210,7 @@ public class ManagedCProjectNature implements IProjectNature {
public static void removeNature(IProject project, String natureId, IProgressMonitor monitor) throws CoreException {
IProjectDescription description = project.getDescription();
String[] prevNatures = description.getNatureIds();
- List<String> newNatures = new ArrayList<String>(Arrays.asList(prevNatures));
+ List<String> newNatures = new ArrayList<>(Arrays.asList(prevNatures));
newNatures.remove(natureId);
description.setNatureIds(newNatures.toArray(new String[newNatures.size()]));
project.setDescription(description, monitor);
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ResourceChangeHandler2.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ResourceChangeHandler2.java
index 7e169c859b..ecfe70c857 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ResourceChangeHandler2.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ResourceChangeHandler2.java
@@ -131,7 +131,7 @@ class ResourceChangeHandler2 extends ResourceChangeHandlerBase {
String cachedIds[] = ConfigurationDataProvider.getNaturesIdsUsedOnCache(cfgs[i]);
if (checkNaturesNeedUpdate(cachedIds, natureIds)) {
if (fProjSet == null)
- fProjSet = new HashSet<IProject>();
+ fProjSet = new HashSet<>();
fProjSet.add(project);
break;
@@ -155,9 +155,9 @@ class ResourceChangeHandler2 extends ResourceChangeHandlerBase {
if (oldIds == null)
return true;
- Set<String> oldSet = new HashSet<String>(Arrays.asList(oldIds));
- Set<String> oldSetCopy = new HashSet<String>(oldSet);
- Set<String> newSet = new HashSet<String>(Arrays.asList(newIds));
+ Set<String> oldSet = new HashSet<>(Arrays.asList(oldIds));
+ Set<String> oldSetCopy = new HashSet<>(oldSet);
+ Set<String> newSet = new HashSet<>(Arrays.asList(newIds));
oldSet.removeAll(newSet);
newSet.removeAll(oldSetCopy);
if (oldSet.contains(CProjectNature.C_NATURE_ID) || oldSet.contains(CCProjectNature.CC_NATURE_ID)
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/BuildCommand.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/BuildCommand.java
index 73a104bf0d..953d4fb228 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/BuildCommand.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/BuildCommand.java
@@ -33,7 +33,7 @@ public class BuildCommand implements IBuildCommand {
if (args != null)
fArgs = args.clone();
if (env != null)
- fEnv = new HashMap<String, String>(env);
+ fEnv = new HashMap<>(env);
fCWD = cwd;
}
@@ -62,7 +62,7 @@ public class BuildCommand implements IBuildCommand {
@Override
public Map<String, String> getEnvironment() {
if (fEnv != null)
- return new HashMap<String, String>(fEnv);
+ return new HashMap<>(fEnv);
return null;
}
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/BuildDescription.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/BuildDescription.java
index 7c7fb15e22..629c4a11d8 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/BuildDescription.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/BuildDescription.java
@@ -103,15 +103,15 @@ public class BuildDescription implements IBuildDescription {
private IResourceDelta fDelta;
private IConfigurationBuildState fBuildState;
- private Map<ITool, BuildStep> fToolToMultiStepMap = new HashMap<ITool, BuildStep>();
+ private Map<ITool, BuildStep> fToolToMultiStepMap = new HashMap<>();
private BuildStep fOrderedMultiActions[];
/** Map from Location URI to BuildResource */
- private Map<URI, BuildResource> fLocationToRcMap = new HashMap<URI, BuildResource>();
+ private Map<URI, BuildResource> fLocationToRcMap = new HashMap<>();
- private Map<String, Set<BuildIOType>> fVarToAddlInSetMap = new HashMap<String, Set<BuildIOType>>();
+ private Map<String, Set<BuildIOType>> fVarToAddlInSetMap = new HashMap<>();
- private List<BuildStep> fStepList = new ArrayList<BuildStep>();
+ private List<BuildStep> fStepList = new ArrayList<>();
private BuildStep fTargetStep;
@@ -125,8 +125,8 @@ public class BuildDescription implements IBuildDescription {
private BuildStep fInputStep;
private BuildStep fOutputStep;
- private Map<String, ToolOrderEstimation> fToolOrderMap = new HashMap<String, ToolOrderEstimation>();
- private Set<ITool> fToolInProcesSet = new HashSet<ITool>();
+ private Map<String, ToolOrderEstimation> fToolOrderMap = new HashMap<>();
+ private Set<ITool> fToolInProcesSet = new HashSet<>();
private ITool fOrderedTools[];
private ICSourceEntry[] fSourceEntries;
@@ -143,7 +143,7 @@ public class BuildDescription implements IBuildDescription {
private class ToolInfoHolder {
Map<String, List<ToolAndType>> fExtToToolAndTypeListMap;
- Map<String, BuildGroup> fInTypeToGroupMap = new HashMap<String, BuildGroup>();
+ Map<String, BuildGroup> fInTypeToGroupMap = new HashMap<>();
}
class ToolAndType {
@@ -489,7 +489,7 @@ public class BuildDescription implements IBuildDescription {
}
private Map<String, List<ToolAndType>> initToolAndTypeMap(IFolderInfo foInfo) {
- Map<String, List<ToolAndType>> extToToolAndTypeListMap = new HashMap<String, List<ToolAndType>>();
+ Map<String, List<ToolAndType>> extToToolAndTypeListMap = new HashMap<>();
for (ITool tool : foInfo.getFilteredTools()) {
IInputType types[] = tool.getInputTypes();
if (types.length != 0) {
@@ -498,7 +498,7 @@ public class BuildDescription implements IBuildDescription {
if (tool.buildsFileType(ext)) {
List<ToolAndType> list = extToToolAndTypeListMap.get(ext);
if (list == null) {
- list = new ArrayList<ToolAndType>();
+ list = new ArrayList<>();
extToToolAndTypeListMap.put(ext, list);
}
list.add(new ToolAndType(tool, type, ext));
@@ -510,7 +510,7 @@ public class BuildDescription implements IBuildDescription {
if (tool.buildsFileType(ext)) {
List<ToolAndType> list = extToToolAndTypeListMap.get(ext);
if (list == null) {
- list = new ArrayList<ToolAndType>();
+ list = new ArrayList<>();
extToToolAndTypeListMap.put(ext, list);
}
list.add(new ToolAndType(tool, null, ext));
@@ -936,7 +936,7 @@ public class BuildDescription implements IBuildDescription {
} while (foundUnused);
Set<Entry<URI, BuildResource>> set = fLocationToRcMap.entrySet();
- List<BuildResource> list = new ArrayList<BuildResource>();
+ List<BuildResource> list = new ArrayList<>();
for (Entry<URI, BuildResource> entry : set) {
BuildResource rc = entry.getValue();
boolean doRemove = false;
@@ -1019,7 +1019,7 @@ public class BuildDescription implements IBuildDescription {
private BuildResource[] addOutputs(IPath paths[], BuildIOType buildArg, IPath outDirPath) {
if (paths != null) {
- List<BuildResource> list = new ArrayList<BuildResource>();
+ List<BuildResource> list = new ArrayList<>();
for (IPath path : paths) {
IPath outFullPath = path;
IPath outWorkspacePath = path;
@@ -1474,7 +1474,7 @@ public class BuildDescription implements IBuildDescription {
}
public IBuildResource[] getResources(boolean generated) {
- List<IBuildResource> list = new ArrayList<IBuildResource>();
+ List<IBuildResource> list = new ArrayList<>();
for (IBuildResource rc : getResources()) {
if (generated == (rc.getProducerStep() != fInputStep))
list.add(rc);
@@ -1500,7 +1500,7 @@ public class BuildDescription implements IBuildDescription {
protected Map<String, String> calculateEnvironment() {
IBuildEnvironmentVariable variables[] = ManagedBuildManager.getEnvironmentVariableProvider().getVariables(fCfg,
true, true);
- Map<String, String> map = new HashMap<String, String>();
+ Map<String, String> map = new HashMap<>();
for (IBuildEnvironmentVariable var : variables) {
map.put(var.getName(), var.getValue());
@@ -1533,7 +1533,7 @@ public class BuildDescription implements IBuildDescription {
// Option?
if (option != null) {
try {
- List<String> inputs = new ArrayList<String>();
+ List<String> inputs = new ArrayList<>();
int optType = option.getValueType();
if (optType == IOption.STRING) {
inputs.add(option.getStringValue());
@@ -1618,7 +1618,7 @@ public class BuildDescription implements IBuildDescription {
Set<BuildIOType> set = fVarToAddlInSetMap.get(var);
if (set == null) {
- set = new HashSet<BuildIOType>();
+ set = new HashSet<>();
fVarToAddlInSetMap.put(var, set);
}
@@ -1648,7 +1648,7 @@ public class BuildDescription implements IBuildDescription {
private void calculateDeps(BuildStep step) {
BuildResource rcs[] = (BuildResource[]) step.getInputResources();
- Set<IPath> depSet = new HashSet<IPath>();
+ Set<IPath> depSet = new HashSet<>();
for (BuildResource rc : rcs) {
IManagedDependencyCalculator depCalc = getDependencyCalculator(step, rc);
@@ -1775,7 +1775,7 @@ public class BuildDescription implements IBuildDescription {
}
public String[] getLibs(BuildStep step) {
- Vector<String> libs = new Vector<String>();
+ Vector<String> libs = new Vector<>();
ITool tool = step.getLibTool();
if (tool != null) {
@@ -1821,7 +1821,7 @@ public class BuildDescription implements IBuildDescription {
}
public String[] getUserObjs(BuildStep step) {
- Vector<String> objs = new Vector<String>();
+ Vector<String> objs = new Vector<>();
ITool tool = fCfg.calculateTargetTool();
if (tool == null)
tool = step.getTool();
@@ -2038,7 +2038,7 @@ public class BuildDescription implements IBuildDescription {
String exts[] = tool.getAllInputExtensions();
- Set<ITool> set = new HashSet<ITool>();
+ Set<ITool> set = new HashSet<>();
for (ITool t : fCfg.getFilteredTools()) {
if (t == tool)
continue;
@@ -2080,7 +2080,7 @@ public class BuildDescription implements IBuildDescription {
String exts[] = tool.getAllOutputExtensions();
- Set<ITool> set = new HashSet<ITool>();
+ Set<ITool> set = new HashSet<>();
for (ITool t : fCfg.getFilteredTools()) {
if (t == tool)
continue;
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/BuildGroup.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/BuildGroup.java
index 7ef23ade63..deec7f7256 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/BuildGroup.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/BuildGroup.java
@@ -19,7 +19,7 @@ import java.util.Set;
import org.eclipse.cdt.managedbuilder.buildmodel.IBuildStep;
public class BuildGroup {
- private Set<BuildStep> fActions = new HashSet<BuildStep>();
+ private Set<BuildStep> fActions = new HashSet<>();
private boolean fNeedsRebuild;
/* (non-Javadoc)
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/BuildIOType.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/BuildIOType.java
index debdd80b59..e51c9ba08f 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/BuildIOType.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/BuildIOType.java
@@ -25,7 +25,7 @@ import org.eclipse.cdt.managedbuilder.core.IOutputType;
public class BuildIOType implements IBuildIOType {
private BuildStep fStep;
- private List<BuildResource> fResources = new ArrayList<BuildResource>();
+ private List<BuildResource> fResources = new ArrayList<>();
private boolean fIsInput;
private boolean fIsPrimary;
private String fLinkId;
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/BuildProcessManager.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/BuildProcessManager.java
index c6591c7281..ce69fa24fc 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/BuildProcessManager.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/BuildProcessManager.java
@@ -48,7 +48,7 @@ public class BuildProcessManager {
err = _err;
show = _show;
maxProcesses = _procNumber;
- processes = new Vector<ProcessLauncher>(Math.min(10, maxProcesses), 10);
+ processes = new Vector<>(Math.min(10, maxProcesses), 10);
}
/**
@@ -131,7 +131,7 @@ public class BuildProcessManager {
if (map == null)
return null;
- List<String> list = new ArrayList<String>();
+ List<String> list = new ArrayList<>();
Set<Entry<String, String>> entrySet = map.entrySet();
for (Entry<String, String> entry : entrySet) {
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/BuildResource.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/BuildResource.java
index 1f2ee3d97f..206654cf76 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/BuildResource.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/BuildResource.java
@@ -31,7 +31,7 @@ import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
public class BuildResource implements IBuildResource {
- private List<BuildIOType> fDepArgs = new ArrayList<BuildIOType>();
+ private List<BuildIOType> fDepArgs = new ArrayList<>();
private BuildIOType fProducerArg;
private boolean fNeedsRebuild;
private boolean fIsRemoved;
@@ -226,7 +226,7 @@ public class BuildResource implements IBuildResource {
@Override
public IBuildStep[] getDependentSteps() {
- Set<IBuildStep> set = new HashSet<IBuildStep>();
+ Set<IBuildStep> set = new HashSet<>();
for (Iterator<BuildIOType> iter = fDepArgs.iterator(); iter.hasNext();) {
set.add(iter.next().getStep());
}
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/BuildStep.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/BuildStep.java
index 9eeaead489..2cf4bc22a2 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/BuildStep.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/BuildStep.java
@@ -64,8 +64,8 @@ public class BuildStep implements IBuildStep {
*/
private static final int MAX_CLEAN_LENGTH = 6000;
- private List<BuildIOType> fInputTypes = new ArrayList<BuildIOType>();
- private List<BuildIOType> fOutputTypes = new ArrayList<BuildIOType>();
+ private List<BuildIOType> fInputTypes = new ArrayList<>();
+ private List<BuildIOType> fOutputTypes = new ArrayList<>();
private ITool fTool;
private BuildGroup fBuildGroup;
private boolean fNeedsRebuild;
@@ -190,7 +190,7 @@ public class BuildStep implements IBuildStep {
public BuildIOType[] getPrimaryTypes(boolean input) {
List<BuildIOType> types = input ? fInputTypes : fOutputTypes;
- List<BuildIOType> list = new ArrayList<BuildIOType>();
+ List<BuildIOType> list = new ArrayList<>();
for (BuildIOType arg : types) {
if (arg.isPrimary())
list.add(arg);
@@ -229,7 +229,7 @@ public class BuildStep implements IBuildStep {
public IBuildResource[] getResources(boolean input) {
List<BuildIOType> list = input ? fInputTypes : fOutputTypes;
- Set<IBuildResource> set = new HashSet<IBuildResource>();
+ Set<IBuildResource> set = new HashSet<>();
for (BuildIOType arg : list) {
IBuildResource rcs[] = arg.getResources();
@@ -250,7 +250,7 @@ public class BuildStep implements IBuildStep {
String cleanCmd = fBuildDescription.getConfiguration().getCleanCommand();
if (cleanCmd != null && (cleanCmd = cleanCmd.trim()).length() > 0) {
- List<IBuildCommand> list = new ArrayList<IBuildCommand>();
+ List<IBuildCommand> list = new ArrayList<>();
cleanCmd = resolveMacros(cleanCmd, resolveAll);
String commands[] = cleanCmd.split(";"); //$NON-NLS-1$
for (int i = 0; i < commands.length - 1; i++) {
@@ -309,7 +309,7 @@ public class BuildStep implements IBuildStep {
if (step != null && (step = step.trim()).length() > 0) {
String commands[] = step.split(";"); //$NON-NLS-1$
- List<IBuildCommand> list = new ArrayList<IBuildCommand>();
+ List<IBuildCommand> list = new ArrayList<>();
for (int i = 0; i < commands.length; i++) {
IBuildCommand cmds[] = createCommandsFromString(commands[i], cwd, getEnvironment());
for (int j = 0; j < cmds.length; j++) {
@@ -427,7 +427,7 @@ public class BuildStep implements IBuildStep {
char expect = 0;
char prev = 0;
// int start = 0;
- List<String> list = new ArrayList<String>();
+ List<String> list = new ArrayList<>();
StringBuilder buf = new StringBuilder();
for (int i = 0; i < arr.length; i++) {
char ch = arr[i];
@@ -476,7 +476,7 @@ public class BuildStep implements IBuildStep {
BuildIOType[] types = getPrimaryTypes(input);
if (types.length == 0)
types = input ? (BuildIOType[]) getInputIOTypes() : (BuildIOType[]) getOutputIOTypes();
- List<BuildResource> list = new ArrayList<BuildResource>();
+ List<BuildResource> list = new ArrayList<>();
for (int i = 0; i < types.length; i++) {
BuildResource[] rcs = (BuildResource[]) types[i].getResources();
@@ -490,7 +490,7 @@ public class BuildStep implements IBuildStep {
}
private String[] resourcesToStrings(IPath cwd, BuildResource rcs[], String prefixToRm) {
- List<String> list = new ArrayList<String>(rcs.length);
+ List<String> list = new ArrayList<>(rcs.length);
for (int i = 0; i < rcs.length; i++) {
IPath path = BuildDescriptionManager.getRelPath(cwd, rcs[i].getLocation());
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/CommandBuilder.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/CommandBuilder.java
index 2b84254c9e..735dd8bc9a 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/CommandBuilder.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/CommandBuilder.java
@@ -162,7 +162,7 @@ public class CommandBuilder implements IBuildModelBuilder {
if (map == null)
return null;
- List<String> list = new ArrayList<String>();
+ List<String> list = new ArrayList<>();
Set<Entry<String, String>> entrySet = map.entrySet();
for (Entry<String, String> entry : entrySet) {
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/ConfigurationBuildState.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/ConfigurationBuildState.java
index 163eec8991..cb9aa060db 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/ConfigurationBuildState.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/ConfigurationBuildState.java
@@ -92,7 +92,7 @@ public class ConfigurationBuildState implements IConfigurationBuildState {
if (fPathToStateProps == null) {
fPathToStateProps = new Properties();
- fStateToPathListMap = new HashMap<Integer, Set<String>>();
+ fStateToPathListMap = new HashMap<>();
}
String strState = stateToString(Integer.valueOf(state));
Integer iState = stateToInt(strState);
@@ -110,7 +110,7 @@ public class ConfigurationBuildState implements IConfigurationBuildState {
fPathToStateProps.setProperty(str, strState);
Set<String> set = fStateToPathListMap.get(iState);
if (set == null) {
- set = new HashSet<String>();
+ set = new HashSet<>();
fStateToPathListMap.put(iState, set);
}
set.add(str);
@@ -130,13 +130,13 @@ public class ConfigurationBuildState implements IConfigurationBuildState {
}
private void load(Properties props) {
- HashMap<Integer, Set<String>> map = new HashMap<Integer, Set<String>>();
+ HashMap<Integer, Set<String>> map = new HashMap<>();
for (@SuppressWarnings("rawtypes")
Entry entry : props.entrySet()) {
Integer i = stateToInt((String) entry.getValue());
Set<String> list = map.get(i);
if (list == null) {
- list = new HashSet<String>();
+ list = new HashSet<>();
map.put(i, list);
}
list.add((String) entry.getKey());
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/DbgUtil.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/DbgUtil.java
index 8b38012f05..501ce058bc 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/DbgUtil.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/DbgUtil.java
@@ -122,7 +122,7 @@ public class DbgUtil {
IBuildIOType types[] = rc.getDependentIOTypes();
if (types.length > 0) {
- Set<IBuildStep> set = new HashSet<IBuildStep>();
+ Set<IBuildStep> set = new HashSet<>();
for (int i = 0; i < types.length; i++) {
if (set.add(types[i].getStep())) {
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/DescriptionBuilder.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/DescriptionBuilder.java
index be3404d1c7..46e822098a 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/DescriptionBuilder.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/DescriptionBuilder.java
@@ -50,7 +50,7 @@ public class DescriptionBuilder implements IBuildModelBuilder {
private IPath fCWD;
private boolean fBuildIncrementaly;
private boolean fResumeOnErrs;
- private Map<IBuildStep, StepBuilder> fStepToStepBuilderMap = new HashMap<IBuildStep, StepBuilder>();
+ private Map<IBuildStep, StepBuilder> fStepToStepBuilderMap = new HashMap<>();
private int fNumCommands = -1;
private GenDirInfo fDir;
private IResourceRebuildStateContainer fRebuildStateContainer;
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/GenDirInfo.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/GenDirInfo.java
index 64db3bc93f..75f831e748 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/GenDirInfo.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/GenDirInfo.java
@@ -34,7 +34,7 @@ import org.eclipse.core.runtime.IProgressMonitor;
public class GenDirInfo {
private IProject fProject;
private IPath fProjPath;
- private Set<IPath> fDirPathSet = new HashSet<IPath>();
+ private Set<IPath> fDirPathSet = new HashSet<>();
public GenDirInfo(IProject proj) {
fProject = proj;
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/ParallelBuilder.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/ParallelBuilder.java
index bd915816f4..d3b9b7586b 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/ParallelBuilder.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/ParallelBuilder.java
@@ -66,9 +66,9 @@ public class ParallelBuilder {
protected OutputStream err;
protected boolean resumeOnErrors;
protected boolean buildIncrementally;
- protected HashSet<BuildQueueElement> unsorted = new HashSet<BuildQueueElement>();
- protected HashMap<IBuildStep, BuildQueueElement> queueHash = new HashMap<IBuildStep, BuildQueueElement>();
- protected LinkedList<BuildQueueElement> queue = new LinkedList<BuildQueueElement>();
+ protected HashSet<BuildQueueElement> unsorted = new HashSet<>();
+ protected HashMap<IBuildStep, BuildQueueElement> queueHash = new HashMap<>();
+ protected LinkedList<BuildQueueElement> queue = new LinkedList<>();
private IResourceRebuildStateContainer fRebuildStateContainer;
private IBuildDescription fDes;
@@ -472,7 +472,7 @@ public class ParallelBuilder {
*/
protected int dispatch(BuildProcessManager mgr) {
int maxProcesses = mgr.getMaxProcesses();
- Vector<ActiveBuildStep> active = new Vector<ActiveBuildStep>(Math.min(maxProcesses, 10), 10);
+ Vector<ActiveBuildStep> active = new Vector<>(Math.min(maxProcesses, 10), 10);
int activeCount = 0;
int maxLevel = 0;
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/ProjectBuildState.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/ProjectBuildState.java
index 13e7bf0b4a..855c6d1a47 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/ProjectBuildState.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/ProjectBuildState.java
@@ -35,7 +35,7 @@ import org.eclipse.core.runtime.IPath;
public class ProjectBuildState implements IProjectBuildState {
private Properties fCfgIdToFileNameProps;
- private Map<String, ConfigurationBuildState> fCfgIdToStateMap = new HashMap<String, ConfigurationBuildState>();
+ private Map<String, ConfigurationBuildState> fCfgIdToStateMap = new HashMap<>();
private IProject fProject;
private boolean fIsMapInfoDirty;
@@ -84,7 +84,7 @@ public class ProjectBuildState implements IProjectBuildState {
@Override
public IConfigurationBuildState[] getConfigurationBuildStates() {
Properties props = getIdToNameProperties();
- List<IConfigurationBuildState> list = new ArrayList<IConfigurationBuildState>(props.size());
+ List<IConfigurationBuildState> list = new ArrayList<>(props.size());
Set<Object> keySet = props.keySet();
for (Object key : keySet) {
String id = (String) key;
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildproperties/BuildProperties.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildproperties/BuildProperties.java
index eb2cec7837..b9fa395d31 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildproperties/BuildProperties.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildproperties/BuildProperties.java
@@ -24,7 +24,7 @@ import org.eclipse.cdt.managedbuilder.buildproperties.IBuildProperty;
import org.eclipse.core.runtime.CoreException;
public class BuildProperties implements IBuildProperties {
- private HashMap<String, IBuildProperty> fPropertiesMap = new HashMap<String, IBuildProperty>();
+ private HashMap<String, IBuildProperty> fPropertiesMap = new HashMap<>();
private ArrayList<String> fInexistentProperties;
public BuildProperties() {
@@ -40,7 +40,7 @@ public class BuildProperties implements IBuildProperties {
addProperty(prop);
} catch (CoreException e) {
if (fInexistentProperties == null)
- fInexistentProperties = new ArrayList<String>();
+ fInexistentProperties = new ArrayList<>();
fInexistentProperties.add(property);
}
@@ -86,7 +86,7 @@ public class BuildProperties implements IBuildProperties {
} catch (CoreException e) {
if (force) {
if (fInexistentProperties == null)
- fInexistentProperties = new ArrayList<String>(1);
+ fInexistentProperties = new ArrayList<>(1);
fInexistentProperties.add(BuildProperty.toString(propertyId, propertyValue));
fInexistentProperties.trimToSize();
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildproperties/BuildPropertyManager.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildproperties/BuildPropertyManager.java
index 80ed810f9b..caf1c2b119 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildproperties/BuildPropertyManager.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildproperties/BuildPropertyManager.java
@@ -64,7 +64,7 @@ public class BuildPropertyManager implements IBuildPropertyManager {
return properties.toString();
}
- private Map<String, IBuildPropertyType> fPropertyTypeMap = new HashMap<String, IBuildPropertyType>();
+ private Map<String, IBuildPropertyType> fPropertyTypeMap = new HashMap<>();
@Override
public IBuildPropertyType getPropertyType(String id) {
@@ -136,13 +136,13 @@ public class BuildPropertyManager implements IBuildPropertyManager {
private List<IConfigurationElement> getTypeElList(boolean create) {
if (fTypeCfgElements == null && create)
- fTypeCfgElements = new ArrayList<IConfigurationElement>();
+ fTypeCfgElements = new ArrayList<>();
return fTypeCfgElements;
}
private List<IConfigurationElement> getValueElList(boolean create) {
if (fValueCfgElements == null && create)
- fValueCfgElements = new ArrayList<IConfigurationElement>();
+ fValueCfgElements = new ArrayList<>();
return fValueCfgElements;
}
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildproperties/BuildPropertyType.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildproperties/BuildPropertyType.java
index 3d2781354d..a0ef3398a4 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildproperties/BuildPropertyType.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildproperties/BuildPropertyType.java
@@ -20,7 +20,7 @@ import org.eclipse.cdt.managedbuilder.buildproperties.IBuildPropertyType;
import org.eclipse.cdt.managedbuilder.buildproperties.IBuildPropertyValue;
public class BuildPropertyType extends PropertyBase implements IBuildPropertyType {
- private Map<String, BuildPropertyValue> fValuesMap = new HashMap<String, BuildPropertyValue>();
+ private Map<String, BuildPropertyValue> fValuesMap = new HashMap<>();
BuildPropertyType(String id, String name) {
super(id, name);
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/AdditionalInput.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/AdditionalInput.java
index 90fdbce539..d1c6b57d32 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/AdditionalInput.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/AdditionalInput.java
@@ -459,7 +459,7 @@ public class AdditionalInput implements IAdditionalInput {
libNames = options[i].getLibraries();
} else if (type == IOption.LIBRARY_PATHS) {
if (null == libPaths)
- libPaths = new ArrayList<String>();
+ libPaths = new ArrayList<>();
libPaths.addAll(Arrays.asList(restoreLibraryPaths(options[i])));
}
}
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/BooleanExpressionApplicabilityCalculator.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/BooleanExpressionApplicabilityCalculator.java
index bbd8387feb..9b5a7d2cf6 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/BooleanExpressionApplicabilityCalculator.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/BooleanExpressionApplicabilityCalculator.java
@@ -193,7 +193,7 @@ public class BooleanExpressionApplicabilityCalculator implements IOptionApplicab
private Map<String, Set<String>> getReferencedProperties() {
if (fRefPropsMap == null) {
- fRefPropsMap = new HashMap<String, Set<String>>();
+ fRefPropsMap = new HashMap<>();
for (int i = 0; i < fExpressions.length; i++) {
fExpressions[i].getReferencedProperties(fRefPropsMap);
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/BuildObjectProperties.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/BuildObjectProperties.java
index 56838b4a6b..6e69f7d539 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/BuildObjectProperties.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/BuildObjectProperties.java
@@ -54,7 +54,7 @@ public class BuildObjectProperties extends BuildProperties implements IBuildObje
IBuildPropertyType types[] = BuildPropertyManager.getInstance().getPropertyTypes();
if (fRestriction != null && types.length != 0) {
- List<IBuildPropertyType> list = new ArrayList<IBuildPropertyType>(types.length);
+ List<IBuildPropertyType> list = new ArrayList<>(types.length);
for (IBuildPropertyType type : types) {
if (fRestriction.supportsType(type.getId()))
list.add(type);
@@ -72,7 +72,7 @@ public class BuildObjectProperties extends BuildProperties implements IBuildObje
if (type != null) {
IBuildPropertyValue values[] = type.getSupportedValues();
if (fRestriction != null && values.length != 0) {
- List<IBuildPropertyValue> list = new ArrayList<IBuildPropertyValue>(values.length);
+ List<IBuildPropertyValue> list = new ArrayList<>(values.length);
for (IBuildPropertyValue value : values) {
if (fRestriction.supportsValue(type.getId(), value.getId()))
list.add(value);
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/BuildSettingsUtil.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/BuildSettingsUtil.java
index bd60d8b5f3..d3049dacc0 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/BuildSettingsUtil.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/BuildSettingsUtil.java
@@ -68,7 +68,7 @@ public class BuildSettingsUtil {
public static ITool[] getDependentTools(IConfiguration cfg, ITool tool) {
IResourceInfo rcInfos[] = cfg.getResourceInfos();
- List<ITool> list = new ArrayList<ITool>();
+ List<ITool> list = new ArrayList<>();
for (int i = 0; i < rcInfos.length; i++) {
calcDependentTools(rcInfos[i], tool, list);
}
@@ -81,7 +81,7 @@ public class BuildSettingsUtil {
public static List<ITool> calcDependentTools(ITool tools[], ITool tool, List<ITool> list) {
if (list == null)
- list = new ArrayList<ITool>();
+ list = new ArrayList<>();
for (int i = 0; i < tools.length; i++) {
ITool superTool = tools[i];
@@ -98,7 +98,7 @@ public class BuildSettingsUtil {
public static void copyCommonSettings(ITool fromTool, ITool toTool) {
Tool fromT = (Tool) fromTool;
Tool toT = (Tool) toTool;
- List<OptionStringValue> values = new ArrayList<OptionStringValue>();
+ List<OptionStringValue> values = new ArrayList<>();
for (int i = 0; i < COMMON_SETTINGS_IDS.length; i++) {
int type = COMMON_SETTINGS_IDS[i];
IOption[] toOptions = toT.getOptionsOfType(type);
@@ -211,7 +211,7 @@ public class BuildSettingsUtil {
}
public static ITool[] getToolsBySuperClassId(ITool[] tools, String id) {
- List<ITool> retTools = new ArrayList<ITool>();
+ List<ITool> retTools = new ArrayList<>();
if (id != null) {
for (int i = 0; i < tools.length; i++) {
ITool targetTool = tools[i];
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Builder.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Builder.java
index dfd5c21252..7098f24baf 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Builder.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Builder.java
@@ -596,7 +596,7 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
if (entries.length == 0) {
outputEntries = new ICOutputEntry[0];
} else {
- List<ICSettingEntry> list = new ArrayList<ICSettingEntry>(entries.length);
+ List<ICSettingEntry> list = new ArrayList<>(entries.length);
for (int k = 0; k < entries.length; k++) {
if (entries[k].getKind() == ICLanguageSettingEntry.OUTPUT_PATH)
list.add(entries[k]);
@@ -815,7 +815,7 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
if (entries.length == 0) {
outputEntries = new ICOutputEntry[0];
} else {
- List<ICSettingEntry> list = new ArrayList<ICSettingEntry>(entries.length);
+ List<ICSettingEntry> list = new ArrayList<>(entries.length);
for (int k = 0; k < entries.length; k++) {
if (entries[k].getKind() == ICLanguageSettingEntry.OUTPUT_PATH)
list.add(entries[k]);
@@ -1276,7 +1276,7 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
errorParsers = new String[0];
} else {
StringTokenizer tok = new StringTokenizer(parserIDs, ";"); //$NON-NLS-1$
- List<String> list = new ArrayList<String>(tok.countTokens());
+ List<String> list = new ArrayList<>(tok.countTokens());
while (tok.hasMoreElements()) {
list.add(tok.nextToken());
}
@@ -2356,14 +2356,14 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
private Map<String, String> getCustomBuildPropertiesMap() {
if (customBuildProperties == null) {
- customBuildProperties = new HashMap<String, String>();
+ customBuildProperties = new HashMap<>();
}
return customBuildProperties;
}
@Override
public void setEnvironment(Map<String, String> env) throws CoreException {
- customizedEnvironment = new HashMap<String, String>(env);
+ customizedEnvironment = new HashMap<>(env);
}
@Override
@@ -2473,7 +2473,7 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
return null;
if (!isExtensionBuilder)
return null;
- return new MatchKey<Builder>(this);
+ return new MatchKey<>(this);
}
@Override
@@ -2667,7 +2667,7 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
public Set<String> contributeErrorParsers(Set<String> set) {
if (getErrorParserIds() != null) {
if (set == null)
- set = new HashSet<String>();
+ set = new HashSet<>();
String ids[] = getErrorParserList();
if (ids.length != 0)
@@ -2683,7 +2683,7 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
void removeErrorParsers(Set<String> set) {
Set<String> oldSet = contributeErrorParsers(null);
if (oldSet == null)
- oldSet = new HashSet<String>();
+ oldSet = new HashSet<>();
oldSet.removeAll(set);
setErrorParserList(oldSet.toArray(new String[oldSet.size()]));
}
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/BuilderFactory.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/BuilderFactory.java
index 65d7f4de7f..2c41e08b8a 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/BuilderFactory.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/BuilderFactory.java
@@ -160,7 +160,7 @@ public class BuilderFactory {
}
public static Map<String, String> createBuildArgs(IConfiguration cfgs[]) {
- Map<String, String> map = new HashMap<String, String>();
+ Map<String, String> map = new HashMap<>();
cfgsToMap(cfgs, map);
map.put(CONTENTS, CONTENTS_CONFIGURATION_IDS);
return map;
@@ -195,7 +195,7 @@ public class BuilderFactory {
}
private static IConfiguration[] idsToConfigurations(String ids[], IConfiguration allCfgs[]) {
- List<IConfiguration> list = new ArrayList<IConfiguration>(ids.length);
+ List<IConfiguration> list = new ArrayList<>(ids.length);
for (int i = 0; i < ids.length; i++) {
String id = ids[i];
for (int j = 0; j < allCfgs.length; j++) {
@@ -379,7 +379,7 @@ public class BuilderFactory {
} else if (CONTENTS_BUILDER.equals(type)) {
IConfiguration cfgs[] = configsFromMap(args, info);
if (cfgs.length != 0) {
- List<IBuilder> list = new ArrayList<IBuilder>(cfgs.length);
+ List<IBuilder> list = new ArrayList<>(cfgs.length);
for (int i = 0; i < cfgs.length; i++) {
IBuilder builder = createBuilder(cfgs[i], args, false);
if (builder != null)
@@ -391,7 +391,7 @@ public class BuilderFactory {
} else if (CONTENTS_CONFIGURATION_IDS.equals(type)) {
IConfiguration cfgs[] = configsFromMap(args, info);
if (cfgs.length != 0) {
- List<IBuilder> list = new ArrayList<IBuilder>(cfgs.length);
+ List<IBuilder> list = new ArrayList<>(cfgs.length);
for (int i = 0; i < cfgs.length; i++) {
list.add(cfgs[i].getEditableBuilder());
}
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/CommonBuilder.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/CommonBuilder.java
index dc69cbb60c..955f82cbd7 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/CommonBuilder.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/CommonBuilder.java
@@ -116,12 +116,12 @@ public class CommonBuilder extends ACBuilder {
}
private static class CfgBuildSet {
- Map<IProject, Set<String>> fMap = new HashMap<IProject, Set<String>>();
+ Map<IProject, Set<String>> fMap = new HashMap<>();
public Set<String> getCfgIdSet(IProject project, boolean create) {
Set<String> set = fMap.get(project);
if (set == null && create) {
- set = new HashSet<String>();
+ set = new HashSet<>();
fMap.put(project, set);
}
return set;
@@ -326,7 +326,7 @@ public class CommonBuilder extends ACBuilder {
};
OtherConfigVerifier(IBuilder builders[], IConfiguration allCfgs[]) {
- Set<IConfiguration> buildCfgSet = new HashSet<IConfiguration>();
+ Set<IConfiguration> buildCfgSet = new HashSet<>();
for (IBuilder builder : builders) {
buildCfgSet.add(builder.getParent().getParent());
}
@@ -337,7 +337,7 @@ public class CommonBuilder extends ACBuilder {
else
otherConfigs = new Configuration[0];
- List<IPath> list = new ArrayList<IPath>(builders.length);
+ List<IPath> list = new ArrayList<>(builders.length);
// buildFullPaths = new IPath[builders.length];
for (IBuilder builder : builders) {
IPath path = ManagedBuildManager.getBuildFullPath(builder.getParent().getParent(), builder);
@@ -565,7 +565,7 @@ public class CommonBuilder extends ACBuilder {
}
private IConfiguration[] filterConfigsToBuild(IConfiguration[] cfgs) {
- List<IConfiguration> cfgList = new ArrayList<IConfiguration>(cfgs.length);
+ List<IConfiguration> cfgList = new ArrayList<>(cfgs.length);
for (IConfiguration cfg : cfgs) {
IProject project = cfg.getOwner().getProject();
Set<String> set = fBuildSet.getCfgIdSet(project, true);
@@ -593,7 +593,7 @@ public class CommonBuilder extends ACBuilder {
}
private IConfiguration[] getReferencedConfigs(IBuilder[] builders) {
- Set<IConfiguration> set = new HashSet<IConfiguration>();
+ Set<IConfiguration> set = new HashSet<>();
for (IBuilder builder : builders) {
IConfiguration cfg = builder.getParent().getParent();
IConfiguration refs[] = ManagedBuildManager.getReferencedConfigurations(cfg);
@@ -606,9 +606,9 @@ public class CommonBuilder extends ACBuilder {
private Set<IProject> getProjectsSet(IConfiguration[] cfgs) {
if (cfgs.length == 0)
- return new HashSet<IProject>(0);
+ return new HashSet<>(0);
- Set<IProject> set = new HashSet<IProject>();
+ Set<IProject> set = new HashSet<>();
for (IConfiguration cfg : cfgs) {
set.add(cfg.getOwner().getProject());
}
@@ -664,7 +664,7 @@ public class CommonBuilder extends ACBuilder {
private final boolean fManagedBuildOn;
private boolean fRebuild;
private boolean fBuild = true;
- private final List<String> fConsoleMessages = new ArrayList<String>();
+ private final List<String> fConsoleMessages = new ArrayList<>();
private IManagedBuilderMakefileGenerator fMakeGen;
public BuildStatus(IBuilder builder) {
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Configuration.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Configuration.java
index 6243e28dd7..a6fb4c7d96 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Configuration.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Configuration.java
@@ -229,8 +229,8 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
// Load the children
IManagedConfigElement[] configElements = element.getChildren();
- List<IPath> srcPathList = new ArrayList<IPath>();
- excludeList = new ArrayList<IPath>();
+ List<IPath> srcPathList = new ArrayList<>();
+ excludeList = new ArrayList<>();
for (int l = 0; l < configElements.length; ++l) {
IManagedConfigElement configElement = configElements[l];
if (configElement.getName().equals(IToolChain.TOOL_CHAIN_ELEMENT_NAME)) {
@@ -315,7 +315,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
return curEntries;
int pathSize = pathList.size();
- Map<IPath, ICSourceEntry> map = new LinkedHashMap<IPath, ICSourceEntry>();
+ Map<IPath, ICSourceEntry> map = new LinkedHashMap<>();
for (int i = 0; i < pathSize; i++) {
IPath path = pathList.get(i);
@@ -416,8 +416,8 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
managedProject.addConfiguration(this);
ICStorageElement configElements[] = element.getChildren();
- List<IPath> srcPathList = new ArrayList<IPath>();
- excludeList = new ArrayList<IPath>();
+ List<IPath> srcPathList = new ArrayList<>();
+ excludeList = new ArrayList<>();
for (int i = 0; i < configElements.length; ++i) {
ICStorageElement configElement = configElements[i];
if (configElement.getName().equals(IToolChain.TOOL_CHAIN_ELEMENT_NAME)) {
@@ -690,7 +690,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
boolean copyIds = cloneConfig.getId().equals(id);
String subId;
// Resource Configurations
- Map<IPath, Map<String, String>> toolIdMap = new HashMap<IPath, Map<String, String>>();
+ Map<IPath, Map<String, String>> toolIdMap = new HashMap<>();
IResourceInfo infos[] = cloneConfig.rcInfos.getResourceInfos();
for (int i = 0; i < infos.length; i++) {
if (infos[i] instanceof FolderInfo) {
@@ -1356,7 +1356,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
String parserIDs = getErrorParserIdsAttribute();
if (parserIDs != null) {
if (set == null)
- set = new LinkedHashSet<String>();
+ set = new LinkedHashSet<>();
if (parserIDs.length() != 0) {
StringTokenizer tok = new StringTokenizer(parserIDs, ";"); //$NON-NLS-1$
while (tok.hasMoreElements()) {
@@ -1399,7 +1399,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
if (defaultLanguageSettingsProviderIds == null) {
defaultLanguageSettingsProvidersAttribute = getDefaultLanguageSettingsProvidersAttribute();
if (defaultLanguageSettingsProvidersAttribute != null) {
- List<String> ids = new ArrayList<String>();
+ List<String> ids = new ArrayList<>();
String[] defaultIds = defaultLanguageSettingsProvidersAttribute
.split(LANGUAGE_SETTINGS_PROVIDER_DELIMITER);
for (String id : defaultIds) {
@@ -1466,7 +1466,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
ICSettingEntry[] libs = CDataUtil.resolveEntries(unresolved, des);
if (libs.length > 0) {
for (ICExternalSetting setting : des.getExternalSettings()) {
- Set<ICSettingEntry> entries = new LinkedHashSet<ICSettingEntry>(
+ Set<ICSettingEntry> entries = new LinkedHashSet<>(
Arrays.asList(setting.getEntries()));
for (ICSettingEntry lib : libs) {
if (entries.contains(lib)) {
@@ -2374,7 +2374,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
if (set != null && set.isEmpty()) {
Set<String> oldSet = contributeErrorParsers(null, false);
if (oldSet == null)
- oldSet = new LinkedHashSet<String>();
+ oldSet = new LinkedHashSet<>();
oldSet.removeAll(set);
setErrorParserAttribute(oldSet.toArray(new String[oldSet.size()]));
@@ -2589,7 +2589,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
@Override
public String[] getUserObjects(String extension) {
- Vector<String> objs = new Vector<String>();
+ Vector<String> objs = new Vector<>();
ITool tool = calculateTargetTool();
if (tool == null)
tool = getToolFromOutputExtension(extension);
@@ -2630,7 +2630,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
@Override
public String[] getLibs(String extension) {
- Vector<String> libs = new Vector<String>();
+ Vector<String> libs = new Vector<>();
ITool tool = calculateTargetTool();
if (tool == null)
tool = getToolFromOutputExtension(extension);
@@ -2721,7 +2721,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
ICOutputEntry entries[] = getConfigurationData().getBuildData().getOutputDirectories();
IPath path = getOwner().getFullPath();
- List<ICSettingEntry> list = new ArrayList<ICSettingEntry>(entries.length + 1);
+ List<ICSettingEntry> list = new ArrayList<>(entries.length + 1);
// Add project level include path
list.add(CDataUtil.createCIncludePathEntry(path.toString(), ICSettingEntry.VALUE_WORKSPACE_PATH));
@@ -2816,7 +2816,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
@Override
public String[] getRequiredTypeIds() {
SupportedProperties props = findSupportedProperties();
- List<String> list = new ArrayList<String>();
+ List<String> list = new ArrayList<>();
if (props != null) {
list.addAll(Arrays.asList(props.getRequiredTypeIds()));
}
@@ -2829,7 +2829,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
@Override
public String[] getSupportedTypeIds() {
SupportedProperties props = findSupportedProperties();
- List<String> list = new ArrayList<String>();
+ List<String> list = new ArrayList<>();
if (props != null) {
list.addAll(Arrays.asList(props.getSupportedTypeIds()));
}
@@ -2842,7 +2842,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
@Override
public String[] getSupportedValueIds(String typeId) {
SupportedProperties props = findSupportedProperties();
- List<String> list = new ArrayList<String>();
+ List<String> list = new ArrayList<>();
if (props != null) {
list.addAll(Arrays.asList(props.getSupportedValueIds(typeId)));
}
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ConfigurationV2.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ConfigurationV2.java
index 6ca2cd399d..9d8bf21c76 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ConfigurationV2.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ConfigurationV2.java
@@ -112,7 +112,7 @@ public class ConfigurationV2 extends BuildObject implements IConfigurationV2 {
IProject project = (IProject) target.getOwner();
// Get the tool references from the target and parent
- List<IToolReference> allToolRefs = new Vector<IToolReference>(target.getLocalToolReferences());
+ List<IToolReference> allToolRefs = new Vector<>(target.getLocalToolReferences());
allToolRefs.addAll(((ConfigurationV2) parentConfig).getLocalToolReferences());
for (IToolReference toolRef : allToolRefs) {
// Make a new ToolReference based on the tool in the ref
@@ -300,7 +300,7 @@ public class ConfigurationV2 extends BuildObject implements IConfigurationV2 {
@Override
public ITool[] getFilteredTools(IProject project) {
ITool[] localTools = getTools();
- Vector<ITool> tools = new Vector<ITool>(localTools.length);
+ Vector<ITool> tools = new Vector<>(localTools.length);
for (ITool tool : localTools) {
try {
// Make sure the tool is right for the project
@@ -339,7 +339,7 @@ public class ConfigurationV2 extends BuildObject implements IConfigurationV2 {
*/
protected List<IToolReference> getLocalToolReferences() {
if (toolReferences == null) {
- toolReferences = new ArrayList<IToolReference>();
+ toolReferences = new ArrayList<>();
}
return toolReferences;
}
@@ -362,7 +362,7 @@ public class ConfigurationV2 extends BuildObject implements IConfigurationV2 {
// Validate that the tools correspond to the nature
IProject project = (IProject) target.getOwner();
if (project != null) {
- List<ITool> validTools = new ArrayList<ITool>();
+ List<ITool> validTools = new ArrayList<>();
// The target is associated with a real project
for (int i = 0; i < tools.length; ++i) {
@@ -448,7 +448,7 @@ public class ConfigurationV2 extends BuildObject implements IConfigurationV2 {
* @return List
*/
protected List<OptionReference> getOptionReferences(ITool tool) {
- List<OptionReference> references = new ArrayList<OptionReference>();
+ List<OptionReference> references = new ArrayList<>();
// Get all the option references I add for this tool
IToolReference toolRef = getToolReference(tool);
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ConverterInfo.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ConverterInfo.java
index 9dd1e8dbd3..2392d62a2e 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ConverterInfo.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ConverterInfo.java
@@ -51,9 +51,9 @@ public class ConverterInfo {
IConfiguration[] cfgs = mProj.getConfigurations();
fConvertedFromObject = ManagedBuildManager.convert(fFromObject, fToObject.getId(), true);
IConfiguration[] updatedCfgs = mProj.getConfigurations();
- Set<IConfiguration> oldSet = new HashSet<IConfiguration>(Arrays.asList(cfgs));
- Set<IConfiguration> updatedSet = new HashSet<IConfiguration>(Arrays.asList(updatedCfgs));
- Set<IConfiguration> oldSetCopy = new HashSet<IConfiguration>(oldSet);
+ Set<IConfiguration> oldSet = new HashSet<>(Arrays.asList(cfgs));
+ Set<IConfiguration> updatedSet = new HashSet<>(Arrays.asList(updatedCfgs));
+ Set<IConfiguration> oldSetCopy = new HashSet<>(oldSet);
oldSet.removeAll(updatedSet);
updatedSet.removeAll(oldSetCopy);
if (updatedSet.size() != 0)
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/FolderInfo.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/FolderInfo.java
index 387702382b..eab243cf57 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/FolderInfo.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/FolderInfo.java
@@ -286,7 +286,7 @@ public class FolderInfo extends ResourceInfo implements IFolderInfo {
return localTools;
}
IProject project = (IProject) manProj.getOwner();
- Vector<Tool> tools = new Vector<Tool>(localTools.length);
+ Vector<Tool> tools = new Vector<>(localTools.length);
for (ITool t : localTools) {
Tool tool = (Tool) t;
if (!tool.isEnabled(this))
@@ -432,7 +432,7 @@ public class FolderInfo extends ResourceInfo implements IFolderInfo {
@Override
public CLanguageData[] getCLanguageDatas() {
- List<CLanguageData> list = new ArrayList<CLanguageData>();
+ List<CLanguageData> list = new ArrayList<>();
for (ITool t : getFilteredTools())
for (CLanguageData d : t.getCLanguageDatas())
list.add(d);
@@ -488,7 +488,7 @@ public class FolderInfo extends ResourceInfo implements IFolderInfo {
}
private Map<String, String> typeIdsToMap(String[] ids, IBuildObjectProperties props) {
- Map<String, String> map = new HashMap<String, String>(ids.length);
+ Map<String, String> map = new HashMap<>(ids.length);
for (String id : ids) {
IBuildProperty prop = props.getProperty(id);
map.put(id, prop.getValue().getId());
@@ -497,7 +497,7 @@ public class FolderInfo extends ResourceInfo implements IFolderInfo {
}
private Map<String, String> propsToMap(IBuildProperty props[]) {
- Map<String, String> map = new HashMap<String, String>(props.length);
+ Map<String, String> map = new HashMap<>(props.length);
for (IBuildProperty p : props)
map.put(p.getPropertyType().getId(), p.getValue().getId());
return map;
@@ -591,7 +591,7 @@ public class FolderInfo extends ResourceInfo implements IFolderInfo {
@Override
public String[] getRequiredTypeIds() {
- List<String> list = new ArrayList<String>();
+ List<String> list = new ArrayList<>();
list.addAll(Arrays.asList(tc.getRequiredTypeIds(false)));
@@ -604,7 +604,7 @@ public class FolderInfo extends ResourceInfo implements IFolderInfo {
@Override
public String[] getSupportedTypeIds() {
- List<String> list = new ArrayList<String>();
+ List<String> list = new ArrayList<>();
list.addAll(Arrays.asList(tc.getSupportedTypeIds(false)));
@@ -617,7 +617,7 @@ public class FolderInfo extends ResourceInfo implements IFolderInfo {
@Override
public String[] getSupportedValueIds(String typeId) {
- List<String> list = new ArrayList<String>();
+ List<String> list = new ArrayList<>();
list.addAll(Arrays.asList(tc.getSupportedValueIds(typeId, false)));
@@ -651,9 +651,9 @@ public class FolderInfo extends ResourceInfo implements IFolderInfo {
}
public boolean isPropertiesModificationCompatible(IToolChain tc) {
- Map<String, String> requiredMap = new HashMap<String, String>();
- Map<String, String> unsupportedMap = new HashMap<String, String>();
- Set<String> undefinedSet = new HashSet<String>();
+ Map<String, String> requiredMap = new HashMap<>();
+ Map<String, String> unsupportedMap = new HashMap<>();
+ Set<String> undefinedSet = new HashSet<>();
if (!checkPropertiesModificationCompatibility(tc, requiredMap, unsupportedMap, undefinedSet))
return false;
return true;
@@ -661,7 +661,7 @@ public class FolderInfo extends ResourceInfo implements IFolderInfo {
private Set<String> getRequiredUnspecifiedProperties() {
IBuildObjectProperties props = null;
- Set<String> set = new HashSet<String>();
+ Set<String> set = new HashSet<>();
IConfiguration cfg = getParent();
if (cfg != null)
@@ -799,8 +799,8 @@ public class FolderInfo extends ResourceInfo implements IFolderInfo {
}
private ITool[][] getBestMatches(ITool[] tools1, ITool[] tools2) {
- HashSet<ITool> set = new HashSet<ITool>(Arrays.asList(tools2));
- List<ITool[]> list = new ArrayList<ITool[]>(tools1.length);
+ HashSet<ITool> set = new HashSet<>(Arrays.asList(tools2));
+ List<ITool[]> list = new ArrayList<>(tools1.length);
for (ITool tool1 : tools1) {
ITool bestMatchTool = null;
int num = 0;
@@ -919,7 +919,7 @@ public class FolderInfo extends ResourceInfo implements IFolderInfo {
}
private LinkedHashMap<Object, ITool> createRealToExtToolMap(ITool[] tools, boolean extValues) {
- LinkedHashMap<Object, ITool> map = new LinkedHashMap<Object, ITool>();
+ LinkedHashMap<Object, ITool> map = new LinkedHashMap<>();
for (ITool t : tools) {
Tool realTool = (Tool) ManagedBuildManager.getRealTool(t);
MatchKey<Tool> key = realTool.getMatchKey();
@@ -993,7 +993,7 @@ public class FolderInfo extends ResourceInfo implements IFolderInfo {
if (!isRoot())
return;
- Set<String> set = new HashSet<String>();
+ Set<String> set = new HashSet<>();
String[] ids = toolChain.getTargetToolList();
boolean targetToolsModified = false;
set.addAll(Arrays.asList(ids));
@@ -1031,7 +1031,7 @@ public class FolderInfo extends ResourceInfo implements IFolderInfo {
private ITool findCompatibleTargetTool(ITool tool, ITool allTools[]) {
IProject project = getParent().getOwner().getProject();
String exts[] = ((Tool) tool).getAllOutputExtensions(project);
- Set<String> extsSet = new HashSet<String>(Arrays.asList(exts));
+ Set<String> extsSet = new HashSet<>(Arrays.asList(exts));
ITool compatibleTool = null;
for (ITool t : allTools) {
String otherExts[] = ((Tool) t).getAllOutputExtensions(project);
@@ -1068,7 +1068,7 @@ public class FolderInfo extends ResourceInfo implements IFolderInfo {
}
private Set<String> getToolOutputVars(ITool tool) {
- Set<String> set = new HashSet<String>();
+ Set<String> set = new HashSet<>();
IOutputType types[] = tool.getOutputTypes();
for (IOutputType type : types) {
@@ -1163,14 +1163,14 @@ public class FolderInfo extends ResourceInfo implements IFolderInfo {
@SuppressWarnings("unchecked")
private ITool[][] calculateConflictingTools(ITool[] newTools) {
- HashSet<ITool> set = new HashSet<ITool>();
+ HashSet<ITool> set = new HashSet<>();
set.addAll(Arrays.asList(newTools));
- List<ITool[]> result = new ArrayList<ITool[]>();
+ List<ITool[]> result = new ArrayList<>();
for (Iterator<ITool> iter = set.iterator(); iter.hasNext();) {
ITool t = iter.next();
iter.remove();
HashSet<ITool> tmp = (HashSet<ITool>) set.clone();
- List<ITool> list = new ArrayList<ITool>();
+ List<ITool> list = new ArrayList<>();
for (Iterator<ITool> tmpIt = tmp.iterator(); tmpIt.hasNext();) {
ITool other = tmpIt.next();
String conflicts[] = getConflictingInputExts(t, other);
@@ -1195,8 +1195,8 @@ public class FolderInfo extends ResourceInfo implements IFolderInfo {
IProject project = getParent().getOwner().getProject();
String ext1[] = ((Tool) tool1).getAllInputExtensions(project);
String ext2[] = ((Tool) tool2).getAllInputExtensions(project);
- Set<String> set1 = new HashSet<String>(Arrays.asList(ext1));
- Set<String> result = new HashSet<String>();
+ Set<String> set1 = new HashSet<>(Arrays.asList(ext1));
+ Set<String> result = new HashSet<>();
for (String e : ext2) {
if (set1.remove(e))
result.add(e);
@@ -1211,13 +1211,13 @@ public class FolderInfo extends ResourceInfo implements IFolderInfo {
added = checked[1];
ITool newTools[] = calculateToolsArray(removed, added);
ITool[][] conflicting = calculateConflictingTools(filterTools(newTools, getParent().getManagedProject()));
- Map<String, String> unspecifiedRequiredProps = new HashMap<String, String>();
- Map<String, String> unspecifiedProps = new HashMap<String, String>();
- Set<String> undefinedSet = new HashSet<String>();
+ Map<String, String> unspecifiedRequiredProps = new HashMap<>();
+ Map<String, String> unspecifiedProps = new HashMap<>();
+ Set<String> undefinedSet = new HashSet<>();
IConfiguration cfg = getParent();
ITool[] nonManagedTools = null;
if (cfg.isManagedBuildOn() && cfg.supportsBuild(true)) {
- List<ITool> list = new ArrayList<ITool>();
+ List<ITool> list = new ArrayList<>();
for (ITool t : newTools)
if (!t.supportsBuild(true))
list.add(t);
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/GeneratedMakefileBuilder.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/GeneratedMakefileBuilder.java
index 1d0120df98..64ac3c306d 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/GeneratedMakefileBuilder.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/GeneratedMakefileBuilder.java
@@ -765,7 +765,7 @@ public class GeneratedMakefileBuilder extends ACBuilder {
*/
private Vector<IStatus> getGenerationProblems() {
if (generationProblems == null) {
- generationProblems = new Vector<IStatus>();
+ generationProblems = new Vector<>();
}
return generationProblems;
}
@@ -778,7 +778,7 @@ public class GeneratedMakefileBuilder extends ACBuilder {
* @return
*/
protected String[] getMakeTargets(int buildType) {
- List<String> args = new ArrayList<String>();
+ List<String> args = new ArrayList<>();
switch (buildType) {
case CLEAN_BUILD:
args.add("clean"); //$NON-NLS-1$
@@ -793,7 +793,7 @@ public class GeneratedMakefileBuilder extends ACBuilder {
protected List<IResource> getResourcesToBuild() {
if (resourcesToBuild == null) {
- resourcesToBuild = new ArrayList<IResource>();
+ resourcesToBuild = new ArrayList<>();
}
return resourcesToBuild;
}
@@ -981,7 +981,7 @@ public class GeneratedMakefileBuilder extends ACBuilder {
IBuildEnvironmentVariable variables[] = ManagedBuildManager.getEnvironmentVariableProvider()
.getVariables(cfg, true, true);
String[] envp = null;
- ArrayList<String> envList = new ArrayList<String>();
+ ArrayList<String> envList = new ArrayList<>();
if (variables != null) {
for (int i = 0; i < variables.length; i++) {
envList.add(variables[i].getName() + "=" + variables[i].getValue()); //$NON-NLS-1$
@@ -998,7 +998,7 @@ public class GeneratedMakefileBuilder extends ACBuilder {
OutputStream epmOutputStream = epm.getOutputStream();
// Get the arguments to be passed to make from build model
- ArrayList<String> makeArgs = new ArrayList<String>();
+ ArrayList<String> makeArgs = new ArrayList<>();
String arg = info.getBuildArguments();
if (arg.length() > 0) {
String[] args = arg.split("\\s"); //$NON-NLS-1$
@@ -1389,12 +1389,12 @@ public class GeneratedMakefileBuilder extends ACBuilder {
}
private Map<IProject, List<IFile>> arrangeFilesByProject(List<IFile> files) {
- Map<IProject, List<IFile>> projectMap = new HashMap<IProject, List<IFile>>();
+ Map<IProject, List<IFile>> projectMap = new HashMap<>();
for (IFile file : files) {
IProject project = file.getProject();
List<IFile> filesInProject = projectMap.get(project);
if (filesInProject == null) {
- filesInProject = new ArrayList<IFile>();
+ filesInProject = new ArrayList<>();
projectMap.put(project, filesInProject);
}
filesInProject.add(file);
@@ -1483,7 +1483,7 @@ public class GeneratedMakefileBuilder extends ACBuilder {
try {
IBuildResource buildResource = des.getBuildResource(file);
- Set<IBuildStep> dependentSteps = new HashSet<IBuildStep>();
+ Set<IBuildStep> dependentSteps = new HashSet<>();
IBuildIOType depTypes[] = buildResource.getDependentIOTypes();
for (IBuildIOType btype : depTypes) {
if (btype != null && btype.getStep() != null)
@@ -1624,7 +1624,7 @@ public class GeneratedMakefileBuilder extends ACBuilder {
try {
IBuildResource buildResource = des.getBuildResource(file);
if (buildResource != null) {
- Set<IBuildStep> dependentSteps = new HashSet<IBuildStep>();
+ Set<IBuildStep> dependentSteps = new HashSet<>();
IBuildIOType depTypes[] = buildResource.getDependentIOTypes();
for (IBuildIOType btype : depTypes) {
if (btype != null && btype.getStep() != null)
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/HeadlessBuilder.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/HeadlessBuilder.java
index 6897e6d621..a23612c389 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/HeadlessBuilder.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/HeadlessBuilder.java
@@ -176,21 +176,21 @@ public class HeadlessBuilder implements IApplication {
public static final Integer OK = IApplication.EXIT_OK;
/** Set of project URIs / paths to import */
- protected final Set<String> projectsToImport = new HashSet<String>();
+ protected final Set<String> projectsToImport = new HashSet<>();
/** Tree of projects to recursively import */
- protected final Set<String> projectTreeToImport = new HashSet<String>();
+ protected final Set<String> projectTreeToImport = new HashSet<>();
/** Set of project names to build */
- protected final Set<String> projectRegExToBuild = new HashSet<String>();
+ protected final Set<String> projectRegExToBuild = new HashSet<>();
/** Set of project names to clean */
- protected final Set<String> projectRegExToClean = new HashSet<String>();
+ protected final Set<String> projectRegExToClean = new HashSet<>();
protected boolean buildAll = false;
protected boolean cleanAll = false;
protected boolean disableIndexer = false;
/** List of Tool Option values being set */
- protected List<ToolOption> toolOptions = new ArrayList<ToolOption>();
+ protected List<ToolOption> toolOptions = new ArrayList<>();
/** Map from configuration ID -> Set of SavedToolOptions */
- protected Map<String, Set<SavedToolOption>> savedToolOptions = new HashMap<String, Set<SavedToolOption>>();
+ protected Map<String, Set<SavedToolOption>> savedToolOptions = new HashMap<>();
protected boolean markerTypesDefault = true;
protected boolean markerTypesAll = false;
protected Set<String> markerTypes = new HashSet<>();
@@ -245,7 +245,7 @@ public class HeadlessBuilder implements IApplication {
// Build this configuration for this project
Set<ICConfigurationDescription> set = cfgMap.get(project);
if (set == null)
- set = new HashSet<ICConfigurationDescription>();
+ set = new HashSet<>();
set.add(cfg);
cfgMap.put(project, set);
}
@@ -499,7 +499,7 @@ public class HeadlessBuilder implements IApplication {
IProject[] allProjects = root.getProjects();
// Map from Project -> Configurations to build. We also Build all projects which are clean'd
- Map<IProject, Set<ICConfigurationDescription>> configsToBuild = new HashMap<IProject, Set<ICConfigurationDescription>>();
+ Map<IProject, Set<ICConfigurationDescription>> configsToBuild = new HashMap<>();
/*
* Perform the Clean / Build
@@ -845,7 +845,7 @@ public class HeadlessBuilder implements IApplication {
case IOption.UNDEF_LIBRARY_PATHS:
case IOption.UNDEF_LIBRARY_FILES:
case IOption.UNDEF_MACRO_FILES:
- List<String> listValue = new ArrayList<String>();
+ List<String> listValue = new ArrayList<>();
switch (toolOption.operation) {
case ToolOption.APPEND:
listValue.addAll((List<String>) option.getValue());
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/HeadlessBuilderExternalSettingsProvider.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/HeadlessBuilderExternalSettingsProvider.java
index d6c8af7843..0c06fe854c 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/HeadlessBuilderExternalSettingsProvider.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/HeadlessBuilderExternalSettingsProvider.java
@@ -39,7 +39,7 @@ public class HeadlessBuilderExternalSettingsProvider extends CExternalSettingPro
private static final String ID = "org.eclipse.cdt.managedbuilder.core.headlessSettings"; //$NON-NLS-1$
/** List of external settings which should be appended to build */
- static List<ICSettingEntry> additionalSettings = new ArrayList<ICSettingEntry>();
+ static List<ICSettingEntry> additionalSettings = new ArrayList<>();
public HeadlessBuilderExternalSettingsProvider() {
}
@@ -91,7 +91,7 @@ public class HeadlessBuilderExternalSettingsProvider extends CExternalSettingPro
if (desc == null)
continue;
for (ICConfigurationDescription cfg : desc.getConfigurations()) {
- ArrayList<String> extSettingIds = new ArrayList<String>(
+ ArrayList<String> extSettingIds = new ArrayList<>(
Arrays.asList(cfg.getExternalSettingsProviderIds()));
for (Iterator<String> it = extSettingIds.iterator(); it.hasNext();)
if (ID.equals(it.next()))
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/HoldsOptions.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/HoldsOptions.java
index 9ba47bae53..529eda5617 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/HoldsOptions.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/HoldsOptions.java
@@ -281,7 +281,7 @@ public abstract class HoldsOptions extends BuildObject
Map<String, IOption> map = null;
if (this.superClass == null) {
- map = new LinkedHashMap<String, IOption>(); // LinkedHashMap ensures we maintain option ordering
+ map = new LinkedHashMap<>(); // LinkedHashMap ensures we maintain option ordering
for (Option ourOpt : getOptionCollection()) {
if (ourOpt.isValid()) {
@@ -411,14 +411,14 @@ public abstract class HoldsOptions extends BuildObject
*/
private Vector<String> getCategoryIds() {
if (categoryIds == null) {
- categoryIds = new Vector<String>();
+ categoryIds = new Vector<>();
}
return categoryIds;
}
public void addChildCategory(IOptionCategory category) {
if (childOptionCategories == null)
- childOptionCategories = new ArrayList<IOptionCategory>();
+ childOptionCategories = new ArrayList<>();
childOptionCategories.add(category);
}
@@ -431,7 +431,7 @@ public abstract class HoldsOptions extends BuildObject
*/
private Map<String, IOptionCategory> getCategoryMap() {
if (categoryMap == null) {
- categoryMap = new HashMap<String, IOptionCategory>();
+ categoryMap = new HashMap<>();
}
return categoryMap;
}
@@ -452,7 +452,7 @@ public abstract class HoldsOptions extends BuildObject
*/
private Map<String, Option> getOptionMap() {
if (optionMap == null) {
- optionMap = new LinkedHashMap<String, Option>();
+ optionMap = new LinkedHashMap<>();
}
return optionMap;
}
@@ -718,7 +718,7 @@ public abstract class HoldsOptions extends BuildObject
@Override
public String[] getRequiredTypeIds() {
- List<String> list = new ArrayList<String>();
+ List<String> list = new ArrayList<>();
for (IOption op : getOptions())
list.addAll(Arrays.asList(((Option) op).getRequiredTypeIds()));
return list.toArray(new String[list.size()]);
@@ -726,7 +726,7 @@ public abstract class HoldsOptions extends BuildObject
@Override
public String[] getSupportedTypeIds() {
- List<String> list = new ArrayList<String>();
+ List<String> list = new ArrayList<>();
for (IOption op : getOptions())
list.addAll(Arrays.asList(((Option) op).getSupportedTypeIds()));
return list.toArray(new String[list.size()]);
@@ -734,7 +734,7 @@ public abstract class HoldsOptions extends BuildObject
@Override
public String[] getSupportedValueIds(String typeId) {
- List<String> list = new ArrayList<String>();
+ List<String> list = new ArrayList<>();
for (IOption op : getOptions())
list.addAll(Arrays.asList(((Option) op).getSupportedValueIds(typeId)));
return list.toArray(new String[list.size()]);
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/InputType.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/InputType.java
index 895dd6ac90..843b7c3852 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/InputType.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/InputType.java
@@ -325,7 +325,7 @@ public class InputType extends BuildObject implements IInputType {
superClassId = SafeStringInterner.safeIntern(element.getAttribute(IProjectType.SUPERCLASS));
// sourceContentType
- List<String> list = new ArrayList<String>();
+ List<String> list = new ArrayList<>();
String ids = element.getAttribute(IInputType.SOURCE_CONTENT_TYPE);
if (ids != null) {
StringTokenizer tokenizer = new StringTokenizer(ids, DEFAULT_SEPARATOR);
@@ -456,7 +456,7 @@ public class InputType extends BuildObject implements IInputType {
// sourceContentType
IContentTypeManager manager = Platform.getContentTypeManager();
- List<String> list = new ArrayList<String>();
+ List<String> list = new ArrayList<>();
if (element.getAttribute(IInputType.SOURCE_CONTENT_TYPE) != null) {
String ids = element.getAttribute(IInputType.SOURCE_CONTENT_TYPE);
if (ids != null) {
@@ -471,7 +471,7 @@ public class InputType extends BuildObject implements IInputType {
}
if (sourceContentTypeIds != null) {
- List<IContentType> types = new ArrayList<IContentType>();
+ List<IContentType> types = new ArrayList<>();
for (String sourceContentTypeId : sourceContentTypeIds) {
IContentType type = manager.getContentType(sourceContentTypeId);
if (type != null)
@@ -869,7 +869,7 @@ public class InputType extends BuildObject implements IInputType {
*/
@Override
public IPath[] getAdditionalDependencies() {
- List<IPath> deps = new ArrayList<IPath>();
+ List<IPath> deps = new ArrayList<>();
for (AdditionalInput additionalInput : getAdditionalInputList()) {
int kind = additionalInput.getKind();
if (kind == IAdditionalInput.KIND_ADDITIONAL_DEPENDENCY
@@ -892,7 +892,7 @@ public class InputType extends BuildObject implements IInputType {
*/
@Override
public IPath[] getAdditionalResources() {
- List<IPath> ins = new ArrayList<IPath>();
+ List<IPath> ins = new ArrayList<>();
for (AdditionalInput additionalInput : getAdditionalInputList()) {
int kind = additionalInput.getKind();
if (kind == IAdditionalInput.KIND_ADDITIONAL_INPUT
@@ -915,7 +915,7 @@ public class InputType extends BuildObject implements IInputType {
*/
private Vector<InputOrder> getInputOrderList() {
if (inputOrderList == null) {
- inputOrderList = new Vector<InputOrder>();
+ inputOrderList = new Vector<>();
}
return inputOrderList;
}
@@ -925,7 +925,7 @@ public class InputType extends BuildObject implements IInputType {
*/
private Vector<AdditionalInput> getAdditionalInputList() {
if (additionalInputList == null) {
- additionalInputList = new Vector<AdditionalInput>();
+ additionalInputList = new Vector<>();
}
return additionalInputList;
}
@@ -1023,7 +1023,7 @@ public class InputType extends BuildObject implements IInputType {
return superClass.getDependencyExtensionsAttribute();
} else {
if (dependencyExtensions == null) {
- dependencyExtensions = new ArrayList<String>();
+ dependencyExtensions = new ArrayList<>();
}
}
}
@@ -1096,7 +1096,7 @@ public class InputType extends BuildObject implements IInputType {
private List<String> getDependencyExtensionsList() {
if (dependencyExtensions == null) {
- dependencyExtensions = new ArrayList<String>();
+ dependencyExtensions = new ArrayList<>();
}
return dependencyExtensions;
}
@@ -1441,7 +1441,7 @@ public class InputType extends BuildObject implements IInputType {
setRebuildState(true);
}
} else {
- List<String> list = new ArrayList<String>();
+ List<String> list = new ArrayList<>();
StringTokenizer tokenizer = new StringTokenizer(extensions, DEFAULT_SEPARATOR);
while (tokenizer.hasMoreElements()) {
list.add(tokenizer.nextToken());
@@ -1480,7 +1480,7 @@ public class InputType extends BuildObject implements IInputType {
// Use content type if specified and registered with Eclipse
IContentType types[] = getSourceContentTypes();
if (types.length != 0) {
- List<String> list = new ArrayList<String>();
+ List<String> list = new ArrayList<>();
for (IContentType type : types) {
list.addAll(Arrays.asList(((Tool) tool).getContentTypeFileSpecs(type, project)));
}
@@ -1493,7 +1493,7 @@ public class InputType extends BuildObject implements IInputType {
public String[] getHeaderExtensions(ITool tool) {
IContentType types[] = getHeaderContentTypes();
if (types.length != 0) {
- List<String> list = new ArrayList<String>();
+ List<String> list = new ArrayList<>();
for (IContentType type : types) {
list.addAll(Arrays.asList(((Tool) tool).getContentTypeFileSpecs(type)));
}
@@ -1589,7 +1589,7 @@ public class InputType extends BuildObject implements IInputType {
// Resolve content types
IContentTypeManager manager = Platform.getContentTypeManager();
- List<IContentType> list = new ArrayList<IContentType>();
+ List<IContentType> list = new ArrayList<>();
if (sourceContentTypeIds != null) {
for (String sourceContentTypeId : sourceContentTypeIds) {
IContentType type = manager.getContentType(sourceContentTypeId);
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ManagedBuildInfo.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ManagedBuildInfo.java
index e61e834982..775664c148 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ManagedBuildInfo.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ManagedBuildInfo.java
@@ -212,7 +212,7 @@ public class ManagedBuildInfo implements IManagedBuildInfo, IScannerInfo {
*/
@Override
public String[] getConfigurationNames() {
- ArrayList<String> configNames = new ArrayList<String>();
+ ArrayList<String> configNames = new ArrayList<>();
IConfiguration[] configs = managedProject.getConfigurations();
for (int i = 0; i < configs.length; i++) {
IConfiguration configuration = configs[i];
@@ -384,7 +384,7 @@ public class ManagedBuildInfo implements IManagedBuildInfo, IScannerInfo {
private ArrayList<String> getIncludePathEntries() {
// Extract the resolved paths from the project (if any)
- ArrayList<String> paths = new ArrayList<String>();
+ ArrayList<String> paths = new ArrayList<>();
if (cProject != null) {
try {
IPathEntry[] entries = cProject.getResolvedPathEntries();
@@ -426,7 +426,7 @@ public class ManagedBuildInfo implements IManagedBuildInfo, IScannerInfo {
}
private HashMap<String, String> getMacroPathEntries() {
- HashMap<String, String> macros = new HashMap<String, String>();
+ HashMap<String, String> macros = new HashMap<>();
if (cProject != null) {
try {
IPathEntry[] entries = cProject.getResolvedPathEntries();
@@ -1003,7 +1003,7 @@ public class ManagedBuildInfo implements IManagedBuildInfo, IScannerInfo {
@Deprecated
private Map<String, ITarget> getTargetMap() {
if (targetMap == null) {
- targetMap = new HashMap<String, ITarget>();
+ targetMap = new HashMap<>();
}
return targetMap;
}
@@ -1016,7 +1016,7 @@ public class ManagedBuildInfo implements IManagedBuildInfo, IScannerInfo {
@Deprecated
public List<ITarget> getTargets() {
if (targetList == null) {
- targetList = new ArrayList<ITarget>();
+ targetList = new ArrayList<>();
}
return targetList;
}
@@ -1106,7 +1106,7 @@ public class ManagedBuildInfo implements IManagedBuildInfo, IScannerInfo {
* @return IPathEntry[]
*/
public IPathEntry[] getManagedBuildValues() {
- List<IPathEntry> entries = new ArrayList<IPathEntry>();
+ List<IPathEntry> entries = new ArrayList<>();
int i = 0;
IPathEntry[] a = getManagedBuildValues(IPathEntry.CDT_INCLUDE);
if (a != null) {
@@ -1131,7 +1131,7 @@ public class ManagedBuildInfo implements IManagedBuildInfo, IScannerInfo {
* @return IPathEntry[]
*/
public IPathEntry[] getManagedBuildBuiltIns() {
- List<IPathEntry> entries = new ArrayList<IPathEntry>();
+ List<IPathEntry> entries = new ArrayList<>();
int i = 0;
IPathEntry[] a = getManagedBuildBuiltIns(IPathEntry.CDT_INCLUDE);
if (a != null) {
@@ -1177,7 +1177,7 @@ public class ManagedBuildInfo implements IManagedBuildInfo, IScannerInfo {
* @return list of strings which contains all found values
*/
private List<IPathEntry> getOptionValues(int entryType, boolean builtIns) {
- List<IPathEntry> entries = new ArrayList<IPathEntry>();
+ List<IPathEntry> entries = new ArrayList<>();
IConfiguration cfg = getDefaultConfiguration();
// process config toolchain's options
@@ -1286,7 +1286,7 @@ public class ManagedBuildInfo implements IManagedBuildInfo, IScannerInfo {
protected List<IPathEntry> addPaths(List<IPathEntry> entries, String[] values, IPath resPath, int context,
Object obj, int type) {
if (values != null && values.length > 0) {
- List<String> list = new ArrayList<String>();
+ List<String> list = new ArrayList<>();
for (int k = 0; k < values.length; k++) {
processPath(list, values[k], context, obj);
}
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ManagedConfigStorageElement.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ManagedConfigStorageElement.java
index ea4832ffc5..966cf2d355 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ManagedConfigStorageElement.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ManagedConfigStorageElement.java
@@ -67,7 +67,7 @@ public class ManagedConfigStorageElement implements ICStorageElement {
if (fChildList == null && create) {
IManagedConfigElement children[] = fElement.getChildren();
- fChildList = new ArrayList<IManagedConfigElement>(children.length);
+ fChildList = new ArrayList<>(children.length);
fChildList.addAll(Arrays.asList(children));
}
return fChildList;
@@ -75,7 +75,7 @@ public class ManagedConfigStorageElement implements ICStorageElement {
@Override
public ICStorageElement[] getChildrenByName(String name) {
- List<ICStorageElement> children = new ArrayList<ICStorageElement>();
+ List<ICStorageElement> children = new ArrayList<>();
for (ICStorageElement child : getChildren())
if (name.equals(child.getName()))
children.add(child);
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ManagedProject.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ManagedProject.java
index af3928ac83..62f31b105d 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ManagedProject.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ManagedProject.java
@@ -418,7 +418,7 @@ public class ManagedProject extends BuildObject
*/
private Collection<Configuration> getConfigurationCollection() {
synchronized (configMap) {
- return new ArrayList<Configuration>(configMap.values());
+ return new ArrayList<>(configMap.values());
}
}
@@ -658,7 +658,7 @@ public class ManagedProject extends BuildObject
@Override
public String[] getRequiredTypeIds() {
- List<String> result = new ArrayList<String>();
+ List<String> result = new ArrayList<>();
IConfiguration cfgs[] = getConfigurations();
for (IConfiguration cfg : cfgs) {
result.addAll(Arrays.asList(((Configuration) cfg).getRequiredTypeIds()));
@@ -668,7 +668,7 @@ public class ManagedProject extends BuildObject
@Override
public String[] getSupportedTypeIds() {
- List<String> result = new ArrayList<String>();
+ List<String> result = new ArrayList<>();
IConfiguration cfgs[] = getConfigurations();
for (IConfiguration cfg : cfgs) {
result.addAll(Arrays.asList(((Configuration) cfg).getSupportedTypeIds()));
@@ -678,7 +678,7 @@ public class ManagedProject extends BuildObject
@Override
public String[] getSupportedValueIds(String typeId) {
- List<String> result = new ArrayList<String>();
+ List<String> result = new ArrayList<>();
IConfiguration cfgs[] = getConfigurations();
for (IConfiguration cfg : cfgs) {
result.addAll(Arrays.asList(((Configuration) cfg).getSupportedValueIds(typeId)));
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/MapStorageElement.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/MapStorageElement.java
index 66f07285bb..21689b9e07 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/MapStorageElement.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/MapStorageElement.java
@@ -34,19 +34,19 @@ public class MapStorageElement implements ICStorageElement {
private static final String CHILDREN_KEY = "?children?"; //$NON-NLS-1$
private static final String NAME_KEY = "?name?"; //$NON-NLS-1$
private static final String VALUE_KEY = "?value?"; //$NON-NLS-1$
- private List<MapStorageElement> fChildren = new ArrayList<MapStorageElement>();
+ private List<MapStorageElement> fChildren = new ArrayList<>();
private String fValue;
public MapStorageElement(String name, MapStorageElement parent) {
fName = name;
fParent = parent;
- fMap = new HashMap<String, String>();
+ fMap = new HashMap<>();
}
public MapStorageElement(Map<String, String> map, MapStorageElement parent) {
fName = map.get(getMapKey(NAME_KEY));
fValue = map.get(getMapKey(VALUE_KEY));
- fMap = new HashMap<String, String>(map);
+ fMap = new HashMap<>(map);
fParent = parent;
String children = map.get(getMapKey(CHILDREN_KEY));
@@ -86,7 +86,7 @@ public class MapStorageElement implements ICStorageElement {
int size = fChildren.size();
if (size != 0) {
- List<String> childrenStrList = new ArrayList<String>(size);
+ List<String> childrenStrList = new ArrayList<>(size);
for (int i = 0; i < size; i++) {
MapStorageElement child = fChildren.get(i);
Map<String, String> childStrMap = child.toStringMap();
@@ -143,7 +143,7 @@ public class MapStorageElement implements ICStorageElement {
@Override
public ICStorageElement[] getChildrenByName(String name) {
- List<ICStorageElement> children = new ArrayList<ICStorageElement>();
+ List<ICStorageElement> children = new ArrayList<>();
for (ICStorageElement child : fChildren)
if (name.equals(child.getName()))
children.add(child);
@@ -189,7 +189,7 @@ public class MapStorageElement implements ICStorageElement {
public static HashMap<String, String> decodeMap(String value) {
List<String> list = decodeList(value);
- HashMap<String, String> map = new HashMap<String, String>();
+ HashMap<String, String> map = new HashMap<>();
char escapeChar = '\\';
for (int i = 0; i < list.size(); i++) {
@@ -215,7 +215,7 @@ public class MapStorageElement implements ICStorageElement {
}
public static List<String> decodeList(String value) {
- List<String> list = new ArrayList<String>();
+ List<String> list = new ArrayList<>();
if (value != null) {
StringBuilder envStr = new StringBuilder(value);
String escapeChars = "|\\"; //$NON-NLS-1$
@@ -313,7 +313,7 @@ public class MapStorageElement implements ICStorageElement {
@Override
public String[] getAttributeNames() {
- List<String> list = new ArrayList<String>(fMap.size());
+ List<String> list = new ArrayList<>(fMap.size());
Set<Entry<String, String>> entrySet = fMap.entrySet();
for (Entry<String, String> entry : entrySet) {
String key = entry.getKey();
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ModificationStatus.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ModificationStatus.java
index 2f79fc761b..cf4ef0a585 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ModificationStatus.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ModificationStatus.java
@@ -25,9 +25,9 @@ import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
public class ModificationStatus extends Status implements IModificationStatus {
- private HashMap<String, String> fUnsupportedProperties = new HashMap<String, String>();
- private HashMap<String, String> fUnsupportedRequiredProperties = new HashMap<String, String>();
- private HashSet<String> fUndefinedProperties = new HashSet<String>();
+ private HashMap<String, String> fUnsupportedProperties = new HashMap<>();
+ private HashMap<String, String> fUnsupportedRequiredProperties = new HashMap<>();
+ private HashSet<String> fUndefinedProperties = new HashSet<>();
private ITool[][] fToolConflicts;
private ITool[] fNonManagedBuildTools;
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/MultiConfiguration.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/MultiConfiguration.java
index e46fa64c5b..fc3a6f10dc 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/MultiConfiguration.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/MultiConfiguration.java
@@ -659,7 +659,7 @@ public class MultiConfiguration extends MultiItemsHolder implements IMultiConfig
*/
@Override
public IResourceInfo[] getResourceInfos() {
- ArrayList<IResourceInfo> ri = new ArrayList<IResourceInfo>();
+ ArrayList<IResourceInfo> ri = new ArrayList<>();
for (int i = 0; i < fCfgs.length; i++) {
IResourceInfo[] ris = fCfgs[i].getResourceInfos();
ri.addAll(Arrays.asList(ris));
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/NotificationManager.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/NotificationManager.java
index fa0def6bbc..9ed1dd0a04 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/NotificationManager.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/NotificationManager.java
@@ -25,7 +25,7 @@ public class NotificationManager /*implements ISettingsChangeListener */ {
private List<ISettingsChangeListener> fListeners;
private NotificationManager() {
- fListeners = new CopyOnWriteArrayList<ISettingsChangeListener>();
+ fListeners = new CopyOnWriteArrayList<>();
}
public static NotificationManager getInstance() {
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Option.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Option.java
index 2eba61ef9f..47669958f4 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Option.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Option.java
@@ -232,7 +232,7 @@ public class Option extends BuildObject implements IOption, IBuildPropertiesRest
categoryId = option.categoryId;
}
if (option.builtIns != null) {
- builtIns = new ArrayList<OptionStringValue>(option.builtIns);
+ builtIns = new ArrayList<>(option.builtIns);
}
if (option.browseType != null) {
browseType = option.browseType;
@@ -247,9 +247,9 @@ public class Option extends BuildObject implements IOption, IBuildPropertiesRest
resourceFilter = option.resourceFilter;
}
if (option.applicableValuesList != null) {
- applicableValuesList = new ArrayList<String>(option.applicableValuesList);
- commandsMap = new HashMap<String, String>(option.commandsMap);
- namesMap = new HashMap<String, String>(option.namesMap);
+ applicableValuesList = new ArrayList<>(option.applicableValuesList);
+ commandsMap = new HashMap<>(option.commandsMap);
+ namesMap = new HashMap<>(option.namesMap);
}
if (option.treeRoot != null) {
treeRoot = new TreeRoot((TreeRoot) option.treeRoot);
@@ -296,13 +296,13 @@ public class Option extends BuildObject implements IOption, IBuildPropertiesRest
case UNDEF_MACRO_FILES:
if (option.value != null) {
@SuppressWarnings("unchecked")
- ArrayList<OptionStringValue> list = new ArrayList<OptionStringValue>(
+ ArrayList<OptionStringValue> list = new ArrayList<>(
(ArrayList<OptionStringValue>) option.value);
value = list;
}
if (option.defaultValue != null) {
@SuppressWarnings("unchecked")
- ArrayList<OptionStringValue> list = new ArrayList<OptionStringValue>(
+ ArrayList<OptionStringValue> list = new ArrayList<>(
(ArrayList<OptionStringValue>) option.defaultValue);
defaultValue = list;
}
@@ -602,7 +602,7 @@ public class Option extends BuildObject implements IOption, IBuildPropertiesRest
ICStorageElement configElement = configNode;
String optId = SafeStringInterner.safeIntern(configElement.getAttribute(ID));
if (i == 0) {
- applicableValuesList = new ArrayList<String>();
+ applicableValuesList = new ArrayList<>();
if (defaultValue == null) {
defaultValue = optId; // Default value to be overridden is default is specified
}
@@ -650,8 +650,8 @@ public class Option extends BuildObject implements IOption, IBuildPropertiesRest
// Note: These string-list options do not load either the "value" or
// "defaultValue" attributes. Instead, the ListOptionValue children
// are loaded in the value field.
- List<OptionStringValue> vList = new ArrayList<OptionStringValue>();
- List<OptionStringValue> biList = new ArrayList<OptionStringValue>();
+ List<OptionStringValue> vList = new ArrayList<>();
+ List<OptionStringValue> biList = new ArrayList<>();
configElements = element.getChildren();
for (ICStorageElement veNode : configElements) {
if (veNode.getName().equals(LIST_VALUE)) {
@@ -1473,7 +1473,7 @@ public class Option extends BuildObject implements IOption, IBuildPropertiesRest
*/
private Map<String, String> getCommandMap() {
if (commandsMap == null) {
- commandsMap = new HashMap<String, String>();
+ commandsMap = new HashMap<>();
}
return commandsMap;
}
@@ -1516,7 +1516,7 @@ public class Option extends BuildObject implements IOption, IBuildPropertiesRest
*/
private Map<String, String> getNameMap() {
if (namesMap == null) {
- namesMap = new HashMap<String, String>();
+ namesMap = new HashMap<>();
}
return namesMap;
}
@@ -1794,7 +1794,7 @@ public class Option extends BuildObject implements IOption, IBuildPropertiesRest
return null;
}
- List<String> valueList = new ArrayList<String>(list.size());
+ List<String> valueList = new ArrayList<>(list.size());
for (int i = 0; i < list.size(); i++) {
OptionStringValue el = list.get(i);
valueList.add(el.getValue());
@@ -1807,7 +1807,7 @@ public class Option extends BuildObject implements IOption, IBuildPropertiesRest
return null;
}
- List<OptionStringValue> lvList = new ArrayList<OptionStringValue>(list.size());
+ List<OptionStringValue> lvList = new ArrayList<>(list.size());
for (int i = 0; i < list.size(); i++) {
String v = list.get(i);
lvList.add(new OptionStringValue(v, builtIn));
@@ -2034,7 +2034,7 @@ public class Option extends BuildObject implements IOption, IBuildPropertiesRest
if (value == null) {
this.value = null;
} else {
- this.value = new ArrayList<OptionStringValue>(Arrays.asList(value));
+ this.value = new ArrayList<>(Arrays.asList(value));
}
} else {
throw new BuildException(ManagedMakeMessages.getResourceString("Option.error.bad_value_type")); //$NON-NLS-1$
@@ -2255,7 +2255,7 @@ public class Option extends BuildObject implements IOption, IBuildPropertiesRest
for (int i = 0; i < enumElements.length; ++i) {
String optId = SafeStringInterner.safeIntern(enumElements[i].getAttribute(ID));
if (i == 0) {
- applicableValuesList = new ArrayList<String>();
+ applicableValuesList = new ArrayList<>();
if (defaultValue == null) {
defaultValue = optId; // Default value to be overridden if default is specified
}
@@ -2278,7 +2278,7 @@ public class Option extends BuildObject implements IOption, IBuildPropertiesRest
if (treeRootConfigs != null && treeRootConfigs.length == 1) {
IManagedConfigElement treeRootConfig = treeRootConfigs[0];
treeRoot = new TreeRoot(treeRootConfig, element, getParent() instanceof IToolChain);
- applicableValuesList = new ArrayList<String>();
+ applicableValuesList = new ArrayList<>();
iterateOnTree(treeRoot, new ITreeNodeIterator() {
@Override
@@ -2317,8 +2317,8 @@ public class Option extends BuildObject implements IOption, IBuildPropertiesRest
IManagedConfigElement[] vElements = element.getChildren(LIST_VALUE);
for (IManagedConfigElement vElement : vElements) {
if (vList == null) {
- vList = new ArrayList<OptionStringValue>();
- builtIns = new ArrayList<OptionStringValue>();
+ vList = new ArrayList<>();
+ builtIns = new ArrayList<>();
}
OptionStringValue ve = new OptionStringValue(vElement);
if (ve.isBuiltIn()) {
@@ -2774,7 +2774,7 @@ public class Option extends BuildObject implements IOption, IBuildPropertiesRest
IManagedConfigElement[] treeChildren = element.getChildren(TREE_VALUE);
if (treeChildren != null && treeChildren.length > 0) {
- children = new ArrayList<IOption.ITreeOption>();
+ children = new ArrayList<>();
for (IManagedConfigElement configElement : treeChildren) {
children.add(new TreeOption(configElement, this, readTool));
}
@@ -2791,7 +2791,7 @@ public class Option extends BuildObject implements IOption, IBuildPropertiesRest
this.parent = parent;
if (clone.children != null) {
- children = new ArrayList<IOption.ITreeOption>();
+ children = new ArrayList<>();
for (ITreeOption cloneChild : clone.children) {
children.add(new TreeOption((TreeOption) cloneChild, this));
}
@@ -2808,7 +2808,7 @@ public class Option extends BuildObject implements IOption, IBuildPropertiesRest
public ITreeOption addChild(String id, String name) {
ITreeOption option = new TreeOption(id, name, this);
if (children == null) {
- children = new ArrayList<IOption.ITreeOption>();
+ children = new ArrayList<>();
}
children.add(0, option);
return option;
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/OptionCategory.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/OptionCategory.java
index 403b53905d..9d900f51ed 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/OptionCategory.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/OptionCategory.java
@@ -251,7 +251,7 @@ public class OptionCategory extends BuildObject implements IOptionCategory {
public void addChildCategory(OptionCategory category) {
if (children == null)
- children = new ArrayList<OptionCategory>();
+ children = new ArrayList<>();
children.add(category);
}
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/OptionReference.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/OptionReference.java
index 208e34b6ca..f1bdb6a373 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/OptionReference.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/OptionReference.java
@@ -145,7 +145,7 @@ public class OptionReference implements IOption {
case UNDEF_LIBRARY_PATHS:
case UNDEF_LIBRARY_FILES:
case UNDEF_MACRO_FILES:
- List<String> valueList = new ArrayList<String>();
+ List<String> valueList = new ArrayList<>();
NodeList nodes = element.getElementsByTagName(LIST_VALUE);
for (int i = 0; i < nodes.getLength(); ++i) {
Node node = nodes.item(i);
@@ -221,7 +221,7 @@ public class OptionReference implements IOption {
case UNDEF_LIBRARY_PATHS:
case UNDEF_LIBRARY_FILES:
case UNDEF_MACRO_FILES:
- List<String> valueList = new ArrayList<String>();
+ List<String> valueList = new ArrayList<>();
IManagedConfigElement[] valueElements = element.getChildren(LIST_VALUE);
for (IManagedConfigElement valueElement : valueElements) {
Boolean isBuiltIn = Boolean.valueOf(valueElement.getAttribute(LIST_ITEM_BUILTIN));
@@ -539,14 +539,14 @@ public class OptionReference implements IOption {
private List<String> getBuiltInList() {
if (builtIns == null) {
- builtIns = new ArrayList<String>();
+ builtIns = new ArrayList<>();
}
return builtIns;
}
@Override
public String[] getBuiltIns() {
- List<String> answer = new ArrayList<String>();
+ List<String> answer = new ArrayList<>();
if (builtIns != null) {
answer.addAll(builtIns);
}
@@ -716,7 +716,7 @@ public class OptionReference implements IOption {
|| getValueType() == UNDEF_INCLUDE_FILES || getValueType() == UNDEF_LIBRARY_PATHS
|| getValueType() == UNDEF_LIBRARY_FILES || getValueType() == UNDEF_MACRO_FILES) {
// Just replace what the option reference is holding onto
- this.value = new ArrayList<String>(Arrays.asList(value));
+ this.value = new ArrayList<>(Arrays.asList(value));
} else {
throw new BuildException(ManagedMakeMessages.getResourceString("Option.error.bad_value_type")); //$NON-NLS-1$
}
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ProjectType.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ProjectType.java
index 069db10bb4..88fcbc9342 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ProjectType.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ProjectType.java
@@ -286,7 +286,7 @@ public class ProjectType extends BuildObject
*/
private List<Configuration> getConfigurationList() {
if (configList == null) {
- configList = new ArrayList<Configuration>();
+ configList = new ArrayList<>();
}
return configList;
}
@@ -296,7 +296,7 @@ public class ProjectType extends BuildObject
*/
private Map<String, IConfiguration> getConfigurationMap() {
if (configMap == null) {
- configMap = new HashMap<String, IConfiguration>();
+ configMap = new HashMap<>();
}
return configMap;
}
@@ -768,7 +768,7 @@ public class ProjectType extends BuildObject
@Override
public String[] getRequiredTypeIds() {
- List<String> result = new ArrayList<String>();
+ List<String> result = new ArrayList<>();
List<Configuration> list = getConfigurationList();
for (int i = 0; i < list.size(); i++) {
result.addAll(Arrays.asList((list.get(i)).getRequiredTypeIds()));
@@ -778,7 +778,7 @@ public class ProjectType extends BuildObject
@Override
public String[] getSupportedTypeIds() {
- List<String> result = new ArrayList<String>();
+ List<String> result = new ArrayList<>();
List<Configuration> list = getConfigurationList();
for (int i = 0; i < list.size(); i++) {
result.addAll(Arrays.asList((list.get(i)).getSupportedTypeIds()));
@@ -788,7 +788,7 @@ public class ProjectType extends BuildObject
@Override
public String[] getSupportedValueIds(String typeId) {
- List<String> result = new ArrayList<String>();
+ List<String> result = new ArrayList<>();
List<Configuration> list = getConfigurationList();
for (int i = 0; i < list.size(); i++) {
result.addAll(Arrays.asList((list.get(i)).getSupportedValueIds(typeId)));
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/PropertyManager.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/PropertyManager.java
index ad4ea33fc0..c0833f720a 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/PropertyManager.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/PropertyManager.java
@@ -379,7 +379,7 @@ public class PropertyManager {
map = propsToMap(props);
if (map == null)
- map = new LinkedHashMap<String, Object>();
+ map = new LinkedHashMap<>();
return map;
}
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ResourceChangeHandler.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ResourceChangeHandler.java
index edb72f718c..e6009e25e4 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ResourceChangeHandler.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ResourceChangeHandler.java
@@ -52,13 +52,13 @@ import org.eclipse.core.runtime.jobs.MultiRule;
public class ResourceChangeHandler implements IResourceChangeListener, ISaveParticipant {
- private Map<IProject, IManagedBuildInfo> fRmProjectToBuildInfoMap = new HashMap<IProject, IManagedBuildInfo>();
+ private Map<IProject, IManagedBuildInfo> fRmProjectToBuildInfoMap = new HashMap<>();
private class ResourceConfigurationChecker implements IResourceDeltaVisitor {
private IResourceDelta fRootDelta;
- private HashMap<IProject, IManagedBuilderMakefileGenerator> fBuildFileGeneratorMap = new HashMap<IProject, IManagedBuilderMakefileGenerator>();
- private HashSet<IPath> fValidatedFilesSet = new HashSet<IPath>();
- private HashSet<IProject> fModifiedProjects = new HashSet<IProject>();
+ private HashMap<IProject, IManagedBuilderMakefileGenerator> fBuildFileGeneratorMap = new HashMap<>();
+ private HashSet<IPath> fValidatedFilesSet = new HashSet<>();
+ private HashSet<IProject> fModifiedProjects = new HashSet<>();
public ResourceConfigurationChecker(IResourceDelta rootDelta) {
fRootDelta = rootDelta;
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ResourceConfiguration.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ResourceConfiguration.java
index 61e20e38bd..74ce5b7a7a 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ResourceConfiguration.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ResourceConfiguration.java
@@ -253,7 +253,7 @@ public class ResourceConfiguration extends ResourceInfo implements IFileInfo {
: ManagedBuildManager.calculateChildId(otherExtTool.getId(), null);
Map<String, String> idMap = superClassIdMap.get(otherRcInfo.getPath());
if (idMap == null) {
- idMap = new HashMap<String, String>();
+ idMap = new HashMap<>();
superClassIdMap.put(otherRcInfo.getPath(), idMap);
}
idMap.put(otherExtTool.getId(), superId);
@@ -468,7 +468,7 @@ public class ResourceConfiguration extends ResourceInfo implements IFileInfo {
*/
private List<ITool> getToolList() {
if (toolList == null) {
- toolList = new ArrayList<ITool>();
+ toolList = new ArrayList<>();
}
return toolList;
}
@@ -480,7 +480,7 @@ public class ResourceConfiguration extends ResourceInfo implements IFileInfo {
*/
private Map<String, ITool> getToolMap() {
if (toolMap == null) {
- toolMap = new HashMap<String, ITool>();
+ toolMap = new HashMap<>();
}
return toolMap;
}
@@ -908,7 +908,7 @@ public class ResourceConfiguration extends ResourceInfo implements IFileInfo {
@Override
public CLanguageData[] getCLanguageDatas() {
ITool tools[] = getTools/*ToInvoke*/();
- List<CLanguageData> list = new ArrayList<CLanguageData>();
+ List<CLanguageData> list = new ArrayList<>();
for (ITool tool : tools) {
CLanguageData datas[] = tool.getCLanguageDatas();
for (int j = 0; j < datas.length; j++) {
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ResourceInfoContainer.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ResourceInfoContainer.java
index d009255400..2f8ef4d367 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ResourceInfoContainer.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ResourceInfoContainer.java
@@ -90,7 +90,7 @@ public class ResourceInfoContainer {
}
public List<IResourceInfo> getRcInfoList(final int kind, final boolean includeCurrent) {
- final List<IResourceInfo> list = new ArrayList<IResourceInfo>();
+ final List<IResourceInfo> list = new ArrayList<>();
fRcDataContainer.accept(new IPathSettingsContainerVisitor() {
@Override
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/SupportedProperties.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/SupportedProperties.java
index 2b841fa7aa..e6ac22532c 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/SupportedProperties.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/SupportedProperties.java
@@ -32,11 +32,11 @@ public class SupportedProperties implements IBuildPropertiesRestriction {
public static final String ID = "id"; //$NON-NLS-1$
public static final String REQUIRED = "required"; //$NON-NLS-1$
- private HashMap<String, SupportedProperty> fSupportedProperties = new HashMap<String, SupportedProperty>();
+ private HashMap<String, SupportedProperty> fSupportedProperties = new HashMap<>();
private class SupportedProperty {
private boolean fIsRequired;
- private Set<String> fValues = new HashSet<String>();
+ private Set<String> fValues = new HashSet<>();
private String fId;
SupportedProperty(String id) {
@@ -118,7 +118,7 @@ public class SupportedProperties implements IBuildPropertiesRestriction {
// if(type == null)
// continue;
- Set<String> set = new HashSet<String>();
+ Set<String> set = new HashSet<>();
IManagedConfigElement values[] = child.getChildren();
for (int k = 0; k < values.length; k++) {
@@ -176,7 +176,7 @@ public class SupportedProperties implements IBuildPropertiesRestriction {
@Override
public String[] getRequiredTypeIds() {
- List<String> list = new ArrayList<String>(fSupportedProperties.size());
+ List<String> list = new ArrayList<>(fSupportedProperties.size());
Collection<SupportedProperty> values = fSupportedProperties.values();
for (SupportedProperty prop : values) {
if (prop.isRequired())
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Target.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Target.java
index d441885a99..1334ad63a0 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Target.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Target.java
@@ -126,7 +126,7 @@ public class Target extends BuildObject implements ITarget {
// Get the comma-separated list of valid OS
String os = element.getAttribute(OS_LIST);
if (os != null) {
- targetOSList = new ArrayList<String>();
+ targetOSList = new ArrayList<>();
String[] osTokens = os.split(","); //$NON-NLS-1$
for (int i = 0; i < osTokens.length; ++i) {
targetOSList.add(SafeStringInterner.safeIntern(osTokens[i].trim()));
@@ -136,7 +136,7 @@ public class Target extends BuildObject implements ITarget {
// Get the comma-separated list of valid Architectures
String arch = element.getAttribute(ARCH_LIST);
if (arch != null) {
- targetArchList = new ArrayList<String>();
+ targetArchList = new ArrayList<>();
String[] archTokens = arch.split(","); //$NON-NLS-1$
for (int j = 0; j < archTokens.length; ++j) {
targetArchList.add(SafeStringInterner.safeIntern(archTokens[j].trim()));
@@ -410,7 +410,7 @@ public class Target extends BuildObject implements ITarget {
*/
private List<IConfigurationV2> getConfigurationList() {
if (configList == null) {
- configList = new ArrayList<IConfigurationV2>();
+ configList = new ArrayList<>();
}
return configList;
}
@@ -420,7 +420,7 @@ public class Target extends BuildObject implements ITarget {
*/
private Map<String, IConfigurationV2> getConfigurationMap() {
if (configMap == null) {
- configMap = new HashMap<String, IConfigurationV2>();
+ configMap = new HashMap<>();
}
return configMap;
}
@@ -475,7 +475,7 @@ public class Target extends BuildObject implements ITarget {
errorParsers = new String[0];
} else {
StringTokenizer tok = new StringTokenizer(parserIDs, ";"); //$NON-NLS-1$
- List<String> list = new ArrayList<String>(tok.countTokens());
+ List<String> list = new ArrayList<>(tok.countTokens());
while (tok.hasMoreElements()) {
list.add(tok.nextToken());
}
@@ -498,7 +498,7 @@ public class Target extends BuildObject implements ITarget {
*/
protected List<ToolReference> getLocalToolReferences() {
if (toolReferences == null) {
- toolReferences = new ArrayList<ToolReference>();
+ toolReferences = new ArrayList<>();
}
return toolReferences;
}
@@ -557,7 +557,7 @@ public class Target extends BuildObject implements ITarget {
}
protected List<OptionReference> getOptionReferences(ITool tool) {
- List<OptionReference> references = new ArrayList<OptionReference>();
+ List<OptionReference> references = new ArrayList<>();
// Get all the option references I add for this tool
ToolReference toolRef = getToolReference(tool);
@@ -658,7 +658,7 @@ public class Target extends BuildObject implements ITarget {
*/
private List<ITool> getToolList() {
if (toolList == null) {
- toolList = new ArrayList<ITool>();
+ toolList = new ArrayList<>();
}
return toolList;
}
@@ -669,7 +669,7 @@ public class Target extends BuildObject implements ITarget {
*/
private Map<String, ITool> getToolMap() {
if (toolMap == null) {
- toolMap = new HashMap<String, ITool>();
+ toolMap = new HashMap<>();
}
return toolMap;
}
@@ -698,7 +698,7 @@ public class Target extends BuildObject implements ITarget {
*/
@Override
public ITool[] getTools() {
- Vector<ITool> toolArray = new Vector<ITool>();
+ Vector<ITool> toolArray = new Vector<>();
addToolsToArray(toolArray);
return toolArray.toArray(new ITool[toolArray.size()]);
}
@@ -1058,7 +1058,7 @@ public class Target extends BuildObject implements ITarget {
IToolReference[] configToolRefs = configV2.getToolReferences();
// Add the "local" tool references (they are direct children of the target and
// its parent targets)
- Vector<IToolReference> targetToolRefs = new Vector<IToolReference>();
+ Vector<IToolReference> targetToolRefs = new Vector<>();
addTargetToolReferences(targetToolRefs);
IToolReference[] toolRefs;
if (targetToolRefs.size() > 0) {
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/TargetPlatform.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/TargetPlatform.java
index 34e0e67ee9..582c339486 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/TargetPlatform.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/TargetPlatform.java
@@ -163,13 +163,13 @@ public class TargetPlatform extends BuildObject implements ITargetPlatform {
isAbstract = targetPlatform.isAbstract;
}
if (targetPlatform.osList != null) {
- osList = new ArrayList<String>(targetPlatform.osList);
+ osList = new ArrayList<>(targetPlatform.osList);
}
if (targetPlatform.archList != null) {
- archList = new ArrayList<String>(targetPlatform.archList);
+ archList = new ArrayList<>(targetPlatform.archList);
}
if (targetPlatform.binaryParserList != null) {
- binaryParserList = new ArrayList<String>(targetPlatform.binaryParserList);
+ binaryParserList = new ArrayList<>(targetPlatform.binaryParserList);
}
setDirty(true);
@@ -209,7 +209,7 @@ public class TargetPlatform extends BuildObject implements ITargetPlatform {
// Get the comma-separated list of valid OS
String os = element.getAttribute(OS_LIST);
if (os != null) {
- osList = new ArrayList<String>();
+ osList = new ArrayList<>();
String[] osTokens = os.split(","); //$NON-NLS-1$
for (int i = 0; i < osTokens.length; ++i) {
osList.add(osTokens[i].trim());
@@ -219,7 +219,7 @@ public class TargetPlatform extends BuildObject implements ITargetPlatform {
// Get the comma-separated list of valid Architectures
String arch = element.getAttribute(ARCH_LIST);
if (arch != null) {
- archList = new ArrayList<String>();
+ archList = new ArrayList<>();
String[] archTokens = arch.split(","); //$NON-NLS-1$
for (int j = 0; j < archTokens.length; ++j) {
archList.add(SafeStringInterner.safeIntern(archTokens[j].trim()));
@@ -229,7 +229,7 @@ public class TargetPlatform extends BuildObject implements ITargetPlatform {
// Get the IDs of the binary parsers from a semi-colon-separated list.
String bpars = element.getAttribute(BINARY_PARSER);
if (bpars != null) {
- binaryParserList = new ArrayList<String>();
+ binaryParserList = new ArrayList<>();
String[] bparsTokens = CDataUtil.stringToArray(bpars, ";"); //$NON-NLS-1$
for (int j = 0; j < bparsTokens.length; ++j) {
binaryParserList.add(SafeStringInterner.safeIntern(bparsTokens[j].trim()));
@@ -279,7 +279,7 @@ public class TargetPlatform extends BuildObject implements ITargetPlatform {
if (element.getAttribute(OS_LIST) != null) {
String os = element.getAttribute(OS_LIST);
if (os != null) {
- osList = new ArrayList<String>();
+ osList = new ArrayList<>();
String[] osTokens = os.split(","); //$NON-NLS-1$
for (int i = 0; i < osTokens.length; ++i) {
osList.add(SafeStringInterner.safeIntern(osTokens[i].trim()));
@@ -291,7 +291,7 @@ public class TargetPlatform extends BuildObject implements ITargetPlatform {
if (element.getAttribute(ARCH_LIST) != null) {
String arch = element.getAttribute(ARCH_LIST);
if (arch != null) {
- archList = new ArrayList<String>();
+ archList = new ArrayList<>();
String[] archTokens = arch.split(","); //$NON-NLS-1$
for (int j = 0; j < archTokens.length; ++j) {
archList.add(SafeStringInterner.safeIntern(archTokens[j].trim()));
@@ -303,7 +303,7 @@ public class TargetPlatform extends BuildObject implements ITargetPlatform {
if (element.getAttribute(BINARY_PARSER) != null) {
String bpars = element.getAttribute(BINARY_PARSER);
if (bpars != null) {
- binaryParserList = new ArrayList<String>();
+ binaryParserList = new ArrayList<>();
String[] bparsTokens = CDataUtil.stringToArray(bpars, ";"); //$NON-NLS-1$
for (int j = 0; j < bparsTokens.length; ++j) {
binaryParserList.add(SafeStringInterner.safeIntern(bparsTokens[j].trim()));
@@ -514,7 +514,7 @@ public class TargetPlatform extends BuildObject implements ITargetPlatform {
public void setBinaryParserList(String[] ids) {
if (ids != null) {
if (binaryParserList == null) {
- binaryParserList = new ArrayList<String>();
+ binaryParserList = new ArrayList<>();
} else {
binaryParserList.clear();
}
@@ -544,7 +544,7 @@ public class TargetPlatform extends BuildObject implements ITargetPlatform {
@Override
public void setOSList(String[] OSs) {
if (osList == null) {
- osList = new ArrayList<String>();
+ osList = new ArrayList<>();
} else {
osList.clear();
}
@@ -562,7 +562,7 @@ public class TargetPlatform extends BuildObject implements ITargetPlatform {
@Override
public void setArchList(String[] archs) {
if (archList == null) {
- archList = new ArrayList<String>();
+ archList = new ArrayList<>();
} else {
archList.clear();
}
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Tool.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Tool.java
index 9af0033c0b..cb83c089ea 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Tool.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Tool.java
@@ -170,10 +170,10 @@ public class Tool extends HoldsOptions
private boolean rebuildState;
private BooleanExpressionApplicabilityCalculator booleanExpressionCalculator;
- private HashMap<IInputType, CLanguageData> typeToDataMap = new HashMap<IInputType, CLanguageData>(2);
+ private HashMap<IInputType, CLanguageData> typeToDataMap = new HashMap<>(2);
private boolean fDataMapInited;
private List<Tool> identicalList;
- private HashMap<String, PathInfoCache> discoveredInfoMap = new HashMap<String, PathInfoCache>(2);
+ private HashMap<String, PathInfoCache> discoveredInfoMap = new HashMap<>(2);
private String scannerConfigDiscoveryProfileId;
/*
@@ -420,10 +420,10 @@ public class Tool extends HoldsOptions
commandLinePattern = tool.commandLinePattern;
}
if (tool.inputExtensions != null) {
- inputExtensions = new ArrayList<String>(tool.inputExtensions);
+ inputExtensions = new ArrayList<>(tool.inputExtensions);
}
if (tool.interfaceExtensions != null) {
- interfaceExtensions = new ArrayList<String>(tool.interfaceExtensions);
+ interfaceExtensions = new ArrayList<>(tool.interfaceExtensions);
}
if (tool.natureFilter != null) {
natureFilter = tool.natureFilter;
@@ -467,7 +467,7 @@ public class Tool extends HoldsOptions
optionPathConverter = tool.optionPathConverter;
if (tool.envVarBuildPathList != null)
- envVarBuildPathList = new ArrayList<IEnvVarBuildPath>(tool.envVarBuildPathList);
+ envVarBuildPathList = new ArrayList<>(tool.envVarBuildPathList);
// tool.updateScannerInfoSettingsToInputTypes();
@@ -559,10 +559,10 @@ public class Tool extends HoldsOptions
commandLinePattern = tool.commandLinePattern;
}
if (inputExtensions == null && tool.inputExtensions != null) {
- inputExtensions = new ArrayList<String>(tool.inputExtensions);
+ inputExtensions = new ArrayList<>(tool.inputExtensions);
}
if (interfaceExtensions == null && tool.interfaceExtensions != null) {
- interfaceExtensions = new ArrayList<String>(tool.interfaceExtensions);
+ interfaceExtensions = new ArrayList<>(tool.interfaceExtensions);
}
if (natureFilter == null) {
natureFilter = tool.natureFilter;
@@ -619,7 +619,7 @@ public class Tool extends HoldsOptions
}
if (envVarBuildPathList == null && tool.envVarBuildPathList != null)
- envVarBuildPathList = new ArrayList<IEnvVarBuildPath>(tool.envVarBuildPathList);
+ envVarBuildPathList = new ArrayList<>(tool.envVarBuildPathList);
// Clone the children in superclass
super.copyNonoverriddenSettings(tool);
@@ -1371,7 +1371,7 @@ public class Tool extends HoldsOptions
if (isExtensionTool || types.length == 0)
return types;
- List<OutputType> list = new ArrayList<OutputType>(types.length);
+ List<OutputType> list = new ArrayList<>(types.length);
for (IOutputType itype : types) {
OutputType type = (OutputType) itype;
if (type.isEnabled(this))
@@ -1385,7 +1385,7 @@ public class Tool extends HoldsOptions
if (isExtensionTool || types.length == 0)
return types;
- List<InputType> list = new ArrayList<InputType>(types.length);
+ List<InputType> list = new ArrayList<>(types.length);
for (IInputType itype : types) {
InputType type = (InputType) itype;
if (type.isEnabled(this))
@@ -1577,7 +1577,7 @@ public class Tool extends HoldsOptions
*/
private Vector<InputType> getInputTypeList() {
if (inputTypeList == null) {
- inputTypeList = new Vector<InputType>();
+ inputTypeList = new Vector<>();
}
return inputTypeList;
}
@@ -1587,7 +1587,7 @@ public class Tool extends HoldsOptions
*/
private Map<String, InputType> getInputTypeMap() {
if (inputTypeMap == null) {
- inputTypeMap = new HashMap<String, InputType>();
+ inputTypeMap = new HashMap<>();
}
return inputTypeMap;
}
@@ -1602,7 +1602,7 @@ public class Tool extends HoldsOptions
*/
private Vector<OutputType> getOutputTypeList() {
if (outputTypeList == null) {
- outputTypeList = new Vector<OutputType>();
+ outputTypeList = new Vector<>();
}
return outputTypeList;
}
@@ -1612,7 +1612,7 @@ public class Tool extends HoldsOptions
*/
private Map<String, OutputType> getOutputTypeMap() {
if (outputTypeMap == null) {
- outputTypeMap = new HashMap<String, OutputType>();
+ outputTypeMap = new HashMap<>();
}
return outputTypeMap;
}
@@ -1724,7 +1724,7 @@ public class Tool extends HoldsOptions
errorParsers = new String[0];
} else {
StringTokenizer tok = new StringTokenizer(parserIDs, ";"); //$NON-NLS-1$
- List<String> list = new ArrayList<String>(tok.countTokens());
+ List<String> list = new ArrayList<>(tok.countTokens());
while (tok.hasMoreElements()) {
list.add(tok.nextToken());
}
@@ -1740,7 +1740,7 @@ public class Tool extends HoldsOptions
public Set<String> contributeErrorParsers(Set<String> set) {
if (getErrorParserIds() != null) {
if (set == null)
- set = new HashSet<String>();
+ set = new HashSet<>();
String ids[] = getErrorParserList();
if (ids.length != 0)
set.addAll(Arrays.asList(ids));
@@ -1755,7 +1755,7 @@ public class Tool extends HoldsOptions
@Override
public List<String> getInputExtensions() {
String[] exts = getPrimaryInputExtensions();
- List<String> extList = new ArrayList<String>();
+ List<String> extList = new ArrayList<>();
for (String ext : exts) {
extList.add(ext);
}
@@ -1768,7 +1768,7 @@ public class Tool extends HoldsOptions
if (getSuperClass() != null) {
return ((Tool) getSuperClass()).getInputExtensionsAttribute();
} else {
- inputExtensions = new ArrayList<String>();
+ inputExtensions = new ArrayList<>();
}
}
return inputExtensions;
@@ -1776,7 +1776,7 @@ public class Tool extends HoldsOptions
private List<String> getInputExtensionsList() {
if (inputExtensions == null) {
- inputExtensions = new ArrayList<String>();
+ inputExtensions = new ArrayList<>();
}
return inputExtensions;
}
@@ -1834,7 +1834,7 @@ public class Tool extends HoldsOptions
public String[] getAllInputExtensions(IProject project) {
IInputType[] types = getInputTypes();
if (types != null && types.length > 0) {
- List<String> allExts = new ArrayList<String>();
+ List<String> allExts = new ArrayList<>();
for (IInputType type : types) {
String[] exts = ((InputType) type).getSourceExtensions(this, project);
for (String ext : exts) {
@@ -1897,7 +1897,7 @@ public class Tool extends HoldsOptions
*/
@Override
public IPath[] getAdditionalDependencies() {
- List<IPath> allDeps = new ArrayList<IPath>();
+ List<IPath> allDeps = new ArrayList<>();
IInputType[] types = getInputTypes();
for (IInputType type : types) {
// Additional dependencies come from 2 places.
@@ -1911,7 +1911,7 @@ public class Tool extends HoldsOptions
IOption option = getOptionBySuperClassId(type.getOptionId());
if (option != null) {
try {
- List<IPath> inputs = new ArrayList<IPath>();
+ List<IPath> inputs = new ArrayList<>();
int optType = option.getValueType();
if (optType == IOption.STRING) {
inputs.add(Path.fromOSString(option.getStringValue()));
@@ -1942,7 +1942,7 @@ public class Tool extends HoldsOptions
*/
@Override
public IPath[] getAdditionalResources() {
- List<IPath> allRes = new ArrayList<IPath>();
+ List<IPath> allRes = new ArrayList<>();
for (IInputType type : getInputTypes()) {
// Additional resources come from 2 places.
// 1. From AdditionalInput childen
@@ -1967,7 +1967,7 @@ public class Tool extends HoldsOptions
public String[] getAllDependencyExtensions() {
IInputType[] types = getInputTypes();
if (types != null && types.length > 0) {
- List<String> allExts = new ArrayList<String>();
+ List<String> allExts = new ArrayList<>();
for (IInputType t : types)
for (String s : t.getDependencyExtensions(this))
allExts.add(s);
@@ -1999,7 +1999,7 @@ public class Tool extends HoldsOptions
return ((Tool) getSuperClass()).getHeaderExtensionsAttribute();
} else {
if (interfaceExtensions == null) {
- interfaceExtensions = new ArrayList<String>();
+ interfaceExtensions = new ArrayList<>();
}
}
}
@@ -2008,7 +2008,7 @@ public class Tool extends HoldsOptions
private List<String> getInterfaceExtensionsList() {
if (interfaceExtensions == null) {
- interfaceExtensions = new ArrayList<String>();
+ interfaceExtensions = new ArrayList<>();
}
return interfaceExtensions;
}
@@ -2318,7 +2318,7 @@ public class Tool extends HoldsOptions
public String[] getAllOutputExtensions(IProject project) {
IOutputType[] types = getOutputTypes();
if (types != null && types.length > 0) {
- List<String> allExts = new ArrayList<String>();
+ List<String> allExts = new ArrayList<>();
for (IOutputType t : types) {
String[] exts = ((OutputType) t).getOutputExtensions(this, project);
if (exts != null)
@@ -2610,7 +2610,7 @@ public class Tool extends HoldsOptions
public String[] getToolCommandFlags(IPath inputFileLocation, IPath outputFileLocation,
SupplierBasedCdtVariableSubstitutor macroSubstitutor, IMacroContextInfoProvider provider) {
IOption[] opts = getOptions();
- ArrayList<String> flags = new ArrayList<String>();
+ ArrayList<String> flags = new ArrayList<>();
StringBuilder sb = new StringBuilder();
for (IOption option : opts) {
if (option == null)
@@ -3199,7 +3199,7 @@ public class Tool extends HoldsOptions
if (path == null)
return;
if (envVarBuildPathList == null)
- envVarBuildPathList = new ArrayList<IEnvVarBuildPath>();
+ envVarBuildPathList = new ArrayList<>();
envVarBuildPathList.add(path);
}
@@ -3564,7 +3564,7 @@ public class Tool extends HoldsOptions
}
private List<IInputType> getLanguageInputTypes() {
- List<IInputType> list = new ArrayList<IInputType>();
+ List<IInputType> list = new ArrayList<>();
IInputType[] types = getInputTypes();
for (IInputType t : types) {
InputType type = (InputType) t;
@@ -3781,7 +3781,7 @@ public class Tool extends HoldsOptions
return null;
if (!isExtensionTool)
return null;
- return new MatchKey<Tool>(this);
+ return new MatchKey<>(this);
}
@Override
@@ -3858,7 +3858,7 @@ public class Tool extends HoldsOptions
supported = props.getSupportedTypeIds();
} else {
BooleanExpressionApplicabilityCalculator calc = getBooleanExpressionCalculator();
- List<String> list = new ArrayList<String>();
+ List<String> list = new ArrayList<>();
if (calc != null) {
list.addAll(Arrays.asList(calc.getReferencedPropertyIds()));
}
@@ -3877,7 +3877,7 @@ public class Tool extends HoldsOptions
supported = props.getSupportedValueIds(typeId);
} else {
BooleanExpressionApplicabilityCalculator calc = getBooleanExpressionCalculator();
- List<String> list = new ArrayList<String>();
+ List<String> list = new ArrayList<>();
if (calc != null) {
list.addAll(Arrays.asList(calc.getReferencedValueIds(typeId)));
}
@@ -3908,7 +3908,7 @@ public class Tool extends HoldsOptions
if (set != null && !set.isEmpty()) {
Set<String> oldSet = contributeErrorParsers(null);
if (oldSet == null)
- oldSet = new HashSet<String>();
+ oldSet = new HashSet<>();
oldSet.removeAll(set);
setErrorParserList(oldSet.toArray(new String[oldSet.size()]));
@@ -4135,7 +4135,7 @@ public class Tool extends HoldsOptions
}
public IOption[] getOptionsOfType(int type) {
- List<IOption> list = new ArrayList<IOption>();
+ List<IOption> list = new ArrayList<>();
for (IOption op : getOptions()) {
try {
if (op.getValueType() == type)
@@ -4153,7 +4153,7 @@ public class Tool extends HoldsOptions
int opType = Option.getOppositeType(type);
if (opType != 0) {
- Set<Object> filterSet = new HashSet<Object>();
+ Set<Object> filterSet = new HashSet<>();
for (IOption op : getOptionsOfType(opType)) {
filterSet.addAll((List<Object>) op.getValue());
}
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ToolChain.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ToolChain.java
index b9830d2bbd..523dca4c77 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ToolChain.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ToolChain.java
@@ -333,10 +333,10 @@ public class ToolChain extends HoldsOptions
errorParserIds = toolChain.errorParserIds;
}
if (toolChain.osList != null) {
- osList = new ArrayList<String>(toolChain.osList);
+ osList = new ArrayList<>(toolChain.osList);
}
if (toolChain.archList != null) {
- archList = new ArrayList<String>(toolChain.archList);
+ archList = new ArrayList<>(toolChain.archList);
}
if (toolChain.targetToolIds != null) {
targetToolIds = toolChain.targetToolIds;
@@ -486,7 +486,7 @@ public class ToolChain extends HoldsOptions
: ManagedBuildManager.calculateChildId(otherExtTool.getId(), null);
Map<String, String> idMap = superIdMap.get(otherRcInfo.getPath());
if (idMap == null) {
- idMap = new HashMap<String, String>();
+ idMap = new HashMap<>();
superIdMap.put(otherRcInfo.getPath(), idMap);
}
idMap.put(otherExtTool.getId(), superId);
@@ -590,7 +590,7 @@ public class ToolChain extends HoldsOptions
// Get the comma-separated list of valid OS
String os = element.getAttribute(OS_LIST);
if (os != null) {
- osList = new ArrayList<String>();
+ osList = new ArrayList<>();
String[] osTokens = os.split(","); //$NON-NLS-1$
for (int i = 0; i < osTokens.length; ++i) {
osList.add(SafeStringInterner.safeIntern(osTokens[i].trim()));
@@ -600,7 +600,7 @@ public class ToolChain extends HoldsOptions
// Get the comma-separated list of valid Architectures
String arch = element.getAttribute(ARCH_LIST);
if (arch != null) {
- archList = new ArrayList<String>();
+ archList = new ArrayList<>();
String[] archTokens = arch.split(","); //$NON-NLS-1$
for (int j = 0; j < archTokens.length; ++j) {
archList.add(SafeStringInterner.safeIntern(archTokens[j].trim()));
@@ -709,7 +709,7 @@ public class ToolChain extends HoldsOptions
if (element.getAttribute(OS_LIST) != null) {
String os = element.getAttribute(OS_LIST);
if (os != null) {
- osList = new ArrayList<String>();
+ osList = new ArrayList<>();
String[] osTokens = os.split(","); //$NON-NLS-1$
for (int i = 0; i < osTokens.length; ++i) {
osList.add(SafeStringInterner.safeIntern(osTokens[i].trim()));
@@ -721,7 +721,7 @@ public class ToolChain extends HoldsOptions
if (element.getAttribute(ARCH_LIST) != null) {
String arch = element.getAttribute(ARCH_LIST);
if (arch != null) {
- archList = new ArrayList<String>();
+ archList = new ArrayList<>();
String[] archTokens = arch.split(","); //$NON-NLS-1$
for (int j = 0; j < archTokens.length; ++j) {
archList.add(SafeStringInterner.safeIntern(archTokens[j].trim()));
@@ -1039,7 +1039,7 @@ public class ToolChain extends HoldsOptions
if (set.size() == 0)
return used ? tools : new Tool[0];
- List<Tool> list = new ArrayList<Tool>(tools.length);
+ List<Tool> list = new ArrayList<>(tools.length);
for (Tool t : tools) {
if (set.contains(t.getId()) != used)
list.add(t);
@@ -1060,7 +1060,7 @@ public class ToolChain extends HoldsOptions
@Override
public ITool[] getToolsBySuperClassId(String id) {
- List<ITool> retTools = new ArrayList<ITool>();
+ List<ITool> retTools = new ArrayList<>();
if (id != null) {
// Look for a tool with this ID, or the tool(s) with a superclass with this id
ITool[] tools = getTools();
@@ -1085,7 +1085,7 @@ public class ToolChain extends HoldsOptions
*/
public List<Tool> getToolList() {
if (toolList == null) {
- toolList = new ArrayList<Tool>();
+ toolList = new ArrayList<>();
}
return toolList;
}
@@ -1095,7 +1095,7 @@ public class ToolChain extends HoldsOptions
*/
private Map<String, Tool> getToolMap() {
if (toolMap == null) {
- toolMap = new HashMap<String, Tool>();
+ toolMap = new HashMap<>();
}
return toolMap;
}
@@ -1276,7 +1276,7 @@ public class ToolChain extends HoldsOptions
targetTools = new String[0];
} else {
StringTokenizer tok = new StringTokenizer(IDs, ";"); //$NON-NLS-1$
- List<String> list = new ArrayList<String>(tok.countTokens());
+ List<String> list = new ArrayList<>(tok.countTokens());
while (tok.hasMoreElements()) {
list.add(tok.nextToken());
}
@@ -1330,7 +1330,7 @@ public class ToolChain extends HoldsOptions
errorParsers = new String[0];
} else {
StringTokenizer tok = new StringTokenizer(parserIDs, ";"); //$NON-NLS-1$
- List<String> list = new ArrayList<String>(tok.countTokens());
+ List<String> list = new ArrayList<>(tok.countTokens());
while (tok.hasMoreElements()) {
list.add(tok.nextToken());
}
@@ -1347,7 +1347,7 @@ public class ToolChain extends HoldsOptions
String parserIDs = getErrorParserIdsAttribute();
if (parserIDs != null) {
if (set == null)
- set = new HashSet<String>();
+ set = new HashSet<>();
if (parserIDs.length() != 0) {
StringTokenizer tok = new StringTokenizer(parserIDs, ";"); //$NON-NLS-1$
while (tok.hasMoreElements()) {
@@ -1436,7 +1436,7 @@ public class ToolChain extends HoldsOptions
@Override
public void setOSList(String[] OSs) {
if (osList == null) {
- osList = new ArrayList<String>();
+ osList = new ArrayList<>();
} else {
osList.clear();
}
@@ -1449,7 +1449,7 @@ public class ToolChain extends HoldsOptions
@Override
public void setArchList(String[] archs) {
if (archList == null) {
- archList = new ArrayList<String>();
+ archList = new ArrayList<>();
} else {
archList.clear();
}
@@ -2284,7 +2284,7 @@ public class ToolChain extends HoldsOptions
return null;
if (!isExtensionToolChain)
return null;
- return new MatchKey<ToolChain>(this);
+ return new MatchKey<>(this);
}
@Override
@@ -2339,7 +2339,7 @@ public class ToolChain extends HoldsOptions
public String[] getRequiredTypeIds(boolean checkTools) {
SupportedProperties props = findSupportedProperties();
- List<String> result = new ArrayList<String>();
+ List<String> result = new ArrayList<>();
if (props != null) {
result.addAll(Arrays.asList(props.getRequiredTypeIds()));
} else {
@@ -2368,7 +2368,7 @@ public class ToolChain extends HoldsOptions
public String[] getSupportedTypeIds(boolean checkTools) {
SupportedProperties props = findSupportedProperties();
- List<String> result = new ArrayList<String>();
+ List<String> result = new ArrayList<>();
if (props != null) {
result.addAll(Arrays.asList(props.getSupportedTypeIds()));
} else {
@@ -2397,7 +2397,7 @@ public class ToolChain extends HoldsOptions
public String[] getSupportedValueIds(String typeId, boolean checkTools) {
SupportedProperties props = findSupportedProperties();
- List<String> result = new ArrayList<String>();
+ List<String> result = new ArrayList<>();
if (props != null) {
result.addAll(Arrays.asList(props.getSupportedValueIds(typeId)));
} else {
@@ -2488,7 +2488,7 @@ public class ToolChain extends HoldsOptions
if (set != null && !set.isEmpty()) {
Set<String> oldSet = contributeErrorParsers(info, null, false);
if (oldSet == null)
- oldSet = new HashSet<String>();
+ oldSet = new HashSet<>();
oldSet.removeAll(set);
setErrorParserList(oldSet.toArray(new String[oldSet.size()]));
@@ -2629,9 +2629,9 @@ public class ToolChain extends HoldsOptions
if (unusedChildrenSet == null) {
String childIds[] = CDataUtil.stringToArray(unusedChildren, ";"); //$NON-NLS-1$
if (childIds == null)
- unusedChildrenSet = new HashSet<String>();
+ unusedChildrenSet = new HashSet<>();
else {
- unusedChildrenSet = new HashSet<String>();
+ unusedChildrenSet = new HashSet<>();
unusedChildrenSet.addAll(Arrays.asList(childIds));
}
}
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ToolChainModificationHelper.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ToolChainModificationHelper.java
index 209f3e3e19..90a553643d 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ToolChainModificationHelper.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ToolChainModificationHelper.java
@@ -124,7 +124,7 @@ public class ToolChainModificationHelper {
curMap.clearEmptyLists();
- List<ITool> resultingList = new ArrayList<ITool>();
+ List<ITool> resultingList = new ArrayList<>();
curMap.putValuesToCollection(resultingList);
return getModificationInfo(rcInfo, fromTools, resultingList.toArray(new ITool[resultingList.size()]));
@@ -134,11 +134,11 @@ public class ToolChainModificationHelper {
ITool[] toTools) {
ToolListMap curMap = createRealToToolMap(fromTools, false);
- List<ToolInfo> resultingList = new ArrayList<ToolInfo>();
- List<ToolInfo> addedList = new ArrayList<ToolInfo>(7);
- List<ToolInfo> remainedList = new ArrayList<ToolInfo>(7);
- List<ToolInfo> removedList = new ArrayList<ToolInfo>(7);
- List<ITool> removedToolsList = new ArrayList<ITool>(7);
+ List<ToolInfo> resultingList = new ArrayList<>();
+ List<ToolInfo> addedList = new ArrayList<>(7);
+ List<ToolInfo> remainedList = new ArrayList<>(7);
+ List<ToolInfo> removedList = new ArrayList<>(7);
+ List<ITool> removedToolsList = new ArrayList<>(7);
for (int i = 0; i < toTools.length; i++) {
ITool tool = toTools[i];
@@ -244,9 +244,9 @@ public class ToolChainModificationHelper {
private static Map<ITool, ConverterInfo> calculateConverterTools(IResourceInfo rcInfo, ToolInfo[] removed,
ToolInfo[] added, List<ToolInfo> remainingRemoved, List<ToolInfo> remainingAdded) {
if (remainingAdded == null)
- remainingAdded = new ArrayList<ToolInfo>(added.length);
+ remainingAdded = new ArrayList<>(added.length);
if (remainingRemoved == null)
- remainingRemoved = new ArrayList<ToolInfo>(removed.length);
+ remainingRemoved = new ArrayList<>(removed.length);
remainingAdded.clear();
remainingRemoved.clear();
@@ -254,7 +254,7 @@ public class ToolChainModificationHelper {
remainingAdded.addAll(Arrays.asList(added));
remainingRemoved.addAll(Arrays.asList(removed));
- Map<ITool, ConverterInfo> resultMap = new HashMap<ITool, ConverterInfo>();
+ Map<ITool, ConverterInfo> resultMap = new HashMap<>();
for (Iterator<ToolInfo> rIter = remainingRemoved.iterator(); rIter.hasNext();) {
ToolInfo rti = rIter.next();
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ToolListModificationInfo.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ToolListModificationInfo.java
index a235eff1a0..f3043b6ea7 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ToolListModificationInfo.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ToolListModificationInfo.java
@@ -52,7 +52,7 @@ public class ToolListModificationInfo {
public List<ITool> getResultingToolList(List<ITool> list) {
if (list == null)
- list = new ArrayList<ITool>(fResultingTools.length);
+ list = new ArrayList<>(fResultingTools.length);
for (int i = 0; i < fResultingTools.length; i++) {
list.add(fResultingTools[i].getResultingTool());
@@ -104,18 +104,18 @@ public class ToolListModificationInfo {
}
public MultiStatus getModificationStatus() {
- List<IModificationStatus> statusList = new ArrayList<IModificationStatus>();
+ List<IModificationStatus> statusList = new ArrayList<>();
ToolInfo[][] conflictInfos = calculateConflictingTools(fResultingTools);
ITool[][] conflicting = toToolArray(conflictInfos, true);
- Map<String, String> unspecifiedRequiredProps = new HashMap<String, String>();
- Map<String, String> unspecifiedProps = new HashMap<String, String>();
- Set<String> undefinedSet = new HashSet<String>();
+ Map<String, String> unspecifiedRequiredProps = new HashMap<>();
+ Map<String, String> unspecifiedProps = new HashMap<>();
+ Set<String> undefinedSet = new HashSet<>();
IConfiguration cfg = fRcInfo.getParent();
ITool[] nonManagedTools = null;
if (cfg.isManagedBuildOn() && cfg.supportsBuild(true)) {
- List<ITool> list = new ArrayList<ITool>();
+ List<ITool> list = new ArrayList<>();
for (int i = 0; i < fResultingTools.length; i++) {
if (!fResultingTools[i].getInitialTool().supportsBuild(true)) {
list.add(fResultingTools[i].getInitialTool());
@@ -152,7 +152,7 @@ public class ToolListModificationInfo {
private ToolInfo[] filterInfos(ToolInfo[] infos) {
if (fRcInfo instanceof FolderInfo) {
Map<ITool, ToolInfo> map = createInitialToolToToolInfoMap(infos);
- ITool[] tools = new ArrayList<ITool>(map.keySet()).toArray(new ITool[map.size()]);
+ ITool[] tools = new ArrayList<>(map.keySet()).toArray(new ITool[map.size()]);
tools = ((FolderInfo) fRcInfo).filterTools(tools, fRcInfo.getParent().getManagedProject());
@@ -168,7 +168,7 @@ public class ToolListModificationInfo {
}
private static Map<ITool, ToolInfo> createInitialToolToToolInfoMap(ToolInfo[] infos) {
- Map<ITool, ToolInfo> map = new LinkedHashMap<ITool, ToolInfo>();
+ Map<ITool, ToolInfo> map = new LinkedHashMap<>();
for (int i = 0; i < infos.length; i++) {
map.put(infos[i].getInitialTool(), infos[i]);
}
@@ -177,16 +177,16 @@ public class ToolListModificationInfo {
}
private ToolInfo[][] doCalculateConflictingTools(ToolInfo[] infos) {
- HashSet<ToolInfo> set = new HashSet<ToolInfo>();
+ HashSet<ToolInfo> set = new HashSet<>();
set.addAll(Arrays.asList(infos));
- List<ToolInfo[]> result = new ArrayList<ToolInfo[]>();
+ List<ToolInfo[]> result = new ArrayList<>();
for (Iterator<ToolInfo> iter = set.iterator(); iter.hasNext();) {
ToolInfo ti = iter.next();
ITool t = ti.getInitialTool();
iter.remove();
@SuppressWarnings("unchecked")
HashSet<ToolInfo> tmp = (HashSet<ToolInfo>) set.clone();
- List<ITool> list = new ArrayList<ITool>();
+ List<ITool> list = new ArrayList<>();
for (Iterator<ToolInfo> tmpIt = tmp.iterator(); tmpIt.hasNext();) {
ToolInfo otherTi = tmpIt.next();
ITool other = otherTi.getInitialTool();
@@ -213,8 +213,8 @@ public class ToolListModificationInfo {
IProject project = fRcInfo.getParent().getOwner().getProject();
String ext1[] = ((Tool) tool1).getAllInputExtensions(project);
String ext2[] = ((Tool) tool2).getAllInputExtensions(project);
- Set<String> set1 = new HashSet<String>(Arrays.asList(ext1));
- Set<String> result = new HashSet<String>();
+ Set<String> set1 = new HashSet<>(Arrays.asList(ext1));
+ Set<String> result = new HashSet<>();
for (int i = 0; i < ext2.length; i++) {
if (set1.remove(ext2[i]))
result.add(ext2[i]);
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ToolReference.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ToolReference.java
index 5e8880c7c1..fb436f052b 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ToolReference.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ToolReference.java
@@ -373,7 +373,7 @@ public class ToolReference implements IToolReference {
@Override
public List<String> getInputExtensions() {
String[] exts = getPrimaryInputExtensions();
- List<String> extList = new ArrayList<String>();
+ List<String> extList = new ArrayList<>();
for (int i = 0; i < exts.length; i++) {
extList.add(exts[i]);
}
@@ -445,7 +445,7 @@ public class ToolReference implements IToolReference {
* @return
*/
private List<String> getOutputsList() {
- ArrayList<String> answer = new ArrayList<String>();
+ ArrayList<String> answer = new ArrayList<>();
if (outputExtensions != null) {
String[] exts = outputExtensions.split(DEFAULT_SEPARATOR);
answer.addAll(Arrays.asList(exts));
@@ -632,7 +632,7 @@ public class ToolReference implements IToolReference {
@Override
public List<OptionReference> getOptionReferenceList() {
if (optionReferences == null) {
- optionReferences = new ArrayList<OptionReference>();
+ optionReferences = new ArrayList<>();
}
return optionReferences;
}
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/dataprovider/BuildEntryStorage.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/dataprovider/BuildEntryStorage.java
index e07a923c23..91f4563b20 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/dataprovider/BuildEntryStorage.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/dataprovider/BuildEntryStorage.java
@@ -177,7 +177,7 @@ public class BuildEntryStorage extends AbstractEntryStorage {
protected void putEntriesToLevel(int levelNum, SettingLevel level) {
switch (levelNum) {
case USER_ENTRIES_LEVEL:
- List<EmptyEntryInfo> emptyEntryInfos = new ArrayList<EmptyEntryInfo>();
+ List<EmptyEntryInfo> emptyEntryInfos = new ArrayList<>();
for (UserEntryInfo userEntry : getUserEntries(level.getFlags(0), true, emptyEntryInfos)) {
level.addEntry(userEntry.fEntry, userEntry);
}
@@ -233,7 +233,7 @@ public class BuildEntryStorage extends AbstractEntryStorage {
private UserEntryInfo[] getUserEntries(int flags, boolean usr, List<EmptyEntryInfo> emptyValuesInfos) {
IOption options[] = fLangData.getOptionsForKind(getKind());
if (options.length > 0) {
- List<UserEntryInfo> entryList = new ArrayList<UserEntryInfo>();
+ List<UserEntryInfo> entryList = new ArrayList<>();
for (IOption opt : options) {
Option option = (Option) opt;
try {
@@ -254,7 +254,7 @@ public class BuildEntryStorage extends AbstractEntryStorage {
} else {
// If resolved, add each resolved entry as a separate UserEntryInfo
boolean isMultiple = rVes.length > 1;
- List<UserEntryInfo> sequense = isMultiple ? new ArrayList<UserEntryInfo>(rVes.length)
+ List<UserEntryInfo> sequense = isMultiple ? new ArrayList<>(rVes.length)
: null;
for (OptionStringValue rVe : rVes) {
ICLanguageSettingEntry entry = createUserEntry(option, rVe, flags, subst);
@@ -303,7 +303,7 @@ public class BuildEntryStorage extends AbstractEntryStorage {
List<String> list = (List<String>) option.getValue();
if (list.size() != 0) {
if (set == null)
- set = new HashSet<String>();
+ set = new HashSet<>();
set.addAll(list);
}
}
@@ -709,7 +709,7 @@ public class BuildEntryStorage extends AbstractEntryStorage {
if (emptyEntryInfos == null || emptyEntryInfos.size() == 0)
return infos;
- LinkedList<UserEntryInfo> list = new LinkedList<UserEntryInfo>();
+ LinkedList<UserEntryInfo> list = new LinkedList<>();
list.addAll(Arrays.asList(infos));
for (int i = 0; i < emptyEntryInfos.size(); i++) {
EmptyEntryInfo ei = emptyEntryInfos.get(i);
@@ -735,7 +735,7 @@ public class BuildEntryStorage extends AbstractEntryStorage {
if (infos.length == 0)
return infos;
- List<UserEntryInfo> list = new ArrayList<UserEntryInfo>(infos.length);
+ List<UserEntryInfo> list = new ArrayList<>(infos.length);
for (int i = 0; i < infos.length; i++) {
UserEntryInfo info = infos[i];
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/dataprovider/BuildEnvironmentContributor.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/dataprovider/BuildEnvironmentContributor.java
index d6639e8d84..9f72c66161 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/dataprovider/BuildEnvironmentContributor.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/dataprovider/BuildEnvironmentContributor.java
@@ -98,7 +98,7 @@ public class BuildEnvironmentContributor implements IEnvironmentContributor {
boolean checkSet = true;
if (vars != null && vars.length != 0) {
if (set == null) {
- set = new HashSet<String>();
+ set = new HashSet<>();
checkSet = false;
}
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/dataprovider/BuildLanguageData.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/dataprovider/BuildLanguageData.java
index 24dbef293d..9e4d91da56 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/dataprovider/BuildLanguageData.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/dataprovider/BuildLanguageData.java
@@ -55,12 +55,12 @@ public class BuildLanguageData extends CLanguageData {
/** The main kind => BuildEntryStorage store
* The BuildEntryStorage calls back to this BuildLanguageData
* to work out which entries are actually (un)defined. */
- private KindBasedStore<BuildEntryStorage> fKindToEntryStore = new KindBasedStore<BuildEntryStorage>();
+ private KindBasedStore<BuildEntryStorage> fKindToEntryStore = new KindBasedStore<>();
/** Indicates that the option array stores have been inited */
private volatile boolean fOptionStoreInited;
- private KindBasedStore<IOption[]> fKindToOptionArrayStore = new KindBasedStore<IOption[]>();
- private KindBasedStore<IOption[]> fKindToUndefOptionArrayStore = new KindBasedStore<IOption[]>();
+ private KindBasedStore<IOption[]> fKindToOptionArrayStore = new KindBasedStore<>();
+ private KindBasedStore<IOption[]> fKindToUndefOptionArrayStore = new KindBasedStore<>();
// private Map fKindToEntryArrayMap = new HashMap();
// private ProfileInfoProvider fDiscoveredInfo;
@@ -155,7 +155,7 @@ public class BuildLanguageData extends CLanguageData {
@Override
public ICLanguageSettingEntry[] getEntries(int kinds) {
- List<ICLanguageSettingEntry> list = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> list = new ArrayList<>();
if ((kinds & ICLanguageSettingEntry.INCLUDE_PATH) != 0) {
BuildEntryStorage storage = getEntryStorage(ICLanguageSettingEntry.INCLUDE_PATH);
@@ -239,7 +239,7 @@ public class BuildLanguageData extends CLanguageData {
private void calculateKindToOptionArrayStore() {
fKindToOptionArrayStore.clear();
- Map<Integer, List<IOption>> kindToOptionList = new HashMap<Integer, List<IOption>>();
+ Map<Integer, List<IOption>> kindToOptionList = new HashMap<>();
IOption options[] = fTool.getOptions();
for (final IOption option : options) {
try {
@@ -272,7 +272,7 @@ public class BuildLanguageData extends CLanguageData {
private void calculateKindToUndefOptionArrayStore() {
fKindToUndefOptionArrayStore.clear();
- Map<Integer, List<IOption>> kindToOptionList = new HashMap<Integer, List<IOption>>();
+ Map<Integer, List<IOption>> kindToOptionList = new HashMap<>();
IOption options[] = fTool.getOptions();
for (final IOption option : options) {
try {
@@ -397,8 +397,8 @@ public class BuildLanguageData extends CLanguageData {
public void setSourceContentTypeIds(String[] ids) {
String[] headerIds = fInputType.getHeaderContentTypeIds();
- List<String> newSrc = new ArrayList<String>(ids.length);
- List<String> newHeaders = new ArrayList<String>(ids.length);
+ List<String> newSrc = new ArrayList<>(ids.length);
+ List<String> newHeaders = new ArrayList<>(ids.length);
for (int i = 0; i < ids.length; i++) {
String id = ids[i];
int j = 0;
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/dataprovider/BuildSystemSpecificVariableSubstitutor.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/dataprovider/BuildSystemSpecificVariableSubstitutor.java
index 0ddfc08d41..8897d8c5fe 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/dataprovider/BuildSystemSpecificVariableSubstitutor.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/dataprovider/BuildSystemSpecificVariableSubstitutor.java
@@ -26,11 +26,11 @@ import org.eclipse.cdt.utils.cdtvariables.IVariableContextInfo;
import org.eclipse.cdt.utils.cdtvariables.SupplierBasedCdtVariableSubstitutor;
public class BuildSystemSpecificVariableSubstitutor extends SupplierBasedCdtVariableSubstitutor {
- private static final Set<String> fFileVarsSet = new HashSet<String>(
+ private static final Set<String> fFileVarsSet = new HashSet<>(
Arrays.asList(MbsMacroSupplier.getInstance().getMacroNames(IBuildMacroProvider.CONTEXT_FILE)));
- private static final Set<String> fOptionVarsSet = new HashSet<String>(
+ private static final Set<String> fOptionVarsSet = new HashSet<>(
Arrays.asList(MbsMacroSupplier.getInstance().getMacroNames(IBuildMacroProvider.CONTEXT_OPTION)));
- private static final Set<String> fToolVarsSet = new HashSet<String>(
+ private static final Set<String> fToolVarsSet = new HashSet<>(
Arrays.asList(MbsMacroSupplier.getInstance().getMacroNames(IBuildMacroProvider.CONTEXT_TOOL)));
public BuildSystemSpecificVariableSubstitutor(IVariableContextInfo contextInfo, String inexistentMacroValue,
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/dataprovider/ConfigurationDataProvider.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/dataprovider/ConfigurationDataProvider.java
index 463e4ff8a3..33203750cc 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/dataprovider/ConfigurationDataProvider.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/dataprovider/ConfigurationDataProvider.java
@@ -450,7 +450,7 @@ public class ConfigurationDataProvider extends CConfigurationDataProvider implem
private static void adjustFolderInfo(IFolderInfo info, ILanguageDescriptor dess[],
HashMap<Object, ILanguageDescriptor[]> map) {
IToolChain tch = info.getToolChain();
- Map<String, ILanguageDescriptor> langMap = new HashMap<String, ILanguageDescriptor>();
+ Map<String, ILanguageDescriptor> langMap = new HashMap<>();
for (int i = 0; i < dess.length; i++) {
langMap.put(dess[i].getId(), dess[i]);
}
@@ -495,12 +495,12 @@ public class ConfigurationDataProvider extends CConfigurationDataProvider implem
String srcIds[] = type.getSourceContentTypeIds();
String hIds[] = type.getHeaderContentTypeIds();
- Set<String> landTypes = new HashSet<String>(Arrays.asList(cTypeIds));
+ Set<String> landTypes = new HashSet<>(Arrays.asList(cTypeIds));
landTypes.removeAll(Arrays.asList(srcIds));
landTypes.removeAll(Arrays.asList(hIds));
if (landTypes.size() != 0) {
- List<String> srcList = new ArrayList<String>();
+ List<String> srcList = new ArrayList<>();
srcList.addAll(landTypes);
type = (InputType) tool.getEditableInputType(type);
type.setSourceContentTypeIds(srcList.toArray(new String[srcList.size()]));
@@ -517,7 +517,7 @@ public class ConfigurationDataProvider extends CConfigurationDataProvider implem
private static void addTools(IToolChain tc, Map<String, ILanguageDescriptor> langMap,
Map<Object, ILanguageDescriptor[]> cTypeToLangMap) {
ITool extTool = ManagedBuildManager.getExtensionTool(PREF_TOOL_ID);
- List<ILanguageDescriptor> list = new ArrayList<ILanguageDescriptor>(langMap.values());
+ List<ILanguageDescriptor> list = new ArrayList<>(langMap.values());
ILanguageDescriptor des;
while (list.size() != 0) {
des = list.remove(list.size() - 1);
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/dataprovider/ProjectConverter.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/dataprovider/ProjectConverter.java
index f090166154..f50e278209 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/dataprovider/ProjectConverter.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/dataprovider/ProjectConverter.java
@@ -100,7 +100,7 @@ public class ProjectConverter implements ICProjectConverter {
return false;
IProjectDescription eDes = project.getDescription();
- Set<String> natureSet = new HashSet<String>(Arrays.asList(eDes.getNatureIds()));
+ Set<String> natureSet = new HashSet<>(Arrays.asList(eDes.getNatureIds()));
if (natureSet.contains(OLD_MAKE_NATURE_ID))
return true;
@@ -117,7 +117,7 @@ public class ProjectConverter implements ICProjectConverter {
@Override
public ICProjectDescription convertProject(IProject project, IProjectDescription eDes, String oldOwnerId,
ICProjectDescription oldDes) throws CoreException {
- Set<String> natureSet = new HashSet<String>(Arrays.asList(eDes.getNatureIds()));
+ Set<String> natureSet = new HashSet<>(Arrays.asList(eDes.getNatureIds()));
CoreModel model = CoreModel.getDefault();
ICProjectDescription newDes = null;
IManagedBuildInfo info = null;
@@ -173,7 +173,7 @@ public class ProjectConverter implements ICProjectConverter {
changeEDes = false;
ICommand[] cmds = eDes.getBuildSpec();
- List<ICommand> list = new ArrayList<ICommand>(Arrays.asList(cmds));
+ List<ICommand> list = new ArrayList<>(Arrays.asList(cmds));
ICommand makeBuilderCmd = null;
for (Iterator<ICommand> iter = list.iterator(); iter.hasNext();) {
ICommand cmd = iter.next();
@@ -365,7 +365,7 @@ public class ProjectConverter implements ICProjectConverter {
Map<String, String> fromMap = fromTarget.getEnvironment();
if (fromMap != null)
- toTarget.setEnvironment(new HashMap<String, String>(fromMap));
+ toTarget.setEnvironment(new HashMap<>(fromMap));
// toTarget.setErrorParsers(fromTarget.getErrorParsers());
@@ -385,7 +385,7 @@ public class ProjectConverter implements ICProjectConverter {
if (el != null) {
IPathEntry[] entries = PathEntryTranslator.decodePathEntries(project, el);
if (entries.length != 0) {
- List<IPathEntry> list = new ArrayList<IPathEntry>(Arrays.asList(entries));
+ List<IPathEntry> list = new ArrayList<>(Arrays.asList(entries));
for (Iterator<IPathEntry> iter = list.iterator(); iter.hasNext();) {
IPathEntry entry = iter.next();
if (entry.getEntryKind() == IPathEntry.CDT_CONTAINER) {
@@ -413,7 +413,7 @@ public class ProjectConverter implements ICProjectConverter {
IPath projPaths[] = refInfo.getReferencedProjectsPaths();
if (projPaths.length != 0) {
- Map<String, String> map = new HashMap<String, String>(projPaths.length);
+ Map<String, String> map = new HashMap<>(projPaths.length);
for (int i = 0; i < projPaths.length; i++) {
map.put(projPaths[i].segment(0), ""); //$NON-NLS-1$
}
@@ -511,7 +511,7 @@ public class ProjectConverter implements ICProjectConverter {
final IProjectDescription eDes = project.getDescription();
String natureIds[] = eDes.getNatureIds();
- Set<String> set = new HashSet<String>(Arrays.asList(natureIds));
+ Set<String> set = new HashSet<>(Arrays.asList(natureIds));
if (!set.contains(OLD_MAKE_NATURE_ID)) {
if (throwExceptions)
throw new CoreException(new Status(IStatus.ERROR, ManagedBuilderCorePlugin.getUniqueIdentifier(),
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/dataprovider/ResourcePropertyHolder.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/dataprovider/ResourcePropertyHolder.java
index 37aa52f666..e2f600d0d3 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/dataprovider/ResourcePropertyHolder.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/dataprovider/ResourcePropertyHolder.java
@@ -22,7 +22,7 @@ import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IResourceChangeEvent;
class ResourcePropertyHolder extends ResourceChangeHandlerBase {
- private Map<String, Map<String, Boolean>> fRcMap = new HashMap<String, Map<String, Boolean>>();
+ private Map<String, Map<String, Boolean>> fRcMap = new HashMap<>();
private boolean fProjectOnly;
public ResourcePropertyHolder(boolean projectOnly) {
@@ -88,7 +88,7 @@ class ResourcePropertyHolder extends ResourceChangeHandlerBase {
String key = keyForResource(rc);
Map<String, Boolean> map = fRcMap.get(key);
if (map == null && create) {
- map = new HashMap<String, Boolean>();
+ map = new HashMap<>();
fRcMap.put(key, map);
}
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/enablement/AdjustmentContext.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/enablement/AdjustmentContext.java
index 914938544e..f7711d0810 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/enablement/AdjustmentContext.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/enablement/AdjustmentContext.java
@@ -51,7 +51,7 @@ public class AdjustmentContext {
// return fType;
// }
- private HashMap<String, Boolean> fMap = new HashMap<String, Boolean>();
+ private HashMap<String, Boolean> fMap = new HashMap<>();
public void addAdjustedState(String attr, boolean adjusted) {
Boolean b = fMap.get(attr);
@@ -64,7 +64,7 @@ public class AdjustmentContext {
if (fMap.size() == 0)
return new String[0];
- ArrayList<String> list = new ArrayList<String>(fMap.size());
+ ArrayList<String> list = new ArrayList<>(fMap.size());
Set<Entry<String, Boolean>> entrySet = fMap.entrySet();
for (Entry<String, Boolean> entry : entrySet) {
Boolean b = entry.getValue();
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/enablement/CompositeExpression.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/enablement/CompositeExpression.java
index 5b4700b2d3..86837d0fb8 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/enablement/CompositeExpression.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/enablement/CompositeExpression.java
@@ -71,7 +71,7 @@ public abstract class CompositeExpression implements IBooleanExpression {
public Map<String, Set<String>> getReferencedProperties(Map<String, Set<String>> map) {
IBooleanExpression children[] = getChildren();
if (map == null)
- map = new HashMap<String, Set<String>>();
+ map = new HashMap<>();
for (int i = 0; i < children.length; i++) {
IBooleanExpression child = children[i];
@@ -84,7 +84,7 @@ public abstract class CompositeExpression implements IBooleanExpression {
if (prop != null && prop.length() != 0 && val != null && val.length() != 0) {
Set<String> set = map.get(prop);
if (set == null) {
- set = new HashSet<String>();
+ set = new HashSet<>();
map.put(prop, set);
}
set.add(val);
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/enablement/OptionEnablementExpression.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/enablement/OptionEnablementExpression.java
index ce516d3276..8e2957b3a6 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/enablement/OptionEnablementExpression.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/enablement/OptionEnablementExpression.java
@@ -122,7 +122,7 @@ public class OptionEnablementExpression extends AndExpression {
}
public String[] convertToList(String value, String delimiter) {
- List<String> list = new ArrayList<String>();
+ List<String> list = new ArrayList<>();
int delLength = delimiter.length();
int valLength = value.length();
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/envvar/EnvironmentVariableProvider.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/envvar/EnvironmentVariableProvider.java
index 88d8956f5e..6b84144f62 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/envvar/EnvironmentVariableProvider.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/envvar/EnvironmentVariableProvider.java
@@ -192,7 +192,7 @@ public class EnvironmentVariableProvider implements IEnvironmentVariableProvider
@Override
public String[] getBuildPaths(IConfiguration configuration, int buildPathType) {
ITool tools[] = configuration.getFilteredTools();
- List<String> list = new ArrayList<String>();
+ List<String> list = new ArrayList<>();
for (ITool tool : tools) {
IEnvVarBuildPath pathDescriptors[] = tool.getEnvVarBuildPaths();
@@ -237,7 +237,7 @@ public class EnvironmentVariableProvider implements IEnvironmentVariableProvider
*/
private List<IEnvironmentBuildPathsChangeListener> getListeners() {
if (fListeners == null)
- fListeners = new ArrayList<IEnvironmentBuildPathsChangeListener>();
+ fListeners = new ArrayList<>();
return fListeners;
}
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/envvar/MbsEnvironmentSupplier.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/envvar/MbsEnvironmentSupplier.java
index bab8be8c29..31e8eae274 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/envvar/MbsEnvironmentSupplier.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/envvar/MbsEnvironmentSupplier.java
@@ -83,7 +83,7 @@ public class MbsEnvironmentSupplier implements IEnvironmentVariableSupplier {
@Override
public IEnvironmentVariable[] getVariables(Object context) {
if (context instanceof IConfiguration) {
- List<IBuildEnvironmentVariable> variables = new ArrayList<IBuildEnvironmentVariable>(2);
+ List<IBuildEnvironmentVariable> variables = new ArrayList<>(2);
IBuildEnvironmentVariable var = getConfigurationVariable("CWD", (IConfiguration) context); //$NON-NLS-1$
if (var != null) {
variables.add(var);
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/envvar/StoredBuildPathEnvironmentContainer.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/envvar/StoredBuildPathEnvironmentContainer.java
index 4fc9d959fb..4e18abf35d 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/envvar/StoredBuildPathEnvironmentContainer.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/envvar/StoredBuildPathEnvironmentContainer.java
@@ -248,7 +248,7 @@ public class StoredBuildPathEnvironmentContainer extends StorableEnvironmentLoad
private String[] getBuildPathVarNames(IConfiguration configuration, int buildPathType) {
ITool tools[] = configuration.getFilteredTools();
- List<String> list = new ArrayList<String>();
+ List<String> list = new ArrayList<>();
for (int i = 0; i < tools.length; i++) {
IEnvVarBuildPath pathDescriptors[] = tools[i].getEnvVarBuildPaths();
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/language/settings/providers/MBSLanguageSettingsProvider.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/language/settings/providers/MBSLanguageSettingsProvider.java
index 3f12c97ff6..e297f4e102 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/language/settings/providers/MBSLanguageSettingsProvider.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/language/settings/providers/MBSLanguageSettingsProvider.java
@@ -69,7 +69,7 @@ public class MBSLanguageSettingsProvider extends AbstractExecutableExtensionBase
}
// this list is allowed to contain duplicate entries, cannot be LinkedHashSet
- List<ICLanguageSettingEntry> list = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> list = new ArrayList<>();
if (languageSettings != null) {
for (ICLanguageSetting langSetting : languageSettings) {
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/macros/BuildMacroProvider.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/macros/BuildMacroProvider.java
index 200176190e..bd6a8c3275 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/macros/BuildMacroProvider.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/macros/BuildMacroProvider.java
@@ -121,7 +121,7 @@ public class BuildMacroProvider implements IBuildMacroProvider, IMacroContextInf
}
private static IBuildMacroSupplier[] filterMacroSuppliers(ICdtVariableSupplier suppliers[]) {
- List<ICdtVariableSupplier> list = new ArrayList<ICdtVariableSupplier>(suppliers.length);
+ List<ICdtVariableSupplier> list = new ArrayList<>(suppliers.length);
for (int i = 0; i < suppliers.length; i++) {
if (suppliers[i] instanceof IBuildMacroSupplier)
list.add(suppliers[i]);
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/macros/BuildfileMacroSubstitutor.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/macros/BuildfileMacroSubstitutor.java
index 63a637c1b0..a937b15f0e 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/macros/BuildfileMacroSubstitutor.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/macros/BuildfileMacroSubstitutor.java
@@ -95,7 +95,7 @@ public class BuildfileMacroSubstitutor extends SupplierBasedCdtVariableSubstitut
protected String[] getConfigurationReservedNames(IConfiguration configuration) {
ITool tools[] = configuration.getFilteredTools();
if (tools != null) {
- Set<String> set = new HashSet<String>();
+ Set<String> set = new HashSet<>();
for (int i = 0; i < tools.length; i++) {
IOutputType ots[] = tools[i].getOutputTypes();
if (ots != null) {
@@ -273,7 +273,7 @@ public class BuildfileMacroSubstitutor extends SupplierBasedCdtVariableSubstitut
protected Set<String> getCaseInsensitiveReferencedNames() {
if (fCaseInsensitiveReferencedNames == null)
- fCaseInsensitiveReferencedNames = new HashSet<String>();
+ fCaseInsensitiveReferencedNames = new HashSet<>();
return fCaseInsensitiveReferencedNames;
}
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/macros/ExplicitFileMacroCollector.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/macros/ExplicitFileMacroCollector.java
index f7c523f87a..ba3c8ed3f4 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/macros/ExplicitFileMacroCollector.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/macros/ExplicitFileMacroCollector.java
@@ -30,7 +30,7 @@ import org.eclipse.cdt.utils.cdtvariables.SupplierBasedCdtVariableSubstitutor;
public class ExplicitFileMacroCollector extends SupplierBasedCdtVariableSubstitutor {
private static final String EMPTY_STRING = ""; //$NON-NLS-1$
- private List<ICdtVariable> fMacrosList = new ArrayList<ICdtVariable>();
+ private List<ICdtVariable> fMacrosList = new ArrayList<>();
/* public ExplicitFileMacroCollector(int contextType, Object contextData){
super(contextType, contextData, EMPTY_STRING, EMPTY_STRING);
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/macros/FileContextBuildMacroValues.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/macros/FileContextBuildMacroValues.java
index d8a332d088..1cb2b1a157 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/macros/FileContextBuildMacroValues.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/macros/FileContextBuildMacroValues.java
@@ -31,8 +31,8 @@ public class FileContextBuildMacroValues implements IFileContextBuildMacroValues
private IBuilder fBuilder;
private IFileContextBuildMacroValues fSupperClassValues;
- private HashMap<String, String> fValues = new HashMap<String, String>();
- private HashMap<String, String> fAllValues = new HashMap<String, String>();
+ private HashMap<String, String> fValues = new HashMap<>();
+ private HashMap<String, String> fAllValues = new HashMap<>();
private boolean fInitialized;
public FileContextBuildMacroValues(IBuilder builder, IManagedConfigElement element) {
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/scannerconfig/ManagedBuildCPathEntryContainer.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/scannerconfig/ManagedBuildCPathEntryContainer.java
index 5aea167cf9..f79826aaf9 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/scannerconfig/ManagedBuildCPathEntryContainer.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/scannerconfig/ManagedBuildCPathEntryContainer.java
@@ -90,7 +90,7 @@ public class ManagedBuildCPathEntryContainer implements IPathEntryContainer {
public ManagedBuildCPathEntryContainer(IProject project) {
super();
this.project = project;
- entries = new Vector<IPathEntry>();
+ entries = new Vector<>();
}
protected void addDefinedSymbols(Map<String, String> definedSymbols) {
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/ConfigurationModification.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/ConfigurationModification.java
index c9b2567bfa..16f60f9980 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/ConfigurationModification.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/ConfigurationModification.java
@@ -138,8 +138,8 @@ public class ConfigurationModification extends FolderInfoModification implements
if (fCompatibilityInfoInited)
return;
- fCompatibleBuilders = new HashMap<IBuilder, BuilderCompatibilityInfoElement>();
- fInCompatibleBuilders = new HashMap<IBuilder, BuilderCompatibilityInfoElement>();
+ fCompatibleBuilders = new HashMap<>();
+ fInCompatibleBuilders = new HashMap<>();
ConflictMatchSet conflicts = getParentConflictMatchSet();
IBuilder sysBs[] = getAllSysBuilders();
@SuppressWarnings("unchecked")
@@ -172,7 +172,7 @@ public class ConfigurationModification extends FolderInfoModification implements
@Override
public IBuilder[] getCompatibleBuilders() {
initCompatibilityInfo();
- List<IBuilder> l = new ArrayList<IBuilder>(fCompatibleBuilders.size());
+ List<IBuilder> l = new ArrayList<>(fCompatibleBuilders.size());
IConfiguration cfg = getResourceInfo().getParent();
Set<IBuilder> keySet = fCompatibleBuilders.keySet();
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/ConflictSet.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/ConflictSet.java
index 569a14db44..a166526c7e 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/ConflictSet.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/ConflictSet.java
@@ -45,10 +45,10 @@ public class ConflictSet {
private void init() {
if (fConflictStorage == null) {
- fConflictStorage = new PerTypeMapStorage<IRealBuildObjectAssociation, Conflict>();
+ fConflictStorage = new PerTypeMapStorage<>();
if (fConflictMatchList != null && fConflictMatchList.size() != 0) {
int size = fConflictMatchList.size();
- PerTypeMapStorage<IRealBuildObjectAssociation, Set<IPath>> result = new PerTypeMapStorage<IRealBuildObjectAssociation, Set<IPath>>();
+ PerTypeMapStorage<IRealBuildObjectAssociation, Set<IPath>> result = new PerTypeMapStorage<>();
for (int i = 0; i < size; i++) {
ConflictMatch match = fConflictMatchList.get(i);
int objType = match.fMatchType;
@@ -65,7 +65,7 @@ public class ConflictSet {
Set<IPath> set = cur.get(bo);
if (set == null) {
- set = new TreeSet<IPath>(PathComparator.INSTANCE);
+ set = new TreeSet<>(PathComparator.INSTANCE);
cur.put(bo, set);
}
@@ -129,7 +129,7 @@ public class ConflictSet {
public IConflict[] getConflicts() {
init();
int types[] = ObjectTypeBasedStorage.getSupportedObjectTypes();
- List<Conflict> list = new ArrayList<Conflict>();
+ List<Conflict> list = new ArrayList<>();
for (int i = 0; i < types.length; i++) {
Map<IRealBuildObjectAssociation, Conflict> map = fConflictStorage.getMap(types[i], false);
if (map == null)
@@ -143,7 +143,7 @@ public class ConflictSet {
private static List<Conflict> getConflicts(Map<IRealBuildObjectAssociation, Conflict> map, List<Conflict> list) {
if (list == null)
- list = new ArrayList<Conflict>();
+ list = new ArrayList<>();
Collection<Conflict> conflicts = map.values();
for (Conflict conflict : conflicts) {
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/FileInfoModification.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/FileInfoModification.java
index 52011296cc..615a37234c 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/FileInfoModification.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/FileInfoModification.java
@@ -59,7 +59,7 @@ public class FileInfoModification extends ToolListModification implements IFileI
@Override
protected Set<IPath> getToolApplicabilityPathSet(Tool realTool, boolean isProject) {
if (fApplPathSet == null) {
- Set<IPath> s = new HashSet<IPath>(1);
+ Set<IPath> s = new HashSet<>(1);
s.add(getResourceInfo().getPath());
fApplPathSet = Collections.unmodifiableSet(s);
}
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/FolderInfoModification.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/FolderInfoModification.java
index a12353bea6..ba70125b14 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/FolderInfoModification.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/FolderInfoModification.java
@@ -100,9 +100,9 @@ public class FolderInfoModification extends ToolListModification implements IFol
}
private static class ToolChainApplicabilityPaths {
- private Set<IPath> fFileInfoPaths = new HashSet<IPath>();
- private Set<IPath> fFolderInfoPaths = new HashSet<IPath>();
- private Map<Tool, Set<IPath>> fToolPathMap = new HashMap<Tool, Set<IPath>>();
+ private Set<IPath> fFileInfoPaths = new HashSet<>();
+ private Set<IPath> fFolderInfoPaths = new HashSet<>();
+ private Map<Tool, Set<IPath>> fToolPathMap = new HashMap<>();
}
public static class ToolChainCompatibilityInfoElement {
@@ -143,7 +143,7 @@ public class FolderInfoModification extends ToolListModification implements IFol
initCompatibilityInfo();
FolderInfo foInfo = (FolderInfo) getResourceInfo();
- List<ToolChain> l = new ArrayList<ToolChain>(fCompatibleToolChains.size());
+ List<ToolChain> l = new ArrayList<>(fCompatibleToolChains.size());
Set<ToolChain> keySet = fCompatibleToolChains.keySet();
for (ToolChain tc : keySet) {
if (tc != fRealToolChain && foInfo.isToolChainCompatible(fRealToolChain, tc))
@@ -177,8 +177,8 @@ public class FolderInfoModification extends ToolListModification implements IFol
if (fCompatibilityInfoInited)
return;
- fCompatibleToolChains = new HashMap<ToolChain, ToolChainCompatibilityInfoElement>();
- fInCompatibleToolChains = new HashMap<ToolChain, ToolChainCompatibilityInfoElement>();
+ fCompatibleToolChains = new HashMap<>();
+ fInCompatibleToolChains = new HashMap<>();
ConflictMatchSet parentConflicts = getParentConflictMatchSet();
ToolChain sysTCs[] = (ToolChain[]) getAllSysToolChains();
@@ -259,7 +259,7 @@ public class FolderInfoModification extends ToolListModification implements IFol
for (String ext : exts) {
if (inputExts.contains(ext)) {
if (curInputExts == null)
- curInputExts = new HashSet<String>(Arrays.asList(fromTool.getPrimaryInputExtensions()));
+ curInputExts = new HashSet<>(Arrays.asList(fromTool.getPrimaryInputExtensions()));
if (curInputExts.contains(ext)) {
return true;
@@ -272,7 +272,7 @@ public class FolderInfoModification extends ToolListModification implements IFol
@Override
protected Set<Tool> getExtensionConflictToolSet(Tool tool, Tool[] tools) {
String exts[] = tool.getPrimaryInputExtensions();
- Set<String> extsSet = new HashSet<String>(Arrays.asList(exts));
+ Set<String> extsSet = new HashSet<>(Arrays.asList(exts));
Set<Tool> conflictsSet = null;
for (int i = 0; i < tools.length; i++) {
Tool t = tools[i];
@@ -280,7 +280,7 @@ public class FolderInfoModification extends ToolListModification implements IFol
continue;
if (TcModificationUtil.containCommonEntries(extsSet, t.getPrimaryInputExtensions())) {
if (conflictsSet == null)
- conflictsSet = new HashSet<Tool>();
+ conflictsSet = new HashSet<>();
conflictsSet.add(t);
}
@@ -336,7 +336,7 @@ public class FolderInfoModification extends ToolListModification implements IFol
if (toolSet != null) {
for (IRealBuildObjectAssociation oa : toolSet) {
Tool tool = (Tool) oa;
- Set<IPath> set = new HashSet<IPath>();
+ Set<IPath> set = new HashSet<>();
toolPathsMap.put(tool, set);
set.add(path);
}
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/ObjectSet.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/ObjectSet.java
index 8efd5a250c..a1557646b7 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/ObjectSet.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/ObjectSet.java
@@ -42,7 +42,7 @@ public class ObjectSet implements IObjectSet {
@Override
public Collection<IRealBuildObjectAssociation> getRealBuildObjects(Collection<IRealBuildObjectAssociation> set) {
if (set == null)
- set = new HashSet<IRealBuildObjectAssociation>();
+ set = new HashSet<>();
set.addAll(fObjectSet);
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/PathComparator.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/PathComparator.java
index 52f60f0a29..0729b097a0 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/PathComparator.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/PathComparator.java
@@ -82,7 +82,7 @@ public class PathComparator implements Comparator<IPath> {
SortedMap<IPath, PerTypeSetStorage<IRealBuildObjectAssociation>> result = next != null ? map.subMap(start, next)
: map.tailMap(start);
if (copy)
- result = new TreeMap<IPath, PerTypeSetStorage<IRealBuildObjectAssociation>>(result);
+ result = new TreeMap<>(result);
return result;
}
@@ -92,14 +92,14 @@ public class PathComparator implements Comparator<IPath> {
IPath next = getNext(path);
SortedSet<IPath> result = next != null ? set.subSet(start, next) : set.tailSet(start);
if (copy)
- result = new TreeSet<IPath>(result);
+ result = new TreeSet<>(result);
return result;
}
public static SortedSet<IPath> getDirectChildPathSet(SortedSet<IPath> set, IPath path) {
//all children
SortedSet<IPath> children = getChildPathSet(set, path, false, false);
- SortedSet<IPath> result = new TreeSet<IPath>(INSTANCE);
+ SortedSet<IPath> result = new TreeSet<>(INSTANCE);
for (IPath childPath : children) {
result.add(childPath);
children = children.tailSet(getNext(childPath));
@@ -113,7 +113,7 @@ public class PathComparator implements Comparator<IPath> {
//all children
SortedMap<IPath, PerTypeSetStorage<IRealBuildObjectAssociation>> children = getChildPathMap(map, path, false,
false);
- SortedMap<IPath, PerTypeSetStorage<IRealBuildObjectAssociation>> result = new TreeMap<IPath, PerTypeSetStorage<IRealBuildObjectAssociation>>(
+ SortedMap<IPath, PerTypeSetStorage<IRealBuildObjectAssociation>> result = new TreeMap<>(
INSTANCE);
for (Iterator<Map.Entry<IPath, PerTypeSetStorage<IRealBuildObjectAssociation>>> iter = children.entrySet()
.iterator(); iter.hasNext(); iter = children.entrySet().iterator()) {
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/PerTypeMapStorage.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/PerTypeMapStorage.java
index 11a3ccabd1..b2da5de16d 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/PerTypeMapStorage.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/PerTypeMapStorage.java
@@ -26,7 +26,7 @@ import org.eclipse.cdt.managedbuilder.internal.core.IRealBuildObjectAssociation;
* @param <V> - the type of values in the map
*/
public class PerTypeMapStorage<K extends IRealBuildObjectAssociation, V> implements Cloneable {
- private ObjectTypeBasedStorage<Map<K, V>> fStorage = new ObjectTypeBasedStorage<Map<K, V>>();
+ private ObjectTypeBasedStorage<Map<K, V>> fStorage = new ObjectTypeBasedStorage<>();
public Map<K, V> getMap(int type, boolean create) {
Map<K, V> map = fStorage.get(type);
@@ -39,7 +39,7 @@ public class PerTypeMapStorage<K extends IRealBuildObjectAssociation, V> impleme
protected Map<K, V> createMap(Map<K, V> map) {
if (map == null) {
- return new HashMap<K, V>();
+ return new HashMap<>();
}
@SuppressWarnings("unchecked")
Map<K, V> clone = (Map<K, V>) ((HashMap<K, V>) map).clone();
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/PerTypeSetStorage.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/PerTypeSetStorage.java
index 1438e261b6..3ac8b47695 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/PerTypeSetStorage.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/PerTypeSetStorage.java
@@ -17,7 +17,7 @@ import java.util.LinkedHashSet;
import java.util.Set;
public class PerTypeSetStorage<T> implements Cloneable {
- private ObjectTypeBasedStorage<Set<T>> fStorage = new ObjectTypeBasedStorage<Set<T>>();
+ private ObjectTypeBasedStorage<Set<T>> fStorage = new ObjectTypeBasedStorage<>();
public Set<T> getSet(int type, boolean create) {
Set<T> set = fStorage.get(type);
@@ -30,7 +30,7 @@ public class PerTypeSetStorage<T> implements Cloneable {
protected Set<T> createSet(Set<T> set) {
if (set == null)
- return new LinkedHashSet<T>();
+ return new LinkedHashSet<>();
@SuppressWarnings("unchecked")
Set<T> clone = (Set<T>) ((LinkedHashSet<T>) set).clone();
return clone;
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/TcModificationUtil.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/TcModificationUtil.java
index 12be582a12..d3c08b071b 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/TcModificationUtil.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/TcModificationUtil.java
@@ -78,7 +78,7 @@ public class TcModificationUtil {
public static PerTypeMapStorage<IRealBuildObjectAssociation, Set<IPath>> createChildObjectsRealToolToPathSet(
FolderInfo foInfo, Map<IRealBuildObjectAssociation, Set<IPath>> toolChainMap,
Map<IRealBuildObjectAssociation, Set<IPath>> toolsMap, boolean addSkipPaths) {
- PerTypeMapStorage<IRealBuildObjectAssociation, Set<IPath>> storage = new PerTypeMapStorage<IRealBuildObjectAssociation, Set<IPath>>();
+ PerTypeMapStorage<IRealBuildObjectAssociation, Set<IPath>> storage = new PerTypeMapStorage<>();
IToolChain tc = foInfo.getToolChain();
IToolChain rTc = ManagedBuildManager.getRealToolChain(tc);
@@ -98,7 +98,7 @@ public class TcModificationUtil {
public static PerTypeMapStorage<IRealBuildObjectAssociation, Set<IPath>> createParentObjectsRealToolToPathSet(
final FolderInfo foInfo) {
- PerTypeMapStorage<IRealBuildObjectAssociation, Set<IPath>> storage = new PerTypeMapStorage<IRealBuildObjectAssociation, Set<IPath>>();
+ PerTypeMapStorage<IRealBuildObjectAssociation, Set<IPath>> storage = new PerTypeMapStorage<>();
IConfiguration cfg = foInfo.getParent();
FolderInfo rf = (FolderInfo) cfg.getRootFolderInfo();
IPath p = rf.getPath();
@@ -106,18 +106,18 @@ public class TcModificationUtil {
IBuilder realBuilder = ManagedBuildManager.getRealBuilder(cfg.getBuilder());
Map<IRealBuildObjectAssociation, Set<IPath>> map = storage.getMap(IRealBuildObjectAssociation.OBJECT_BUILDER,
true);
- Set<IPath> pathSet = new TreeSet<IPath>(PathComparator.INSTANCE);
+ Set<IPath> pathSet = new TreeSet<>(PathComparator.INSTANCE);
pathSet.add(p);
map.put((Builder) realBuilder, pathSet);
IRealBuildObjectAssociation realCfg = ((Configuration) cfg).getRealBuildObject();
map = storage.getMap(IRealBuildObjectAssociation.OBJECT_CONFIGURATION, true);
- pathSet = new TreeSet<IPath>(PathComparator.INSTANCE);
+ pathSet = new TreeSet<>(PathComparator.INSTANCE);
pathSet.add(p);
map.put(realCfg, pathSet);
if (!foInfo.isRoot()) {
- Set<IResourceInfo> allRcInfos = new HashSet<IResourceInfo>(Arrays.asList(cfg.getResourceInfos()));
+ Set<IResourceInfo> allRcInfos = new HashSet<>(Arrays.asList(cfg.getResourceInfos()));
allRcInfos.removeAll(foInfo.getChildResourceInfoList(true));
for (IResourceInfo rc : allRcInfos) {
if (rc instanceof ResourceConfiguration) {
@@ -155,7 +155,7 @@ public class TcModificationUtil {
public static PerTypeMapStorage<IRealBuildObjectAssociation, Set<IPath>> createRealToolToPathSet(IConfiguration cfg,
PerTypeMapStorage<IRealBuildObjectAssociation, Set<IPath>> skipMapStorage, boolean addSkipPaths) {
- PerTypeMapStorage<IRealBuildObjectAssociation, Set<IPath>> storage = new PerTypeMapStorage<IRealBuildObjectAssociation, Set<IPath>>();
+ PerTypeMapStorage<IRealBuildObjectAssociation, Set<IPath>> storage = new PerTypeMapStorage<>();
FolderInfo rf = (FolderInfo) cfg.getRootFolderInfo();
IPath p = rf.getPath();
@@ -171,7 +171,7 @@ public class TcModificationUtil {
} else {
Map<IRealBuildObjectAssociation, Set<IPath>> map = storage
.getMap(IRealBuildObjectAssociation.OBJECT_BUILDER, true);
- Set<IPath> pathSet = new TreeSet<IPath>(PathComparator.INSTANCE);
+ Set<IPath> pathSet = new TreeSet<>(PathComparator.INSTANCE);
pathSet.add(p);
map.put((Builder) realBuilder, pathSet);
}
@@ -188,7 +188,7 @@ public class TcModificationUtil {
} else {
Map<IRealBuildObjectAssociation, Set<IPath>> map = storage
.getMap(IRealBuildObjectAssociation.OBJECT_CONFIGURATION, true);
- Set<IPath> pathSet = new TreeSet<IPath>(PathComparator.INSTANCE);
+ Set<IPath> pathSet = new TreeSet<>(PathComparator.INSTANCE);
pathSet.add(p);
map.put(realCfg, pathSet);
}
@@ -213,7 +213,7 @@ public class TcModificationUtil {
int[] types = new int[] { IRealBuildObjectAssociation.OBJECT_TOOLCHAIN,
IRealBuildObjectAssociation.OBJECT_BUILDER, IRealBuildObjectAssociation.OBJECT_TOOL, };
- TreeMap<IPath, PerTypeSetStorage<IRealBuildObjectAssociation>> result = new TreeMap<IPath, PerTypeSetStorage<IRealBuildObjectAssociation>>(
+ TreeMap<IPath, PerTypeSetStorage<IRealBuildObjectAssociation>> result = new TreeMap<>(
PathComparator.INSTANCE);
@SuppressWarnings("unchecked")
TreeMap<IPath, PerTypeSetStorage<IRealBuildObjectAssociation>> clone = (TreeMap<IPath, PerTypeSetStorage<IRealBuildObjectAssociation>>) initialMap
@@ -234,10 +234,10 @@ public class TcModificationUtil {
.clone();
storage = clone2;
} else {
- storage = new PerTypeSetStorage<IRealBuildObjectAssociation>();
+ storage = new PerTypeSetStorage<>();
}
} else if (resStorage == null || resStorage.isEmpty(true)) {
- storage = new PerTypeSetStorage<IRealBuildObjectAssociation>();
+ storage = new PerTypeSetStorage<>();
for (int i = 0; i < types.length; i++) {
Set<IRealBuildObjectAssociation> set = initStorage.getSet(types[i], false);
if (set != null && set.size() != 0) {
@@ -247,7 +247,7 @@ public class TcModificationUtil {
} else {
Set<IRealBuildObjectAssociation> tcInitSet, resSet, setToStore;
Set<IRealBuildObjectAssociation> bInitSet = null, tInitSet = null;
- storage = new PerTypeSetStorage<IRealBuildObjectAssociation>();
+ storage = new PerTypeSetStorage<>();
tcInitSet = initStorage.getSet(IRealBuildObjectAssociation.OBJECT_TOOLCHAIN, false);
resSet = resStorage.getSet(IRealBuildObjectAssociation.OBJECT_TOOLCHAIN, false);
@@ -263,10 +263,10 @@ public class TcModificationUtil {
IPath path = oPath;
if (tc != null) {
- tInitSet = new LinkedHashSet<IRealBuildObjectAssociation>();
+ tInitSet = new LinkedHashSet<>();
TcModificationUtil.getRealObjectsSet((Tool[]) tc.getTools(), tInitSet);
if (path.segmentCount() == 0) {
- bInitSet = new LinkedHashSet<IRealBuildObjectAssociation>();
+ bInitSet = new LinkedHashSet<>();
IBuilder builder = tc.getBuilder();
if (builder != null) {
bInitSet.add((Builder) ManagedBuildManager.getRealBuilder(builder));
@@ -312,7 +312,7 @@ public class TcModificationUtil {
PerTypeSetStorage<IRealBuildObjectAssociation> initStorage = entry.getValue();
if (!initStorage.isEmpty(true)) {
- PerTypeSetStorage<IRealBuildObjectAssociation> storage = new PerTypeSetStorage<IRealBuildObjectAssociation>();
+ PerTypeSetStorage<IRealBuildObjectAssociation> storage = new PerTypeSetStorage<>();
for (int i = 0; i < types.length; i++) {
Set<IRealBuildObjectAssociation> set = initStorage.getSet(types[i], false);
@@ -387,7 +387,7 @@ public class TcModificationUtil {
public static Set<IRealBuildObjectAssociation> getRealObjectsSet(IRealBuildObjectAssociation[] objs,
Set<IRealBuildObjectAssociation> set) {
if (set == null)
- set = new LinkedHashSet<IRealBuildObjectAssociation>();
+ set = new LinkedHashSet<>();
for (int i = 0; i < objs.length; i++) {
set.add(objs[i].getRealBuildObject());
}
@@ -397,7 +397,7 @@ public class TcModificationUtil {
public static Map<? extends IRealBuildObjectAssociation, ? extends IRealBuildObjectAssociation> getRealToObjectsMap(
IRealBuildObjectAssociation[] objs, Map<IRealBuildObjectAssociation, IRealBuildObjectAssociation> map) {
if (map == null)
- map = new LinkedHashMap<IRealBuildObjectAssociation, IRealBuildObjectAssociation>();
+ map = new LinkedHashMap<>();
for (int i = 0; i < objs.length; i++) {
map.put(objs[i].getRealBuildObject(), objs[i]);
}
@@ -444,7 +444,7 @@ public class TcModificationUtil {
IRealBuildObjectAssociation bo) {
Set<IPath> set = map.get(bo);
if (set == null) {
- set = new TreeSet<IPath>(PathComparator.INSTANCE);
+ set = new TreeSet<>(PathComparator.INSTANCE);
map.put(bo, set);
}
return set;
@@ -453,7 +453,7 @@ public class TcModificationUtil {
public static <K, V> List<V> getArrayList(Map<K, List<V>> map, K obj) {
List<V> list = map.get(obj);
if (list == null) {
- list = new ArrayList<V>();
+ list = new ArrayList<>();
map.put(obj, list);
}
return list;
@@ -528,7 +528,7 @@ public class TcModificationUtil {
Set<IPath> objPaths = map.get(bo);
if (objPaths == null) {
- objPaths = new TreeSet<IPath>(PathComparator.INSTANCE);
+ objPaths = new TreeSet<>(PathComparator.INSTANCE);
map.put(bo, objPaths);
}
@@ -538,7 +538,7 @@ public class TcModificationUtil {
public static <T extends IRealBuildObjectAssociation> void addPath(Map<T, Set<IPath>> map, T bo, IPath path) {
Set<IPath> objPaths = map.get(bo);
if (objPaths == null) {
- objPaths = new TreeSet<IPath>(PathComparator.INSTANCE);
+ objPaths = new TreeSet<>(PathComparator.INSTANCE);
map.put(bo, objPaths);
}
@@ -572,7 +572,7 @@ public class TcModificationUtil {
public static TreeMap<IPath, PerTypeSetStorage<IRealBuildObjectAssociation>> createPathMap(
PerTypeMapStorage<IRealBuildObjectAssociation, Set<IPath>> storage) {
int[] types = ObjectTypeBasedStorage.getSupportedObjectTypes();
- TreeMap<IPath, PerTypeSetStorage<IRealBuildObjectAssociation>> result = new TreeMap<IPath, PerTypeSetStorage<IRealBuildObjectAssociation>>(
+ TreeMap<IPath, PerTypeSetStorage<IRealBuildObjectAssociation>> result = new TreeMap<>(
PathComparator.INSTANCE);
for (int i = 0; i < types.length; i++) {
int type = types[i];
@@ -587,7 +587,7 @@ public class TcModificationUtil {
for (IPath path : pathSet) {
PerTypeSetStorage<IRealBuildObjectAssociation> oset = result.get(path);
if (oset == null) {
- oset = new PerTypeSetStorage<IRealBuildObjectAssociation>();
+ oset = new PerTypeSetStorage<>();
result.put(path, oset);
}
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/ToolChainModificationManager.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/ToolChainModificationManager.java
index df34f6aba5..8b8079f251 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/ToolChainModificationManager.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/ToolChainModificationManager.java
@@ -134,7 +134,7 @@ public class ToolChainModificationManager implements IToolChainModificationManag
continue;
if (tmp == null)
- tmp = new HashSet<IRealBuildObjectAssociation>();
+ tmp = new HashSet<>();
else
tmp.clear();
@@ -199,8 +199,8 @@ public class ToolChainModificationManager implements IToolChainModificationManag
//2. get variants for applicable ones
//1.first filter applicable to not-this
- List<ConflictMatch> conflictList = new ArrayList<ConflictMatch>();
- Map<IRealBuildObjectAssociation, List<ConflictMatch>> objToConflictMatchMap = new HashMap<IRealBuildObjectAssociation, List<ConflictMatch>>();
+ List<ConflictMatch> conflictList = new ArrayList<>();
+ Map<IRealBuildObjectAssociation, List<ConflictMatch>> objToConflictMatchMap = new HashMap<>();
ObjectSetListBasedDefinition[] defs = RulesManager.getInstance()
.getRules(ObjectSetListBasedDefinition.CONFLICT);
@@ -230,7 +230,7 @@ public class ToolChainModificationManager implements IToolChainModificationManag
os.retainMatches(objSet);
if (objSet.size() != 0) {
- List<IObjectSet> remainingList = new ArrayList<IObjectSet>(Arrays.asList(oss));
+ List<IObjectSet> remainingList = new ArrayList<>(Arrays.asList(oss));
remainingList.remove(os);
IObjectSet[] remaining = remainingList.toArray(new IObjectSet[remainingList.size()]);
@@ -238,7 +238,7 @@ public class ToolChainModificationManager implements IToolChainModificationManag
Set<IRealBuildObjectAssociation> skipSet2 = skip != null
? (Set<IRealBuildObjectAssociation>) skip.getSet(type, false)
: null;
- Set<IRealBuildObjectAssociation> matchingObjects = new HashSet<IRealBuildObjectAssociation>();
+ Set<IRealBuildObjectAssociation> matchingObjects = new HashSet<>();
getMatchingObjects(type, remaining, skipSet2, null, matchingObjects);
if (matchingObjects.size() != 0) {
ConflictMatch conflict = new ConflictMatch(objType, rtToPathMap, type, matchingObjects);
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/ToolListMap.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/ToolListMap.java
index 2e78842ed6..dc51d0b10f 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/ToolListMap.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/ToolListMap.java
@@ -30,7 +30,7 @@ public class ToolListMap implements Cloneable {
private CollectionEntrySet fCollectionEntrySet;
public ToolListMap() {
- fMap = new HashMap<ITool, List<ITool>>();
+ fMap = new HashMap<>();
}
// public class ValueIter {
@@ -173,7 +173,7 @@ public class ToolListMap implements Cloneable {
// }
protected List<ITool> newList(int size) {
- return new ArrayList<ITool>(size);
+ return new ArrayList<>(size);
}
@SuppressWarnings("unchecked")
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/ToolListModification.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/ToolListModification.java
index 4268332bb9..6e89dc52a1 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/ToolListModification.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/ToolListModification.java
@@ -54,10 +54,10 @@ import org.eclipse.core.runtime.Status;
public abstract class ToolListModification implements IToolListModification {
// private Tool []fTools;
- private HashSet<String> fInputExtsSet = new HashSet<String>();
+ private HashSet<String> fInputExtsSet = new HashSet<>();
private ResourceInfo fRcInfo;
- private LinkedHashMap<Tool, IToolModification> fProjCompInfoMap = new LinkedHashMap<Tool, IToolModification>();
- private HashMap<Tool, IToolModification> fSysCompInfoMap = new HashMap<Tool, IToolModification>();
+ private LinkedHashMap<Tool, IToolModification> fProjCompInfoMap = new LinkedHashMap<>();
+ private HashMap<Tool, IToolModification> fSysCompInfoMap = new HashMap<>();
private Tool[] fAllSysTools;
private HashSet<ITool> fFilteredOutSysTools;
// private LinkedHashMap fRealToToolMap = new LinkedHashMap();
@@ -197,8 +197,8 @@ public abstract class ToolListModification implements IToolListModification {
IRealBuildObjectAssociation.OBJECT_TOOL,
(PerTypeMapStorage<IRealBuildObjectAssociation, Set<IPath>>) storage);
- fCompatibleTools = new HashMap<Tool, ToolCompatibilityInfoElement>();
- fInCompatibleTools = new HashMap<Tool, ToolCompatibilityInfoElement>();
+ fCompatibleTools = new HashMap<>();
+ fInCompatibleTools = new HashMap<>();
Tool sysTools[] = getTools(false, true);
@SuppressWarnings("unchecked")
Map<Tool, List<ConflictMatch>> conflictMap = (Map<Tool, List<ConflictMatch>>) conflicts.fObjToConflictListMap;
@@ -247,7 +247,7 @@ public abstract class ToolListModification implements IToolListModification {
fOperations = new ModificationOperation[0];
}
} else {
- List<ModificationOperation> opList = new ArrayList<ModificationOperation>(
+ List<ModificationOperation> opList = new ArrayList<>(
fCompatibleTools.size() + 1);
Set<Tool> keySet = fCompatibleTools.keySet();
for (Tool tool : keySet) {
@@ -353,7 +353,7 @@ public abstract class ToolListModification implements IToolListModification {
fOperations = new ModificationOperation[] { new ModificationOperation(this, null) };
} else {
Map<Tool, IToolModification> projMap = getMap(true);
- List<ModificationOperation> opList = new ArrayList<ModificationOperation>(projMap.size());
+ List<ModificationOperation> opList = new ArrayList<>(projMap.size());
for (IToolModification tm : projMap.values()) {
ProjToolCompatibilityStatusInfo info = (ProjToolCompatibilityStatusInfo) tm;
if (info.getCompatibleTools().containsKey(fRealTool)
@@ -396,7 +396,7 @@ public abstract class ToolListModification implements IToolListModification {
private Set<Tool> getAddCompatibleSysTools() {
if (fAddCapableTools == null) {
- fAddCapableTools = new HashSet<Tool>(Arrays.asList(getAllSysTools()));
+ fAddCapableTools = new HashSet<>(Arrays.asList(getAllSysTools()));
PerTypeMapStorage<IRealBuildObjectAssociation, Set<IPath>> storage = getCompleteObjectStore();
ConflictMatchSet conflicts = ToolChainModificationManager.getInstance()
.getConflictInfo(IRealBuildObjectAssociation.OBJECT_TOOL, storage);
@@ -529,7 +529,7 @@ public abstract class ToolListModification implements IToolListModification {
if (fAllSysTools == null) {
ITool[] allSys = ManagedBuildManager.getRealTools();
fAllSysTools = filterTools((Tool[]) allSys);
- HashSet<ITool> set = new HashSet<ITool>(Arrays.asList(allSys));
+ HashSet<ITool> set = new HashSet<>(Arrays.asList(allSys));
set.removeAll(Arrays.asList(fAllSysTools));
fFilteredOutSysTools = set;
}
@@ -695,7 +695,7 @@ public abstract class ToolListModification implements IToolListModification {
addSet = rmSet;
}
- List<ITool> list = new ArrayList<ITool>();
+ List<ITool> list = new ArrayList<>();
list.addAll(map.values());
clearToolInfo(map.values().toArray(new Tool[map.size()]));
@@ -710,7 +710,7 @@ public abstract class ToolListModification implements IToolListModification {
}
private HashMap<ITool, ITool> createRealToToolMap(/*boolean includeFilteredOut*/) {
- HashMap<ITool, ITool> map = new HashMap<ITool, ITool>();
+ HashMap<ITool, ITool> map = new HashMap<>();
Set<Entry<Tool, IToolModification>> entries = fProjCompInfoMap.entrySet();
for (Entry<Tool, IToolModification> entry : entries) {
map.put(entry.getKey(), entry.getValue().getTool());
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/extension/MatchObjectElement.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/extension/MatchObjectElement.java
index c6cf1ea528..28f3982676 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/extension/MatchObjectElement.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/extension/MatchObjectElement.java
@@ -40,8 +40,8 @@ public class MatchObjectElement {
public static class TypeToStringAssociation {
private int fType;
private String fString;
- private static ObjectTypeBasedStorage<TypeToStringAssociation> fTypeAssociationStorage = new ObjectTypeBasedStorage<TypeToStringAssociation>();
- private static Map<String, TypeToStringAssociation> fStringAssociationStorage = new HashMap<String, TypeToStringAssociation>();
+ private static ObjectTypeBasedStorage<TypeToStringAssociation> fTypeAssociationStorage = new ObjectTypeBasedStorage<>();
+ private static Map<String, TypeToStringAssociation> fStringAssociationStorage = new HashMap<>();
public static TypeToStringAssociation TOOL = new TypeToStringAssociation(
IRealBuildObjectAssociation.OBJECT_TOOL, "tool"); //$NON-NLS-1$
@@ -125,7 +125,7 @@ public class MatchObjectElement {
PatternElement(IConfigurationElement el, int defaultSearchType, int defaultIdType) {
String tmp = el.getAttribute(ATTR_OBJECT_IDS);
- fIds = new HashSet<String>(Arrays.asList(CDataUtil.stringToArray(tmp, DELIMITER)));
+ fIds = new HashSet<>(Arrays.asList(CDataUtil.stringToArray(tmp, DELIMITER)));
int type = 0;
tmp = el.getAttribute(ATTR_PATTERN_TYPE_SEARCH_SCOPE);
@@ -193,7 +193,7 @@ public class MatchObjectElement {
if (el.fType != fType)
throw new IllegalArgumentException();
- HashSet<String> set = new HashSet<String>();
+ HashSet<String> set = new HashSet<>();
set.addAll(fIds);
set.addAll(el.fIds);
return new PatternElement(set, fType);
@@ -219,7 +219,7 @@ public class MatchObjectElement {
fObjectType = assoc.getType();
- Map<PatternTypeKey, PatternElement> patternMap = new HashMap<PatternTypeKey, PatternElement>();
+ Map<PatternTypeKey, PatternElement> patternMap = new HashMap<>();
int defaultSearchType = PatternElement.DEFAULT_PATTERN_SEARCH_TYPE;
int defaultIdType = PatternElement.DEFAULT_PATTERN_ID_TYPE;
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/extension/RulesManager.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/extension/RulesManager.java
index 2bf1b5c92d..e2f0ac6cfd 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/extension/RulesManager.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/extension/RulesManager.java
@@ -46,7 +46,7 @@ public class RulesManager {
private ConflictDefinition[] fConflictDefinitions;
- private Map<MatchObjectElement, IObjectSet> fMatchObjectMap = new HashMap<MatchObjectElement, IObjectSet>();
+ private Map<MatchObjectElement, IObjectSet> fMatchObjectMap = new HashMap<>();
private PerTypeMapStorage<IRealBuildObjectAssociation, Set<IRealBuildObjectAssociation>> fObjToChildSuperClassMap;
private StarterJob fStarter;
private boolean fIsStartInited;
@@ -106,7 +106,7 @@ public class RulesManager {
fConflictDefinitions = new ConflictDefinition[0];
} else {
IExtension[] extensions = extensionPoint.getExtensions();
- List<ConflictDefinition> conflictDefs = new ArrayList<ConflictDefinition>();
+ List<ConflictDefinition> conflictDefs = new ArrayList<>();
for (int i = 0; i < extensions.length; ++i) {
IExtension extension = extensions[i];
IConfigurationElement[] elements = extension.getConfigurationElements();
@@ -153,7 +153,7 @@ public class RulesManager {
if (oSet == null) {
int type = el.getObjectType();
PatternElement[] patterns = el.getPatterns();
- HashSet<IRealBuildObjectAssociation> objectsSet = new HashSet<IRealBuildObjectAssociation>();
+ HashSet<IRealBuildObjectAssociation> objectsSet = new HashSet<>();
for (int i = 0; i < patterns.length; i++) {
PatternElement pattern = patterns[i];
processPattern(type, pattern, objectsSet);
@@ -174,7 +174,7 @@ public class RulesManager {
IRealBuildObjectAssociation[] allObjs = TcModificationUtil.getExtensionObjects(objType);
Pattern pattern = Pattern.compile(id);
- List<IRealBuildObjectAssociation> list = new ArrayList<IRealBuildObjectAssociation>();
+ List<IRealBuildObjectAssociation> list = new ArrayList<>();
for (int i = 0; i < allObjs.length; i++) {
if (pattern.matcher(allObjs[i].getId()).matches())
@@ -187,7 +187,7 @@ public class RulesManager {
private Set<IRealBuildObjectAssociation> processPattern(int objType, PatternElement el,
Set<IRealBuildObjectAssociation> set) {
if (set == null)
- set = new HashSet<IRealBuildObjectAssociation>();
+ set = new HashSet<>();
String ids[] = el.getIds();
if (el.getSearchType() == PatternElement.TYPE_SEARCH_EXTENSION_OBJECT) {
@@ -237,7 +237,7 @@ public class RulesManager {
private Set<IRealBuildObjectAssociation> getChildSuperClassRealSet(IRealBuildObjectAssociation obj,
IRealBuildObjectAssociation[] all) {
if (fObjToChildSuperClassMap == null)
- fObjToChildSuperClassMap = new PerTypeMapStorage<IRealBuildObjectAssociation, Set<IRealBuildObjectAssociation>>();
+ fObjToChildSuperClassMap = new PerTypeMapStorage<>();
if (all == null)
all = TcModificationUtil.getExtensionObjects(obj.getType());
@@ -256,7 +256,7 @@ public class RulesManager {
private static Set<IRealBuildObjectAssociation> createChildSuperClassRealSet(IRealBuildObjectAssociation obj,
IRealBuildObjectAssociation[] all, Set<IRealBuildObjectAssociation> set) {
if (set == null)
- set = new HashSet<IRealBuildObjectAssociation>();
+ set = new HashSet<>();
if (all == null)
all = TcModificationUtil.getExtensionObjects(obj.getType());
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/language/settings/providers/AbstractBuildCommandParser.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/language/settings/providers/AbstractBuildCommandParser.java
index 3cc3334ad4..525b624c78 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/language/settings/providers/AbstractBuildCommandParser.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/language/settings/providers/AbstractBuildCommandParser.java
@@ -233,7 +233,7 @@ public abstract class AbstractBuildCommandParser extends AbstractLanguageSetting
return null;
}
- List<String> options = new ArrayList<String>();
+ List<String> options = new ArrayList<>();
Matcher optionMatcher = OPTIONS_PATTERN.matcher(line);
while (optionMatcher.find()) {
String option = optionMatcher.group(OPTION_GROUP);
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/language/settings/providers/AbstractBuiltinSpecsDetector.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/language/settings/providers/AbstractBuiltinSpecsDetector.java
index c935edca7f..c06d5a17c0 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/language/settings/providers/AbstractBuiltinSpecsDetector.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/language/settings/providers/AbstractBuiltinSpecsDetector.java
@@ -433,7 +433,7 @@ public abstract class AbstractBuiltinSpecsDetector extends AbstractLanguageSetti
List<String> languageIds = getLanguageScope();
if (languageIds == null) {
- languageIds = new ArrayList<String>(1);
+ languageIds = new ArrayList<>(1);
// "null" language indicates that the provider provides for any language
languageIds.add(null);
}
@@ -640,7 +640,7 @@ public abstract class AbstractBuiltinSpecsDetector extends AbstractLanguageSetti
specFile = null; // init specFile *before* calling resolveCommand(), can be changed in there
currentCommandResolved = resolveCommand(currentLanguageId);
- detectedSettingEntries = new ArrayList<ICLanguageSettingEntry>();
+ detectedSettingEntries = new ArrayList<>();
collected = 0;
}
@@ -711,7 +711,7 @@ public abstract class AbstractBuiltinSpecsDetector extends AbstractLanguageSetti
new String[] { GMAKE_ERROR_PARSER_ID });
ConsoleParserAdapter consoleParser = new ConsoleParserAdapter();
consoleParser.startup(currentCfgDescription, epm);
- List<IConsoleParser> parsers = new ArrayList<IConsoleParser>();
+ List<IConsoleParser> parsers = new ArrayList<>();
parsers.add(consoleParser);
buildRunnerHelper.setLaunchParameters(launcher, program, args, buildDirURI, envp);
@@ -754,7 +754,7 @@ public abstract class AbstractBuiltinSpecsDetector extends AbstractLanguageSetti
if (envMngr == null) {
envMngr = CCorePlugin.getDefault().getBuildEnvironmentManager();
}
- List<IEnvironmentVariable> vars = new ArrayList<IEnvironmentVariable>(
+ List<IEnvironmentVariable> vars = new ArrayList<>(
Arrays.asList(envMngr.getVariables(currentCfgDescription, true)));
// On POSIX (Linux, UNIX) systems reset language variables to default (English)
@@ -773,7 +773,7 @@ public abstract class AbstractBuiltinSpecsDetector extends AbstractLanguageSetti
* Create a handy map of environment variables.
*/
private Map<String, String> createEnvironmentMap(ICConfigurationDescription cfgDescription) {
- Map<String, String> envMap = new HashMap<String, String>();
+ Map<String, String> envMap = new HashMap<>();
for (IEnvironmentVariable var : getEnvironmentVariables()) {
String name = var.getName();
if (!envMngr.isVariableCaseSensitive()) {
@@ -788,7 +788,7 @@ public abstract class AbstractBuiltinSpecsDetector extends AbstractLanguageSetti
* Convert map of environment variables to array in format "var=value".
*/
private String[] toEnvp(Map<String, String> environmentMap) {
- Set<String> envp = new HashSet<String>();
+ Set<String> envp = new HashSet<>();
for (Entry<String, String> var : environmentMap.entrySet()) {
envp.add(var.getKey() + '=' + var.getValue());
}
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/language/settings/providers/AbstractLanguageSettingsOutputScanner.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/language/settings/providers/AbstractLanguageSettingsOutputScanner.java
index b7de3fc60a..9f1540db22 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/language/settings/providers/AbstractLanguageSettingsOutputScanner.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/language/settings/providers/AbstractLanguageSettingsOutputScanner.java
@@ -471,7 +471,7 @@ public abstract class AbstractLanguageSettingsOutputScanner extends LanguageSett
buildDirURI = getBuildDirURI(mappedRootURI);
}
- List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> entries = new ArrayList<>();
List<String> options = parseOptions(line);
if (options != null) {
@@ -916,7 +916,7 @@ public abstract class AbstractLanguageSettingsOutputScanner extends LanguageSett
* Find all resources in the folder which might be represented by relative path passed.
*/
private static List<IResource> findPathInFolder(IPath path, IContainer folder) {
- List<IResource> paths = new ArrayList<IResource>();
+ List<IResource> paths = new ArrayList<>();
IResource resource = folder.findMember(path);
if (resource != null) {
paths.add(resource);
@@ -939,7 +939,7 @@ public abstract class AbstractLanguageSettingsOutputScanner extends LanguageSett
* Determine which resource in workspace is the best fit to parsedName passed.
*/
private IResource findBestFitInWorkspace(String parsedName) {
- Set<String> referencedProjectsNames = new LinkedHashSet<String>();
+ Set<String> referencedProjectsNames = new LinkedHashSet<>();
if (currentCfgDescription != null) {
Map<String, String> refs = currentCfgDescription.getReferenceInfo();
referencedProjectsNames.addAll(refs.keySet());
@@ -1205,7 +1205,7 @@ public abstract class AbstractLanguageSettingsOutputScanner extends LanguageSett
protected String getPatternFileExtensions() {
IContentTypeManager manager = Platform.getContentTypeManager();
- Set<String> fileExts = new HashSet<String>();
+ Set<String> fileExts = new HashSet<>();
IContentType contentTypeCpp = manager.getContentType(CCorePlugin.CONTENT_TYPE_CXXSOURCE);
fileExts.addAll(Arrays.asList(contentTypeCpp.getFileSpecs(IContentType.FILE_EXTENSION_SPEC)));
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/language/settings/providers/GCCBuiltinSpecsDetector.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/language/settings/providers/GCCBuiltinSpecsDetector.java
index a00429c4a0..e7ca62d1b3 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/language/settings/providers/GCCBuiltinSpecsDetector.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/language/settings/providers/GCCBuiltinSpecsDetector.java
@@ -75,7 +75,7 @@ public class GCCBuiltinSpecsDetector extends ToolchainBuiltinSpecsDetector
* Create a list from one item.
*/
private List<String> makeList(String line) {
- List<String> list = new ArrayList<String>();
+ List<String> list = new ArrayList<>();
list.add(line);
return list;
}
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/language/settings/providers/ToolchainBuiltinSpecsDetector.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/language/settings/providers/ToolchainBuiltinSpecsDetector.java
index 9ca89c3688..c8a64eeb28 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/language/settings/providers/ToolchainBuiltinSpecsDetector.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/language/settings/providers/ToolchainBuiltinSpecsDetector.java
@@ -45,7 +45,7 @@ import org.eclipse.cdt.managedbuilder.internal.envvar.EnvironmentVariableManager
*/
public abstract class ToolchainBuiltinSpecsDetector extends AbstractBuiltinSpecsDetector {
private static final String EMPTY_QUOTED_STRING = "\"\""; //$NON-NLS-1$
- private Map<String, ITool> toolMap = new HashMap<String, ITool>();
+ private Map<String, ITool> toolMap = new HashMap<>();
/**
* Concrete compiler specs detectors need to supply tool-chain ID.
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/makegen/gnu/DefaultGCCDependencyCalculatorPreBuildCommands.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/makegen/gnu/DefaultGCCDependencyCalculatorPreBuildCommands.java
index 70bf3e43c4..3499ecae2b 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/makegen/gnu/DefaultGCCDependencyCalculatorPreBuildCommands.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/makegen/gnu/DefaultGCCDependencyCalculatorPreBuildCommands.java
@@ -210,7 +210,7 @@ public class DefaultGCCDependencyCalculatorPreBuildCommands implements IManagedD
IManagedCommandLineInfo cmdLInfo = null;
// Set up the command line options that will generate the dependency file
- Vector<String> options = new Vector<String>();
+ Vector<String> options = new Vector<>();
// -w
options.add("-w"); //$NON-NLS-1$
// -MM
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/makegen/gnu/GnuMakefileGenerator.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/makegen/gnu/GnuMakefileGenerator.java
index f23c29acee..2bbd9347c7 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/makegen/gnu/GnuMakefileGenerator.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/makegen/gnu/GnuMakefileGenerator.java
@@ -373,12 +373,12 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
// private Set outputExtensionsSet;
//=== Maps of macro names (String) to values (List)
// Map of source file build variable names to a List of source file Path's
- private final HashMap<String, List<IPath>> buildSrcVars = new HashMap<String, List<IPath>>();
+ private final HashMap<String, List<IPath>> buildSrcVars = new HashMap<>();
// Map of output file build variable names to a List of output file Path's
- private final HashMap<String, List<IPath>> buildOutVars = new HashMap<String, List<IPath>>();
+ private final HashMap<String, List<IPath>> buildOutVars = new HashMap<>();
// Map of dependency file build variable names to a List of GnuDependencyGroupInfo objects
- private final HashMap<String, GnuDependencyGroupInfo> buildDepVars = new HashMap<String, GnuDependencyGroupInfo>();
- private final LinkedHashMap<String, String> topBuildOutVars = new LinkedHashMap<String, String>();
+ private final HashMap<String, GnuDependencyGroupInfo> buildDepVars = new HashMap<>();
+ private final LinkedHashMap<String, String> topBuildOutVars = new LinkedHashMap<>();
// Dependency file variables
// private Vector dependencyMakefiles; // IPath's - relative to the top build directory or absolute
@@ -548,7 +548,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
@Override
public boolean visit(PathSettingsContainer container) {
ToolInfoHolder h = (ToolInfoHolder) container.getValue();
- Vector<String> depExts = new Vector<String>(); // Vector of dependency file extensions
+ Vector<String> depExts = new Vector<>(); // Vector of dependency file extensions
IManagedDependencyGenerator2[] postProcessors = new IManagedDependencyGenerator2[h.buildTools.length];
boolean callPopulateDummyTargets = collectDependencyGeneratorInformation(h, depExts, postProcessors);
@@ -839,7 +839,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
public boolean visit(PathSettingsContainer container) {
ToolInfoHolder h = (ToolInfoHolder) container.getValue();
// Collect the methods that will need to be called
- Vector<String> depExts = new Vector<String>(); // Vector of dependency file extensions
+ Vector<String> depExts = new Vector<>(); // Vector of dependency file extensions
IManagedDependencyGenerator2[] postProcessors = new IManagedDependencyGenerator2[h.buildTools.length];
boolean callPopulateDummyTargets = collectDependencyGeneratorInformation(h, depExts, postProcessors);
@@ -1010,12 +1010,12 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
macroBuffer.append(addDefaultHeader());
// Map of macro names (String) to its definition (List of Strings)
- HashMap<String, List<String>> outputMacros = new HashMap<String, List<String>>();
+ HashMap<String, List<String>> outputMacros = new HashMap<>();
// Add the predefined LIBS, USER_OBJS macros
// Add the libraries this project depends on
- valueList = new ArrayList<String>();
+ valueList = new ArrayList<>();
String[] libs = config.getLibs(buildTargetExt);
for (String lib : libs) {
valueList.add(lib);
@@ -1023,7 +1023,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
outputMacros.put("LIBS", valueList); //$NON-NLS-1$
// Add the extra user-specified objects
- valueList = new ArrayList<String>();
+ valueList = new ArrayList<>();
String[] userObjs = config.getUserObjects(buildTargetExt);
for (String obj : userObjs) {
valueList.add(obj);
@@ -1068,7 +1068,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
public boolean visit(PathSettingsContainer container) {
ToolInfoHolder h = (ToolInfoHolder) container.getValue();
ITool[] buildTools = h.buildTools;
- HashSet<String> handledInputExtensions = new HashSet<String>();
+ HashSet<String> handledInputExtensions = new HashSet<>();
String buildMacro;
for (ITool buildTool : buildTools) {
if (buildTool.getCustomBuildStep())
@@ -1159,7 +1159,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
buffer.append(addMacros());
// List to collect needed build output variables
- List<String> outputVarsAdditionsList = new ArrayList<String>();
+ List<String> outputVarsAdditionsList = new ArrayList<>();
// Determine target rules
StringBuffer targetRules = addTargets(outputVarsAdditionsList, rebuild);
@@ -1222,7 +1222,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
buffer.append("-include sources.mk").append(NEWLINE); //$NON-NLS-1$
// Add includes for each subdir in child-subdir-first order (required for makefile rule matching to work).
- List<String> subDirList = new ArrayList<String>();
+ List<String> subDirList = new ArrayList<>();
for (IContainer subDir : getSubdirList()) {
String projectRelativePath = subDir.getProjectRelativePath().toString();
if (!projectRelativePath.isEmpty())
@@ -1380,7 +1380,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
*/
// Vector managedProjectOutputs = new Vector(refdProjects.length);
// if (refdProjects.length > 0) {
- Vector<String> managedProjectOutputs = new Vector<String>(refConfigs.length);
+ Vector<String> managedProjectOutputs = new Vector<>(refConfigs.length);
if (refConfigs.length > 0) {
boolean addDeps = true;
// if (refdProjects != null) {
@@ -1598,13 +1598,13 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
boolean bEmitPostBuildStepCall) {
// Get the tool's inputs and outputs
- Vector<String> inputs = new Vector<String>();
- Vector<String> dependencies = new Vector<String>();
- Vector<String> outputs = new Vector<String>();
- Vector<String> enumeratedPrimaryOutputs = new Vector<String>();
- Vector<String> enumeratedSecondaryOutputs = new Vector<String>();
- Vector<String> outputVariables = new Vector<String>();
- Vector<String> additionalTargets = new Vector<String>();
+ Vector<String> inputs = new Vector<>();
+ Vector<String> dependencies = new Vector<>();
+ Vector<String> outputs = new Vector<>();
+ Vector<String> enumeratedPrimaryOutputs = new Vector<>();
+ Vector<String> enumeratedSecondaryOutputs = new Vector<>();
+ Vector<String> outputVariables = new Vector<>();
+ Vector<String> additionalTargets = new Vector<>();
String outputPrefix = EMPTY_STRING;
if (!getToolInputsOutputs(tool, inputs, dependencies, outputs, enumeratedPrimaryOutputs,
@@ -1741,7 +1741,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
// If we have secondary outputs, output dependency rules without commands
if (enumeratedSecondaryOutputs.size() > 0 || additionalTargets.size() > 0) {
String primaryOutput = enumeratedPrimaryOutputs.get(0);
- Vector<String> addlOutputs = new Vector<String>();
+ Vector<String> addlOutputs = new Vector<>();
addlOutputs.addAll(enumeratedSecondaryOutputs);
addlOutputs.addAll(additionalTargets);
for (int i = 0; i < addlOutputs.size(); i++) {
@@ -1841,7 +1841,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
protected Vector<String> calculateSecondaryOutputs(IOutputType[] secondaryOutputs) {
ToolInfoHolder h = (ToolInfoHolder) toolInfos.getValue();
ITool[] buildTools = h.buildTools;
- Vector<String> buildVars = new Vector<String>();
+ Vector<String> buildVars = new Vector<>();
for (int i = 0; i < buildTools.length; i++) {
// Add the specified output build variables
IOutputType[] outTypes = buildTools[i].getOutputTypes();
@@ -1948,7 +1948,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
// For build macros in the configuration, create a map which will map them
// to a string which holds its list of sources.
- LinkedHashMap<String, String> buildVarToRuleStringMap = new LinkedHashMap<String, String>();
+ LinkedHashMap<String, String> buildVarToRuleStringMap = new LinkedHashMap<>();
// Add statements that add the source files in this folder,
// and generated source files, and generated dependency files
@@ -2070,8 +2070,8 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
|| (inputType == null && tool != config.calculateTargetTool())) {
// Try to add the rule for the file
- Vector<IPath> generatedOutputs = new Vector<IPath>(); // IPath's - build directory relative
- Vector<IPath> generatedDepFiles = new Vector<IPath>(); // IPath's - build directory relative or absolute
+ Vector<IPath> generatedOutputs = new Vector<>(); // IPath's - build directory relative
+ Vector<IPath> generatedDepFiles = new Vector<>(); // IPath's - build directory relative or absolute
addRuleForSource(relativePath, ruleBuffer, resource, sourceLocation, rcInfo, generatedSource,
generatedDepFiles, generatedOutputs);
@@ -2364,9 +2364,9 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
if (outputExtension.length() > 0)
optDotExt = DOT + outputExtension;
- Vector<IPath> ruleOutputs = new Vector<IPath>();
- Vector<IPath> enumeratedPrimaryOutputs = new Vector<IPath>(); // IPaths relative to the top build directory
- Vector<IPath> enumeratedSecondaryOutputs = new Vector<IPath>(); // IPaths relative to the top build directory
+ Vector<IPath> ruleOutputs = new Vector<>();
+ Vector<IPath> enumeratedPrimaryOutputs = new Vector<>(); // IPaths relative to the top build directory
+ Vector<IPath> enumeratedSecondaryOutputs = new Vector<>(); // IPaths relative to the top build directory
calculateOutputsForSource(tool, relativePath, resource, sourceLocation, ruleOutputs, enumeratedPrimaryOutputs,
enumeratedSecondaryOutputs);
enumeratedOutputs.addAll(enumeratedPrimaryOutputs);
@@ -2576,7 +2576,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
// Generate the command line
- Vector<String> inputs = new Vector<String>();
+ Vector<String> inputs = new Vector<>();
inputs.add(IN_MACRO);
// Other additional inputs
@@ -2756,7 +2756,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
}
// Add any additional outputs here using dependency lines
- Vector<IPath> addlOutputs = new Vector<IPath>();
+ Vector<IPath> addlOutputs = new Vector<>();
if (enumeratedPrimaryOutputs.size() > 1) {
// Starting with 1 is intentional in order to skip the primary output
for (int i = 1; i < enumeratedPrimaryOutputs.size(); i++)
@@ -2865,7 +2865,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
* Returns any additional resources specified for the tool in other InputType elements and AdditionalInput elements
*/
protected IPath[] getAdditionalResourcesForSource(ITool tool) {
- List<IPath> allRes = new ArrayList<IPath>();
+ List<IPath> allRes = new ArrayList<>();
IInputType[] types = tool.getInputTypes();
for (IInputType type : types) {
// Additional resources come from 2 places.
@@ -3066,7 +3066,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
// 2. If an option is specified, use the value of the option
if (option != null) {
try {
- List<String> outputList = new ArrayList<String>();
+ List<String> outputList = new ArrayList<>();
int optType = option.getValueType();
if (optType == IOption.STRING) {
outputList.add(outputPrefix + option.getStringValue());
@@ -3287,7 +3287,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
*/
protected IPath[] oldCalculateDependenciesForSource(IManagedDependencyGenerator depGen, ITool tool,
String relativePath, IResource resource) {
- Vector<IPath> deps = new Vector<IPath>();
+ Vector<IPath> deps = new Vector<>();
int type = depGen.getCalculatorType();
switch (type) {
@@ -3397,7 +3397,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
// The set of output extensions which will be produced by this tool.
// It is presumed that this set is not very large (likely < 10) so
// a HashSet should provide good performance.
- h.outputExtensionsSet = new HashSet<String>();
+ h.outputExtensionsSet = new HashSet<>();
// For each tool for the target, lookup the kinds of sources it outputs
// and add that to our list of output extensions.
@@ -3471,8 +3471,8 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
}
// Reconstruct the buffer tokens into useful chunks of dependency information
- Vector<String> bufferTokens = new Vector<String>(Arrays.asList(inBufferString.split("\\s"))); //$NON-NLS-1$
- Vector<String> deps = new Vector<String>(bufferTokens.size());
+ Vector<String> bufferTokens = new Vector<>(Arrays.asList(inBufferString.split("\\s"))); //$NON-NLS-1$
+ Vector<String> deps = new Vector<>(bufferTokens.size());
Iterator<String> tokenIter = bufferTokens.iterator();
while (tokenIter.hasNext()) {
String token = tokenIter.next();
@@ -3889,8 +3889,8 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
}
// Set of input extensions for which macros have been created so far
- HashSet<String> handledDepsInputExtensions = new HashSet<String>();
- HashSet<String> handledOutsInputExtensions = new HashSet<String>();
+ HashSet<String> handledDepsInputExtensions = new HashSet<>();
+ HashSet<String> handledOutsInputExtensions = new HashSet<>();
while (!done) {
int[] testState = new int[doneState.length];
@@ -4010,7 +4010,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
}
}
if (fileList == null) {
- fileList = new Vector<String>();
+ fileList = new Vector<>();
}
fileList.add(path.toString());
}
@@ -4045,7 +4045,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
*/
protected Vector<String> getRuleList() {
if (ruleList == null) {
- ruleList = new Vector<String>();
+ ruleList = new Vector<>();
}
return ruleList;
}
@@ -4058,7 +4058,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
*/
protected Vector<String> getDepLineList() {
if (depLineList == null) {
- depLineList = new Vector<String>();
+ depLineList = new Vector<>();
}
return depLineList;
}
@@ -4071,7 +4071,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
*/
protected Vector<String> getDepRuleList() {
if (depRuleList == null) {
- depRuleList = new Vector<String>();
+ depRuleList = new Vector<>();
}
return depRuleList;
}
@@ -4358,21 +4358,21 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
*/
private Vector<IResource> getDeletedDirList() {
if (deletedDirList == null) {
- deletedDirList = new Vector<IResource>();
+ deletedDirList = new Vector<>();
}
return deletedDirList;
}
private Vector<IResource> getDeletedFileList() {
if (deletedFileList == null) {
- deletedFileList = new Vector<IResource>();
+ deletedFileList = new Vector<>();
}
return deletedFileList;
}
private List<IPath> getDependencyMakefiles(ToolInfoHolder h) {
if (h.dependencyMakefiles == null) {
- h.dependencyMakefiles = new ArrayList<IPath>();
+ h.dependencyMakefiles = new ArrayList<>();
}
return h.dependencyMakefiles;
}
@@ -4401,7 +4401,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
*/
private Vector<IResource> getInvalidDirList() {
if (invalidDirList == null) {
- invalidDirList = new Vector<IResource>();
+ invalidDirList = new Vector<>();
}
return invalidDirList;
}
@@ -4411,7 +4411,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
*/
private Collection<IContainer> getModifiedList() {
if (modifiedList == null)
- modifiedList = new LinkedHashSet<IContainer>();
+ modifiedList = new LinkedHashSet<>();
return modifiedList;
}
@@ -4420,7 +4420,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
*/
private Collection<IContainer> getSubdirList() {
if (subdirList == null)
- subdirList = new LinkedHashSet<IContainer>();
+ subdirList = new LinkedHashSet<>();
return subdirList;
}
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/makegen/gnu/ManagedBuildGnuToolInfo.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/makegen/gnu/ManagedBuildGnuToolInfo.java
index a9565da46a..df25344182 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/makegen/gnu/ManagedBuildGnuToolInfo.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/makegen/gnu/ManagedBuildGnuToolInfo.java
@@ -69,14 +69,14 @@ public class ManagedBuildGnuToolInfo implements IManagedBuildGnuToolInfo {
private boolean outputsCalculated = false;
private boolean outputVariablesCalculated = false;
private boolean dependenciesCalculated = false;
- private Vector<String> commandInputs = new Vector<String>();
- private Vector<String> enumeratedInputs = new Vector<String>();
- private Vector<String> commandOutputs = new Vector<String>();
- private Vector<String> enumeratedPrimaryOutputs = new Vector<String>();
- private Vector<String> enumeratedSecondaryOutputs = new Vector<String>();
- private Vector<String> outputVariables = new Vector<String>();
- private Vector<String> commandDependencies = new Vector<String>();
- private Vector<String> additionalTargets = new Vector<String>();
+ private Vector<String> commandInputs = new Vector<>();
+ private Vector<String> enumeratedInputs = new Vector<>();
+ private Vector<String> commandOutputs = new Vector<>();
+ private Vector<String> enumeratedPrimaryOutputs = new Vector<>();
+ private Vector<String> enumeratedSecondaryOutputs = new Vector<>();
+ private Vector<String> outputVariables = new Vector<>();
+ private Vector<String> commandDependencies = new Vector<>();
+ private Vector<String> additionalTargets = new Vector<>();
//private Vector enumeratedDependencies = new Vector();
// Map of macro names (String) to values (List)
@@ -185,16 +185,16 @@ public class ManagedBuildGnuToolInfo implements IManagedBuildGnuToolInfo {
* 3. Use the file extensions and the resources in the project
*/
boolean done = true;
- Vector<String> myCommandInputs = new Vector<String>(); // Inputs for the tool command line
- Vector<String> myCommandDependencies = new Vector<String>(); // Dependencies for the make rule
- Vector<String> myEnumeratedInputs = new Vector<String>(); // Complete list of individual inputs
+ Vector<String> myCommandInputs = new Vector<>(); // Inputs for the tool command line
+ Vector<String> myCommandDependencies = new Vector<>(); // Dependencies for the make rule
+ Vector<String> myEnumeratedInputs = new Vector<>(); // Complete list of individual inputs
IInputType[] inTypes = tool.getInputTypes();
if (inTypes != null && inTypes.length > 0) {
for (IInputType type : inTypes) {
- Vector<String> itCommandInputs = new Vector<String>(); // Inputs for the tool command line for this input-type
- Vector<String> itCommandDependencies = new Vector<String>(); // Dependencies for the make rule for this input-type
- Vector<String> itEnumeratedInputs = new Vector<String>(); // Complete list of individual inputs for this input-type
+ Vector<String> itCommandInputs = new Vector<>(); // Inputs for the tool command line for this input-type
+ Vector<String> itCommandDependencies = new Vector<>(); // Dependencies for the make rule for this input-type
+ Vector<String> itEnumeratedInputs = new Vector<>(); // Complete list of individual inputs for this input-type
String variable = type.getBuildVariable();
boolean primaryInput = type.getPrimaryInput();
boolean useFileExts = false;
@@ -204,7 +204,7 @@ public class ManagedBuildGnuToolInfo implements IManagedBuildGnuToolInfo {
// Option?
if (option != null) {
try {
- List<String> inputs = new ArrayList<String>();
+ List<String> inputs = new ArrayList<>();
int optType = option.getValueType();
if (optType == IOption.STRING) {
inputs.add(option.getStringValue());
@@ -295,7 +295,7 @@ public class ManagedBuildGnuToolInfo implements IManagedBuildGnuToolInfo {
// Note: This is only correct for tools with multipleOfType == true, but for other tools
// it gives us an input resource for generating default names
// Determine the set of source input macros to use
- HashSet<String> handledInputExtensions = new HashSet<String>();
+ HashSet<String> handledInputExtensions = new HashSet<>();
String[] exts = type.getSourceExtensions(tool);
if (projResources != null) {
for (IResource rc : projResources) {
@@ -469,19 +469,19 @@ public class ManagedBuildGnuToolInfo implements IManagedBuildGnuToolInfo {
HashSet<String> handledInputExtensions, boolean lastChance) {
boolean done = true;
- Vector<String> myCommandOutputs = new Vector<String>();
- Vector<String> myEnumeratedPrimaryOutputs = new Vector<String>();
- Vector<String> myEnumeratedSecondaryOutputs = new Vector<String>();
- HashMap<String, List<IPath>> myOutputMacros = new HashMap<String, List<IPath>>();
+ Vector<String> myCommandOutputs = new Vector<>();
+ Vector<String> myEnumeratedPrimaryOutputs = new Vector<>();
+ Vector<String> myEnumeratedSecondaryOutputs = new Vector<>();
+ HashMap<String, List<IPath>> myOutputMacros = new HashMap<>();
// The next two fields are used together
- Vector<String> myBuildVars = new Vector<String>();
- Vector<Vector<String>> myBuildVarsValues = new Vector<Vector<String>>();
+ Vector<String> myBuildVars = new Vector<>();
+ Vector<Vector<String>> myBuildVarsValues = new Vector<>();
// Get the outputs for this tool invocation
IOutputType[] outTypes = tool.getOutputTypes();
if (outTypes != null && outTypes.length > 0) {
for (int i = 0; i < outTypes.length; i++) {
- Vector<String> typeEnumeratedOutputs = new Vector<String>();
+ Vector<String> typeEnumeratedOutputs = new Vector<>();
IOutputType type = outTypes[i];
String outputPrefix = type.getOutputPrefix();
@@ -525,7 +525,7 @@ public class ManagedBuildGnuToolInfo implements IManagedBuildGnuToolInfo {
// 2. If an option is specified, use the value of the option
if (option != null) {
try {
- List<String> outputs = new ArrayList<String>();
+ List<String> outputs = new ArrayList<>();
int optType = option.getValueType();
if (optType == IOption.STRING) {
outputs.add(outputPrefix + option.getStringValue());
@@ -562,7 +562,7 @@ public class ManagedBuildGnuToolInfo implements IManagedBuildGnuToolInfo {
// NO - myCommandOutputs.addAll(outputs);
typeEnumeratedOutputs.addAll(outputs);
if (variable.length() > 0) {
- List<IPath> outputPaths = new ArrayList<IPath>();
+ List<IPath> outputPaths = new ArrayList<>();
for (int j = 0; j < outputs.size(); j++) {
outputPaths.add(Path.fromOSString(outputs.get(j)));
}
@@ -619,7 +619,7 @@ public class ManagedBuildGnuToolInfo implements IManagedBuildGnuToolInfo {
currList.addAll(Arrays.asList(outNames));
myOutputMacros.put(variable, currList);
} else {
- myOutputMacros.put(variable, new ArrayList<IPath>(Arrays.asList(outNames)));
+ myOutputMacros.put(variable, new ArrayList<>(Arrays.asList(outNames)));
}
}
} else
@@ -646,7 +646,7 @@ public class ManagedBuildGnuToolInfo implements IManagedBuildGnuToolInfo {
}
typeEnumeratedOutputs.addAll(namesList);
if (variable.length() > 0) {
- List<IPath> outputPaths = new ArrayList<IPath>();
+ List<IPath> outputPaths = new ArrayList<>();
for (int j = 0; j < namesList.size(); j++) {
outputPaths.add(Path.fromOSString(namesList.get(j)));
}
@@ -665,7 +665,7 @@ public class ManagedBuildGnuToolInfo implements IManagedBuildGnuToolInfo {
// using the built-in string substitution functions of <code>make</code>.
if (multOfType) {
// This case is not handled - a nameProvider or outputNames must be specified
- List<String> errList = new ArrayList<String>();
+ List<String> errList = new ArrayList<>();
errList.add(ManagedMakeMessages.getResourceString("MakefileGenerator.error.no.nameprovider")); //$NON-NLS-1$
myCommandOutputs.addAll(errList);
} else {
@@ -703,7 +703,7 @@ public class ManagedBuildGnuToolInfo implements IManagedBuildGnuToolInfo {
}
typeEnumeratedOutputs.add(namePattern.replaceAll("%", fileName)); //$NON-NLS-1$
if (variable.length() > 0) {
- List<IPath> outputs = new ArrayList<IPath>();
+ List<IPath> outputs = new ArrayList<>();
outputs.add(Path.fromOSString(fileName));
if (myOutputMacros.containsKey(variable)) {
List<IPath> currList = myOutputMacros.get(variable);
@@ -802,7 +802,7 @@ public class ManagedBuildGnuToolInfo implements IManagedBuildGnuToolInfo {
String depsMacroEntry = calculateSourceMacro(makeGen, extensionName, depExt,
IManagedBuilderMakefileGenerator.WILDCARD);
- List<IPath> depsList = new ArrayList<IPath>();
+ List<IPath> depsList = new ArrayList<>();
depsList.add(Path.fromOSString(depsMacroEntry));
String depsMacro = makeGen.getDepMacroName(extensionName).toString();
if (myOutputMacros.containsKey(depsMacro)) {
@@ -880,10 +880,10 @@ public class ManagedBuildGnuToolInfo implements IManagedBuildGnuToolInfo {
HashSet<String> handledInputExtensions, ToolInfoHolder h, boolean lastChance) {
// Get the dependencies for this tool invocation
boolean done = true;
- Vector<String> myCommandDependencies = new Vector<String>();
- Vector<String> myAdditionalTargets = new Vector<String>();
+ Vector<String> myCommandDependencies = new Vector<>();
+ Vector<String> myAdditionalTargets = new Vector<>();
//Vector myEnumeratedDependencies = new Vector();
- HashMap<String, List<IPath>> myOutputMacros = new HashMap<String, List<IPath>>();
+ HashMap<String, List<IPath>> myOutputMacros = new HashMap<>();
IInputType[] inTypes = tool.getInputTypes();
if (inTypes != null && inTypes.length > 0) {
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/pdomdepgen/PDOMDependencyCalculator.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/pdomdepgen/PDOMDependencyCalculator.java
index 2d5ae70746..444f2fe62d 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/pdomdepgen/PDOMDependencyCalculator.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/pdomdepgen/PDOMDependencyCalculator.java
@@ -77,7 +77,7 @@ public class PDOMDependencyCalculator implements IManagedDependencyCalculator {
if (files.length > 0) {
IIndexInclude[] includes = index.findIncludes(files[0], IIndex.DEPTH_INFINITE);
- List<IPath> list = new ArrayList<IPath>();
+ List<IPath> list = new ArrayList<>();
for (IIndexInclude inc : includes) {
if (inc.isResolved()) {
list.add(IndexLocationFactory.getAbsolutePath(inc.getIncludesLocation()));
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/projectconverter/UpdateManagedProject12.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/projectconverter/UpdateManagedProject12.java
index b8dee4902d..3a0683862b 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/projectconverter/UpdateManagedProject12.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/projectconverter/UpdateManagedProject12.java
@@ -118,7 +118,7 @@ class UpdateManagedProject12 {
boolean debug = false;
int type = -1;
- Vector<String> idTokens = new Vector<String>(Arrays.asList(oldId.split(REGEXP_SEPARATOR)));
+ Vector<String> idTokens = new Vector<>(Arrays.asList(oldId.split(REGEXP_SEPARATOR)));
try {
String platform = idTokens.get(0);
if (platform.equalsIgnoreCase(ID_CYGWIN)) {
@@ -240,11 +240,11 @@ class UpdateManagedProject12 {
String optId = null;
String[] idTokens = oldId.split(REGEXP_SEPARATOR);
- Vector<String> oldIdVector = new Vector<String>(Arrays.asList(idTokens));
+ Vector<String> oldIdVector = new Vector<>(Arrays.asList(idTokens));
if (isBuiltInOption(oldIdVector)) {
// New ID will be in form gnu.[c|c++|both].[compiler|link|lib].option.{1.2_component}
- Vector<String> newIdVector = new Vector<String>(idTokens.length + 2);
+ Vector<String> newIdVector = new Vector<>(idTokens.length + 2);
// We can ignore the first element of the old IDs since it is just [cygwin|linux|solaris]
for (int index = 1; index < idTokens.length; ++index) {
@@ -412,7 +412,7 @@ class UpdateManagedProject12 {
case IOption.PREPROCESSOR_SYMBOLS:
case IOption.LIBRARIES:
case IOption.OBJECTS:
- Vector<String> values = new Vector<String>();
+ Vector<String> values = new Vector<>();
NodeList nodes = optRef.getElementsByTagName(IOption.LIST_VALUE);
for (int i = 0; i < nodes.getLength(); ++i) {
Node node = nodes.item(i);
@@ -450,7 +450,7 @@ class UpdateManagedProject12 {
// Is this a built-in target or one we cannot convert
boolean builtIn = false;
- Vector<String> idTokens = new Vector<String>(Arrays.asList(oldId.split(REGEXP_SEPARATOR)));
+ Vector<String> idTokens = new Vector<>(Arrays.asList(oldId.split(REGEXP_SEPARATOR)));
try {
String platform = idTokens.get(0);
if (platform.equalsIgnoreCase(ID_CYGWIN)) {
@@ -558,7 +558,7 @@ class UpdateManagedProject12 {
int toolType = -1;
// Figure out what kind of tool the ref pointed to
- Vector<String> idTokens = new Vector<String>(Arrays.asList(oldId.split(REGEXP_SEPARATOR)));
+ Vector<String> idTokens = new Vector<>(Arrays.asList(oldId.split(REGEXP_SEPARATOR)));
for (String token : idTokens) {
if (token.equals(TOOL_LANG_C)) {
@@ -789,7 +789,7 @@ class UpdateManagedProject12 {
*/
protected static Map<String, IConfiguration> getConfigIdMap() {
if (configIdMap == null) {
- configIdMap = new HashMap<String, IConfiguration>();
+ configIdMap = new HashMap<>();
}
return configIdMap;
}
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/projectconverter/UpdateManagedProject20.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/projectconverter/UpdateManagedProject20.java
index 793ce9d99e..be4db6fe38 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/projectconverter/UpdateManagedProject20.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/projectconverter/UpdateManagedProject20.java
@@ -433,7 +433,7 @@ class UpdateManagedProject20 {
case IOption.PREPROCESSOR_SYMBOLS:
case IOption.LIBRARIES:
case IOption.OBJECTS: {
- Vector<String> values = new Vector<String>();
+ Vector<String> values = new Vector<>();
NodeList nodes = optRef.getElementsByTagName(IOption.LIST_VALUE);
for (int j = 0; j < nodes.getLength(); ++j) {
Node node = nodes.item(j);
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/projectconverter/UpdateManagedProjectManager.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/projectconverter/UpdateManagedProjectManager.java
index 153451b235..2e3884d350 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/projectconverter/UpdateManagedProjectManager.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/projectconverter/UpdateManagedProjectManager.java
@@ -47,7 +47,7 @@ import org.osgi.framework.Version;
* @noinstantiate This class is not intended to be instantiated by clients.
*/
public class UpdateManagedProjectManager {
- static private ThreadLocal<Map<String, UpdateManagedProjectManager>> fThreadInfo = new ThreadLocal<Map<String, UpdateManagedProjectManager>>();
+ static private ThreadLocal<Map<String, UpdateManagedProjectManager>> fThreadInfo = new ThreadLocal<>();
static private IOverwriteQuery fBackupFileOverwriteQuery = null;
static private IOverwriteQuery fOpenQuestionQuery = null;
static private IOverwriteQuery fUpdateProjectQuery = null;
@@ -109,7 +109,7 @@ public class UpdateManagedProjectManager {
static private Map<String, UpdateManagedProjectManager> getManagerMap(boolean create) {
Map<String, UpdateManagedProjectManager> map = fThreadInfo.get();
if (map == null && create) {
- map = new HashMap<String, UpdateManagedProjectManager>();
+ map = new HashMap<>();
fThreadInfo.set(map);
}
return map;
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/templateengine/ProjectCreatedActions.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/templateengine/ProjectCreatedActions.java
index 6762c2df81..719008c842 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/templateengine/ProjectCreatedActions.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/templateengine/ProjectCreatedActions.java
@@ -117,7 +117,7 @@ public class ProjectCreatedActions {
ManagedProject newManagedProject = new ManagedProject(project, configs[0].getProjectType());
info.setManagedProject(newManagedProject);
- original2newConfigs = new HashMap<IConfiguration, IConfiguration>();
+ original2newConfigs = new HashMap<>();
ICConfigurationDescription active = null;
for (IConfiguration cfg : configs) {
if (cfg != null) {
@@ -180,7 +180,7 @@ public class ProjectCreatedActions {
}
public Set<IConfiguration> getNewConfigurations(Collection<IConfiguration> originalConfigs) {
- Set<IConfiguration> result = new HashSet<IConfiguration>();
+ Set<IConfiguration> result = new HashSet<>();
for (IConfiguration cfg : originalConfigs) {
result.add(getNewConfiguration(cfg));
}
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/templateengine/processes/ExcludeResources.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/templateengine/processes/ExcludeResources.java
index e7f716f7bc..bc3e882144 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/templateengine/processes/ExcludeResources.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/templateengine/processes/ExcludeResources.java
@@ -78,7 +78,7 @@ public class ExcludeResources extends ProcessRunner {
* Determine which configurations to exclude for
*/
IConfiguration[] allConfigs = managedProject.getConfigurations();
- List<IConfiguration> matchingConfigs = new ArrayList<IConfiguration>();
+ List<IConfiguration> matchingConfigs = new ArrayList<>();
for (int i = 0; i < allConfigs.length; i++) {
IConfiguration config = allConfigs[i];
if (config.getId().matches(configIdPattern)) {
@@ -87,7 +87,7 @@ public class ExcludeResources extends ProcessRunner {
}
if (invert) {
- List<IConfiguration> invertedConfigs = new ArrayList<IConfiguration>(Arrays.asList(allConfigs));
+ List<IConfiguration> invertedConfigs = new ArrayList<>(Arrays.asList(allConfigs));
invertedConfigs.removeAll(matchingConfigs);
matchingConfigs = invertedConfigs;
}
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/newmake/core/MakeScannerInfo.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/newmake/core/MakeScannerInfo.java
index 499988445c..b921dcb9fd 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/newmake/core/MakeScannerInfo.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/newmake/core/MakeScannerInfo.java
@@ -89,7 +89,7 @@ public class MakeScannerInfo implements IScannerInfo {
@Override
public synchronized Map<String, String> getDefinedSymbols() {
// Return the defined symbols for the default configuration
- HashMap<String, String> symbols = new HashMap<String, String>();
+ HashMap<String, String> symbols = new HashMap<>();
String[] symbolList = getPreprocessorSymbols();
for (int i = 0; i < symbolList.length; ++i) {
String symbol = symbolList[i];
@@ -112,7 +112,7 @@ public class MakeScannerInfo implements IScannerInfo {
protected List<String> getPathList() {
if (pathList == null) {
- pathList = new ArrayList<String>();
+ pathList = new ArrayList<>();
}
return pathList;
}
@@ -123,7 +123,7 @@ public class MakeScannerInfo implements IScannerInfo {
protected List<String> getSymbolList() {
if (symbolList == null) {
- symbolList = new ArrayList<String>();
+ symbolList = new ArrayList<>();
}
return symbolList;
}
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/newmake/core/MakeScannerProvider.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/newmake/core/MakeScannerProvider.java
index a6fd11f4c2..b9e4f57e79 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/newmake/core/MakeScannerProvider.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/newmake/core/MakeScannerProvider.java
@@ -122,8 +122,8 @@ public class MakeScannerProvider extends ScannerProvider {
private MakeScannerInfo loadScannerInfo(IProject project) throws CoreException {
ICDescriptor descriptor = CCorePlugin.getDefault().getCProjectDescription(project);
ICStorageElement root = descriptor.getProjectStorageElement(CDESCRIPTOR_ID);
- ArrayList<String> includes = new ArrayList<String>();
- ArrayList<String> symbols = new ArrayList<String>();
+ ArrayList<String> includes = new ArrayList<>();
+ ArrayList<String> symbols = new ArrayList<>();
for (ICStorageElement child : root.getChildren()) {
if (child.getName().equals(INCLUDE_PATH)) {
// Add the path to the property list
@@ -144,7 +144,7 @@ public class MakeScannerProvider extends ScannerProvider {
String[] includes = info.getIncludePaths();
ICProject cProject = CoreModel.getDefault().create(info.getProject());
IPathEntry[] entries = cProject.getRawPathEntries();
- List<IPathEntry> cPaths = new ArrayList<IPathEntry>(Arrays.asList(entries));
+ List<IPathEntry> cPaths = new ArrayList<>(Arrays.asList(entries));
Iterator<IPathEntry> cpIter = cPaths.iterator();
while (cpIter.hasNext()) {
diff --git a/build/org.eclipse.cdt.managedbuilder.gnu.ui/src/org/eclipse/cdt/managedbuilder/gnu/cygwin/CygwinPathResolver.java b/build/org.eclipse.cdt.managedbuilder.gnu.ui/src/org/eclipse/cdt/managedbuilder/gnu/cygwin/CygwinPathResolver.java
index 697e0caa7d..297cd23644 100644
--- a/build/org.eclipse.cdt.managedbuilder.gnu.ui/src/org/eclipse/cdt/managedbuilder/gnu/cygwin/CygwinPathResolver.java
+++ b/build/org.eclipse.cdt.managedbuilder.gnu.ui/src/org/eclipse/cdt/managedbuilder/gnu/cygwin/CygwinPathResolver.java
@@ -238,7 +238,7 @@ public class CygwinPathResolver implements IBuildPathResolver {
InputStream ein = proc.getInputStream();
try {
BufferedReader d1 = new BufferedReader(new InputStreamReader(ein));
- ArrayList<String> ls = new ArrayList<String>(10);
+ ArrayList<String> ls = new ArrayList<>(10);
String s;
while ((s = d1.readLine()) != null) {
ls.add(s);
diff --git a/build/org.eclipse.cdt.managedbuilder.gnu.ui/src/org/eclipse/cdt/managedbuilder/gnu/templates/SimpleMakefileGenerator.java b/build/org.eclipse.cdt.managedbuilder.gnu.ui/src/org/eclipse/cdt/managedbuilder/gnu/templates/SimpleMakefileGenerator.java
index fe372eb766..5c3e32a54a 100644
--- a/build/org.eclipse.cdt.managedbuilder.gnu.ui/src/org/eclipse/cdt/managedbuilder/gnu/templates/SimpleMakefileGenerator.java
+++ b/build/org.eclipse.cdt.managedbuilder.gnu.ui/src/org/eclipse/cdt/managedbuilder/gnu/templates/SimpleMakefileGenerator.java
@@ -81,7 +81,7 @@ public class SimpleMakefileGenerator extends ProcessRunner {
getProcessMessage(processId, IStatus.ERROR, Messages.getString("AddFile.2") + MAKEFILE)); //$NON-NLS-1$
}
- Map<String, String> macros = new HashMap<String, String>(template.getValueStore());
+ Map<String, String> macros = new HashMap<>(template.getValueStore());
macros.put("exe", Platform.getOS().equals(Platform.OS_WIN32) ? ".exe" : ""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
fileContents = replaceMacros(fileContents, macros);
diff --git a/build/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/TestCustomPageManager.java b/build/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/TestCustomPageManager.java
index 1164bafd94..dd7c4d32f4 100644
--- a/build/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/TestCustomPageManager.java
+++ b/build/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/TestCustomPageManager.java
@@ -69,7 +69,7 @@ public class TestCustomPageManager extends TestCase {
MBSCustomPageManager.addPageProperty(MBSCustomPageManager.PAGE_ID, MBSCustomPageManager.PROJECT_TYPE, "X");
// set the toolchain to "Y"
- List<TestToolchain> toolchainSet = new ArrayList<TestToolchain>();
+ List<TestToolchain> toolchainSet = new ArrayList<>();
TestToolchain toolchain = new TestToolchain();
toolchain.setID("Y");
toolchainSet.add(toolchain);
@@ -135,7 +135,7 @@ public class TestCustomPageManager extends TestCase {
MBSCustomPageManager.addPageProperty(MBSCustomPageManager.PAGE_ID, MBSCustomPageManager.PROJECT_TYPE, "X");
// set the toolchain to "Y"
- List<TestToolchain> toolchainSet = new ArrayList<TestToolchain>();
+ List<TestToolchain> toolchainSet = new ArrayList<>();
TestToolchain toolchain = new TestToolchain();
toolchain.setID("Y");
toolchainSet.add(toolchain);
@@ -213,7 +213,7 @@ public class TestCustomPageManager extends TestCase {
MBSCustomPageManager.addPageProperty(MBSCustomPageManager.PAGE_ID, MBSCustomPageManager.PROJECT_TYPE, "X");
// set the toolchain to "Y"
- List<TestToolchain> toolchainSet = new ArrayList<TestToolchain>();
+ List<TestToolchain> toolchainSet = new ArrayList<>();
TestToolchain toolchain = new TestToolchain();
toolchain.setID("Y");
toolchainSet.add(toolchain);
@@ -291,7 +291,7 @@ public class TestCustomPageManager extends TestCase {
MBSCustomPageManager.addPageProperty(MBSCustomPageManager.PAGE_ID, MBSCustomPageManager.PROJECT_TYPE, "X");
// set the toolchain to "C"
- List<TestToolchain> toolchainSet = new ArrayList<TestToolchain>();
+ List<TestToolchain> toolchainSet = new ArrayList<>();
TestToolchain toolchain = new TestToolchain();
toolchain.setID("C");
toolchainSet.add(toolchain);
@@ -369,7 +369,7 @@ public class TestCustomPageManager extends TestCase {
MBSCustomPageManager.addPageProperty(MBSCustomPageManager.PAGE_ID, MBSCustomPageManager.PROJECT_TYPE, "X");
// set the toolchain to "C"
- List<TestToolchain> toolchainSet = new ArrayList<TestToolchain>();
+ List<TestToolchain> toolchainSet = new ArrayList<>();
TestToolchain toolchain = new TestToolchain();
toolchain.setID("C_2.0.0");
toolchainSet.add(toolchain);
@@ -459,7 +459,7 @@ public class TestCustomPageManager extends TestCase {
MBSCustomPageManager.addPageProperty(MBSCustomPageManager.PAGE_ID, MBSCustomPageManager.PROJECT_TYPE, "D");
// set the toolchain to "Y"
- List<TestToolchain> toolchainSet = new ArrayList<TestToolchain>();
+ List<TestToolchain> toolchainSet = new ArrayList<>();
TestToolchain toolchain = new TestToolchain();
toolchain.setID("Y");
toolchainSet.add(toolchain);
@@ -538,7 +538,7 @@ public class TestCustomPageManager extends TestCase {
MBSCustomPageManager.addPageProperty(MBSCustomPageManager.PAGE_ID, MBSCustomPageManager.PROJECT_TYPE, "E");
// set the toolchain to "Y"
- List<TestToolchain> toolchainSet = new ArrayList<TestToolchain>();
+ List<TestToolchain> toolchainSet = new ArrayList<>();
TestToolchain toolchain = new TestToolchain();
toolchain.setID("Y");
toolchainSet.add(toolchain);
@@ -617,7 +617,7 @@ public class TestCustomPageManager extends TestCase {
MBSCustomPageManager.addPageProperty(MBSCustomPageManager.PAGE_ID, MBSCustomPageManager.PROJECT_TYPE, "X");
// set the toolchain to "F"
- List<TestToolchain> toolchainSet = new ArrayList<TestToolchain>();
+ List<TestToolchain> toolchainSet = new ArrayList<>();
TestToolchain toolchain = new TestToolchain();
toolchain.setID("F");
toolchainSet.add(toolchain);
@@ -695,7 +695,7 @@ public class TestCustomPageManager extends TestCase {
MBSCustomPageManager.addPageProperty(MBSCustomPageManager.PAGE_ID, MBSCustomPageManager.PROJECT_TYPE, "D");
// set the toolchain to "C"
- List<TestToolchain> toolchainSet = new ArrayList<TestToolchain>();
+ List<TestToolchain> toolchainSet = new ArrayList<>();
TestToolchain toolchain = new TestToolchain();
toolchain.setID("C");
toolchainSet.add(toolchain);
diff --git a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/internal/ui/commands/BuildFilesHandler.java b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/internal/ui/commands/BuildFilesHandler.java
index ba53fcc334..e160b4d7f5 100644
--- a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/internal/ui/commands/BuildFilesHandler.java
+++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/internal/ui/commands/BuildFilesHandler.java
@@ -128,7 +128,7 @@ public class BuildFilesHandler extends AbstractResourceActionHandler {
* across all selected resources.
*/
private Collection<IProject> getProjectsToBuild(List<IFile> selectedFiles) {
- Set<IProject> projectsToBuild = new HashSet<IProject>();
+ Set<IProject> projectsToBuild = new HashSet<>();
for (IFile file : selectedFiles) {
IProject project = file.getProject();
if (!projectsToBuild.contains(project)) {
diff --git a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/internal/ui/commands/ConvertTargetDialog.java b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/internal/ui/commands/ConvertTargetDialog.java
index 365cc2a2ff..55d4e75cf5 100644
--- a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/internal/ui/commands/ConvertTargetDialog.java
+++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/internal/ui/commands/ConvertTargetDialog.java
@@ -192,7 +192,7 @@ public class ConvertTargetDialog extends Dialog {
private Map<String, IConfigurationElement> getConversionElements() {
if (conversionElements == null) {
- conversionElements = new HashMap<String, IConfigurationElement>();
+ conversionElements = new HashMap<>();
}
return conversionElements;
}
diff --git a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ArtifactTab.java b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ArtifactTab.java
index a7ba26b34e..c8bde41f4c 100644
--- a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ArtifactTab.java
+++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ArtifactTab.java
@@ -60,9 +60,9 @@ public class ArtifactTab extends AbstractCBuildPropertyTab {
NAME, EXT, PREF
}
- private Set<String> set2 = new TreeSet<String>();
- private Set<String> set3 = new TreeSet<String>();
- private Set<String> set4 = new TreeSet<String>();
+ private Set<String> set2 = new TreeSet<>();
+ private Set<String> set3 = new TreeSet<>();
+ private Set<String> set4 = new TreeSet<>();
@Override
public void createControls(Composite parent) {
diff --git a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BuildOptionSettingsUI.java b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BuildOptionSettingsUI.java
index 287e7c0cbe..d20ac18b21 100644
--- a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BuildOptionSettingsUI.java
+++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BuildOptionSettingsUI.java
@@ -99,7 +99,7 @@ import org.eclipse.ui.dialogs.PatternFilter;
* Option settings page in project properties Build Settings under Tool Settings tab.
*/
public class BuildOptionSettingsUI extends AbstractToolSettingUI {
- private Map<String, FieldEditor> fieldsMap = new HashMap<String, FieldEditor>();
+ private Map<String, FieldEditor> fieldsMap = new HashMap<>();
private IOptionCategory category;
private IHoldsOptions optionHolder;
/** Option Holders involved */
@@ -107,7 +107,7 @@ public class BuildOptionSettingsUI extends AbstractToolSettingUI {
/** The index of the current IHoldsOptions in ohs */
private int curr = -1;
private Map<String, CustomFieldEditorDescriptor> customFieldEditorDescriptorIndex;
- private Map<FieldEditor, Composite> fieldEditorsToParentMap = new HashMap<FieldEditor, Composite>();
+ private Map<FieldEditor, Composite> fieldEditorsToParentMap = new HashMap<>();
/** True if the user selected "Display tool option tips at a fixed location" in Preferences */
private boolean displayFixedTip;
/** type of mouse action the displayFixedTip responds to.
@@ -206,7 +206,7 @@ public class BuildOptionSettingsUI extends AbstractToolSettingUI {
* which contain the option category and accept the input type
* of this option holder.
*/
- ArrayList<IHoldsOptions> lst = new ArrayList<IHoldsOptions>();
+ ArrayList<IHoldsOptions> lst = new ArrayList<>();
if (optionHolder instanceof ITool) {
String ext = ((ITool) optionHolder).getDefaultInputExtension();
for (int i = 0; i < ris.length; i++) {
@@ -417,7 +417,7 @@ public class BuildOptionSettingsUI extends AbstractToolSettingUI {
// in the plugin.xml file) in the UI Combobox. This refrains the user from selecting an
// invalid value and avoids issuing an error message.
String[] enumNames = opt.getApplicableValues();
- Vector<String> enumValidList = new Vector<String>();
+ Vector<String> enumValidList = new Vector<>();
for (int i = 0; i < enumNames.length; ++i) {
if (opt.getValueHandler().isEnumValueAppropriate(config, opt.getOptionHolder(), opt,
opt.getValueHandlerExtraArgument(), enumNames[i])) {
@@ -564,7 +564,7 @@ public class BuildOptionSettingsUI extends AbstractToolSettingUI {
if (this.customFieldEditorDescriptorIndex != null)
return;
- this.customFieldEditorDescriptorIndex = new HashMap<String, CustomFieldEditorDescriptor>();
+ this.customFieldEditorDescriptorIndex = new HashMap<>();
IExtensionPoint ep = Platform.getExtensionRegistry()
.getExtensionPoint(ManagedBuilderUIPlugin.getUniqueIdentifier() + ".buildDefinitionsUI"); //$NON-NLS-1$
@@ -977,7 +977,7 @@ public class BuildOptionSettingsUI extends AbstractToolSettingUI {
boolean selectNewEnum = true;
boolean selectDefault = false;
- Vector<String> enumValidList = new Vector<String>();
+ Vector<String> enumValidList = new Vector<>();
for (int i = 0; i < enumNames.length; ++i) {
if (opt.getValueHandler().isEnumValueAppropriate(config, opt.getOptionHolder(), opt,
opt.getValueHandlerExtraArgument(), enumNames[i])) {
@@ -1166,14 +1166,14 @@ public class BuildOptionSettingsUI extends AbstractToolSettingUI {
if (children == null)
return null;
- List<ITreeOption> childrenList = new ArrayList<ITreeOption>(Arrays.asList(children));
+ List<ITreeOption> childrenList = new ArrayList<>(Arrays.asList(children));
// Check if any of the children has empty name
List<ITreeOption> toRemove = null;
for (ITreeOption child : children) {
if (child.getName() == null || child.getName().trim().length() == 0) {
if (toRemove == null) {
- toRemove = new ArrayList<ITreeOption>();
+ toRemove = new ArrayList<>();
}
toRemove.add(child);
}
diff --git a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BuildStepsTab.java b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BuildStepsTab.java
index ee05a1d231..a5207a2dbe 100644
--- a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BuildStepsTab.java
+++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BuildStepsTab.java
@@ -74,10 +74,10 @@ public class BuildStepsTab extends AbstractCBuildPropertyTab {
PRECMD, PREANN, PSTCMD, PSTANN
}
- private Set<String> set1 = new TreeSet<String>();
- private Set<String> set2 = new TreeSet<String>();
- private Set<String> set3 = new TreeSet<String>();
- private Set<String> set4 = new TreeSet<String>();
+ private Set<String> set1 = new TreeSet<>();
+ private Set<String> set2 = new TreeSet<>();
+ private Set<String> set3 = new TreeSet<>();
+ private Set<String> set4 = new TreeSet<>();
private static final String[] rcbsApplicabilityRules = {
Messages.ResourceCustomBuildStepBlock_label_applicability_rule_override,
@@ -292,7 +292,7 @@ public class BuildStepsTab extends AbstractCBuildPropertyTab {
}
private ITool[] getRcbsTools(IResourceInfo rcConfig) {
- List<ITool> list = new ArrayList<ITool>();
+ List<ITool> list = new ArrayList<>();
ITool tools[] = rcConfig.getTools();
for (int i = 0; i < tools.length; i++) {
diff --git a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BuildToolSettingUI.java b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BuildToolSettingUI.java
index 9d6c882df5..705d84b934 100644
--- a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BuildToolSettingUI.java
+++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BuildToolSettingUI.java
@@ -125,8 +125,8 @@ public class BuildToolSettingUI extends AbstractToolSettingUI {
super(info);
this.fTool = _tool;
buildPropPage = page;
- stringOptionsMap = new HashMap<String, String>();
- userObjsMap = new HashMap<IOption, String>();
+ stringOptionsMap = new HashMap<>();
+ userObjsMap = new HashMap<>();
}
/* (non-Javadoc)
@@ -188,7 +188,7 @@ public class BuildToolSettingUI extends AbstractToolSettingUI {
*/
private Vector<String> getDefaultOptionNames() {
if (defaultOptionNames == null) {
- defaultOptionNames = new Vector<String>();
+ defaultOptionNames = new Vector<>();
defaultOptionNames.add("Other flags"); //$NON-NLS-1$
defaultOptionNames.add("Linker flags"); //$NON-NLS-1$
defaultOptionNames.add("Archiver flags"); //$NON-NLS-1$
@@ -215,8 +215,8 @@ public class BuildToolSettingUI extends AbstractToolSettingUI {
* @return Vector containing all options
*/
private Vector<String> getOptionVector(String rawOptionString) {
- Vector<String> tokens = new Vector<String>(Arrays.asList(rawOptionString.split("\\s"))); //$NON-NLS-1$
- Vector<String> output = new Vector<String>(tokens.size());
+ Vector<String> tokens = new Vector<>(Arrays.asList(rawOptionString.split("\\s"))); //$NON-NLS-1$
+ Vector<String> output = new Vector<>(tokens.size());
Iterator<String> iter = tokens.iterator();
while (iter.hasNext()) {
@@ -269,7 +269,7 @@ public class BuildToolSettingUI extends AbstractToolSettingUI {
String alloptions = getToolSettingsPrefStore().getString(ToolSettingsPrefStore.ALL_OPTIONS_ID);
// list that holds the options for the option type other than
// boolean,string and enumerated
- List<String> optionsList = new ArrayList<String>();
+ List<String> optionsList = new ArrayList<>();
// additional options buffer
StringBuilder addnOptions = new StringBuilder();
// split all build options string
@@ -393,7 +393,7 @@ public class BuildToolSettingUI extends AbstractToolSettingUI {
for (int s = 0; s < objSet.size(); s++) {
for (IOption op : objSet) {
String val = userObjsMap.get(op);
- ArrayList<String> list = new ArrayList<String>();
+ ArrayList<String> list = new ArrayList<>();
for (String v : parseString(val)) {
if (alloptions.indexOf(v) != -1)
list.add(v);
@@ -414,7 +414,7 @@ public class BuildToolSettingUI extends AbstractToolSettingUI {
try {
switch (opt.getValueType()) {
case IOption.BOOLEAN:
- ArrayList<String> optsList = new ArrayList<String>(optionsArr);
+ ArrayList<String> optsList = new ArrayList<>(optionsArr);
if (opt.getCommand() != null && opt.getCommand().length() > 0
&& !optsList.contains(opt.getCommand()))
setOption(opt, false);
@@ -436,7 +436,7 @@ public class BuildToolSettingUI extends AbstractToolSettingUI {
case IOption.INCLUDE_PATH:
case IOption.PREPROCESSOR_SYMBOLS:
case IOption.LIBRARIES:
- ArrayList<String> newList = new ArrayList<String>();
+ ArrayList<String> newList = new ArrayList<>();
for (String s : optionsList) {
if (opt.getCommand() != null && s.startsWith(opt.getCommand())) {
newList.add(s.substring(opt.getCommand().length()));
diff --git a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/CPropertyVarsTab.java b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/CPropertyVarsTab.java
index 02cfa7795f..bbed363c19 100644
--- a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/CPropertyVarsTab.java
+++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/CPropertyVarsTab.java
@@ -102,7 +102,7 @@ public class CPropertyVarsTab extends AbstractCPropertyTab {
};
private boolean fShowSysMacros = false;
- private Set<String> fIncorrectlyDefinedMacrosNames = new HashSet<String>();
+ private Set<String> fIncorrectlyDefinedMacrosNames = new HashSet<>();
private TableViewer tv;
private Label fStatusLabel;
@@ -545,7 +545,7 @@ public class CPropertyVarsTab extends AbstractCPropertyTab {
if (cfgd == null) {
chkVars();
if (fShowSysMacros) {
- List<ICdtVariable> lst = new ArrayList<ICdtVariable>(_vars.length);
+ List<ICdtVariable> lst = new ArrayList<>(_vars.length);
ICdtVariable[] uvars = prefvars.getMacros();
for (int i = 0; i < uvars.length; i++) {
lst.add(uvars[i]);
@@ -567,7 +567,7 @@ public class CPropertyVarsTab extends AbstractCPropertyTab {
}
}
- ArrayList<ICdtVariable> list = new ArrayList<ICdtVariable>(_vars.length);
+ ArrayList<ICdtVariable> list = new ArrayList<>(_vars.length);
for (int i = 0; i < _vars.length; i++) {
if (_vars[i] != null && (fShowSysMacros || isUserVar(_vars[i])))
list.add(_vars[i]);
diff --git a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/DiscoveryTab.java b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/DiscoveryTab.java
index 43ae518d2a..8111f0ed67 100644
--- a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/DiscoveryTab.java
+++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/DiscoveryTab.java
@@ -451,7 +451,7 @@ public class DiscoveryTab extends AbstractCBuildPropertyTab implements IBuildInf
Set<String> contextProfiles = null;
if (page.isForPrefs()) {
// for preference page get all profiles
- contextProfiles = new TreeSet<String>(profilesList);
+ contextProfiles = new TreeSet<>(profilesList);
} else {
// property page
if (!needPerRcProfile) {
@@ -467,7 +467,7 @@ public class DiscoveryTab extends AbstractCBuildPropertyTab implements IBuildInf
if (isMakefileProjectToolChain(toolchain)) {
// for generic Makefile project let user choose any profile
- contextProfiles = new TreeSet<String>(profilesList);
+ contextProfiles = new TreeSet<>(profilesList);
} else {
contextProfiles = CfgScannerConfigUtil.getAllScannerDiscoveryProfileIds(toolchain);
}
@@ -486,7 +486,7 @@ public class DiscoveryTab extends AbstractCBuildPropertyTab implements IBuildInf
}
}
- visibleProfilesList = new ArrayList<String>(contextProfiles);
+ visibleProfilesList = new ArrayList<>(contextProfiles);
realPages = new AbstractDiscoveryPage[visibleProfilesList.size()];
String[] labels = new String[visibleProfilesList.size()];
@@ -596,7 +596,7 @@ public class DiscoveryTab extends AbstractCBuildPropertyTab implements IBuildInf
private void initializeProfilePageMap() {
GCCPerProjectSCDProfilePage.isSIConsoleEnabled = DefaultRunSIProvider.isConsoleEnabled();
- pagesList = new ArrayList<DiscoveryProfilePageConfiguration>(5);
+ pagesList = new ArrayList<>(5);
IExtensionPoint point = Platform.getExtensionRegistry().getExtensionPoint(NAMESPACE, POINT);
if (point == null)
return;
@@ -707,11 +707,11 @@ public class DiscoveryTab extends AbstractCBuildPropertyTab implements IBuildInf
private List<CfgInfoContext> checkChanges() {
if (cbi == null || baseInfoMap == null)
- return new ArrayList<CfgInfoContext>(0);
+ return new ArrayList<>(0);
Map<CfgInfoContext, IScannerConfigBuilderInfo2> cfgInfoMap = cbi.getInfoMap();
- HashMap<InfoContext, Object> baseCopy = new HashMap<InfoContext, Object>(baseInfoMap);
- List<CfgInfoContext> list = new ArrayList<CfgInfoContext>();
+ HashMap<InfoContext, Object> baseCopy = new HashMap<>(baseInfoMap);
+ List<CfgInfoContext> list = new ArrayList<>();
for (Map.Entry<CfgInfoContext, IScannerConfigBuilderInfo2> entry : cfgInfoMap.entrySet()) {
CfgInfoContext cic = entry.getKey();
InfoContext c = cic.toInfoContext();
diff --git a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/FileListControlFieldEditor.java b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/FileListControlFieldEditor.java
index a1a6e3fad4..93dee75169 100644
--- a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/FileListControlFieldEditor.java
+++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/FileListControlFieldEditor.java
@@ -300,7 +300,7 @@ public class FileListControlFieldEditor extends FieldEditor {
*/
private String[] parseString(String stringList) {
StringTokenizer tokenizer = new StringTokenizer(stringList, DEFAULT_SEPARATOR);
- ArrayList<String> list = new ArrayList<String>();
+ ArrayList<String> list = new ArrayList<>();
while (tokenizer.hasMoreElements()) {
list.add((String) tokenizer.nextElement());
}
diff --git a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/NewCfgDialog.java b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/NewCfgDialog.java
index bc9cbb8bbd..58cd965577 100644
--- a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/NewCfgDialog.java
+++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/NewCfgDialog.java
@@ -437,7 +437,7 @@ public class NewCfgDialog implements INewCfgDialog {
des = prj;
ICConfigurationDescription[] descs = des.getConfigurations();
cfgds = new IConfiguration[descs.length];
- ArrayList<IConfiguration> lst = new ArrayList<IConfiguration>();
+ ArrayList<IConfiguration> lst = new ArrayList<>();
for (int i = 0; i < descs.length; ++i) {
cfgds[i] = ManagedBuildManager.getConfigurationForDescription(descs[i]);
IConfiguration cfg = cfgds[i];
@@ -620,7 +620,7 @@ public class NewCfgDialog implements INewCfgDialog {
}
private String[] getImportItems() {
- imported = new HashMap<String, IConfiguration>();
+ imported = new HashMap<>();
if (des != null) {
IProject[] ps = des.getProject().getWorkspace().getRoot().getProjects();
for (IProject p : ps) {
@@ -637,14 +637,14 @@ public class NewCfgDialog implements INewCfgDialog {
}
}
}
- ArrayList<String> lst = new ArrayList<String>(imported.keySet());
+ ArrayList<String> lst = new ArrayList<>(imported.keySet());
Collections.sort(lst);
lst.add(0, NOT);
return lst.toArray(new String[lst.size()]);
}
private String[] getImportDefItems() {
- importedDef = new HashMap<String, IConfiguration>();
+ importedDef = new HashMap<>();
IBuildPropertyManager bpm = ManagedBuildManager.getBuildPropertyManager();
IBuildPropertyType bpt = bpm.getPropertyType(ART);
for (IBuildPropertyValue v : bpt.getSupportedValues()) {
@@ -664,7 +664,7 @@ public class NewCfgDialog implements INewCfgDialog {
}
}
}
- ArrayList<String> lst = new ArrayList<String>(importedDef.keySet());
+ ArrayList<String> lst = new ArrayList<>(importedDef.keySet());
Collections.sort(lst);
lst.add(0, NOT);
return lst.toArray(new String[lst.size()]);
diff --git a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/RefreshPolicyExceptionDialog.java b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/RefreshPolicyExceptionDialog.java
index e0978e86e2..8c476c373d 100644
--- a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/RefreshPolicyExceptionDialog.java
+++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/RefreshPolicyExceptionDialog.java
@@ -65,7 +65,7 @@ public class RefreshPolicyExceptionDialog extends Dialog {
setShellStyle(getShellStyle());
fContrManager = RefreshExclusionContributionManager.getInstance();
fAddException = addException;
- fExclusionContributors = new LinkedList<RefreshExclusionContributor>(fContrManager.getContributors());
+ fExclusionContributors = new LinkedList<>(fContrManager.getContributors());
}
public RefreshPolicyExceptionDialog(Shell parent, IResource resource, java.util.List<RefreshExclusion> exclusions,
diff --git a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/RefreshPolicyTab.java b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/RefreshPolicyTab.java
index fd67c76e00..a051a26300 100644
--- a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/RefreshPolicyTab.java
+++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/RefreshPolicyTab.java
@@ -96,7 +96,7 @@ public class RefreshPolicyTab extends AbstractCBuildPropertyTab {
HashMap<IResource, List<RefreshExclusion>> resourceMap = fConfigurationToResourcesToExclusionsMap
.get(configName);
if (resourceMap == null) {
- resourceMap = new HashMap<IResource, List<RefreshExclusion>>();
+ resourceMap = new HashMap<>();
resourceMap.put(fProject, new ArrayList<RefreshExclusion>());
fConfigurationToResourcesToExclusionsMap.put(configName, resourceMap);
}
@@ -111,7 +111,7 @@ public class RefreshPolicyTab extends AbstractCBuildPropertyTab {
private HashMap<String, HashMap<IResource, List<RefreshExclusion>>> copyHashMap(
HashMap<String, HashMap<IResource, List<RefreshExclusion>>> source) {
- HashMap<String, HashMap<IResource, List<RefreshExclusion>>> target = new HashMap<String, HashMap<IResource, List<RefreshExclusion>>>();
+ HashMap<String, HashMap<IResource, List<RefreshExclusion>>> target = new HashMap<>();
if (source.isEmpty())
return target;
@@ -122,13 +122,13 @@ public class RefreshPolicyTab extends AbstractCBuildPropertyTab {
String configName = config_iterator.next();
HashMap<IResource, List<RefreshExclusion>> source_resourceMap = source.get(configName);
- HashMap<IResource, List<RefreshExclusion>> target_resourceMap = new HashMap<IResource, List<RefreshExclusion>>();
+ HashMap<IResource, List<RefreshExclusion>> target_resourceMap = new HashMap<>();
Iterator<IResource> resource_iterator = source_resourceMap.keySet().iterator();
while (resource_iterator.hasNext()) {
IResource source_resource = resource_iterator.next();
List<RefreshExclusion> source_exclusions = source_resourceMap.get(source_resource);
- List<RefreshExclusion> target_exclusions = new LinkedList<RefreshExclusion>();
+ List<RefreshExclusion> target_exclusions = new LinkedList<>();
for (RefreshExclusion exclusion : source_exclusions) {
// ADD each exclusion to the target exclusion list.
RefreshExclusion target_exclusion = (RefreshExclusion) exclusion.clone();
@@ -157,7 +157,7 @@ public class RefreshPolicyTab extends AbstractCBuildPropertyTab {
HashMap<IResource, List<RefreshExclusion>> resourceMap = getResourcesToExclusionsMap(configName);
List<RefreshExclusion> exclusions = resourceMap.get(resource);
if (exclusions == null) {
- exclusions = new LinkedList<RefreshExclusion>();
+ exclusions = new LinkedList<>();
resourceMap.put(resource, exclusions);
}
@@ -181,7 +181,7 @@ public class RefreshPolicyTab extends AbstractCBuildPropertyTab {
_Exception_Node exceptions_node = null;
// if this is a refresh exclusion, exclusion_instances is a list of exclusion instances associated with this exclusion
- List<_Exclusion_Instance> exclusion_instances = new ArrayList<_Exclusion_Instance>();
+ List<_Exclusion_Instance> exclusion_instances = new ArrayList<>();
_Entry(IResource _ent) {
resourceToRefresh = _ent;
@@ -214,7 +214,7 @@ public class RefreshPolicyTab extends AbstractCBuildPropertyTab {
public Object[] getChildren() {
if (isExclusion()) {
- List<Object> children = new ArrayList<Object>(exclusion_instances);
+ List<Object> children = new ArrayList<>(exclusion_instances);
if (exceptions_node != null)
children.add(exceptions_node);
return children.toArray();
@@ -278,7 +278,7 @@ public class RefreshPolicyTab extends AbstractCBuildPropertyTab {
_Entry parent; //can be IResource or RefreshExclusion - must not be null
//list of refresh exclusions under this Exceptions node
- List<_Entry> exceptions = new ArrayList<_Entry>();
+ List<_Entry> exceptions = new ArrayList<>();
_Exception_Node(_Entry ent) {
parent = ent;
@@ -307,7 +307,7 @@ public class RefreshPolicyTab extends AbstractCBuildPropertyTab {
} else {
List<RefreshExclusion> exclusions = getExclusions(getConfigName(), parent.resourceToRefresh);
if (exclusions == null) {
- exclusions = new LinkedList<RefreshExclusion>();
+ exclusions = new LinkedList<>();
getResourcesToExclusionsMap(getConfigName()).put(parent.resourceToRefresh, exclusions);
}
@@ -377,7 +377,7 @@ public class RefreshPolicyTab extends AbstractCBuildPropertyTab {
Group g1 = setupGroup(usercomp, Messages.RefreshPolicyTab_resourcesGroupLabel, 2,
GridData.FILL_HORIZONTAL | GridData.FILL_VERTICAL);
- fSrc = new ArrayList<_Entry>();
+ fSrc = new ArrayList<>();
generateTreeContent();
fTree = new TreeViewer(g1);
@@ -561,7 +561,7 @@ public class RefreshPolicyTab extends AbstractCBuildPropertyTab {
*/
@Override
public Object[] getChildren(Object element) {
- ArrayList<Object> filteredChildren = new ArrayList<Object>(Arrays.asList(super.getChildren(element)));
+ ArrayList<Object> filteredChildren = new ArrayList<>(Arrays.asList(super.getChildren(element)));
Iterator<IResource> iterator = getResourcesToExclusionsMap(getConfigName()).keySet().iterator();
while (iterator.hasNext()) {
diff --git a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ToolChainEditTab.java b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ToolChainEditTab.java
index 9a65bf02fd..b1b3383c37 100644
--- a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ToolChainEditTab.java
+++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ToolChainEditTab.java
@@ -275,7 +275,7 @@ public class ToolChainEditTab extends AbstractCBuildPropertyTab {
c_toolchain.removeAll();
boolean isMng = cfg.getBuilder().isManagedBuildOn();
- ArrayList<IToolChain> list = new ArrayList<IToolChain>();
+ ArrayList<IToolChain> list = new ArrayList<>();
IToolChain[] tcs = r_tcs;
if (b_dispCompatible.getSelection() && (ri instanceof IFolderInfo)) {
@@ -318,7 +318,7 @@ public class ToolChainEditTab extends AbstractCBuildPropertyTab {
realBuilder = cfg.getBuilder();
int pos = -1;
c_builder.removeAll();
- ArrayList<IBuilder> list = new ArrayList<IBuilder>();
+ ArrayList<IBuilder> list = new ArrayList<>();
IBuilder[] bs = r_bs;
@@ -443,7 +443,7 @@ public class ToolChainEditTab extends AbstractCBuildPropertyTab {
private boolean updateCompatibleTools(ITool real) {
boolean result = false;
- ArrayList<ITool> list = new ArrayList<ITool>();
+ ArrayList<ITool> list = new ArrayList<>();
IFileInfoModification fim = (IFileInfoModification) mod;
if (real != null) { // Current tool exists
diff --git a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ToolListContentProvider.java b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ToolListContentProvider.java
index 22d83d9346..2cbd8a41fd 100644
--- a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ToolListContentProvider.java
+++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ToolListContentProvider.java
@@ -57,7 +57,7 @@ public class ToolListContentProvider implements ITreeContentProvider {
private ToolListElement[] createElements(IConfiguration config) {
IOptionCategory toolChainCategories[];
ITool filteredTools[];
- List<ToolListElement> elementList = new ArrayList<ToolListElement>();
+ List<ToolListElement> elementList = new ArrayList<>();
if (config != null) {
// Get the the option categories of the toolChain
IToolChain toolChain = config.getToolChain();
@@ -88,7 +88,7 @@ public class ToolListContentProvider implements ITreeContentProvider {
}
private ToolListElement[] createElements(IResourceInfo info) {
- List<ToolListElement> elementList = new ArrayList<ToolListElement>();
+ List<ToolListElement> elementList = new ArrayList<>();
if (info != null) {
ITool[] tools = null;
if (info instanceof IFolderInfo) {
diff --git a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ToolListElement.java b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ToolListElement.java
index a7a7fa551e..53c55dd8e3 100644
--- a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ToolListElement.java
+++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ToolListElement.java
@@ -126,7 +126,7 @@ public class ToolListElement {
public void addChildElement(ToolListElement element) {
if (childElements == null)
- childElements = new ArrayList<ToolListElement>();
+ childElements = new ArrayList<>();
childElements.add(element);
}
}
diff --git a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ToolSelectionDialog.java b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ToolSelectionDialog.java
index 146f1bed0a..3aeae29f9f 100644
--- a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ToolSelectionDialog.java
+++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ToolSelectionDialog.java
@@ -98,10 +98,10 @@ public class ToolSelectionDialog extends Dialog {
gd.heightHint = 300;
composite.setLayoutData(gd);
- added = new ArrayList<ITool>();
- removed = new ArrayList<ITool>();
- left = new ArrayList<ITool>();
- right = new ArrayList<ITool>();
+ added = new ArrayList<>();
+ removed = new ArrayList<>();
+ left = new ArrayList<>();
+ right = new ArrayList<>();
Composite c1 = new Composite(composite, SWT.NONE);
c1.setLayoutData(new GridData(GridData.FILL_BOTH));
@@ -476,7 +476,7 @@ public class ToolSelectionDialog extends Dialog {
if ((c & IModificationStatus.TOOLS_CONFLICT) != 0) {
s = s + Messages.ToolSelectionDialog_7;
ITool[][] tools = st.getToolsConflicts();
- List<String> conflictTools = new ArrayList<String>();
+ List<String> conflictTools = new ArrayList<>();
for (int k = 0; k < t2.getItemCount(); k++) {
TableItem ti = t2.getItem(k);
ITool t = (ITool) ti.getData();
diff --git a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ToolSettingsTab.java b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ToolSettingsTab.java
index e213cfa6f8..671185fbf1 100644
--- a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ToolSettingsTab.java
+++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ToolSettingsTab.java
@@ -108,7 +108,7 @@ public class ToolSettingsTab extends AbstractCBuildPropertyTab implements IPrefe
super.createControls(par);
usercomp.setLayout(new GridLayout());
- configToPageListMap = new HashMap<String, List<AbstractToolSettingUI>>();
+ configToPageListMap = new HashMap<>();
settingsStore = ToolSettingsPrefStore.getDefault();
// Create the sash form
@@ -674,7 +674,7 @@ public class ToolSettingsTab extends AbstractCBuildPropertyTab implements IPrefe
return null;
List<AbstractToolSettingUI> pages = configToPageListMap.get(getCfg().getId());
if (pages == null) {
- pages = new ArrayList<AbstractToolSettingUI>();
+ pages = new ArrayList<>();
configToPageListMap.put(getCfg().getId(), pages);
}
return pages;
@@ -839,8 +839,8 @@ public class ToolSettingsTab extends AbstractCBuildPropertyTab implements IPrefe
* @return the one-for-one correspondence of tools, in order of <tt>t2</tt>
*/
private Map<ITool, ITool> getToolCorrespondence(ITool[] t1, ITool[] t2) {
- Map<ITool, ITool> result = new java.util.LinkedHashMap<ITool, ITool>();
- Map<ITool, List<ITool>> realT1Tools = new java.util.LinkedHashMap<ITool, List<ITool>>();
+ Map<ITool, ITool> result = new java.util.LinkedHashMap<>();
+ Map<ITool, List<ITool>> realT1Tools = new java.util.LinkedHashMap<>();
for (ITool next : t1) {
ITool real = ManagedBuildManager.getRealTool(next);
@@ -851,7 +851,7 @@ public class ToolSettingsTab extends AbstractCBuildPropertyTab implements IPrefe
} else {
if (list.size() == 1) {
// make the list mutable
- list = new java.util.ArrayList<ITool>(list);
+ list = new java.util.ArrayList<>(list);
realT1Tools.put(real, list);
}
list.add(next);
diff --git a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/CDTConfigWizardPage.java b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/CDTConfigWizardPage.java
index b092ff8ac2..2501f5dd0d 100644
--- a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/CDTConfigWizardPage.java
+++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/CDTConfigWizardPage.java
@@ -93,7 +93,7 @@ public class CDTConfigWizardPage extends WizardPage {
if (getDefault || table == null || !isVisited())
its = getDefaultCfgs(handler);
else {
- ArrayList<CfgHolder> out = new ArrayList<CfgHolder>(table.getItemCount());
+ ArrayList<CfgHolder> out = new ArrayList<>(table.getItemCount());
for (TableItem ti : table.getItems()) {
if (ti.getChecked())
out.add((CfgHolder) ti.getData());
@@ -217,7 +217,7 @@ public class CDTConfigWizardPage extends WizardPage {
static public CfgHolder[] getDefaultCfgs(MBSWizardHandler handler) {
String id = handler.getPropertyId();
IProjectType pt = handler.getProjectType();
- ArrayList<CfgHolder> out = new ArrayList<CfgHolder>();
+ ArrayList<CfgHolder> out = new ArrayList<>();
for (IToolChain tc : handler.getSelectedToolChains()) {
CfgHolder[] cfgs = null;
if (id != null)
diff --git a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/CfgHolder.java b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/CfgHolder.java
index 3ef5ddb84b..541f4fe0e9 100644
--- a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/CfgHolder.java
+++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/CfgHolder.java
@@ -176,7 +176,7 @@ public class CfgHolder {
*/
public static CfgHolder[] reorder(CfgHolder[] its) {
- ArrayList<CfgHolder> ls = new ArrayList<CfgHolder>(its.length);
+ ArrayList<CfgHolder> ls = new ArrayList<>(its.length);
boolean found = true;
while (found) {
found = false;
@@ -210,7 +210,7 @@ public class CfgHolder {
* Note that null configurations are ignored !
*/
public static IConfiguration[] items2cfgs(CfgHolder[] its) {
- ArrayList<IConfiguration> lst = new ArrayList<IConfiguration>(its.length);
+ ArrayList<IConfiguration> lst = new ArrayList<>(its.length);
for (CfgHolder h : its)
if (h.cfg != null)
lst.add(h.cfg);
diff --git a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/MBSWizardHandler.java b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/MBSWizardHandler.java
index a30db77225..066ba6fba3 100644
--- a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/MBSWizardHandler.java
+++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/MBSWizardHandler.java
@@ -94,7 +94,7 @@ public class MBSWizardHandler extends CWizardHandler {
private static final String tooltip = Messages.CWizardHandler_1 + Messages.CWizardHandler_2
+ Messages.CWizardHandler_3 + Messages.CWizardHandler_4 + Messages.CWizardHandler_5;
- protected SortedMap<String, IToolChain> full_tcs = new TreeMap<String, IToolChain>();
+ protected SortedMap<String, IToolChain> full_tcs = new TreeMap<>();
private String propertyId = null;
private IProjectType pt = null;
protected IWizardItemsListListener listener;
@@ -110,7 +110,7 @@ public class MBSWizardHandler extends CWizardHandler {
/**
* Current list of preferred toolchains
*/
- private List<String> preferredTCs = new ArrayList<String>();
+ private List<String> preferredTCs = new ArrayList<>();
protected static final class EntryInfo {
private SortedMap<String, IToolChain> tcs;
@@ -172,7 +172,7 @@ public class MBSWizardHandler extends CWizardHandler {
ICDTCommonProjectWizard wz = (ICDTCommonProjectWizard) wizard;
String[] langIDs = wz.getLanguageIDs();
if (langIDs.length > 0) {
- List<Template> lstTemplates = new ArrayList<Template>();
+ List<Template> lstTemplates = new ArrayList<>();
for (String id : langIDs) {
lstTemplates.addAll(Arrays
.asList(TemplateEngineUI.getDefault().getTemplates(projectTypeId, null, id)));
@@ -263,7 +263,7 @@ public class MBSWizardHandler extends CWizardHandler {
Set<String> full = tcs.keySet();
if (entryDescriptor == null)
return full;
- Set<String> out = new LinkedHashSet<String>(full.size());
+ Set<String> out = new LinkedHashSet<>(full.size());
for (String s : full)
if (isToolChainAcceptable(s))
out.add(s);
@@ -280,7 +280,7 @@ public class MBSWizardHandler extends CWizardHandler {
*/
public SortedMap<String, IToolChain> getToolChains() {
Set<String> toolChainNames = this.tc_filter();
- SortedMap<String, IToolChain> toolChainMap = new TreeMap<String, IToolChain>();
+ SortedMap<String, IToolChain> toolChainMap = new TreeMap<>();
for (String toolChainName : toolChainNames) {
IToolChain tc = tcs.get(toolChainName);
@@ -386,7 +386,7 @@ public class MBSWizardHandler extends CWizardHandler {
public Map<String, String> getMainPageData() {
WizardNewProjectCreationPage page = (WizardNewProjectCreationPage) getNewProjectCreationPage();
- Map<String, String> data = new HashMap<String, String>();
+ Map<String, String> data = new HashMap<>();
String projName = page.getProjectName();
projName = projName != null ? projName.trim() : EMPTY_STR;
data.put("projectName", projName); //$NON-NLS-1$
@@ -506,7 +506,7 @@ public class MBSWizardHandler extends CWizardHandler {
else if (natures.length == 1)
MBSCustomPageManager.addPageProperty(MBSCustomPageManager.PAGE_ID, MBSCustomPageManager.NATURE, natures[0]);
else {
- TreeSet<String> x = new TreeSet<String>();
+ TreeSet<String> x = new TreeSet<>();
for (String nature : natures)
x.add(nature);
MBSCustomPageManager.addPageProperty(MBSCustomPageManager.PAGE_ID, MBSCustomPageManager.NATURE, x);
@@ -519,8 +519,8 @@ public class MBSWizardHandler extends CWizardHandler {
getProjectType().getId());
IToolChain[] tcs = getSelectedToolChains();
- ArrayList<IToolChain> x = new ArrayList<IToolChain>();
- TreeSet<String> y = new TreeSet<String>();
+ ArrayList<IToolChain> x = new ArrayList<>();
+ TreeSet<String> y = new TreeSet<>();
if (tcs != null) {
int n = tcs.length;
for (int i = 0; i < n; i++) {
@@ -655,7 +655,7 @@ public class MBSWizardHandler extends CWizardHandler {
if (template == null)
return;
- List<IConfiguration> configs = new ArrayList<IConfiguration>();
+ List<IConfiguration> configs = new ArrayList<>();
for (CfgHolder cfg : cfgs) {
configs.add(cfg.getConfiguration());
}
diff --git a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/ManagedBuildWizard.java b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/ManagedBuildWizard.java
index d64279b5ea..bdbe320fda 100644
--- a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/ManagedBuildWizard.java
+++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/ManagedBuildWizard.java
@@ -54,7 +54,7 @@ public class ManagedBuildWizard extends AbstractCWizard {
IBuildPropertyValue[] vs = bpt.getSupportedValues();
Arrays.sort(vs, BuildListComparator.getInstance());
- ArrayList<EntryDescriptor> items = new ArrayList<EntryDescriptor>();
+ ArrayList<EntryDescriptor> items = new ArrayList<>();
// new style project types
for (int i = 0; i < vs.length; i++) {
IToolChain[] tcs = ManagedBuildManager.getExtensionsToolChains(MBSWizardHandler.ARTIFACT, vs[i].getId(),
diff --git a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/NewMakeProjFromExistingPage.java b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/NewMakeProjFromExistingPage.java
index 6f9db2d2e2..d7d30430e3 100644
--- a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/NewMakeProjFromExistingPage.java
+++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/NewMakeProjFromExistingPage.java
@@ -61,7 +61,7 @@ public class NewMakeProjFromExistingPage extends WizardPage {
Button langcpp;
IWorkspaceRoot root;
List tcList;
- Map<String, IToolChain> tcMap = new HashMap<String, IToolChain>();
+ Map<String, IToolChain> tcMap = new HashMap<>();
/**
* True if the user entered a non-empty string in the project name field. In that state, we avoid
@@ -292,7 +292,7 @@ public class NewMakeProjFromExistingPage extends WizardPage {
*/
private void updateTcWidget(boolean supportedOnly) {
updateTcMap(supportedOnly);
- ArrayList<String> names = new ArrayList<String>(tcMap.keySet());
+ ArrayList<String> names = new ArrayList<>(tcMap.keySet());
Collections.sort(names);
tcList.removeAll();

Back to the top