Permalink
Browse files

Initial commit

  • Loading branch information...
nickgravgaard committed Aug 30, 2017
0 parents commit abb19cdcecada550f6c7159538b72037ac11fa34
Showing with 3,999 additions and 0 deletions.
  1. +15 −0 .gitignore
  2. +41 −0 AlwaysAlignedVS.sln
  3. +35 −0 AlwaysAlignedVS/About.xaml
  4. +48 −0 AlwaysAlignedVS/About.xaml.cs
  5. +158 −0 AlwaysAlignedVS/AlwaysAligned.vsct
  6. +137 −0 AlwaysAlignedVS/AlwaysAlignedConfigurationService.cs
  7. +115 −0 AlwaysAlignedVS/AlwaysAlignedPackage.cs
  8. +258 −0 AlwaysAlignedVS/AlwaysAlignedVS.csproj
  9. +23 −0 AlwaysAlignedVS/AlwaysAlignedVS.csproj.user
  10. +9 −0 AlwaysAlignedVS/AppInfo.cs
  11. +116 −0 AlwaysAlignedVS/CommandFilter.cs
  12. +398 −0 AlwaysAlignedVS/ElasticTabstopsConverter.cs
  13. +38 −0 AlwaysAlignedVS/ElasticTabstopsFormatter.cs
  14. +55 −0 AlwaysAlignedVS/ElasticTabstopsProvider.cs
  15. +472 −0 AlwaysAlignedVS/ElasticTabstopsSizeManager.cs
  16. +74 −0 AlwaysAlignedVS/ExternalSettingsTracker.cs
  17. +11 −0 AlwaysAlignedVS/GlobalSuppressions.cs
  18. +14 −0 AlwaysAlignedVS/Guids.cs
  19. +10 −0 AlwaysAlignedVS/Logo.xaml
  20. +53 −0 AlwaysAlignedVS/Logo.xaml.cs
  21. +47 −0 AlwaysAlignedVS/MiscGui.cs
  22. +15 −0 AlwaysAlignedVS/PkgCmdID.cs
  23. +38 −0 AlwaysAlignedVS/Properties/AssemblyInfo.cs
  24. +74 −0 AlwaysAlignedVS/Properties/Settings.Designer.cs
  25. +18 −0 AlwaysAlignedVS/Properties/Settings.settings
  26. +80 −0 AlwaysAlignedVS/Resources.Designer.cs
  27. +131 −0 AlwaysAlignedVS/Resources.resx
  28. BIN AlwaysAlignedVS/Resources/Images_32bit.png
  29. BIN AlwaysAlignedVS/Resources/Package.ico
  30. BIN AlwaysAlignedVS/Resources/icon.png
  31. BIN AlwaysAlignedVS/Resources/logoframes.png
  32. BIN AlwaysAlignedVS/Resources/previewimage.png
  33. +30 −0 AlwaysAlignedVS/SettingsDialog.xaml
  34. +58 −0 AlwaysAlignedVS/SettingsDialog.xaml.cs
  35. +101 −0 AlwaysAlignedVS/TextBufferToViewMapService.cs
  36. +84 −0 AlwaysAlignedVS/TextMeasureService.cs
  37. +117 −0 AlwaysAlignedVS/UpdateTabCreationListener.cs
  38. +130 −0 AlwaysAlignedVS/VSPackage.resx
  39. +38 −0 AlwaysAlignedVS/VsTextViewCreationListener.cs
  40. +98 −0 AlwaysAlignedVS/WeakEvent.cs
  41. +92 −0 AlwaysAlignedVS/WpfTextConnectionListener.cs
  42. +11 −0 AlwaysAlignedVS/app.config
  43. +9 −0 AlwaysAlignedVS/packages.config
  44. +27 −0 AlwaysAlignedVS/source.extension.vsixmanifest
  45. +555 −0 ElasticTabstopsConverterTest/ElasticTabstopsConverterTest.cs
  46. +105 −0 ElasticTabstopsConverterTest/ElasticTabstopsConverterTest.csproj
  47. +35 −0 ElasticTabstopsConverterTest/Properties/AssemblyInfo.cs
  48. +7 −0 LICENSE.txt
  49. +10 −0 Local.testsettings
  50. +9 −0 TraceAndTestImpact.testsettings
@@ -0,0 +1,15 @@
[Oo]bj
[Bb]in
*.suo
*.[Cc]ache
*.ncb
*.log
*.DS_Store
*.bak
*~
[Tt]humbs.db
TestResults
packages
# Visual Studio cache/options directory
.vs/
@@ -0,0 +1,41 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26730.10
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{789894EA-EFA3-4108-A5BA-49CF882F902E}"
ProjectSection(SolutionItems) = preProject
AlwaysAligned.vsmdi = AlwaysAligned.vsmdi
Local.testsettings = Local.testsettings
TraceAndTestImpact.testsettings = TraceAndTestImpact.testsettings
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AlwaysAlignedVS", "AlwaysAlignedVS\AlwaysAlignedVS.csproj", "{2939A962-7734-4BDA-937F-25DC423B3843}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ElasticTabstopsConverterTest", "ElasticTabstopsConverterTest\ElasticTabstopsConverterTest.csproj", "{7A729CF5-BE92-44A2-8A98-B58E92A3AC45}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{2939A962-7734-4BDA-937F-25DC423B3843}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2939A962-7734-4BDA-937F-25DC423B3843}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2939A962-7734-4BDA-937F-25DC423B3843}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2939A962-7734-4BDA-937F-25DC423B3843}.Release|Any CPU.Build.0 = Release|Any CPU
{7A729CF5-BE92-44A2-8A98-B58E92A3AC45}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7A729CF5-BE92-44A2-8A98-B58E92A3AC45}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7A729CF5-BE92-44A2-8A98-B58E92A3AC45}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7A729CF5-BE92-44A2-8A98-B58E92A3AC45}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {1648C81C-E903-4AB3-9E8C-A52F0321BBD9}
EndGlobalSection
GlobalSection(TestCaseManagementSettings) = postSolution
CategoryFile = AlwaysAligned.vsmdi
EndGlobalSection
EndGlobal
@@ -0,0 +1,35 @@
<Window x:Class="AlwaysAligned.About"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:AlwaysAligned"
Title="About" Width="520" ResizeMode="NoResize" SizeToContent="Height" Topmost="True" WindowStartupLocation="CenterScreen" WindowStyle="None" ShowInTaskbar="False">
<Border BorderThickness="1,0" BorderBrush="#333">
<DockPanel LastChildFill="True" Margin="30,0">
<Rectangle DockPanel.Dock="Top" Height="20" Margin="0,0,0,10">
<Rectangle.Fill>
<SolidColorBrush Color="#333" />
</Rectangle.Fill>
</Rectangle>
<Rectangle DockPanel.Dock="Bottom" Height="20" Margin="0,10,0,0">
<Rectangle.Fill>
<SolidColorBrush Color="#333" />
</Rectangle.Fill>
</Rectangle>
<StackPanel>
<local:Logo Margin="0,20" />
<RichTextBox IsReadOnly="True" IsDocumentEnabled="True" FontFamily="Cambria" FontSize="16" BorderThickness="0" Foreground="#333" Padding="-4,0" Margin="0,10">
<FlowDocument Name="AboutFlowDoc" LineHeight="24" TextAlignment="Justify">
<Paragraph Name="AboutParagraph">
This is free software, released under the MIT License. To learn about elastic tabstops, see
<Hyperlink RequestNavigate="Hyperlink_RequestNavigate" NavigateUri="http://nickgravgaard.com/elastic-tabstops/">nickgravgaard.com/elastic-tabstops/</Hyperlink>
</Paragraph>
<Paragraph TextAlignment="Center" FontSize="13">
Copyright © 2010-2017 Nick Gravgaard
</Paragraph>
</FlowDocument>
</RichTextBox>
<Button Margin="0,10" IsDefault="True" HorizontalAlignment="Center" Padding="20,0" Click="Button_Click">Close</Button>
</StackPanel>
</DockPanel>
</Border>
</Window>
@@ -0,0 +1,48 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using System.Windows.Navigation;
using System.Diagnostics;
using System.Reflection;
namespace AlwaysAligned
{
/// <summary>
/// Interaction logic for About.xaml
/// </summary>
public partial class About : Window
{
public About()
{
InitializeComponent();
string informationalVersion = FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location).ProductVersion;
var fieldsParagraph = new Paragraph();
fieldsParagraph.Inlines.Add(new Run("Version: "));
fieldsParagraph.Inlines.Add(new Bold(new Run(informationalVersion)));
AboutFlowDoc.Blocks.InsertBefore(AboutFlowDoc.Blocks.FirstBlock, fieldsParagraph);
}
private void Hyperlink_RequestNavigate(object sender, RequestNavigateEventArgs e)
{
System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo(e.Uri.AbsoluteUri));
e.Handled = true;
}
private void Button_Click(object sender, RoutedEventArgs e)
{
this.Close();
}
}
}
@@ -0,0 +1,158 @@
<?xml version="1.0" encoding="utf-8"?>
<CommandTable xmlns="http://schemas.microsoft.com/VisualStudio/2005-10-18/CommandTable" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- This is the file that defines the actual layout and type of the commands.
It is divided in different sections (e.g. command definition, command
placement, ...), with each defining a specific set of properties.
See the comment before each section for more details about how to
use it. -->
<!-- The VSCT compiler (the tool that translates this file into the binary
format that VisualStudio will consume) has the ability to run a preprocessor
on the vsct file; this preprocessor is (usually) the C++ preprocessor, so
it is possible to define includes and macros with the same syntax used
in C++ files. Using this ability of the compiler here, we include some files
defining some of the constants that we will use inside the file. -->
<!--This is the file that defines the IDs for all the commands exposed by VisualStudio. -->
<Extern href="stdidcmd.h" />
<!--This header contains the command ids for the menus provided by the shell. -->
<Extern href="vsshlids.h" />
<!--Definition of some VSCT specific constants. In this sample we use it for the IDs inside the guidOfficeIcon group. -->
<!--<Extern href="msobtnid.h" xmlns="http://schemas.microsoft.com/VisualStudio/2005-10-18/CommandTable" />-->
<!--The Commands section is where we the commands, menus and menu groups are defined.
This section uses a Guid to identify the package that provides the command defined inside it. -->
<Commands package="guidAlwaysAlignedPkg">
<!-- Inside this section we have different sub-sections: one for the menus, another
for the menu groups, one for the buttons (the actual commands), one for the combos
and the last one for the bitmaps used. Each element is identified by a command id that
is a unique pair of guid and numeric identifier; the guid part of the identifier is usually
called "command set" and is used to group different command inside a logically related
group; your package should define its own command set in order to avoid collisions
with command ids defined by other packages. -->
<!-- In this section you can define new menu groups. A menu group is a container for
other menus or buttons (commands); from a visual point of view you can see the
group as the part of a menu contained between two lines. The parent of a group
must be a menu. -->
<Groups>
<Group guid="guidAlwaysAlignedCmdSet" id="AlwaysAlignedMenuGroup" priority="0x0600">
<Parent guid="guidAlwaysAlignedCmdSet" id="AlwaysAlignedMenu" />
</Group>
</Groups>
<Menus>
<Menu guid="guidAlwaysAlignedCmdSet" id="AlwaysAlignedMenu" priority="0x100" type="Menu">
<Parent guid="guidSHLMainMenu" id="IDG_VS_MM_WINDOWHELP" />
<CommandFlag>DefaultInvisible</CommandFlag>
<CommandFlag>DontCache</CommandFlag>
<CommandFlag>DynamicVisibility</CommandFlag>
<CommandFlag>TextChanges</CommandFlag>
<Strings>
<ButtonText>Always Aligned</ButtonText>
<CommandName>Always Aligned</CommandName>
</Strings>
</Menu>
</Menus>
<!--Buttons section. -->
<!--This section defines the elements the user can interact with, like a menu command or a button
or combo box in a toolbar. -->
<Buttons>
<Button guid="guidAlwaysAlignedCmdSet" id="cmdidConvertToSpaces" priority="0x0101" type="Button">
<Parent guid="guidAlwaysAlignedCmdSet" id="AlwaysAlignedMenuGroup" />
<Icon guid="guidImages" id="bmpPic1" />
<CommandFlag>DefaultDisabled</CommandFlag>
<CommandFlag>DefaultInvisible</CommandFlag>
<CommandFlag>DontCache</CommandFlag>
<CommandFlag>DynamicVisibility</CommandFlag>
<Strings>
<CommandName>cmdidConvertToSpaces</CommandName>
<ButtonText>Convert to Spaces</ButtonText>
</Strings>
</Button>
<Button guid="guidAlwaysAlignedCmdSet" id="cmdidConvertToElasticTabstops" priority="0x0102" type="Button">
<Parent guid="guidAlwaysAlignedCmdSet" id="AlwaysAlignedMenuGroup" />
<Icon guid="guidImages" id="bmpPic1" />
<CommandFlag>DefaultDisabled</CommandFlag>
<CommandFlag>DefaultInvisible</CommandFlag>
<CommandFlag>DontCache</CommandFlag>
<CommandFlag>DynamicVisibility</CommandFlag>
<Strings>
<CommandName>cmdidConvertToElasticTabstops</CommandName>
<ButtonText>Convert to Elastic Tabstops</ButtonText>
</Strings>
</Button>
<Button guid="guidAlwaysAlignedCmdSet" id="cmdidSettings" priority="0x0103" type="Button">
<Parent guid="guidAlwaysAlignedCmdSet" id="AlwaysAlignedMenuGroup" />
<Icon guid="guidImages" id="bmpPic1" />
<CommandFlag>DefaultDisabled</CommandFlag>
<CommandFlag>DefaultInvisible</CommandFlag>
<CommandFlag>DontCache</CommandFlag>
<CommandFlag>DynamicVisibility</CommandFlag>
<Strings>
<CommandName>cmdidSettings</CommandName>
<ButtonText>Settings...</ButtonText>
</Strings>
</Button>
<Button guid="guidAlwaysAlignedCmdSet" id="cmdidAbout" priority="0x0104" type="Button">
<Parent guid="guidAlwaysAlignedCmdSet" id="AlwaysAlignedMenuGroup" />
<Icon guid="guidImages" id="bmpPic1" />
<CommandFlag>DefaultDisabled</CommandFlag>
<CommandFlag>DefaultInvisible</CommandFlag>
<CommandFlag>DontCache</CommandFlag>
<CommandFlag>DynamicVisibility</CommandFlag>
<Strings>
<CommandName>cmdidAbout</CommandName>
<ButtonText>About...</ButtonText>
</Strings>
</Button>
</Buttons>
<!--The bitmaps section is used to define the bitmaps that are used for the commands.-->
<Bitmaps>
<!-- The bitmap id is defined in a way that is a little bit different from the others:
the declaration starts with a guid for the bitmap strip, then there is the resource id of the
bitmap strip containing the bitmaps and then there are the numeric ids of the elements used
inside a button definition. An important aspect of this declaration is that the element id
must be the actual index (1-based) of the bitmap inside the bitmap strip. -->
<Bitmap guid="guidImages" href="Resources\Images_32bit.png" usedList="bmpPic1, bmpPic2, bmpPicSearch, bmpPicX, bmpPicArrows" />
</Bitmaps>
</Commands>
<Symbols>
<!-- This is the package guid. -->
<GuidSymbol name="guidAlwaysAlignedPkg" value="{c982f983-3dce-4114-91c0-e534dd039dda}" />
<GuidSymbol name="guidImages" value="{9f4c3087-1af0-4aad-b54e-04373ee84583}">
<IDSymbol name="bmpPic1" value="1" />
<IDSymbol name="bmpPic2" value="2" />
<IDSymbol name="bmpPicSearch" value="3" />
<IDSymbol name="bmpPicX" value="4" />
<IDSymbol name="bmpPicArrows" value="5" />
</GuidSymbol>
<GuidSymbol name="guidAlwaysAlignedCmdSet" value="{234580c4-8a2c-4ae1-8e4f-5bc708b188fe}">
<IDSymbol name="AlwaysAlignedMenu" value="0x0100" />
<IDSymbol name="AlwaysAlignedMenuGroup" value="0x0200" />
<IDSymbol name="cmdidConvertToSpaces" value="0x0300" />
<IDSymbol name="cmdidConvertToElasticTabstops" value="0x0301" />
<IDSymbol name="cmdidSettings" value="0x0302" />
<IDSymbol name="cmdidAbout" value="0x0303" />
</GuidSymbol>
</Symbols>
</CommandTable>
Oops, something went wrong.

0 comments on commit abb19cd

Please sign in to comment.