public override bool AddDeclarationHighlighting(IDeclaration node, IHighlightingConsumer consumer, DaemonProcessKind kind) { if (!(node is IClassLikeDeclaration element)) { return(false); } var typeElement = element.DeclaredElement; if (typeElement != null) { if (typeElement.DerivesFromMonoBehaviour()) { AddMonoBehaviourHighlighting(consumer, element, "Script", "Unity script", kind); } else if (typeElement.DerivesFrom(KnownTypes.Editor) || typeElement.DerivesFrom(KnownTypes.EditorWindow)) { AddEditorHighlighting(consumer, element, "Editor", "Custom Unity Editor", kind); } else if (typeElement.DerivesFromScriptableObject()) { AddMonoBehaviourHighlighting(consumer, element, "Scriptable object", "Scriptable Object", kind); } else if (myUnityApi.IsUnityType(typeElement)) { AddUnityTypeHighlighting(consumer, element, "Unity type", "Custom Unity type", kind); } else if (myUnityApi.IsComponentSystemType(typeElement)) { AddUnityECSHighlighting(consumer, element, "Unity ECS", "Unity entity component system object", kind); } return(true); } return(false); }