Example #1
0
        protected override bool CanShowGenerateConstructorAndToString(ScintillaControl sci, int position, ASResult expr, FoundDeclaration found)
        {
            var flags = found.InClass.Flags;

            return(!flags.HasFlag(FlagType.Enum) &&
                   !flags.HasFlag(FlagType.TypeDef) &&
                   base.CanShowGenerateConstructorAndToString(sci, position, expr, found));
        }
Example #2
0
 protected override bool CanShowConvertToConst(ScintillaControl sci, int position, ASResult expr, FoundDeclaration found)
 {
     return(!ASComplete.IsInterpolationExpr(sci, position) &&
            base.CanShowConvertToConst(sci, position, expr, found));
 }
Example #3
0
 protected override bool CanShowImplementInterfaceList(ScintillaControl sci, int position, ASResult expr, FoundDeclaration found)
 {
     return(expr.Context.Separator != "=" && base.CanShowImplementInterfaceList(sci, position, expr, found));
 }
        private static FoundDeclaration GetDeclarationAtLine(ScintillaNet.ScintillaControl Sci, int line)
        {
            FoundDeclaration result = new FoundDeclaration();
            FileModel model = ASContext.Context.CurrentModel;

            foreach (MemberModel member in model.Members)
            {
                if (member.LineFrom <= line && member.LineTo >= line)
                {
                    result.member = member;
                    return result;
                }
            }

            foreach (ClassModel aClass in model.Classes)
            {
                if (aClass.LineFrom <= line && aClass.LineTo >= line)
                {
                    result.inClass = aClass;
                    foreach (MemberModel member in aClass.Members)
                    {
                        if (member.LineFrom <= line && member.LineTo >= line)
                        {
                            result.member = member;
                            return result;
                        }
                    }
                    return result;
                }
            }
            return result;
        }