protected override void AppendTooltip(CannotDetermineTernaryExpressionTypeError highlighting, CSharpColorizer colorizer) { colorizer.AppendPlainText("There is no implicit conversion between '"); colorizer.AppendExpressionType(highlighting.ThenType, false, PresenterOptions.FullWithoutParameterNames); colorizer.AppendPlainText("' and '"); colorizer.AppendExpressionType(highlighting.ElseType, false, PresenterOptions.FullWithoutParameterNames); colorizer.AppendPlainText("'"); }
protected override void AppendTooltip(CoVariantArrayConversionWarning highlighting, CSharpColorizer colorizer) { colorizer.AppendPlainText("Co-variant array conversion from '"); colorizer.AppendExpressionType(highlighting.ExpressionType, false, PresenterOptions.NameOnly); colorizer.AppendPlainText("' to '"); colorizer.AppendExpressionType(highlighting.TargetType, false, PresenterOptions.NameOnly); colorizer.AppendPlainText("' can cause run-time exception on write operation"); }
protected override void AppendTooltip(CannotImplicitlyConvertTypeError highlighting, CSharpColorizer colorizer) { bool appendModuleName = highlighting.IExpressionType.HasSameFullNameAs(highlighting.TargetType); colorizer.AppendPlainText("Cannot implicitly convert type '"); colorizer.AppendExpressionType(highlighting.IExpressionType, appendModuleName, PresenterOptions.FullWithoutParameterNames); colorizer.AppendPlainText("' to '"); colorizer.AppendExpressionType(highlighting.TargetType, appendModuleName, PresenterOptions.FullWithoutParameterNames); colorizer.AppendPlainText("'"); }
protected override void AppendTooltip(IncorrectForeachVariableTypeError highlighting, CSharpColorizer colorizer) { bool appendModuleName = highlighting.ElementType.HasSameFullNameAs(highlighting.IteratorType); colorizer.AppendPlainText("Cannot convert element type '"); colorizer.AppendExpressionType(highlighting.ElementType, appendModuleName, PresenterOptions.FullWithoutParameterNames); colorizer.AppendPlainText("' to iterator type '"); colorizer.AppendExpressionType(highlighting.IteratorType, appendModuleName, PresenterOptions.FullWithoutParameterNames); colorizer.AppendPlainText("'"); }
protected override void AppendTooltip(IncorrectAssignmentTypeError 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("'"); }
protected override void AppendTooltip(IncorrectArgumentTypeError highlighting, CSharpColorizer colorizer) { bool appendModuleName = highlighting.ArgumentType.HasSameFullNameAs(highlighting.ParameterType); colorizer.AppendPlainText("Argument type '"); colorizer.AppendExpressionType(highlighting.ArgumentType, appendModuleName, PresenterOptions.FullWithoutParameterNames); colorizer.AppendPlainText("' is not assignable to parameter type '"); colorizer.AppendExpressionType(highlighting.ParameterType, appendModuleName, PresenterOptions.FullWithoutParameterNames); colorizer.AppendPlainText("'"); }
protected override void AppendTooltip(IncorrectExtensionMethodArgumentType2Error highlighting, CSharpColorizer colorizer) { bool appendModuleName = highlighting.ArgumentType.HasSameFullNameAs(highlighting.ParameterType); colorizer.AppendPlainText("Cannot convert instance argument type '"); colorizer.AppendExpressionType(highlighting.ArgumentType, appendModuleName, PresenterOptions.FullWithoutParameterNames); colorizer.AppendPlainText("' to '"); colorizer.AppendExpressionType(highlighting.ParameterType, appendModuleName, PresenterOptions.FullWithoutParameterNames); colorizer.AppendPlainText("'"); }
protected override void AppendTooltip(CannotApplyBinaryOperatorError highlighting, CSharpColorizer colorizer) { colorizer.AppendPlainText("Cannot apply operator '"); colorizer.AppendOperator(highlighting.Sign.GetText()); colorizer.AppendPlainText("' to operands of type '"); colorizer.AppendExpressionType(highlighting.LeftType, false, PresenterOptions.FullWithoutParameterNames); colorizer.AppendPlainText("' and '"); colorizer.AppendExpressionType(highlighting.RightType, false, PresenterOptions.FullWithoutParameterNames); colorizer.AppendPlainText("'"); }
protected override void AppendTooltip(ConflictSuperClassesInTypeParameterConstraintError highlighting, CSharpColorizer colorizer) { colorizer.AppendPlainText("Type parameter '"); colorizer.AppendDeclaredElement(highlighting.TypeParameter, EmptySubstitution.INSTANCE, PresenterOptions.NameOnly); colorizer.AppendPlainText("' inherits conflicting constraints '"); colorizer.AppendExpressionType(highlighting.DeclaredType1, false, PresenterOptions.FullWithoutParameterNames); colorizer.AppendPlainText("' and '"); colorizer.AppendExpressionType(highlighting.DeclaredType2, false, PresenterOptions.FullWithoutParameterNames); colorizer.AppendPlainText("'"); }
protected override void AppendTooltip(IncorrectLambdaBodyExpressionTypeError highlighting, CSharpColorizer colorizer) { bool appendModuleName = highlighting.ValueType.HasSameFullNameAs(highlighting.ReturnType); colorizer.AppendPlainText("Cannot convert expression type '"); colorizer.AppendExpressionType(highlighting.ValueType, appendModuleName, PresenterOptions.FullWithoutParameterNames); colorizer.AppendPlainText("' to return type '"); colorizer.AppendExpressionType(highlighting.ReturnType, appendModuleName, PresenterOptions.FullWithoutParameterNames); colorizer.AppendPlainText("'"); }
protected override void AppendTooltip(IncorrectArrayElementTypeError highlighting, CSharpColorizer colorizer) { IExpressionType sourceType = highlighting.InitializerExpression.GetExpressionType(); bool appendModuleName = sourceType.HasSameFullNameAs(highlighting.TargetType); colorizer.AppendPlainText("Cannot convert expression of type '"); colorizer.AppendExpressionType(sourceType, appendModuleName, PresenterOptions.FullWithoutParameterNames); colorizer.AppendPlainText("' to type '"); colorizer.AppendExpressionType(highlighting.TargetType, appendModuleName, PresenterOptions.FullWithoutParameterNames); colorizer.AppendPlainText("'"); }
protected override void AppendTooltip(ContextValueIsProvidedWarning highlighting, CSharpColorizer colorizer) { colorizer.AppendPlainText("Use value of '"); colorizer.AppendExpressionType(highlighting.ExpressionType, false, PresenterOptions.NameOnly); colorizer.AppendPlainText("' type provided by "); colorizer.AppendPlainText(highlighting.Suggestion.GetSourcePresentation()); }
protected override void AppendTooltip(CannotImplementDynamicInterfaceError highlighting, CSharpColorizer colorizer) { colorizer.AppendPlainText("Cannot implement a "); colorizer.AppendKeyword("dynamic"); colorizer.AppendPlainText(" interface '"); colorizer.AppendExpressionType(highlighting.SuperType, false, PresenterOptions.FullWithoutParameterNames); colorizer.AppendPlainText("'"); }
protected override void AppendTooltip(AsOperatorWithValueTypeError highlighting, CSharpColorizer colorizer) { colorizer.AppendPlainText("The "); colorizer.AppendKeyword("as"); colorizer.AppendPlainText(" operator must be used with a reference or nullable type ('"); colorizer.AppendExpressionType(highlighting.ValueType, false, PresenterOptions.FullWithoutParameterNames); colorizer.AppendPlainText("' is a non-nullable value type)"); }
protected override void AppendTooltip(ConstraintCannotBeDynamicTypeError highlighting, CSharpColorizer colorizer) { colorizer.AppendPlainText("Constraint cannot be a "); colorizer.AppendKeyword("dynamic"); colorizer.AppendPlainText(" type '"); colorizer.AppendExpressionType(highlighting.SuperType, false, PresenterOptions.FullWithoutParameterNames); colorizer.AppendPlainText("'"); }
protected override void AppendTooltip(CannotImplicitlyConvertGotoCaseValueToGoverningTypeWarning highlighting, CSharpColorizer colorizer) { colorizer.AppendPlainText("The '"); colorizer.AppendKeyword("goto case"); colorizer.AppendPlainText("' value is not implicitly convertible to type '"); colorizer.AppendExpressionType(highlighting.GoverningType, false, PresenterOptions.FullWithoutParameterNames); colorizer.AppendPlainText("'"); }
protected override void AppendTooltip(ConflictInheritedValueTypeParameterConstraintError highlighting, CSharpColorizer colorizer) { colorizer.AppendPlainText("Type parameter '"); colorizer.AppendDeclaredElement(highlighting.TypeParameter, EmptySubstitution.INSTANCE, PresenterOptions.NameOnly, highlighting.Declaration); colorizer.AppendPlainText("' inherits conflicting constraints '"); colorizer.AppendKeyword("struct"); colorizer.AppendPlainText("' and '"); colorizer.AppendExpressionType(highlighting.ConflictingType, false, PresenterOptions.FullWithoutParameterNames); colorizer.AppendPlainText("'"); }
protected override void AppendTooltip(CannotInheritFromSealedTypeError highlighting, CSharpColorizer colorizer) { colorizer.AppendPlainText("Cannot inherit from "); colorizer.AppendKeyword("sealed"); colorizer.AppendPlainText(" "); colorizer.AppendElementKind(highlighting.TypeElement); colorizer.AppendPlainText(" '"); colorizer.AppendExpressionType(TypeFactory.CreateType(highlighting.TypeElement), false, PresenterOptions.NameOnly); colorizer.AppendPlainText("'"); }
protected override void AppendTooltip(IncorrectIteratorReturnTypeError highlighting, CSharpColorizer colorizer) { IFunction function = highlighting.Declaration.DeclaredElement; colorizer.AppendPlainText("The body of '"); colorizer.TryAppendDeclaredElement(function, EmptySubstitution.INSTANCE, PresenterOptions.NameOnly); colorizer.AppendPlainText("' cannot be an iterator block because '"); colorizer.AppendExpressionType(highlighting.ReturnType, false, PresenterOptions.FullWithoutParameterNames); colorizer.AppendPlainText("' is not an iterator interface type"); }
protected override void AppendTooltip(CannotApplyUnaryOperatorMultipleCandidatesError highlighting, CSharpColorizer colorizer) { colorizer.AppendPlainText("Cannot apply operator '"); colorizer.AppendOperator(highlighting.Sign); colorizer.AppendPlainText("' to operand of type '"); colorizer.AppendExpressionType(highlighting.OperandType, false, PresenterOptions.FullWithoutParameterNames); colorizer.AppendPlainText("', "); colorizer.AppendPlainText(Environment.NewLine); colorizer.AppendPlainText("candidates are: "); colorizer.AppendPlainText(highlighting.Candidates); }
protected override void AppendTooltip(IncorrectSignatureInDelegateCreationError highlighting, CSharpColorizer colorizer) { IType returnType = highlighting.DelegateSubstitution.Apply(highlighting.CreatedDelegate.InvokeMethod.ReturnType); colorizer.AppendPlainText("Expected a method with '"); colorizer.AppendExpressionType(returnType, false, PresenterOptions.FullWithoutParameterNames); colorizer.AppendPlainText(" "); colorizer.AppendPlainText(highlighting.Reference.GetName()); colorizer.AppendDeclaredElement(highlighting.CreatedDelegate, highlighting.DelegateSubstitution, PresenterOptions.ParameterTypesOnly, highlighting.Reference.GetTreeNode()); colorizer.AppendPlainText("' signature"); }
protected override void AppendTooltip(CollectionInitializerAppliedToNonCollectionError highlighting, CSharpColorizer colorizer) { colorizer.AppendPlainText("Cannot initialize type '"); colorizer.AppendExpressionType(highlighting.CreatedType, false, PresenterOptions.NameOnly); colorizer.AppendPlainText("' with a collection initializer because it does not implement '"); colorizer.AppendNamespaceName("System"); colorizer.AppendOperator("."); colorizer.AppendNamespaceName("Collections"); colorizer.AppendOperator("."); colorizer.AppendInterfaceName("IEnumerable"); colorizer.AppendPlainText("'"); }
protected override void AppendTooltip(CycleInStructLayoutError highlighting, CSharpColorizer colorizer) { IClassMemberDeclaration declaration = highlighting.Declaration; ITypeMember declaredElement = declaration.DeclaredElement; if (declaredElement == null) { return; } colorizer.AppendPlainText(declaredElement.GetElementKindString(false, false, false, false, false).Capitalize()); colorizer.AppendPlainText(" '"); colorizer.AppendDeclaredElement(declaredElement, EmptySubstitution.INSTANCE, PresenterOptions.NameOnly, declaration); colorizer.AppendPlainText("' of type '"); colorizer.AppendExpressionType(highlighting.Type, false, PresenterOptions.NameOnly); colorizer.AppendPlainText("' causes a cycle in the struct layout"); }
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, highlighting.Reference.GetTreeNode()); } else { colorizer.AppendPlainText(explicitImplementation.MemberName); } colorizer.AppendPlainText("'"); }
protected override void AppendTooltip(ClassTypeConstraintMustBeFirstError highlighting, CSharpColorizer colorizer) { colorizer.AppendPlainText("The class type constraint '"); colorizer.AppendExpressionType(highlighting.Constraint.Constraint, false, PresenterOptions.NameOnly); colorizer.AppendPlainText("' must come before any other constraints"); }
protected override void AppendTooltip(CannotInheritFromSpecialTypeError highlighting, CSharpColorizer colorizer) { colorizer.AppendPlainText("Cannot derive from special class '"); colorizer.AppendExpressionType(TypeFactory.CreateType(highlighting.TypeElement), false, PresenterOptions.QualifiedName); colorizer.AppendPlainText("'"); }
protected override void AppendTooltip(ArrayElementIsStaticClassError highlighting, CSharpColorizer colorizer) { colorizer.AppendPlainText("'"); colorizer.AppendExpressionType(highlighting.ScalarType, false, PresenterOptions.FullWithoutParameterNames); colorizer.AppendPlainText("': array elements cannot be of static type"); }
protected override void AppendTooltip(AddressOfManagedTypeError highlighting, CSharpColorizer colorizer) { colorizer.AppendPlainText("Cannot take the address of a variable of a managed type '"); colorizer.AppendExpressionType(highlighting.OperandType, false, PresenterOptions.NameOnly); colorizer.AppendPlainText("'"); }
protected override void AppendTooltip(ConvertNullableToShortFormWarning highlighting, CSharpColorizer colorizer) { colorizer.AppendPlainText("Rewrite as '"); colorizer.AppendExpressionType(highlighting.NullableType, false, PresenterOptions.NameOnly); colorizer.AppendPlainText("'"); }
protected override void AppendTooltip(ArrayElementTypeIsForbiddenError highlighting, CSharpColorizer colorizer) { colorizer.AppendPlainText("Array element type cannot be '"); colorizer.AppendExpressionType(highlighting.ElementType, false, PresenterOptions.FullWithoutParameterNames); colorizer.AppendPlainText("'"); }