public AlfredInput GetInputForAlfredWindowSearchBar(string i_SearchKey)
        {
            ThreadHelper.ThrowIfNotOnUIThread();
            string searchKey  = i_SearchKey;
            string projetType = VisualStudioHandler.GetProjectTypeAsString();

            return(new AlfredInput(searchKey, null, projetType));
        }
        public AlfredInput GetInputFromSelectedError()
        {
            ThreadHelper.ThrowIfNotOnUIThread();

            string errorDescription = null;
            string errorCode        = null;
            string projetType       = VisualStudioHandler.GetProjectTypeAsString();

            if (VisualStudioHandler.HasSelectedError())
            {
                errorDescription = VisualStudioHandler.GetValueFromSelectedError("text");
                errorCode        = VisualStudioHandler.GetValueFromSelectedError("errorcode");
            }

            return(new AlfredInput(errorDescription, errorCode, projetType));
        }
예제 #3
0
        public IEnumerable <SuggestedActionSet> GetSuggestedActions(ISuggestedActionCategorySet requestedActionCategories, SnapshotSpan range, CancellationToken cancellationToken)
        {
            ThreadHelper.ThrowIfNotOnUIThread();
            AlfredSuggestedAction alfredAction = null;

            if (VisualStudioHandler.GetCurrentLineErrorList().Count > 0)
            {
                alfredAction = new AlfredSuggestedAction(m_factory, m_textView, m_textBuffer);
                return(new SuggestedActionSet[] {
                    new SuggestedActionSet(new ISuggestedAction[] { alfredAction })
                });
            }
            else
            {
                return(null);
            }
        }