summaryrefslogtreecommitdiff
path: root/modules/gdscript
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-02-16 20:58:55 +0100
committerGitHub <noreply@github.com>2022-02-16 20:58:55 +0100
commit009254d87c1de573d2abeb273676f22d0bdfc67f (patch)
tree6123649c85c0a6d513224901de8a25bc068c4901 /modules/gdscript
parent5d5f80b5295479ca4e12989394b3a2af8819a1ee (diff)
parent6553f5c242865f9aadbe2fdab6db6876c44ac472 (diff)
Merge pull request #58187 from jakobbouchard/notification-switch-chunk-c
Convert _notification methods to switch - Chunk C
Diffstat (limited to 'modules/gdscript')
-rw-r--r--modules/gdscript/language_server/gdscript_language_server.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/modules/gdscript/language_server/gdscript_language_server.cpp b/modules/gdscript/language_server/gdscript_language_server.cpp
index 33c1c834f1..14337e87da 100644
--- a/modules/gdscript/language_server/gdscript_language_server.cpp
+++ b/modules/gdscript/language_server/gdscript_language_server.cpp
@@ -45,17 +45,20 @@ GDScriptLanguageServer::GDScriptLanguageServer() {
void GDScriptLanguageServer::_notification(int p_what) {
switch (p_what) {
- case NOTIFICATION_ENTER_TREE:
+ case NOTIFICATION_ENTER_TREE: {
start();
- break;
- case NOTIFICATION_EXIT_TREE:
+ } break;
+
+ case NOTIFICATION_EXIT_TREE: {
stop();
- break;
+ } break;
+
case NOTIFICATION_INTERNAL_PROCESS: {
if (started && !use_thread) {
protocol.poll();
}
} break;
+
case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
String host = String(_EDITOR_GET("network/language_server/remote_host"));
int port = (int)_EDITOR_GET("network/language_server/remote_port");