Skip to content

Commit

Permalink
Version 6.2
Browse files Browse the repository at this point in the history
  • Loading branch information
wmjordan committed Apr 11, 2022
1 parent ba6c0db commit ea659fc
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 58 deletions.
4 changes: 1 addition & 3 deletions Codist/CodistPackage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,6 @@ public static void OpenWebPage(InitStatus status) {
case InitStatus.Upgraded:
Process.Start("https://github.com/wmjordan/Codist/releases");
break;
default:
break;
}
}

Expand Down Expand Up @@ -215,7 +213,7 @@ static void ListEditorCommands() {
sb.AppendLine(item);
}
}
System.Diagnostics.Debug.WriteLine(sb);
Debug.WriteLine(sb);
}
#endregion
}
Expand Down
23 changes: 12 additions & 11 deletions Codist/Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace Codist
{
sealed class Config
{
internal const string CurrentVersion = "6.1.0";
internal const string CurrentVersion = "6.2.0";
const string ThemePrefix = "res:";
const int DefaultIconSize = 20;
internal const string LightTheme = ThemePrefix + "Light", PaleLightTheme = ThemePrefix + "PaleLight", DarkTheme = ThemePrefix + "Dark", PaleDarkTheme = ThemePrefix + "PaleDark", SimpleTheme = ThemePrefix + "Simple";
Expand Down Expand Up @@ -162,16 +162,7 @@ public static Config InitConfig() {
if (System.Version.TryParse(config.Version, out var v) == false
|| v < System.Version.Parse(CurrentVersion)) {
config.InitStatus = InitStatus.Upgraded;
if (v < new Version(5, 4)) {
if (config.SearchEngines.Count == 0) {
ResetSearchEngines(config.SearchEngines);
}
}
if (v < new Version(5, 14)) {
if (config.WrapTexts.Count == 0) {
ResetWrapTexts(config.WrapTexts);
}
}
UpgradeConfig(config, v);
}
return config;
}
Expand All @@ -181,6 +172,16 @@ public static Config InitConfig() {
}
}

static void UpgradeConfig(Config config, Version v) {
if (v < new Version(6, 2)) {
if (v < new Version(5, 14) && config.WrapTexts.Count == 0) {
ResetWrapTexts(config.WrapTexts);
}
config.MarkerOptions |= MarkerOptions.SymbolReference;
__Updated?.Invoke(new ConfigUpdatedEventArgs(config, Features.ScrollbarMarkers));
}
}

public static void LoadConfig(string configPath, StyleFilters styleFilter = StyleFilters.None) {
if (Interlocked.Exchange(ref _LoadingConfig, 1) != 0) {
return;
Expand Down
5 changes: 4 additions & 1 deletion Codist/Helpers/ReflectionHelper.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
using System;
using System.Reflection;
using System.Reflection.Emit;
using AppHelpers;

namespace Codist
{
static class ReflectionHelper
{
public static TDelegate CreateDelegate<TDelegate>(this DynamicMethod method) where TDelegate : class, Delegate {
return method.CreateDelegate(typeof(TDelegate)) as TDelegate;
}

public static Func<TInstance, TField> CreateGetFieldMethod<TInstance, TField>(string name) where TInstance : class where TField : class {
var type = typeof(TInstance);
var fieldInfo = type.GetField(name, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance);
Expand Down
4 changes: 2 additions & 2 deletions Codist/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("WMJ")]
[assembly: AssemblyProduct(nameof(Codist))]
[assembly: AssemblyCopyright("Copyright WMJ, 2021")]
[assembly: AssemblyCopyright("Copyright WMJ, 2022")]
[assembly: AssemblyTrademark(nameof(Codist))]
[assembly: ComVisible(false)]
[assembly: AssemblyVersion("6.0.0.0")]
[assembly: AssemblyFileVersion("6.1.0.7100")]
[assembly: AssemblyFileVersion("6.2.0.7100")]
[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
82 changes: 41 additions & 41 deletions Codist/source.extension.vsixmanifest
Original file line number Diff line number Diff line change
@@ -1,46 +1,46 @@
<?xml version="1.0" encoding="utf-8"?>
<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
<Metadata>
<Identity Id="Codist.WMJ.c7b93d20-621f-4b21-9d28-d51157ef0b94" Version="6.1.0.7120" Language="en-US" Publisher="WMJ" />
<DisplayName>Codist</DisplayName>
<Description xml:space="preserve">A C# programmer's productivity booster which enhances syntax highlighting, quick info (tooltip), navigation bar, scrollbar, display quality, automatically updated version numbers, and brings smart tool bar to code editor.</Description>
<MoreInfo>https://github.com/wmjordan/Codist</MoreInfo>
<License>license.txt</License>
<ReleaseNotes>https://github.com/wmjordan/Codist/releases</ReleaseNotes>
<Icon>icon.png</Icon>
<PreviewImage>preview.png</PreviewImage>
<Tags>coding; programming; productivity; syntax highlight; quick info; reference analysis; code analysis; navigation; comment; tag; line number; scrollbar; line height; assembly version; C#; C; C++; html; markdown</Tags>
</Metadata>
<Installation>
<InstallationTarget Version="[15.0,17.0)" Id="Microsoft.VisualStudio.Pro">
<ProductArchitecture>x86</ProductArchitecture>
</InstallationTarget>
<InstallationTarget Version="[15.0,17.0)" Id="Microsoft.VisualStudio.Community">
<ProductArchitecture>x86</ProductArchitecture>
</InstallationTarget>
<InstallationTarget Version="[15.0,17.0)" Id="Microsoft.VisualStudio.Enterprise">
<ProductArchitecture>x86</ProductArchitecture>
</InstallationTarget>
<InstallationTarget Version="[17.0,18.0)" Id="Microsoft.VisualStudio.Pro">
<ProductArchitecture>amd64</ProductArchitecture>
</InstallationTarget>
<InstallationTarget Version="[17.0,18.0)" Id="Microsoft.VisualStudio.Community">
<ProductArchitecture>amd64</ProductArchitecture>
</InstallationTarget>
<InstallationTarget Version="[17.0,18.0)" Id="Microsoft.VisualStudio.Enterprise">
<ProductArchitecture>amd64</ProductArchitecture>
</InstallationTarget>
</Installation>
<Prerequisites>
<Prerequisite Id="Microsoft.VisualStudio.Component.CoreEditor" Version="[15.0,18.0)" DisplayName="Visual Studio core editor" />
<Prerequisite Id="Microsoft.VisualStudio.Component.Roslyn.LanguageServices" Version="[15.0,18.0)" DisplayName="C# and Visual Basic" />
<Prerequisite Id="Microsoft.VisualStudio.Component.Roslyn.Compiler" Version="[15.0,18.0)" DisplayName="C# and Visual Basic Roslyn Compiler" />
</Prerequisites>
<Assets>
<Asset Type="Microsoft.VisualStudio.MefComponent" d:Source="Project" d:ProjectName="%CurrentProject%" Path="|%CurrentProject%|" />
<Asset Type="Microsoft.VisualStudio.VsPackage" d:Source="Project" d:ProjectName="%CurrentProject%" Path="|%CurrentProject%;PkgdefProjectOutputGroup|" />
<Asset Type="Microsoft.VisualStudio.Analyzer" d:Source="Project" d:ProjectName="%CurrentProject%" Path="|%CurrentProject%|" />
</Assets>
<Metadata>
<Identity Id="Codist.WMJ.c7b93d20-621f-4b21-9d28-d51157ef0b94" Version="6.2.0.7176" Language="en-US" Publisher="WMJ" />
<DisplayName>Codist</DisplayName>
<Description xml:space="preserve">A C# programmer's productivity booster which enhances syntax highlighting, quick info (tooltip), navigation bar, scrollbar, display quality, automatically updated version numbers, and brings smart tool bar to code editor.</Description>
<MoreInfo>https://github.com/wmjordan/Codist</MoreInfo>
<License>license.txt</License>
<ReleaseNotes>https://github.com/wmjordan/Codist/releases</ReleaseNotes>
<Icon>icon.png</Icon>
<PreviewImage>preview.png</PreviewImage>
<Tags>coding; programming; productivity; syntax highlight; quick info; reference analysis; code analysis; navigation; comment; tag; line number; scrollbar; line height; assembly version; C#; C; C++; html; markdown</Tags>
</Metadata>
<Installation>
<InstallationTarget Version="[15.0,17.0)" Id="Microsoft.VisualStudio.Pro">
<ProductArchitecture>x86</ProductArchitecture>
</InstallationTarget>
<InstallationTarget Version="[15.0,17.0)" Id="Microsoft.VisualStudio.Community">
<ProductArchitecture>x86</ProductArchitecture>
</InstallationTarget>
<InstallationTarget Version="[15.0,17.0)" Id="Microsoft.VisualStudio.Enterprise">
<ProductArchitecture>x86</ProductArchitecture>
</InstallationTarget>
<InstallationTarget Version="[17.0,18.0)" Id="Microsoft.VisualStudio.Pro">
<ProductArchitecture>amd64</ProductArchitecture>
</InstallationTarget>
<InstallationTarget Version="[17.0,18.0)" Id="Microsoft.VisualStudio.Community">
<ProductArchitecture>amd64</ProductArchitecture>
</InstallationTarget>
<InstallationTarget Version="[17.0,18.0)" Id="Microsoft.VisualStudio.Enterprise">
<ProductArchitecture>amd64</ProductArchitecture>
</InstallationTarget>
</Installation>
<Prerequisites>
<Prerequisite Id="Microsoft.VisualStudio.Component.CoreEditor" Version="[15.0,18.0)" DisplayName="Visual Studio core editor" />
<Prerequisite Id="Microsoft.VisualStudio.Component.Roslyn.LanguageServices" Version="[15.0,18.0)" DisplayName="C# and Visual Basic" />
<Prerequisite Id="Microsoft.VisualStudio.Component.Roslyn.Compiler" Version="[15.0,18.0)" DisplayName="C# and Visual Basic Roslyn Compiler" />
</Prerequisites>
<Assets>
<Asset Type="Microsoft.VisualStudio.MefComponent" d:Source="Project" d:ProjectName="%CurrentProject%" Path="|%CurrentProject%|" />
<Asset Type="Microsoft.VisualStudio.VsPackage" d:Source="Project" d:ProjectName="%CurrentProject%" Path="|%CurrentProject%;PkgdefProjectOutputGroup|" />
<Asset Type="Microsoft.VisualStudio.Analyzer" d:Source="Project" d:ProjectName="%CurrentProject%" Path="|%CurrentProject%|" />
</Assets>
</PackageManifest>
<!--
Please add the following element to PackageManifest\\Assets:
Expand Down

0 comments on commit ea659fc

Please sign in to comment.