public ToggleMultilineHistorySelectionCommand(ITextView textView, IRHistoryProvider historyProvider, IRInteractiveWorkflowVisual interactiveWorkflow)
     : base(textView, RGuidList.RCmdSetGuid, RPackageCommandId.icmdToggleMultilineSelection, false)
 {
     _history             = historyProvider.GetAssociatedRHistory(textView);
     _settings            = interactiveWorkflow.Shell.GetService <IRSettings>();
     _interactiveWorkflow = interactiveWorkflow;
 }
Exemple #2
0
 public ToggleMultilineHistorySelectionCommand(ITextView textView, IRHistoryProvider historyProvider, IRInteractiveWorkflow interactiveWorkflow, IRToolsSettings settings)
     : base(textView, RGuidList.RCmdSetGuid, RPackageCommandId.icmdToggleMultilineSelection, false)
 {
     _history             = historyProvider.GetAssociatedRHistory(textView);
     _settings            = settings;
     _interactiveWorkflow = interactiveWorkflow;
 }
Exemple #3
0
 public SaveHistoryCommand(IApplicationShell appShell, ITextView textView, IRHistoryProvider historyProvider, IRInteractiveWorkflow interactiveWorkflow)
     : base(textView, RGuidList.RCmdSetGuid, RPackageCommandId.icmdSaveHistory, false)
 {
     _appShell            = appShell;
     _interactiveWorkflow = interactiveWorkflow;
     _history             = historyProvider.GetAssociatedRHistory(textView);
 }
Exemple #4
0
 public DeleteSelectedHistoryEntriesCommand(ITextView textView, IRHistoryProvider historyProvider, IRInteractiveWorkflowVisual interactiveWorkflow)
     : base(textView, RGuidList.RCmdSetGuid, RPackageCommandId.icmdDeleteSelectedHistoryEntries, false)
 {
     _interactiveWorkflow = interactiveWorkflow;
     _history             = historyProvider.GetAssociatedRHistory(textView);
     _ui = _interactiveWorkflow.Services.UI();
 }
Exemple #5
0
 public SaveHistoryCommand(ITextView textView, IRHistoryProvider historyProvider, IRInteractiveWorkflowVisual interactiveWorkflow)
     : base(textView, RGuidList.RCmdSetGuid, RPackageCommandId.icmdSaveHistory, false)
 {
     _ui = interactiveWorkflow.Shell.UI();
     _interactiveWorkflow = interactiveWorkflow;
     _settings            = _interactiveWorkflow.Shell.GetService <IRSettings>();
     _history             = historyProvider.GetAssociatedRHistory(textView);
 }
Exemple #6
0
 public SendHistoryToSourceCommand(ITextView textView, IRHistoryProvider historyProvider, IRInteractiveWorkflow interactiveWorkflow, IContentTypeRegistryService contentTypeRegistry, IActiveWpfTextViewTracker textViewTracker)
     : base(textView, RGuidList.RCmdSetGuid, RPackageCommandId.icmdSendHistoryToSource, false)
 {
     _textViewTracker     = textViewTracker;
     _interactiveWorkflow = interactiveWorkflow;
     _contentType         = contentTypeRegistry.GetContentType(RContentTypeDefinition.ContentType);
     _history             = historyProvider.GetAssociatedRHistory(textView);
 }
 public SendHistoryToReplCommand(ITextView textView, IRHistoryProvider historyProvider, IRInteractiveWorkflow interactiveWorkflow)
     : base(textView, new [] {
     new CommandId(RGuidList.RCmdSetGuid, RPackageCommandId.icmdSendHistoryToRepl),
     new CommandId(VSConstants.VsStd11, (int)VSConstants.VSStd11CmdID.ExecuteLineInInteractive)
 }, false)
 {
     _interactiveWorkflow = interactiveWorkflow;
     _history             = historyProvider.GetAssociatedRHistory(textView);
 }
        public SendHistoryToSourceCommand(ITextView textView, IRHistoryProvider historyProvider, IRInteractiveWorkflow interactiveWorkflow, IContentTypeRegistryService contentTypeRegistry, IActiveWpfTextViewTracker textViewTracker)
            : base(textView, RGuidList.RCmdSetGuid, RPackageCommandId.icmdSendHistoryToSource, false) {

            _textViewTracker = textViewTracker;
            _interactiveWorkflow = interactiveWorkflow;
            _history = historyProvider.GetAssociatedRHistory(textView);

            _contentTypes.Add(contentTypeRegistry.GetContentType(RContentTypeDefinition.ContentType));
            _contentTypes.Add(contentTypeRegistry.GetContentType(MdProjectionContentTypeDefinition.ContentType));
        }
        public RHistoryWindowVisualComponent(ITextBuffer historyTextBuffer, IRHistoryProvider historyProvider, ITextEditorFactoryService textEditorFactory, IVisualComponentContainer<IRHistoryWindowVisualComponent> container) {
            _container = container;
            _history = historyProvider.GetAssociatedRHistory(historyTextBuffer);

            TextView = CreateTextView(historyTextBuffer, textEditorFactory);
            Control = textEditorFactory.CreateTextViewHost(TextView, false).HostControl;
            Controller = ServiceManagerBase.GetService<ICommandTarget>(TextView);

            TextView.Selection.SelectionChanged += TextViewSelectionChanged;
        }
        public RHistoryWindowVisualComponent(ITextBuffer historyTextBuffer, IRHistoryProvider historyProvider, ITextEditorFactoryService textEditorFactory, IVisualComponentContainer <IRHistoryWindowVisualComponent> container)
        {
            _container = container;
            _history   = historyProvider.GetAssociatedRHistory(historyTextBuffer);

            TextView = CreateTextView(historyTextBuffer, textEditorFactory);
            TextView.Selection.SelectionChanged += TextViewSelectionChanged;

            Control = textEditorFactory.CreateTextViewHost(TextView, false).HostControl;
        }
        public HistorySelectionTextAdornment(IWpfTextView textView, IEditorFormatMapService editorFormatMapService, IRHistoryProvider historyProvider) {
            _textView = textView;
            _layer = textView.GetAdornmentLayer("HistorySelectionTextAdornment");

            _editorFormatMap = editorFormatMapService.GetEditorFormatMap(_textView);
            _history = historyProvider.GetAssociatedRHistory(_textView);

            // Advise to events
            _editorFormatMap.FormatMappingChanged += OnFormatMappingChanged;
            _textView.VisualElement.GotKeyboardFocus += OnGotKeyboardFocus;
            _textView.VisualElement.LostKeyboardFocus += OnLostKeyboardFocus;
            _textView.LayoutChanged += OnLayoutChanged;
            _textView.Closed += OnClosed;
            _history.SelectionChanged += OnSelectionChanged;

            _activeVisualToolset = CreateVisualToolset(ActiveSelectionPropertiesName, SystemColors.HighlightColor);
            _inactiveVisualToolset = CreateVisualToolset(InactiveSelectionPropertiesName, SystemColors.GrayTextColor);
            Redraw();
        }
Exemple #12
0
        public HistorySelectionTextAdornment(IWpfTextView textView, IEditorFormatMapService editorFormatMapService, IRHistoryProvider historyProvider)
        {
            _textView = textView;
            _layer    = textView.GetAdornmentLayer("HistorySelectionTextAdornment");

            _editorFormatMap = editorFormatMapService.GetEditorFormatMap(_textView);
            _history         = historyProvider.GetAssociatedRHistory(_textView);

            // Advise to events
            _editorFormatMap.FormatMappingChanged     += OnFormatMappingChanged;
            _textView.VisualElement.GotKeyboardFocus  += OnGotKeyboardFocus;
            _textView.VisualElement.LostKeyboardFocus += OnLostKeyboardFocus;
            _textView.LayoutChanged   += OnLayoutChanged;
            _textView.Closed          += OnClosed;
            _history.SelectionChanged += OnSelectionChanged;

            _activeVisualToolset   = CreateVisualToolset(ActiveSelectionPropertiesName, SystemColors.HighlightColor);
            _inactiveVisualToolset = CreateVisualToolset(InactiveSelectionPropertiesName, SystemColors.GrayTextColor);
            Redraw();
        }
Exemple #13
0
 public CopySelectedHistoryCommand(ITextView textView, IRHistoryProvider historyProvider, IRInteractiveWorkflow interactiveWorkflow)
     : base(textView, VSConstants.GUID_VSStandardCommandSet97, (int)VSConstants.VSStd97CmdID.Copy, false)
 {
     _interactiveWorkflow = interactiveWorkflow;
     _history             = historyProvider.GetAssociatedRHistory(textView);
 }
Exemple #14
0
 public LoadHistoryCommand(ITextView textView, IRHistoryProvider historyProvider, IRInteractiveWorkflowVisual interactiveWorkflow)
     : base(textView, RGuidList.RCmdSetGuid, RPackageCommandId.icmdLoadHistory, false)
 {
     _interactiveWorkflow = interactiveWorkflow;
     _history             = historyProvider.GetAssociatedRHistory(textView);
 }
 public ToggleMultilineHistorySelectionCommand(ITextView textView, IRHistoryProvider historyProvider, IRInteractiveWorkflow interactiveWorkflow, IRToolsSettings settings)
     : base(textView, RGuidList.RCmdSetGuid, RPackageCommandId.icmdToggleMultilineSelection, false) {
     _history = historyProvider.GetAssociatedRHistory(textView);
     _settings = settings;
     _interactiveWorkflow = interactiveWorkflow;
 }
 public HistoryWindowVsStd97CmdIdSelectAllCommand(ITextView textView, IRHistoryProvider historyProvider, IRInteractiveWorkflow interactiveWorkflow)
     : base(textView, SelectAllCommandIds, false) {
     _interactiveWorkflow = interactiveWorkflow;
     _history = historyProvider.GetAssociatedRHistory(textView);
 }
 public DeleteSelectedHistoryEntriesCommand(ITextView textView, IRHistoryProvider historyProvider, IRInteractiveWorkflow interactiveWorkflow)
     : base(textView, RGuidList.RCmdSetGuid, RPackageCommandId.icmdDeleteSelectedHistoryEntries, false) {
     _interactiveWorkflow = interactiveWorkflow;
     _history = historyProvider.GetAssociatedRHistory(textView);
 }
 protected NavigationCommandBase(ITextView textView, IRHistoryProvider historyProvider, params VSConstants.VSStd2KCmdID[] ids)
     : base(textView, GetCommandIds(ids), false)
 {
     History = historyProvider.GetAssociatedRHistory(textView);
 }
 protected NavigationCommandBase(ITextView textView, IRHistoryProvider historyProvider, VSConstants.VSStd2KCmdID id)
     : base(textView, VSConstants.VSStd2K, (int)id, false)
 {
     History = historyProvider.GetAssociatedRHistory(textView);
 }
 public CopySelectedHistoryCommand(ITextView textView, IRHistoryProvider historyProvider, IRInteractiveWorkflow interactiveWorkflow)
     : base(textView, VSConstants.GUID_VSStandardCommandSet97, (int)VSConstants.VSStd97CmdID.Copy, false) {
     _interactiveWorkflow = interactiveWorkflow;
     _history = historyProvider.GetAssociatedRHistory(textView);
 }
Exemple #21
0
 public SaveHistoryCommand(IApplicationShell appShell, ITextView textView, IRHistoryProvider historyProvider, IRInteractiveWorkflow interactiveWorkflow)
     : base(textView, RGuidList.RCmdSetGuid, RPackageCommandId.icmdSaveHistory, false) {
     _appShell = appShell;
     _interactiveWorkflow = interactiveWorkflow;
     _history = historyProvider.GetAssociatedRHistory(textView);
 }
Exemple #22
0
 public IMouseProcessor GetAssociatedProcessor(IWpfTextView wpfTextView)
 {
     return(wpfTextView.Properties.GetOrCreateSingletonProperty(() => new HistoryWindowPaneMouseProcessor(_historyProvider.GetAssociatedRHistory(wpfTextView))));
 }
Exemple #23
0
 public HistoryWindowVsStd97CmdIdSelectAllCommand(ITextView textView, IRHistoryProvider historyProvider, IRInteractiveWorkflowVisual interactiveWorkflow)
     : base(textView, SelectAllCommandIds, false)
 {
     _interactiveWorkflow = interactiveWorkflow;
     _history             = historyProvider.GetAssociatedRHistory(textView);
 }
Exemple #24
0
 public DeleteAllHistoryEntriesCommand(ITextView textView, IRHistoryProvider historyProvider, IRInteractiveWorkflow interactiveWorkflow)
     : base(textView, RGuidList.RCmdSetGuid, RPackageCommandId.icmdDeleteAllHistoryEntries, false)
 {
     _interactiveWorkflow = interactiveWorkflow;
     _history             = historyProvider.GetAssociatedRHistory(textView);
 }