From 158cef5d3db20a8cf9fdc1113da02df0e24e61ea Mon Sep 17 00:00:00 2001 From: Ad5001 Date: Sun, 30 Apr 2017 18:08:58 +0200 Subject: [PATCH] Pushing Extension --- .vscode/launch.json | 34 ++++ README.md | 31 +++ icon.png | Bin 0 -> 15036 bytes out/src/extension.js | 320 ++++++++++++++++++++++++++++++ out/src/phpDeclaration.js | 153 ++++++++++++++ out/src/phpFunctionSuggestions.js | 91 +++++++++ package.json | 70 +++++++ 7 files changed, 699 insertions(+) create mode 100644 .vscode/launch.json create mode 100644 README.md create mode 100644 icon.png create mode 100644 out/src/extension.js create mode 100644 out/src/phpDeclaration.js create mode 100644 out/src/phpFunctionSuggestions.js create mode 100644 package.json diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..9100050 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,34 @@ +{ + // Use IntelliSense to learn about possible Node.js debug attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "extensionHost", + "request": "launch", + "name": "Lancer l'extension", + "runtimeExecutable": "${execPath}", + "args": [ + "--extensionDevelopmentPath=${workspaceRoot}" + ], + "sourceMaps": true, + "outFiles": [ + "${workspaceRoot}/out/**/*.js" + ], + }, + { + "type": "node", + "request": "launch", + "name": "Lancer le programme", + "program": "${workspaceRoot}/out/src" + }, + { + "type": "node", + "request": "attach", + "name": "Attacher au port", + "address": "localhost", + "port": 5858 + } + ] +} \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..aeae11f --- /dev/null +++ b/README.md @@ -0,0 +1,31 @@ +# PocketMine-IDE + +Add all pocketmine functions & classes from a src. Based on [https://github.com/bschulte/PHP-Autocomplete](https://github.com/bschulte/PHP-Autocomplete) + +## Features + +1. Allows an automatic class completion. +2. Allows an automatic accessible function completion. + +## Requirements + +None + +## Extension Settings + +Set the library/pocketmine path (must not be compiled as .phar) in the settings and reload using command "Index PHP files". +This will include and parse the new library + +## Known Issues + +None so far + +## Release Notes +## 0.0.1 + +Initial release. + +## Links + + +----------------------------------------------------------------------------------------------------------- \ No newline at end of file diff --git a/icon.png b/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..c8ee521fcf139a16297132ac896c93503785067f GIT binary patch literal 15036 zcmWlg15{*v7{(`TwrjI(+qP@7&B^v=+itV5+1k9>wb^!k^PT3NY3|(9xij7O|32^U zd2Xb#q7)(=9vlDwK$MXdR|P!>{=dOM0RUjlJSzI27f>d0QsRKG|9=X)%acKSV4b9O zTmb-h^#3<7KvoV8XeTsKMnM947m^SKf@__>K?}4C7bu|(6mzta8gK=B;hi+)DBvX z(nH?6_9ugrIyigK_ud2FHAxp>mhow96) zy$QNHdarnDj^KFz`(k|i?gRy`jgeE7b7XjTp)Wvw5AY%d8?(FMdMBH6+hV((`swPP z`?A>qOUjRD)x-*rwIQ=<6d*Hwb&D;Kcb^*M><@qCpnZfNLMuEIfkJUXIP z?aeSAMW8jmxW+b7bVr8j0-695k)3^Mc5_uzJ`8Av&`m2gIYDQ1fcgGjSl8rb1jwHm zy@Y^f{+_00pami90tAqyGmHfBX&dy>0qD{Ugai2d=Zd9JqcwNws>Thc8qaR>*Pdu3 zGOmxcN)tHJoUNL-9DCSVFS?s zC}?OFOw3{S6~5j6NW%=&R=ZW!eK+Udufmy^1INeI`5)(&9e2}wmcIQds4;PIw+&wp zh`QTPLOK_63+chz_Fptp7kuqcTUUx-!I8+P9nHgAjSqD;IOoePt9pBmYb-92+RU4rv zt$PC(+}Nx4US$qX^~gY`8S$B|(Wq&$^RGdo6=Xe^af+0cIg`G}j zy7XCMw!?30TB7RDCgf|Zr)_ZNBn_*IUnD9TqfSs+uG{}0h;VwJexKFS`HScnR09Pp zKMaF~npUm3=ZdL4b7{eIX99Yj!_j9xreC+6xv21o%GbVqbVED+<4A&Xx*5j4d#)}2 z<y}j3+PYpxu@uX+;CggPYYKJr$J6*LG7Oc z9Wc9s;*;m+{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#!5;urJ!wBY0(s#f|H5%9%3$)fX?D?Tg#a%|{wCW;ikTLdo%k-7RciFz* z>;u7|O|HDa?$GmM;n1^63r~cPZ#Ei7@cw=zR9;>V4fec``hEiga_becHO1sxxbP`B z#7Vw&6+mUA#1Qc5-M5`C!IvYtPkHkHE8*~EM00q#9cHq(vDsVt;b;z`_@KZ~{#T(< z{p*$E=I_*+9}L(N%m{?O*CK>|_bMRxaEgFu!V1a|XC`rmq9o1PStB~pc0dj?A8)>( zy@vkoGZK?a1k;{n1Z9fNtwWZWT}qd)d1TscRrbU=hm9?l_rf(?9@6wlP^f~fG|{}kn1!y+AN#~C!;VsM$uO*v zCpv`D#HP>OZ0FdEYWFAy?68=GQtVZF+GYIy$=pedANw$WOpy-+ueQV3-aUF4>fp)h^~G>G79Tz zc*aUB(8#FI=11~W;vd+(AE^eBl@_0ql%z+AXskrpQfYEDP-X^{*K*>`1>Fy)Xye9r z=_)O7biGUfkwUbuyyqcBpj)dh(yA*flcdR` zLiEtzukWl812)yUFF{tuS#4u6=fOIkPDU(\w+)/.exec(lineText); + var executeStatic = /::(\w+)/.exec(lineText); + // Check through the list of functions that are included in this file and see if any match + // the starting varter of the word we have so far + var suggestions = []; + // Check what files the current document includes/requires + var currentFileName = document.uri.fsPath.replace(vscode.workspace.rootPath, '').slice(1); + var currentPath = document.uri.fsPath.replace(vscode.workspace.rootPath, '').replace("src/", ""); + // Look through all included/required files for the current document + for (var f in exports.phpFileFunctions) { + // Checking normal functions + if (execute) + for (var func in exports.phpFileFunctions[f]) { + func = exports.phpFileFunctions[f][func]; + if (func.function.indexOf(currentWord) > 0 && execute[1] == currentWord && (func.functionModifiers["public"] || f == currentPath)) { + var newSuggestion = new vscode.CompletionItem(func.function, vscode.CompletionItemKind.Function); + params = func.params; + var parameters = []; + params.forEach(function(value, key) { + if (value) { + params[key] = "$" + value[1]; + parameters[key] = (typeof value[2] !== "undefined" ? value[2] + " " : "") + value[1]; + parameters[key] += typeof value[3] !== "undefined" ? " = " + value[3] : ""; + } + }); + newSuggestion.insertText = func.function+"(" + params.join(", ") + ")"; + newSuggestion.documentation = func.comment; + newSuggestion.detail = "(" + parameters.join(", ") + ")"; + suggestions.push(newSuggestion); + } + }; + // Checking static functions + if (executeStatic) + for (var func in exports.phpFileStaticFunctions[f]) { + func = exports.phpFileStaticFunctions[f][func]; + if (func.function.indexOf(currentWord) > 0 && executeStatic[1] == currentWord) { + var newSuggestion = new vscode.CompletionItem(func.function, vscode.CompletionItemKind.Function); + var params = func.params; + var parameters = []; + params.forEach(function(value, key) { + if (value) { + params[key] = "$" + value[1]; + parameters[key] = (typeof value[2] !== "undefined" ? value[2] + " " : "") + value[1]; + parameters[key] += typeof value[3] !== "undefined" ? " = " + value[3] : ""; + } + }) + newSuggestion.insertText = func.function+"(" + params.join(", ") + ")"; + newSuggestion.documentation = func.comment; + newSuggestion.detail = "(" + parameters.join(", ") + ")"; + suggestions.push(newSuggestion); + } + }; + if (f.indexOf(currentWord) > 0) { + if (clas && (clas[2] == currentWord || clas[3] == "\\" + currentWord)) { // New instance + var currentClass = f.substr(0, f.length - 4).replace(new RegExp("\/", "g"), "\\"); + var params = []; + if (typeof exports.phpFileFunctions[f]["__construct"] !== "undefined") { + params = exports.phpFileFunctions[f]["__construct"].params; + } + params.forEach(function(value, key) { + if (value) params[key] = "$" + value[1]; + }); + if (currentClass.startsWith("\\")) currentClass = currentClass.substr(1); + var newSuggestion = new vscode.CompletionItem(currentClass, vscode.CompletionItemKind.Class); + if (typeof clas[1] == "undefined" && typeof exports.phpFileUses[currentPath] !== "undefined" && typeof exports.phpFileUses[currentPath][currentClass] !== "undefined") { + newSuggestion.insertText = currentClass.split("\\")[currentClass.split("\\").length - 1] + "(" + params.join(", ") + ");"; + } else { + newSuggestion.insertText = "\\" + currentClass + "(" + params.join(", ") + ");"; + } + newSuggestion.detail = "Class " + currentClass; + suggestions.push(newSuggestion); + } else if (use && (use[1] == currentWord || use[2] == "\\" + currentWord)) { // Use + var currentClass = f.substr(0, f.length - 4); + currentClass = currentClass.replace(new RegExp("\/", "g"), "\\"); + if (currentClass.startsWith("\\")) currentClass = currentClass.substr(1); + var newSuggestion = new vscode.CompletionItem(currentClass, vscode.CompletionItemKind.Class); + newSuggestion.detail = "Class " + currentClass; + newSuggestion.insertText = currentClass + ";\n"; + suggestions.push(newSuggestion); + } else if (!(execute && execute[1] == currentWord) && !(executeStatic && executeStatic[1] == currentWord)) { // static classes + var currentClass = f.substr(0, f.length - 4); + currentClass = currentClass.replace(new RegExp("\/", "g"), "\\"); + if (currentClass.startsWith("\\")) currentClass = currentClass.substr(1); + var newSuggestion = new vscode.CompletionItem(currentClass, vscode.CompletionItemKind.Class); + newSuggestion.detail = "Class " + currentClass; + if (typeof exports.phpFileUses[currentPath] !== "undefined" && typeof exports.phpFileUses[currentPath][currentClass] !== "undefined") { + newSuggestion.insertText = currentClass.split("\\")[currentClass.split("\\").length - 1] + "::"; + } else { + newSuggestion.insertText = "\\" + currentClass + "::"; + } + suggestions.push(newSuggestion); + } + } + }; + return suggestions; + } + })); + // Setup our plugin to help with function signatures + context.subscriptions.push(vscode.languages.registerSignatureHelpProvider(phpMode_1.PHP_MODE, new phpFunctionSuggestions_1.PhpSignatureHelpProvider(vscode.workspace.getConfiguration('php')['docsTool']), '(', ',')); + // The command has been defined in the package.json file + // Now provide the implementation of the command with registerCommand + // The commandId parameter must match the command field in package.json + var indexDisposable = vscode.commands.registerCommand('pmide.indexPhpFiles', () => { + // The code you place here will be executed every time your command is executed + indexPhpFiles(); + }); + var printDisposable = vscode.commands.registerCommand('pmide.printPhpFiles', () => { + console.log(Object.keys(exports.phpFileFunctions).length); + console.log(exports.phpFileUses); + }); + context.subscriptions.push(indexDisposable); + context.subscriptions.push(printDisposable); +} +exports.activate = activate; +// this method is called when your extension is deactivated +function deactivate() {} +exports.deactivate = deactivate; + + + + + +// Function to handle the indexing of PHP files +function indexPhpFiles() { + // Clear out the cached data + exports.phpFileUses = {}; + exports.phpFileFunctions = {}; + var indexResult = vscode.workspace.findFiles("**/*.php", "", 1000).then(function(list) { + if (list) { + var p = new Promise(function(resolve, reject) { + list.forEach((phpFile) => { + var path = phpFile.fsPath; + var fileName = path.replace(vscode.workspace.rootPath, "").replace("src/", "").slice(1); + if (!(fileName in exports.phpFileFunctions)) { + exports.phpFileFunctions[fileName] = []; + } + if (!(fileName in exports.phpFileStaticFunctions)) { + exports.phpFileStaticFunctions[fileName] = []; + } + // Read through the PHP file for includes/requires and function definitions + var read = require('fs').readFileSync(path, 'utf8'); + var lineReader = read.split("\n"); + try { + lineReader.forEach(function(line) { + // Thats a bit messy for this one so: $2 = optionnal description comment, $4 = functions specifications (static, public, abstract, final,...), $7 = function name, $8 = arguments, $14 = return of function + var functionRegex = /(\/\*\*?((\s|.|\n)+)\*\/)?\s*(((abstract|public|protected|private|final|static)\s*)*)function\s+(\w+)\(((\s*\w+)?\s*\$\w+\s*(,(\s*\w+)?\s*\$\w+\s*)*\s*)?\)\s*(:\s*(\w+)\s*)?({|;)/mig + var match = functionRegex.exec(line); + if (match) { + // Matching function modifiers + var functionModifiersLitteral = match[4].replace(/\s/, " ").split(" "); + var functionModifiers = { + "abstract": false, + "public": false, + "protected": false, + "private": false, + "final": false, + "static": false + }; + functionModifiersLitteral.forEach(function(modifier) { + functionModifiers[modifier] = true; + }) + var comment = typeof match[3] !== "undefined" ? match[3].replace(/[*]/gim, "") : "From " + fileName; + // Parameters + var params = []; + if (typeof match[8] !== "undefined") match[8].replace(/\s*,\s*/, ",").split(",").forEach(function(m) { + var paramers = /((\w+)\s+)?(\$\w+)(\s*\=[^,)]+)?/.exec(m) + if (typeof paramers !== "undefined" && paramers !== null) params.push([paramers[0], paramers[3], paramers[2], paramers[5]]); // Later use of knowning which equals to what. + }); + // Exporting function + if (!functionModifiers.static) { + exports.phpFileFunctions[fileName][match[7]] = { + function: match[7], + params: params, + functionModifiers: functionModifiers, + comment: comment + }; + } else { + exports.phpFileStaticFunctions[fileName][match[7]] = { + function: match[7], + params: params, + functionModifiers: functionModifiers, + comment: comment + }; + } + } + // Check for uses + var includeRegex = /use\s+((\w+\\)*)(\w+)(\s+as\s+(\w+)\s*)?;/; + match = includeRegex.exec(line); + if (match) { + if (!(fileName in exports.phpFileUses)) { + exports.phpFileUses[fileName] = []; + } + // Check if there is a match of "as" to set it. + var classType = ''; + if (typeof match[4] !== "undefined") { + classType = match[5]; + } else { + classType = match[3]; + } + exports.phpFileUses[fileName][match[1] + match[3]] = classType; + } + }); + } catch (e) { + console.error(e); + } + }); + }) + } else { + console.log("No workspace defined"); + } + }, function(reason) { + console.log("Error: " + reason); + }); + + // Libraries + if (require('fs').existsSync(vscode.workspace.getConfiguration('php')['pocketMinePath'])) { + var libraryResult = require("child_process").execSync("find " + vscode.workspace.getConfiguration('php')['pocketMinePath'] + " -maxdepth 10 -type f | fgrep .php").toString().split("\n"); + if (libraryResult) { + libraryResult.forEach(function(path) { + if (require('fs').existsSync(path)) { + var fileName = path.replace(vscode.workspace.getConfiguration('php')['pocketMinePath'], "").slice(1); + if (!(fileName in exports.phpFileFunctions)) { + exports.phpFileFunctions[fileName] = {}; + } + if (!(fileName in exports.phpFileStaticFunctions)) { + exports.phpFileStaticFunctions[fileName] = []; + } + // Read through the PHP file for includes/requires and function definitions + var read = require('fs').readFileSync(path, 'utf8'); + try { + var lineReader = read.split("\n"); + lineReader.forEach(function(line) { + // Thats a bit messy for this one so: $2 = optionnal description comment, $4 = functions specifications (static, public, abstract, final,...), $7 = function name, $8 = arguments, $14 = return of function + var functionRegex = /(\/\*\*?((\s|.|\n)+)\*\/)?\s*(((abstract|public|protected|private|final|static)\s*)*)function\s+(\w+)\(((\s*\w+)?\s*\$\w+\s*(,(\s*\w+)?\s*\$\w+\s*)*\s*)?\)\s*(:\s*(\w+)\s*)?({|;)/mig + var match = functionRegex.exec(line); + if (match) { + // Matching function modifiers + var functionModifiersLitteral = match[4].replace(/\s/, " ").split(" "); + var functionModifiers = { + "abstract": false, + "public": false, + "protected": false, + "private": false, + "final": false, + "static": false + }; + functionModifiersLitteral.forEach(function(modifier) { + functionModifiers[modifier] = true; + }) + var comment = typeof match[3] !== "undefined" ? match[3].replace(/[*]/gim, "") : "From " + fileName; + // Parameters + var params = []; + if (typeof match[8] !== "undefined") match[8].replace(/\s*,\s*/, ",").split(",").forEach(function(m) { + var paramers = /((\w+)\s+)?(\$\w+)(\s*\=[^,)]+)?/.exec(m) + if (typeof paramers !== "undefined" && paramers !== null) params.push([paramers[0], paramers[3], paramers[2], paramers[5]]); // Later use of knowning which equals to what. + }); + // Exporting function + if (!functionModifiers.static) { + exports.phpFileFunctions[fileName][match[7]] = { + function: match[7], + params: params, + functionModifiers: functionModifiers, + comment: comment + }; + } else { + exports.phpFileStaticFunctions[fileName][match[7]] = { + function: match[7], + params: params, + functionModifiers: functionModifiers, + comment: comment + }; + } + } + }); + } catch (err) { + console.error(err); // Fails silently later + } + } + }); + } else { + console.log("No workspace defined"); + } + } +} +//# sourceMappingURL=extension.js.map \ No newline at end of file diff --git a/out/src/phpDeclaration.js b/out/src/phpDeclaration.js new file mode 100644 index 0000000..8038de4 --- /dev/null +++ b/out/src/phpDeclaration.js @@ -0,0 +1,153 @@ +/*--------------------------------------------------------- + * Copyright (C) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------*/ +'use strict'; +const vscode = require('vscode'); +const cp = require('child_process'); +const path = require('path'); +function definitionLocation(document, position, toolForDocs, includeDocs = true) { + return getGoVersion().then((ver) => { + if (!ver) { + return Promise.resolve(null); + } + if (toolForDocs === 'godoc' || ver.major < 1 || (ver.major === 1 && ver.minor < 6)) { + return definitionLocation_godef(document, position, includeDocs); + } + return definitionLocation_gogetdoc(document, position); + }); +} +exports.definitionLocation = definitionLocation; +function definitionLocation_godef(document, position, includeDocs = true) { + return new Promise((resolve, reject) => { + let wordAtPosition = document.getWordRangeAtPosition(position); + let offset = byteOffsetAt(document, position); + let godef = getBinPath('godef'); + // Spawn `godef` process + let p = cp.execFile(godef, ['-t', '-i', '-f', document.fileName, '-o', offset.toString()], {}, (err, stdout, stderr) => { + try { + if (err && err.code === 'ENOENT') { + promptForMissingTool('godef'); + } + if (err) { + console.log(err); + return resolve(null); + } + ; + let result = stdout.toString(); + let lines = result.split('\n'); + let match = /(.*):(\d+):(\d+)/.exec(lines[0]); + if (!match) { + // TODO: Gotodef on pkg name: + // /usr/local/go/src/html/template\n + return resolve(null); + } + let [_, file, line, col] = match; + let signature = lines[1]; + let godoc = getBinPath('godoc'); + let pkgPath = path.dirname(file); + let definitionInformation = { + file: file, + line: +line - 1, + column: +col - 1, + declarationlines: lines.splice(1), + toolUsed: 'godef', + doc: null, + name: null + }; + if (!includeDocs) { + return resolve(definitionInformation); + } + cp.execFile(godoc, [pkgPath], {}, (err, stdout, stderr) => { + if (err && err.code === 'ENOENT') { + vscode.window.showInformationMessage('The "godoc" command is not available.'); + } + let godocLines = stdout.toString().split('\n'); + let doc = ''; + let sigName = signature.substring(0, signature.indexOf(' ')); + let sigParams = signature.substring(signature.indexOf(' func') + 5); + let searchSignature = 'func ' + sigName + sigParams; + for (let i = 0; i < godocLines.length; i++) { + if (godocLines[i] === searchSignature) { + while (godocLines[++i].startsWith(' ')) { + doc += godocLines[i].substring(4) + '\n'; + } + break; + } + } + if (doc !== '') { + definitionInformation.doc = doc; + } + return resolve(definitionInformation); + }); + } + catch (e) { + reject(e); + } + }); + p.stdin.end(document.getText()); + }); +} +function definitionLocation_gogetdoc(document, position) { + return new Promise((resolve, reject) => { + let wordAtPosition = document.getWordRangeAtPosition(position); + let offset = byteOffsetAt(document, position); + let gogetdoc = getBinPath('gogetdoc'); + let p = cp.execFile(gogetdoc, ['-u', '-json', '-modified', '-pos', document.fileName + ':#' + offset.toString()], {}, (err, stdout, stderr) => { + try { + if (err && err.code === 'ENOENT') { + promptForMissingTool('gogetdoc'); + } + if (err) { + console.log(err); + return resolve(null); + } + ; + let goGetDocOutput = JSON.parse(stdout.toString()); + let match = /(.*):(\d+):(\d+)/.exec(goGetDocOutput.pos); + let definitionInfo = { + file: null, + line: 0, + column: 0, + toolUsed: 'gogetdoc', + declarationlines: goGetDocOutput.decl.split('\n'), + doc: goGetDocOutput.doc, + name: goGetDocOutput.name + }; + if (!match) { + return resolve(definitionInfo); + } + let [_, file, line, col] = match; + definitionInfo.file = match[1]; + definitionInfo.line = +match[2] - 1; + definitionInfo.column = +match[3] - 1; + return resolve(definitionInfo); + } + catch (e) { + reject(e); + } + }); + let documentText = document.getText(); + let documentArchive = document.fileName + '\n'; + documentArchive = documentArchive + Buffer.byteLength(documentText) + '\n'; + documentArchive = documentArchive + documentText; + p.stdin.end(documentArchive); + }); +} +class GoDefinitionProvider { + constructor(toolForDocs) { + this.toolForDocs = 'godoc'; + this.toolForDocs = toolForDocs; + } + provideDefinition(document, position, token) { + return definitionLocation(document, position, this.toolForDocs, false).then(definitionInfo => { + if (definitionInfo == null || definitionInfo.file == null) + return null; + let definitionResource = vscode.Uri.file(definitionInfo.file); + let pos = new vscode.Position(definitionInfo.line, definitionInfo.column); + return new vscode.Location(definitionResource, pos); + }); + } +} +exports.GoDefinitionProvider = GoDefinitionProvider; +//# sourceMappingURL=phpDeclaration.js.map \ No newline at end of file diff --git a/out/src/phpFunctionSuggestions.js b/out/src/phpFunctionSuggestions.js new file mode 100644 index 0000000..98496a4 --- /dev/null +++ b/out/src/phpFunctionSuggestions.js @@ -0,0 +1,91 @@ +'use strict'; +const vscode = require('vscode'); +const vscode_1 = require('vscode'); +// import { definitionLocation } from './phpDeclaration'; +// import { parameters } from './util'; +const extension_1 = require('./extension'); +class PhpSignatureHelpProvider { + constructor(toolForDocs) { + this.toolForDocs = 'phpdoc'; + this.toolForDocs = toolForDocs; + } + provideSignatureHelp(document, position, token) { + let theCall = this.walkBackwardsToBeginningOfCall(document, position); + if (theCall == null) { + return Promise.resolve(null); + } + // Find the name of the function that's being called + let functionNameRange = this.previousTokenPosition(document, theCall.openParen); + let functionName = document.getText(functionNameRange); + let result = new vscode_1.SignatureHelp(); + let declarationText, sig; + let si; + let currentFileName = document.uri.fsPath.replace(vscode.workspace.rootPath, '').slice(1).replace('\\', '/'); + if (currentFileName in extension_1.phpFileIncludes) { + extension_1.phpFileIncludes[currentFileName].forEach(function (file) { + if (file in extension_1.phpFileFunctions) { + // Look through all the functions declared in the included/required file + extension_1.phpFileFunctions[file].forEach(function (func) { + // If the included/required function starts with the letter of our current word then add it to the set of suggestions + if (func.function == functionName) { + si = new vscode_1.SignatureInformation(func.function); + si.parameters = []; + func.params.forEach(function (param) { + si.parameters.push(param); + }); + // Set the documentation of the SignatureInformation to be the full function signature + si.documentation = file + " : " + func.function + "(" + si.parameters.join(',') + ')'; + result.signatures = [si]; + result.activeSignature = 0; + result.activeParameter = Math.min(theCall.commas.length, si.parameters.length - 1); + result.signatures[0].label = functionName + ": " + result.signatures[0].parameters[result.activeParameter]; + } + }); + } + }); + // console.log("Result: ", result); + return Promise.resolve(result); + } + else { + return Promise.resolve([]); + } + } + previousTokenPosition(document, position) { + while (position.character > 0) { + let word = document.getWordRangeAtPosition(position); + if (word) { + return word; + } + position = position.translate(0, -1); + } + return null; + } + walkBackwardsToBeginningOfCall(document, position) { + let currentLine = document.lineAt(position.line).text.substring(0, position.character); + let parenBalance = 0; + let commas = []; + for (let char = position.character; char >= 0; char--) { + switch (currentLine[char]) { + case '(': + parenBalance--; + if (parenBalance < 0) { + return { + openParen: new vscode_1.Position(position.line, char), + commas: commas + }; + } + break; + case ')': + parenBalance++; + break; + case ',': + if (parenBalance === 0) { + commas.push(new vscode_1.Position(position.line, char)); + } + } + } + return null; + } +} +exports.PhpSignatureHelpProvider = PhpSignatureHelpProvider; +//# sourceMappingURL=phpFunctionSuggestions.js.map \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 0000000..c040f35 --- /dev/null +++ b/package.json @@ -0,0 +1,70 @@ +{ + "name": "pocketmine-ide", + "displayName": "PocketMine IDE", + "description": "Implementation of external PocketMine/PHP libs", + "version": "0.0.1", + "publisher": "Ad5001", + "homepage": "https://github.com/Ad5001/PocketMine-IDE", + "keywords": [ + "PocketMine", + "IDE", + "PHP", + "Lib" + ], + "icon": "icon.png", + "author": { + "name": "Ad5001", + "email": "mail@ad5001.eu", + "url": "https://en.ad5001.eu" + }, + "license": "https://raw.githubusercontent.com/BoxOfDevs/Functions/master/LICENSE", + "engines": { + "vscode": "^1.5.0" + }, + "categories": [ + "Other" + ], + "activationEvents": [ + "onCommand:pmide.indexPhpFiles", + "onCommand:pmide.printPhpFiles", + "onLanguage:php" + ], + "main": "./out/src/extension", + "contributes": { + "commands": [{ + "command": "pmide.indexPhpFiles", + "title": "PocketMine IDE - Index PHP Files" + }, + { + "command": "pmide.printPhpFiles", + "title": "PocketMine IDE - Print PHP Files" + } + ], + "configuration": { + "properties": { + "php.pocketMinePath": { + "type": "string", + "default": null, + "description": "The pocketmine/library you want to use path" + } + } + } + }, + "scripts": { + "vscode:prepublish": "tsc -p ./", + "compile": "tsc -watch -p ./", + "postinstall": "node ./node_modules/vscode/bin/install" + }, + "devDependencies": { + "typescript": "^2.0.3", + "vscode": "^1.0.0", + "mocha": "^2.3.3", + "@types/node": "^6.0.40", + "@types/mocha": "^2.2.32" + }, + "__metadata": { + "id": "f6b4e2a7-5b92-41a1-870a-78abef140e5c", + "publisherId": "96452d5f-7333-47a6-9960-9cf179d6f173", + "publisherDisplayName": "Ad5001" + } +} \ No newline at end of file