Skip to content

Commit

Permalink
Version 4.6:
Browse files Browse the repository at this point in the history
+ Added Ctrl+C command to copy content in the Super Quick Info
! Compacted display of methods in Super Quick Info
+ Added option to show members of interfaces in Super Quick Info
! Used C# specific keyword names for special types in tooltips
! Made syntax highlight compatible to VS 2019 Preview 2
! Tweaked default syntax highlight themes
! Compacted and sorted option page nodes
! Isolated opacity settings from colors in syntax highlight options page
! Optimized drawing of line numbers on scrollbar margin
  • Loading branch information
wmjordan committed Jan 31, 2019
1 parent 610986f commit 598ec5f
Show file tree
Hide file tree
Showing 11 changed files with 16 additions and 20 deletions.
4 changes: 2 additions & 2 deletions Codist/CodistPackage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace Codist
/// <para>The project consists of the following namespace: <see cref="SyntaxHighlight"/> backed by <see cref="Classifiers"/>, <see cref="SmartBars"/>, <see cref="QuickInfo"/>, <see cref="Margins"/>, <see cref="NaviBar"/> etc.</para>
/// </summary>
[PackageRegistration(UseManagedResourcesOnly = true, AllowsBackgroundLoading = true)]
[InstalledProductRegistration("#110", "#112", "4.5", IconResourceID = 400)] // Information on this package for Help/About
[InstalledProductRegistration("#110", "#112", "4.6", IconResourceID = 400)] // Information on this package for Help/About
[Guid(PackageGuidString)]
[ProvideOptionPage(typeof(Options.General), Constants.NameOfMe, "General", 0, 0, true, Sort = 0)]

Expand Down Expand Up @@ -116,7 +116,7 @@ public static void ShowErrorMessageBox(string message, string title, bool error)
protected override async System.Threading.Tasks.Task InitializeAsync(CancellationToken cancellationToken, IProgress<ServiceProgressData> progress) {
await base.InitializeAsync(cancellationToken, progress);

VSColorTheme.ThemeChanged += (args) => {
VSColorTheme.ThemeChanged += _ => {
System.Diagnostics.Debug.WriteLine("Theme changed.");
ThemeHelper.RefreshThemeCache();
};
Expand Down
8 changes: 1 addition & 7 deletions Codist/Commands/NaviBarSearchDeclarationCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,12 @@
namespace Codist.Commands
{
/// <summary>
/// Command handler
/// A command handler which shows the root item menu of Navigation Bar.
/// </summary>
internal static class NaviBarSearchDeclarationCommand
{
/// <summary>
/// Command ID.
/// </summary>
public const int CommandId = 4130;

/// <summary>
/// Command menu group (command set GUID).
/// </summary>
public static readonly Guid CommandSet = new Guid("5EF88028-C0FC-4849-9883-10F4BD2217B3");

public static void Initialize(AsyncPackage package) {
Expand Down
4 changes: 2 additions & 2 deletions Codist/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("WMJ")]
[assembly: AssemblyProduct(nameof(Codist))]
[assembly: AssemblyCopyright("Copyright WMJ, 2018")]
[assembly: AssemblyCopyright("Copyright WMJ, 2019")]
[assembly: AssemblyTrademark(nameof(Codist))]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
[assembly: AssemblyVersion("4.0.0.0")]
[assembly: AssemblyFileVersion("4.5.0.3387")]
[assembly: AssemblyFileVersion("4.6.0.3490")]
2 changes: 1 addition & 1 deletion Codist/SmartBars/SmartBar.CommonEdit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ protected static void FindNext(CommandContext ctx, string t) {
}
}

protected SnapshotSpan Replace(CommandContext ctx, Func<string, string> replaceHandler, bool selectModified) {
protected static SnapshotSpan Replace(CommandContext ctx, Func<string, string> replaceHandler, bool selectModified) {
ctx.KeepToolBar(false);
var firstModified = new SnapshotSpan();
string t = ctx.View.GetFirstSelectionText();
Expand Down
2 changes: 1 addition & 1 deletion Codist/source.extension.vsixmanifest
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?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="4.5.1.3384" Language="en-US" Publisher="WMJ" />
<Identity Id="Codist.WMJ.c7b93d20-621f-4b21-9d28-d51157ef0b94" Version="4.6.0.3486" Language="en-US" Publisher="WMJ" />
<DisplayName>Codist</DisplayName>
<Description xml:space="preserve">A productivity enhancer for C# programmers with advanced syntax highlight, Super Quick Info (code tooltip), Smart Bar (contextual toolbar), Navigation Bar, code structure markers on scrollbar, comment tagger, and more.</Description>
<MoreInfo>https://github.com/wmjordan/Codist</MoreInfo>
Expand Down
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,33 +17,33 @@

## Advanced C# Syntax Highlight

The advanced syntax highlight function highlights every aspect of C# language elements with various styles and font settings, changing font style sizes, changing background and foreground colors, making text semitransparent.
The advanced syntax highlight function highlights every aspect of C# language elements with diverse styles, including using various font families and text styles, enlarging or shrinking font sizes, changing foreground or background colors and transparency.

The following screenshots of the `TestPage.cs` file in the source code project demonstrates possible syntax highlight effects in the Light theme.

![Syntax highlight](doc/highlight1.png)

* The font size of type and member declarations can be enlarged, so it is much easier to spot them.
* Syntax highlight can be applied to braces and parentheses.
* Various syntax identifiers have different styles.
* Various syntax identifiers have different styles, temporary elements such as method parameters and local variables are italic, static symbols are underlined.
* Comment content can be tagged (e.g. _note_).
* Unnecessary code is marked strike-through.
* Keywords are categorized and highlighted with various styles (e.g. `abstract` and `sealed`, `return` and `throw`, etc.).
* Overriding methods (such as `ToString`) can be painted with gradient background color.
* Imported symbols (from external assemblies, e.g. `NotImplementedException`, `ToString`) can be marked with a different style (bold here) from symbols in your code, which are also possible to be styled.
* Overriding members (such as `ToString`) can be painted with gradient background color, so at a glance we know that the marked implementations have overrided their base classes.
* Imported symbols (from external assemblies, e.g. `NotImplementedException`, `ToString`) can be marked with a different style (bold here) from symbols defined in your code.
* All the above styles are customizable.

### Default Syntax Highlight Themes

To quickly get started with advanced syntax highlight, navigate to the *Syntax Highlight* section, click the **Light theme** or **Dark theme** button in the *options* dialog and see them in effect. Don't forget to click the *OK* button to confirm the change.
To quickly get started with advanced syntax highlight, open a C# project, then open the _Options_ dialog, navigate to the *Syntax Highlight* section, click the **Light theme** or **Dark theme** button in the dialog and see changes in effect. Don't forget to click the *OK* button to confirm the changes.

![Load Theme](doc/load-theme.png)

With the **Save** and **Load** buttons, you can backup and share your own syntax highlight settings.

If you mess up your syntax highlight styles, you can press the _Reset_ button to reset all settings to default, or press the _Light theme_ or _Dark theme_ button to reapply predefined themes.

**Note**: There is a known issue in _Codist_ that if you change the theme of Visual Studio, you may have to restart it for the syntax highlight to work properly.
**Note**: There is a known issue in _Codist_ that if you change the theme of Visual Studio, you may have to restart it to make syntax highlight settings to work properly.

From version 4.5 on, it is possible to load only part of the syntax preset or backup theme by unchecking check boxes under _Load following parts when importing themes_.

Expand All @@ -53,6 +53,8 @@

![Style customization](doc/syntax-highlight.png)

From version 4.6 on, it is possible to configure color and opacity individually. If we change the opacity value only, the default syntax color for a syntax definition is used.

Syntax definitions under the _All languages_ section apply to all languages; those under _Comment_ section apply to comment taggers (see below), others apply to corresponding languages accordingly.

**TIP**: Open a document window before you change the syntax theme or tweak the syntax highlight settings. While you change theme, you can see how the styles change in the code document window simultaneously.
Expand Down Expand Up @@ -272,7 +274,7 @@ By default, _Smart Bar_ appears after selection change, you can change the behav

![Smart Bar Options](doc/smart-bar-options.PNG)

_Smart Bar_ automatically disappear when you move your mouse cursor away from it, or execute a certain commands on the _Smart Bar_, or click somewhere else in the code editor window, emptying the selection.
_Smart Bar_ automatically disappears when you move your mouse cursor away from it, or execute a certain commands on the _Smart Bar_, or click somewhere else in the code editor window, emptying the selection.

To make _Smart Bar_ reappear, you can tap the `Shift` key on your keyboard twice within a second. This behavior can also be suppressed by unchecking the **Show/hide Smart Bar with Shift key** checkbox.

Expand Down
Binary file modified doc/comment-tagger-options.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/csharp-options-xmldoc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/symbolmarker-options-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/symbolmarker-options.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/syntax-highlight.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 598ec5f

Please sign in to comment.