From 72f84e6fd12e17e4acb1ac57ddab607e19f20d86 Mon Sep 17 00:00:00 2001 From: Joseph Cloutier Date: Thu, 31 Oct 2024 20:00:31 -0400 Subject: [PATCH] Improve code completion for systems. The completion server runs macros in hopes of getting better completion. However, if you're trying to import a class, the macro won't be able to find it, and it will abort, preventing the server from importing that class for you. By skipping the macro (which doesn't add much worth completing), we avoid this. --- src/echoes/macro/SystemBuilder.hx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/echoes/macro/SystemBuilder.hx b/src/echoes/macro/SystemBuilder.hx index 58ee971..d330b0e 100644 --- a/src/echoes/macro/SystemBuilder.hx +++ b/src/echoes/macro/SystemBuilder.hx @@ -92,6 +92,10 @@ class SystemBuilder { private static function buildInternal(isGenericBuild:Bool):Array { var fields:Array = Context.getBuildFields(); + if(Context.defined("display")) { + return fields; + } + //Information gathering //=====================