summaryrefslogtreecommitdiff
path: root/modules/gdscript/language_server
diff options
context:
space:
mode:
authorJakob Bouchard <24767889+jakobbouchard@users.noreply.github.com>2022-02-16 09:17:55 -0500
committerJakob Bouchard <24767889+jakobbouchard@users.noreply.github.com>2022-02-16 13:03:05 -0500
commit6553f5c242865f9aadbe2fdab6db6876c44ac472 (patch)
treedbd6922a056a26a57fe0b62551bbfabed512fd99 /modules/gdscript/language_server
parent98b97d34df7f3ab2cafc3847358c231c3d357b40 (diff)
Convert _notification methods to switch - Chunk C
Diffstat (limited to 'modules/gdscript/language_server')
-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");