public EditorViewHelper(IEditorArea textView) : base(textView) { if (textView == null) { throw new ArgumentNullException("textView"); } _textView = textView; }
public EditorViewHelper(IEditorArea textView) : base(textView) { if (textView == null) { throw new ArgumentNullException("textView"); } _textView = textView; }
/// <summary> /// Initializes a new instance of the <see cref="EditorView"/> class. /// </summary> public EditorView(IEditorArea editorArea) { if (editorArea == null) { throw new ArgumentNullException("editorArea"); } _editorArea = editorArea; _editorCommands = EditorConnector.CreateEditorCommands(_editorArea); _editorKeyBinding = new EditorKeyBinding(this); _editorMouseBinding = new EditorMouseBinding(this); InitializeComponent(); }
public static IAdornmentSurfaceSpaceManager GetAdornmentSurfaceSpaceManager(IEditorArea editorArea) { IAdornmentSurfaceSpaceManager manager; if (editorArea == null) { throw new ArgumentNullException("editorArea"); } IPropertyOwner owner = editorArea; if (!owner.TryGetProperty <IAdornmentSurfaceSpaceManager>("IAdornmentSurfaceSpaceManagerMap", out manager)) { throw new ArgumentException("The specified editorArea doesn't have a space manager."); } return(manager); }
public static Dictionary <Type, IAdornmentSurface> GetSurfaceFactories(IEditorArea textView) { if (textView == null) { throw new ArgumentNullException("textView"); } if (_surfaceFactories == null) { _surfaceFactories = new Dictionary <Type, IAdornmentSurface>(); _surfaceFactories.Add(typeof(BreakpointAdornment), new BreakpointAdornmentSurface(textView)); _surfaceFactories.Add(typeof(TextMarkerAdornment), new TextMarkerAdornmentSurface(textView)); _surfaceFactories.Add(typeof(ToolTipAdornment), new ToolTipAdornmentSurface(textView)); } return(_surfaceFactories); }
public static IAdornmentSurface CreateAdornmentSurface(IEditorArea textView, Type adornmentType) { if (textView == null) { throw new ArgumentNullException("textView"); } if (adornmentType == null) { throw new ArgumentNullException("adornmentType"); } var factories = GetSurfaceFactories(textView); if (factories.ContainsKey(adornmentType)) { return(factories[adornmentType]); } return(null); }
/// <summary> /// Initializes a new instance of the <see cref="EditorView"/> class. /// </summary> public EditorView(IEditorArea editorArea) { if (editorArea == null) { throw new ArgumentNullException("editorArea"); } _editorArea = editorArea; _editorCommands = EditorConnector.CreateEditorCommands(_editorArea); _editorKeyBinding = new EditorKeyBinding(this); _editorMouseBinding = new EditorMouseBinding(this); InitializeComponent(); }