private void BuildEvents_OnBuildDone(vsBuildScope Scope, vsBuildAction Action) { if (Action != vsBuildAction.vsBuildActionClean) { if (WESettings.GetBoolean(WESettings.Keys.LessCompileOnBuild)) { _dte.Commands.Raise(GuidList.guidBuildCmdSetString, (int)PkgCmdIDList.cmdBuildLess, null, null); } //LessProjectCompiler.CompileProject(); if (WESettings.GetBoolean(WESettings.Keys.CoffeeScriptCompileOnBuild)) { _dte.Commands.Raise(GuidList.guidBuildCmdSetString, (int)PkgCmdIDList.cmdBuildCoffeeScript, null, null); } //BundleFilesMenu.UpdateBundles(null, true); _dte.Commands.Raise(GuidList.guidBuildCmdSetString, (int)PkgCmdIDList.cmdBuildBundles, null, null); if (WESettings.GetBoolean(WESettings.Keys.RunJsHintOnBuild)) { Dispatcher.CurrentDispatcher.BeginInvoke( new Action(() => JsHintProjectRunner.RunOnAllFilesInProject()), DispatcherPriority.ApplicationIdle, null); } } else if (Action == vsBuildAction.vsBuildActionClean) { System.Threading.Tasks.Task.Run(() => JsHintRunner.Reset()); } }
public void VsTextViewCreated(IVsTextView textViewAdapter) { var textView = EditorAdaptersFactoryService.GetWpfTextView(textViewAdapter); textView.Properties.GetOrCreateSingletonProperty<MinifySelection>(() => new MinifySelection(textViewAdapter, textView)); textView.Properties.GetOrCreateSingletonProperty<JavaScriptFindReferences>(() => new JavaScriptFindReferences(textViewAdapter, textView, Navigator)); textView.Properties.GetOrCreateSingletonProperty<CssExtractToFile>(() => new CssExtractToFile(textViewAdapter, textView)); textView.Properties.GetOrCreateSingletonProperty<NodeModuleGoToDefinition>(() => new NodeModuleGoToDefinition(textViewAdapter, textView)); textView.Properties.GetOrCreateSingletonProperty<ReferenceTagGoToDefinition>(() => new ReferenceTagGoToDefinition(textViewAdapter, textView)); ITextDocument document; if (TextDocumentFactoryService.TryGetTextDocument(textView.TextDataModel.DocumentBuffer, out document)) { JsHintProjectRunner runner = new JsHintProjectRunner(document); textView.Closed += (s, e) => runner.Dispose(); textView.TextBuffer.Properties.GetOrCreateSingletonProperty(() => runner); } }
public void VsTextViewCreated(IVsTextView textViewAdapter) { var textView = EditorAdaptersFactoryService.GetWpfTextView(textViewAdapter); textView.Properties.GetOrCreateSingletonProperty <MinifySelection>(() => new MinifySelection(textViewAdapter, textView)); textView.Properties.GetOrCreateSingletonProperty <JavaScriptFindReferences>(() => new JavaScriptFindReferences(textViewAdapter, textView, Navigator)); textView.Properties.GetOrCreateSingletonProperty <CssExtractToFile>(() => new CssExtractToFile(textViewAdapter, textView)); ITextDocument document; textView.TextDataModel.DocumentBuffer.Properties.TryGetProperty(typeof(ITextDocument), out document); if (document != null) { JsHintProjectRunner runner = new JsHintProjectRunner(document); textView.Closed += (s, e) => runner.Dispose(); textView.TextBuffer.Properties.GetOrCreateSingletonProperty(() => runner); } }