diff --git a/StackOverflowQuickLaunch/Browser.cs b/StackOverflowQuickLaunch/Browser.cs
index 5013230..af1aeda 100644
--- a/StackOverflowQuickLaunch/Browser.cs
+++ b/StackOverflowQuickLaunch/Browser.cs
@@ -1,4 +1,6 @@
-using EnvDTE;
+using System.Diagnostics;
+using Microsoft.VisualStudio.Shell;
+using Microsoft.VisualStudio.Shell.Interop;
namespace Aberus.StackOverflowQuickLaunch
{
@@ -8,14 +10,14 @@ public static void Open(string url, bool openInInternalBrowser, bool newWindow =
{
if(openInInternalBrowser)
{
- var navigateOptions = newWindow ? vsNavigateOptions.vsNavigateOptionsNewWindow : vsNavigateOptions.vsNavigateOptionsDefault;
+ uint navigateOptions = newWindow ? (uint)__VSWBNAVIGATEFLAGS.VSNWB_ForceNew : 0u;
- var dte = StackOverflowQuickLaunchPackage.GetGlobalService(typeof(DTE)) as DTE;
- dte.ItemOperations.Navigate(url, navigateOptions);
+ var webBrowsingService = Package.GetGlobalService(typeof(IVsWebBrowsingService)) as IVsWebBrowsingService;
+ webBrowsingService.Navigate(url, navigateOptions, out IVsWindowFrame ppFrame);
}
else
{
- System.Diagnostics.Process.Start(url);
+ Process.Start(url);
}
}
}
diff --git a/StackOverflowQuickLaunch/Properties/AssemblyInfo.cs b/StackOverflowQuickLaunch/Properties/AssemblyInfo.cs
index 871f592..0ded4e2 100644
--- a/StackOverflowQuickLaunch/Properties/AssemblyInfo.cs
+++ b/StackOverflowQuickLaunch/Properties/AssemblyInfo.cs
@@ -27,8 +27,8 @@
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
-[assembly: AssemblyVersion("0.9.0.0")]
-[assembly: AssemblyFileVersion("0.9.0.0")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/StackOverflowQuickLaunch/StackOverflowQuickLaunch.csproj b/StackOverflowQuickLaunch/StackOverflowQuickLaunch.csproj
index 52c9378..b06e030 100644
--- a/StackOverflowQuickLaunch/StackOverflowQuickLaunch.csproj
+++ b/StackOverflowQuickLaunch/StackOverflowQuickLaunch.csproj
@@ -1,32 +1,10 @@
-
15.0
- 11.0
+ 15.0
$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)
-
-
-
-
- 4.0
- false
- publish\
- true
- Disk
- false
- Foreground
- 7
- Days
- false
- false
- true
- 0
- 1.0.0.%2a
- false
- true
-
-
+ PackageReference
@@ -40,9 +18,10 @@
Aberus.StackOverflowQuickLaunch
StackOverflowQuickLaunch
false
-
-
v4.5
+ Program
+ $(DevEnvDir)devenv.exe
+ /rootsuffix Exp
true
@@ -65,105 +44,20 @@
x86
False
-
- Program
- C:\Program Files %28x86%29\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\devenv.exe
- /rootsuffix Exp
-
-
- Program
- C:\Program Files %28x86%29\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\devenv.exe
- /rootsuffix Exp
-
-
+
True
-
+
True
-
+
True
-
+
True
-
- ..\packages\Microsoft.VisualStudio.Imaging.14.3.25407\lib\net45\Microsoft.VisualStudio.Imaging.dll
- True
-
-
- ..\packages\Microsoft.VisualStudio.OLE.Interop.7.10.6070\lib\Microsoft.VisualStudio.OLE.Interop.dll
- True
-
-
- ..\packages\Microsoft.VisualStudio.Shell.14.0.14.3.25407\lib\Microsoft.VisualStudio.Shell.14.0.dll
- True
-
-
- ..\packages\Microsoft.VisualStudio.Shell.Immutable.10.0.10.0.30319\lib\net40\Microsoft.VisualStudio.Shell.Immutable.10.0.dll
- True
-
-
- ..\packages\Microsoft.VisualStudio.Shell.Immutable.11.0.11.0.50727\lib\net45\Microsoft.VisualStudio.Shell.Immutable.11.0.dll
- True
-
-
- ..\packages\Microsoft.VisualStudio.Shell.Immutable.12.0.12.0.21003\lib\net45\Microsoft.VisualStudio.Shell.Immutable.12.0.dll
- True
-
-
- ..\packages\Microsoft.VisualStudio.Shell.Immutable.14.0.14.3.25407\lib\net45\Microsoft.VisualStudio.Shell.Immutable.14.0.dll
- True
-
-
- ..\packages\Microsoft.VisualStudio.Shell.Interop.7.10.6071\lib\Microsoft.VisualStudio.Shell.Interop.dll
- True
-
-
- True
- ..\packages\Microsoft.VisualStudio.Shell.Interop.10.0.10.0.30319\lib\Microsoft.VisualStudio.Shell.Interop.10.0.dll
- True
-
-
- True
- ..\packages\Microsoft.VisualStudio.Shell.Interop.11.0.11.0.61030\lib\Microsoft.VisualStudio.Shell.Interop.11.0.dll
- True
-
-
- True
- ..\packages\Microsoft.VisualStudio.Shell.Interop.12.0.12.0.30110\lib\Microsoft.VisualStudio.Shell.Interop.12.0.dll
- True
-
-
- ..\packages\Microsoft.VisualStudio.Shell.Interop.8.0.8.0.50727\lib\Microsoft.VisualStudio.Shell.Interop.8.0.dll
- True
-
-
- ..\packages\Microsoft.VisualStudio.Shell.Interop.9.0.9.0.30729\lib\Microsoft.VisualStudio.Shell.Interop.9.0.dll
- True
-
-
- ..\packages\Microsoft.VisualStudio.TextManager.Interop.7.10.6070\lib\Microsoft.VisualStudio.TextManager.Interop.dll
- True
-
-
- ..\packages\Microsoft.VisualStudio.TextManager.Interop.8.0.8.0.50727\lib\Microsoft.VisualStudio.TextManager.Interop.8.0.dll
- True
-
-
- ..\packages\Microsoft.VisualStudio.Threading.14.1.131\lib\net45\Microsoft.VisualStudio.Threading.dll
- True
-
-
- ..\packages\Microsoft.VisualStudio.Utilities.14.3.25407\lib\net45\Microsoft.VisualStudio.Utilities.dll
- True
-
-
- False
- ..\packages\Microsoft.VisualStudio.Validation.14.1.111\lib\net45\Microsoft.VisualStudio.Validation.dll
-
@@ -226,8 +120,7 @@
Designer
-
-
+
Designer
@@ -251,36 +144,25 @@
Menus.ctmenu
+ Designer
-
- False
- Microsoft .NET Framework 4.5 %28x86 and x64%29
- true
-
-
- False
- .NET Framework 3.5 SP1 Client Profile
- false
-
-
- False
- .NET Framework 3.5 SP1
- false
-
+
+ 14.3.25407
+
+
+ 12.0.30111
+
+
+ 15.9.3039
+ runtime; build; native; contentfiles; analyzers
+ all
+
true
-
-
- This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
-
-
-
\ No newline at end of file
diff --git a/StackOverflowQuickLaunch/StackOverflowQuickLaunchPackage.cs b/StackOverflowQuickLaunch/StackOverflowQuickLaunchPackage.cs
index b3c0ef9..9cb6966 100644
--- a/StackOverflowQuickLaunch/StackOverflowQuickLaunchPackage.cs
+++ b/StackOverflowQuickLaunch/StackOverflowQuickLaunchPackage.cs
@@ -20,7 +20,7 @@ namespace Aberus.StackOverflowQuickLaunch
[PackageRegistration(UseManagedResourcesOnly = true)]
// This attribute is used to register the information needed to show this package
// in the Help/About dialog of Visual Studio.
- [InstalledProductRegistration("#110", "#112", "0.9.0", IconResourceID = 400)]
+ [InstalledProductRegistration("#110", "#112", "1.0.0", IconResourceID = 400)]
// Declare the package guid
[Guid(GuidList.guidStackOverflowQuickLaunchQuickLaunchPkgString)]
// Declare a global search provider supported by this package
diff --git a/StackOverflowQuickLaunch/StackOverflowSearchErrorListCommand.cs b/StackOverflowQuickLaunch/StackOverflowSearchErrorListCommand.cs
index 5e8a911..21322f0 100644
--- a/StackOverflowQuickLaunch/StackOverflowSearchErrorListCommand.cs
+++ b/StackOverflowQuickLaunch/StackOverflowSearchErrorListCommand.cs
@@ -97,7 +97,8 @@ private void MenuItemCallback(object sender, EventArgs e)
if (selected != null && selected.TryGetValue("text", out object text))
{
string description = (string)text;
- description = Regex.Replace(description, "'.*'", "''", RegexOptions.IgnoreCase);
+ if(((StackOverflowQuickLaunchPackage)package).OptionPage.UseGenericSearch)
+ description = Regex.Replace(description, "'.*'", "''", RegexOptions.IgnoreCase);
string searchQuery = selected.TryGetValue("errorcode", out object code) ? $"{code}: {description}" : description;
string url = "https://stackoverflow.com/search?q=" + WebUtility.UrlEncode(searchQuery);
diff --git a/StackOverflowQuickLaunch/StackOverflowSearchOptionPage.cs b/StackOverflowQuickLaunch/StackOverflowSearchOptionPage.cs
index dd5e189..67950d2 100644
--- a/StackOverflowQuickLaunch/StackOverflowSearchOptionPage.cs
+++ b/StackOverflowQuickLaunch/StackOverflowSearchOptionPage.cs
@@ -47,9 +47,6 @@ public bool AlwayShowLink
int showResults = 40;
- //[Category("My Category")]
- //[DisplayName("My Integer Option")]
- //[Description("My integer option")]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
public int ShowResults
{
@@ -98,6 +95,22 @@ public bool OpenInNewTab
}
+ bool useGenericSearch = false;
+
+ [DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
+ public bool UseGenericSearch
+ {
+ get
+ {
+ return useGenericSearch;
+ }
+ set
+ {
+ if (value != useGenericSearch)
+ useGenericSearch = value;
+ }
+ }
+
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
protected override System.Windows.Forms.IWin32Window Window
@@ -127,8 +140,6 @@ protected override void Dispose(bool disposing)
}
}
-
-
public enum Sort {
//[Description("(default)")]
//None = 0,
diff --git a/StackOverflowQuickLaunch/StackOverflowSearchUserControl.Designer.cs b/StackOverflowQuickLaunch/StackOverflowSearchUserControl.Designer.cs
index 010f04e..df352a5 100644
--- a/StackOverflowQuickLaunch/StackOverflowSearchUserControl.Designer.cs
+++ b/StackOverflowQuickLaunch/StackOverflowSearchUserControl.Designer.cs
@@ -29,6 +29,7 @@ protected override void Dispose(bool disposing)
private void InitializeComponent()
{
this.groupBox1 = new System.Windows.Forms.GroupBox();
+ this.checkBox4 = new System.Windows.Forms.CheckBox();
this.checkBox3 = new System.Windows.Forms.CheckBox();
this.checkBox2 = new System.Windows.Forms.CheckBox();
this.checkBox1 = new System.Windows.Forms.CheckBox();
@@ -42,6 +43,7 @@ private void InitializeComponent()
//
// groupBox1
//
+ this.groupBox1.Controls.Add(this.checkBox4);
this.groupBox1.Controls.Add(this.checkBox3);
this.groupBox1.Controls.Add(this.checkBox2);
this.groupBox1.Controls.Add(this.checkBox1);
@@ -56,6 +58,17 @@ private void InitializeComponent()
this.groupBox1.TabStop = false;
this.groupBox1.Text = "Settings";
//
+ // checkBox4
+ //
+ this.checkBox4.AutoSize = true;
+ this.checkBox4.Location = new System.Drawing.Point(10, 123);
+ this.checkBox4.Name = "checkBox4";
+ this.checkBox4.Size = new System.Drawing.Size(238, 17);
+ this.checkBox4.TabIndex = 7;
+ this.checkBox4.Text = "Use generic search for errors (remove literals)";
+ this.checkBox4.UseVisualStyleBackColor = true;
+ this.checkBox4.CheckedChanged += new System.EventHandler(this.checkBox4_CheckedChanged);
+ //
// checkBox3
//
this.checkBox3.AutoSize = true;
@@ -160,5 +173,6 @@ private void InitializeComponent()
private System.Windows.Forms.CheckBox checkBox1;
private System.Windows.Forms.CheckBox checkBox3;
private System.Windows.Forms.CheckBox checkBox2;
+ private System.Windows.Forms.CheckBox checkBox4;
}
}
diff --git a/StackOverflowQuickLaunch/StackOverflowSearchUserControl.cs b/StackOverflowQuickLaunch/StackOverflowSearchUserControl.cs
index 9af59ed..107c319 100644
--- a/StackOverflowQuickLaunch/StackOverflowSearchUserControl.cs
+++ b/StackOverflowQuickLaunch/StackOverflowSearchUserControl.cs
@@ -17,7 +17,6 @@ public partial class StackOverflowSearchUserControl : UserControl
public StackOverflowSearchUserControl()
{
InitializeComponent();
- // this.Initialize();
}
public void Initialize()
@@ -30,6 +29,9 @@ public void Initialize()
this.numericUpDown1.Value = OptionsPage.ShowResults;
this.checkBox1.Checked = OptionsPage.AlwayShowLink;
+ this.checkBox2.Checked = OptionsPage.OpenInInternalBrowser;
+ this.checkBox3.Checked = OptionsPage.OpenInNewTab;
+ this.checkBox4.Checked = OptionsPage.UseGenericSearch;
}
public StackOverflowSearchOptionPage OptionsPage { get; set; }
@@ -37,7 +39,7 @@ public void Initialize()
private void comboBox1_SelectionChangeCommitted(object sender, EventArgs e)
{
Sort sort;
- Enum.TryParse(comboBox1.SelectedValue.ToString(), out sort);
+ Enum.TryParse(comboBox1.SelectedValue.ToString(), out sort);
OptionsPage.Sort = sort;
}
@@ -64,6 +66,11 @@ private void checkBox3_CheckedChanged(object sender, EventArgs e)
{
OptionsPage.OpenInNewTab = checkBox3.Checked;
}
+
+ private void checkBox4_CheckedChanged(object sender, EventArgs e)
+ {
+ OptionsPage.UseGenericSearch = checkBox4.Checked;
+ }
}
///
diff --git a/StackOverflowQuickLaunch/packages.config b/StackOverflowQuickLaunch/packages.config
deleted file mode 100644
index 085a050..0000000
--- a/StackOverflowQuickLaunch/packages.config
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/StackOverflowQuickLaunch/source.extension.vsixmanifest b/StackOverflowQuickLaunch/source.extension.vsixmanifest
index 91ac034..5ac0498 100644
--- a/StackOverflowQuickLaunch/source.extension.vsixmanifest
+++ b/StackOverflowQuickLaunch/source.extension.vsixmanifest
@@ -1,33 +1,30 @@
-
-
- Stack Overflow Quick Launch Search Provider
- A Quick Launch search provider for searching Stack Overflow in Visual Studio
- https://github.com/aberus/StackOverflowQuickLaunch
- License.txt
- Resources\Logo_128x.png
- Resources\Preview_200x.png
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+ Stack Overflow Quick Launch Search Provider
+ A Quick Launch search provider for searching Stack Overflow in Visual Studio
+ https://github.com/aberus/StackOverflowQuickLaunch
+ License.txt
+ https://github.com/aberus/StackOverflowQuickLaunch/blob/develop/README.md#changelog
+ Resources\Logo_128x.png
+ Resources\Preview_200x.png
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+