コード例 #1
0
 protected InspectionBase(RubberduckParserState state, CodeInspectionSeverity defaultSeverity = CodeInspectionSeverity.Warning)
 {
     State = state;
     _defaultSeverity = defaultSeverity;
     Severity = _defaultSeverity;
     _name = GetType().Name;
 }
コード例 #2
0
 public CodeInspectionSetting(string name, string description, CodeInspectionType type, CodeInspectionSeverity severity)
 {
     Name = name;
     Description = description;
     InspectionType = type;
     Severity = severity;
 }
コード例 #3
0
 public CodeInspectionSetting(string name, string description, CodeInspectionType type, CodeInspectionSeverity severity)
 {
     Name           = name;
     Description    = description;
     InspectionType = type;
     Severity       = severity;
 }
コード例 #4
0
        private Image GetSeverityIcon(CodeInspectionSeverity severity)
        {
            var image = _severityIcons[severity];

            image.MakeTransparent(Color.Fuchsia);
            return(image);
        }
コード例 #5
0
 protected InspectionBase(RubberduckParserState state, CodeInspectionSeverity defaultSeverity = CodeInspectionSeverity.Warning)
 {
     State            = state;
     _defaultSeverity = defaultSeverity;
     Severity         = _defaultSeverity;
     _name            = GetType().Name;
 }
コード例 #6
0
 public ParameterNotUsedInspectionResult(string inspection, CodeInspectionSeverity type,
                                         ParserRuleContext context, QualifiedMemberName qualifiedName, bool isInterfaceImplementation, RemoveParametersRefactoring quickFixRefactoring, VBProjectParseResult parseResult)
     : base(inspection, type, qualifiedName.QualifiedModuleName, context)
 {
     _isInterfaceImplementation = isInterfaceImplementation;
     _quickFixRefactoring       = quickFixRefactoring;
     _parseResult = parseResult;
 }
コード例 #7
0
 public ParameterNotUsedInspectionResult(string inspection, CodeInspectionSeverity type,
     ParserRuleContext context, QualifiedMemberName qualifiedName, bool isInterfaceImplementation, RemoveParametersRefactoring quickFixRefactoring, VBProjectParseResult parseResult)
     : base(inspection, type, qualifiedName.QualifiedModuleName, context)
 {
     _isInterfaceImplementation = isInterfaceImplementation;
     _quickFixRefactoring = quickFixRefactoring;
     _parseResult = parseResult;
 }
コード例 #8
0
 /// <summary>
 /// Creates an inspection result.
 /// </summary>
 protected CodeInspectionResultBase(string inspection, CodeInspectionSeverity type, QualifiedModuleName qualifiedName, ParserRuleContext context, CommentNode comment = null)
 {
     _name          = inspection;
     _type          = type;
     _qualifiedName = qualifiedName;
     _context       = context;
     _comment       = comment;
 }
コード例 #9
0
 /// <summary>
 /// Creates an inspection result.
 /// </summary>
 protected CodeInspectionResultBase(string inspection, CodeInspectionSeverity type, QualifiedModuleName qualifiedName, ParserRuleContext context, CommentNode comment = null)
 {
     _name = inspection;
     _type = type;
     _qualifiedName = qualifiedName;
     _context = context;
     _comment = comment;
 }
コード例 #10
0
        public void UpdateCollection(CodeInspectionSeverity severity)
        {
            // commit UI edit
            var item = (CodeInspectionSetting)InspectionSettings.CurrentEditItem;

            InspectionSettings.CommitEdit();

            // update the collection
            InspectionSettings.EditItem(item);
            item.Severity = severity;
            InspectionSettings.CommitEdit();
        }
コード例 #11
0
        /// <summary>
        /// Creates an inspection result.
        /// </summary>
        protected CodeInspectionResultBase(string inspection, CodeInspectionSeverity type, QualifiedModuleName qualifiedName, ParserRuleContext context, CommentNode comment = null)
        {
            if (context == null && comment == null)
            {
                throw new ArgumentNullException("[context] and [comment] cannot both be null.");
            }

            _name          = inspection;
            _type          = type;
            _qualifiedName = qualifiedName;
            _context       = context;
            _comment       = comment;
        }
コード例 #12
0
 public ImplicitVariantReturnTypeInspectionResult(string name, CodeInspectionSeverity severity,
                                                  QualifiedContext <ParserRuleContext> qualifiedContext)
     : base(name, severity, qualifiedContext.ModuleName, qualifiedContext.Context)
 {
 }
コード例 #13
0
 protected ParseTreeInspectionBase(RubberduckParserState state, CodeInspectionSeverity severity = CodeInspectionSeverity.Warning)
     : base(state, severity)
 {
 }
コード例 #14
0
 public MemberNotOnInterfaceInspection(RubberduckParserState state, CodeInspectionSeverity defaultSeverity = CodeInspectionSeverity.Warning)
     : base(state, defaultSeverity)
 {
 }
コード例 #15
0
 public IdentifierNotUsedInspectionResult(string inspection, CodeInspectionSeverity type,
                                          ParserRuleContext context, QualifiedModuleName qualifiedName)
     : base(inspection, type, qualifiedName, context)
 {
 }
コード例 #16
0
 public OptionBaseInspectionResult(string inspection, CodeInspectionSeverity type, QualifiedModuleName qualifiedName)
     : base(inspection, type, new CommentNode("", new QualifiedSelection(qualifiedName, Selection.Home)))
 {
 }
コード例 #17
0
 public ImplicitByRefParameterInspectionResult(string inspection, CodeInspectionSeverity type, QualifiedContext<VBAParser.ArgContext> qualifiedContext)
     : base(inspection,type, qualifiedContext.ModuleName, qualifiedContext.Context)
 {
 }
コード例 #18
0
 public ParameterCanBeByValInspectionResult(string inspection, CodeInspectionSeverity type,
     ParserRuleContext context, QualifiedMemberName qualifiedName)
     : base(inspection, type, qualifiedName.QualifiedModuleName, context)
 {
 }
コード例 #19
0
 protected CodeInspectionResultBase(string inspection, CodeInspectionSeverity type, Declaration target)
     : this(inspection, type, target.QualifiedName.QualifiedModuleName, null)
 {
     _target = target;
 }
コード例 #20
0
 private Image GetSeverityIcon(CodeInspectionSeverity severity)
 {
     var image = _severityIcons[severity];
     image.MakeTransparent(Color.Fuchsia);
     return image;
 }
コード例 #21
0
 public ObsoleteCallStatementUsageInspectionResult(string inspection, CodeInspectionSeverity type,
                                                   QualifiedContext <VBAParser.ExplicitCallStmtContext> qualifiedContext)
     : base(inspection, type, qualifiedContext.ModuleName, qualifiedContext.Context)
 {
 }
 public UnassignedVariableUsageInspectionResult(string inspection, CodeInspectionSeverity type,
     ParserRuleContext context, QualifiedModuleName qualifiedName)
     : base(inspection, type, qualifiedName, context)
 {
 }
コード例 #23
0
 public ImplicitVariantReturnTypeInspectionResult(string name, SyntaxTreeNode node, CodeInspectionSeverity severity)
     : base(name, node, severity)
 {
 }
コード例 #24
0
 public OptionBaseInspectionResult(string inspection, CodeInspectionSeverity type, QualifiedModuleName qualifiedName)
     : base(inspection, type, new CommentNode("", new QualifiedSelection(qualifiedName, Selection.Home)))
 {
 }
コード例 #25
0
 public IdentifierNotAssignedInspectionResult(string inspection, CodeInspectionSeverity type,
     ParserRuleContext context, QualifiedModuleName qualifiedName)
     : base(inspection, type, context, qualifiedName)
 {
 }
 public VariableTypeNotDeclaredInspectionResult(string inspection, CodeInspectionSeverity type, ParserRuleContext context, QualifiedModuleName qualifiedName)
     : base(inspection, type, qualifiedName, context)
 {
 }
コード例 #27
0
 /// <summary>
 /// Creates a comment inspection result.
 /// </summary>
 protected CodeInspectionResultBase(string inspection, CodeInspectionSeverity type, CommentNode comment)
     : this(inspection, type, comment.QualifiedSelection.QualifiedName, null, comment)
 {
 }
コード例 #28
0
 public ImplicitPublicMemberInspectionResult(string inspection, CodeInspectionSeverity type, QualifiedContext <ParserRuleContext> qualifiedContext)
     : base(inspection, type, qualifiedContext.ModuleName, qualifiedContext.Context)
 {
 }
コード例 #29
0
 public ObsoleteCommentSyntaxInspectionResult(string inspection, CodeInspectionSeverity type, CommentNode comment) 
     : base(inspection, type, comment)
 {
 }
 public ImplicitVariantReturnTypeInspectionResult(string name, CodeInspectionSeverity severity, 
     QualifiedContext<ParserRuleContext> qualifiedContext)
     : base(name, severity, qualifiedContext.ModuleName, qualifiedContext.Context)
 {
 }
コード例 #31
0
 public CodeInspectionResultBase(string inspection, SyntaxTreeNode node, CodeInspectionSeverity type)
 {
     _name = inspection;
     _node = node;
     _type = type;
 }
コード例 #32
0
 public NonReturningFunctionInspectionResult(string inspection, CodeInspectionSeverity type, QualifiedContext<ParserRuleContext> qualifiedContext, bool isInterfaceImplementation)
     : base(inspection, type, qualifiedContext.ModuleName, qualifiedContext.Context)
 {
     _isInterfaceImplementation = isInterfaceImplementation;
 }
コード例 #33
0
 public UnassignedVariableUsageInspectionResult(string inspection, CodeInspectionSeverity type,
                                                ParserRuleContext context, QualifiedModuleName qualifiedName)
     : base(inspection, type, qualifiedName, context)
 {
 }
コード例 #34
0
 public ObsoleteTypeHintInspectionResult(string inspection, CodeInspectionSeverity type,
     QualifiedContext qualifiedContext, Declaration declaration)
     : base(inspection, type, qualifiedContext.ModuleName, qualifiedContext.Context)
 {
     _declaration = declaration;
 }
コード例 #35
0
 public MultilineParameterInspectionResult(string inspection, CodeInspectionSeverity severity, ParserRuleContext context, QualifiedMemberName qualifiedName)
     : base(inspection, severity, qualifiedName.QualifiedModuleName, context)
 {
 }
コード例 #36
0
 public ObsoleteTypeHintInspectionResult(string inspection, CodeInspectionSeverity type,
                                         QualifiedContext qualifiedContext, Declaration declaration)
     : base(inspection, type, qualifiedContext.ModuleName, qualifiedContext.Context)
 {
     _declaration = declaration;
 }
コード例 #37
0
 public ObsoleteLetStatementUsageInspectionResult(string inspection, CodeInspectionSeverity type,
                                                  QualifiedContext <ParserRuleContext> qualifiedContext)
     : base(inspection, type, qualifiedContext.ModuleName, qualifiedContext.Context)
 {
 }
コード例 #38
0
 public ObsoleteGlobalInspectionResult(string inspection, CodeInspectionSeverity type, QualifiedContext<ParserRuleContext> context)
     : base(inspection, type, context.ModuleName, context.Context)
 {
 }
コード例 #39
0
 public MultipleDeclarationsInspectionResult(string inspection, CodeInspectionSeverity type, 
     QualifiedContext<ParserRuleContext> qualifiedContext)
     : base(inspection, type, qualifiedContext.ModuleName, qualifiedContext.Context)
 {
 }
コード例 #40
0
 public NonReturningFunctionInspectionResult(string inspection, CodeInspectionSeverity type, QualifiedContext <ParserRuleContext> qualifiedContext, bool isInterfaceImplementation)
     : base(inspection, type, qualifiedContext.ModuleName, qualifiedContext.Context)
 {
     _isInterfaceImplementation = isInterfaceImplementation;
 }
 public ObsoleteLetStatementUsageInspectionResult(string inspection, CodeInspectionSeverity type, 
     QualifiedContext<ParserRuleContext> qualifiedContext)
     : base(inspection, type, qualifiedContext.ModuleName, qualifiedContext.Context)
 {
 }
コード例 #42
0
 public GenericProjectNameInspectionResult(string inspection, CodeInspectionSeverity type, Declaration target, VBProjectParseResult parseResult) 
     : base(inspection, type, target)
 {
     _parseResult = parseResult;
 }
コード例 #43
0
 protected CodeInspectionResultBase(string inspection, CodeInspectionSeverity type, Declaration target)
     : this(inspection, type, target.QualifiedName.QualifiedModuleName, null)
 {
     _target = target;
 }
コード例 #44
0
 public ObsoleteCommentSyntaxInspectionResult(string inspection, CodeInspectionSeverity type, CommentNode comment)
     : base(inspection, type, comment)
 {
 }
コード例 #45
0
 public MultilineParameterInspectionResult(string inspection, CodeInspectionSeverity severity, ParserRuleContext context, QualifiedMemberName qualifiedName)
     : base(inspection, severity, qualifiedName.QualifiedModuleName, context)
 {
     
 }
コード例 #46
0
 public ObsoleteCommentSyntaxInspectionResult(string inspection, SyntaxTreeNode node, CodeInspectionSeverity type)
     : base(inspection, node, type)
 {
 }
コード例 #47
0
 /// <summary>
 /// Creates a comment inspection result.
 /// </summary>
 protected CodeInspectionResultBase(string inspection, CodeInspectionSeverity type, CommentNode comment)
     : this(inspection, type, comment.QualifiedSelection.QualifiedName, null, comment)
 { }
コード例 #48
0
 public ImplicitPublicMemberInspectionResult(string inspection, CodeInspectionSeverity type, QualifiedContext<ParserRuleContext> qualifiedContext)
     : base(inspection,type, qualifiedContext.ModuleName, qualifiedContext.Context)
 {
 }
コード例 #49
0
 public CodeInspection(string name, CodeInspectionType type, CodeInspectionSeverity severity)
 {
     this.Name           = name;
     this.InspectionType = type;
     this.Severity       = severity;
 }
 public ObsoleteCallStatementUsageInspectionResult(string inspection, CodeInspectionSeverity type,
     QualifiedContext<VBAParser.ExplicitCallStmtContext> qualifiedContext)
     : base(inspection, type, qualifiedContext.ModuleName, qualifiedContext.Context)
 {
 }
コード例 #51
0
 public ParameterCanBeByValInspectionResult(string inspection, CodeInspectionSeverity type,
                                            ParserRuleContext context, QualifiedMemberName qualifiedName)
     : base(inspection, type, qualifiedName.QualifiedModuleName, context)
 {
 }
コード例 #52
0
 public MultipleDeclarationsInspectionResult(string inspection, CodeInspectionSeverity type,
                                             QualifiedContext <ParserRuleContext> qualifiedContext)
     : base(inspection, type, qualifiedContext.ModuleName, qualifiedContext.Context)
 {
 }
コード例 #53
0
 public VariableTypeNotDeclaredInspectionResult(string inspection, CodeInspectionSeverity type, ParserRuleContext context, QualifiedModuleName qualifiedName)
     : base(inspection, type, qualifiedName, context)
 {
 }
コード例 #54
0
 public ImplicitByRefParameterInspectionResult(string inspection, CodeInspectionSeverity type, QualifiedContext <VBAParser.ArgContext> qualifiedContext)
     : base(inspection, type, qualifiedContext.ModuleName, qualifiedContext.Context)
 {
 }