JPQL syntax highlighting via Semantic Tokens

This commit is contained in:
aboyko
2024-04-10 09:57:13 -04:00
parent cf8f50615e
commit 95b8e2f5bd
51 changed files with 16831 additions and 56 deletions

View File

@@ -27,6 +27,7 @@ const YAML_LANGUAGE_ID = "spring-boot-properties-yaml";
const JAVA_LANGUAGE_ID = "java";
const XML_LANGUAGE_ID = "xml";
const FACTORIES_LANGUAGE_ID = "spring-factories";
const JPA_QUERY_PROPERTIES_LANGUAGE_ID = "jpa-query-properties";
const STOP_ASKING = "Stop Asking";
@@ -122,6 +123,10 @@ export function activate(context: ExtensionContext): Thenable<ExtensionAPI> {
{
language: FACTORIES_LANGUAGE_ID,
scheme: 'file'
},
{
language: JPA_QUERY_PROPERTIES_LANGUAGE_ID,
pattern: "**/jpa-named-queries.properties"
}
],
synchronize: {

View File

@@ -69,6 +69,16 @@
"*.factories"
],
"configuration": "./properties-support/language-configuration.json"
},
{
"id": "jpa-query-properties",
"aliases": [
"JPA Query Properties"
],
"filenamePatterns": [
"jpa-named-queries.properties"
],
"configuration": "./properties-support/language-configuration.json"
}
],
"menus": {
@@ -300,6 +310,11 @@
],
"description": "The path to a shared properties metadata JSON file."
},
"boot-java.jpql": {
"type": "boolean",
"default": true,
"description": "JPA Query language support"
},
"boot-java.change-detection.on": {
"type": "boolean",
"default": false,
@@ -1137,10 +1152,15 @@
"scopeName": "source.spring-boot-properties",
"path": "./properties-support/spring-boot-properties.tmLanguage.json"
},
{
"language": "jpa-query-properties",
"scopeName": "source.jpa-query-properties",
"path": "./properties-support/jpa-query-properties.tmLanguage.json"
},
{
"language": "spring-factories",
"scopeName": "source.spring-factories",
"path": "./properties-support/spring-boot-properties.tmLanguage.json"
"path": "./properties-support/spring-factories.tmLanguage.json"
}
]
},

View File

@@ -0,0 +1,10 @@
{
"name": "JPA Query Properties",
"scopeName": "source.jpa-query-properties",
"patterns": [
{
"comment": "source.java-properties is defined in vscode-java",
"include": "source.java-properties"
}
]
}

View File

@@ -0,0 +1,10 @@
{
"name": "Spring Factories",
"scopeName": "source.spring-factories",
"patterns": [
{
"comment": "source.java-properties is defined in vscode-java",
"include": "source.java-properties"
}
]
}