Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2018-07-19 12:52:49 +0000
committerAlexander Kurtakov2018-07-19 12:52:49 +0000
commit233a9f42db3dcb0a0eaebbe55a3c2574802b9805 (patch)
tree0787422f4289580540142302596cd67234e7e0d0 /org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/MemoryViewSynchronizationService.java
parent8c924456a516ce49087a542b155ee70c8d76ae38 (diff)
downloadeclipse.platform.debug-233a9f42db3dcb0a0eaebbe55a3c2574802b9805.tar.gz
eclipse.platform.debug-233a9f42db3dcb0a0eaebbe55a3c2574802b9805.tar.xz
eclipse.platform.debug-233a9f42db3dcb0a0eaebbe55a3c2574802b9805.zip
Bug 521038 - [refactoring] Replace anonymous Runnable classes by lambda
expression Changed some formatters to Eclipse so there is some formatting happening as the debug one is not clear where to get from and it's unrealistic to expect random contributors to do it. Change-Id: I731410854f9a4ac0c9fc18bcf3ad3dcf7d941c9a Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
Diffstat (limited to 'org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/MemoryViewSynchronizationService.java')
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/MemoryViewSynchronizationService.java43
1 files changed, 20 insertions, 23 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/MemoryViewSynchronizationService.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/MemoryViewSynchronizationService.java
index 46ec5d2df..343f16ca4 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/MemoryViewSynchronizationService.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/MemoryViewSynchronizationService.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2012 IBM Corporation and others.
+ * Copyright (c) 2004, 2018 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -229,33 +229,30 @@ public class MemoryViewSynchronizationService implements IMemoryRenderingSynchro
// Make sure the synchronizer does not swallow any events
// Values of the properties are updated in the syncrhonizer immediately.
// Change events are queued up on the UI Thread.
- Display.getDefault().syncExec(new Runnable() {
- @Override
- public void run() {
- if (fSynchronizeInfo == null) {
- return;
- }
+ Display.getDefault().syncExec(() -> {
+ if (fSynchronizeInfo == null) {
+ return;
+ }
- IMemoryRendering rendering = (IMemoryRendering) evt.getSource();
- String propertyId = evt.getProperty();
+ IMemoryRendering rendering = (IMemoryRendering) evt.getSource();
+ String propertyId = evt.getProperty();
- SynchronizeInfo info = fSynchronizeInfo.get(rendering.getMemoryBlock());
- if (info != null) {
- Object value = info.getProperty(propertyId);
- if (value != null) {
- Enumeration<PropertyListener> enumeration = fPropertyListeners.elements();
+ SynchronizeInfo info = fSynchronizeInfo.get(rendering.getMemoryBlock());
+ if (info != null) {
+ Object value = info.getProperty(propertyId);
+ if (value != null) {
+ Enumeration<PropertyListener> enumeration = fPropertyListeners.elements();
- while (enumeration.hasMoreElements()) {
- PropertyListener listener = enumeration.nextElement();
+ while (enumeration.hasMoreElements()) {
+ PropertyListener listener = enumeration.nextElement();
- IPropertyChangeListener origListener = listener.getListener();
+ IPropertyChangeListener origListener = listener.getListener();
- // if it's a valid property - valid means that it's
- // listed in the property filters
- if (listener.isValidProperty(propertyId)) {
- PropertyChangeNotifier notifier = new PropertyChangeNotifier(origListener, evt);
- SafeRunner.run(notifier);
- }
+ // if it's a valid property - valid means that it's
+ // listed in the property filters
+ if (listener.isValidProperty(propertyId)) {
+ PropertyChangeNotifier notifier = new PropertyChangeNotifier(origListener, evt);
+ SafeRunner.run(notifier);
}
}
}

Back to the top