Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Vogel2017-09-08 14:15:39 +0000
committerLars Vogel2017-09-08 14:18:07 +0000
commit9ac2bb6a6e06deb4c19f0eae5947a8ab3629e6b7 (patch)
tree8009b62780744fa6bcf045a259cdc8c6d2d8fa3d /org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DebugCommandService.java
parent991aae18477c3d006719edbccb574932090d9ac6 (diff)
downloadeclipse.platform.debug-9ac2bb6a6e06deb4c19f0eae5947a8ab3629e6b7.tar.gz
eclipse.platform.debug-9ac2bb6a6e06deb4c19f0eae5947a8ab3629e6b7.tar.xz
eclipse.platform.debug-9ac2bb6a6e06deb4c19f0eae5947a8ab3629e6b7.zip
org.eclipse.debug.ui Change-Id: Iaa1506dffb86445b0bec008c1a595f90b8a02148 Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
Diffstat (limited to 'org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DebugCommandService.java')
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DebugCommandService.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DebugCommandService.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DebugCommandService.java
index f2799ff61..3ac0ecd2b 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DebugCommandService.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DebugCommandService.java
@@ -39,7 +39,7 @@ public class DebugCommandService implements IDebugContextListener {
/**
* Maps command types to actions to update
*/
- private Map<Class<?>, List<IEnabledTarget>> fCommandUpdates = new HashMap<Class<?>, List<IEnabledTarget>>();
+ private Map<Class<?>, List<IEnabledTarget>> fCommandUpdates = new HashMap<>();
/**
* Window this service is for.
@@ -54,7 +54,7 @@ public class DebugCommandService implements IDebugContextListener {
/**
* Service per window
*/
- private static Map<IWorkbenchWindow, DebugCommandService> fgServices = new HashMap<IWorkbenchWindow, DebugCommandService>();
+ private static Map<IWorkbenchWindow, DebugCommandService> fgServices = new HashMap<>();
/**
* Returns the service for a window.
@@ -117,7 +117,7 @@ public class DebugCommandService implements IDebugContextListener {
Job.getJobManager().cancel(commandType);
List<IEnabledTarget> actions = fCommandUpdates.get(commandType);
if (actions == null) {
- actions = new ArrayList<IEnabledTarget>();
+ actions = new ArrayList<>();
fCommandUpdates.put(commandType, actions);
}
actions.add(action);
@@ -144,7 +144,7 @@ public class DebugCommandService implements IDebugContextListener {
Map<Class<?>, List<IEnabledTarget>> commands = null;
synchronized (fCommandUpdates) {
commands = fCommandUpdates;
- fCommandUpdates = new HashMap<Class<?>, List<IEnabledTarget>>(commands.size());
+ fCommandUpdates = new HashMap<>(commands.size());
}
if (context instanceof IStructuredSelection && !context.isEmpty()) {
Object[] elements = ((IStructuredSelection)context).toArray();
@@ -243,7 +243,7 @@ public class DebugCommandService implements IDebugContextListener {
* @return map of command handlers to associated elements or <code>null</code>
*/
private Map<IDebugCommandHandler, List<Object>> collate(Object[] elements, Class<?> handlerType) {
- Map<IDebugCommandHandler, List<Object>> map = new HashMap<IDebugCommandHandler, List<Object>>();
+ Map<IDebugCommandHandler, List<Object>> map = new HashMap<>();
for (int i = 0; i < elements.length; i++) {
Object element = elements[i];
IDebugCommandHandler handler = getHandler(element, handlerType);
@@ -252,7 +252,7 @@ public class DebugCommandService implements IDebugContextListener {
} else {
List<Object> list = map.get(handler);
if (list == null) {
- list = new ArrayList<Object>();
+ list = new ArrayList<>();
map.put(handler, list);
}
list.add(element);

Back to the top