From 3cd845f243e3842aae158a623c59904671177f92 Mon Sep 17 00:00:00 2001 From: Elsa Zacharia <122080218+elsazac@users.noreply.github.com> Date: Tue, 9 Jan 2024 13:56:08 +0530 Subject: [PATCH] replace anonymous runnable class with lambda (#1459) * replace anonymous runnable class with lambda --- .../CompletionProposalPopup2.java | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/bundles/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/link/contentassist/CompletionProposalPopup2.java b/bundles/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/link/contentassist/CompletionProposalPopup2.java index d48f4bcfe11..2d4d5db7789 100644 --- a/bundles/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/link/contentassist/CompletionProposalPopup2.java +++ b/bundles/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/link/contentassist/CompletionProposalPopup2.java @@ -872,18 +872,14 @@ public void processEvent(VerifyEvent e) { private void filterProposals() { ++ fInvocationCounter; Control control= fViewer.getTextWidget(); - control.getDisplay().asyncExec(new Runnable() { - long fCounter= fInvocationCounter; - @Override - public void run() { - - if (fCounter != fInvocationCounter) - return; - if (fInvocationProcessedCounter == fInvocationCounter) - return; + long fCounter= fInvocationCounter; + control.getDisplay().asyncExec(() -> { + if (fCounter != fInvocationCounter) + return; + if (fInvocationProcessedCounter == fInvocationCounter) + return; - doFilterProposals(); - } + doFilterProposals(); }); }