void Reinitialize()
        {
            mouseProcessorCollection?.Dispose();
            var list = new List <IMouseProcessor>();

            foreach (var provider in mouseProcessorProviders)
            {
                if (!wpfTextView.Roles.ContainsAny(provider.Metadata.TextViewRoles))
                {
                    continue;
                }
                if (!wpfTextView.TextDataModel.ContentType.IsOfAnyType(provider.Metadata.ContentTypes))
                {
                    continue;
                }
                var mouseProcessor = provider.Value.GetAssociatedProcessor(wpfTextView);
                if (mouseProcessor != null)
                {
                    list.Add(mouseProcessor);
                }
            }
            UIElement manipulationElem = null;            //TODO:

            mouseProcessorCollection = new MouseProcessorCollection(wpfTextView.VisualElement, manipulationElem, new DefaultTextViewMouseProcessor(wpfTextView, editorOperationsFactoryService), list.ToArray(), allowEventDelegate);
        }
		void Reinitialize() {
			mouseProcessorCollection?.Dispose();
			var list = new List<IMouseProcessor>();
			foreach (var provider in mouseProcessorProviders) {
				if (!wpfTextView.Roles.ContainsAny(provider.Metadata.TextViewRoles))
					continue;
				if (!wpfTextView.TextDataModel.ContentType.IsOfAnyType(provider.Metadata.ContentTypes))
					continue;
				var mouseProcessor = provider.Value.GetAssociatedProcessor(wpfTextView);
				if (mouseProcessor != null)
					list.Add(mouseProcessor);
			}
			UIElement manipulationElem = null;//TODO:
			mouseProcessorCollection = new MouseProcessorCollection(wpfTextView.VisualElement, manipulationElem, new DefaultTextViewMouseProcessor(wpfTextView, editorOperationsFactoryService), list.ToArray(), allowEventDelegate);
		}
Example #3
0
 void Initialize()
 {
     if (mouseProcessorCollection != null)
     {
         return;
     }
     iconCanvas = new Canvas {
         Background = Brushes.Transparent
     };
     Children.Add(iconCanvas);
     mouseProcessorCollection = new MouseProcessorCollection(VisualElement, null, new DefaultMouseProcessor(), CreateMouseProcessors(), null);
     wpfTextViewHost.TextView.TextDataModel.ContentTypeChanged += TextDataModel_ContentTypeChanged;
     lineInfos       = new Dictionary <object, LineInfo>();
     tagAggregator   = viewTagAggregatorFactoryService.CreateTagAggregator <IGlyphTag>(wpfTextViewHost.TextView);
     editorFormatMap = editorFormatMapService.GetEditorFormatMap(wpfTextViewHost.TextView);
     InitializeGlyphFactories(null, wpfTextViewHost.TextView.TextDataModel.ContentType);
 }
Example #4
0
 void Initialize()
 {
     if (mouseProcessorCollection != null)
     {
         return;
     }
     iconCanvas = new Canvas {
         Background = Brushes.Transparent
     };
     Children.Add(iconCanvas);
     mouseProcessorCollection = new MouseProcessorCollection(VisualElement, null, new DefaultMouseProcessor(), CreateMouseProcessors(), null);
     glyphFactories           = CreateGlyphFactories();
     childCanvases            = glyphFactories.Values.OrderBy(a => a.Order).Select(a => a.Canvas).ToArray();
     foreach (var c in childCanvases)
     {
         iconCanvas.Children.Add(c);
     }
     tagAggregator   = viewTagAggregatorFactoryService.CreateTagAggregator <IGlyphTag>(wpfTextViewHost.TextView);
     editorFormatMap = editorFormatMapService.GetEditorFormatMap(wpfTextViewHost.TextView);
     lineInfos       = new Dictionary <object, LineInfo>();
 }
Example #5
0
		void Initialize() {
			if (mouseProcessorCollection != null)
				return;
			iconCanvas = new Canvas { Background = Brushes.Transparent };
			Children.Add(iconCanvas);
			mouseProcessorCollection = new MouseProcessorCollection(VisualElement, null, new DefaultMouseProcessor(), CreateMouseProcessors(), null);
			wpfTextViewHost.TextView.TextDataModel.ContentTypeChanged += TextDataModel_ContentTypeChanged;
			lineInfos = new Dictionary<object, LineInfo>();
			tagAggregator = viewTagAggregatorFactoryService.CreateTagAggregator<IGlyphTag>(wpfTextViewHost.TextView);
			editorFormatMap = editorFormatMapService.GetEditorFormatMap(wpfTextViewHost.TextView);
			InitializeGlyphFactories(null, wpfTextViewHost.TextView.TextDataModel.ContentType);
		}