summaryrefslogtreecommitdiff
path: root/Source/DafnyExtension/ContentType.cs
diff options
context:
space:
mode:
authorGravatar wuestholz <unknown>2013-07-15 18:54:34 -0700
committerGravatar wuestholz <unknown>2013-07-15 18:54:34 -0700
commit832510796b7feb7f48cad8011aa688b2639668fa (patch)
tree14f3800d3b5d972fce96f01185f5710167c3041e /Source/DafnyExtension/ContentType.cs
parent8b69f963879696d40da0a1b845988e17fe9d29d2 (diff)
DafnyExtension: Added support for selecting errors and showing the model in BVD.
Diffstat (limited to 'Source/DafnyExtension/ContentType.cs')
-rw-r--r--Source/DafnyExtension/ContentType.cs16
1 files changed, 16 insertions, 0 deletions
diff --git a/Source/DafnyExtension/ContentType.cs b/Source/DafnyExtension/ContentType.cs
index 950b1e73..c528f4ed 100644
--- a/Source/DafnyExtension/ContentType.cs
+++ b/Source/DafnyExtension/ContentType.cs
@@ -1,4 +1,5 @@
using System.ComponentModel.Composition;
+using Microsoft.VisualStudio.Text.Editor;
using Microsoft.VisualStudio.Utilities;
@@ -11,6 +12,21 @@ namespace DafnyLanguage
[BaseDefinition("code")]
internal static ContentTypeDefinition ContentType = null;
+ [Export(typeof(IWpfTextViewCreationListener))]
+ [ContentType("text")]
+ [TextViewRole(PredefinedTextViewRoles.Document)]
+ internal sealed class DafnyTextViewCreationListener : IWpfTextViewCreationListener
+ {
+ [Export(typeof(AdornmentLayerDefinition))]
+ [Name("ModelAdornment")]
+ [Order(After = PredefinedAdornmentLayers.Selection, Before = PredefinedAdornmentLayers.Text)]
+ [TextViewRole(PredefinedTextViewRoles.Document)]
+ public AdornmentLayerDefinition editorAdornmentLayer = null;
+ public void TextViewCreated(IWpfTextView textView)
+ {
+ }
+ }
+
[Export]
[FileExtension(".dfy")]
[ContentType("dafny")]