diff options
author | Geequlim <geequlim@gmail.com> | 2019-06-26 20:21:42 +0800 |
---|---|---|
committer | geequlim <geequlim@gmail.com> | 2019-08-11 13:30:15 +0800 |
commit | 666ed89011551ae7691c8eeeb3fff74e17b48020 (patch) | |
tree | de25d18a89465cf45856cf8484e0f4ed669e632c /modules/gdscript/language_server/gdscript_language_protocol.h | |
parent | 9618b0c63e3330865350bd8bbc6a9d2faf9dd26c (diff) | |
download | redot-engine-666ed89011551ae7691c8eeeb3fff74e17b48020.tar.gz |
Add generate script api to dictionary support
Expose GDScriptLanguageProtocol singleton and classes for editor plugins (Not visiable in class tree)
Fix minor bug in symbol resolve
Diffstat (limited to 'modules/gdscript/language_server/gdscript_language_protocol.h')
-rw-r--r-- | modules/gdscript/language_server/gdscript_language_protocol.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/modules/gdscript/language_server/gdscript_language_protocol.h b/modules/gdscript/language_server/gdscript_language_protocol.h index be4a7cd47c..1d7ed70fb0 100644 --- a/modules/gdscript/language_server/gdscript_language_protocol.h +++ b/modules/gdscript/language_server/gdscript_language_protocol.h @@ -52,8 +52,8 @@ class GDScriptLanguageProtocol : public JSONRPC { WebSocketServer *server; int lastest_client_id; - GDScriptTextDocument text_document; - GDScriptWorkspace workspace; + Ref<GDScriptTextDocument> text_document; + Ref<GDScriptWorkspace> workspace; void on_data_received(int p_id); void on_client_connected(int p_id, const String &p_protocal); @@ -72,7 +72,9 @@ protected: public: _FORCE_INLINE_ static GDScriptLanguageProtocol *get_singleton() { return singleton; } - _FORCE_INLINE_ GDScriptWorkspace &get_workspace() { return workspace; } + _FORCE_INLINE_ Ref<GDScriptWorkspace> get_workspace() { return workspace; } + _FORCE_INLINE_ Ref<GDScriptTextDocument> get_text_document() { return text_document; } + _FORCE_INLINE_ bool is_initialized() const { return _initialized; } void poll(); Error start(int p_port); |