This commit is contained in:
Alex Dima
2016-02-12 17:29:22 +01:00
parent 98b3482a49
commit d27f694455
21 changed files with 54 additions and 55 deletions

View File

@@ -34,7 +34,7 @@ export default class PHPCompletionItemProvider implements CompletionItemProvider
var matches = (name:string) => {
return prefix.length === 0 || name.length > prefix.length && name.substr(0, prefix.length) === prefix;
}
};
for (var name in phpGlobals.globalvariables) {
if (phpGlobals.globalvariables.hasOwnProperty(name) && matches(name)) {

View File

@@ -5,8 +5,8 @@
// file generated from PHP53Schema.xml using php-exclude_generate_php_globals.js
export interface IEntry { description?: string; signature?: string }
export interface IEntries { [name:string]:IEntry }
export interface IEntry { description?: string; signature?: string; }
export interface IEntries { [name:string]:IEntry; }
export var globalfunctions: IEntries = {
password_get_info: {

View File

@@ -68,14 +68,14 @@ namespace RunTrigger {
export let strings = {
onSave: 'onSave',
onType: 'onType'
}
};
export let from = function(value: string): RunTrigger {
if (value === 'onType') {
return RunTrigger.onType;
} else {
return RunTrigger.onSave;
}
}
};
}
export default class PHPValidationProvider {
@@ -175,10 +175,10 @@ export default class PHPValidationProvider {
let diagnostic: vscode.Diagnostic = new vscode.Diagnostic(
new vscode.Range(line, 0, line, Number.MAX_VALUE),
message
)
);
diagnostics.push(diagnostic);
}
}
};
let options = vscode.workspace.rootPath ? { cwd: vscode.workspace.rootPath } : undefined;
let args: string[];