Beispiel #1
0
        protected override void BuildCompletionDataInternal(IEditorData Editor, char enteredChar)
        {
            var dc = begunNode.Parent as DClassLike;

            if (dc == null || dc.ClassType != DTokens.Class)
            {
                return;
            }

            var classType = DResolver.ResolveClassOrInterface(dc, ResolutionContext.Create(Editor), null) as TemplateIntermediateType;

            if (classType == null)
            {
                return;
            }

            var typesToScan = new List <TemplateIntermediateType>();

            IterateThroughBaseClassesInterfaces(typesToScan, classType);

            foreach (var t in typesToScan)
            {
                foreach (var n in t.Definition)
                {
                    var dm = n as DMethod;
                    if (dm == null ||
                        dm.ContainsAttribute(DTokens.Final, DTokens.Private, DTokens.Static))
                    {
                        continue;                         //TODO: Other attributes?
                    }
                    CompletionDataGenerator.AddCodeGeneratingNodeItem(dm, GenerateOverridingMethodStub(dm, begunNode, !(t is InterfaceType)));
                }
            }
        }