This commit is contained in:
Eric Jizba 2017-08-14 08:51:49 -07:00
Родитель 5c826d9757
Коммит 1f7c6e85ab
2 изменённых файлов: 5 добавлений и 5 удалений

Просмотреть файл

@ -30,7 +30,7 @@ The MongoDB extension makes it easy to work with MongoDB NoSQL databases, collec
- Enter your scripts, eg: `db.<collectionName>.find()`
- IntelliSense (completions) will be provided as you write your scripts
- Select the script and press `CMD+'` (`CTRL+'` on Windows and Linux) to see the results
- Edite your documents, right click, and choose the `Update` command to persist changes to the database
- Edit your documents, right click, and choose the `Update` command to persist changes to the database
# Contributing
There are a couple of ways you can contribute to this repo:

Просмотреть файл

@ -23,12 +23,12 @@ export class MongoScriptDocumentManager {
constructor(
private schemaService: SchemaService,
private jonLanguageService: JsonLanguageService
private jsonLanguageService: JsonLanguageService
) {
}
getDocument(textDocument: TextDocument, db: Db): MongoScriptDocument {
return new MongoScriptDocument(textDocument, db, this.schemaService, this.jonLanguageService);
return new MongoScriptDocument(textDocument, db, this.schemaService, this.jsonLanguageService);
}
}
@ -39,7 +39,7 @@ export class MongoScriptDocument {
constructor(private textDocument: TextDocument, private db: Db,
private schemaService: SchemaService,
private jonLanguageService: JsonLanguageService
private jsonLanguageService: JsonLanguageService
) {
this._lexer = new mongoLexer(new InputStream(textDocument.getText()));
this._lexer.removeErrorListeners();
@ -52,7 +52,7 @@ export class MongoScriptDocument {
const offset = this.textDocument.offsetAt(position);
const lastNode = new NodeFinder(offset).visit(parser.commands());
if (lastNode) {
return new CompletionItemsVisitor(this.textDocument, this.db, offset, this.schemaService, this.jonLanguageService).visit(lastNode);
return new CompletionItemsVisitor(this.textDocument, this.db, offset, this.schemaService, this.jsonLanguageService).visit(lastNode);
}
return Promise.resolve([]);
}