From a67486a39ee629acac068a6d014015944cf83bb3 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Fri, 26 Jun 2015 01:14:31 -0300 Subject: improved get_node(), connect(), etc code completion. -properly completes text arguments -includes the "/root" autoloads --- core/script_language.cpp | 8 ++++++++ core/script_language.h | 13 +++++++++++++ 2 files changed, 21 insertions(+) (limited to 'core') diff --git a/core/script_language.cpp b/core/script_language.cpp index 68ac7d0ae7..35c50b1022 100644 --- a/core/script_language.cpp +++ b/core/script_language.cpp @@ -136,6 +136,14 @@ ScriptInstance::~ScriptInstance() { } + +ScriptCodeCompletionCache *ScriptCodeCompletionCache::singleton=NULL; +ScriptCodeCompletionCache::ScriptCodeCompletionCache() { + singleton=this; +} + + + void ScriptLanguage::frame() { diff --git a/core/script_language.h b/core/script_language.h index c1b906e251..7104fe4547 100644 --- a/core/script_language.h +++ b/core/script_language.h @@ -126,6 +126,19 @@ public: virtual ~ScriptInstance(); }; +class ScriptCodeCompletionCache { + + static ScriptCodeCompletionCache *singleton; +public: + + virtual RES get_cached_resource(const String& p_path)=0; + + static ScriptCodeCompletionCache* get_sigleton() { return singleton; } + + ScriptCodeCompletionCache(); + +}; + class ScriptLanguage { public: -- cgit v1.2.3