public async System.Threading.Tasks.Task SearchSelectedError()
        {
            await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync();

            AlfredInput alfredInput = AlfredInputManager.Instance.GetInputFromSelectedError();

            await SearchAsync(alfredInput);
        }
 private void searchComboBox_KeyDown(object sender, KeyEventArgs e)
 {
     ThreadHelper.ThrowIfNotOnUIThread();
     if (!String.IsNullOrEmpty(searchComboBox.Text) && e.Key == Key.Enter && searchComboBox.IsEnabled == true)
     {
         AlfredInput alfredInput = AlfredInputManager.Instance.GetInputForAlfredWindowSearchBar(searchComboBox.Text);
         SearchAsync(alfredInput);
     }
 }
        private void ExecuteToolMenuTextEditorMenu(object sender, System.EventArgs e)
        {
            OleMenuCommand menuItem = sender as OleMenuCommand;
            ToolWindowPane window   = this.package.FindToolWindow(typeof(AlfredWindow), 0, true);

            if ((null == window) || (null == window.Frame))
            {
                throw new NotSupportedException("Cannot create tool window");
            }

            IVsWindowFrame windowFrame = (IVsWindowFrame)window.Frame;

            Microsoft.VisualStudio.ErrorHandler.ThrowOnFailure(windowFrame.Show());

            AlfredWindow alfredWindow = window as AlfredWindow;
            string       selectedText = VisualStudioHandler.GetCurrentLineSelectedText();
            AlfredInput  alfredInput  = AlfredInputManager.Instance.GetInputForAlfredWindowSearchBar(selectedText);

            alfredWindow.SearchSpecificInput(alfredInput);
        }
Esempio n. 4
0
 public AlfredSuggestedActionItem(VisualStudioErrorCodeItem i_Errror)
 {
     m_Input = new AlfredInput(i_Errror.Description, i_Errror.ErrorCode, i_Errror.Project);
 }