Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
.filter(e => e && e.getPath() && Convert.pathToUri(e.getPath()) === uri);
}
server.disposable.add(atom.workspace.onDidChangeActiveTextEditor(editor => {
if(!editor || !editor.getPath()) {
return;
}
let paths = atom.project.relativizePath(editor.getPath());
if(paths[0] && !path.relative(paths[0], server.projectPath)) {
server.connection.sendCustomRequest('$cquery/textDocumentDidView', {textDocumentUri: Convert.pathToUri(editor.getPath())});
editor.onDidStopChanging(() => {
server.connection.sendCustomRequest('$cquery/textDocumentDidView', {textDocumentUri: Convert.pathToUri(editor.getPath())});
})
}
}));
let paths = atom.project.relativizePath(editor.getPath());
if(paths[0] && !path.relative(paths[0], server.projectPath)) {
server.connection.sendCustomRequest('$cquery/textDocumentDidView', {textDocumentUri: Convert.pathToUri(editor.getPath())});
editor.onDidStopChanging(() => {
server.connection.sendCustomRequest('$cquery/textDocumentDidView', {textDocumentUri: Convert.pathToUri(editor.getPath())});
})
}
}));
let editor = atom.workspace.getActiveTextEditor();
if(editor) {
let paths = atom.project.relativizePath(editor.getPath());
if(!path.relative(paths[0], server.projectPath)) {
server.connection.sendCustomRequest('$cquery/textDocumentDidView', {textDocumentUri: Convert.pathToUri(editor.getPath())});
editor.onDidStopChanging(() => {
server.connection.sendCustomRequest('$cquery/textDocumentDidView', {textDocumentUri: Convert.pathToUri(editor.getPath())});
})
}
}
}
}
.filter(e => e && e.getPath() && Convert.pathToUri(e.getPath() || '') === uri);
}