Skip to main content
summaryrefslogtreecommitdiffstats
path: root/debug
diff options
context:
space:
mode:
authorJonah Graham2018-11-20 16:20:42 +0000
committerJonah Graham2018-11-22 21:55:36 +0000
commitcaf2292768deccd885b5b6989b731742e2e5edf4 (patch)
tree711a6088f2e17c7e31ebb51af1eadc1af00768e5 /debug
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 'debug')
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/CDIDebugModel.java28
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/CDebugUtils.java2
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/breakpointactions/BreakpointActionManager.java2
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/executables/Executable.java4
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/executables/ExecutablesManager.java20
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/executables/StandardExecutableProvider.java8
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/sourcelookup/CProjectSourceContainer.java6
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/sourcelookup/MappingSourceContainer.java4
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/RegisterGroupsPersistance.java4
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/StringSubstitutionEngine.java8
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/Trace.java2
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/breakpoints/CBreakpoint.java4
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/disassembly/DisassemblyContextService.java2
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/executables/StandardExecutableImporter.java2
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/CDirectorySourceLocation.java12
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/CProjectSourceLocation.java10
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/CSourceLocator.java20
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/CSourceLookupDirector.java2
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/MapEntrySourceContainer.java2
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/MappingSourceContainerType.java2
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/SourceFoldersRelativePathSourceContainer.java4
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/SourceUtils.java6
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/CDebugImageDescriptorRegistry.java2
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/CDebugModelPresentation.java2
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/ColorManager.java2
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/OverlayImageCache.java2
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/CastToArrayActionHandler.java2
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/CastToTypeActionHandler.java2
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/PinDebugContextActionDelegate.java2
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/RestoreDefaultTypeActionHandler.java2
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/breakpoints/ToggleBreakpointAdapter.java8
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/breakpoints/ToggleCBreakpointsTargetFactory.java2
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/breakpoints/ToggleCDynamicPrintfTargetFactory.java2
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/breakpoints/ToggleCTracepointsTargetFactory.java2
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/breakpoints/ToggleDynamicPrintfAdapter.java4
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/breakpoints/ToggleTracepointAdapter.java4
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/breakpoints/CBreakpointPreferenceStore.java6
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/breakpoints/CBreakpointPropertyPage.java6
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/dialogs/AddEventBreakpointDialog.java4
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/editor/DisassemblyEditorManager.java6
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/viewer/DisassemblyDocumentProvider.java2
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/viewer/DisassemblyPane.java2
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/viewer/DocumentAnnotationUpdate.java2
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/viewer/DocumentContentProvider.java4
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/viewer/VirtualDocument.java2
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/launch/CApplicationLaunchShortcut.java6
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/launch/InvalidLaunchableAdapterFactory.java2
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/pinclone/DebugContextPinProvider.java4
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/pinclone/DebugEventFilterService.java4
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/pinclone/ViewIDCounterManager.java4
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/preferences/SourcePreferencePage.java2
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/preferences/StringSetSerializer.java4
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/sourcelookup/AddSourceContainerDialog.java2
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/sourcelookup/CProjectSourceContainerBrowser.java2
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/sourcelookup/CSourceNotFoundEditor.java2
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/sourcelookup/MappingSourceContainerDialog.java2
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/sourcelookup/SourceContainerAction.java4
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/sourcelookup/SourceContainerViewer.java2
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/sourcelookup/SourceFoldersRelativePathSourceContainerBrowser.java2
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/executables/ExecutablesView.java6
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/executables/SourceFilesContentProvider.java4
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/executables/SourceFilesViewer.java2
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/memory/AddMemoryBlockDialog.java4
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/memory/AddMemoryBlocks.java2
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/CDebugUIPlugin.java2
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpointactions/SoundActionComposite.java2
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpointactions/SoundActionPage.java4
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpoints/CBreakpointUIContributionFactory.java4
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpoints/DefaultCBreakpointUIContribution.java4
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/disassembly/rulers/RulerColumnRegistry.java8
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/editors/AbstractDebugTextHover.java2
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/importexecutable/ImportExecutablePageTwo.java2
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/sourcelookup/DefaultSourceLocator.java6
-rw-r--r--debug/org.eclipse.cdt.gdb/src/org/eclipse/cdt/gdb/internal/eventbkpts/GdbCatchpoints.java2
74 files changed, 161 insertions, 161 deletions
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/CDIDebugModel.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/CDIDebugModel.java
index ea9e5f3ba87..086036bd4c9 100644
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/CDIDebugModel.java
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/CDIDebugModel.java
@@ -195,7 +195,7 @@ public class CDIDebugModel {
*/
public static ICLineBreakpoint createLineBreakpoint(String sourceHandle, IResource resource, int type,
int lineNumber, boolean enabled, int ignoreCount, String condition, boolean register) throws CoreException {
- HashMap<String, Object> attributes = new HashMap<String, Object>(10);
+ HashMap<String, Object> attributes = new HashMap<>(10);
setLineBreakpointAttributes(attributes, sourceHandle, type, lineNumber, enabled, ignoreCount, condition);
return new CLineBreakpoint(resource, attributes, register);
}
@@ -219,7 +219,7 @@ public class CDIDebugModel {
*/
public static ICLineBreakpoint createLineTracepoint(String sourceHandle, IResource resource, int type,
int lineNumber, boolean enabled, int ignoreCount, String condition, boolean register) throws CoreException {
- HashMap<String, Object> attributes = new HashMap<String, Object>(10);
+ HashMap<String, Object> attributes = new HashMap<>(10);
setLineBreakpointAttributes(attributes, sourceHandle, type, lineNumber, enabled, ignoreCount, condition);
return new CLineTracepoint(resource, attributes, register);
}
@@ -244,7 +244,7 @@ public class CDIDebugModel {
public static ICLineBreakpoint createLineDynamicPrintf(String sourceHandle, IResource resource, int type,
int lineNumber, boolean enabled, int ignoreCount, String condition, String printfStr, boolean register)
throws CoreException {
- HashMap<String, Object> attributes = new HashMap<String, Object>(10);
+ HashMap<String, Object> attributes = new HashMap<>(10);
setLineBreakpointAttributes(attributes, sourceHandle, type, lineNumber, enabled, ignoreCount, condition);
attributes.put(ICDynamicPrintf.PRINTF_STRING, printfStr);
return new CLineDynamicPrintf(resource, attributes, register);
@@ -436,7 +436,7 @@ public class CDIDebugModel {
public static ICAddressBreakpoint createAddressBreakpoint(String module, String sourceHandle, IResource resource,
int type, int lineNumber, IAddress address, boolean enabled, int ignoreCount, String condition,
boolean register) throws CoreException {
- HashMap<String, Object> attributes = new HashMap<String, Object>(10);
+ HashMap<String, Object> attributes = new HashMap<>(10);
setAddressBreakpointAttributes(attributes, module, sourceHandle, type, lineNumber, address, enabled,
ignoreCount, condition);
return new CAddressBreakpoint(resource, attributes, register);
@@ -462,7 +462,7 @@ public class CDIDebugModel {
public static ICAddressBreakpoint createAddressTracepoint(String module, String sourceHandle, IResource resource,
int type, int lineNumber, IAddress address, boolean enabled, int ignoreCount, String condition,
boolean register) throws CoreException {
- HashMap<String, Object> attributes = new HashMap<String, Object>(10);
+ HashMap<String, Object> attributes = new HashMap<>(10);
setAddressBreakpointAttributes(attributes, module, sourceHandle, type, lineNumber, address, enabled,
ignoreCount, condition);
return new CAddressTracepoint(resource, attributes, register);
@@ -488,7 +488,7 @@ public class CDIDebugModel {
public static ICAddressBreakpoint createAddressDynamicPrintf(String module, String sourceHandle, IResource resource,
int type, int lineNumber, IAddress address, boolean enabled, int ignoreCount, String condition,
String printfStr, boolean register) throws CoreException {
- HashMap<String, Object> attributes = new HashMap<String, Object>(10);
+ HashMap<String, Object> attributes = new HashMap<>(10);
setAddressBreakpointAttributes(attributes, module, sourceHandle, type, lineNumber, address, enabled,
ignoreCount, condition);
attributes.put(ICDynamicPrintf.PRINTF_STRING, printfStr);
@@ -598,7 +598,7 @@ public class CDIDebugModel {
public static ICWatchpoint createWatchpoint(String sourceHandle, IResource resource, boolean writeAccess,
boolean readAccess, String expression, boolean enabled, int ignoreCount, String condition, boolean register)
throws CoreException {
- HashMap<String, Object> attributes = new HashMap<String, Object>(10);
+ HashMap<String, Object> attributes = new HashMap<>(10);
setWatchPointAttributes(attributes, sourceHandle, resource, writeAccess, readAccess, expression, "", //$NON-NLS-1$
BigInteger.ZERO, enabled, ignoreCount, condition);
return new CWatchpoint(resource, attributes, register);
@@ -644,7 +644,7 @@ public class CDIDebugModel {
public static ICWatchpoint createWatchpoint(String sourceHandle, IResource resource, int type, boolean writeAccess,
boolean readAccess, String expression, boolean enabled, int ignoreCount, String condition, boolean register)
throws CoreException {
- HashMap<String, Object> attributes = new HashMap<String, Object>(10);
+ HashMap<String, Object> attributes = new HashMap<>(10);
setWatchPointAttributes(attributes, sourceHandle, resource, type, writeAccess, readAccess, expression, "", //$NON-NLS-1$
BigInteger.ZERO, enabled, ignoreCount, condition);
return new CWatchpoint(resource, attributes, register);
@@ -703,7 +703,7 @@ public class CDIDebugModel {
int lineNumber, boolean writeAccess, boolean readAccess, String expression, String memorySpace,
BigInteger range, boolean enabled, int ignoreCount, String condition, boolean register)
throws CoreException {
- HashMap<String, Object> attributes = new HashMap<String, Object>(10);
+ HashMap<String, Object> attributes = new HashMap<>(10);
setWatchPointAttributes(attributes, sourceHandle, resource, writeAccess, readAccess, expression, memorySpace,
range, enabled, ignoreCount, condition);
attributes.put(IMarker.CHAR_START, Integer.valueOf(charStart));
@@ -753,7 +753,7 @@ public class CDIDebugModel {
public static ICWatchpoint createWatchpoint(String sourceHandle, IResource resource, boolean writeAccess,
boolean readAccess, String expression, String memorySpace, BigInteger range, boolean enabled,
int ignoreCount, String condition, boolean register) throws CoreException {
- HashMap<String, Object> attributes = new HashMap<String, Object>(10);
+ HashMap<String, Object> attributes = new HashMap<>(10);
setWatchPointAttributes(attributes, sourceHandle, resource, writeAccess, readAccess, expression, memorySpace,
range, enabled, ignoreCount, condition);
return new CWatchpoint(resource, attributes, register);
@@ -943,7 +943,7 @@ public class CDIDebugModel {
public static ICFunctionBreakpoint createFunctionBreakpoint(String sourceHandle, IResource resource, int type,
String function, int charStart, int charEnd, int lineNumber, boolean enabled, int ignoreCount,
String condition, boolean register) throws CoreException {
- HashMap<String, Object> attributes = new HashMap<String, Object>(10);
+ HashMap<String, Object> attributes = new HashMap<>(10);
setFunctionBreakpointAttributes(attributes, sourceHandle, type, function, charStart, charEnd, lineNumber,
enabled, ignoreCount, condition);
return new CFunctionBreakpoint(resource, attributes, register);
@@ -1010,7 +1010,7 @@ public class CDIDebugModel {
public static ICFunctionBreakpoint createFunctionTracepoint(String sourceHandle, IResource resource, int type,
String function, int charStart, int charEnd, int lineNumber, boolean enabled, int ignoreCount,
String condition, boolean register) throws CoreException {
- HashMap<String, Object> attributes = new HashMap<String, Object>(10);
+ HashMap<String, Object> attributes = new HashMap<>(10);
setFunctionBreakpointAttributes(attributes, sourceHandle, type, function, charStart, charEnd, lineNumber,
enabled, ignoreCount, condition);
return new CFunctionTracepoint(resource, attributes, register);
@@ -1036,7 +1036,7 @@ public class CDIDebugModel {
public static ICFunctionBreakpoint createFunctionDynamicPrintf(String sourceHandle, IResource resource, int type,
String function, int charStart, int charEnd, int lineNumber, boolean enabled, int ignoreCount,
String condition, String printfStr, boolean register) throws CoreException {
- HashMap<String, Object> attributes = new HashMap<String, Object>(10);
+ HashMap<String, Object> attributes = new HashMap<>(10);
setFunctionBreakpointAttributes(attributes, sourceHandle, type, function, charStart, charEnd, lineNumber,
enabled, ignoreCount, condition);
attributes.put(ICDynamicPrintf.PRINTF_STRING, printfStr);
@@ -1292,7 +1292,7 @@ public class CDIDebugModel {
public static ICEventBreakpoint createEventBreakpoint(String type, String arg, boolean register)
throws CoreException {
final IResource resource = ResourcesPlugin.getWorkspace().getRoot();
- final Map<String, Object> attributes = new HashMap<String, Object>();
+ final Map<String, Object> attributes = new HashMap<>();
setEventBreakpointAttributes(attributes, type, arg);
return new CEventBreakpoint(resource, attributes, register);
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/CDebugUtils.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/CDebugUtils.java
index a719b6ca825..1702cec334d 100644
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/CDebugUtils.java
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/CDebugUtils.java
@@ -279,7 +279,7 @@ public class CDebugUtils {
}
public static List<IProject> getReferencedProjects(IProject project) {
- ArrayList<IProject> list = new ArrayList<IProject>(10);
+ ArrayList<IProject> list = new ArrayList<>(10);
if (project != null && project.exists() && project.isOpen()) {
IProject[] refs = new IProject[0];
try {
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/breakpointactions/BreakpointActionManager.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/breakpointactions/BreakpointActionManager.java
index bc5778d3dc9..1cef56047b6 100644
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/breakpointactions/BreakpointActionManager.java
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/breakpointactions/BreakpointActionManager.java
@@ -176,7 +176,7 @@ public class BreakpointActionManager {
public ArrayList<IBreakpointAction> getBreakpointActions() {
if (breakpointActions == null) {
- breakpointActions = new ArrayList<IBreakpointAction>();
+ breakpointActions = new ArrayList<>();
CDebugCorePlugin.getDefault().getBreakpointActionManager().loadActionData();
}
return breakpointActions;
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/executables/Executable.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/executables/Executable.java
index fa76df42d0c..bb806fa6c99 100644
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/executables/Executable.java
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/executables/Executable.java
@@ -139,8 +139,8 @@ public class Executable extends PlatformObject {
this.name = new File(path.toOSString()).getName();
this.resource = resource;
this.remappers = sourceFileRemappings;
- remappedPaths = new HashMap<ITranslationUnit, String>();
- sourceFiles = new ArrayList<ITranslationUnit>();
+ remappedPaths = new HashMap<>();
+ sourceFiles = new ArrayList<>();
refreshSourceFiles = true;
remapSourceFiles = true;
}
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/executables/ExecutablesManager.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/executables/ExecutablesManager.java
index 803eab9b2c4..6dd93561fcc 100644
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/executables/ExecutablesManager.java
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/executables/ExecutablesManager.java
@@ -78,7 +78,7 @@ import org.eclipse.debug.core.sourcelookup.ISourceLookupParticipant;
public class ExecutablesManager extends PlatformObject
implements ICProjectDescriptionListener, IElementChangedListener, IResourceChangeListener {
- private Map<IProject, IProjectExecutablesProvider> executablesProviderMap = new HashMap<IProject, IProjectExecutablesProvider>();
+ private Map<IProject, IProjectExecutablesProvider> executablesProviderMap = new HashMap<>();
private List<IExecutablesChangeListener> changeListeners = Collections
.synchronizedList(new ArrayList<IExecutablesChangeListener>());
private List<IProjectExecutablesProvider> executableProviders;
@@ -92,7 +92,7 @@ public class ExecutablesManager extends PlatformObject
* notification. We use this to ensure we flush source file mappings only
* when the launch config change involves a change to the source locators.
*/
- private Map<String, String> locatorMementos = new HashMap<String, String>();
+ private Map<String, String> locatorMementos = new HashMap<>();
/**
* A cache of the executables in the workspace, categorized by project.
@@ -106,7 +106,7 @@ public class ExecutablesManager extends PlatformObject
* <p>
* The same Executable may appear more than once.
*/
- private Map<IProject, List<Executable>> executablesMap = new HashMap<IProject, List<Executable>>();
+ private Map<IProject, List<Executable>> executablesMap = new HashMap<>();
/**
* Provide a flat list of the executables in {@link #executablesMap}, with
@@ -116,7 +116,7 @@ public class ExecutablesManager extends PlatformObject
* @return
*/
private List<Executable> flattenExecutablesMap() {
- List<Executable> result = new ArrayList<Executable>(executablesMap.size() * 5); // most projects will have less than five executables
+ List<Executable> result = new ArrayList<>(executablesMap.size() * 5); // most projects will have less than five executables
synchronized (executablesMap) {
for (List<Executable> exes : executablesMap.values()) {
for (Executable exe : exes) {
@@ -159,7 +159,7 @@ public class ExecutablesManager extends PlatformObject
// Get the CDT projects in the workspace that we have no cached
// results for (are not in 'executablesMap'). Also, we may have been
// asked to refresh the cache for some projects we've search before
- List<IProject> projects = new ArrayList<IProject>();
+ List<IProject> projects = new ArrayList<>();
synchronized (executablesMap) {
if (projectsToRefresh == null) {
executablesMap.clear();
@@ -209,7 +209,7 @@ public class ExecutablesManager extends PlatformObject
// executables list. If so, notify listeners.
List<Executable> after = flattenExecutablesMap();
List<Executable> removed = before;
- List<Executable> added = new ArrayList<Executable>(after.size());
+ List<Executable> added = new ArrayList<>(after.size());
for (Executable a : after) {
if (!removed.remove(a)) {
added.add(a);
@@ -486,7 +486,7 @@ public class ExecutablesManager extends PlatformObject
* @return collection of executables which may be empty
*/
public Collection<Executable> getExecutablesForProject(IProject project) {
- List<Executable> executables = new ArrayList<Executable>();
+ List<Executable> executables = new ArrayList<>();
synchronized (executablesMap) {
List<Executable> exes = executablesMap.get(project);
@@ -931,9 +931,9 @@ public class ExecutablesManager extends PlatformObject
Trace.getTrace().trace(null, "event = \n" + event); // must be done separately because of traceEntry() limitation //$NON-NLS-1$
// Examine the event and figure out what needs to be done
- Set<IProject> refreshProjects = new HashSet<IProject>(5);
- Set<Executable> executablesChanged = new HashSet<Executable>(5);
- Set<Executable> executablesRemoved = new HashSet<Executable>(5);
+ Set<IProject> refreshProjects = new HashSet<>(5);
+ Set<Executable> executablesChanged = new HashSet<>(5);
+ Set<Executable> executablesRemoved = new HashSet<>(5);
processDeltas(event.getDelta().getAddedChildren(), null, refreshProjects, executablesRemoved,
executablesChanged);
processDeltas(event.getDelta().getChangedChildren(), null, refreshProjects, executablesRemoved,
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/executables/StandardExecutableProvider.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/executables/StandardExecutableProvider.java
index 19455417697..721e581173a 100644
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/executables/StandardExecutableProvider.java
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/executables/StandardExecutableProvider.java
@@ -43,7 +43,7 @@ import org.eclipse.debug.core.DebugPlugin;
*/
public class StandardExecutableProvider implements IProjectExecutablesProvider {
- List<String> supportedNatureIds = new ArrayList<String>();
+ List<String> supportedNatureIds = new ArrayList<>();
public StandardExecutableProvider() {
supportedNatureIds.add(CProjectNature.C_NATURE_ID);
@@ -57,7 +57,7 @@ public class StandardExecutableProvider implements IProjectExecutablesProvider {
@Override
public List<Executable> getExecutables(IProject project, IProgressMonitor monitor) {
- List<Executable> executables = new ArrayList<Executable>();
+ List<Executable> executables = new ArrayList<>();
ICProject cproject = CModelManager.getDefault().create(project);
try {
@@ -78,7 +78,7 @@ public class StandardExecutableProvider implements IProjectExecutablesProvider {
if (projDesc != null) {
ICConfigurationDescription cfg = projDesc.getActiveConfiguration();
if (cfg != null) {
- binaries = new ArrayList<IBinary>(allBinaries.length);
+ binaries = new ArrayList<>(allBinaries.length);
ICOutputEntry[] cfgOutDirs = cfg.getBuildSetting().getOutputDirectories();
for (IBinary allBinary : allBinaries) {
for (ICOutputEntry outdir : cfgOutDirs) {
@@ -108,7 +108,7 @@ public class StandardExecutableProvider implements IProjectExecutablesProvider {
IPath exePath = binary.getResource().getLocation();
if (exePath == null)
exePath = binary.getPath();
- List<ISourceFileRemapping> srcRemappers = new ArrayList<ISourceFileRemapping>(2);
+ List<ISourceFileRemapping> srcRemappers = new ArrayList<>(2);
ISourceFileRemappingFactory[] factories = ExecutablesManager.getExecutablesManager()
.getSourceFileRemappingFactories();
for (ISourceFileRemappingFactory factory : factories) {
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/sourcelookup/CProjectSourceContainer.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/sourcelookup/CProjectSourceContainer.java
index a767873f698..eaf4feadf79 100644
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/sourcelookup/CProjectSourceContainer.java
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/sourcelookup/CProjectSourceContainer.java
@@ -118,7 +118,7 @@ public class CProjectSourceContainer extends CompositeSourceContainer {
if (fProject == null)
return EMPTY;
- ArrayList<Object> sources = new ArrayList<Object>();
+ ArrayList<Object> sources = new ArrayList<>();
// An IllegalArgumentException is thrown from the "getFile" method
// if the path created by appending the file name to the container
@@ -216,7 +216,7 @@ public class CProjectSourceContainer extends CompositeSourceContainer {
if (isSearchReferencedProjects()) {
IProject[] projects = SourceUtils.getAllReferencedProjects(fProject);
ISourceContainer[] folders = createFolderSourceContainers(fProject);
- List<ISourceContainer> containers = new ArrayList<ISourceContainer>(folders.length + projects.length);
+ List<ISourceContainer> containers = new ArrayList<>(folders.length + projects.length);
for (ISourceContainer folder : folders) {
containers.add(folder);
}
@@ -236,7 +236,7 @@ public class CProjectSourceContainer extends CompositeSourceContainer {
private ISourceContainer[] createFolderSourceContainers(IProject project) throws CoreException {
IResource[] resources = project.members();
- List<FolderSourceContainer> list = new ArrayList<FolderSourceContainer>(resources.length);
+ List<FolderSourceContainer> list = new ArrayList<>(resources.length);
for (IResource resource : resources) {
if (resource.getType() == IResource.FOLDER) {
list.add(new FolderSourceContainer((IFolder) resource, true));
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/sourcelookup/MappingSourceContainer.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/sourcelookup/MappingSourceContainer.java
index 4970a011730..da66bfbc77b 100644
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/sourcelookup/MappingSourceContainer.java
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/sourcelookup/MappingSourceContainer.java
@@ -50,7 +50,7 @@ public class MappingSourceContainer extends AbstractSourceContainer implements I
*/
public MappingSourceContainer(String name) {
fName = name;
- fContainers = new ArrayList<MapEntrySourceContainer>();
+ fContainers = new ArrayList<>();
}
/* (non-Javadoc)
@@ -90,7 +90,7 @@ public class MappingSourceContainer extends AbstractSourceContainer implements I
CoreException single = null;
MultiStatus multiStatus = null;
if (isFindDuplicates()) {
- results = new ArrayList<Object>();
+ results = new ArrayList<>();
}
for (int i = 0; i < containers.length; i++) {
ISourceContainer container = containers[i];
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/RegisterGroupsPersistance.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/RegisterGroupsPersistance.java
index 95e68ea958d..2d2e32e78f8 100644
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/RegisterGroupsPersistance.java
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/RegisterGroupsPersistance.java
@@ -101,7 +101,7 @@ public class RegisterGroupsPersistance {
Node node = DebugPlugin.parseDocument(fMemento);
Element element = (Element) node;
- List<IRegisterDescriptor> list = new ArrayList<IRegisterDescriptor>();
+ List<IRegisterDescriptor> list = new ArrayList<>();
Node childNode = element.getFirstChild();
while (childNode != null) {
if (childNode.getNodeType() == Node.ELEMENT_NODE) {
@@ -167,7 +167,7 @@ public class RegisterGroupsPersistance {
* whose container id matches given containerId
*/
public IRegisterGroupDescriptor[] parseGroups(String containerId) throws CoreException {
- List<IRegisterGroupDescriptor> groups = new ArrayList<IRegisterGroupDescriptor>();
+ List<IRegisterGroupDescriptor> groups = new ArrayList<>();
String memento;
memento = fLaunchConfig.getAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_REGISTER_GROUPS,
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/StringSubstitutionEngine.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/StringSubstitutionEngine.java
index c925fa2ee40..2a979e0651b 100644
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/StringSubstitutionEngine.java
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/StringSubstitutionEngine.java
@@ -87,7 +87,7 @@ public class StringSubstitutionEngine {
public String performStringSubstitution(String expression, boolean reportUndefinedVariables,
boolean resolveVariables, IStringVariableManager manager) throws CoreException {
substitute(expression, reportUndefinedVariables, resolveVariables, manager);
- List<HashSet<String>> resolvedVariableSets = new ArrayList<HashSet<String>>();
+ List<HashSet<String>> resolvedVariableSets = new ArrayList<>();
while (fSubs) {
HashSet<String> resolved = substitute(fResult.toString(), reportUndefinedVariables, true, manager);
@@ -95,7 +95,7 @@ public class StringSubstitutionEngine {
HashSet<String> prevSet = resolvedVariableSets.get(i);
if (prevSet.equals(resolved)) {
- HashSet<String> conflictingSet = new HashSet<String>();
+ HashSet<String> conflictingSet = new HashSet<>();
for (HashSet<String> set : resolvedVariableSets) {
conflictingSet.addAll(set);
}
@@ -146,10 +146,10 @@ public class StringSubstitutionEngine {
private HashSet<String> substitute(String expression, boolean reportUndefinedVariables, boolean resolveVariables,
IStringVariableManager manager) throws CoreException {
fResult = new StringBuilder(expression.length());
- fStack = new Stack<VariableReference>();
+ fStack = new Stack<>();
fSubs = false;
- HashSet<String> resolvedVariables = new HashSet<String>();
+ HashSet<String> resolvedVariables = new HashSet<>();
int pos = 0;
int state = SCAN_FOR_START;
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/Trace.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/Trace.java
index c0e63372f10..6626d88cf29 100644
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/Trace.java
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/Trace.java
@@ -127,7 +127,7 @@ public class Trace {
if (bundle != null) {
BundleContext context = bundle.getBundleContext();
if (context != null) {
- ServiceTracker<DebugOptions, DebugOptions> tracker = new ServiceTracker<DebugOptions, DebugOptions>(
+ ServiceTracker<DebugOptions, DebugOptions> tracker = new ServiceTracker<>(
context, DebugOptions.class.getName(), null);
try {
tracker.open();
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/breakpoints/CBreakpoint.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/breakpoints/CBreakpoint.java
index ed3fcd902dc..1a1af9adb0e 100644
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/breakpoints/CBreakpoint.java
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/breakpoints/CBreakpoint.java
@@ -59,7 +59,7 @@ public abstract class CBreakpoint extends Breakpoint
* This map is sorted to allow consistent iteration order so that extension
* message does not unexpectedly change order
*/
- private SortedMap<String, ICBreakpointExtension[]> fExtensions = new TreeMap<String, ICBreakpointExtension[]>();
+ private SortedMap<String, ICBreakpointExtension[]> fExtensions = new TreeMap<>();
/**
* The number of debug targets the breakpoint is installed in. We don't use
@@ -303,7 +303,7 @@ public abstract class CBreakpoint extends Breakpoint
IMarker marker = ensureMarker();
// Read the extension registry and create applicable extensions.
- List<ICBreakpointExtension> extensions = new ArrayList<ICBreakpointExtension>(4);
+ List<ICBreakpointExtension> extensions = new ArrayList<>(4);
IExtensionPoint ep = Platform.getExtensionRegistry().getExtensionPoint(
CDebugCorePlugin.getUniqueIdentifier(),
CDebugCorePlugin.BREAKPOINT_EXTENSION_EXTENSION_POINT_ID);
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/disassembly/DisassemblyContextService.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/disassembly/DisassemblyContextService.java
index 2ffa1bde74a..b2942a82ae3 100644
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/disassembly/DisassemblyContextService.java
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/disassembly/DisassemblyContextService.java
@@ -27,7 +27,7 @@ public class DisassemblyContextService implements IDisassemblyContextService {
private Set<Object> fContexts;
public DisassemblyContextService() {
- fContexts = new CopyOnWriteArraySet<Object>();
+ fContexts = new CopyOnWriteArraySet<>();
fListeners = new ListenerList<>();
}
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/executables/StandardExecutableImporter.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/executables/StandardExecutableImporter.java
index 4e7452b38a8..5f6c36fd72d 100644
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/executables/StandardExecutableImporter.java
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/executables/StandardExecutableImporter.java
@@ -230,7 +230,7 @@ public class StandardExecutableImporter implements IExecutableImporter {
CCorePlugin.BINARY_PARSER_SIMPLE_ID);
if (point != null) {
IExtension[] exts = point.getExtensions();
- ArrayList<IExtension> extensionsInUse = new ArrayList<IExtension>();
+ ArrayList<IExtension> extensionsInUse = new ArrayList<>();
for (int i = 0; i < exts.length; i++) {
if (isExtensionVisible(exts[i])) {
extensionsInUse.add(exts[i]);
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/CDirectorySourceLocation.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/CDirectorySourceLocation.java
index 8a7327a6087..ec41579706a 100644
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/CDirectorySourceLocation.java
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/CDirectorySourceLocation.java
@@ -161,7 +161,7 @@ public class CDirectorySourceLocation implements IDirectorySourceLocation {
return null;
File[] folders = getFolders();
if (folders != null) {
- LinkedList<Object> list = new LinkedList<Object>();
+ LinkedList<Object> list = new LinkedList<>();
for (int i = 0; i < folders.length; ++i) {
Object result = findFileByAbsolutePath(folders[i], name);
if (result instanceof List) {
@@ -202,7 +202,7 @@ public class CDirectorySourceLocation implements IDirectorySourceLocation {
// Try for a file in another workspace project
IFile[] wsFiles = ResourceLookup.findFilesForLocation(filePath);
- LinkedList<IFile> list = new LinkedList<IFile>();
+ LinkedList<IFile> list = new LinkedList<>();
for (int j = 0; j < wsFiles.length; ++j)
if (wsFiles[j].exists()) {
if (!searchForDuplicateFiles())
@@ -223,7 +223,7 @@ public class CDirectorySourceLocation implements IDirectorySourceLocation {
private Object findFileByRelativePath(String fileName) {
File[] folders = getFolders();
if (folders != null) {
- LinkedList<Object> list = new LinkedList<Object>();
+ LinkedList<Object> list = new LinkedList<>();
for (int i = 0; i < folders.length; ++i) {
Object result = findFileByRelativePath(folders[i], fileName);
if (result instanceof List) {
@@ -253,7 +253,7 @@ public class CDirectorySourceLocation implements IDirectorySourceLocation {
if (file.exists() && file.isFile()) {
path = new Path(file.getAbsolutePath());
IFile[] wsFiles = ResourceLookup.findFilesForLocation(path);
- LinkedList<IFile> list = new LinkedList<IFile>();
+ LinkedList<IFile> list = new LinkedList<>();
for (int j = 0; j < wsFiles.length; ++j)
if (wsFiles[j].exists()) {
if (!searchForDuplicateFiles())
@@ -430,7 +430,7 @@ public class CDirectorySourceLocation implements IDirectorySourceLocation {
private void initializeFolders() {
if (getDirectory() != null) {
- ArrayList<File> list = new ArrayList<File>();
+ ArrayList<File> list = new ArrayList<>();
File root = getDirectory().toFile();
list.add(root);
if (searchSubfolders())
@@ -440,7 +440,7 @@ public class CDirectorySourceLocation implements IDirectorySourceLocation {
}
private List<File> getFileFolders(File file) {
- ArrayList<File> list = new ArrayList<File>();
+ ArrayList<File> list = new ArrayList<>();
File[] folders = file.listFiles(new FileFilter() {
@Override
public boolean accept(File pathname) {
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/CProjectSourceLocation.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/CProjectSourceLocation.java
index 81d5b8d4d32..b312529bfd2 100644
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/CProjectSourceLocation.java
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/CProjectSourceLocation.java
@@ -62,8 +62,8 @@ public class CProjectSourceLocation implements IProjectSourceLocation {
*/
private IProject fProject;
private IResource[] fFolders;
- private HashMap<String, Object> fCache = new HashMap<String, Object>(20);
- private HashSet<String> fNotFoundCache = new HashSet<String>(20);
+ private HashMap<String, Object> fCache = new HashMap<>(20);
+ private HashSet<String> fNotFoundCache = new HashSet<>(20);
private boolean fGenerated = true;
private boolean fSearchForDuplicateFiles = false;
@@ -138,7 +138,7 @@ public class CProjectSourceLocation implements IProjectSourceLocation {
}
private Object findFileByAbsolutePath(File file) {
- LinkedList<IFile> list = new LinkedList<IFile>();
+ LinkedList<IFile> list = new LinkedList<>();
if (file.exists()) {
IPath path = new Path(file.getAbsolutePath());
IFile[] wsFiles = ResourceLookup.findFilesForLocation(path);
@@ -155,7 +155,7 @@ public class CProjectSourceLocation implements IProjectSourceLocation {
private Object findFileByRelativePath(String fileName) {
IResource[] folders = getFolders();
- LinkedList<IFile> list = new LinkedList<IFile>();
+ LinkedList<IFile> list = new LinkedList<>();
for (int i = 0; i < folders.length; ++i) {
if (list.size() > 0 && !searchForDuplicateFiles())
break;
@@ -297,7 +297,7 @@ public class CProjectSourceLocation implements IProjectSourceLocation {
}
private void initializeFolders() {
- final LinkedList<IResource> list = new LinkedList<IResource>();
+ final LinkedList<IResource> list = new LinkedList<>();
if (getProject() != null && getProject().exists()) {
list.add(getProject());
try {
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/CSourceLocator.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/CSourceLocator.java
index 0f5b7a5f4b4..c868386ea41 100644
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/CSourceLocator.java
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/CSourceLocator.java
@@ -84,7 +84,7 @@ public class CSourceLocator implements ICSourceLocator, IPersistableSourceLocato
/**
* The array of projects referenced by main project.
*/
- private List<IProject> fReferencedProjects = new ArrayList<IProject>(10);
+ private List<IProject> fReferencedProjects = new ArrayList<>(10);
/**
* The flag specifies whether to search for all source elements, or just the first match.
@@ -123,7 +123,7 @@ public class CSourceLocator implements ICSourceLocator, IPersistableSourceLocato
protected Object getInput(IStackFrame f) {
if (f instanceof ICStackFrame) {
ICStackFrame frame = (ICStackFrame) f;
- LinkedList<Object> list = new LinkedList<Object>();
+ LinkedList<Object> list = new LinkedList<>();
Object result = null;
String fileName = frame.getFile();
if (fileName != null && fileName.length() > 0) {
@@ -207,7 +207,7 @@ public class CSourceLocator implements ICSourceLocator, IPersistableSourceLocato
* @exception CoreException
*/
public static ICSourceLocation[] getDefaultSourceLocations(IProject project) {
- ArrayList<IProjectSourceLocation> list = new ArrayList<IProjectSourceLocation>();
+ ArrayList<IProjectSourceLocation> list = new ArrayList<>();
if (project != null && project.exists()) {
list.add(SourceLookupFactory.createProjectSourceLocation(project));
addReferencedSourceLocations(list, project);
@@ -321,7 +321,7 @@ public class CSourceLocator implements ICSourceLocator, IPersistableSourceLocato
if (!root.getNodeName().equalsIgnoreCase(SOURCE_LOCATOR_NAME)) {
abort(InternalSourceLookupMessages.CSourceLocator_1, null);
}
- List<ICSourceLocation> sourceLocations = new ArrayList<ICSourceLocation>();
+ List<ICSourceLocation> sourceLocations = new ArrayList<>();
// Add locations based on referenced projects
IProject project = getProject();
if (project != null && project.exists() && project.isOpen())
@@ -346,7 +346,7 @@ public class CSourceLocator implements ICSourceLocator, IPersistableSourceLocato
private void removeDisabledLocations(Element root, List<ICSourceLocation> sourceLocations) {
NodeList list = root.getChildNodes();
int length = list.getLength();
- HashSet<String> disabledProjects = new HashSet<String>(length);
+ HashSet<String> disabledProjects = new HashSet<>(length);
for (int i = 0; i < length; ++i) {
Node node = list.item(i);
short type = node.getNodeType();
@@ -483,7 +483,7 @@ public class CSourceLocator implements ICSourceLocator, IPersistableSourceLocato
if (event.getSource() instanceof IWorkspace && event.getDelta() != null) {
IResourceDelta[] deltas = event.getDelta().getAffectedChildren();
if (deltas != null) {
- ArrayList<IResource> list = new ArrayList<IResource>(deltas.length);
+ ArrayList<IResource> list = new ArrayList<>(deltas.length);
for (int i = 0; i < deltas.length; ++i)
if (deltas[i].getResource() instanceof IProject)
list.add(deltas[i].getResource());
@@ -496,7 +496,7 @@ public class CSourceLocator implements ICSourceLocator, IPersistableSourceLocato
IProject project = getProject();
if (project != null && project.exists() && project.isOpen()) {
List<IProject> list = CDebugUtils.getReferencedProjects(project);
- HashSet<String> names = new HashSet<String>(list.size() + 1);
+ HashSet<String> names = new HashSet<>(list.size() + 1);
names.add(project.getName());
for (IProject proj : list) {
names.add(proj.getName());
@@ -560,7 +560,7 @@ public class CSourceLocator implements ICSourceLocator, IPersistableSourceLocato
}
protected ICSourceLocation[] getDefaultSourceLocations() {
- ArrayList<IProjectSourceLocation> list = new ArrayList<IProjectSourceLocation>(fReferencedProjects.size());
+ ArrayList<IProjectSourceLocation> list = new ArrayList<>(fReferencedProjects.size());
if (getProject() != null && getProject().exists() && getProject().isOpen())
list.add(SourceLookupFactory.createProjectSourceLocation(getProject()));
for (IProject project : fReferencedProjects) {
@@ -583,7 +583,7 @@ public class CSourceLocator implements ICSourceLocator, IPersistableSourceLocato
private void removeGenericSourceLocations() {
fReferencedProjects.clear();
ICSourceLocation[] locations = getSourceLocations();
- ArrayList<ICSourceLocation> newLocations = new ArrayList<ICSourceLocation>(locations.length);
+ ArrayList<ICSourceLocation> newLocations = new ArrayList<>(locations.length);
for (int i = 0; i < locations.length; ++i) {
if (!(locations[i] instanceof IProjectSourceLocation)
|| !((IProjectSourceLocation) locations[i]).isGeneric())
@@ -595,7 +595,7 @@ public class CSourceLocator implements ICSourceLocator, IPersistableSourceLocato
private void updateGenericSourceLocations(List<IResource> affectedProjects) {
List<IProject> newRefs = CDebugUtils.getReferencedProjects(getProject());
ICSourceLocation[] locations = getSourceLocations();
- ArrayList<ICSourceLocation> newLocations = new ArrayList<ICSourceLocation>(locations.length);
+ ArrayList<ICSourceLocation> newLocations = new ArrayList<>(locations.length);
for (int i = 0; i < locations.length; ++i) {
if (!(locations[i] instanceof IProjectSourceLocation)
|| !((IProjectSourceLocation) locations[i]).isGeneric()) {
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/CSourceLookupDirector.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/CSourceLookupDirector.java
index dfe42e48254..e44005a3b77 100644
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/CSourceLookupDirector.java
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/CSourceLookupDirector.java
@@ -91,7 +91,7 @@ public class CSourceLookupDirector extends AbstractSourceLookupDirector {
private void readSupportedContainerTypes() {
synchronized (fSupportedTypesLock) {
if (fSupportedTypes == null) {
- fSupportedTypes = new HashSet<String>();
+ fSupportedTypes = new HashSet<>();
String name = CDebugCorePlugin.PLUGIN_ID + ".supportedSourceContainerTypes"; //$NON-NLS-1$;
IExtensionPoint extensionPoint = Platform.getExtensionRegistry().getExtensionPoint(name);
if (extensionPoint != null) {
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/MapEntrySourceContainer.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/MapEntrySourceContainer.java
index 3a73fbf0983..1fa73a87f51 100644
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/MapEntrySourceContainer.java
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/MapEntrySourceContainer.java
@@ -154,7 +154,7 @@ public class MapEntrySourceContainer extends AbstractSourceContainer {
if (path != null) {
IFile[] wsFiles = ResourceLookup.findFilesForLocation(path);
- ArrayList<IFile> list = new ArrayList<IFile>();
+ ArrayList<IFile> list = new ArrayList<>();
for (int j = 0; j < wsFiles.length; ++j) {
if (wsFiles[j].exists()) {
list.add(wsFiles[j]);
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/MappingSourceContainerType.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/MappingSourceContainerType.java
index ecb102accb6..a818b01cd8f 100644
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/MappingSourceContainerType.java
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/MappingSourceContainerType.java
@@ -52,7 +52,7 @@ public class MappingSourceContainerType extends AbstractSourceContainerTypeDeleg
// When upgrading source locator (See Bug 472765),
// do not enable backend path substitution
boolean enabled = Boolean.parseBoolean(backendEnabled);
- List<MapEntrySourceContainer> entries = new ArrayList<MapEntrySourceContainer>();
+ List<MapEntrySourceContainer> entries = new ArrayList<>();
Node childNode = element.getFirstChild();
while (childNode != null) {
if (childNode.getNodeType() == Node.ELEMENT_NODE) {
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/SourceFoldersRelativePathSourceContainer.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/SourceFoldersRelativePathSourceContainer.java
index 1e83b69506c..4abe4b12a65 100644
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/SourceFoldersRelativePathSourceContainer.java
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/SourceFoldersRelativePathSourceContainer.java
@@ -149,7 +149,7 @@ public class SourceFoldersRelativePathSourceContainer extends CompositeSourceCon
if (isSearchReferencedProjects()) {
IProject[] projects = SourceUtils.getAllReferencedProjects(fProject);
ISourceContainer[] folders = createCompilationDirectoryContainers(fProject);
- List<ISourceContainer> containers = new ArrayList<ISourceContainer>(folders.length + projects.length);
+ List<ISourceContainer> containers = new ArrayList<>(folders.length + projects.length);
for (ISourceContainer folder : folders) {
containers.add(folder);
}
@@ -171,7 +171,7 @@ public class SourceFoldersRelativePathSourceContainer extends CompositeSourceCon
private ISourceContainer[] createCompilationDirectoryContainers(IProject project) throws CoreException {
ICProject cProject = CModelManager.getDefault().create(project);
ISourceRoot[] roots = cProject.getAllSourceRoots();
- List<ISourceContainer> list = new ArrayList<ISourceContainer>(roots.length);
+ List<ISourceContainer> list = new ArrayList<>(roots.length);
for (ISourceRoot root : roots) {
IContainer folder = root.getResource();
ISourceContainer container = new CompilationDirectorySourceContainer(folder.getLocation(), false);
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/SourceUtils.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/SourceUtils.java
index b8b81e632c9..83690389960 100644
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/SourceUtils.java
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/SourceUtils.java
@@ -130,7 +130,7 @@ public class SourceUtils {
}
public static ICSourceLocation[] initializeSourceLocations(Element root) {
- List<ICSourceLocation> sourceLocations = new LinkedList<ICSourceLocation>();
+ List<ICSourceLocation> sourceLocations = new LinkedList<>();
NodeList list = root.getChildNodes();
int length = list.getLength();
for (int i = 0; i < length; ++i) {
@@ -181,7 +181,7 @@ public class SourceUtils {
}
static public ISourceContainer[] convertSourceLocations(ICSourceLocation[] locations) {
- ArrayList<ISourceContainer> containers = new ArrayList<ISourceContainer>(locations.length);
+ ArrayList<ISourceContainer> containers = new ArrayList<>(locations.length);
int mappingCount = 0;
for (ICSourceLocation location : locations) {
if (location instanceof IProjectSourceLocation) {
@@ -220,7 +220,7 @@ public class SourceUtils {
}
public static IProject[] getAllReferencedProjects(IProject project) throws CoreException {
- Set<IProject> all = new HashSet<IProject>();
+ Set<IProject> all = new HashSet<>();
getAllReferencedProjects(all, project);
return all.toArray(new IProject[all.size()]);
}
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/CDebugImageDescriptorRegistry.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/CDebugImageDescriptorRegistry.java
index 566e5da6037..793554198f4 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/CDebugImageDescriptorRegistry.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/CDebugImageDescriptorRegistry.java
@@ -25,7 +25,7 @@ import org.eclipse.swt.widgets.Display;
* A registry that maps <code>ImageDescriptors</code> to <code>Image</code>.
*/
public class CDebugImageDescriptorRegistry {
- private HashMap<ImageDescriptor, Image> fRegistry = new HashMap<ImageDescriptor, Image>(10);
+ private HashMap<ImageDescriptor, Image> fRegistry = new HashMap<>(10);
private Display fDisplay;
/**
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/CDebugModelPresentation.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/CDebugModelPresentation.java
index 3c59d2ec333..5777b4fa77e 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/CDebugModelPresentation.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/CDebugModelPresentation.java
@@ -108,7 +108,7 @@ public class CDebugModelPresentation extends LabelProvider implements IDebugMode
private static final String DUMMY_STACKFRAME_LABEL = "..."; //$NON-NLS-1$
- protected HashMap<String, Object> fAttributes = new HashMap<String, Object>(3);
+ protected HashMap<String, Object> fAttributes = new HashMap<>(3);
protected CDebugImageDescriptorRegistry fDebugImageRegistry = CDebugUIPlugin.getImageDescriptorRegistry();
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/ColorManager.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/ColorManager.java
index 0ff06bddf52..05a98f734f8 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/ColorManager.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/ColorManager.java
@@ -39,7 +39,7 @@ public class ColorManager {
return gfColorManager;
}
- protected Map<RGB, Color> fColorTable = new HashMap<RGB, Color>(10);
+ protected Map<RGB, Color> fColorTable = new HashMap<>(10);
public Color getColor(RGB rgb) {
Color color = fColorTable.get(rgb);
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/OverlayImageCache.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/OverlayImageCache.java
index 1f1ccf3c457..7bb1f2bfb39 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/OverlayImageCache.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/OverlayImageCache.java
@@ -24,7 +24,7 @@ import org.eclipse.swt.graphics.Image;
* @since May 30, 2003
*/
public class OverlayImageCache {
- private Map<OverlayImageDescriptor, Image> fCache = new HashMap<OverlayImageDescriptor, Image>();
+ private Map<OverlayImageDescriptor, Image> fCache = new HashMap<>();
/**
* Returns and caches an image corresponding to the specified image
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/CastToArrayActionHandler.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/CastToArrayActionHandler.java
index 513ea86bc58..22808ca2eb7 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/CastToArrayActionHandler.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/CastToArrayActionHandler.java
@@ -282,7 +282,7 @@ public class CastToArrayActionHandler extends AbstractHandler {
}
private ICastToArray[] getCastToArray(Object evaluationContext) {
- List<ICastToArray> castableItems = new ArrayList<ICastToArray>();
+ List<ICastToArray> castableItems = new ArrayList<>();
if (evaluationContext instanceof IEvaluationContext) {
Object s = ((IEvaluationContext) evaluationContext).getVariable(ISources.ACTIVE_MENU_SELECTION_NAME);
if (s instanceof IStructuredSelection) {
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/CastToTypeActionHandler.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/CastToTypeActionHandler.java
index 58d73a9f46a..5e2a531e08f 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/CastToTypeActionHandler.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/CastToTypeActionHandler.java
@@ -131,7 +131,7 @@ public class CastToTypeActionHandler extends AbstractHandler {
}
private ICastToType[] getCastToType(Object evaluationContext) {
- List<ICastToType> castableItems = new ArrayList<ICastToType>();
+ List<ICastToType> castableItems = new ArrayList<>();
if (evaluationContext instanceof IEvaluationContext) {
Object s = ((IEvaluationContext) evaluationContext).getVariable(ISources.ACTIVE_MENU_SELECTION_NAME);
if (s instanceof IStructuredSelection) {
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/PinDebugContextActionDelegate.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/PinDebugContextActionDelegate.java
index 2e8f6c72d61..8aa03763f3d 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/PinDebugContextActionDelegate.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/PinDebugContextActionDelegate.java
@@ -209,7 +209,7 @@ public class PinDebugContextActionDelegate implements IViewActionDelegate, IActi
String description = ""; //$NON-NLS-1$
if (provider != null) {
- Set<String> labels = new HashSet<String>();
+ Set<String> labels = new HashSet<>();
for (IPinElementHandle handle : provider.getPinHandles()) {
String tmp = getLabel(handle);
if (tmp != null && tmp.trim().length() != 0)
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/RestoreDefaultTypeActionHandler.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/RestoreDefaultTypeActionHandler.java
index bd8d30be00d..782d0566a7f 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/RestoreDefaultTypeActionHandler.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/RestoreDefaultTypeActionHandler.java
@@ -87,7 +87,7 @@ public class RestoreDefaultTypeActionHandler extends AbstractHandler {
}
private ICastToType[] getCastToType(Object evaluationContext) {
- List<ICastToType> castableItems = new ArrayList<ICastToType>();
+ List<ICastToType> castableItems = new ArrayList<>();
if (evaluationContext instanceof IEvaluationContext) {
Object s = ((IEvaluationContext) evaluationContext).getVariable(ISources.ACTIVE_MENU_SELECTION_NAME);
if (s instanceof IStructuredSelection) {
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/breakpoints/ToggleBreakpointAdapter.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/breakpoints/ToggleBreakpointAdapter.java
index 69d37bfd66f..0b56ebd3de7 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/breakpoints/ToggleBreakpointAdapter.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/breakpoints/ToggleBreakpointAdapter.java
@@ -49,7 +49,7 @@ public class ToggleBreakpointAdapter extends AbstractToggleBreakpointAdapter {
IResource resource, int lineNumber) throws CoreException {
if (interactive) {
ICLineBreakpoint lineBp = CDIDebugModel.createBlankLineBreakpoint();
- Map<String, Object> attributes = new HashMap<String, Object>();
+ Map<String, Object> attributes = new HashMap<>();
CDIDebugModel.setLineBreakpointAttributes(attributes, sourceHandle, getBreakpointType(), lineNumber, true,
0, ""); //$NON-NLS-1$
openBreakpointPropertiesDialog(lineBp, part, resource, attributes);
@@ -70,7 +70,7 @@ public class ToggleBreakpointAdapter extends AbstractToggleBreakpointAdapter {
IResource resource, String functionName, int charStart, int charEnd, int lineNumber) throws CoreException {
if (interactive) {
ICFunctionBreakpoint bp = CDIDebugModel.createBlankFunctionBreakpoint();
- Map<String, Object> attributes = new HashMap<String, Object>();
+ Map<String, Object> attributes = new HashMap<>();
CDIDebugModel.setFunctionBreakpointAttributes(attributes, sourceHandle, getBreakpointType(), functionName,
charStart, charEnd, lineNumber, true, 0, ""); //$NON-NLS-1$
openBreakpointPropertiesDialog(bp, part, resource, attributes);
@@ -91,7 +91,7 @@ public class ToggleBreakpointAdapter extends AbstractToggleBreakpointAdapter {
int charStart, int charEnd, int lineNumber, String expression, String memorySpace, String range)
throws CoreException {
ICWatchpoint bp = CDIDebugModel.createBlankWatchpoint();
- Map<String, Object> attributes = new HashMap<String, Object>();
+ Map<String, Object> attributes = new HashMap<>();
CDIDebugModel.setWatchPointAttributes(attributes, sourceHandle, resource, true, false, expression, memorySpace,
new BigInteger(range), true, 0, ""); //$NON-NLS-1$
openBreakpointPropertiesDialog(bp, part, resource, attributes);
@@ -101,7 +101,7 @@ public class ToggleBreakpointAdapter extends AbstractToggleBreakpointAdapter {
protected void createEventBreakpoint(boolean interactive, IWorkbenchPart part, IResource resource, String type,
String arg) throws CoreException {
ICEventBreakpoint bp = CDIDebugModel.createBlankEventBreakpoint();
- Map<String, Object> attributes = new HashMap<String, Object>();
+ Map<String, Object> attributes = new HashMap<>();
CDIDebugModel.setEventBreakpointAttributes(attributes, type, arg);
openBreakpointPropertiesDialog(bp, part, resource, attributes);
}
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/breakpoints/ToggleCBreakpointsTargetFactory.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/breakpoints/ToggleCBreakpointsTargetFactory.java
index 60031da3b28..532cd900b06 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/breakpoints/ToggleCBreakpointsTargetFactory.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/breakpoints/ToggleCBreakpointsTargetFactory.java
@@ -39,7 +39,7 @@ public class ToggleCBreakpointsTargetFactory implements IToggleBreakpointsTarget
public static String TOGGLE_C_BREAKPOINT_TARGET_ID = CDebugUIPlugin.getUniqueIdentifier()
+ ".toggleCBreakpointTarget"; //$NON-NLS-1$
- private static Set<String> TOGGLE_TARGET_IDS = new HashSet<String>(1);
+ private static Set<String> TOGGLE_TARGET_IDS = new HashSet<>(1);
static {
TOGGLE_TARGET_IDS.add(TOGGLE_C_BREAKPOINT_TARGET_ID);
}
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/breakpoints/ToggleCDynamicPrintfTargetFactory.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/breakpoints/ToggleCDynamicPrintfTargetFactory.java
index a16c6ea334d..1c58844ba23 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/breakpoints/ToggleCDynamicPrintfTargetFactory.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/breakpoints/ToggleCDynamicPrintfTargetFactory.java
@@ -33,7 +33,7 @@ public class ToggleCDynamicPrintfTargetFactory implements IToggleBreakpointsTarg
public static String TOGGLE_C_DYNAMICPRINTF_TARGET_ID = CDebugUIPlugin.getUniqueIdentifier()
+ ".toggleCDynamicPrintfTarget"; //$NON-NLS-1$
- private static Set<String> TOGGLE_TARGET_IDS = new HashSet<String>(1);
+ private static Set<String> TOGGLE_TARGET_IDS = new HashSet<>(1);
static {
TOGGLE_TARGET_IDS.add(TOGGLE_C_DYNAMICPRINTF_TARGET_ID);
}
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/breakpoints/ToggleCTracepointsTargetFactory.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/breakpoints/ToggleCTracepointsTargetFactory.java
index 23a99cf5d2c..5dc9b29a32f 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/breakpoints/ToggleCTracepointsTargetFactory.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/breakpoints/ToggleCTracepointsTargetFactory.java
@@ -34,7 +34,7 @@ public class ToggleCTracepointsTargetFactory implements IToggleBreakpointsTarget
public static String TOGGLE_C_TRACEPOINT_TARGET_ID = CDebugUIPlugin.getUniqueIdentifier()
+ ".toggleCTracepointTarget"; //$NON-NLS-1$
- private static Set<String> TOGGLE_TARGET_IDS = new HashSet<String>(1);
+ private static Set<String> TOGGLE_TARGET_IDS = new HashSet<>(1);
static {
TOGGLE_TARGET_IDS.add(TOGGLE_C_TRACEPOINT_TARGET_ID);
}
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/breakpoints/ToggleDynamicPrintfAdapter.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/breakpoints/ToggleDynamicPrintfAdapter.java
index 5e330dc74ce..091d41b57d5 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/breakpoints/ToggleDynamicPrintfAdapter.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/breakpoints/ToggleDynamicPrintfAdapter.java
@@ -48,7 +48,7 @@ public class ToggleDynamicPrintfAdapter extends AbstractToggleBreakpointAdapter
IResource resource, int lineNumber) throws CoreException {
if (interactive) {
ICDynamicPrintf dprintf = (ICDynamicPrintf) CDIDebugModel.createBlankLineDynamicPrintf();
- Map<String, Object> attributes = new HashMap<String, Object>();
+ Map<String, Object> attributes = new HashMap<>();
CDIDebugModel.setLineBreakpointAttributes(attributes, sourceHandle, getBreakpointType(), lineNumber, true,
0, ""); //$NON-NLS-1$
@@ -79,7 +79,7 @@ public class ToggleDynamicPrintfAdapter extends AbstractToggleBreakpointAdapter
IResource resource, String functionName, int charStart, int charEnd, int lineNumber) throws CoreException {
if (interactive) {
ICDynamicPrintf dprintf = (ICDynamicPrintf) CDIDebugModel.createBlankFunctionDynamicPrintf();
- Map<String, Object> attributes = new HashMap<String, Object>();
+ Map<String, Object> attributes = new HashMap<>();
CDIDebugModel.setFunctionBreakpointAttributes(attributes, sourceHandle, getBreakpointType(), functionName,
charStart, charEnd, lineNumber, true, 0, ""); //$NON-NLS-1$
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/breakpoints/ToggleTracepointAdapter.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/breakpoints/ToggleTracepointAdapter.java
index afa715c2f8b..a6a615e5abf 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/breakpoints/ToggleTracepointAdapter.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/breakpoints/ToggleTracepointAdapter.java
@@ -43,7 +43,7 @@ public class ToggleTracepointAdapter extends AbstractToggleBreakpointAdapter {
IResource resource, int lineNumber) throws CoreException {
if (interactive) {
ICLineBreakpoint lineBp = CDIDebugModel.createBlankLineTracepoint();
- Map<String, Object> attributes = new HashMap<String, Object>();
+ Map<String, Object> attributes = new HashMap<>();
CDIDebugModel.setLineBreakpointAttributes(attributes, sourceHandle, getBreakpointType(), lineNumber, true,
0, ""); //$NON-NLS-1$
openBreakpointPropertiesDialog(lineBp, part, resource, attributes);
@@ -64,7 +64,7 @@ public class ToggleTracepointAdapter extends AbstractToggleBreakpointAdapter {
IResource resource, String functionName, int charStart, int charEnd, int lineNumber) throws CoreException {
if (interactive) {
ICFunctionBreakpoint bp = CDIDebugModel.createBlankFunctionTracepoint();
- Map<String, Object> attributes = new HashMap<String, Object>();
+ Map<String, Object> attributes = new HashMap<>();
CDIDebugModel.setFunctionBreakpointAttributes(attributes, sourceHandle, getBreakpointType(), functionName,
charStart, charEnd, lineNumber, true, 0, ""); //$NON-NLS-1$
openBreakpointPropertiesDialog(bp, part, resource, attributes);
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/breakpoints/CBreakpointPreferenceStore.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/breakpoints/CBreakpointPreferenceStore.java
index cf6e3541f5d..476e4bc0b39 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/breakpoints/CBreakpointPreferenceStore.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/breakpoints/CBreakpointPreferenceStore.java
@@ -57,12 +57,12 @@ import org.eclipse.jface.util.PropertyChangeEvent;
public class CBreakpointPreferenceStore implements IPersistentPreferenceStore {
// This map is the current properties/values being maintained/manipulated
- private HashMap<String, Object> fProperties = new HashMap<String, Object>();
+ private HashMap<String, Object> fProperties = new HashMap<>();
// Original set of values. So we can see what has really changed on the save and
// perform appropriate change operations. We only really want to operate on changed
// values, to avoid generating churn.
- private HashMap<String, Object> fOriginalValues = new HashMap<String, Object>();
+ private HashMap<String, Object> fOriginalValues = new HashMap<>();
private boolean fIsDirty = false;
private boolean fIsCanceled = false;
private ListenerList<IPropertyChangeListener> fListeners;
@@ -167,7 +167,7 @@ public class CBreakpointPreferenceStore implements IPersistentPreferenceStore {
}
private void saveToExistingMarker(final ICBreakpoint breakpoint, final IMarker marker) throws IOException {
- final List<String> changedProperties = new ArrayList<String>(5);
+ final List<String> changedProperties = new ArrayList<>(5);
Set<String> valueNames = fProperties.keySet();
for (String name : valueNames) {
if (fProperties.containsKey(name)) {
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/breakpoints/CBreakpointPropertyPage.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/breakpoints/CBreakpointPropertyPage.java
index 8597628aecc..7a4591690db 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/breakpoints/CBreakpointPropertyPage.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/breakpoints/CBreakpointPropertyPage.java
@@ -1085,8 +1085,8 @@ public class CBreakpointPropertyPage extends FieldEditorPreferencePage implement
private void setupEventTypeFieldEditor(ICBreakpointsUIContribution[] cons, ICBreakpoint breakpoint,
String conMainElement, Composite parent) {
String id = null;
- ArrayList<String> eventTypeValueList = new ArrayList<String>();
- ArrayList<String> eventTypeLabelList = new ArrayList<String>();
+ ArrayList<String> eventTypeValueList = new ArrayList<>();
+ ArrayList<String> eventTypeLabelList = new ArrayList<>();
// The filter of the debugModelIds should already be done.
for (ICBreakpointsUIContribution con : cons) {
@@ -1114,7 +1114,7 @@ public class CBreakpointPropertyPage extends FieldEditorPreferencePage implement
void addEditorToComposite(FieldEditor fieldEditor) {
if (fEventArgsFEs == null) {
- fEventArgsFEs = new ArrayList<FieldEditor>();
+ fEventArgsFEs = new ArrayList<>();
}
fEventArgsFEs.add(fieldEditor);
}
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/dialogs/AddEventBreakpointDialog.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/dialogs/AddEventBreakpointDialog.java
index f500d1980a2..4244f9c6e34 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/dialogs/AddEventBreakpointDialog.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/dialogs/AddEventBreakpointDialog.java
@@ -52,7 +52,7 @@ public class AddEventBreakpointDialog extends Dialog implements ModifyListener,
private String fEventType;
private String fEventArgument;
private Composite fEventArgumentControl;
- private HashMap<String, String> fIdLabelMap = new LinkedHashMap<String, String>();
+ private HashMap<String, String> fIdLabelMap = new LinkedHashMap<>();
private FieldEditorPreferencePage page;
private CBreakpointUIContributionFactory factory;
private String debugModelId;
@@ -77,7 +77,7 @@ public class AddEventBreakpointDialog extends Dialog implements ModifyListener,
protected void createFieldEditors() {
Composite parent = getFieldEditorParent();
try {
- Map<String, Object> map = new HashMap<String, Object>();
+ Map<String, Object> map = new HashMap<>();
map.put(ICEventBreakpoint.EVENT_TYPE_ID, eventType);
ICBreakpointsUIContribution cons[] = CBreakpointUIContributionFactory.getInstance()
.getBreakpointUIContributions(modelId, ICEventBreakpoint.C_EVENT_BREAKPOINT_MARKER, map);
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/editor/DisassemblyEditorManager.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/editor/DisassemblyEditorManager.java
index 3d95bb39fa7..b9f81e2200a 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/editor/DisassemblyEditorManager.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/editor/DisassemblyEditorManager.java
@@ -56,9 +56,9 @@ public class DisassemblyEditorManager implements IWindowListener, IDisassemblyCo
public DisassemblyEditorManager() {
fDocumentProvider = new DisassemblyDocumentProvider();
- fEditorParts = new HashMap<Object, IEditorPart>();
- fOpenDisassemblyPolicy = new HashMap<Object, String>();
- fSteppingModePolicy = new HashMap<Object, ISteppingModeTarget>();
+ fEditorParts = new HashMap<>();
+ fOpenDisassemblyPolicy = new HashMap<>();
+ fSteppingModePolicy = new HashMap<>();
CDebugUIPlugin.getDefault().getWorkbench().addWindowListener(this);
IWorkbenchWindow window = CDebugUIPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow();
if (window != null) {
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/viewer/DisassemblyDocumentProvider.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/viewer/DisassemblyDocumentProvider.java
index d8cab82a395..727785eedfe 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/viewer/DisassemblyDocumentProvider.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/viewer/DisassemblyDocumentProvider.java
@@ -70,7 +70,7 @@ public class DisassemblyDocumentProvider implements IDocumentProvider {
private Map<Object, DocumentInfo> fDocumentInfos;
public DisassemblyDocumentProvider() {
- fDocumentInfos = new HashMap<Object, DocumentInfo>();
+ fDocumentInfos = new HashMap<>();
}
/* (non-Javadoc)
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/viewer/DisassemblyPane.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/viewer/DisassemblyPane.java
index 97fbfb70832..3a974b4270f 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/viewer/DisassemblyPane.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/viewer/DisassemblyPane.java
@@ -90,7 +90,7 @@ public class DisassemblyPane implements IPropertyChangeListener {
private IMenuListener fMenuListener;
private MouseListener fMouseListener;
- private Map<String, IAction> fActions = new HashMap<String, IAction>(10);
+ private Map<String, IAction> fActions = new HashMap<>(10);
public DisassemblyPane(String contextMenuId, String rulerMenuId) {
fAnnotationPreferences = new MarkerAnnotationPreferences();
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/viewer/DocumentAnnotationUpdate.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/viewer/DocumentAnnotationUpdate.java
index 650deb25530..ef5f69860a4 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/viewer/DocumentAnnotationUpdate.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/viewer/DocumentAnnotationUpdate.java
@@ -35,7 +35,7 @@ public class DocumentAnnotationUpdate extends DocumentUpdate implements IDocumen
super(presentationContext, root, base, element);
fAnnotationProvider = annotationProvider;
fIndex = index;
- fAnnotations = new ArrayList<Annotation>();
+ fAnnotations = new ArrayList<>();
}
/* (non-Javadoc)
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/viewer/DocumentContentProvider.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/viewer/DocumentContentProvider.java
index 52c274873af..2861a6da8a7 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/viewer/DocumentContentProvider.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/viewer/DocumentContentProvider.java
@@ -49,8 +49,8 @@ public class DocumentContentProvider implements IModelChangedListener {
private IModelProxy fRootProxy;
private IModelProxy fBaseProxy;
- private List<IModelProxy> fLineProxies = new ArrayList<IModelProxy>(50);
- private Map<Object, Integer> fLineElements = new HashMap<Object, Integer>(20);
+ private List<IModelProxy> fLineProxies = new ArrayList<>(50);
+ private Map<Object, Integer> fLineElements = new HashMap<>(20);
private DocumentUpdate fUpdateInProgress;
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/viewer/VirtualDocument.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/viewer/VirtualDocument.java
index 1c01e6cd301..9332a6db348 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/viewer/VirtualDocument.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/viewer/VirtualDocument.java
@@ -201,7 +201,7 @@ public class VirtualDocument extends Document {
Position[] positions = getPositions(CATEGORY_LINE);
if (lineNumber < positions.length) {
Iterator it = annotationModel.getAnnotationIterator();
- ArrayList<Annotation> oldAnnotations = new ArrayList<Annotation>(3);
+ ArrayList<Annotation> oldAnnotations = new ArrayList<>(3);
while (it.hasNext()) {
Annotation ann = (Annotation) it.next();
if (positions[lineNumber].equals(annotationModel.getPosition(ann))) {
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/launch/CApplicationLaunchShortcut.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/launch/CApplicationLaunchShortcut.java
index c6e1b6445a1..46ec455d919 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/launch/CApplicationLaunchShortcut.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/launch/CApplicationLaunchShortcut.java
@@ -97,7 +97,7 @@ public class CApplicationLaunchShortcut implements ILaunchShortcut2 {
List<ILaunchConfiguration> candidateConfigs = Collections.emptyList();
try {
ILaunchConfiguration[] configs = DebugPlugin.getDefault().getLaunchManager().getLaunchConfigurations();
- candidateConfigs = new ArrayList<ILaunchConfiguration>(configs.length);
+ candidateConfigs = new ArrayList<>(configs.length);
for (int i = 0; i < configs.length; i++) {
ILaunchConfiguration config = configs[i];
IPath programPath = CDebugUtils.getProgramPath(config);
@@ -297,7 +297,7 @@ public class CApplicationLaunchShortcut implements ILaunchShortcut2 {
if (elements.length == 1 && elements[0] instanceof IBinary) {
bin = (IBinary) elements[0];
} else {
- final List<IBinary> results = new ArrayList<IBinary>();
+ final List<IBinary> results = new ArrayList<>();
ProgressMonitorDialog dialog = new ProgressMonitorDialog(getShell());
IRunnableWithProgress runnable = new IRunnableWithProgress() {
@Override
@@ -412,7 +412,7 @@ public class CApplicationLaunchShortcut implements ILaunchShortcut2 {
* @return a list of projects - may be empty
*/
public static List<IProject> getProjectsFromSelection(ISelection selection) {
- List<IProject> projects = new ArrayList<IProject>();
+ List<IProject> projects = new ArrayList<>();
if (selection != null && !selection.isEmpty()) {
if (selection instanceof ITextSelection) {
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/launch/InvalidLaunchableAdapterFactory.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/launch/InvalidLaunchableAdapterFactory.java
index ca7951149eb..b4b4ceca8ee 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/launch/InvalidLaunchableAdapterFactory.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/launch/InvalidLaunchableAdapterFactory.java
@@ -28,7 +28,7 @@ import org.eclipse.debug.ui.actions.ILaunchable;
*/
public class InvalidLaunchableAdapterFactory implements IAdapterFactory {
private static final Class<?>[] TYPES = { ILaunchable.class };
- private static ArrayList<String> currentTraces = new ArrayList<String>();
+ private static ArrayList<String> currentTraces = new ArrayList<>();
@Override
public <T> T getAdapter(Object adaptableObject, Class<T> adapterType) {
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/pinclone/DebugContextPinProvider.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/pinclone/DebugContextPinProvider.java
index 90e1daf0692..241dab57d48 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/pinclone/DebugContextPinProvider.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/pinclone/DebugContextPinProvider.java
@@ -53,7 +53,7 @@ public class DebugContextPinProvider extends AbstractDebugContextProvider implem
public DebugContextPinProvider(IWorkbenchPart part, ISelection activeContext) {
super(part);
fWorkbenchPart = part;
- fPinProvider = new HashMap<IPinElementHandle, IPinProvider>();
+ fPinProvider = new HashMap<>();
fActiveContext = activeContext;
fPinHandles = pin(part, activeContext, new IPinModelListener() {
@@ -120,7 +120,7 @@ public class DebugContextPinProvider extends AbstractDebugContextProvider implem
* @param listener pin model listener
* @return a set of pinned handle
*/
- Set<IPinElementHandle> handles = new HashSet<IPinElementHandle>();
+ Set<IPinElementHandle> handles = new HashSet<>();
private Set<IPinElementHandle> pin(IWorkbenchPart part, ISelection selection, IPinModelListener listener) {
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/pinclone/DebugEventFilterService.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/pinclone/DebugEventFilterService.java
index b8150346fa3..80025463f35 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/pinclone/DebugEventFilterService.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/pinclone/DebugEventFilterService.java
@@ -52,7 +52,7 @@ public class DebugEventFilterService {
public void debugContextChanged(DebugContextEvent event) {
ISelection eventContext = event.getContext();
if (eventContext instanceof IStructuredSelection) {
- List<Object> filteredContextList = new ArrayList<Object>();
+ List<Object> filteredContextList = new ArrayList<>();
List<?> eventContextList = ((IStructuredSelection) eventContext).toList();
for (Object o : eventContextList) {
if (fProvider.isPinnedTo(o)) {
@@ -74,7 +74,7 @@ public class DebugEventFilterService {
}
private static DebugEventFilterService INSTANCE;
- private Map<IWorkbenchPart, DebugEventFilter> fFilterMap = new HashMap<IWorkbenchPart, DebugEventFilter>();
+ private Map<IWorkbenchPart, DebugEventFilter> fFilterMap = new HashMap<>();
private DebugEventFilterService() {
}
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/pinclone/ViewIDCounterManager.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/pinclone/ViewIDCounterManager.java
index 7fc14d9697e..153e37b5f6d 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/pinclone/ViewIDCounterManager.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/pinclone/ViewIDCounterManager.java
@@ -90,7 +90,7 @@ public final class ViewIDCounterManager {
String secondaryId = viewRef.getSecondaryId();
Set<Integer> secondaryIdSet = viewIdToNextCounterMap.get(id);
if (secondaryIdSet == null) {
- secondaryIdSet = new HashSet<Integer>();
+ secondaryIdSet = new HashSet<>();
viewIdToNextCounterMap.put(id, secondaryIdSet);
}
secondaryId = PinCloneUtils.decodeClonedPartSecondaryId(secondaryId);
@@ -221,7 +221,7 @@ public final class ViewIDCounterManager {
public Integer getNextCounter(String viewId) {
Set<Integer> secondaryIdSet = viewIdToNextCounterMap.get(viewId);
if (secondaryIdSet == null) {
- secondaryIdSet = new HashSet<Integer>();
+ secondaryIdSet = new HashSet<>();
viewIdToNextCounterMap.put(viewId, secondaryIdSet);
}
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/preferences/SourcePreferencePage.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/preferences/SourcePreferencePage.java
index 550fe657f69..518c82d36c5 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/preferences/SourcePreferencePage.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/preferences/SourcePreferencePage.java
@@ -48,7 +48,7 @@ import org.eclipse.ui.IWorkbenchPreferencePage;
*/
public class SourcePreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
private SourceContainerViewer fPathViewer;
- private List<SourceContainerAction> fActions = new ArrayList<SourceContainerAction>(6);
+ private List<SourceContainerAction> fActions = new ArrayList<>(6);
private IWorkbench fWorkbench;
private AddContainerAction fAddAction;
private EditContainerAction fEditAction;
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/preferences/StringSetSerializer.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/preferences/StringSetSerializer.java
index 28d46c789eb..fdf605f86dd 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/preferences/StringSetSerializer.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/preferences/StringSetSerializer.java
@@ -39,7 +39,7 @@ public final class StringSetSerializer {
public static Set<String> deserialize(String serialized) {
Assert.isLegal(serialized != null);
- Set<String> marked = new HashSet<String>();
+ Set<String> marked = new HashSet<>();
StringTokenizer tok = new StringTokenizer(serialized, DELIM);
while (tok.hasMoreTokens())
marked.add(tok.nextToken());
@@ -49,7 +49,7 @@ public final class StringSetSerializer {
public static String[] getDifference(String oldValue, String newValue) {
Set<String> oldSet = deserialize(oldValue);
Set<String> newSet = deserialize(newValue);
- Set<String> intersection = new HashSet<String>(oldSet);
+ Set<String> intersection = new HashSet<>(oldSet);
intersection.retainAll(newSet);
oldSet.removeAll(intersection);
newSet.removeAll(intersection);
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/sourcelookup/AddSourceContainerDialog.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/sourcelookup/AddSourceContainerDialog.java
index 8d91acf5d39..dc97bb758ec 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/sourcelookup/AddSourceContainerDialog.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/sourcelookup/AddSourceContainerDialog.java
@@ -129,7 +129,7 @@ public class AddSourceContainerDialog extends TitleAreaDialog {
* @return the list of source container types that have browsers
*/
private ISourceContainerType[] filterTypes(ISourceContainerType[] types) {
- ArrayList<ISourceContainerType> validTypes = new ArrayList<ISourceContainerType>();
+ ArrayList<ISourceContainerType> validTypes = new ArrayList<>();
for (int i = 0; i < types.length; i++) {
ISourceContainerType type = types[i];
if (fDirector.supportsSourceContainerType(type)) {
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/sourcelookup/CProjectSourceContainerBrowser.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/sourcelookup/CProjectSourceContainerBrowser.java
index ef2ab7b4034..337d19c75a9 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/sourcelookup/CProjectSourceContainerBrowser.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/sourcelookup/CProjectSourceContainerBrowser.java
@@ -51,7 +51,7 @@ public class CProjectSourceContainerBrowser extends AbstractSourceContainerBrows
ProjectSourceContainerDialog dialog = new ProjectSourceContainerDialog(shell, input, contentProvider,
labelProvider, SourceLookupUIMessages.projectSelection_chooseLabel);
if (dialog.open() == Window.OK) {
- ArrayList<ISourceContainer> res = new ArrayList<ISourceContainer>();
+ ArrayList<ISourceContainer> res = new ArrayList<>();
for (Object element : dialog.getResult()) {
if (!(element instanceof IProject))
continue;
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/sourcelookup/CSourceNotFoundEditor.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/sourcelookup/CSourceNotFoundEditor.java
index 2831032b218..17b5f678337 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/sourcelookup/CSourceNotFoundEditor.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/sourcelookup/CSourceNotFoundEditor.java
@@ -313,7 +313,7 @@ public class CSourceNotFoundEditor extends CommonSourceNotFoundEditor {
private void addSourceMappingToDirector(String missingPath, IPath newSourcePath,
AbstractSourceLookupDirector director) throws CoreException {
- ArrayList<ISourceContainer> containerList = new ArrayList<ISourceContainer>(
+ ArrayList<ISourceContainer> containerList = new ArrayList<>(
Arrays.asList(director.getSourceContainers()));
MappingSourceContainer foundMappings = null;
for (ISourceContainer container : containerList) {
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/sourcelookup/MappingSourceContainerDialog.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/sourcelookup/MappingSourceContainerDialog.java
index f159ffaf904..fbfbc067ead 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/sourcelookup/MappingSourceContainerDialog.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/sourcelookup/MappingSourceContainerDialog.java
@@ -587,7 +587,7 @@ public class MappingSourceContainerDialog extends TitleAreaDialog {
MapEntrySourceContainer entry = selEntries[0];
try {
ISourceContainer[] containers = fContainer.getSourceContainers();
- List<MapEntrySourceContainer> list = new ArrayList<MapEntrySourceContainer>(containers.length);
+ List<MapEntrySourceContainer> list = new ArrayList<>(containers.length);
for (ISourceContainer container : containers) {
list.add(((MapEntrySourceContainer) container).copy());
}
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/sourcelookup/SourceContainerAction.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/sourcelookup/SourceContainerAction.java
index 9bd3e26e5e4..9df132d0f3c 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/sourcelookup/SourceContainerAction.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/sourcelookup/SourceContainerAction.java
@@ -77,7 +77,7 @@ public abstract class SourceContainerAction extends SelectionListenerAction {
* @return targets for an action
*/
protected List<ISourceContainer> getOrderedSelection() {
- List<ISourceContainer> targets = new ArrayList<ISourceContainer>();
+ List<ISourceContainer> targets = new ArrayList<>();
List<?> selection = ((IStructuredSelection) getViewer().getSelection()).toList();
ISourceContainer[] entries = getViewer().getEntries();
for (int i = 0; i < entries.length; i++) {
@@ -94,7 +94,7 @@ public abstract class SourceContainerAction extends SelectionListenerAction {
*/
protected List<ISourceContainer> getEntriesAsList() {
ISourceContainer[] entries = getViewer().getEntries();
- List<ISourceContainer> list = new ArrayList<ISourceContainer>(entries.length);
+ List<ISourceContainer> list = new ArrayList<>(entries.length);
for (int i = 0; i < entries.length; i++) {
list.add(entries[i]);
}
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/sourcelookup/SourceContainerViewer.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/sourcelookup/SourceContainerViewer.java
index 606589bf69c..fa18d4a6086 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/sourcelookup/SourceContainerViewer.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/sourcelookup/SourceContainerViewer.java
@@ -39,7 +39,7 @@ public class SourceContainerViewer extends TreeViewer {
/**
* The source container entries displayed in this viewer
*/
- protected List<ISourceContainer> fEntries = new ArrayList<ISourceContainer>();
+ protected List<ISourceContainer> fEntries = new ArrayList<>();
class ContentProvider implements ITreeContentProvider {
/**
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/sourcelookup/SourceFoldersRelativePathSourceContainerBrowser.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/sourcelookup/SourceFoldersRelativePathSourceContainerBrowser.java
index 74df270f32d..4ee769e688b 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/sourcelookup/SourceFoldersRelativePathSourceContainerBrowser.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/sourcelookup/SourceFoldersRelativePathSourceContainerBrowser.java
@@ -52,7 +52,7 @@ public class SourceFoldersRelativePathSourceContainerBrowser extends AbstractSou
ProjectSourceContainerDialog dialog = new ProjectSourceContainerDialog(shell, input, contentProvider,
labelProvider, SourceLookupUIMessages.projectSelection_chooseLabel);
if (dialog.open() == Window.OK) {
- ArrayList<ISourceContainer> res = new ArrayList<ISourceContainer>();
+ ArrayList<ISourceContainer> res = new ArrayList<>();
for (Object element : dialog.getResult()) {
if (!(element instanceof IProject))
continue;
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/executables/ExecutablesView.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/executables/ExecutablesView.java
index 89ff4a8bd94..a73ced5e56c 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/executables/ExecutablesView.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/executables/ExecutablesView.java
@@ -209,7 +209,7 @@ public class ExecutablesView extends ViewPart {
new ColumnLabelProvider(), Messages.ExecutablesView_SelectColumns);
PlatformUI.getWorkbench().getHelpSystem().setHelp(this, CONFIGURE_COLUMNS_DIALOG);
String[] visibleColumns = getVisibleColumns();
- List<String> initialSelection = new ArrayList<String>(visibleColumns.length);
+ List<String> initialSelection = new ArrayList<>(visibleColumns.length);
for (int i = 0; i < visibleColumns.length; i++) {
initialSelection.add(visibleColumns[i]);
}
@@ -390,7 +390,7 @@ public class ExecutablesView extends ViewPart {
}
private String[] getVisibleColumns() {
- ArrayList<String> visibleNames = new ArrayList<String>();
+ ArrayList<String> visibleNames = new ArrayList<>();
for (int i = 0; i < columnNames.length; i++) {
if (allColumns[i].getWidth() > 0)
@@ -440,7 +440,7 @@ public class ExecutablesView extends ViewPart {
ISelection selection = getExecutablesViewer().getSelection();
if (selection instanceof IStructuredSelection) {
Object[] selectedObjects = ((IStructuredSelection) selection).toArray();
- ArrayList<Executable> selectedExes = new ArrayList<Executable>();
+ ArrayList<Executable> selectedExes = new ArrayList<>();
for (Object object : selectedObjects) {
if (object instanceof Executable)
selectedExes.add((Executable) object);
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/executables/SourceFilesContentProvider.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/executables/SourceFilesContentProvider.java
index 9f705186f90..177664017bb 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/executables/SourceFilesContentProvider.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/executables/SourceFilesContentProvider.java
@@ -81,7 +81,7 @@ public class SourceFilesContentProvider extends CElementContentProvider implemen
*
* <p> This collection must be accessed only from the UI thread
*/
- private Map<IPath, QuickParseJob> pathToJobMap = new HashMap<IPath, SourceFilesContentProvider.QuickParseJob>();
+ private Map<IPath, QuickParseJob> pathToJobMap = new HashMap<>();
/** those executables for which we asked the question and got a result.
* NOTE: this contains a duplicate of into in Executable, because we can't
@@ -108,7 +108,7 @@ public class SourceFilesContentProvider extends CElementContentProvider implemen
/**
* The cached file info. Key is the path of the executable. This collection must be accessed only on the UI thread.
*/
- private Map<IPath, TUData> fetchedExecutables = new HashMap<IPath, TUData>();
+ private Map<IPath, TUData> fetchedExecutables = new HashMap<>();
private final SourceFilesViewer viewer;
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/executables/SourceFilesViewer.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/executables/SourceFilesViewer.java
index 1282953c88a..1d52a2e3178 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/executables/SourceFilesViewer.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/executables/SourceFilesViewer.java
@@ -77,7 +77,7 @@ public class SourceFilesViewer extends BaseViewer {
/** Tradeoff expensiveness of checking filesystem against likelihood
* that files will be added/removed/changed in the given time period */
static final long FILE_CHECK_DELTA = 30 * 1000;
- private static LRUCache<Object, TranslationUnitInfo> translationUnitInfoCache = new LRUCache<Object, TranslationUnitInfo>(
+ private static LRUCache<Object, TranslationUnitInfo> translationUnitInfoCache = new LRUCache<>(
1024);
public SourceFilesViewer(ExecutablesView view, Composite parent, int style) {
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/memory/AddMemoryBlockDialog.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/memory/AddMemoryBlockDialog.java
index ef9b1eaed00..8851ab466b0 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/memory/AddMemoryBlockDialog.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/memory/AddMemoryBlockDialog.java
@@ -68,8 +68,8 @@ public class AddMemoryBlockDialog extends TrayDialog implements ModifyListener,
*/
private static String fPreviousMemorySpaceSelection;
- private static List<String> sAddressHistory = new ArrayList<String>();
- private static List<String> sExpressionHistory = new ArrayList<String>();
+ private static List<String> sAddressHistory = new ArrayList<>();
+ private static List<String> sExpressionHistory = new ArrayList<>();
private static boolean sDefaultToExpression = true;
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/memory/AddMemoryBlocks.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/memory/AddMemoryBlocks.java
index 23b105cfc63..da317b6ef36 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/memory/AddMemoryBlocks.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/memory/AddMemoryBlocks.java
@@ -189,7 +189,7 @@ public class AddMemoryBlocks implements IAddMemoryBlocksTarget {
String input = dialog.enteredExpression() ? dialog.getExpression() : dialog.getAddress();
- List<String> list = new ArrayList<String>();
+ List<String> list = new ArrayList<>();
if (input.length() == 0)
list.add(""); //$NON-NLS-1$
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/CDebugUIPlugin.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/CDebugUIPlugin.java
index bba7b4c9c8c..84913dc98b6 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/CDebugUIPlugin.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/CDebugUIPlugin.java
@@ -183,7 +183,7 @@ public class CDebugUIPlugin extends AbstractUIPlugin {
}
protected void initializeDebuggerPageMap() {
- fDebuggerPageMap = new HashMap<String, IConfigurationElement>(10);
+ fDebuggerPageMap = new HashMap<>(10);
IExtensionPoint extensionPoint = Platform.getExtensionRegistry().getExtensionPoint(PLUGIN_ID,
CDEBUGGER_PAGE_EXTENSION_POINT_ID);
IConfigurationElement[] infos = extensionPoint.getConfigurationElements();
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpointactions/SoundActionComposite.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpointactions/SoundActionComposite.java
index 5d4a7388de4..49c555bd715 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpointactions/SoundActionComposite.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpointactions/SoundActionComposite.java
@@ -153,7 +153,7 @@ public class SoundActionComposite extends Composite {
private void rebuildRecentSoundsCombo() {
combo_1.removeAll();
- ArrayList<File> sortedSounds = new ArrayList<File>(soundActionPage.getRecentSounds());
+ ArrayList<File> sortedSounds = new ArrayList<>(soundActionPage.getRecentSounds());
Collections.sort(sortedSounds);
for (Iterator<File> iter = sortedSounds.iterator(); iter.hasNext();) {
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpointactions/SoundActionPage.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpointactions/SoundActionPage.java
index bab3288c50c..1abe58efa37 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpointactions/SoundActionPage.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpointactions/SoundActionPage.java
@@ -56,7 +56,7 @@ public class SoundActionPage extends PlatformObject implements IBreakpointAction
private SoundActionComposite editor = null;
private String mediaPath = ""; //$NON-NLS-1$
- private ArrayList<File> recentSounds = new ArrayList<File>();
+ private ArrayList<File> recentSounds = new ArrayList<>();
private SoundAction soundAction;
@@ -156,7 +156,7 @@ public class SoundActionPage extends PlatformObject implements IBreakpointAction
return;
}
- recentSounds = new ArrayList<File>();
+ recentSounds = new ArrayList<>();
Element root = null;
DocumentBuilder parser;
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpoints/CBreakpointUIContributionFactory.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpoints/CBreakpointUIContributionFactory.java
index 0f831d1be19..bf383ebff58 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpoints/CBreakpointUIContributionFactory.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpoints/CBreakpointUIContributionFactory.java
@@ -41,7 +41,7 @@ public class CBreakpointUIContributionFactory {
protected ArrayList<ICBreakpointsUIContribution> contributions;
private CBreakpointUIContributionFactory() {
- contributions = new ArrayList<ICBreakpointsUIContribution>();
+ contributions = new ArrayList<>();
loadSubtypeContributions();
}
@@ -129,7 +129,7 @@ public class CBreakpointUIContributionFactory {
if (debugModelIds != null) {
debugModelIdsList = Arrays.asList(debugModelIds);
}
- ArrayList<ICBreakpointsUIContribution> list = new ArrayList<ICBreakpointsUIContribution>();
+ ArrayList<ICBreakpointsUIContribution> list = new ArrayList<>();
for (ICBreakpointsUIContribution con : contributions) {
try {
if (con.getDebugModelId() == null
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpoints/DefaultCBreakpointUIContribution.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpoints/DefaultCBreakpointUIContribution.java
index e708998db19..10359e566a5 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpoints/DefaultCBreakpointUIContribution.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpoints/DefaultCBreakpointUIContribution.java
@@ -40,8 +40,8 @@ class DefaultCBreakpointUIContribution implements ICBreakpointsUIContribution {
private String markerType;
private String modelId;
private String attType;
- private Map<String, String> valueLabels = new LinkedHashMap<String, String>();
- private Map<String, String> conditions = new HashMap<String, String>();
+ private Map<String, String> valueLabels = new LinkedHashMap<>();
+ private Map<String, String> conditions = new HashMap<>();
DefaultCBreakpointUIContribution(IConfigurationElement config) {
fConfig = config;
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/disassembly/rulers/RulerColumnRegistry.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/disassembly/rulers/RulerColumnRegistry.java
index d4410636ba5..a0868d93233 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/disassembly/rulers/RulerColumnRegistry.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/disassembly/rulers/RulerColumnRegistry.java
@@ -146,11 +146,11 @@ public final class RulerColumnRegistry {
*/
public void reload() {
IExtensionRegistry registry = Platform.getExtensionRegistry();
- List<IConfigurationElement> elements = new ArrayList<IConfigurationElement>(
+ List<IConfigurationElement> elements = new ArrayList<>(
Arrays.asList(registry.getConfigurationElementsFor(CDebugUIPlugin.PLUGIN_ID, EXTENSION_POINT)));
- List<RulerColumnDescriptor> descriptors = new ArrayList<RulerColumnDescriptor>();
- Map<String, RulerColumnDescriptor> descriptorMap = new HashMap<String, RulerColumnDescriptor>();
+ List<RulerColumnDescriptor> descriptors = new ArrayList<>();
+ Map<String, RulerColumnDescriptor> descriptorMap = new HashMap<>();
for (Iterator<IConfigurationElement> iter = elements.iterator(); iter.hasNext();) {
IConfigurationElement element = iter.next();
@@ -207,7 +207,7 @@ public final class RulerColumnRegistry {
descriptors.toArray(array);
sorter.sort(array);
- Map<String, RulerColumnDescriptor> descriptorsById = new HashMap<String, RulerColumnDescriptor>();
+ Map<String, RulerColumnDescriptor> descriptorsById = new HashMap<>();
for (RulerColumnDescriptor desc : array) {
descriptorsById.put(desc.getId(), desc);
}
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/editors/AbstractDebugTextHover.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/editors/AbstractDebugTextHover.java
index ac56028de79..042e3568eec 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/editors/AbstractDebugTextHover.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/editors/AbstractDebugTextHover.java
@@ -359,7 +359,7 @@ public abstract class AbstractDebugTextHover implements ICEditorTextHover, IText
private boolean insideInactiveCode(IASTTranslationUnit ast, int offset) {
int inactiveCodeStart = -1;
boolean inInactiveCode = false;
- Stack<Boolean> inactiveCodeStack = new Stack<Boolean>();
+ Stack<Boolean> inactiveCodeStack = new Stack<>();
IASTPreprocessorStatement[] preprocStmts = ast.getAllPreprocessorStatements();
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/importexecutable/ImportExecutablePageTwo.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/importexecutable/ImportExecutablePageTwo.java
index a1d6ad5b514..9c9f6d06bbf 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/importexecutable/ImportExecutablePageTwo.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/importexecutable/ImportExecutablePageTwo.java
@@ -428,7 +428,7 @@ public class ImportExecutablePageTwo extends WizardPage {
// check if executables with same names already exist in the existing project
String[] executables = wizard.getImportExecutablePage().getSelectedExecutables();
- List<String> existingNames = new ArrayList<String>();
+ List<String> existingNames = new ArrayList<>();
for (String executable : executables) {
IFile exeFile = getExecutableFile(project.getProject(), executable);
if (exeFile.exists()) {
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/sourcelookup/DefaultSourceLocator.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/sourcelookup/DefaultSourceLocator.java
index e2082d13c64..b066f1cbd9e 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/sourcelookup/DefaultSourceLocator.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/sourcelookup/DefaultSourceLocator.java
@@ -63,7 +63,7 @@ public class DefaultSourceLocator extends CSourceLookupDirector {
// If so, DefaultSpourceContainer should be used.
IProject project = csl.getProject();
List<IProject> list = CDebugUtils.getReferencedProjects(project);
- HashSet<String> names = new HashSet<String>(list.size() + 1);
+ HashSet<String> names = new HashSet<>(list.size() + 1);
names.add(project.getName());
for (IProject proj : list) {
names.add(proj.getName());
@@ -79,7 +79,7 @@ public class DefaultSourceLocator extends CSourceLookupDirector {
}
// Generate an array of new source containers including DefaultSourceContainer
- ArrayList<ICSourceLocation> locs = new ArrayList<ICSourceLocation>(locations.length);
+ ArrayList<ICSourceLocation> locs = new ArrayList<>(locations.length);
for (int i = 0; i < locations.length; ++i) {
if (!includesDefault || !(locations[i] instanceof IProjectSourceLocation
&& names.contains(((IProjectSourceLocation) locations[i]).getProject().getName()))) {
@@ -89,7 +89,7 @@ public class DefaultSourceLocator extends CSourceLookupDirector {
ISourceContainer[] containers = SourceUtils
.convertSourceLocations(locs.toArray(new ICSourceLocation[locs.size()]));
- ArrayList<ISourceContainer> cons = new ArrayList<ISourceContainer>(Arrays.asList(containers));
+ ArrayList<ISourceContainer> cons = new ArrayList<>(Arrays.asList(containers));
if (includesDefault) {
DefaultSourceContainer defaultContainer = new DefaultSourceContainer();
defaultContainer.init(this);
diff --git a/debug/org.eclipse.cdt.gdb/src/org/eclipse/cdt/gdb/internal/eventbkpts/GdbCatchpoints.java b/debug/org.eclipse.cdt.gdb/src/org/eclipse/cdt/gdb/internal/eventbkpts/GdbCatchpoints.java
index dd14732de58..491356b82ae 100644
--- a/debug/org.eclipse.cdt.gdb/src/org/eclipse/cdt/gdb/internal/eventbkpts/GdbCatchpoints.java
+++ b/debug/org.eclipse.cdt.gdb/src/org/eclipse/cdt/gdb/internal/eventbkpts/GdbCatchpoints.java
@@ -21,7 +21,7 @@ import org.eclipse.cdt.gdb.eventbkpts.IEventBreakpointConstants;
public class GdbCatchpoints {
/** Map which services {@link #eventToGdbCatchpointKeyword(String)} */
- private static final Map<String, String> sIdToKeyword = new HashMap<String, String>();
+ private static final Map<String, String> sIdToKeyword = new HashMap<>();
static {
// these Ids are also referenced in mi.ui plugin as contribution
// to event breakpoints selector

Back to the top