Example #1
0
        protected override void AppendTooltip(IncorrectCompoundAssignmentTypeError highlighting, CSharpColorizer colorizer)
        {
            bool appendModuleName = highlighting.SourceType.HasSameFullNameAs(highlighting.TargetType);

            colorizer.AppendPlainText("Cannot convert source type '");
            colorizer.AppendExpressionType(highlighting.SourceType, appendModuleName, PresenterOptions.FullWithoutParameterNames);
            colorizer.AppendPlainText("' to target type '");
            colorizer.AppendExpressionType(highlighting.TargetType, appendModuleName, PresenterOptions.FullWithoutParameterNames);
            colorizer.AppendPlainText("'");
        }
Example #2
0
 protected override void AppendTooltip(ConditionalLogicOperatorTypesMismatchError highlighting, CSharpColorizer colorizer)
 {
     colorizer.AppendPlainText("In order to be applicable as a short circuit operator a user-defined logical operator ('");
     colorizer.AppendDeclaredElement(highlighting.SignOperator, highlighting.Substitution, PresenterOptions.QualifiedName);
     colorizer.AppendPlainText("') must have the same return type as the type of its 2 parameters");
 }
 protected override void AppendTooltip(CannotInstantiateDynamicTypeError highlighting, CSharpColorizer colorizer)
 {
     colorizer.AppendPlainText("Cannot instantiate '");
     colorizer.AppendKeyword("dynamic");
     colorizer.AppendPlainText("' object");
 }
Example #4
0
 protected override void AppendTooltip(BaseObjectEqualsIsObjectEqualsWarning highlighting, CSharpColorizer colorizer)
 {
     colorizer.AppendPlainText("Call to '");
     colorizer.AppendKeyword("base");
     colorizer.AppendOperator(".");
     colorizer.AppendMethodName("Equals");
     colorizer.AppendPlainText("(...)' is reference equality");
 }
Example #5
0
 protected override void AppendTooltip(AddedAccessorInPrivateImplementationError highlighting, CSharpColorizer colorizer)
 {
     colorizer.AppendPlainText("'");
     colorizer.AppendDeclaredElement(highlighting.Accessor, EmptySubstitution.INSTANCE, PresenterOptions.ForInterfaceMember);
     colorizer.AppendPlainText("' adds an accessor not found in interface member '");
     colorizer.AppendDeclaredElement(highlighting.SuperMember, EmptySubstitution.INSTANCE, PresenterOptions.NameOnly);
     colorizer.AppendPlainText("'");
 }
Example #6
0
 protected override void AppendTooltip(AllIndexersMustHaveSameNameError highlighting, CSharpColorizer colorizer)
 {
     colorizer.AppendPlainText("The '");
     colorizer.AppendClassName("IndexerName");
     colorizer.AppendPlainText("' attribute must be used with the same name on every indexer within a type");
 }
Example #7
0
 protected override void AppendTooltip(AccessToRefOutParameterFromAnonymousMethodError highlighting, CSharpColorizer colorizer)
 {
     colorizer.AppendPlainText("Cannot use '");
     colorizer.AppendKeyword("ref");
     colorizer.AppendPlainText("' or '");
     colorizer.AppendKeyword("out");
     colorizer.AppendPlainText("' parameter '");
     colorizer.AppendDeclaredElement(highlighting.Parameter, EmptySubstitution.INSTANCE, PresenterOptions.NameOnly);
     colorizer.AppendPlainText("' inside an anonymous method body");
 }
Example #8
0
 protected override void AppendTooltip(ConditionalAccessAlwaysNullWarning highlighting, CSharpColorizer colorizer)
 {
     colorizer.AppendPlainText("Conditional access qualifier expression is known to be ");
     colorizer.AppendKeyword("null");
 }
Example #9
0
        protected override void AppendTooltip(CannotAccessExplicitImplementationError highlighting, CSharpColorizer colorizer)
        {
            IExplicitImplementation   explicitImplementation = highlighting.ExplicitImplementation;
            OverridableMemberInstance resolvedMember         = explicitImplementation.Resolve();

            colorizer.AppendPlainText("Cannot access explicit implementation of '");
            colorizer.AppendExpressionType(explicitImplementation.DeclaringType, false, PresenterOptions.NameOnly);
            colorizer.AppendOperator(".");
            if (resolvedMember != null)
            {
                colorizer.AppendDeclaredElement(resolvedMember.Element, resolvedMember.Substitution, PresenterOptions.NameOnly);
            }
            else
            {
                colorizer.AppendPlainText(explicitImplementation.MemberName);
            }
            colorizer.AppendPlainText("'");
        }
 protected override void AppendTooltip(BothRefValueAndClassConstraintError highlighting, CSharpColorizer colorizer)
 {
     colorizer.AppendPlainText("Cannot specify both a constraint class and the '");
     colorizer.AppendKeyword("class");
     colorizer.AppendPlainText("' or '");
     colorizer.AppendKeyword("struct");
     colorizer.AppendPlainText("' constraint");
 }
Example #11
0
 protected override void AppendTooltip(AccessorIsMissingInImplementationError highlighting, CSharpColorizer colorizer)
 {
     colorizer.AppendPlainText("Interface implementation '");
     colorizer.TryAppendDeclaredElement(highlighting.InheritorDeclaration.DeclaredElement, EmptySubstitution.INSTANCE, PresenterOptions.ForInterfaceMember, highlighting.InheritorDeclaration);
     colorizer.AppendPlainText("' is missing accessor '");
     colorizer.AppendDeclaredElement(highlighting.MissedAccessor, EmptySubstitution.INSTANCE, PresenterOptions.NameOnly, highlighting.InheritorDeclaration);
     colorizer.AppendPlainText("' implementation");
 }