diff options
author | Alexander Kurtakov | 2018-07-18 15:39:57 +0000 |
---|---|---|
committer | Alexander Kurtakov | 2018-07-18 15:44:15 +0000 |
commit | e73a322d845e119eda68a22dbd59e2fce44acfe4 (patch) | |
tree | 6e08756d48c1d6eee415f378047a342d6da2ead7 /org.eclipse.jface.text/projection | |
parent | ef3fedaa1552b42f3f0d8b2e64334e6cce484353 (diff) | |
download | eclipse.platform.text-e73a322d845e119eda68a22dbd59e2fce44acfe4.tar.gz eclipse.platform.text-e73a322d845e119eda68a22dbd59e2fce44acfe4.tar.xz eclipse.platform.text-e73a322d845e119eda68a22dbd59e2fce44acfe4.zip |
Lambda conversions.
Converting Runnable to lambda and whatever the quick fix picked in the
file too.
Change-Id: I0cbd8ef4a7cab89dced199b44a5be3b32b6f8195
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
Diffstat (limited to 'org.eclipse.jface.text/projection')
-rw-r--r-- | org.eclipse.jface.text/projection/org/eclipse/jface/text/source/projection/ProjectionViewer.java | 41 |
1 files changed, 19 insertions, 22 deletions
diff --git a/org.eclipse.jface.text/projection/org/eclipse/jface/text/source/projection/ProjectionViewer.java b/org.eclipse.jface.text/projection/org/eclipse/jface/text/source/projection/ProjectionViewer.java index 6455181de60..07bfa673ccc 100644 --- a/org.eclipse.jface.text/projection/org/eclipse/jface/text/source/projection/ProjectionViewer.java +++ b/org.eclipse.jface.text/projection/org/eclipse/jface/text/source/projection/ProjectionViewer.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2015 IBM Corporation and others. + * Copyright (c) 2000, 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 @@ -874,28 +874,25 @@ public class ProjectionViewer extends SourceViewer implements ITextViewerExtensi if (widget != null) { Display display= widget.getDisplay(); if (display != null) { - display.asyncExec(new Runnable() { - @Override - public void run() { - try { - while (true) { - AnnotationModelEvent ame= null; - synchronized (fLock) { - if (fPendingRequests.size() == 0) - return; - ame= fPendingRequests.remove(0); - } - catchupWithProjectionAnnotationModel(ame); + display.asyncExec(() -> { + try { + while (true) { + AnnotationModelEvent ame= null; + synchronized (fLock) { + if (fPendingRequests.size() == 0) + return; + ame= fPendingRequests.remove(0); } - } catch (BadLocationException x) { - try { - catchupWithProjectionAnnotationModel(null); - } catch (BadLocationException x1) { - throw new IllegalArgumentException(); - } finally { - synchronized (fLock) { - fPendingRequests.clear(); - } + catchupWithProjectionAnnotationModel(ame); + } + } catch (BadLocationException x) { + try { + catchupWithProjectionAnnotationModel(null); + } catch (BadLocationException x1) { + throw new IllegalArgumentException(); + } finally { + synchronized (fLock) { + fPendingRequests.clear(); } } } |