Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonah Graham2018-11-20 16:20:42 +0000
committerJonah Graham2018-11-22 21:55:36 +0000
commitcaf2292768deccd885b5b6989b731742e2e5edf4 (patch)
tree711a6088f2e17c7e31ebb51af1eadc1af00768e5 /dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt
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 'dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt')
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/CSourceNotFoundDescriptionFactory.java2
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/DisassemblyToggleBreakpointsTarget.java4
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/ToggleBreakpointsTargetFactory.java2
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/actions/AbstractDsfRegisterGroupActions.java8
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/AbstractImageRegistry.java4
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyColumnSupport.java4
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyImageRegistry.java2
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyPart.java24
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/model/DisassemblyDocument.java10
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/preferences/DisassemblyPreferencePage.java6
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/presentation/SourceTagDamagerRepairer.java6
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/viewmodel/DsfCastToTypeSupport.java2
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/viewmodel/actions/DsfViewMemoryHandler.java2
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/viewmodel/actions/UpdatePoliciesContribution.java2
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/viewmodel/numberformat/detail/NumberFormatDetailPane.java8
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/viewmodel/numberformat/detail/NumberFormatDetailPaneFactory.java2
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/actions/AbstractDisassemblyBreakpointsTarget.java2
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/actions/DsfCommandRunnable.java2
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/sourcelookup/DsfSourceDisplayAdapter.java6
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/sourcelookup/InstructionPointerManager.java2
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/SimpleMapPersistable.java6
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/SteppingController.java14
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/breakpoints/BreakpointVMNode.java12
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/breakpoints/BreakpointVMProvider.java8
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/breakpoints/DataCache.java4
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/expression/ExpressionManagerVMNode.java2
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/expression/ExpressionVMProvider.java2
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/expression/SingleExpressionVMNode.java2
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/launch/AbstractLaunchVMProvider.java2
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/launch/StackFramesVMNode.java2
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/modules/detail/ModuleDetailPaneFactory.java2
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/modules/detail/ModulesAbstractDetailPane.java4
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/numberformat/ElementNumberFormatsContribution.java2
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/numberformat/FormattedValueRetriever.java18
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/numberformat/FormattedValueVMUtil.java4
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/numberformat/NumberFormatsContribution.java4
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/numberformat/NumberFormatsPropertyTester.java2
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/update/DebugManualUpdatePolicy.java8
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/variable/VariableVMNode.java2
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/concurrent/SimpleDisplayExecutor.java2
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/AbstractVMAdapter.java2
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/AbstractVMProvider.java12
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/DefaultVMContentProviderStrategy.java2
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/DefaultVMModelProxyStrategy.java6
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/VMChildrenUpdate.java6
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/VMViewerUpdate.java2
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/datamodel/CompositeDMVMContext.java2
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/properties/LabelColumnInfo.java4
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/properties/PropertiesBasedLabelProvider.java2
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/properties/PropertiesUpdateStatus.java4
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/properties/VMPropertiesUpdate.java2
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/update/AbstractCachingVMProvider.java26
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/update/UserEditEvent.java2
53 files changed, 137 insertions, 137 deletions
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/CSourceNotFoundDescriptionFactory.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/CSourceNotFoundDescriptionFactory.java
index 75a4cc3cd42..c6a4a5f84ac 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/CSourceNotFoundDescriptionFactory.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/CSourceNotFoundDescriptionFactory.java
@@ -92,7 +92,7 @@ public class CSourceNotFoundDescriptionFactory implements IAdapterFactory {
private static ICSourceNotFoundDescription getFrameDescription(IStack.IFrameDMData frame) {
String formatString = ""; //$NON-NLS-1$
String[] propertyNames = null;
- HashMap<String, Object> properties = new HashMap<String, Object>();
+ HashMap<String, Object> properties = new HashMap<>();
fillFrameDataProperties(properties, frame);
Integer line = (Integer) properties.get(ILaunchVMConstants.PROP_FRAME_LINE);
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/DisassemblyToggleBreakpointsTarget.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/DisassemblyToggleBreakpointsTarget.java
index 0d54e8c153c..8c9059b74a8 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/DisassemblyToggleBreakpointsTarget.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/DisassemblyToggleBreakpointsTarget.java
@@ -42,7 +42,7 @@ public class DisassemblyToggleBreakpointsTarget extends AbstractDisassemblyBreak
protected void createLineBreakpointInteractive(IWorkbenchPart part, String sourceHandle, IResource resource,
int lineNumber) throws CoreException {
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);
@@ -60,7 +60,7 @@ public class DisassemblyToggleBreakpointsTarget extends AbstractDisassemblyBreak
protected void createAddressBreakpointInteractive(IWorkbenchPart part, IResource resource, IAddress address)
throws CoreException {
ICLineBreakpoint lineBp = CDIDebugModel.createBlankAddressBreakpoint();
- Map<String, Object> attributes = new HashMap<String, Object>();
+ Map<String, Object> attributes = new HashMap<>();
CDIDebugModel.setAddressBreakpointAttributes(attributes, null, null, getBreakpointType(), -1, address, true, 0,
""); //$NON-NLS-1$
openBreakpointPropertiesDialog(lineBp, part, resource, attributes);
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/ToggleBreakpointsTargetFactory.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/ToggleBreakpointsTargetFactory.java
index 7d8b2bfe4e4..f9f35990b08 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/ToggleBreakpointsTargetFactory.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/ToggleBreakpointsTargetFactory.java
@@ -53,7 +53,7 @@ public class ToggleBreakpointsTargetFactory implements IToggleBreakpointsTargetF
*/
public static final String TOGGLE_C_BREAKPOINT_TARGET_ID = CDebugUIPlugin.PLUGIN_ID + ".toggleCBreakpointTarget"; //$NON-NLS-1$
- private static final Set<String> TOGGLE_TARGET_IDS = new HashSet<String>(1);
+ private static final Set<String> TOGGLE_TARGET_IDS = new HashSet<>(1);
static {
TOGGLE_TARGET_IDS.add(TOGGLE_C_BREAKPOINT_TARGET_ID);
}
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/actions/AbstractDsfRegisterGroupActions.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/actions/AbstractDsfRegisterGroupActions.java
index 4eeeadfa6c0..bf0386689bc 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/actions/AbstractDsfRegisterGroupActions.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/actions/AbstractDsfRegisterGroupActions.java
@@ -769,7 +769,7 @@ public abstract class AbstractDsfRegisterGroupActions extends AbstractHandler {
private IRegisterGroupDMContext[] resolveSelectedGroups(IStructuredSelection selection) {
IRegisterGroupDMContext[] selectedGroups = null;
- List<IRegisterGroupDMContext> groupList = new ArrayList<IRegisterGroupDMContext>();
+ List<IRegisterGroupDMContext> groupList = new ArrayList<>();
if (selection != null && !selection.isEmpty()) {
for (Iterator<?> iterator = selection.iterator(); iterator.hasNext();) {
Object element = iterator.next();
@@ -791,7 +791,7 @@ public abstract class AbstractDsfRegisterGroupActions extends AbstractHandler {
@ConfinedToDsfExecutor("selectionContext.fsession.getExecutor()")
private IRegisterDMContext[] resolveSelectedRegisters(IStructuredSelection selection) {
- List<IRegisterDMContext> selectedRegistersList = new ArrayList<IRegisterDMContext>();
+ List<IRegisterDMContext> selectedRegistersList = new ArrayList<>();
for (Iterator<?> iterator = selection.iterator(); iterator.hasNext();) {
Object element = iterator.next();
IDMVMContext regContext = null;
@@ -869,11 +869,11 @@ public abstract class AbstractDsfRegisterGroupActions extends AbstractHandler {
IRegisterDMData[] registerData, IRegisterDMData[] checkedRegistersData) {
assert (registers.length == registerData.length);
- List<RegisterDescriptor> checkedDescriptorsList = new ArrayList<RegisterDescriptor>();
+ List<RegisterDescriptor> checkedDescriptorsList = new ArrayList<>();
final RegisterDescriptor[] regDescriptors = new RegisterDescriptor[registers.length];
- Map<String, RegisterDescriptor> mapNameToRegDescriptor = new HashMap<String, RegisterDescriptor>();
+ Map<String, RegisterDescriptor> mapNameToRegDescriptor = new HashMap<>();
for (int i = 0; i < registers.length; i++) {
regDescriptors[i] = new RegisterDescriptor(groupName, registers[i], registerData[i].getName());
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/AbstractImageRegistry.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/AbstractImageRegistry.java
index 186733f8d8a..8a9c4b431fd 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/AbstractImageRegistry.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/AbstractImageRegistry.java
@@ -32,8 +32,8 @@ import org.osgi.framework.Bundle;
* Abstract image registry that allows for defining fallback paths for images.
*/
public abstract class AbstractImageRegistry {
- private HashMap<String, String> fPlugins = new HashMap<String, String>();
- private HashMap<String, String[]> fLocations = new HashMap<String, String[]>();
+ private HashMap<String, String> fPlugins = new HashMap<>();
+ private HashMap<String, String[]> fLocations = new HashMap<>();
private URL fBaseUrl;
private final ImageRegistry fRegistry;
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyColumnSupport.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyColumnSupport.java
index 1de8ce769f5..ebe9233d677 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyColumnSupport.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyColumnSupport.java
@@ -51,7 +51,7 @@ class DisassemblyColumnSupport implements IColumnSupport {
Assert.isLegal(registry != null);
fDisassembly = disassembly;
fRegistry = registry;
- fColumns = new ArrayList<IContributedRulerColumn>();
+ fColumns = new ArrayList<>();
}
/*
@@ -202,7 +202,7 @@ class DisassemblyColumnSupport implements IColumnSupport {
*/
@Override
public void dispose() {
- for (Iterator<IContributedRulerColumn> iter = new ArrayList<IContributedRulerColumn>(fColumns).iterator(); iter
+ for (Iterator<IContributedRulerColumn> iter = new ArrayList<>(fColumns).iterator(); iter
.hasNext();)
removeColumn(getRuler(), iter.next());
fColumns.clear();
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyImageRegistry.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyImageRegistry.java
index 04bd4c92cbb..9489b91245e 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyImageRegistry.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyImageRegistry.java
@@ -26,7 +26,7 @@ import org.eclipse.jface.resource.ImageDescriptor;
* DisassemblyImageRegistry
*/
public class DisassemblyImageRegistry extends AbstractImageRegistry {
- private static List<Object[]> fStore = new ArrayList<Object[]>();
+ private static List<Object[]> fStore = new ArrayList<>();
private static String add(String plugin, String[] dirs, String name) {
String key = plugin + '/' + dirs[0] + '/' + name;
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyPart.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyPart.java
index 2d112f14d3d..f855d49a4a4 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyPart.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyPart.java
@@ -290,19 +290,19 @@ public abstract class DisassemblyPart extends WorkbenchPart
private DisassemblyIPAnnotation fPCAnnotation;
private DisassemblyIPAnnotation fSecondaryPCAnnotation;
private boolean fPCAnnotationUpdatePending;
- private ArrayList<BigInteger> fPendingPCUpdates = new ArrayList<BigInteger>(5);
+ private ArrayList<BigInteger> fPendingPCUpdates = new ArrayList<>(5);
private Position fScrollPos;
private int fScrollLine;
private Position fFocusPos;
private BigInteger fFrameAddress = PC_UNKNOWN;
- protected Map<String, Action> fGlobalActions = new HashMap<String, Action>();
- private List<Action> fSelectionActions = new ArrayList<Action>();
- private List<AbstractDisassemblyAction> fStateDependentActions = new ArrayList<AbstractDisassemblyAction>();
+ protected Map<String, Action> fGlobalActions = new HashMap<>();
+ private List<Action> fSelectionActions = new ArrayList<>();
+ private List<AbstractDisassemblyAction> fStateDependentActions = new ArrayList<>();
private boolean fShowSource;
private boolean fShowSymbols;
- private Map<String, Object> fFile2Storage = new HashMap<String, Object>();
+ private Map<String, Object> fFile2Storage = new HashMap<>();
private boolean fShowDisassembly = true;
- private LinkedList<AddressRangePosition> fPCHistory = new LinkedList<AddressRangePosition>();
+ private LinkedList<AddressRangePosition> fPCHistory = new LinkedList<>();
private int fPCHistorySizeMax = 4;
private boolean fGotoFramePending;
@@ -316,7 +316,7 @@ public abstract class DisassemblyPart extends WorkbenchPart
private String fPCAnnotationColorKey;
- private ArrayList<Runnable> fRunnableQueue = new ArrayList<Runnable>();
+ private ArrayList<Runnable> fRunnableQueue = new ArrayList<>();
protected IPartListener2 fPartListener = new IPartListener2() {
@Override
@@ -1397,7 +1397,7 @@ public abstract class DisassemblyPart extends WorkbenchPart
*/
private void registerWithHandlerService(IAction action) {
if (fHandlerActivations == null) {
- fHandlerActivations = new ArrayList<IHandlerActivation>(5);
+ fHandlerActivations = new ArrayList<>(5);
}
IHandlerService handlerService = getSite().getService(IHandlerService.class);
fHandlerActivations
@@ -1839,7 +1839,7 @@ public abstract class DisassemblyPart extends WorkbenchPart
fAddressSize = addressSize;
if (addressSize < oldAddressSize) {
fDocument.deleteDisassemblyRange(fEndAddress, oldEndAddress, true, true);
- List<AddressRangePosition> toRemove = new ArrayList<AddressRangePosition>();
+ List<AddressRangePosition> toRemove = new ArrayList<>();
for (AddressRangePosition position : fDocument.getInvalidAddressRanges()) {
if (position.fAddressOffset.compareTo(fEndAddress) >= 0) {
try {
@@ -2248,7 +2248,7 @@ public abstract class DisassemblyPart extends WorkbenchPart
int offset = lineRegion.getOffset();
int length = lineRegion.getLength();
Iterator<Annotation> it = bpModel.getAnnotationIterator(offset, length, true, true);
- List<IBreakpoint> bpList = new ArrayList<IBreakpoint>(5);
+ List<IBreakpoint> bpList = new ArrayList<>(5);
final IBreakpointManager bpMgr = DebugPlugin.getDefault().getBreakpointManager();
while (it.hasNext()) {
final SimpleMarkerAnnotation annotation = (SimpleMarkerAnnotation) it.next();
@@ -2673,7 +2673,7 @@ public abstract class DisassemblyPart extends WorkbenchPart
fUpdatePending = true;
lockScroller();
try {
- ArrayList<Runnable> copy = new ArrayList<Runnable>(fRunnableQueue);
+ ArrayList<Runnable> copy = new ArrayList<>(fRunnableQueue);
fRunnableQueue.clear();
for (Iterator<Runnable> iter = copy.iterator(); iter.hasNext();) {
if (updateCount != fUpdateCount) {
@@ -2923,7 +2923,7 @@ public abstract class DisassemblyPart extends WorkbenchPart
} catch (BadLocationException e) {
return;
}
- ArrayList<StyleRange> styleRanges = new ArrayList<StyleRange>();
+ ArrayList<StyleRange> styleRanges = new ArrayList<>();
while (it.hasNext()) {
AddressRangePosition pos = (AddressRangePosition) it.next();
if (pos.offset >= endOffset) {
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/model/DisassemblyDocument.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/model/DisassemblyDocument.java
index ce851ee11c9..08bd832e0ab 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/model/DisassemblyDocument.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/model/DisassemblyDocument.java
@@ -61,16 +61,16 @@ public class DisassemblyDocument extends REDDocument implements IDisassemblyDocu
* Use the add/remove methods. Note that we're not the only ones that
* manipulate the list. This list should be accessed only from the GUI thread
*/
- private final List<AddressRangePosition> fInvalidAddressRanges = new ArrayList<AddressRangePosition>();
+ private final List<AddressRangePosition> fInvalidAddressRanges = new ArrayList<>();
/**
* For ease of troubleshooting, don't add or remove from this list directly.
* Use the add/remove methods. Note that we're not the only ones that
* manipulate the list. This list should be accessed only from the GUI thread
*/
- private final List<SourcePosition> fInvalidSource = new ArrayList<SourcePosition>();
+ private final List<SourcePosition> fInvalidSource = new ArrayList<>();
- private final Map<IStorage, SourceFileInfo> fFileInfoMap = new HashMap<IStorage, SourceFileInfo>();
+ private final Map<IStorage, SourceFileInfo> fFileInfoMap = new HashMap<>();
private int fMaxFunctionLength = 0;
private BigInteger fMaxOpcodeLength = null;
@@ -1326,7 +1326,7 @@ public class DisassemblyDocument extends REDDocument implements IDisassemblyDocu
String replacement = invalidate ? "...\n" : null; //$NON-NLS-1$
int replaceLen = replacement != null ? replacement.length() : 0;
AddressRangePosition lastPos = null;
- ArrayList<AddressRangePosition> toRemove = new ArrayList<AddressRangePosition>();
+ ArrayList<AddressRangePosition> toRemove = new ArrayList<>();
Iterator<Position> it = getModelPositionIterator(startAddress);
while (it.hasNext()) {
AddressRangePosition pos = (AddressRangePosition) it.next();
@@ -1471,7 +1471,7 @@ public class DisassemblyDocument extends REDDocument implements IDisassemblyDocu
}
BigInteger startAddress = BigInteger.ZERO;
BigInteger addressLength = BigInteger.ZERO;
- ArrayList<AddressRangePosition> toRemove = new ArrayList<AddressRangePosition>();
+ ArrayList<AddressRangePosition> toRemove = new ArrayList<>();
try {
Iterator<Position> it = getPositionIterator(DisassemblyDocument.CATEGORY_MODEL, startAddress);
while (it.hasNext()) {
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/preferences/DisassemblyPreferencePage.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/preferences/DisassemblyPreferencePage.java
index 6d1e33c689c..f8e509309be 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/preferences/DisassemblyPreferencePage.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/preferences/DisassemblyPreferencePage.java
@@ -43,9 +43,9 @@ import org.eclipse.ui.PlatformUI;
*/
public class DisassemblyPreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
- private List<Button> fCheckBoxes = new ArrayList<Button>();
- private List<Combo> fComboBoxes = new ArrayList<Combo>();
- private ArrayList<Text> fNumberFields = new ArrayList<Text>();
+ private List<Button> fCheckBoxes = new ArrayList<>();
+ private List<Combo> fComboBoxes = new ArrayList<>();
+ private ArrayList<Text> fNumberFields = new ArrayList<>();
private ModifyListener fNumberFieldListener = new ModifyListener() {
@Override
public void modifyText(ModifyEvent e) {
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/presentation/SourceTagDamagerRepairer.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/presentation/SourceTagDamagerRepairer.java
index 03b7116b9d6..d4a154fa0fc 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/presentation/SourceTagDamagerRepairer.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/presentation/SourceTagDamagerRepairer.java
@@ -45,11 +45,11 @@ import org.eclipse.swt.graphics.RGB;
public class SourceTagDamagerRepairer extends DefaultDamagerRepairer implements ISourceTagListener {
private ISourceTagProvider fSourceTagProvider;
- private Map<String, ITokenScanner> fScannerMap = new HashMap<String, ITokenScanner>();
- private List<ISourceTag> fSourceTags = new ArrayList<ISourceTag>();
+ private Map<String, ITokenScanner> fScannerMap = new HashMap<>();
+ private List<ISourceTag> fSourceTags = new ArrayList<>();
private IColorManager fColorManager;
private IPreferenceStore fPreferenceStore;
- private Map<String, TextAttribute> fAttributeMap = new HashMap<String, TextAttribute>();
+ private Map<String, TextAttribute> fAttributeMap = new HashMap<>();
private final static String[] KEYS = { SemanticHighlightings.CLASS, SemanticHighlightings.METHOD_DECLARATION,
SemanticHighlightings.FUNCTION_DECLARATION, SemanticHighlightings.FIELD,
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/viewmodel/DsfCastToTypeSupport.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/viewmodel/DsfCastToTypeSupport.java
index cd902c16d78..301da2ddb9e 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/viewmodel/DsfCastToTypeSupport.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/viewmodel/DsfCastToTypeSupport.java
@@ -56,7 +56,7 @@ public class DsfCastToTypeSupport {
private final SyncVariableDataAccess fSyncVariableDataAccess;
/** expression memento to casting context (TODO: persist these; bug 228301)*/
- private Map<String, CastInfo> fCastedExpressionStorage = new HashMap<String, CastInfo>();
+ private Map<String, CastInfo> fCastedExpressionStorage = new HashMap<>();
public class CastImplementation extends PlatformObject implements ICastToArray {
private final IExpressionDMContext exprDMC;
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/viewmodel/actions/DsfViewMemoryHandler.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/viewmodel/actions/DsfViewMemoryHandler.java
index 30f5a81eb8c..538ed1f41ea 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/viewmodel/actions/DsfViewMemoryHandler.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/viewmodel/actions/DsfViewMemoryHandler.java
@@ -101,7 +101,7 @@ public class DsfViewMemoryHandler extends AbstractHandler {
}
private VariableExpressionVMC[] getMemoryViewables(Object evaluationContext) {
- List<VariableExpressionVMC> viewableMemoryItems = new ArrayList<VariableExpressionVMC>();
+ List<VariableExpressionVMC> viewableMemoryItems = new ArrayList<>();
if (evaluationContext instanceof IEvaluationContext) {
Object s = ((IEvaluationContext) evaluationContext).getVariable(ISources.ACTIVE_MENU_SELECTION_NAME);
if (s instanceof IStructuredSelection) {
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/viewmodel/actions/UpdatePoliciesContribution.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/viewmodel/actions/UpdatePoliciesContribution.java
index 6aef69cc9c7..cc984887a12 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/viewmodel/actions/UpdatePoliciesContribution.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/viewmodel/actions/UpdatePoliciesContribution.java
@@ -87,7 +87,7 @@ public class UpdatePoliciesContribution extends CompoundContributionItem impleme
IVMUpdatePolicy[] policies = cachingProvider.getAvailableUpdatePolicies();
IVMUpdatePolicy activePolicy = cachingProvider.getActiveUpdatePolicy();
- List<Action> actions = new ArrayList<Action>(policies.length);
+ List<Action> actions = new ArrayList<>(policies.length);
for (IVMUpdatePolicy policy : policies) {
Action action = new SelectUpdatePolicyAction(cachingProvider, policy);
if (policy.getID().equals(activePolicy.getID())) {
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/viewmodel/numberformat/detail/NumberFormatDetailPane.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/viewmodel/numberformat/detail/NumberFormatDetailPane.java
index 7cb4cec91c2..9f51bf47198 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/viewmodel/numberformat/detail/NumberFormatDetailPane.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/viewmodel/numberformat/detail/NumberFormatDetailPane.java
@@ -111,12 +111,12 @@ public class NumberFormatDetailPane implements IDetailPane2, IAdaptable, IProper
* Map of actions. Keys are strings, values
* are <code>IAction</code>.
*/
- private Map<String, IAction> fActionMap = new HashMap<String, IAction>();
+ private Map<String, IAction> fActionMap = new HashMap<>();
/**
* Collection to track actions that should be updated when selection occurs.
*/
- private List<String> fSelectionActions = new ArrayList<String>();
+ private List<String> fSelectionActions = new ArrayList<>();
/* (non-Javadoc)
* @see org.eclipse.debug.ui.IDetailPane#init(org.eclipse.ui.IWorkbenchPartSite)
@@ -310,7 +310,7 @@ public class NumberFormatDetailPane implements IDetailPane2, IAdaptable, IProper
display = PlatformUI.getWorkbench().getDisplay();
}
final Executor executor = SimpleDisplayExecutor.getSimpleDisplayExecutor(display);
- Set<String> properties = new HashSet<String>(1);
+ Set<String> properties = new HashSet<>(1);
properties.add(IDebugVMConstants.PROP_FORMATTED_VALUE_AVAILABLE_FORMATS);
propertiesProvider
.update(new IPropertiesUpdate[] { new VMPropertiesUpdate(properties, path, fViewerInput,
@@ -322,7 +322,7 @@ public class NumberFormatDetailPane implements IDetailPane2, IAdaptable, IProper
if (fMonitor.isCanceled())
return;
- Set<String> properties = new HashSet<String>(1);
+ Set<String> properties = new HashSet<>(1);
properties.add(IElementPropertiesProvider.PROP_NAME);
final String[] formats = (String[]) getData()
.get(IDebugVMConstants.PROP_FORMATTED_VALUE_AVAILABLE_FORMATS);
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/viewmodel/numberformat/detail/NumberFormatDetailPaneFactory.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/viewmodel/numberformat/detail/NumberFormatDetailPaneFactory.java
index 98160946ba0..f58a2f4c88d 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/viewmodel/numberformat/detail/NumberFormatDetailPaneFactory.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/viewmodel/numberformat/detail/NumberFormatDetailPaneFactory.java
@@ -41,7 +41,7 @@ public class NumberFormatDetailPaneFactory implements IDetailPaneFactory {
@SuppressWarnings("rawtypes")
@Override
public Set getDetailPaneTypes(IStructuredSelection selection) {
- Set<String> possibleIDs = new HashSet<String>(1);
+ Set<String> possibleIDs = new HashSet<>(1);
possibleIDs.add(NumberFormatDetailPane.ID);
return possibleIDs;
}
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/actions/AbstractDisassemblyBreakpointsTarget.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/actions/AbstractDisassemblyBreakpointsTarget.java
index 24b770cd773..6e8926e5991 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/actions/AbstractDisassemblyBreakpointsTarget.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/actions/AbstractDisassemblyBreakpointsTarget.java
@@ -286,7 +286,7 @@ public abstract class AbstractDisassemblyBreakpointsTarget
}
private IBreakpoint[] getBreakpointsAtLine(IDisassemblyPart part, int line) {
- List<IBreakpoint> breakpoints = new ArrayList<IBreakpoint>();
+ List<IBreakpoint> breakpoints = new ArrayList<>();
IAnnotationModel annotationModel = part.getTextViewer().getAnnotationModel();
IDocument document = part.getTextViewer().getDocument();
if (annotationModel != null) {
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/actions/DsfCommandRunnable.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/actions/DsfCommandRunnable.java
index 1f8b6689585..d22cc4138f7 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/actions/DsfCommandRunnable.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/actions/DsfCommandRunnable.java
@@ -86,7 +86,7 @@ public abstract class DsfCommandRunnable extends DsfRunnable {
// Extract all selected execution contexts, using a set to avoid duplicates. Duplicates will
// happen if multiple stack frames of the same thread are selected.
- Set<IExecutionDMContext> execDmcSet = new HashSet<IExecutionDMContext>(request.getElements().length);
+ Set<IExecutionDMContext> execDmcSet = new HashSet<>(request.getElements().length);
for (Object element : request.getElements()) {
if (element instanceof IDMVMContext) {
IDMVMContext vmc = (IDMVMContext) element;
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/sourcelookup/DsfSourceDisplayAdapter.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/sourcelookup/DsfSourceDisplayAdapter.java
index b6b52421ac4..8fa41bd7832 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/sourcelookup/DsfSourceDisplayAdapter.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/sourcelookup/DsfSourceDisplayAdapter.java
@@ -671,7 +671,7 @@ public class DsfSourceDisplayAdapter implements ISourceDisplay, ISteppingControl
private DisplayJob fRunningDisplayJob;
private DisplayJob fPendingDisplayJob;
private ClearingJob fRunningClearingJob;
- private Set<IRunControl.IExecutionDMContext> fPendingExecDmcsToClear = new HashSet<IRunControl.IExecutionDMContext>();
+ private Set<IRunControl.IExecutionDMContext> fPendingExecDmcsToClear = new HashSet<>();
private SteppingController fController;
/**
@@ -932,7 +932,7 @@ public class DsfSourceDisplayAdapter implements ISourceDisplay, ISteppingControl
// There are annotations to be cleared, run the job first
fRunningClearingJob = new ClearingJob(fPendingExecDmcsToClear);
fRunningClearingJob.schedule();
- fPendingExecDmcsToClear = new HashSet<IRunControl.IExecutionDMContext>();
+ fPendingExecDmcsToClear = new HashSet<>();
} else if (fPendingDisplayJob != null) {
fRunningDisplayJob = fPendingDisplayJob;
fRunningDisplayJob.schedule();
@@ -966,7 +966,7 @@ public class DsfSourceDisplayAdapter implements ISourceDisplay, ISteppingControl
if (fRunningClearingJob == null && fRunningDisplayJob == null) {
fRunningClearingJob = new ClearingJob(fPendingExecDmcsToClear);
fRunningClearingJob.schedule();
- fPendingExecDmcsToClear = new HashSet<IRunControl.IExecutionDMContext>();
+ fPendingExecDmcsToClear = new HashSet<>();
}
}
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/sourcelookup/InstructionPointerManager.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/sourcelookup/InstructionPointerManager.java
index 266584742ec..9150031487b 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/sourcelookup/InstructionPointerManager.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/sourcelookup/InstructionPointerManager.java
@@ -209,7 +209,7 @@ class InstructionPointerManager {
*/
public InstructionPointerManager(IInstructionPointerPresentation presentation) {
fPresentation = presentation;
- fAnnotationWrappers = new LinkedList<AnnotationWrapper>();
+ fAnnotationWrappers = new LinkedList<>();
}
/**
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/SimpleMapPersistable.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/SimpleMapPersistable.java
index 4e7258b1f04..2b10e2bdcaf 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/SimpleMapPersistable.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/SimpleMapPersistable.java
@@ -39,7 +39,7 @@ public class SimpleMapPersistable<V> implements IPersistableElement, IAdaptable
private static final String KEY_VALUE = "value"; //$NON-NLS-1$
private Class<V> fType;
- private Map<String, V> fValues = new TreeMap<String, V>();
+ private Map<String, V> fValues = new TreeMap<>();
@SuppressWarnings("unchecked")
public SimpleMapPersistable(IMemento memento) throws CoreException {
@@ -57,7 +57,7 @@ public class SimpleMapPersistable<V> implements IPersistableElement, IAdaptable
}
IMemento[] list = memento.getChildren(KEY_NAME);
- Map<String, V> values = new TreeMap<String, V>();
+ Map<String, V> values = new TreeMap<>();
for (IMemento elem : list) {
values.put(elem.getID(), getValue(elem));
}
@@ -79,7 +79,7 @@ public class SimpleMapPersistable<V> implements IPersistableElement, IAdaptable
public void saveState(IMemento memento) {
Map<String, V> values = null;
synchronized (fValues) {
- values = new TreeMap<String, V>(fValues);
+ values = new TreeMap<>(fValues);
}
IMemento type = memento.createChild(KEY_TYPE);
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/SteppingController.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/SteppingController.java
index a559961ddac..e3c3881840a 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/SteppingController.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/SteppingController.java
@@ -153,14 +153,14 @@ public final class SteppingController {
private IRunControl fRunControl;
private int fQueueDepth = STEP_QUEUE_DEPTH;
- private final Map<IExecutionDMContext, List<StepRequest>> fStepQueues = new HashMap<IExecutionDMContext, List<StepRequest>>();
- private final Map<IExecutionDMContext, Boolean> fTimedOutFlags = new HashMap<IExecutionDMContext, Boolean>();
- private final Map<IExecutionDMContext, ScheduledFuture<?>> fTimedOutFutures = new HashMap<IExecutionDMContext, ScheduledFuture<?>>();
+ private final Map<IExecutionDMContext, List<StepRequest>> fStepQueues = new HashMap<>();
+ private final Map<IExecutionDMContext, Boolean> fTimedOutFlags = new HashMap<>();
+ private final Map<IExecutionDMContext, ScheduledFuture<?>> fTimedOutFutures = new HashMap<>();
/**
* Records the time of the last step for an execution context.
*/
- private final Map<IExecutionDMContext, Long> fLastStepTimes = new HashMap<IExecutionDMContext, Long>();
+ private final Map<IExecutionDMContext, Long> fLastStepTimes = new HashMap<>();
/**
* Minimum step interval in milliseconds.
@@ -175,7 +175,7 @@ public final class SteppingController {
/**
* Map of execution contexts for which a step is in progress.
*/
- private final Map<IExecutionDMContext, List<ISteppingControlParticipant>> fStepInProgress = new HashMap<IExecutionDMContext, List<ISteppingControlParticipant>>();
+ private final Map<IExecutionDMContext, List<ISteppingControlParticipant>> fStepInProgress = new HashMap<>();
/**
* List of registered stepping control participants.
@@ -486,7 +486,7 @@ public final class SteppingController {
private void doEnqueueStep(final IExecutionDMContext execCtx, final StepType stepType) {
List<StepRequest> stepQueue = fStepQueues.get(execCtx);
if (stepQueue == null) {
- stepQueue = new LinkedList<StepRequest>();
+ stepQueue = new LinkedList<>();
fStepQueues.put(execCtx, stepQueue);
}
if (stepQueue.size() < fQueueDepth) {
@@ -571,7 +571,7 @@ public final class SteppingController {
*/
private void disableStepping(IExecutionDMContext execCtx) {
if (!fParticipants.isEmpty()) {
- fStepInProgress.put(execCtx, new ArrayList<ISteppingControlParticipant>(fParticipants));
+ fStepInProgress.put(execCtx, new ArrayList<>(fParticipants));
}
}
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/breakpoints/BreakpointVMNode.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/breakpoints/BreakpointVMNode.java
index a68f06667d5..b6e9bae3b7f 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/breakpoints/BreakpointVMNode.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/breakpoints/BreakpointVMNode.java
@@ -55,7 +55,7 @@ public class BreakpointVMNode extends AbstractBreakpointVMNode
@Override
public void update(ILabelUpdate[] updates) {
- Map<IElementLabelProvider, List<ILabelUpdate>> delegatesMap = new HashMap<IElementLabelProvider, List<ILabelUpdate>>(
+ Map<IElementLabelProvider, List<ILabelUpdate>> delegatesMap = new HashMap<>(
1, 1);
for (final ILabelUpdate update : updates) {
@@ -68,7 +68,7 @@ public class BreakpointVMNode extends AbstractBreakpointVMNode
List<ILabelUpdate> delegatesList = delegatesMap.get(provider);
if (delegatesList == null) {
- delegatesList = new ArrayList<ILabelUpdate>(updates.length);
+ delegatesList = new ArrayList<>(updates.length);
delegatesMap.put(provider, delegatesList);
}
delegatesList.add(new ICheckUpdate() {
@@ -164,7 +164,7 @@ public class BreakpointVMNode extends AbstractBreakpointVMNode
@Override
public void encodeElements(IElementMementoRequest[] updates) {
- Map<IElementMementoProvider, List<IElementMementoRequest>> delegatesMap = new HashMap<IElementMementoProvider, List<IElementMementoRequest>>(
+ Map<IElementMementoProvider, List<IElementMementoRequest>> delegatesMap = new HashMap<>(
1, 1);
for (final IElementMementoRequest update : updates) {
@@ -177,7 +177,7 @@ public class BreakpointVMNode extends AbstractBreakpointVMNode
List<IElementMementoRequest> delegatesList = delegatesMap.get(provider);
if (delegatesList == null) {
- delegatesList = new ArrayList<IElementMementoRequest>(updates.length);
+ delegatesList = new ArrayList<>(updates.length);
delegatesMap.put(provider, delegatesList);
}
delegatesList.add(new IElementMementoRequest() {
@@ -241,7 +241,7 @@ public class BreakpointVMNode extends AbstractBreakpointVMNode
@Override
public void compareElements(IElementCompareRequest[] updates) {
- Map<IElementMementoProvider, List<IElementCompareRequest>> delegatesMap = new HashMap<IElementMementoProvider, List<IElementCompareRequest>>(
+ Map<IElementMementoProvider, List<IElementCompareRequest>> delegatesMap = new HashMap<>(
1, 1);
for (final IElementCompareRequest update : updates) {
@@ -254,7 +254,7 @@ public class BreakpointVMNode extends AbstractBreakpointVMNode
List<IElementCompareRequest> delegatesList = delegatesMap.get(provider);
if (delegatesList == null) {
- delegatesList = new ArrayList<IElementCompareRequest>(updates.length);
+ delegatesList = new ArrayList<>(updates.length);
delegatesMap.put(provider, delegatesList);
}
delegatesList.add(new IElementCompareRequest() {
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/breakpoints/BreakpointVMProvider.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/breakpoints/BreakpointVMProvider.java
index eca21d6b625..c9cd14274d2 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/breakpoints/BreakpointVMProvider.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/breakpoints/BreakpointVMProvider.java
@@ -115,7 +115,7 @@ public class BreakpointVMProvider extends AbstractVMProvider {
@SuppressWarnings({ "cast", "unchecked" })
@Override
protected void handleSuccess() {
- Map<IAdaptable, List<IBreakpoint>> bpsLists = new HashMap<IAdaptable, List<IBreakpoint>>();
+ Map<IAdaptable, List<IBreakpoint>> bpsLists = new HashMap<>();
for (IBreakpoint bp : getData()) {
IAdaptable[] bpCategories = fOrganizerVMNode.getOrganizer().getCategories(bp);
if (bpCategories == null || bpCategories.length == 0) {
@@ -125,7 +125,7 @@ public class BreakpointVMProvider extends AbstractVMProvider {
for (IAdaptable category : bpCategories) {
List<IBreakpoint> categoryBPs = bpsLists.get(category);
if (categoryBPs == null) {
- categoryBPs = new ArrayList<IBreakpoint>();
+ categoryBPs = new ArrayList<>();
bpsLists.put(category, categoryBPs);
}
categoryBPs.add(bp);
@@ -144,7 +144,7 @@ public class BreakpointVMProvider extends AbstractVMProvider {
}
}
- List<BreakpointOrganizerVMContext> vmcs = new ArrayList<BreakpointOrganizerVMContext>(
+ List<BreakpointOrganizerVMContext> vmcs = new ArrayList<>(
bpsLists.size());
for (Map.Entry<IAdaptable, List<IBreakpoint>> entry : bpsLists.entrySet()) {
List<IBreakpoint> bpsList = entry.getValue();
@@ -165,7 +165,7 @@ public class BreakpointVMProvider extends AbstractVMProvider {
}
};
- private final Map<TreePath, ContainerBreakpointsCache> fContainerBreakpointsCacheMap = new HashMap<TreePath, ContainerBreakpointsCache>();
+ private final Map<TreePath, ContainerBreakpointsCache> fContainerBreakpointsCacheMap = new HashMap<>();
private DataCache<IBreakpoint[]> fFilteredBreakpointsCache = new DataCache<IBreakpoint[]>(getExecutor()) {
@Override
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/breakpoints/DataCache.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/breakpoints/DataCache.java
index 9bee9d8381a..aa199baa743 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/breakpoints/DataCache.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/breakpoints/DataCache.java
@@ -52,7 +52,7 @@ abstract class DataCache<V> {
private V fData;
private IStatus fStatus;
- private List<DataRequestMonitor<V>> fWaitingList = new LinkedList<DataRequestMonitor<V>>();
+ private List<DataRequestMonitor<V>> fWaitingList = new LinkedList<>();
public DataCache(Executor executor) {
fExecutor = executor;
@@ -133,7 +133,7 @@ abstract class DataCache<V> {
fData = data;
fStatus = status;
List<DataRequestMonitor<V>> waitingList = fWaitingList;
- fWaitingList = new LinkedList<DataRequestMonitor<V>>();
+ fWaitingList = new LinkedList<>();
for (DataRequestMonitor<V> rm : waitingList) {
rm.setData(data);
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/expression/ExpressionManagerVMNode.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/expression/ExpressionManagerVMNode.java
index 750cca28713..e156634b461 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/expression/ExpressionManagerVMNode.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/expression/ExpressionManagerVMNode.java
@@ -334,7 +334,7 @@ public class ExpressionManagerVMNode extends AbstractVMNode implements IElementL
}
private TreePath getTreePathFromDelta(IModelDelta delta) {
- List<Object> elementList = new LinkedList<Object>();
+ List<Object> elementList = new LinkedList<>();
IModelDelta listDelta = delta;
elementList.add(0, listDelta.getElement());
while (listDelta.getParentDelta() != null) {
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/expression/ExpressionVMProvider.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/expression/ExpressionVMProvider.java
index 3ce6f9265e1..39d61c5aa75 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/expression/ExpressionVMProvider.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/expression/ExpressionVMProvider.java
@@ -386,7 +386,7 @@ public class ExpressionVMProvider extends AbstractElementVMProvider implements I
}
private void expressionsListChanged(ExpressionsChangedEvent.Type type, IExpression[] expressions, int index) {
- Set<Object> rootElements = new HashSet<Object>();
+ Set<Object> rootElements = new HashSet<>();
for (IVMModelProxy proxy : getActiveModelProxies()) {
rootElements.add(proxy.getRootElement());
}
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/expression/SingleExpressionVMNode.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/expression/SingleExpressionVMNode.java
index dfef8f40583..0af115c765f 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/expression/SingleExpressionVMNode.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/expression/SingleExpressionVMNode.java
@@ -310,7 +310,7 @@ public class SingleExpressionVMNode extends AbstractVMNode implements IElementLa
}
private TreePath getTreePathFromDelta(IModelDelta delta) {
- List<Object> elementList = new LinkedList<Object>();
+ List<Object> elementList = new LinkedList<>();
IModelDelta listDelta = delta;
elementList.add(0, listDelta.getElement());
while (listDelta.getParentDelta() != null) {
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/launch/AbstractLaunchVMProvider.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/launch/AbstractLaunchVMProvider.java
index 215496a40f5..2e327446f0c 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/launch/AbstractLaunchVMProvider.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/launch/AbstractLaunchVMProvider.java
@@ -68,7 +68,7 @@ public class AbstractLaunchVMProvider extends AbstractDMVMProvider
*/
private static final int FRAME_UPDATE_DELAY = 200;
- private final Map<IExecutionDMContext, ScheduledFuture<?>> fRefreshStackFramesFutures = new HashMap<IExecutionDMContext, ScheduledFuture<?>>();
+ private final Map<IExecutionDMContext, ScheduledFuture<?>> fRefreshStackFramesFutures = new HashMap<>();
private IPropertyChangeListener fPreferencesListener;
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/launch/StackFramesVMNode.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/launch/StackFramesVMNode.java
index 819f36ee75a..096c68ce6a9 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/launch/StackFramesVMNode.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/launch/StackFramesVMNode.java
@@ -118,7 +118,7 @@ public class StackFramesVMNode extends AbstractDMVMNode
/**
* Temporary stack frame limit to allow incremental stack updates.
*/
- private Map<IExecutionDMContext, Integer> fTemporaryLimits = new HashMap<IExecutionDMContext, Integer>();
+ private Map<IExecutionDMContext, Integer> fTemporaryLimits = new HashMap<>();
/**
* The label provider delegate. This VM node will delegate label updates to this provider
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/modules/detail/ModuleDetailPaneFactory.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/modules/detail/ModuleDetailPaneFactory.java
index 7e119eb80a3..2330e493ffd 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/modules/detail/ModuleDetailPaneFactory.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/modules/detail/ModuleDetailPaneFactory.java
@@ -51,7 +51,7 @@ public class ModuleDetailPaneFactory implements IDetailPaneFactory {
@Override
public Set getDetailPaneTypes(IStructuredSelection selection) {
- Set<String> possibleIDs = new HashSet<String>(1);
+ Set<String> possibleIDs = new HashSet<>(1);
possibleIDs.add(ModuleDetailPane.ID);
return possibleIDs;
}
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/modules/detail/ModulesAbstractDetailPane.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/modules/detail/ModulesAbstractDetailPane.java
index 79ac995dad9..85b6d299f04 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/modules/detail/ModulesAbstractDetailPane.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/modules/detail/ModulesAbstractDetailPane.java
@@ -41,12 +41,12 @@ public abstract class ModulesAbstractDetailPane implements IDetailPane {
* Map of actions. Keys are strings, values
* are <code>IAction</code>.
*/
- private Map<String, IAction> fActionMap = new HashMap<String, IAction>();
+ private Map<String, IAction> fActionMap = new HashMap<>();
/**
* Collection to track actions that should be updated when selection occurs.
*/
- private List<String> fSelectionActions = new ArrayList<String>();
+ private List<String> fSelectionActions = new ArrayList<>();
/* (non-Javadoc)
* @see org.eclipse.debug.ui.IDetailPane#init(org.eclipse.ui.IWorkbenchPartSite)
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/numberformat/ElementNumberFormatsContribution.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/numberformat/ElementNumberFormatsContribution.java
index 42a81e2ec53..a4d33d69f9b 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/numberformat/ElementNumberFormatsContribution.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/numberformat/ElementNumberFormatsContribution.java
@@ -118,7 +118,7 @@ public class ElementNumberFormatsContribution extends NumberFormatsContribution
}
IVMNode[] nodes = new IVMNode[elementPaths.length];
- final List<SelectFormatAction> actions = new ArrayList<SelectFormatAction>(availableFormats.size());
+ final List<SelectFormatAction> actions = new ArrayList<>(availableFormats.size());
for (String formatId : availableFormats) {
actions.add(new SelectFormatAction((IElementFormatProvider) provider, context, nodes, viewerInput,
elementPaths, formatId));
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/numberformat/FormattedValueRetriever.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/numberformat/FormattedValueRetriever.java
index 7e65f654caa..d146a85daf5 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/numberformat/FormattedValueRetriever.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/numberformat/FormattedValueRetriever.java
@@ -242,12 +242,12 @@ public class FormattedValueRetriever {
}
if (active != null) {
if (cachedMap == null) {
- cachedMap = new HashMap<IPropertiesUpdate, String>(updates.length * 4 / 3);
+ cachedMap = new HashMap<>(updates.length * 4 / 3);
}
cachedMap.put(update, active);
} else {
if (outstanding == null) {
- outstanding = new HashSet<IPropertiesUpdate>(updates.length * 4 / 3);
+ outstanding = new HashSet<>(updates.length * 4 / 3);
}
outstanding.add(update);
}
@@ -258,7 +258,7 @@ public class FormattedValueRetriever {
return;
}
if (cachedMap == null) {
- cachedMap = new HashMap<IPropertiesUpdate, String>(updates.length * 4 / 3);
+ cachedMap = new HashMap<>(updates.length * 4 / 3);
}
final Map<IPropertiesUpdate, String> elementFormatMap = Collections.synchronizedMap(cachedMap);
rm.setData(elementFormatMap);
@@ -303,7 +303,7 @@ public class FormattedValueRetriever {
// of whether we need to call the service for data.
if (availableFormats != null || !isAvailableFormatsPropertyNeeded(update)) {
if (cachedAvailableFormatsMap == null) {
- cachedAvailableFormatsMap = new HashMap<IPropertiesUpdate, String[]>(updates.length * 4 / 3);
+ cachedAvailableFormatsMap = new HashMap<>(updates.length * 4 / 3);
}
cachedAvailableFormatsMap.put(update, availableFormats);
continue;
@@ -322,7 +322,7 @@ public class FormattedValueRetriever {
private List<IPropertiesUpdate> calcOutstandingAvailableFormatsUpdates(IPropertiesUpdate[] updates,
Map<IPropertiesUpdate, String[]> cachedAvailableFormatsMap) {
if (cachedAvailableFormatsMap != null) {
- List<IPropertiesUpdate> outstandingUpdates = new ArrayList<IPropertiesUpdate>(
+ List<IPropertiesUpdate> outstandingUpdates = new ArrayList<>(
updates.length - cachedAvailableFormatsMap.size());
for (IPropertiesUpdate update : updates) {
if (!cachedAvailableFormatsMap.containsKey(update)) {
@@ -423,10 +423,10 @@ public class FormattedValueRetriever {
private void doUpdateWithAvailableFormats(IPropertiesUpdate updates[],
final Map<IPropertiesUpdate, String[]> availableFormatsMap,
final Map<IPropertiesUpdate, String> elementFormatMap, final RequestMonitor rm) {
- final List<IPropertiesUpdate> outstandingUpdates = new ArrayList<IPropertiesUpdate>(updates.length);
- final Map<IPropertiesUpdate, List<String>> requestedFormatsMap = new HashMap<IPropertiesUpdate, List<String>>(
+ final List<IPropertiesUpdate> outstandingUpdates = new ArrayList<>(updates.length);
+ final Map<IPropertiesUpdate, List<String>> requestedFormatsMap = new HashMap<>(
updates.length * 4 / 3);
- final Map<IPropertiesUpdate, String> activeFormatsMap = new HashMap<IPropertiesUpdate, String>(
+ final Map<IPropertiesUpdate, String> activeFormatsMap = new HashMap<>(
updates.length * 4 / 3);
for (final IPropertiesUpdate update : updates) {
@@ -608,7 +608,7 @@ public class FormattedValueRetriever {
*/
private List<String> calcRequestedFormats(IPropertiesUpdate update, String activeFormat,
String[] availableFormats) {
- List<String> requestedFormats = new ArrayList<String>(10);
+ List<String> requestedFormats = new ArrayList<>(10);
boolean activeFormatValueHandled = false; // have we come across a specific format request that is the active format?
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/numberformat/FormattedValueVMUtil.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/numberformat/FormattedValueVMUtil.java
index 5b4c5cf3596..1f73d0b61d6 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/numberformat/FormattedValueVMUtil.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/numberformat/FormattedValueVMUtil.java
@@ -60,7 +60,7 @@ public class FormattedValueVMUtil {
/**
* Common map of user-readable labels for format IDs.
*/
- private static Map<String, String> fFormatLabels = new HashMap<String, String>(8);
+ private static Map<String, String> fFormatLabels = new HashMap<>(8);
static {
setFormatLabel(IFormattedValues.NATURAL_FORMAT,
@@ -142,7 +142,7 @@ public class FormattedValueVMUtil {
synchronized (fFormatProperties) {
Map<String, String> prefixMap = fFormatProperties.get(prefix);
if (prefixMap == null) {
- prefixMap = new TreeMap<String, String>();
+ prefixMap = new TreeMap<>();
fFormatProperties.put(prefix, prefixMap);
}
return prefixMap;
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/numberformat/NumberFormatsContribution.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/numberformat/NumberFormatsContribution.java
index fb195473b5b..0f1859708ca 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/numberformat/NumberFormatsContribution.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/numberformat/NumberFormatsContribution.java
@@ -42,7 +42,7 @@ import org.eclipse.ui.services.IServiceLocator;
*/
public class NumberFormatsContribution extends CompoundContributionItem implements IWorkbenchContribution {
- protected static final List<String> FORMATS = new LinkedList<String>();
+ protected static final List<String> FORMATS = new LinkedList<>();
static {
FORMATS.add(IFormattedValues.NATURAL_FORMAT);
FORMATS.add(IFormattedValues.HEX_FORMAT);
@@ -101,7 +101,7 @@ public class NumberFormatsContribution extends CompoundContributionItem implemen
activeId = IFormattedValues.NATURAL_FORMAT;
}
- List<Action> actions = new ArrayList<Action>(FORMATS.size());
+ List<Action> actions = new ArrayList<>(FORMATS.size());
for (String formatId : FORMATS) {
Action action = new SelectNumberFormatAction(context, formatId);
if (formatId.equals(activeId)) {
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/numberformat/NumberFormatsPropertyTester.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/numberformat/NumberFormatsPropertyTester.java
index e557429c05a..d821dc95729 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/numberformat/NumberFormatsPropertyTester.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/numberformat/NumberFormatsPropertyTester.java
@@ -54,7 +54,7 @@ public class NumberFormatsPropertyTester extends PropertyTester {
private static final String AVAILABLE = "isNumberFormatAvailable"; //$NON-NLS-1$
private static final String ACTIVE = "isNumberFormatActive"; //$NON-NLS-1$
- private static final List<String> AVAILABLE_FORMATS = new ArrayList<String>();
+ private static final List<String> AVAILABLE_FORMATS = new ArrayList<>();
static {
AVAILABLE_FORMATS.add(IFormattedValues.NATURAL_FORMAT);
AVAILABLE_FORMATS.add(IFormattedValues.HEX_FORMAT);
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/update/DebugManualUpdatePolicy.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/update/DebugManualUpdatePolicy.java
index 0bfd5ee0832..b122731e8b4 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/update/DebugManualUpdatePolicy.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/update/DebugManualUpdatePolicy.java
@@ -66,8 +66,8 @@ public class DebugManualUpdatePolicy extends ManualUpdatePolicy implements IVMUp
fActiveNumberFormatPropertiesWithPrefixes = ACTIVE_NUMBER_FORMAT_PROPERTIES;
fElementFormatPropertiesWithPrefixes = ELEMENT_FORMAT_PROPERTIES;
} else {
- fActiveNumberFormatPropertiesWithPrefixes = new TreeSet<String>(ACTIVE_NUMBER_FORMAT_PROPERTIES);
- fElementFormatPropertiesWithPrefixes = new TreeSet<String>(ELEMENT_FORMAT_PROPERTIES);
+ fActiveNumberFormatPropertiesWithPrefixes = new TreeSet<>(ACTIVE_NUMBER_FORMAT_PROPERTIES);
+ fElementFormatPropertiesWithPrefixes = new TreeSet<>(ELEMENT_FORMAT_PROPERTIES);
for (String prefix : prefixes) {
fActiveNumberFormatPropertiesWithPrefixes
.add((prefix + IDebugVMConstants.PROP_FORMATTED_VALUE_ACTIVE_FORMAT).intern());
@@ -82,14 +82,14 @@ public class DebugManualUpdatePolicy extends ManualUpdatePolicy implements IVMUp
}
- private static final Set<String> ACTIVE_NUMBER_FORMAT_PROPERTIES = new TreeSet<String>();
+ private static final Set<String> ACTIVE_NUMBER_FORMAT_PROPERTIES = new TreeSet<>();
static {
ACTIVE_NUMBER_FORMAT_PROPERTIES.add(IDebugVMConstants.PROP_FORMATTED_VALUE_ACTIVE_FORMAT);
ACTIVE_NUMBER_FORMAT_PROPERTIES.add(IDebugVMConstants.PROP_FORMATTED_VALUE_ACTIVE_FORMAT_VALUE);
ACTIVE_NUMBER_FORMAT_PROPERTIES.add(IDebugVMConstants.PROP_FORMATTED_VALUE_FORMAT_PREFERENCE);
}
- private static final Set<String> ELEMENT_FORMAT_PROPERTIES = new TreeSet<String>();
+ private static final Set<String> ELEMENT_FORMAT_PROPERTIES = new TreeSet<>();
static {
ELEMENT_FORMAT_PROPERTIES.add(IDebugVMConstants.PROP_FORMATTED_VALUE_ACTIVE_FORMAT);
ELEMENT_FORMAT_PROPERTIES.add(IDebugVMConstants.PROP_FORMATTED_VALUE_ACTIVE_FORMAT_VALUE);
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/variable/VariableVMNode.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/variable/VariableVMNode.java
index 26f3935bbbc..f7d3c1b0221 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/variable/VariableVMNode.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/variable/VariableVMNode.java
@@ -1120,7 +1120,7 @@ public class VariableVMNode extends AbstractExpressionVMNode
// Create a List in which we store the DM data objects for the local variables. This is
// necessary because there is no MultiDataRequestMonitor. :)
- final List<IVariableDMData> localsDMData = new ArrayList<IVariableDMData>();
+ final List<IVariableDMData> localsDMData = new ArrayList<>();
// Create the MultiRequestMonitor to handle completion of the set of getModelData() calls.
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/concurrent/SimpleDisplayExecutor.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/concurrent/SimpleDisplayExecutor.java
index 22e85fe8f92..b8ff68cd692 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/concurrent/SimpleDisplayExecutor.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/concurrent/SimpleDisplayExecutor.java
@@ -97,7 +97,7 @@ public class SimpleDisplayExecutor implements Executor {
private synchronized boolean enqueue(final Runnable runnable) {
boolean needsPosting = false;
if (runnables == null) {
- runnables = new LinkedList<Runnable>();
+ runnables = new LinkedList<>();
needsPosting = true;
}
runnables.offer(runnable);
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/AbstractVMAdapter.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/AbstractVMAdapter.java
index ddf8a90d190..3ce16d55693 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/AbstractVMAdapter.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/AbstractVMAdapter.java
@@ -227,7 +227,7 @@ abstract public class AbstractVMAdapter implements IVMAdapter {
* @since 1.1
*/
protected final void handleEvent(final Object event) {
- final List<IVMEventListener> eventListeners = new ArrayList<IVMEventListener>();
+ final List<IVMEventListener> eventListeners = new ArrayList<>();
aboutToHandleEvent(event);
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/AbstractVMProvider.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/AbstractVMProvider.java
index 5ff02ffa5a9..fe6ec9decb3 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/AbstractVMProvider.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/AbstractVMProvider.java
@@ -118,7 +118,7 @@ abstract public class AbstractVMProvider implements IVMProvider, IVMEventListene
* at the same time, each of these sub-trees will have it's own model
* proxy.
*/
- private List<IVMModelProxy> fActiveModelProxies = new LinkedList<IVMModelProxy>();
+ private List<IVMModelProxy> fActiveModelProxies = new LinkedList<>();
/**
* Convenience constant.
@@ -128,7 +128,7 @@ abstract public class AbstractVMProvider implements IVMProvider, IVMEventListene
/**
* The mapping of parent to child nodes.
*/
- private Map<IVMNode, IVMNode[]> fChildNodesMap = new HashMap<IVMNode, IVMNode[]>();
+ private Map<IVMNode, IVMNode[]> fChildNodesMap = new HashMap<>();
/**
* Cached array of all the configured view model nodes. It is generated
@@ -170,10 +170,10 @@ abstract public class AbstractVMProvider implements IVMProvider, IVMEventListene
RequestMonitor fCurrentRm;
/** The queue */
- List<EventInfo> fEventQueue = new LinkedList<EventInfo>();
+ List<EventInfo> fEventQueue = new LinkedList<>();
}
- private Map<IVMModelProxy, ModelProxyEventQueue> fProxyEventQueues = new HashMap<IVMModelProxy, ModelProxyEventQueue>();
+ private Map<IVMModelProxy, ModelProxyEventQueue> fProxyEventQueues = new HashMap<>();
/**
* Constructs the view model provider for given DSF session. The
@@ -265,7 +265,7 @@ abstract public class AbstractVMProvider implements IVMProvider, IVMEventListene
}
CountingRequestMonitor crm = new CountingRequestMonitor(getExecutor(), rm);
- final List<IVMModelProxy> activeModelProxies = new ArrayList<IVMModelProxy>(getActiveModelProxies());
+ final List<IVMModelProxy> activeModelProxies = new ArrayList<>(getActiveModelProxies());
crm.setDoneCount(activeModelProxies.size());
for (final IVMModelProxy proxyStrategy : activeModelProxies) {
@@ -444,7 +444,7 @@ abstract public class AbstractVMProvider implements IVMProvider, IVMEventListene
if (fNodesListCache != null) {
return fNodesListCache;
}
- List<IVMNode> list = new ArrayList<IVMNode>();
+ List<IVMNode> list = new ArrayList<>();
for (IVMNode node : fChildNodesMap.keySet()) {
if (node != null) {
list.add(node);
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/DefaultVMContentProviderStrategy.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/DefaultVMContentProviderStrategy.java
index a7d41e0846d..df0b8a9a40b 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/DefaultVMContentProviderStrategy.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/DefaultVMContentProviderStrategy.java
@@ -83,7 +83,7 @@ public class DefaultVMContentProviderStrategy implements IElementContentProvider
updateNodeChildren(firstNode, updates);
} else {
// Sort the updates by the node.
- Map<IVMNode, List<IHasChildrenUpdate>> nodeUpdatesMap = new HashMap<IVMNode, List<IHasChildrenUpdate>>();
+ Map<IVMNode, List<IHasChildrenUpdate>> nodeUpdatesMap = new HashMap<>();
for (IHasChildrenUpdate update : updates) {
// Get the VM Context for last element in path.
IVMNode node = getNodeForElement(update.getElement());
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/DefaultVMModelProxyStrategy.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/DefaultVMModelProxyStrategy.java
index 5fe9191845d..88afb76d461 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/DefaultVMModelProxyStrategy.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/DefaultVMModelProxyStrategy.java
@@ -776,7 +776,7 @@ public class DefaultVMModelProxyStrategy implements IVMModelProxy {
final CountingRequestMonitor crm = new CountingRequestMonitor(getVMProvider().getExecutor(), rm) {
@Override
protected void handleSuccess() {
- Map<IVMNode, Integer> data = new HashMap<IVMNode, Integer>();
+ Map<IVMNode, Integer> data = new HashMap<>();
int offset = 0;
for (int i = 0; i < childNodes.length; i++) {
data.put(childNodes[i], offset);
@@ -805,7 +805,7 @@ public class DefaultVMModelProxyStrategy implements IVMModelProxy {
}
crm.setDoneCount(countRM);
} else {
- Map<IVMNode, Integer> data = new HashMap<IVMNode, Integer>();
+ Map<IVMNode, Integer> data = new HashMap<>();
for (int i = 0; i < childNodes.length; i++) {
data.put(childNodes[i], -1);
}
@@ -821,7 +821,7 @@ public class DefaultVMModelProxyStrategy implements IVMModelProxy {
* IModelDelta.NO_CHANGE are omitted.
*/
protected Map<IVMNode, Integer> getChildNodesWithDeltaFlags(IVMNode node, ModelDelta parentDelta, Object e) {
- Map<IVMNode, Integer> nodes = new HashMap<IVMNode, Integer>();
+ Map<IVMNode, Integer> nodes = new HashMap<>();
for (final IVMNode childNode : getVMProvider().getChildVMNodes(node)) {
if (!childNode.equals(node) || allowRecursiveVMNodes()) {
int delta = getDeltaFlags(childNode, parentDelta, e);
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/VMChildrenUpdate.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/VMChildrenUpdate.java
index 570ab37e747..6066daf25c4 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/VMChildrenUpdate.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/VMChildrenUpdate.java
@@ -44,7 +44,7 @@ public class VMChildrenUpdate extends VMViewerUpdate implements IChildrenUpdate
super(clientUpdate, requestMonitor);
fOffset = offset;
fLength = length;
- fElements = length > 0 ? new ArrayList<Object>(length) : new ArrayList<Object>();
+ fElements = length > 0 ? new ArrayList<>(length) : new ArrayList<>();
}
public VMChildrenUpdate(IModelDelta delta, IPresentationContext presentationContext, int offset, int length,
@@ -52,7 +52,7 @@ public class VMChildrenUpdate extends VMViewerUpdate implements IChildrenUpdate
super(delta, presentationContext, rm);
fOffset = offset;
fLength = length;
- fElements = length > 0 ? new ArrayList<Object>(length) : new ArrayList<Object>();
+ fElements = length > 0 ? new ArrayList<>(length) : new ArrayList<>();
}
public VMChildrenUpdate(TreePath elementPath, Object viewerInput, IPresentationContext presentationContext,
@@ -60,7 +60,7 @@ public class VMChildrenUpdate extends VMViewerUpdate implements IChildrenUpdate
super(elementPath, viewerInput, presentationContext, rm);
fOffset = offset;
fLength = length;
- fElements = length > 0 ? new ArrayList<Object>(length) : new ArrayList<Object>();
+ fElements = length > 0 ? new ArrayList<>(length) : new ArrayList<>();
}
@Override
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/VMViewerUpdate.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/VMViewerUpdate.java
index 0a5165a02ec..e889f4bc61b 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/VMViewerUpdate.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/VMViewerUpdate.java
@@ -158,7 +158,7 @@ public class VMViewerUpdate extends DsfExecutable implements IViewerUpdate {
* @param requestMonitor Call-back invoked when this update completes.
*/
public VMViewerUpdate(IModelDelta delta, IPresentationContext presentationContext, RequestMonitor requestMonitor) {
- List<Object> elementList = new LinkedList<Object>();
+ List<Object> elementList = new LinkedList<>();
IModelDelta listDelta = delta;
elementList.add(0, listDelta.getElement());
while (listDelta.getParentDelta() != null) {
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/datamodel/CompositeDMVMContext.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/datamodel/CompositeDMVMContext.java
index dd8123d4fb6..693995a1060 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/datamodel/CompositeDMVMContext.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/datamodel/CompositeDMVMContext.java
@@ -54,7 +54,7 @@ public class CompositeDMVMContext extends CompositeDMContext {
*/
public CompositeDMVMContext(Object viewerInputObject, TreePath treePath) {
super(EMPTY_CONTEXTS_ARRAY);
- List<IDMContext> parentsList = new ArrayList<IDMContext>(treePath.getSegmentCount() + 1);
+ List<IDMContext> parentsList = new ArrayList<>(treePath.getSegmentCount() + 1);
for (int i = treePath.getSegmentCount() - 1; i >= 0; i--) {
if (treePath.getSegment(i) instanceof IDMVMContext) {
parentsList.add(((IDMVMContext) treePath.getSegment(i)).getDMContext());
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/properties/LabelColumnInfo.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/properties/LabelColumnInfo.java
index e17ee6343be..f4e016562d8 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/properties/LabelColumnInfo.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/properties/LabelColumnInfo.java
@@ -54,7 +54,7 @@ public class LabelColumnInfo {
public LabelColumnInfo(LabelAttribute[] attributes) {
fLabelAttributes = attributes;
- List<String> names = new LinkedList<String>();
+ List<String> names = new LinkedList<>();
for (LabelAttribute attr : attributes) {
for (String name : attr.getPropertyNames()) {
names.add(name);
@@ -87,7 +87,7 @@ public class LabelColumnInfo {
protected void setLabelAttributes(LabelAttribute[] attributes) {
fLabelAttributes = attributes;
- List<String> names = new LinkedList<String>();
+ List<String> names = new LinkedList<>();
for (LabelAttribute attr : attributes) {
for (String name : attr.getPropertyNames()) {
names.add(name);
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/properties/PropertiesBasedLabelProvider.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/properties/PropertiesBasedLabelProvider.java
index fa5cb57a35d..96260238b14 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/properties/PropertiesBasedLabelProvider.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/properties/PropertiesBasedLabelProvider.java
@@ -197,7 +197,7 @@ public class PropertiesBasedLabelProvider implements IElementLabelProvider {
* @return Array of property names.
*/
private Set<String> calcPropertyNamesForColumns(String[] columnIds) {
- Set<String> propertyNames = new HashSet<String>();
+ Set<String> propertyNames = new HashSet<>();
if (columnIds == null) {
LabelColumnInfo columnInfo = getColumnInfo(ID_COLUMN_NO_COLUMNS);
if (columnInfo != null) {
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/properties/PropertiesUpdateStatus.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/properties/PropertiesUpdateStatus.java
index f316b24b420..26df13d87f0 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/properties/PropertiesUpdateStatus.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/properties/PropertiesUpdateStatus.java
@@ -44,7 +44,7 @@ import org.eclipse.core.runtime.IStatus;
*/
public class PropertiesUpdateStatus extends DsfMultiStatus {
- final private Map<String, IStatus> fPropertiesStatus = new HashMap<String, IStatus>(1);
+ final private Map<String, IStatus> fPropertiesStatus = new HashMap<>(1);
private boolean fFirstStatusSet;
public PropertiesUpdateStatus() {
@@ -132,7 +132,7 @@ public class PropertiesUpdateStatus extends DsfMultiStatus {
// Children of merged status should contain all statuses that are found in the fPropertiesStatus map, but
// without duplicates.
- Set<IStatus> children = new HashSet<IStatus>(
+ Set<IStatus> children = new HashSet<>(
(baseStatus.getChildren().length + newStatus.getChildren().length) * 4 / 3);
children.addAll(mergedStatus.fPropertiesStatus.values());
for (IStatus child : children) {
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/properties/VMPropertiesUpdate.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/properties/VMPropertiesUpdate.java
index 3c47a02028c..930035664d2 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/properties/VMPropertiesUpdate.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/properties/VMPropertiesUpdate.java
@@ -91,7 +91,7 @@ public class VMPropertiesUpdate extends VMViewerUpdate implements IPropertiesUpd
if (!fCreatedOwnMap) {
fCreatedOwnMap = true;
Map<String, Object> curValues = fValues;
- fValues = new HashMap<String, Object>(fProperties.size() * 4 / 3, 0.75f);
+ fValues = new HashMap<>(fProperties.size() * 4 / 3, 0.75f);
if (curValues != null) {
fValues.putAll(curValues);
}
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/update/AbstractCachingVMProvider.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/update/AbstractCachingVMProvider.java
index baa658445b3..083e0c1e8ce 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/update/AbstractCachingVMProvider.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/update/AbstractCachingVMProvider.java
@@ -243,7 +243,7 @@ public class AbstractCachingVMProvider extends AbstractVMProvider
Integer childrenCount = fChildrenCount;
childrenCount = childrenCount != null ? childrenCount : 0;
int capacity = Math.max((childrenCount.intValue() * 4) / 3, 32);
- fChildren = new HashMap<Integer, Object>(capacity);
+ fChildren = new HashMap<>(capacity);
}
}
@@ -396,7 +396,7 @@ public class AbstractCachingVMProvider extends AbstractVMProvider
private IVMUpdatePolicy[] fAvailableUpdatePolicies;
- public Map<Object, RootElementMarkerKey> fRootMarkers = new HashMap<Object, RootElementMarkerKey>();
+ public Map<Object, RootElementMarkerKey> fRootMarkers = new HashMap<>();
/**
* Hash map holding cache data. To store the cache information, the cache uses a
@@ -490,7 +490,7 @@ public class AbstractCachingVMProvider extends AbstractVMProvider
@Override
public void updateNode(final IVMNode node, IHasChildrenUpdate[] updates) {
- LinkedList<IHasChildrenUpdate> missUpdates = new LinkedList<IHasChildrenUpdate>();
+ LinkedList<IHasChildrenUpdate> missUpdates = new LinkedList<>();
for (final IHasChildrenUpdate update : updates) {
// Find or create the cache entry for the element of this update.
ElementDataKey key = makeEntryKey(node, update);
@@ -670,7 +670,7 @@ public class AbstractCachingVMProvider extends AbstractVMProvider
// Update for a partial list of children was requested.
// Iterate through the known children and make a list of missing
// indexes.
- List<Integer> childrenMissingFromCache = new LinkedList<Integer>();
+ List<Integer> childrenMissingFromCache = new LinkedList<>();
for (int i = update.getOffset(); i < update.getOffset() + update.getLength(); i++) {
childrenMissingFromCache.add(i);
}
@@ -701,7 +701,7 @@ public class AbstractCachingVMProvider extends AbstractVMProvider
// Some children were not found in the cache, create separate
// proxy updates for the continuous ranges of missing children.
- List<IChildrenUpdate> partialUpdates = new ArrayList<IChildrenUpdate>(2);
+ List<IChildrenUpdate> partialUpdates = new ArrayList<>(2);
final CountingRequestMonitor multiRm = new ViewerCountingRequestMonitor(getExecutor(), update);
while (!childrenMissingFromCache.isEmpty()) {
final int offset = childrenMissingFromCache.get(0);
@@ -1100,7 +1100,7 @@ public class AbstractCachingVMProvider extends AbstractVMProvider
if (rootElementChildren != null) {
entry.fHasChildren = rootElementChildren.length > 0;
entry.fChildrenCount = rootElementChildren.length;
- entry.fChildren = new HashMap<Integer, Object>(entry.fChildrenCount * 4 / 3);
+ entry.fChildren = new HashMap<>(entry.fChildrenCount * 4 / 3);
for (int i = 0; i < rootElementChildren.length; i++) {
entry.fChildren.put(i, rootElementChildren[i]);
}
@@ -1112,7 +1112,7 @@ public class AbstractCachingVMProvider extends AbstractVMProvider
.getInitialRootElementProperties(rootElement);
if (rootElementProperties != null) {
- entry.fProperties = new HashMap<String, Object>((rootElementProperties.size() + 1) * 4 / 3);
+ entry.fProperties = new HashMap<>((rootElementProperties.size() + 1) * 4 / 3);
entry.fProperties.putAll(rootElementProperties);
entry.fProperties.put(PROP_CACHE_ENTRY_DIRTY, true);
entry.fDirty = true;
@@ -1164,7 +1164,7 @@ public class AbstractCachingVMProvider extends AbstractVMProvider
}
} else {
// Sort the updates by the node.
- Map<IVMNode, List<IPropertiesUpdate>> nodeUpdatesMap = new HashMap<IVMNode, List<IPropertiesUpdate>>();
+ Map<IVMNode, List<IPropertiesUpdate>> nodeUpdatesMap = new HashMap<>();
for (IPropertiesUpdate update : updates) {
// Get the VM Context for last element in path.
IVMNode node = getNodeForElement(update.getElement());
@@ -1206,7 +1206,7 @@ public class AbstractCachingVMProvider extends AbstractVMProvider
}
protected void updateNode(final IVMNode node, IPropertiesUpdate[] updates) {
- LinkedList<IPropertiesUpdate> missUpdates = new LinkedList<IPropertiesUpdate>();
+ LinkedList<IPropertiesUpdate> missUpdates = new LinkedList<>();
for (final IPropertiesUpdate update : updates) {
// Find or create the cache entry for the element of this update.
ElementDataKey key = makeEntryKey(node, update);
@@ -1232,7 +1232,7 @@ public class AbstractCachingVMProvider extends AbstractVMProvider
// Cache miss! Check if already cached properties can be re-used.
Set<String> missingProperties = null;
if (entry.fProperties != null) {
- missingProperties = new HashSet<String>(update.getProperties().size() * 4 / 3);
+ missingProperties = new HashSet<>(update.getProperties().size() * 4 / 3);
missingProperties.addAll(update.getProperties());
missingProperties.removeAll(entry.fProperties.keySet());
@@ -1285,7 +1285,7 @@ public class AbstractCachingVMProvider extends AbstractVMProvider
// We are caching the result of this update. Copy the properties from the update
// to the cached properties map.
if (entry.fProperties == null) {
- entry.fProperties = new HashMap<String, Object>((getData().size() + 3) * 4 / 3);
+ entry.fProperties = new HashMap<>((getData().size() + 3) * 4 / 3);
if (update.getProperties().contains(PROP_CACHE_ENTRY_DIRTY)) {
entry.fProperties.put(PROP_CACHE_ENTRY_DIRTY, entry.fDirty);
}
@@ -1319,14 +1319,14 @@ public class AbstractCachingVMProvider extends AbstractVMProvider
// Create a temporary cached properties map and add existing cache and node update
// properties to it.
if (entry.fProperties != null) {
- cachedProperties = new HashMap<String, Object>(
+ cachedProperties = new HashMap<>(
(entry.fProperties.size() + getData().size() + 3) * 4 / 3);
cachedProperties.putAll(entry.fProperties);
cachedStatus = PropertiesUpdateStatus.mergePropertiesStatus(
(PropertiesUpdateStatus) cachedProperties.get(PROP_UPDATE_STATUS),
missUpdateStatus, _missingProperties);
} else {
- cachedProperties = new HashMap<String, Object>((getData().size() + 3) * 4 / 3);
+ cachedProperties = new HashMap<>((getData().size() + 3) * 4 / 3);
cachedStatus = missUpdateStatus;
}
cachedProperties.putAll(getData());
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/update/UserEditEvent.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/update/UserEditEvent.java
index db5238b452d..93224a7e053 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/update/UserEditEvent.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/update/UserEditEvent.java
@@ -28,7 +28,7 @@ public class UserEditEvent {
private final Set<Object> fElements;
public UserEditEvent(Object element) {
- fElements = new HashSet<Object>();
+ fElements = new HashSet<>();
fElements.add(element);
}

Back to the top