protected override bool Execute(VSConstants.VSStd97CmdID commandId, uint nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut) { string moduleId = RequireJSHelper.GetModule(this.TextView.Caret.Position.BufferPosition); string modulePath = this.modules.GetModulePath(moduleId); if (!string.IsNullOrEmpty(modulePath)) { this.dte.OpenFileInPreviewTab(modulePath); return(true); } else { return(false); } }
protected override bool Execute(VSConstants.VSStd97CmdID commandId, uint nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut) { string moduleId = "widgets/" + RequireJSHelper.GetModule(this.TextView.Caret.Position.BufferPosition) + "/viewmodel"; string modulePath = this.modules.GetModulePath(moduleId); if (!string.IsNullOrEmpty(modulePath)) { modulePath = modulePath.Replace("viewmodel", "view").Replace(".js", ".html"); this.dte.OpenFileInPreviewTab(modulePath); return(true); } else { return(false); } }