Skip to content

Commit

Permalink
Version 3.4:
Browse files Browse the repository at this point in the history
+ More keyword categories for syntax highlight, and braces highlight accordance options
+ Showed quick info for switch with a single section but more than one cases
- Fixed some problems in Click and Go feature for constructors
! Reduced initial opacity for Smart Bar
  • Loading branch information
wmjordan committed Aug 4, 2018
1 parent dca3a81 commit 65a3704
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 6 deletions.
15 changes: 15 additions & 0 deletions Codist/Helpers/CodeAnalysisHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,24 @@ namespace Codist
static class CodeAnalysisHelper
{
public static Document GetDocument(this Workspace workspace, SnapshotSpan span) {
if (workspace == null) {
throw new ArgumentNullException("workspace");
}
var solution = workspace.CurrentSolution;
if (solution == null) {
throw new InvalidOperationException("solution is null");
}
if (span.Snapshot == null) {
throw new InvalidOperationException("snapshot is null");
}
var sourceText = span.Snapshot.AsText();
if (sourceText == null) {
throw new InvalidOperationException("sourceText is null");
}
var docId = workspace.GetDocumentIdInCurrentContext(sourceText.Container);
if (docId == null) {
throw new InvalidOperationException("docId is null");
}
return solution.ContainsDocument(docId)
? solution.GetDocument(docId)
: solution.WithDocumentText(docId, sourceText, PreservationMode.PreserveIdentity).GetDocument(docId);
Expand Down
8 changes: 4 additions & 4 deletions Codist/Options/CSharpSyntaxHighlightPage.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Codist/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
[assembly: AssemblyVersion("3.0.0.0")]
[assembly: AssemblyFileVersion("3.3.0.1571")]
[assembly: AssemblyFileVersion("3.4.0.1584")]
6 changes: 6 additions & 0 deletions Codist/QuickInfo/CSharpQuickInfoSourceProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,12 @@ static void ShowMiscInfo(IList<object> qiContent, ITextSnapshot currentSnapshot,
}
qiContent.Add(s + " switch sections, " + cases + " cases");
}
else {
var cases = (node as SwitchStatementSyntax).Sections.Count;
if (cases > 1) {
qiContent.Add("1 switch section, " + cases + " cases");
}
}
}
else if (nodeKind == SyntaxKind.StringLiteralExpression) {
if (Config.Instance.QuickInfoOptions.MatchFlags(QuickInfoOptions.String)) {
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="3.3.0.1568" Language="en-US" Publisher="WMJ" />
<Identity Id="Codist.WMJ.c7b93d20-621f-4b21-9d28-d51157ef0b94" Version="3.4.0.1585" Language="en-US" Publisher="WMJ" />
<DisplayName>Codist</DisplayName>
<Description xml:space="preserve">A Roslyn-powered C# coding experience enhancer with advanced syntax highlight, Super Quick Info (code tooltip), Smart Bar, Code Structure Markers on scrollbar, comment tagger, and more.</Description>
<MoreInfo>https://github.com/wmjordan/Codist</MoreInfo>
Expand Down

0 comments on commit 65a3704

Please sign in to comment.