This is an automated email from the ASF dual-hosted git repository.

jlahoda pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans.git


The following commit(s) were added to refs/heads/master by this push:
     new c45b21f4cf Improving handling of string templates in the Java syntax.
     new 063d12340e Merge pull request #6745 from 
lahodaj/string-templates-vscode-grammar
c45b21f4cf is described below

commit c45b21f4cfc9c05bc021e839a5abcc067e7dde6b
Author: Jan Lahoda <[email protected]>
AuthorDate: Fri Nov 24 16:21:11 2023 +0100

    Improving handling of string templates in the Java syntax.
---
 .../vscode/syntaxes/java.tmLanguage.json           | 26 ++++++++++++++++++----
 1 file changed, 22 insertions(+), 4 deletions(-)

diff --git a/java/java.lsp.server/vscode/syntaxes/java.tmLanguage.json 
b/java/java.lsp.server/vscode/syntaxes/java.tmLanguage.json
index cd3b0541e0..a0310c0525 100644
--- a/java/java.lsp.server/vscode/syntaxes/java.tmLanguage.json
+++ b/java/java.lsp.server/vscode/syntaxes/java.tmLanguage.json
@@ -1575,20 +1575,38 @@
                                        "begin": "\"",
                                        "beginCaptures": {
                                                "0": {
-                                                       "name": 
"punctuation.definition.string.begin.java"
+                                                       "name": 
"punctuation.definition.string.begin.java string.quoted.double.java"
                                                }
                                        },
                                        "end": "\"",
                                        "endCaptures": {
                                                "0": {
-                                                       "name": 
"punctuation.definition.string.end.java"
+                                                       "name": 
"punctuation.definition.string.end.java string.quoted.double.java"
                                                }
                                        },
-                                       "name": "string.quoted.double.java",
                                        "patterns": [
+                                               {
+                                                       "begin": "\\\\{",
+                                                       "beginCaptures": {
+                                                               "0": {
+                                                                       "name": 
"punctuation.definition.string.end.java string.quoted.double.java"
+                                                               }
+                                                       },
+                                                       "end": "}",
+                                                       "endCaptures": {
+                                                               "0": {
+                                                                       "name": 
"punctuation.definition.string.begin.java string.quoted.double.java"
+                                                               }
+                                                       },
+                                                       "patterns": 
[{"include": "#code"}]
+                                               },
                                                {
                                                        "match": "\\\\.",
-                                                       "name": 
"constant.character.escape.java"
+                                                       "name": 
"constant.character.escape.java string.quoted.double.java"
+                                               },
+                                               {
+                                                       "match": ".",
+                                                       "name": 
"string.quoted.double.java"
                                                }
                                        ]
                                },


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to