Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
constructor() {
this._documents = Object.create(null);
this._onDidChangeContent = new vscode_languageserver_protocol_1.Emitter();
this._onDidOpen = new vscode_languageserver_protocol_1.Emitter();
this._onDidClose = new vscode_languageserver_protocol_1.Emitter();
this._onDidSave = new vscode_languageserver_protocol_1.Emitter();
this._onWillSave = new vscode_languageserver_protocol_1.Emitter();
}
/**
public registLanguageClient(client: LanguageClient): Disposable {
let disposables: Disposable[] = []
let onDidServiceReady = new Emitter()
let service: IServiceProvider = {
client,
id: client.id,
name: client.name,
selector: client.clientOptions.documentSelector,
state: ServiceStat.Initial,
onServiceReady: onDidServiceReady.event,
start: (): Promise => {
if (service.state != ServiceStat.Initial && service.state != ServiceStat.Stopped) {
return Promise.resolve()
}
if (client.getPublicState() == State.Starting) {
return Promise.resolve()
}
service.state = ServiceStat.Starting
constructor() {
this._documents = Object.create(null);
this._onDidChangeContent = new vscode_languageserver_protocol_1.Emitter();
this._onDidOpen = new vscode_languageserver_protocol_1.Emitter();
this._onDidClose = new vscode_languageserver_protocol_1.Emitter();
this._onDidSave = new vscode_languageserver_protocol_1.Emitter();
this._onWillSave = new vscode_languageserver_protocol_1.Emitter();
}
/**
constructor() {
this._documents = Object.create(null);
this._onDidChangeContent = new vscode_languageserver_protocol_1.Emitter();
this._onDidOpen = new vscode_languageserver_protocol_1.Emitter();
this._onDidClose = new vscode_languageserver_protocol_1.Emitter();
this._onDidSave = new vscode_languageserver_protocol_1.Emitter();
this._onWillSave = new vscode_languageserver_protocol_1.Emitter();
}
/**
public initialize(capabilities: ClientCapabilities): void {
let workspaceCapabilities = capabilities.workspace;
if (workspaceCapabilities && workspaceCapabilities.workspaceFolders) {
this._onDidChangeWorkspaceFolders = new Emitter();
this.connection.onNotification(DidChangeWorkspaceFoldersNotification.type, (params) => {
this._onDidChangeWorkspaceFolders.fire(params.event);
});
}
}
getWorkspaceFolders(): Promise {
constructor() {
this._documents = Object.create(null);
this._onDidChangeContent = new vscode_languageserver_protocol_1.Emitter();
this._onDidOpen = new vscode_languageserver_protocol_1.Emitter();
this._onDidClose = new vscode_languageserver_protocol_1.Emitter();
this._onDidSave = new vscode_languageserver_protocol_1.Emitter();
this._onWillSave = new vscode_languageserver_protocol_1.Emitter();
}
/**
constructor() {
this._documents = Object.create(null);
this._onDidChangeContent = new vscode_languageserver_protocol_1.Emitter();
this._onDidOpen = new vscode_languageserver_protocol_1.Emitter();
this._onDidClose = new vscode_languageserver_protocol_1.Emitter();
this._onDidSave = new vscode_languageserver_protocol_1.Emitter();
this._onWillSave = new vscode_languageserver_protocol_1.Emitter();
}
/**