Код: Выделить всё
internal class LineTransformSource : ILineTransformSource
{
public LineTransformSource()
{
}
LineTransform ILineTransformSource.GetLineTransform(ITextViewLine line, double yPosition, ViewRelativePosition placement)
{
var lineNumber = line. Snapshot.GetLineFromPosition(line. Start.Position). LineNumber;
return new LineTransform(0, 0, 1.0);
}
}
[Export(typeof(ILineTransformSourceProvider))]
[
//ContentType("any"), // detects everything less the output window
ContentType("C/C++"), // works correctly
ContentType("output"), // the class never get called
]
//[TextViewRole(PredefinedTextViewRoles.Document)]
internal class LineTransformSourceProvider : ILineTransformSourceProvider
{
[Import]
public ITextDocumentFactoryService TextDocumentFactory { get; set; }
[Import]
internal SVsServiceProvider ServiceProvider = null;
ILineTransformSource ILineTransformSourceProvider.Create(IWpfTextView view)
{
return new LineTransformSource();
}
}
«Окно вывода» Я имею в виду это окно, где вы можете вывести данные отладки: < /p>
< /p>
Код: Выделить всё
ContentType("output")
Код: Выделить всё
[Export(typeof(IViewTaggerProvider))]
[ContentType("output")]
[TagType(typeof(ClassificationTag))]
internal class ColorTaggerProvider : IViewTaggerProvider
{
[Import]
internal IClassificationTypeRegistryService _classificationTypeRegistry = null;
[Import]
internal IClassificationFormatMapService _formatMapService = null;
public ITagger CreateTagger(ITextView view, ITextBuffer buffer) where T : ITag
{
return new OutputWindowColorTagger(view, buffer, _classificationTypeRegistry, _formatMapService) as ITagger;
}
}
Подробнее здесь: https://stackoverflow.com/questions/795 ... put-window