예제 #1
0
        private void Run(IEnumerable <QualifiedMemberName> members)
        {
            if (_hostApplication == null)
            {
                _hostApplication = _vbe.HostApplication();
            }

            foreach (var member in members)
            {
                _hostApplication.Run(member);
            }
        }
예제 #2
0
        private async void ExecuteRefreshCommandAsync()
        {
            CanRefresh = _vbe.HostApplication() != null && _state.IsDirty();
            if (!CanRefresh)
            {
                return;
            }
            await Task.Yield();

            IsBusy = true;

            _state.OnParseRequested(this);
        }
예제 #3
0
        private async void ExecuteRefreshCommandAsync(object parameter)
        {
            CanRefresh = _vbe.HostApplication() != null;
            if (!CanRefresh)
            {
                return;
            }

            IsBusy = true;

            Debug.WriteLine("InspectionResultsViewModel.ExecuteRefreshCommand - requesting reparse");
            _state.OnParseRequested(this);
        }
예제 #4
0
        public override bool CanExecute(object parameter)
        {
            var app = _vbe.HostApplication();

            if (app == null || _state.Status != ParserState.Ready)
            {
                return(false);
            }

            // Outlook requires test methods to be located in [ThisOutlookSession] class.
            //return app.ApplicationName != "Outlook";
            return(true);
        }
예제 #5
0
        public override bool CanExecute(object parameter)
        {
            var app = _vbe.HostApplication();

            if (app == null)
            {
                return(false);
            }
            else
            {
                // Outlook requires test methods to be located in [ThisOutlookSession] class.
                return(app.ApplicationName != "Outlook");
            }
        }
        private async void ExecuteRefreshCommandAsync(object parameter)
        {
            CanRefresh = _vbe.HostApplication() != null && _state.IsDirty();
            if (!CanRefresh)
            {
                return;
            }
            await Task.Yield();

            IsBusy = true;

            _logger.Debug("InspectionResultsViewModel.ExecuteRefreshCommand - requesting reparse");
            _state.OnParseRequested(this);
        }
예제 #7
0
 public TestMethod(Declaration declaration, VBE vbe)
 {
     _declaration = declaration;
     _hostApp     = vbe.HostApplication();
 }
예제 #8
0
 public TestMethod(Declaration declaration, VBE vbe)
 {
     _declaration         = declaration;
     _qualifiedMemberName = declaration.QualifiedName;
     _hostApp             = vbe.HostApplication();
 }
예제 #9
0
 public ImplicitActiveSheetReferenceInspection(VBE vbe, RubberduckParserState state)
     : base(state)
 {
     _hostApp = vbe.HostApplication();
 }
예제 #10
0
 public TestMethod(QualifiedMemberName qualifiedMemberName, VBE vbe)
 {
     _qualifiedMemberName = qualifiedMemberName;
     _vbe     = vbe;
     _hostApp = vbe.HostApplication();
 }