make sure we only try and parse java files

This commit is contained in:
Dave Holoway
2020-06-29 00:59:55 +01:00
parent 4554b8890e
commit 6ca4ea353d

View File

@@ -46,6 +46,11 @@ let documents = new TextDocuments({
create(uri, languageId, version, content) {
trace(`document create ${uri}:${version}`);
// sanity-check - we only support Java source files
if (!/\.java$/i.test(uri)) {
return { uri };
}
// add the document to the set
liveParsers.set(uri, new JavaDocInfo(uri, content, version));