Skip to content

Commit

Permalink
Version 4.4:
Browse files Browse the repository at this point in the history
! Redesigned Navi Bar
+ Showed property initialization and expression on Navi Bar menu
+ Added command Ctrl+` to access Search Declaration menu in the Navi Bar
+ Added Smart Bar and open path feature for interactive, output, debugger output, debugger immediate, find results windows
+ Added Find Symbol Named ... command to C# Smart Bar
+ Added Smart Bar buttons for C/C++ code file type
- Fixed the conflict between syntax highlight and break point highlight
! Optimized the display of Syntax Highlight options page
- Fixed a crash on opening file
! Optimized default syntax highlight themes
  • Loading branch information
wmjordan committed Dec 21, 2018
1 parent de7e96d commit c660485
Show file tree
Hide file tree
Showing 28 changed files with 63 additions and 76 deletions.
8 changes: 4 additions & 4 deletions Codist/Classifiers/CSharpClassifier.cs
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.Linq;
using System.Reflection;
using AppHelpers;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.Classification;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using Microsoft.CodeAnalysis.Text;
using Microsoft.VisualStudio.Shell;
using Microsoft.VisualStudio.Text;
using Microsoft.VisualStudio.Text.Classification;
using AppHelpers;
using Microsoft.VisualStudio.Utilities;
using System.ComponentModel.Composition;
using System.Reflection;
using Microsoft.VisualStudio.Shell;

namespace Codist.Classifiers
{
Expand Down
4 changes: 2 additions & 2 deletions Codist/Codist.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -436,8 +436,8 @@
<HintPath>..\packages\System.Collections.Immutable.1.5.0\lib\netstandard1.3\System.Collections.Immutable.dll</HintPath>
</Reference>
<Reference Include="System.ComponentModel.Composition" />
<Reference Include="System.Composition.AttributedModel, Version=1.0.27.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Composition.1.0.27\lib\portable-net45+win8+wp8+wpa81\System.Composition.AttributedModel.dll</HintPath>
<Reference Include="System.Composition.AttributedModel, Version=1.0.33.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Composition.AttributedModel.1.2.0\lib\portable-net45+win8+wp8+wpa81\System.Composition.AttributedModel.dll</HintPath>
</Reference>
<Reference Include="System.Composition.Convention, Version=1.0.27.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Composition.1.0.27\lib\portable-net45+win8+wp8+wpa81\System.Composition.Convention.dll</HintPath>
Expand Down
2 changes: 1 addition & 1 deletion 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.2", IconResourceID = 400)] // Information on this package for Help/About
[InstalledProductRegistration("#110", "#112", "4.4", IconResourceID = 400)] // Information on this package for Help/About
[Guid(PackageGuidString)]
[ProvideOptionPage(typeof(Options.General), Constants.NameOfMe, "General", 0, 0, true)]
[ProvideOptionPage(typeof(Options.SuperQuickInfo), CategorySuperQuickInfo, "General", 0, 0, true, Sort = 0)]
Expand Down
8 changes: 4 additions & 4 deletions Codist/Controls/ContextMenu.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
<Border Name="Check" Width="16" Height="16" Visibility="Collapsed" Margin="6,0,6,0" Background="{DynamicResource VsBrush.CommandBarMenuBackgroundGradient}" BorderThickness="1" BorderBrush="#5082a4">
<Path Name="CheckMark" Width="7" Height="7" Visibility="Hidden" SnapsToDevicePixels="False" Stroke="#5082a4" StrokeThickness="2" Data="M 0 0 L 7 7 M 0 7 L 7 0"/>
</Border>
<ContentPresenter Name="HeaderHost" Grid.Column="1" HorizontalAlignment="Left" VerticalAlignment="Center" ContentSource="Header" RecognizesAccessKey="False" SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}"/>
<ContentPresenter Name="HeaderHost" MaxWidth="500" Grid.Column="1" HorizontalAlignment="Left" VerticalAlignment="Center" ContentSource="Header" RecognizesAccessKey="False" SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}"/>
<TextBlock x:Name="InputGestureText" Grid.Column="2" Text="{TemplateBinding InputGestureText}" Margin="5,2,0,2" Height="{Binding ElementName=HeaderHost,Path=ActualHeight}" VerticalAlignment="Center" DockPanel.Dock="Right" Foreground="{DynamicResource VsBrush.GrayText}"/>
</Grid>
</Border>
Expand Down Expand Up @@ -89,10 +89,10 @@
<ColumnDefinition Width="13"/>
</Grid.ColumnDefinitions>
<ContentPresenter Name="Icon" Width="16" Height="16" Margin="3,3,8,3" VerticalAlignment="Center" ContentSource="Icon"/>
<ContentPresenter Name="HeaderHost" HorizontalAlignment="Left" VerticalAlignment="Center" Grid.Column="1" ContentSource="Header" RecognizesAccessKey="False" SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}"/>
<TextBlock x:Name="InputGestureText" Grid.Column="2" Height="{Binding ElementName=HeaderHost,Path=ActualHeight}" Text="{TemplateBinding InputGestureText}" Margin="5,2,0,2" DockPanel.Dock="Right"/>
<ContentPresenter Name="HeaderHost" MaxWidth="500" HorizontalAlignment="Left" VerticalAlignment="Center" Grid.Column="1" ContentSource="Header" RecognizesAccessKey="False" SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}"/>
<TextBlock x:Name="InputGestureText" Grid.Column="2" Height="{Binding ElementName=HeaderHost,Path=ActualHeight}" Text="{TemplateBinding InputGestureText}" TextTrimming="CharacterEllipsis" Margin="5,2,0,2" DockPanel.Dock="Right"/>
<Path Grid.Column="3" HorizontalAlignment="Center" VerticalAlignment="Center" Data="M 0 0 L 0 7 L 4 3.5 Z" Fill="{DynamicResource VsBrush.CommandBarMenuSubmenuGlyph}"/>
<Popup Name="Popup" Placement="Right" HorizontalOffset="-4" IsOpen="{TemplateBinding IsSubmenuOpen}" AllowsTransparency="True" Focusable="False" PopupAnimation="{DynamicResource {x:Static SystemParameters.MenuPopupAnimationKey}}" MaxWidth="500">
<Popup Name="Popup" Placement="Right" HorizontalOffset="-4" IsOpen="{TemplateBinding IsSubmenuOpen}" AllowsTransparency="True" Focusable="False" PopupAnimation="{DynamicResource {x:Static SystemParameters.MenuPopupAnimationKey}}">
<Border Name="SubmenuBorder" SnapsToDevicePixels="True" Background="{DynamicResource VsBrush.CommandBarMenuBackgroundGradient}" BorderBrush="{DynamicResource VsBrush.CommandBarMenuBorder}" BorderThickness="1,1,1,1">
<StackPanel Margin="3">
<ContentPresenter x:Name="PopupHeader" Content="{TemplateBinding SubMenuHeader}" ContentSource="Tag" Margin="0,0,0,3" SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}"/>
Expand Down
6 changes: 3 additions & 3 deletions Codist/Controls/MemberFilterBox.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public SearchScopeBox() {
public UIElementCollection Contents => ((StackPanel)((Border)Content).Child).Children;

ThemedToggleButton CreateButton(int imageId, string toolTip) {
var b = new ThemedToggleButton(imageId, toolTip) { BorderThickness = WpfHelper.NoMargin };
var b = new ThemedToggleButton(imageId, toolTip).ClearMargin().ClearBorder();
b.Checked += UpdateFilterValue;
return b;
}
Expand Down Expand Up @@ -284,7 +284,7 @@ public MemberFilterButtonGroup() {
new Border{ Width = 1, BorderThickness = WpfHelper.TinyMargin }.ReferenceProperty(BorderBrushProperty, CommonControlsColors.TextBoxBorderBrushKey),
_FieldFilter, _MethodFilter, _TypeFilter,
new Border{ Width = 1, BorderThickness = WpfHelper.TinyMargin }.ReferenceProperty(BorderBrushProperty, CommonControlsColors.TextBoxBorderBrushKey),
new ThemedButton(KnownImageIds.StopFilter, "Clear filter switches", ClearFilter) { Margin = WpfHelper.NoMargin, BorderThickness = WpfHelper.NoMargin },
new ThemedButton(KnownImageIds.StopFilter, "Clear filter", ClearFilter).ClearMargin().ClearBorder(),
},
Orientation = Orientation.Horizontal
}
Expand Down Expand Up @@ -337,7 +337,7 @@ void ClearFilter() {
}

ThemedToggleButton CreateButton(int imageId, string toolTip) {
var b = new ThemedToggleButton(imageId, toolTip) { BorderThickness = WpfHelper.NoMargin };
var b = new ThemedToggleButton(imageId, toolTip).ClearMargin().ClearBorder();
b.Checked += UpdateFilterValue;
b.Unchecked += UpdateFilterValue;
return b;
Expand Down
8 changes: 4 additions & 4 deletions Codist/Controls/Menu.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
<StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
<ContentPresenter Content="{TemplateBinding MenuItem.Icon}" ContentSource="Icon" Name="Icon" Width="16" Height="16" Margin="3,2,3,2" HorizontalAlignment="Center" VerticalAlignment="Center" SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}"/>
<ContentPresenter RecognizesAccessKey="False" Content="{TemplateBinding HeaderedContentControl.Header}" ContentTemplate="{TemplateBinding HeaderedContentControl.HeaderTemplate}" ContentStringFormat="{TemplateBinding HeaderedItemsControl.HeaderStringFormat}" ContentSource="Header" Margin="0,0,3,0" SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}" VerticalAlignment="Center" Grid.Column="1"/>
<Popup x:Name="Popup" Placement="Bottom" HorizontalOffset="-1" IsOpen="{TemplateBinding IsSubmenuOpen}" AllowsTransparency="True" Focusable="False" PopupAnimation="{DynamicResource {x:Static SystemParameters.MenuPopupAnimationKey}}" StaysOpen="True" MaxWidth="500">
<Popup x:Name="Popup" Placement="Bottom" HorizontalOffset="-1" IsOpen="{TemplateBinding IsSubmenuOpen}" AllowsTransparency="True" Focusable="False" PopupAnimation="{DynamicResource {x:Static SystemParameters.MenuPopupAnimationKey}}" StaysOpen="True">
<Border x:Name="SubmenuBorder" SnapsToDevicePixels="True" BorderThickness="1" Background="{DynamicResource VsBrush.CommandBarMenuBackgroundGradient}" BorderBrush="{DynamicResource VsBrush.CommandBarMenuBorder}">
<StackPanel Margin="3">
<ContentPresenter x:Name="PopupHeader" Content="{TemplateBinding SubMenuHeader}" ContentSource="Tag" Margin="0,0,0,3" SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}"/>
Expand Down Expand Up @@ -146,7 +146,7 @@
<Border x:Name="Check" Width="13" Height="13" Visibility="Collapsed" Margin="6,0,6,0" BorderThickness="1">
<Path x:Name="CheckMark" Width="7" Height="7" Visibility="Hidden" SnapsToDevicePixels="False" StrokeThickness="2" Data="M 0 0 L 7 7 M 0 7 L 7 0" Stroke="{DynamicResource VsBrush.CommandBarMenuSubmenuGlyph}"/>
</Border>
<ContentPresenter x:Name="HeaderHost" Grid.Column="1" VerticalAlignment="Center" ContentSource="Header" RecognizesAccessKey="False"/>
<ContentPresenter x:Name="HeaderHost" MaxWidth="500" Grid.Column="1" VerticalAlignment="Center" ContentSource="Header" RecognizesAccessKey="False"/>
<TextBlock x:Name="InputGestureText" Grid.Column="2" Text="{TemplateBinding InputGestureText}" MaxWidth="200" Height="{Binding ElementName=HeaderHost,Path=ActualHeight}" TextTrimming="CharacterEllipsis" Margin="5,2,0,2" DockPanel.Dock="Right" VerticalAlignment="Center" Foreground="{DynamicResource VsBrush.GrayText}"/>
</Grid>
</Border>
Expand Down Expand Up @@ -181,10 +181,10 @@
<ColumnDefinition Width="13"/>
</Grid.ColumnDefinitions>
<ContentPresenter x:Name="Icon" Margin="3,0,6,0" VerticalAlignment="Center" ContentSource="Icon"/>
<ContentPresenter x:Name="HeaderHost" Grid.Column="1" VerticalAlignment="Center" ContentSource="Header" RecognizesAccessKey="False"/>
<ContentPresenter x:Name="HeaderHost" Grid.Column="1" VerticalAlignment="Center" ContentSource="Header" RecognizesAccessKey="False" MaxWidth="500"/>
<TextBlock x:Name="InputGestureText" Grid.Column="2" Text="{TemplateBinding InputGestureText}" MaxWidth="200" Height="{Binding ElementName=HeaderHost,Path=ActualHeight}" TextTrimming="CharacterEllipsis" Margin="5,2,0,2" DockPanel.Dock="Right" VerticalAlignment="Center" Foreground="{DynamicResource VsBrush.GrayText}"/>
<Path Grid.Column="3" HorizontalAlignment="Center" VerticalAlignment="Center" Data="M 0 0 L 0 7 L 4 3.5 Z" Fill="{DynamicResource VsBrush.CommandBarMenuSubmenuGlyph}" />
<Popup x:Name="Popup" Placement="Right" HorizontalOffset="-1" IsOpen="{TemplateBinding IsSubmenuOpen}" AllowsTransparency="True" Focusable="False" PopupAnimation="{DynamicResource {x:Static SystemParameters.MenuPopupAnimationKey}}" MaxWidth="500">
<Popup x:Name="Popup" Placement="Right" HorizontalOffset="-1" IsOpen="{TemplateBinding IsSubmenuOpen}" AllowsTransparency="True" Focusable="False" PopupAnimation="{DynamicResource {x:Static SystemParameters.MenuPopupAnimationKey}}">
<Border x:Name="SubmenuBorder" SnapsToDevicePixels="True" BorderThickness="1" Background="{DynamicResource VsBrush.CommandBarMenuBackgroundGradient}" BorderBrush="{DynamicResource VsBrush.CommandBarMenuBorder}">
<StackPanel Margin="3">
<ContentPresenter x:Name="PopupHeader" Content="{TemplateBinding SubMenuHeader}" ContentSource="Tag" Margin="0,0,0,3" SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}"/>
Expand Down
22 changes: 18 additions & 4 deletions Codist/Helpers/WpfHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,23 @@ public static TElement LimitSize<TElement>(this TElement element)
}
return element;
}
public static TElement ClearBorder<TElement>(this TElement element)
where TElement : Control {
element.BorderThickness = NoMargin;
return element;
}
public static TElement ClearMargin<TElement>(this TElement element)
where TElement : FrameworkElement {
element.Margin = NoMargin;
return element;
}
public static TElement Collapse<TElement>(this TElement element)
where TElement : UIElement {
if (element != null) {
element.Visibility = Visibility.Collapsed;
}
return element;
}
public static TElement WrapMargin<TElement>(this TElement element, Thickness thickness)
where TElement : FrameworkElement {
element.Margin = thickness;
Expand Down Expand Up @@ -298,10 +315,7 @@ void ToolBarLoaded(object sender, RoutedEventArgs args) {
b.Loaded -= ToolBarLoaded;
}
void HideOverflowInternal(ToolBar b) {
var overflow = b.FindTemplateElement<FrameworkElement>("OverflowGrid");
if (overflow != null) {
overflow.Visibility = Visibility.Collapsed;
}
b.FindTemplateElement<FrameworkElement>("OverflowGrid").Collapse();
var mainPanelBorder = b.FindTemplateElement<FrameworkElement>("MainPanelBorder");
if (mainPanelBorder != null) {
mainPanelBorder.Margin = NoMargin;
Expand Down
2 changes: 1 addition & 1 deletion Codist/NaviBar/CSharpBar.cs
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ public RootItem(CSharpBar bar) {
(_FinderBox = new MemberFinderBox(Items) { MinWidth = 150 }),
(_ScopeBox = new SearchScopeBox {
Contents = {
new ThemedButton(KnownImageIds.Cancel, "Clear filter", ClearFilter) { Margin = WpfHelper.NoMargin, BorderThickness = WpfHelper.NoMargin }
new ThemedButton(KnownImageIds.StopFilter, "Clear filter", ClearFilter).ClearBorder().ClearMargin()
}
}),
}
Expand Down
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("4.0.0.0")]
[assembly: AssemblyFileVersion("4.3.0.3086")]
[assembly: AssemblyFileVersion("4.4.0.3214")]
10 changes: 2 additions & 8 deletions Codist/QuickInfo/QuickInfoOverrider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,7 @@ protected override void OnVisualParentChanged(DependencyObject oldParent) {
}
EXIT:
// hides the parent container from taking excessive space in the quick info window
var c = this.GetParent<Border>();
if (c != null) {
c.Visibility = Visibility.Collapsed;
}
this.GetParent<Border>().Collapse();
}

void OverrideDiagnosticInfo(StackPanel panel) {
Expand Down Expand Up @@ -441,10 +438,7 @@ protected override void OnVisualParentChanged(DependencyObject oldParent) {
p.Content = _QuickInfoPanel.Scrollable().LimitSize();
}
// hides the parent container from taking excessive space in the quick info window
var c = this.GetParent<Border>();
if (c != null) {
c.Visibility = Visibility.Collapsed;
}
this.GetParent<Border>().Collapse();
}
}

Expand Down
2 changes: 1 addition & 1 deletion Codist/app.config
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Composition.AttributedModel" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.0.27.0" newVersion="1.0.27.0" />
<bindingRedirect oldVersion="0.0.0.0-1.0.33.0" newVersion="1.0.33.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Composition.Runtime" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
Expand Down
35 changes: 0 additions & 35 deletions Codist/app.icon.svg

This file was deleted.

2 changes: 1 addition & 1 deletion Codist/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
<package id="System.Collections.Concurrent" version="4.3.0" targetFramework="net46" />
<package id="System.Collections.Immutable" version="1.5.0" targetFramework="net46" />
<package id="System.Composition" version="1.1.0" targetFramework="net46" />
<package id="System.Composition.AttributedModel" version="1.1.0" targetFramework="net46" />
<package id="System.Composition.AttributedModel" version="1.2.0" targetFramework="net46" />
<package id="System.Composition.Convention" version="1.1.0" targetFramework="net46" />
<package id="System.Composition.Hosting" version="1.1.0" targetFramework="net46" />
<package id="System.Composition.Runtime" version="1.1.0" targetFramework="net46" />
Expand Down
Loading

0 comments on commit c660485

Please sign in to comment.