public EditorViewHelper(IEditorArea textView) : base(textView)
 {
     if (textView == null)
     {
         throw new ArgumentNullException("textView");
     }
     _textView = textView;
 }
Esempio n. 2
0
 public EditorViewHelper(IEditorArea textView) : base(textView)
 {
     if (textView == null)
     {
         throw new ArgumentNullException("textView");
     }
     _textView = textView;
 }
Esempio n. 3
0
        /// <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();
        }
Esempio n. 4
0
        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);
        }
Esempio n. 5
0
        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);
        }
Esempio n. 6
0
        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);
        }
Esempio n. 7
0
        /// <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();
        }