private void DocumentSavedHandler(object sender, TextDocumentFileActionEventArgs e)
        {
            if (!WESettings.GetBoolean(WESettings.Keys.EnableJsHint))
            {
                return;
            }

            ITextDocument document = (ITextDocument)sender;

            if (_isDisposed || document.TextBuffer == null)
            {
                return;
            }

            switch (e.FileActionType)
            {
            case FileActionTypes.ContentLoadedFromDisk:
                break;

            case FileActionTypes.DocumentRenamed:
                _runner.Dispose();
                _runner = new JsHintRunner(_document.FilePath);

                goto case FileActionTypes.ContentSavedToDisk;

            case FileActionTypes.ContentSavedToDisk:
                Dispatcher.CurrentDispatcher.BeginInvoke(new Action(_runner.RunCompiler), DispatcherPriority.ApplicationIdle, null);
                break;
            }
        }
        public void Dispose()
        {
            if (!_isDisposed)
            {
                _runner.Dispose();
            }

            _isDisposed = true;
        }