private void LoadMatchingExpressionsForTypes()
        {
            var nonPluralTypes = WorkspaceManager.KnownTypesManager.WholeTypeCache
                                 .Where(c =>
            {
                var(_, expression) = c;
                return(!expression.IsPlural);
            }).ToList();

            foreach (var(type, expressions) in nonPluralTypes
                     .Select(cc => (Type: cc.Value.ClassName, Expressions: KnownExpressionsFromAddons
                                    .Where(c => !(c is SyntaxSkriptEventValueExpression))
                                    .Where(c => !BannedClassNames.Contains(c.ClassName))
                                    .Where(c =>
                                           c.ReturnType == cc.Value.ClassName ||
                                           CheckClassExtendsAnother(c.ReturnType, cc.Value.ClassName)).ToList())))
            {
                ExpressionsForType.TryAdd(type, expressions);
            }

            ExpressionsForType.TryAdd(KnownTypesManager.JavaLangObjectClass,
                                      KnownExpressionsFromAddons.ToList());

            LoadEventExpressionsForTypes(nonPluralTypes);
        }
        private void LoadEventExpressionsForTypes(IReadOnlyCollection <KeyValuePair <string, SkriptType> > nonPluralTypes)
        {
            foreach (var skriptEvent in Workspace.AddonDocumentations.SelectMany(c => c.Events))
            {
                var types = nonPluralTypes
                            .Select(cc => (Type: cc.Value.ClassName, Expressions: KnownExpressionsFromAddons
                                           .OfType <SyntaxSkriptEventValueExpression>()
                                           .Where(c => c.Parent == skriptEvent)
                                           .Where(c => c.ReturnType == cc.Value.ClassName || CheckClassExtendsAnother(c.ReturnType,
                                                                                                                      cc.Value.ClassName)).ToList()))
                            .Where(c => c.Expressions.Count > 0)
                            .Select(c =>
                                    new KeyValuePair <string, IReadOnlyList <SyntaxSkriptExpression> >(c.Type, c.Expressions))
                            .ToList();

                EventExpressionsForType.TryAdd(skriptEvent,
                                               new ConcurrentDictionary <string, IReadOnlyList <SyntaxSkriptExpression> >(types));
            }
        }