mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 08:23:29 +00:00
parent
b38a36923a
commit
4e8e887748
3 changed files with 127 additions and 0 deletions
|
@ -41,6 +41,7 @@
|
|||
#include "scene/resources/packed_scene.h"
|
||||
|
||||
void GDScriptWorkspace::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("didDeleteFiles"), &GDScriptWorkspace::did_delete_files);
|
||||
ClassDB::bind_method(D_METHOD("symbol"), &GDScriptWorkspace::symbol);
|
||||
ClassDB::bind_method(D_METHOD("parse_script", "path", "content"), &GDScriptWorkspace::parse_script);
|
||||
ClassDB::bind_method(D_METHOD("parse_local_script", "path"), &GDScriptWorkspace::parse_local_script);
|
||||
|
@ -50,6 +51,16 @@ void GDScriptWorkspace::_bind_methods() {
|
|||
ClassDB::bind_method(D_METHOD("generate_script_api", "path"), &GDScriptWorkspace::generate_script_api);
|
||||
}
|
||||
|
||||
void GDScriptWorkspace::did_delete_files(const Dictionary &p_params) {
|
||||
Array files = p_params["files"];
|
||||
for (int i = 0; i < files.size(); ++i) {
|
||||
Dictionary file = files[i];
|
||||
String uri = file["uri"];
|
||||
String path = get_file_path(uri);
|
||||
parse_script(path, "");
|
||||
}
|
||||
}
|
||||
|
||||
void GDScriptWorkspace::remove_cache_parser(const String &p_path) {
|
||||
Map<String, ExtendGDScriptParser *>::Element *parser = parse_results.find(p_path);
|
||||
Map<String, ExtendGDScriptParser *>::Element *script = scripts.find(p_path);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue