From 17dd11ef233bab3eee97a537496443554941a3b9 Mon Sep 17 00:00:00 2001 From: Sven Efftinge Date: Tue, 7 Jun 2016 15:48:04 +0200 Subject: [PATCH] [language server] aquire lock in main thread, fixed syntax highlighting for keywords --- .../IEditorHighlightingConfigurationProvider.xtend | 2 +- .../eclipse/xtext/ide/server/concurrent/RequestManager.xtend | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/org.eclipse.xtext.ide/src/org/eclipse/xtext/ide/editor/syntaxcoloring/IEditorHighlightingConfigurationProvider.xtend b/plugins/org.eclipse.xtext.ide/src/org/eclipse/xtext/ide/editor/syntaxcoloring/IEditorHighlightingConfigurationProvider.xtend index 0872ef011..47e486fe8 100644 --- a/plugins/org.eclipse.xtext.ide/src/org/eclipse/xtext/ide/editor/syntaxcoloring/IEditorHighlightingConfigurationProvider.xtend +++ b/plugins/org.eclipse.xtext.ide/src/org/eclipse/xtext/ide/editor/syntaxcoloring/IEditorHighlightingConfigurationProvider.xtend @@ -35,7 +35,7 @@ interface IEditorHighlightingConfigurationProvider { [ «getStandardPatterns» { - match: "\\\\b(?:«keywords.join('|')»)\\\\b", + match: "\\b(?:«keywords.join('|')»)\\b", name: "keyword.«languageInfo.shortName»" } ] diff --git a/plugins/org.eclipse.xtext.ide/src/org/eclipse/xtext/ide/server/concurrent/RequestManager.xtend b/plugins/org.eclipse.xtext.ide/src/org/eclipse/xtext/ide/server/concurrent/RequestManager.xtend index cae32830b..08be5ee38 100644 --- a/plugins/org.eclipse.xtext.ide/src/org/eclipse/xtext/ide/server/concurrent/RequestManager.xtend +++ b/plugins/org.eclipse.xtext.ide/src/org/eclipse/xtext/ide/server/concurrent/RequestManager.xtend @@ -66,8 +66,8 @@ class RequestManager { if (cancelIndicator instanceof CancellableIndicator) cancelIndicators += cancelIndicator + semaphore.acquire(MAX_PERMITS) return CompletableFuture.runAsync([ - semaphore.acquire(MAX_PERMITS) try { writeRequest.apply(cancelIndicator) } finally { @@ -100,8 +100,8 @@ class RequestManager { if (cancelIndicator instanceof CancellableIndicator) cancelIndicators += cancelIndicator + semaphore.acquire(1) return CompletableFuture.supplyAsync([ - semaphore.acquire(1) try { return readRequest.apply(cancelIndicator) } finally {