示例#1
0
        private void LintCompletedHandler(object sender, CompilerEventArgs e)
        {
            using (JsHintCompiler lint = (JsHintCompiler)sender)
            {
                if (!_isDisposed)
                {
                    System.Threading.Tasks.Task.Run(() =>
                    {
                        ReadResult(e);
                    });
                }

                lint.Completed -= LintCompletedHandler;
            }

            EditorExtensionsPackage.DTE.StatusBar.Clear();
        }
示例#2
0
        public void RunCompiler()
        {
            if (!_isDisposed && !ShouldIgnore(_fileName))
            {
                EditorExtensionsPackage.DTE.StatusBar.Text = "Web Essentials: Running JSHint...";
                JsHintCompiler lint = new JsHintCompiler(Dispatcher.CurrentDispatcher);

                System.Threading.Tasks.Task.Run(() =>
                {
                    using (StreamReader reader = new StreamReader(_fileName))
                    {
                        string content = reader.ReadToEnd();

                        lint.Completed += LintCompletedHandler;
                        lint.Compile(content, _fileName);
                    }
                });
            }
        }
        public void RunCompiler()
        {
            if (!_isDisposed && !ShouldIgnore(_fileName))
            {
                EditorExtensionsPackage.DTE.StatusBar.Text = "Web Essentials: Running JSHint...";
                JsHintCompiler lint = new JsHintCompiler(Dispatcher.CurrentDispatcher);

                System.Threading.Tasks.Task.Run(() =>
                {
                    using (StreamReader reader = new StreamReader(_fileName))
                    {
                        string content = reader.ReadToEnd();

                        lint.Completed += LintCompletedHandler;
                        lint.Compile(content, _fileName);
                    }
                });
            }
        }
        public void RunCompiler()
        {
            if (_isDisposed)
                return;
            if (ShouldIgnore(_fileName))
            {
                // In case this file was added to JSHintIgnore after it was opened, clear the existing errors.
                _provider.Tasks.Clear();
                return;
            }
            EditorExtensionsPackage.DTE.StatusBar.Text = "Web Essentials: Running JSHint...";
            JsHintCompiler lint = new JsHintCompiler(Dispatcher.CurrentDispatcher);

            System.Threading.Tasks.Task.Run(() =>
            {
                using (StreamReader reader = new StreamReader(_fileName))
                {
                    string content = reader.ReadToEnd();

                    lint.Completed += LintCompletedHandler;
                    lint.Compile(content, _fileName);
                }
            });
        }