Skip to content

Commit

Permalink
Allow globs in xml.javaExtensions
Browse files Browse the repository at this point in the history
Paths supplied to `xml.javaExtensions` will be treated as globs.

Signed-off-by: David Thompson <[email protected]>
  • Loading branch information
datho7561 committed Sep 10, 2020
1 parent ee541b3 commit 269900c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import * as vscode from 'vscode';
import * as path from 'path';
import { Commands } from './commands';
const glob = require('glob');

let existingExtensions: Array<string>;

Expand All @@ -15,7 +16,7 @@ export function collectXmlJavaExtensions(extensions: readonly vscode.Extension<a
const xmlJavaExtensions = contributesSection['xml.javaExtensions'];
if (Array.isArray(xmlJavaExtensions) && xmlJavaExtensions.length) {
for (const xmLJavaExtensionPath of xmlJavaExtensions) {
result.push(path.resolve(extension.extensionPath, xmLJavaExtensionPath));
result.push(...glob.sync(path.resolve(extension.extensionPath, xmLJavaExtensionPath)));
}
}
}
Expand Down

0 comments on commit 269900c

Please sign in to comment.