You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by "sdedic (via GitHub)" <gi...@apache.org> on 2023/07/10 15:21:54 UTC
[GitHub] [netbeans] sdedic commented on a diff in pull request #6174: Allow to specify additional NBLS document selectors from other extensions.
sdedic commented on code in PR #6174:
URL: https://github.com/apache/netbeans/pull/6174#discussion_r1258424827
##########
java/java.lsp.server/vscode/src/extension.ts:
##########
@@ -385,11 +385,14 @@ export function activate(context: ExtensionContext): VSNetBeansAPI {
// find acceptable JDK and launch the Java part
findJDK((specifiedJDK) => {
let currentClusters = findClusters(context.extensionPath).sort();
+ let currentDocumentSelectors = collectDocumentSelectors();
context.subscriptions.push(vscode.extensions.onDidChange(() => {
checkConflict();
const newClusters = findClusters(context.extensionPath).sort();
- if (newClusters.length !== currentClusters.length || newClusters.find((value, index) => value !== currentClusters[index])) {
+ const newDocumentSelectors = collectDocumentSelectors();
+ if (newClusters.length !== currentClusters.length || newDocumentSelectors.length !== currentDocumentSelectors.length || newClusters.find((value, index) => value !== currentClusters[index])) {
Review Comment:
Maybe also a comparison of `newDocumentSelectors` value, not just array length as with newClusters ?
##########
java/java.lsp.server/vscode/schemas/ext.package.schema.json:
##########
@@ -0,0 +1,33 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "title": "LSP Extension contributions to package.json",
+ "type": "object",
+ "properties": {
+ "contributes": {
+ "type": "object",
+ "properties": {
+ "nbls.documentSelectors" : {
Review Comment:
Q: the other (image resource map) uses `netbeans.` prefix. Shouldn't we use the same one ? If `nbls.` is now preferred (@jlahoda ?), then please file an issue for me to fix the resource map setting.
Another question: is it recommended to add schema for each ferature ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists