├── .gitignore
├── Sources
├── Shared
│ ├── Features.Infrastructure
│ │ ├── Features.Infrastructure.projitems
│ │ ├── Features.Infrastructure.shproj
│ │ └── SolutionBadges
│ │ │ ├── ISolutionBadgesService.cs
│ │ │ ├── KnownProperties.cs
│ │ │ └── SourceControl
│ │ │ ├── ISourceControlInfoProvider.cs
│ │ │ └── SourceControlInfoProvider.cs
│ ├── Features
│ │ ├── AttachTo
│ │ │ ├── AttachToView.cs
│ │ │ ├── AttachToView.xaml
│ │ │ └── AttachToViewModel.cs
│ │ ├── Features.projitems
│ │ ├── Features.shproj
│ │ ├── OutputWindowPane
│ │ │ ├── ClassificationNames.cs
│ │ │ ├── Configuration.cs
│ │ │ ├── FindResults
│ │ │ │ ├── ClassificationDefinitions.cs
│ │ │ │ ├── FindResultsClassfierProvider.cs
│ │ │ │ └── FindResultsClassifier.cs
│ │ │ ├── Output
│ │ │ │ ├── ClassificationDefinitions.cs
│ │ │ │ ├── OutputClassifier.cs
│ │ │ │ └── OutputClassifierProvider.cs
│ │ │ └── OutputWindowPaneClassifier.cs
│ │ ├── SolutionBadges
│ │ │ ├── CurrentVSStateInfo.cs
│ │ │ ├── SolutionBadgeView.cs
│ │ │ ├── SolutionBadgeView.xaml
│ │ │ ├── SolutionBadgeViewModel.cs
│ │ │ └── SolutionBadgesService.cs
│ │ ├── XamlResources.cs
│ │ └── XamlResources.xaml
│ ├── Foundation
│ │ ├── DeploymentInfo.cs
│ │ ├── FontsAndColors
│ │ │ ├── VSCFontAndColorDefaultsProvider.IVsFontAndColorDefaults.cs
│ │ │ ├── VSCFontAndColorDefaultsProvider.IVsFontAndColorDefaultsProvider.cs
│ │ │ ├── VSCFontAndColorDefaultsProvider.IVsFontAndColorEvents.cs
│ │ │ └── VSCFontAndColorDefaultsProvider.cs
│ │ ├── Foundation.projitems
│ │ ├── Foundation.shproj
│ │ ├── FrameworkExtensions
│ │ │ ├── EnvDTE
│ │ │ │ └── DTE2.extensions.cs
│ │ │ ├── Microsoft.VisualStudio.Shell.Interop
│ │ │ │ └── ColorableItemInfo.extensions.cs
│ │ │ └── System
│ │ │ │ └── IServiceProvider.extensions.cs
│ │ ├── IVscUIService.cs
│ │ ├── Settings
│ │ │ ├── IVscSettingsService.cs
│ │ │ ├── StaticSettings.cs
│ │ │ ├── VscSettingScope.cs
│ │ │ └── VscSettingsService.cs
│ │ ├── Text
│ │ │ └── Classification
│ │ │ │ ├── ClassificationMatchPattern.cs
│ │ │ │ ├── ClassificationTypeMatchPattern.cs
│ │ │ │ ├── VscClassifier.IClassifier.cs
│ │ │ │ └── VscClassifier.cs
│ │ ├── ThemeInfo.cs
│ │ ├── VersionInstallationInfo.cs
│ │ ├── VisualStudioEvents
│ │ │ ├── BroadcastMessagesEventsHandler.MessageBroadcastEventArgs.cs
│ │ │ ├── BroadcastMessagesEventsHandler.cs
│ │ │ ├── DocumentEventArgs.cs
│ │ │ ├── IVisualStudioEventsService.cs
│ │ │ ├── VisualStudioEventsService.cs
│ │ │ ├── VsShellPropertyEventsHandler.ShellPropertyChangeEventArgs.cs
│ │ │ └── VsShellPropertyEventsHandler.cs
│ │ └── VscServices.cs
│ ├── Integration
│ │ ├── Git
│ │ │ ├── Features
│ │ │ │ └── SolutionBadges
│ │ │ │ │ └── GitSourceControlInfoProvider.cs
│ │ │ ├── Git.projitems
│ │ │ └── Git.shproj
│ │ ├── Mercurial
│ │ │ ├── Features
│ │ │ │ └── SolutionBadges
│ │ │ │ │ └── MercurialSourceControlInfoProvider.cs
│ │ │ ├── Mercurial.projitems
│ │ │ └── Mercurial.shproj
│ │ └── TeamFoundation
│ │ │ ├── Features
│ │ │ └── SolutionBadges
│ │ │ │ └── TeamFoundationSourceControlInfoProvider.cs
│ │ │ ├── ITeamFoundationHelper.cs
│ │ │ ├── TeamFoundation.projitems
│ │ │ ├── TeamFoundation.shproj
│ │ │ └── TeamFoundationHelper.cs
│ ├── Internal
│ │ ├── AssemblyInfo.shared.cs
│ │ ├── Internal.projitems
│ │ └── Internal.shproj
│ ├── Presentation
│ │ ├── AssemblyInfo.presentation.cs
│ │ ├── MarkupExtensions
│ │ │ └── LoadImageFromVSCommandsVSIXAssembly.cs
│ │ ├── Presentation.projitems
│ │ ├── Presentation.shproj
│ │ └── VscUIService.cs
│ └── VscPackage
│ │ ├── Bootstrapper.cs
│ │ ├── Content
│ │ ├── !about_this_content.txt
│ │ ├── themes.pkgdef
│ │ └── vsc11.eula.txt
│ │ ├── Resources
│ │ ├── !read.me
│ │ ├── logo.png
│ │ ├── solutionbadge-breakmode.png
│ │ ├── solutionbadge-bug.png
│ │ ├── solutionbadge-feature.png
│ │ ├── solutionbadge-runmode.png
│ │ ├── solutionbadge-solution.png
│ │ └── solutionbadge-team.png
│ │ ├── VscPackage.projitems
│ │ ├── VscPackage.shproj
│ │ ├── XamlResources.cs
│ │ └── XamlResources.xaml
└── VS14
│ ├── Features.Infrastructure.vs14
│ ├── Features.Infrastructure.vs14.csproj
│ └── packages.config
│ ├── Features.vs14
│ ├── Features.vs14.csproj
│ ├── app.config
│ ├── bin
│ │ └── Debug
│ │ │ └── SquaredInfinity.VSCommands.Features.vs14.dll.config
│ └── packages.config
│ ├── Foundation.vs14
│ ├── Foundation.vs14.csproj
│ ├── app.config
│ └── packages.config
│ ├── Integration
│ ├── Git.vs14
│ │ ├── Git.vs14.csproj
│ │ └── packages.config
│ ├── Mercurial.vs14
│ │ ├── Mercurial.vs14.csproj
│ │ └── packages.config
│ └── TeamFoundationServer.vs14
│ │ └── TeamFoundation.vs14
│ │ ├── TeamFoundation.vs14.csproj
│ │ ├── app.config
│ │ └── packages.config
│ ├── Presentation.Xaml.Styles.Modern.vs14
│ ├── All.tt
│ ├── All.xaml
│ ├── Brushes.tt
│ ├── Brushes.xaml
│ ├── DefaultXamlResources.cs
│ ├── Presentation.Xaml.Styles.Modern.vs14.csproj
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── Styles
│ │ ├── Button.tt
│ │ ├── Button.xaml
│ │ ├── CheckBox.tt
│ │ ├── CheckBox.xaml
│ │ ├── ComboBox.tt
│ │ ├── ComboBox.xaml
│ │ ├── Expander.tt
│ │ ├── Expander.xaml
│ │ ├── FocusVisual.tt
│ │ ├── FocusVisual.xaml
│ │ ├── GridViewColumnHeader.tt
│ │ ├── GridViewColumnHeader.xaml
│ │ ├── GridViewColumnHeaderGripper.tt
│ │ ├── GridViewColumnHeaderGripper.xaml
│ │ ├── GroupBox.tt
│ │ ├── GroupBox.xaml
│ │ ├── Hyperlink.tt
│ │ ├── Hyperlink.xaml
│ │ ├── Label.tt
│ │ ├── Label.xaml
│ │ ├── ListBox.tt
│ │ ├── ListBox.xaml
│ │ ├── ListView.tt
│ │ ├── ListView.xaml
│ │ ├── ListViewItem.tt
│ │ ├── ListViewItem.xaml
│ │ ├── Menu.tt
│ │ ├── Menu.xaml
│ │ ├── MenuItem.tt
│ │ ├── MenuItem.xaml
│ │ ├── RadioButton.tt
│ │ ├── RadioButton.xaml
│ │ ├── ScrollBar.tt
│ │ ├── ScrollBar.xaml
│ │ ├── TabControl.tt
│ │ ├── TabControl.xaml
│ │ ├── TextBlock.tt
│ │ ├── TextBlock.xaml
│ │ ├── TextBox.tt
│ │ ├── TextBox.xaml
│ │ ├── ToggleButton.tt
│ │ ├── ToggleButton.xaml
│ │ ├── ToolTip.tt
│ │ ├── ToolTip.xaml
│ │ ├── TreeView.tt
│ │ ├── TreeView.xaml
│ │ ├── TreeViewItem.tt
│ │ ├── TreeViewItem.xaml
│ │ ├── Window.tt
│ │ ├── Window.xaml
│ │ └── Window1.xaml
│ ├── Windows
│ │ ├── DefaultDialogWindow.xaml
│ │ ├── DefaultDialogWindow.xaml.cs
│ │ └── ModernWindow.cs
│ ├── _Global.cs
│ ├── _Global.tt
│ └── packages.config
│ ├── Presentation.vs14
│ ├── Presentation.vs14.csproj
│ ├── app.config
│ ├── bin
│ │ └── Debug
│ │ │ └── SquaredInfinity.VSCommands.Presentation.vs14.dll.config
│ └── packages.config
│ ├── VscPackage.vs14
│ ├── VscPackage.vs14.csproj
│ ├── app.config
│ └── packages.config
│ └── VscPackage.vsix.vs14
│ ├── Vsc14Package.cs
│ ├── VscPackage.vsix.vs14.csproj
│ ├── app.config
│ ├── packages.config
│ └── source.extension.vsixmanifest
├── VSCommands.sln
└── packages
├── Microsoft.VSSDK.BuildTools.14.0.23205
└── tools
│ └── vssdk
│ └── bin
│ └── CreatePkgDef.exe.config
└── WindowsAzure.ServiceBus.2.5.1.0
└── content
├── app.config.transform
└── web.config.transform
/.gitignore:
--------------------------------------------------------------------------------
1 | ################################################################################
2 | # This .gitignore file was automatically created by Microsoft(R) Visual Studio.
3 | ################################################################################
4 |
5 | /Sources/VS14/Foundation.vs14/bin/Debug
6 | /Sources/VS14/Foundation.vs14/obj/Debug
7 | /Sources/VS14/VscPackage.vs14/bin/Debug
8 | /Sources/VS14/VscPackage.vs14/obj/Debug
9 | /Sources/VS14/VscPackage.vs14/VscPackage.vs14.csproj.user
10 | /Sources/VS14/VscPackage.vs14/bin/Release
11 | /Sources/VS14/VscPackage.vsix.vs14/obj
12 | /Sources/VS14/VscPackage.vsix.vs14/bin
13 | /Sources/VS14/Presentation.vs14/obj
14 | /Sources/VS14/Presentation.vs14/bin
15 | /Sources/VS14/Integration/TeamFoundationServer.vs14/TeamFoundation.vs14/obj
16 | /Sources/VS14/Integration/TeamFoundationServer.vs14/TeamFoundation.vs14/bin
17 | /Sources/VS14/Integration/Mercurial.vs14/obj
18 | /Sources/VS14/Integration/Mercurial.vs14/bin
19 | /Sources/VS14/Integration/Git.vs14/obj
20 | /Sources/VS14/Integration/Git.vs14/bin
21 | /Sources/VS14/Foundation.vs14/obj/Release
22 | /Sources/VS14/Foundation.vs14/bin/Release
23 | /Sources/VS14/Features.vs14/obj
24 | /Sources/VS14/Features.vs14/bin
25 | *.db
26 | /Sources/VS14/Features.Infrastructure.vs14/bin
27 | /Sources/VS14/VscPackage.vs14/obj/Release
28 | /Sources/VS14/Features.Infrastructure.vs14/obj
29 | /packages
30 |
--------------------------------------------------------------------------------
/Sources/Shared/Features.Infrastructure/Features.Infrastructure.projitems:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath)
5 | true
6 | 99808a53-a739-49c2-9218-7f85473bb426
7 |
8 |
9 | SquaredInfinity.VSCommands.Features
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/Sources/Shared/Features.Infrastructure/Features.Infrastructure.shproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 99808a53-a739-49c2-9218-7f85473bb426
5 | 14.0
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/Sources/Shared/Features.Infrastructure/SolutionBadges/ISolutionBadgesService.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace SquaredInfinity.VSCommands.Features.SolutionBadges
6 | {
7 | public interface ISolutionBadgesService
8 | {
9 | void RequestRefresh();
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Sources/Shared/Features.Infrastructure/SolutionBadges/KnownProperties.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace SquaredInfinity.VSCommands.Features.SolutionBadges
6 | {
7 | public static class KnownProperties
8 | {
9 | public static readonly string BranchName = "vsc:branchName";
10 |
11 | public static readonly string AccentColor = "vs:accentColor";
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/Sources/Shared/Features.Infrastructure/SolutionBadges/SourceControl/ISourceControlInfoProvider.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace SquaredInfinity.VSCommands.Features.SolutionBadges.SourceControl
6 | {
7 | public interface ISourceControlInfoProvider
8 | {
9 | event EventHandler CurrentBadgeRefreshRequested;
10 | bool TryGetSourceControlInfo(string solutionFullPath, out IDictionary properties);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/Sources/Shared/Features.Infrastructure/SolutionBadges/SourceControl/SourceControlInfoProvider.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace SquaredInfinity.VSCommands.Features.SolutionBadges.SourceControl
6 | {
7 | public abstract class SourceControlInfoProvider : ISourceControlInfoProvider
8 | {
9 | public event EventHandler CurrentBadgeRefreshRequested;
10 | protected void RequestCurrentBadgeRefresh()
11 | {
12 | if (CurrentBadgeRefreshRequested != null)
13 | CurrentBadgeRefreshRequested(this, EventArgs.Empty);
14 | }
15 |
16 | public bool TryGetSourceControlInfo(string solutionFullPath, out IDictionary properties)
17 | {
18 | return DoTryGetSourceControlInfo(solutionFullPath, out properties);
19 | }
20 |
21 | protected abstract bool DoTryGetSourceControlInfo(string solutionFullPath, out IDictionary properties);
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/Sources/Shared/Features/AttachTo/AttachToView.cs:
--------------------------------------------------------------------------------
1 | using SquaredInfinity.Foundation.Presentation.Views;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Text;
5 |
6 | namespace SquaredInfinity.VSCommands.Features.AttachTo
7 | {
8 | public class AttachToView : View
9 | {
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Sources/Shared/Features/AttachTo/AttachToView.xaml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/Sources/Shared/Features/AttachTo/AttachToViewModel.cs:
--------------------------------------------------------------------------------
1 | using SquaredInfinity.Foundation.Presentation.ViewModels;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Text;
5 |
6 | namespace SquaredInfinity.VSCommands.Features.AttachTo
7 | {
8 | public class AttachToViewModel : ViewModel
9 | {
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Sources/Shared/Features/Features.projitems:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath)
5 | true
6 | 3af75030-d338-4882-afad-aeddd3727c2e
7 |
8 |
9 | SquaredInfinity.VSCommands.Features
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 | Designer
32 | MSBuild:Compile
33 |
34 |
35 | Designer
36 | MSBuild:Compile
37 |
38 |
39 | Designer
40 | MSBuild:Compile
41 |
42 |
43 |
--------------------------------------------------------------------------------
/Sources/Shared/Features/Features.shproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 3af75030-d338-4882-afad-aeddd3727c2e
5 | 14.0
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/Sources/Shared/Features/OutputWindowPane/ClassificationNames.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace SquaredInfinity.VSCommands.Features.OutputWindowPane
6 | {
7 | public static class ClassificationNames
8 | {
9 | // NOTE: When modifying members here make sure to update VSCFontAndColorDefaultsProvider as well!
10 |
11 | public const string OutputText = "VSC.Output.Text";
12 | public const string OutputInformation = "VSC.Output.Information";
13 | public const string OutputWarning = "VSC.Output.Warning";
14 | public const string OutputError = "VSC.Output.Error";
15 |
16 |
17 | public const string BuildOutputBuildSummary = "VSC.BuildOutput.BuildSummary";
18 | public const string BuildOutputBuildSummarySuccess = "VSC.BuildOutput.BuildSummary.Success";
19 | public const string BuildOutputBuildSummaryFailed = "VSC.BuildOutput.BuildSummary.Failed";
20 | public const string BuildOutputBuildSummaryTotal = "VSC.BuildOutput.BuildSummary.Total";
21 | public const string BuildOutputCodeContractsInformation = "VSC.BuildOutput.CodeContracts.Information";
22 | public const string BuildOutputProjectBuildStart = "VSC.BuildOutput.ProjectBuildStart";
23 | public const string BuildOutputProjectBuildSkipped = "VSC.BuildOutput.ProjectBuildSkipped";
24 |
25 |
26 | public const string TfsOutputError = "VSC.TfsOutput.Error";
27 | public const string TfsOutputWarning = "VSC.TfsOutput.Warning";
28 | public const string TfsOutputSuccess = "VSC.TfsOutput.Success";
29 |
30 | public const string FindResultsOutputMatch = "VSC.FindResultsOutput.Match";
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/Sources/Shared/Features/OutputWindowPane/FindResults/ClassificationDefinitions.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.VisualStudio.Text.Classification;
2 | using Microsoft.VisualStudio.Utilities;
3 | using System;
4 | using System.Collections.Generic;
5 | using System.ComponentModel.Composition;
6 | using System.Text;
7 | using System.Windows.Media;
8 |
9 | namespace SquaredInfinity.VSCommands.Features.OutputWindowPane.FindResults
10 | {
11 | public class ClassificationDefinitions
12 | {
13 | [Export(typeof(ClassificationTypeDefinition))]
14 | [Name(ClassificationNames.FindResultsOutputMatch)]
15 | internal static ClassificationTypeDefinition MatchClassifierTypeDefinition = null;
16 |
17 | [Export(typeof(EditorFormatDefinition))]
18 | [UserVisible(false)]
19 | [Name(ClassificationNames.FindResultsOutputMatch)]
20 | [Order(Before = Priority.High)]
21 | [ClassificationType(ClassificationTypeNames = ClassificationNames.FindResultsOutputMatch)]
22 | public sealed class MatchClassifierFormatDefinition : ClassificationFormatDefinition
23 | {
24 | public MatchClassifierFormatDefinition()
25 | {
26 | base.DisplayName = ClassificationNames.FindResultsOutputMatch;
27 | base.BackgroundOpacity = 0;
28 | base.BackgroundColor = Colors.Yellow;
29 | }
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/Sources/Shared/Features/OutputWindowPane/FindResults/FindResultsClassfierProvider.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.VisualStudio.Text.Classification;
2 | using Microsoft.VisualStudio.Utilities;
3 | using SquaredInfinity.VSCommands.Foundation;
4 | using SquaredInfinity.VSCommands.Foundation.Settings;
5 | using SquaredInfinity.VSCommands.Foundation.VisualStudioEvents;
6 | using Microsoft.Practices.Unity;
7 | using System;
8 | using System.Collections.Generic;
9 | using System.ComponentModel.Composition;
10 | using System.Text;
11 | using Microsoft.VisualStudio.Shell.Interop;
12 | using Microsoft.VisualStudio.Text;
13 |
14 | namespace SquaredInfinity.VSCommands.Features.OutputWindowPane.FindResults
15 | {
16 | [ContentType("FindResults")]
17 | [Export(typeof(IClassifierProvider))]
18 | [Name("VSC - Find Results Classifier Provider")]
19 | public class FindResultsClassfierProvider : IClassifierProvider
20 | {
21 | readonly FindResultsClassifier Classifier;
22 | readonly IVscSettingsService SettingsService;
23 | readonly IVisualStudioEventsService VisualStudioEventsService;
24 | readonly IClassificationFormatMapService ClassificationFormatMapService;
25 | readonly IClassificationTypeRegistryService ClassificationTypeRegistryService;
26 |
27 | [ImportingConstructor]
28 | public FindResultsClassfierProvider(
29 | IServiceProvider serviceProvider,
30 | IClassificationFormatMapService classificationFormatMapService,
31 | IClassificationTypeRegistryService classificationTypeRegistryService
32 | )
33 | {
34 | this.SettingsService = VscServices.Instance.Container.Resolve();
35 | this.VisualStudioEventsService = VscServices.Instance.Container.Resolve();
36 |
37 | this.ClassificationFormatMapService = classificationFormatMapService;
38 | this.ClassificationTypeRegistryService = classificationTypeRegistryService;
39 |
40 | var fontAndColorStorageService = serviceProvider.GetService(typeof(SVsFontAndColorStorage)) as IVsFontAndColorStorage;
41 |
42 | Classifier = new FindResultsClassifier(
43 | SettingsService,
44 | VisualStudioEventsService,
45 | ClassificationTypeRegistryService,
46 | ClassificationFormatMapService,
47 | fontAndColorStorageService,
48 | serviceProvider.GetDte2());
49 | }
50 |
51 | public IClassifier GetClassifier(ITextBuffer textBuffer)
52 | {
53 | try
54 | {
55 | if (textBuffer.ContentType.IsOfType("FindResults"))
56 | {
57 | return textBuffer.Properties.GetOrCreateSingletonProperty(
58 | "VSC.FindResultsWindowColoringClassifier",
59 | () => Classifier);
60 | }
61 | else
62 | {
63 | return null;
64 | }
65 | }
66 | catch (Exception ex)
67 | {
68 | // TODO: log
69 | //Logger.LogException(ex);
70 | return null;
71 | }
72 | }
73 | }
74 | }
75 |
--------------------------------------------------------------------------------
/Sources/Shared/Features/OutputWindowPane/Output/OutputClassifier.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.VisualStudio.Shell.Interop;
2 | using Microsoft.VisualStudio.Text.Classification;
3 | using SquaredInfinity.Foundation.Settings;
4 | using SquaredInfinity.VSCommands.Foundation.Settings;
5 | using SquaredInfinity.VSCommands.Foundation.VisualStudioEvents;
6 | using System;
7 | using System.Collections.Generic;
8 | using System.Text;
9 |
10 | namespace SquaredInfinity.VSCommands.Features.OutputWindowPane.Output
11 | {
12 | public class OutputClassifier : OutputWindowPaneClassifier
13 | {
14 | public OutputClassifier(
15 | IVscSettingsService settingsService,
16 | IVisualStudioEventsService vsEventsService,
17 | IClassificationTypeRegistryService typeRegistryService,
18 | IClassificationFormatMapService formatMapService,
19 | IVsFontAndColorStorage fontAndColorStorageService)
20 | : base(
21 | settingsService,
22 | vsEventsService,
23 | typeRegistryService,
24 | formatMapService,
25 | fontAndColorStorageService,
26 | "output")
27 | {
28 | IsEnabled = true;
29 |
30 | // TODO: get from actual configuration and react to any changes
31 | var Config = new Configuration();
32 |
33 | AddClassificationType(ClassificationNames.OutputError, Config.OutputErrorClassificationPattern);
34 | AddClassificationType(ClassificationNames.OutputWarning, Config.OutputWarningClassificationPattern);
35 | AddClassificationType(ClassificationNames.OutputInformation, Config.OutputInformationClassificationPattern);
36 |
37 | AddClassificationType(ClassificationNames.BuildOutputBuildSummarySuccess, Config.BuildOutputBuildSummarySuccessClassificationPattern);
38 | AddClassificationType(ClassificationNames.BuildOutputBuildSummaryFailed, Config.BuildOutputBuildSummaryFailedClassificationPattern);
39 | AddClassificationType(ClassificationNames.BuildOutputCodeContractsInformation, Config.BuildOutputCodeContractsInformationClassificationPattern);
40 | AddClassificationType(ClassificationNames.BuildOutputProjectBuildStart, Config.BuildOutputProjectBuildStartClassificationPattern);
41 | AddClassificationType(ClassificationNames.BuildOutputBuildSummary, Config.BuildOutputBuildSummaryClassificationPattern);
42 | AddClassificationType(ClassificationNames.BuildOutputBuildSummaryTotal, Config.BuildOutputBuildSummaryTotalClassificationPattern);
43 | AddClassificationType(ClassificationNames.BuildOutputProjectBuildSkipped, Config.BuildOutputProjectBuildSkippedClassificationPattern);
44 |
45 | AddClassificationType(ClassificationNames.TfsOutputError, Config.TfsOutputErrorClassificationPattern);
46 | AddClassificationType(ClassificationNames.TfsOutputWarning, Config.TfsOutputWarningClassificationPattern);
47 | AddClassificationType(ClassificationNames.TfsOutputSuccess, Config.TfsOutputSuccessClassificationPattern);
48 |
49 | OutputWindowTextClassificationOverride = ClassificationNames.OutputText;
50 | ShouldOverrideOutputWindowTextClassification = true;
51 |
52 | RefreshClassifications();
53 | }
54 | }
55 | }
--------------------------------------------------------------------------------
/Sources/Shared/Features/OutputWindowPane/Output/OutputClassifierProvider.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.VisualStudio.Shell.Interop;
2 | using Microsoft.Practices.Unity;
3 | using Microsoft.VisualStudio.Text;
4 | using Microsoft.VisualStudio.Text.Classification;
5 | using Microsoft.VisualStudio.Utilities;
6 | using SquaredInfinity.Foundation.Settings;
7 | using SquaredInfinity.VSCommands.Foundation;
8 | using SquaredInfinity.VSCommands.Foundation.VisualStudioEvents;
9 | using System;
10 | using System.Collections.Generic;
11 | using System.ComponentModel.Composition;
12 | using System.Text;
13 | using SquaredInfinity.VSCommands.Foundation.Settings;
14 |
15 | namespace SquaredInfinity.VSCommands.Features.OutputWindowPane.Output
16 | {
17 | [ContentType("output")]
18 | [ContentType("text")] // text needed to support of build log files opened in main editor
19 | [Export(typeof(IClassifierProvider))]
20 | [Name("VSC - Build Output Classifier Provider")]
21 | public class OutputWindowColoringClasifierProvider : IClassifierProvider
22 | {
23 | readonly OutputClassifier Classifier;
24 | readonly IVscSettingsService SettingsService;
25 | readonly IVisualStudioEventsService VisualStudioEventsService;
26 | readonly IClassificationFormatMapService ClassificationFormatMapService;
27 | readonly IClassificationTypeRegistryService ClassificationTypeRegistryService;
28 |
29 | [ImportingConstructor]
30 | public OutputWindowColoringClasifierProvider(
31 | IServiceProvider serviceProvider,
32 | IClassificationFormatMapService classificationFormatMapService,
33 | IClassificationTypeRegistryService classificationTypeRegistryService
34 | )
35 | {
36 | this.SettingsService = VscServices.Instance.Container.Resolve();
37 | this.VisualStudioEventsService = VscServices.Instance.Container.Resolve();
38 |
39 | this.ClassificationFormatMapService = classificationFormatMapService;
40 | this.ClassificationTypeRegistryService = classificationTypeRegistryService;
41 |
42 | var fontAndColorStorageService = serviceProvider.GetService(typeof(SVsFontAndColorStorage)) as IVsFontAndColorStorage;
43 |
44 | Classifier = new OutputClassifier(
45 | SettingsService,
46 | VisualStudioEventsService,
47 | ClassificationTypeRegistryService,
48 | ClassificationFormatMapService,
49 | fontAndColorStorageService);
50 | }
51 |
52 | public IClassifier GetClassifier(ITextBuffer textBuffer)
53 | {
54 | try
55 | {
56 | if (textBuffer.ContentType.IsOfType("output")
57 | || (textBuffer.ContentType.IsOfType("text") && textBuffer.CurrentSnapshot.GetText().StartsWith("Build started ")))
58 | {
59 | return
60 | textBuffer.Properties.GetOrCreateSingletonProperty(
61 | "VSC.BuildOutputColoringClassifier",
62 | () => Classifier);
63 | }
64 | else
65 | {
66 | return null;
67 | }
68 | }
69 | catch (Exception ex)
70 | {
71 | // TODO
72 | //ex.Log();
73 | return null;
74 | }
75 | }
76 | }
77 | }
78 |
--------------------------------------------------------------------------------
/Sources/Shared/Features/OutputWindowPane/OutputWindowPaneClassifier.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.VisualStudio.Shell.Interop;
2 | using Microsoft.VisualStudio.Text;
3 | using Microsoft.VisualStudio.Text.Classification;
4 | using SquaredInfinity.Foundation.Settings;
5 | using SquaredInfinity.VSCommands.Foundation.Settings;
6 | using SquaredInfinity.VSCommands.Foundation.Text.Classification;
7 | using SquaredInfinity.VSCommands.Foundation.VisualStudioEvents;
8 | using System;
9 | using System.Collections.Generic;
10 | using System.Text;
11 |
12 | namespace SquaredInfinity.VSCommands.Features.OutputWindowPane
13 | {
14 | public class OutputWindowPaneClassifier : VscClassifier
15 | {
16 | protected bool ShouldOverrideOutputWindowTextClassification { get; set; }
17 |
18 | protected string OutputWindowTextClassificationOverride { get; set; }
19 |
20 | public OutputWindowPaneClassifier(
21 | IVscSettingsService settingsService,
22 | IVisualStudioEventsService vsEventsService,
23 | IClassificationTypeRegistryService typeRegistryService,
24 | IClassificationFormatMapService formatMapService,
25 | IVsFontAndColorStorage fontAndColorStorageService,
26 | string classificationMapName)
27 | : base(
28 | settingsService,
29 | vsEventsService,
30 | typeRegistryService,
31 | formatMapService,
32 | fontAndColorStorageService,
33 | classificationMapName)
34 | {
35 |
36 | }
37 |
38 | protected override IList DoGetClassificationSpans(Microsoft.VisualStudio.Text.SnapshotSpan span)
39 | {
40 | var result = base.DoGetClassificationSpans(span);
41 |
42 | if (ShouldOverrideOutputWindowTextClassification
43 | && (result == null || result.Count == 0))
44 | {
45 | var c = ClassificationTypeRegistryService.GetClassificationType(OutputWindowTextClassificationOverride);
46 |
47 | result.Add(new ClassificationSpan(new SnapshotSpan(span.Start, span.Length), c));
48 | }
49 |
50 | return result;
51 | }
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/Sources/Shared/Features/SolutionBadges/CurrentVSStateInfo.cs:
--------------------------------------------------------------------------------
1 | using EnvDTE;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Text;
5 |
6 | namespace SquaredInfinity.VSCommands.Features.SolutionBadges
7 | {
8 | public class CurrentVSStateInfo
9 | {
10 | public string SolutionName;
11 | public string BranchName;
12 | public string ActiveDocumentName;
13 | public dbgDebugMode DebugMode;
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Sources/Shared/Features/SolutionBadges/SolutionBadgeView.cs:
--------------------------------------------------------------------------------
1 | using SquaredInfinity.Foundation.Presentation.Views;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Text;
5 |
6 | namespace SquaredInfinity.VSCommands.Features.SolutionBadges
7 | {
8 | public class SolutionBadgeView : View
9 | {
10 | public SolutionBadgeView()
11 | {
12 | base.RefreshViewModelOnDataContextChange = false;
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Sources/Shared/Features/XamlResources.cs:
--------------------------------------------------------------------------------
1 | using SquaredInfinity.Foundation.Presentation.Resources;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.ComponentModel.Composition;
5 | using System.Text;
6 |
7 | namespace SquaredInfinity.VSCommands.Features
8 | {
9 | [ExportAttribute(typeof(IXamlResourcesProvider))]
10 | [XamlResourcesProviderMetadata(ImportOrder = XamlResources.ImportOrder)]
11 | public class XamlResources : IXamlResourcesProvider
12 | {
13 | // Import Order is higher than Foundation.Presentation Import Order (on which resources from this assembly may depend)
14 | public const int ImportOrder = SquaredInfinity.Foundation.Presentation.XamlResources.ImportOrder + 100;
15 |
16 | public void LoadAndMergeResources()
17 | {
18 | ResourcesManager.LoadAndMergeCompiledResourceDictionaryFromThisAssembly("XamlResources.xaml");
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/Sources/Shared/Features/XamlResources.xaml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/Sources/Shared/Foundation/DeploymentInfo.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace SquaredInfinity.VSCommands.Foundation
6 | {
7 | public class DeploymentInfo
8 | {
9 | public VersionInstallationInfo InitialVersion { get; set; }
10 | public VersionInstallationInfo PreviousVersion { get; set; }
11 | public VersionInstallationInfo CurrentVersion { get; set; }
12 |
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/Sources/Shared/Foundation/FontsAndColors/VSCFontAndColorDefaultsProvider.IVsFontAndColorDefaults.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.VisualStudio.Shell.Interop;
2 | using SquaredInfinity.VSCommands.Foundation.VisualStudioEvents;
3 | using System;
4 | using System.Collections.Generic;
5 | using System.ComponentModel.Design;
6 | using System.Diagnostics;
7 | using System.Runtime.InteropServices;
8 | using System.Text;
9 | using SquaredInfinity.Foundation.Extensions;
10 | using Microsoft.Win32;
11 | using System.Linq;
12 | using System.Security.Principal;
13 | using System.Security.AccessControl;
14 | using Microsoft.VisualStudio;
15 |
16 | namespace SquaredInfinity.VSCommands.Foundation.FontsAndColors
17 | {
18 | public partial class VSCFontAndColorDefaultsProvider
19 | {
20 | #region IVsFontAndColorDefaults
21 |
22 | public int GetBaseCategory(out Guid pguidBase)
23 | {
24 | pguidBase = new Guid("{b0e6a221-92fd-4d72-be80-04a36b591fcb}");
25 |
26 | return VSConstants.S_OK;
27 | }
28 |
29 | public int GetCategoryName(out string pbstrName)
30 | {
31 | pbstrName = "VSCommands";
32 |
33 | return VSConstants.S_OK;
34 | }
35 |
36 | public int GetFlags(out uint dwFlags)
37 | {
38 | dwFlags = (uint)__FONTCOLORFLAGS.FCF_SAVEALL;
39 |
40 | return VSConstants.S_OK;
41 | }
42 |
43 | public int GetFont(FontInfo[] pInfo)
44 | {
45 | return VSConstants.S_OK;
46 | }
47 |
48 | public int GetItem(int iItem, AllColorableItemInfo[] pInfo)
49 | {
50 | pInfo[0] = ColorableItems[iItem];
51 |
52 | return VSConstants.S_OK;
53 | }
54 |
55 | public int GetItemByName(string szItem, AllColorableItemInfo[] pInfo)
56 | {
57 | return VSConstants.S_OK;
58 | }
59 |
60 | public int GetItemCount(out int pcItems)
61 | {
62 | pcItems = ColorableItems.Count;
63 |
64 | return VSConstants.S_OK;
65 | }
66 |
67 | public int GetPriority(out ushort pPriority)
68 | {
69 | pPriority = 0;
70 |
71 | return VSConstants.S_OK;
72 | }
73 |
74 | #endregion
75 | }
76 | }
77 |
--------------------------------------------------------------------------------
/Sources/Shared/Foundation/FontsAndColors/VSCFontAndColorDefaultsProvider.IVsFontAndColorDefaultsProvider.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.VisualStudio.Shell.Interop;
2 | using SquaredInfinity.VSCommands.Foundation.VisualStudioEvents;
3 | using System;
4 | using System.Collections.Generic;
5 | using System.ComponentModel.Design;
6 | using System.Diagnostics;
7 | using System.Runtime.InteropServices;
8 | using System.Text;
9 | using SquaredInfinity.Foundation.Extensions;
10 | using Microsoft.Win32;
11 | using System.Linq;
12 | using System.Security.Principal;
13 | using System.Security.AccessControl;
14 | using Microsoft.VisualStudio;
15 |
16 | namespace SquaredInfinity.VSCommands.Foundation.FontsAndColors
17 | {
18 | public partial class VSCFontAndColorDefaultsProvider
19 | {
20 | #region IVsFontAndColorDefaultsProvider
21 |
22 | public int GetObject(ref Guid rguidCategory, out object ppObj)
23 | {
24 | rguidCategory = VSCFontAndColorCategoryGuid;
25 | ppObj = this;
26 |
27 | return VSConstants.S_OK;
28 | }
29 |
30 | #endregion
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/Sources/Shared/Foundation/FontsAndColors/VSCFontAndColorDefaultsProvider.IVsFontAndColorEvents.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.VisualStudio.Shell.Interop;
2 | using SquaredInfinity.VSCommands.Foundation.VisualStudioEvents;
3 | using System;
4 | using System.Collections.Generic;
5 | using System.ComponentModel.Design;
6 | using System.Diagnostics;
7 | using System.Runtime.InteropServices;
8 | using System.Text;
9 | using SquaredInfinity.Foundation.Extensions;
10 | using Microsoft.Win32;
11 | using System.Linq;
12 | using System.Security.Principal;
13 | using System.Security.AccessControl;
14 | using Microsoft.VisualStudio;
15 |
16 | namespace SquaredInfinity.VSCommands.Foundation.FontsAndColors
17 | {
18 | public partial class VSCFontAndColorDefaultsProvider
19 | {
20 | #region IVsFontAndColorEvents
21 |
22 | public int OnApply()
23 | {
24 | VisualStudioEventsService.RaiseAfterVSCommandsColorSettingsChanged();
25 | return VSConstants.S_OK;
26 | }
27 |
28 | public int OnFontChanged(ref Guid rguidCategory, FontInfo[] pInfo, LOGFONTW[] pLOGFONT, uint HFONT)
29 | {
30 | return VSConstants.S_OK;
31 | }
32 |
33 | public int OnItemChanged(ref Guid rguidCategory, string szItem, int iItem, ColorableItemInfo[] pInfo, uint crLiteralForeground, uint crLiteralBackground)
34 | {
35 | return VSConstants.S_OK;
36 | }
37 |
38 | public int OnReset(ref Guid rguidCategory)
39 | {
40 | VisualStudioEventsService.RaiseAfterVSCommandsColorSettingsChanged();
41 | return VSConstants.S_OK;
42 | }
43 |
44 | public int OnResetToBaseCategory(ref Guid rguidCategory)
45 | {
46 | return VSConstants.S_OK;
47 | }
48 |
49 | #endregion
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/Sources/Shared/Foundation/Foundation.projitems:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath)
5 | true
6 | d1941403-007f-4f39-ad6b-5bb81d221164
7 |
8 |
9 | SquaredInfinity.VSCommands.Foundation
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/Sources/Shared/Foundation/Foundation.shproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | d1941403-007f-4f39-ad6b-5bb81d221164
5 | 14.0
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/Sources/Shared/Foundation/FrameworkExtensions/EnvDTE/DTE2.extensions.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace SquaredInfinity.VSCommands
6 | {
7 | public static class DTE2Extensions
8 | {
9 | public static EnvDTE.Document GetActiveDocument(this EnvDTE80.DTE2 dte2)
10 | {
11 | EnvDTE.Document result = null;
12 |
13 | try
14 | {
15 | result = dte2.ActiveDocument;
16 | }
17 | catch (Exception ex)
18 | {
19 | //todo: investigate why it is sometimes thrown
20 | //Logger.SwallowException(ex, "Dte.ActiveDocument can throw exceptions when accessed but this does not impact this scenario.");
21 | }
22 |
23 | return result;
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Sources/Shared/Foundation/FrameworkExtensions/Microsoft.VisualStudio.Shell.Interop/ColorableItemInfo.extensions.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.VisualStudio.Shell.Interop;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Globalization;
5 | using System.Text;
6 | using System.Text.RegularExpressions;
7 | using System.Windows.Media;
8 |
9 | namespace SquaredInfinity.VSCommands
10 | {
11 | public static class ColorableItemInfoExtensions
12 | {
13 | public static Color GetForeground(this ColorableItemInfo cii)
14 | {
15 | return GetColor(cii.crForeground);
16 | }
17 |
18 | public static Color GetBackground(this ColorableItemInfo cii)
19 | {
20 | return GetColor(cii.crBackground);
21 | }
22 |
23 | static Color GetColor(uint color)
24 | {
25 | if (color == 1)
26 | return Colors.Transparent;
27 |
28 | var match = Regex.Match(color.ToString("x6"), @"(?..)(?..)(?..)");
29 |
30 | var r = byte.Parse(match.Groups["red"].Value, NumberStyles.HexNumber);
31 | var g = byte.Parse(match.Groups["green"].Value, NumberStyles.HexNumber);
32 | var b = byte.Parse(match.Groups["blue"].Value, NumberStyles.HexNumber);
33 |
34 | return Color.FromRgb(r, g, b);
35 | }
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/Sources/Shared/Foundation/FrameworkExtensions/System/IServiceProvider.extensions.cs:
--------------------------------------------------------------------------------
1 | using EnvDTE;
2 | using EnvDTE80;
3 | using System;
4 | using System.Collections.Generic;
5 | using System.Text;
6 |
7 | namespace SquaredInfinity.VSCommands
8 | {
9 | public static class IServiceProviderExtensions
10 | {
11 | public static DTE2 GetDte2(this IServiceProvider service_provider)
12 | {
13 | var dte2 = service_provider.GetService(typeof(DTE)) as DTE2;
14 |
15 | return dte2;
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/Sources/Shared/Foundation/IVscUIService.cs:
--------------------------------------------------------------------------------
1 | using SquaredInfinity.Foundation.Presentation;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Text;
5 |
6 | namespace SquaredInfinity.VSCommands.Foundation
7 | {
8 | public interface IVscUIService : IUIService
9 | {
10 | void Run(Action action);
11 | T Run(Func action);
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/Sources/Shared/Foundation/Settings/IVscSettingsService.cs:
--------------------------------------------------------------------------------
1 | using SquaredInfinity.Foundation.Settings;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Text;
5 |
6 | namespace SquaredInfinity.VSCommands.Foundation.Settings
7 | {
8 | public interface IVscSettingsService : ISettingsService
9 | {
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Sources/Shared/Foundation/Settings/VscSettingScope.cs:
--------------------------------------------------------------------------------
1 | using SquaredInfinity.Foundation.Settings;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Text;
5 |
6 | namespace SquaredInfinity.VSCommands.Foundation.Settings
7 | {
8 | public class VscSettingScope : SettingScope
9 | {
10 | ///
11 | /// Solution for all users
12 | ///
13 | public static int Solution = 100;
14 | ///
15 | /// Solution for current user
16 | ///
17 | public static int UserSolution = 101;
18 | ///
19 | /// Project for all users
20 | ///
21 | public static int Project = 102;
22 | ///
23 | /// Project for current user
24 | ///
25 | public static int UserProject = 103;
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/Sources/Shared/Foundation/Settings/VscSettingsService.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using SquaredInfinity.Foundation.Extensions;
5 | using System.Text;
6 | using SquaredInfinity.Foundation.Settings;
7 | using SquaredInfinity.Foundation;
8 |
9 | namespace SquaredInfinity.VSCommands.Foundation.Settings
10 | {
11 | ///
12 | /// Manages the storage and retrieval of settings.
13 | ///
14 | public class VscSettingsService : FileSystemSettingsService, IVscSettingsService
15 | {
16 | public VscSettingsService(ISerializer defaultSerializer, DirectoryInfo location)
17 | : base(defaultSerializer, location)
18 | { }
19 |
20 | protected override IReadOnlyList GetScopesByPriority()
21 | {
22 | return new int[]
23 | {
24 | VscSettingScope.UserProject,
25 | VscSettingScope.Project,
26 | VscSettingScope.UserSolution,
27 | VscSettingScope.Solution,
28 | SettingScope.UserMachine,
29 | SettingScope.User,
30 |
31 | // not supported at the moment
32 | //SettingScope.Machine,
33 | //SettingScope.Global
34 | };
35 | }
36 |
37 |
38 |
39 | protected override FileInfo GetFile(DirectoryInfo location, string application, string container, string key, int scope, string machineName, string userName)
40 | {
41 | // todo: add support for solution and project settings
42 | // it will come from using different overload of GetSetting / Set setting
43 | return GetFile(location, application, container, key, scope, machineName, userName, null, null);
44 | }
45 |
46 | FileInfo GetFile(
47 | DirectoryInfo location,
48 | string application,
49 | string container,
50 | string key,
51 | int scope,
52 | string machineName,
53 | string userName,
54 | FileInfo solution,
55 | FileInfo project)
56 | {
57 | if (scope == SettingScope.Global || scope == SettingScope.Machine)
58 | throw new NotSupportedException("todo: global and machine settings are not supported");
59 |
60 | if (scope >= 100)
61 | throw new NotSupportedException("todo: support for solution and project settings");
62 |
63 | if (scope.IsIn(VscSettingScope.Project, VscSettingScope.UserProject))
64 | {
65 | return GetFile(project.Directory, application, container, key, scope, machineName, userName);
66 | }
67 |
68 | if(scope.IsIn(VscSettingScope.Solution, VscSettingScope.UserSolution))
69 | {
70 | return GetFile(solution.Directory, application, container, key, scope, machineName, userName);
71 | }
72 |
73 | return base.GetFile(Location, application, container, key, scope, machineName, userName);
74 | }
75 | }
76 | }
77 |
--------------------------------------------------------------------------------
/Sources/Shared/Foundation/Text/Classification/ClassificationMatchPattern.cs:
--------------------------------------------------------------------------------
1 | using SquaredInfinity.Foundation;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Text;
5 | using System.Text.RegularExpressions;
6 |
7 | namespace SquaredInfinity.VSCommands.Foundation.Text.Classification
8 | {
9 | public class ClassificationMatchPattern : NotifyPropertyChangedObject
10 | {
11 | string _classificationTypeName;
12 | public string ClassificationTypeName
13 | {
14 | get { return _classificationTypeName; }
15 | set { TrySetThisPropertyValue(ref _classificationTypeName, value); }
16 | }
17 |
18 | string _pattern;
19 | public string Pattern
20 | {
21 | get { return _pattern; }
22 | set { TrySetThisPropertyValue(ref _pattern, value); }
23 | }
24 |
25 | RegexOptions _regexOptions = RegexOptions.None;
26 | public RegexOptions RegexOptions
27 | {
28 | get { return _regexOptions; }
29 | set { TrySetThisPropertyValue(ref _regexOptions, value); }
30 | }
31 |
32 | public ClassificationMatchPattern() { }
33 |
34 | public ClassificationMatchPattern(string classificationTypeName, string pattern, RegexOptions regexOptions)
35 | {
36 | this.ClassificationTypeName = classificationTypeName;
37 | this.Pattern = pattern;
38 | this.RegexOptions = regexOptions;
39 | }
40 |
41 | public Regex ToRegex()
42 | {
43 | var regex = new Regex(Pattern, RegexOptions);
44 |
45 | return regex;
46 | }
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/Sources/Shared/Foundation/Text/Classification/ClassificationTypeMatchPattern.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.VisualStudio.Text.Classification;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Text;
5 | using Microsoft.VisualStudio.Text;
6 | using Microsoft.VisualStudio.Shell.Interop;
7 |
8 | namespace SquaredInfinity.VSCommands.Foundation.Text.Classification
9 | {
10 | public class ClassificationTypeMatchPattern
11 | {
12 | public string ClassificationTypeName { get; set; }
13 | public ClassificationMatchPattern ClassificationMatchPattern { get; set; }
14 | public ColorableItemInfo[] ColorableItemInfos { get; set; }
15 |
16 | public ClassificationTypeMatchPattern()
17 | {
18 | this.ColorableItemInfos = new[] { new ColorableItemInfo() };
19 | }
20 |
21 | public bool IsMatch(string input)
22 | {
23 | return ClassificationMatchPattern.ToRegex().IsMatch(input);
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Sources/Shared/Foundation/Text/Classification/VscClassifier.IClassifier.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.VisualStudio.Text.Classification;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Text;
5 | using Microsoft.VisualStudio.Text;
6 |
7 | namespace SquaredInfinity.VSCommands.Foundation.Text.Classification
8 | {
9 | public partial class VscClassifier : IClassifier
10 | {
11 | public event EventHandler ClassificationChanged;
12 |
13 | IList IClassifier.GetClassificationSpans(SnapshotSpan span)
14 | {
15 | return DoGetClassificationSpans(span);
16 | }
17 |
18 | protected virtual IList DoGetClassificationSpans(SnapshotSpan span)
19 | {
20 | List result = new List();
21 |
22 | try
23 | {
24 | if (!IsEnabled)
25 | return result;
26 |
27 | if (span == null || span.IsEmpty)
28 | return result;
29 |
30 | string spanText = span.GetText();
31 |
32 | foreach (var ctmp in ClassificationTypesMatchPatterns)
33 | {
34 | if (!ctmp.IsMatch(spanText))
35 | {
36 | continue;
37 | }
38 | else
39 | {
40 | var c = ClassificationTypeRegistryService.GetClassificationType(ctmp.ClassificationTypeName);
41 |
42 | result.Add(
43 | new ClassificationSpan(
44 | new SnapshotSpan(span.Start, span.Length), c));
45 | break;
46 | }
47 | }
48 | }
49 | catch (Exception ex)
50 | {
51 | // TODO: logging
52 | //ex.Log();
53 | }
54 |
55 | return result;
56 | }
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/Sources/Shared/Foundation/ThemeInfo.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.VisualStudio.Shell;
2 | using SquaredInfinity.Foundation.Media.ColorSpaces;
3 | using System;
4 | using System.Collections.Generic;
5 | using System.Text;
6 | using SquaredInfinity.Foundation.Extensions;
7 | using System.Windows;
8 | using System.Windows.Media;
9 |
10 | namespace SquaredInfinity.VSCommands.Foundation
11 | {
12 | public static class ThemeInfo
13 | {
14 | public static System.Windows.Media.Color GetThemeColor()
15 | {
16 | if (!ThreadHelper.CheckAccess())
17 | {
18 | return ThreadHelper.Generic.Invoke(() => GetThemeColor());
19 | }
20 |
21 | var windowColorKey = Microsoft.VisualStudio.PlatformUI.EnvironmentColors.SystemWindowColorKey;
22 | var windowColor = (System.Windows.Media.Color)Application.Current.MainWindow.FindResource(windowColorKey);
23 |
24 | return windowColor;
25 | }
26 |
27 | public static bool IsDarkTheme()
28 | {
29 | var theme_color = GetThemeColor();
30 |
31 | var scRgb = theme_color.ToScRGBColor();
32 | var xyz = KnownColorSpaces.scRGB.ToXYZColor(scRgb);
33 | var lab = (LabColor)KnownColorSpaces.Lab.FromXYZColor(xyz);
34 |
35 | return lab.L < 50;
36 | }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/Sources/Shared/Foundation/VersionInstallationInfo.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace SquaredInfinity.VSCommands.Foundation
6 | {
7 | public class VersionInstallationInfo
8 | {
9 | public DateTime InstalledOnUtc { get; set; }
10 | public Version Version { get; set; }
11 | public string MachineName { get; set; }
12 |
13 | public static VersionInstallationInfo GetCurrent()
14 | {
15 | return new VersionInstallationInfo
16 | {
17 | InstalledOnUtc = DateTime.UtcNow,
18 | MachineName = Environment.MachineName,
19 | Version = StaticSettings.CurrentVersion
20 | };
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/Sources/Shared/Foundation/VisualStudioEvents/BroadcastMessagesEventsHandler.MessageBroadcastEventArgs.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.VisualStudio;
2 | using Microsoft.VisualStudio.Shell.Interop;
3 | using System;
4 | using System.Collections.Generic;
5 | using System.Text;
6 |
7 | namespace SquaredInfinity.VSCommands.Foundation.VisualStudioEvents
8 | {
9 | public partial class BroadcastMessagesEventsHandler
10 | {
11 | public class MessageBroadcastEventArgs : EventArgs
12 | {
13 | public uint Msg { get; private set; }
14 | public IntPtr wParam { get; private set; }
15 | public IntPtr lParam { get; private set; }
16 |
17 | public MessageBroadcastEventArgs(uint msg, IntPtr wParam, IntPtr lParam)
18 | {
19 | this.Msg = msg;
20 | this.wParam = wParam;
21 | this.lParam = lParam;
22 | }
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/Sources/Shared/Foundation/VisualStudioEvents/BroadcastMessagesEventsHandler.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.VisualStudio;
2 | using Microsoft.VisualStudio.Shell.Interop;
3 | using System;
4 | using System.Collections.Generic;
5 | using System.Text;
6 |
7 | namespace SquaredInfinity.VSCommands.Foundation.VisualStudioEvents
8 | {
9 | public partial class BroadcastMessagesEventsHandler : IVsBroadcastMessageEvents
10 | {
11 | uint Cookie;
12 |
13 | public event EventHandler AfterMessageBroadcast;
14 |
15 | public BroadcastMessagesEventsHandler(IServiceProvider serviceProvider)
16 | {
17 | var shellService = serviceProvider.GetService(typeof(SVsShell)) as IVsShell;
18 |
19 | if (shellService != null)
20 | {
21 | shellService.AdviseBroadcastMessages(this, out Cookie);
22 | }
23 | }
24 |
25 | public int OnBroadcastMessage(uint msg, IntPtr wParam, IntPtr lParam)
26 | {
27 | if (AfterMessageBroadcast != null)
28 | {
29 | AfterMessageBroadcast(this, new MessageBroadcastEventArgs(msg, wParam, lParam));
30 | }
31 |
32 | return VSConstants.S_OK;
33 | }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/Sources/Shared/Foundation/VisualStudioEvents/DocumentEventArgs.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Text;
5 | using EnvDTE;
6 |
7 | namespace SquaredInfinity.VSCommands.Foundation.VisualStudioEvents
8 | {
9 | public class DocumentEventArgs : EventArgs
10 | {
11 | public string DocumentFileName { get; private set; }
12 | public string DocumentFullPath { get; private set; }
13 | public ProjectItem ProjectItem { get; private set; }
14 |
15 | public DocumentEventArgs(string documentFullPath, ProjectItem projectItem)
16 | {
17 | this.DocumentFullPath = documentFullPath;
18 | this.DocumentFileName = Path.GetFileName(documentFullPath);
19 |
20 | this.ProjectItem = projectItem;
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/Sources/Shared/Foundation/VisualStudioEvents/IVisualStudioEventsService.cs:
--------------------------------------------------------------------------------
1 | using EnvDTE;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Text;
5 |
6 | namespace SquaredInfinity.VSCommands.Foundation.VisualStudioEvents
7 | {
8 | public interface IVisualStudioEventsService
9 | {
10 | event EventHandler AfterVSCommandsColorSettingsChanged;
11 | event EventHandler AfterTextColorSettingsChanged;
12 | event EventHandler AfterVisualStudioThemeChanged;
13 |
14 | event EventHandler AfterSolutionOpened;
15 | event EventHandler AfterSolutionClosed;
16 |
17 | event EventHandler AfterActiveDocumentChanged;
18 |
19 | event EventHandler AfterDebuggerEnterDesignMode;
20 | event EventHandler AfterDebuggerEnterRunMode;
21 | event EventHandler AfterDebuggerEnterBreakMode;
22 |
23 | event EventHandler AfterActiveSolutionConfigChanged;
24 |
25 |
26 | event _dispBuildEvents_OnBuildBeginEventHandler OnBuildBegin;
27 | event _dispBuildEvents_OnBuildDoneEventHandler OnBuildDone;
28 | event _dispBuildEvents_OnBuildProjConfigBeginEventHandler OnBuildProjConfigBegin;
29 | event _dispBuildEvents_OnBuildProjConfigDoneEventHandler OnBuildProjConfigDone;
30 |
31 | ///
32 | /// Register an action to be executed when VS UI is loaded (i.e. Main Window has been created)
33 | /// The action will be executed immediately if UI has already been loaded.
34 | ///
35 | ///
36 | void RegisterVisualStudioUILoadedAction(Action action);
37 | void RaiseAfterVSCommandsColorSettingsChanged();
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/Sources/Shared/Foundation/VisualStudioEvents/VsShellPropertyEventsHandler.ShellPropertyChangeEventArgs.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.VisualStudio;
2 | using Microsoft.VisualStudio.Shell.Interop;
3 | using System;
4 | using System.Collections.Generic;
5 | using System.Text;
6 |
7 | namespace SquaredInfinity.VSCommands.Foundation.VisualStudioEvents
8 | {
9 | public partial class VsShellPropertyEventsHandler : IVsShellPropertyEvents
10 | {
11 | public class ShellPropertyChangeEventArgs : EventArgs
12 | {
13 | public int PropId { get; private set; }
14 | public object Var { get; private set; }
15 |
16 | public ShellPropertyChangeEventArgs(int propId, object var)
17 | {
18 | this.PropId = propId;
19 | this.Var = var;
20 | }
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/Sources/Shared/Foundation/VisualStudioEvents/VsShellPropertyEventsHandler.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.VisualStudio;
2 | using Microsoft.VisualStudio.Shell.Interop;
3 | using System;
4 | using System.Collections.Generic;
5 | using System.Text;
6 |
7 | namespace SquaredInfinity.VSCommands.Foundation.VisualStudioEvents
8 | {
9 | public partial class VsShellPropertyEventsHandler : IVsShellPropertyEvents
10 | {
11 | uint Cookie;
12 |
13 | public event EventHandler AfterShellPropertyChanged;
14 |
15 | public VsShellPropertyEventsHandler(IServiceProvider serviceProvider)
16 | {
17 | var shellService = serviceProvider.GetService(typeof(SVsShell)) as IVsShell;
18 |
19 | if (shellService != null)
20 | {
21 | shellService.AdviseShellPropertyChanges(this, out Cookie);
22 | }
23 | }
24 |
25 | public int OnShellPropertyChange(int propid, object var)
26 | {
27 | if(AfterShellPropertyChanged != null)
28 | {
29 | AfterShellPropertyChanged(this, new ShellPropertyChangeEventArgs(propid, var));
30 | }
31 |
32 | return VSConstants.S_OK;
33 | }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/Sources/Shared/Foundation/VscServices.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Practices.Unity;
2 | using Microsoft.VisualStudio.Text.Classification;
3 | using System;
4 | using System.Collections.Generic;
5 | using System.ComponentModel.Composition;
6 | using System.Text;
7 |
8 | namespace SquaredInfinity.VSCommands.Foundation
9 | {
10 | // TODO: this is just a temporary measure
11 | // until I find out how to register custom instances with VS MEF
12 | public class VscServices
13 | {
14 | public IUnityContainer Container { get; set; }
15 |
16 | public static VscServices Instance { get; private set; }
17 |
18 | public static void Initialise(VscServices instance)
19 | {
20 | Instance = instance;
21 |
22 | Instance.Container.RegisterInstance(Instance.ClassificationTypeRegistryService);
23 | Instance.Container.RegisterInstance(Instance.ClassificationFormatMapService);
24 | Instance.Container.RegisterInstance(Instance.FormatMapService);
25 | }
26 |
27 | [Import]
28 | public IEditorFormatMapService FormatMapService;
29 |
30 | [Import]
31 | public IClassificationFormatMapService ClassificationFormatMapService;
32 |
33 | [Import]
34 | public IClassificationTypeRegistryService ClassificationTypeRegistryService;
35 |
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/Sources/Shared/Integration/Git/Git.projitems:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath)
5 | true
6 | 9b9af231-62fe-433e-86c0-91e159091d67
7 |
8 |
9 | SquaredInfinity.VSCommands.Integration.Git
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/Sources/Shared/Integration/Git/Git.shproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 9b9af231-62fe-433e-86c0-91e159091d67
5 | 14.0
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/Sources/Shared/Integration/Mercurial/Mercurial.projitems:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath)
5 | true
6 | 26bc7338-53f3-4136-a981-c0f4b6d4d778
7 |
8 |
9 | Mercurial
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/Sources/Shared/Integration/Mercurial/Mercurial.shproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 26bc7338-53f3-4136-a981-c0f4b6d4d778
5 | 14.0
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/Sources/Shared/Integration/TeamFoundation/Features/SolutionBadges/TeamFoundationSourceControlInfoProvider.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.TeamFoundation.VersionControl.Client;
2 | using SquaredInfinity.VSCommands.Integration.TeamFoundation;
3 | using System;
4 | using SquaredInfinity.Foundation.Extensions;
5 | using System.Collections.Generic;
6 | using System.ComponentModel.Composition;
7 | using System.Text;
8 |
9 | namespace SquaredInfinity.VSCommands.Features.SolutionBadges.SourceControl.Integration.TeamFoundation
10 | {
11 | [Export(typeof(ISourceControlInfoProvider))]
12 | public class TeamFoundationSourceControlInfoProvider : SourceControlInfoProvider
13 | {
14 | readonly ITeamFoundationHelper TeamFoundationHelper;
15 |
16 | [ImportingConstructor]
17 | public TeamFoundationSourceControlInfoProvider(ITeamFoundationHelper teamFoundationHelper)
18 | {
19 | this.TeamFoundationHelper = teamFoundationHelper;
20 | }
21 |
22 | protected override bool DoTryGetSourceControlInfo(string solutionFullPath, out IDictionary properties)
23 | {
24 | properties = new Dictionary();
25 |
26 | if (!TeamFoundationHelper.IsConnected())
27 | return false;
28 |
29 | var workspace = (Workspace) null;
30 | var branchObject = (BranchObject)null;
31 |
32 | var branchName = TeamFoundationHelper.GetBranchNameForItem(solutionFullPath, out workspace, out branchObject);
33 |
34 | if (branchName.IsNullOrEmpty())
35 | return false;
36 |
37 | properties.AddOrUpdate("tfs:workspace", workspace.Name);
38 |
39 | properties.AddOrUpdate(KnownProperties.BranchName, branchName);
40 |
41 | return true;
42 | }
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/Sources/Shared/Integration/TeamFoundation/ITeamFoundationHelper.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.TeamFoundation.VersionControl.Client;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Text;
5 | using System.Threading;
6 |
7 | namespace SquaredInfinity.VSCommands.Integration.TeamFoundation
8 | {
9 | public interface ITeamFoundationHelper
10 | {
11 | bool IsConnected();
12 |
13 | #region Wait For Connection
14 | bool WaitForConnection();
15 | bool WaitForConnection(TimeSpan timeout);
16 | bool WaitForConnection(CancellationToken cancellationToken);
17 | #endregion
18 |
19 | string GetBranchNameForCurrentSolution();
20 |
21 | #region Get Branch Name For Item
22 | string GetBranchNameForItem(string localFullPath);
23 | string GetBranchNameForItem(
24 | string localFullPath,
25 | out Workspace workspace,
26 | out BranchObject branchObject);
27 | string GetBranchNameForItem(
28 | string localFullPath,
29 | bool waitForConnection,
30 | TimeSpan timeout,
31 | out Workspace workspace,
32 | out BranchObject branchObject);
33 | string GetBranchNameForItem(
34 | string localFullPath,
35 | bool waitForConnection,
36 | CancellationToken cancellationToken,
37 | out Workspace workspace,
38 | out BranchObject branchObject);
39 | #endregion
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/Sources/Shared/Integration/TeamFoundation/TeamFoundation.projitems:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath)
5 | true
6 | f63b9f18-ecec-4a58-adba-6851a12fa004
7 |
8 |
9 | SquaredInfinity.VSCommands.Integration.TeamFoundation
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/Sources/Shared/Integration/TeamFoundation/TeamFoundation.shproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | f63b9f18-ecec-4a58-adba-6851a12fa004
5 | 14.0
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/Sources/Shared/Internal/AssemblyInfo.shared.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | [assembly: AssemblyCompany("Squared Infinity Limited")]
6 | [assembly: AssemblyCopyright("Copyright © 2014")]
7 | [assembly: AssemblyProduct("VSCommands for Visual Studio")]
8 |
9 | [assembly: AssemblyVersion("14." + CurrentVersionStrings.CommonCurrentReleaseNumber)]
10 | [assembly: AssemblyFileVersion("14." + CurrentVersionStrings.CommonCurrentReleaseNumber)]
11 |
12 | #if SIGN
13 | #pragma warning disable 1699 // warning CS1699: Use command line option '/keyfile' or appropriate project settings instead of 'AssemblyKeyFile'
14 | [assembly: AssemblyKeyFile(@"c:\!\StartSSL Class 2 - Jaroslaw Kardas.snk")]
15 | #pragma warning restore 1699
16 | #endif
17 |
18 | static class CurrentVersionStrings
19 | {
20 | public const string CommonCurrentReleaseNumber = "0.0.2";
21 | }
22 |
--------------------------------------------------------------------------------
/Sources/Shared/Internal/Internal.projitems:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath)
5 | true
6 | 184b2831-08ca-492a-bd4f-db1ec42fc6be
7 |
8 |
9 | Internal
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/Sources/Shared/Internal/Internal.shproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 184b2831-08ca-492a-bd4f-db1ec42fc6be
5 | 14.0
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/Sources/Shared/Presentation/AssemblyInfo.presentation.cs:
--------------------------------------------------------------------------------
1 | using System.Windows.Markup;
2 |
3 | [assembly: XmlnsDefinition("http://schemas.microsoft.com/winfx/2006/xaml/presentation", "SquaredInfinity.VSCommands.Presentation.MarkupExtensions")]
--------------------------------------------------------------------------------
/Sources/Shared/Presentation/MarkupExtensions/LoadImageFromVSCommandsVSIXAssembly.cs:
--------------------------------------------------------------------------------
1 | using SquaredInfinity.Foundation.Presentation.Resources;
2 | using SquaredInfinity.VSCommands.Foundation;
3 | using System;
4 | using System.Collections.Generic;
5 | using System.Text;
6 | using System.Windows.Markup;
7 |
8 | namespace SquaredInfinity.VSCommands.Presentation.MarkupExtensions
9 | {
10 | ///
11 | /// ! VSCommands cannot use LoadImageFromMainAssembly markup extension because it uses Assembly.GetEntryAssembly() to resove main assembly.
12 | /// ! Can't use Assembly.GetEntryAssembly() as it always returns null.
13 | ///
14 | public class LoadImageFromVSCommandsVSIXAssembly : MarkupExtension
15 | {
16 | public string RelativeUri { get; set; }
17 |
18 | public LoadImageFromVSCommandsVSIXAssembly()
19 | { }
20 |
21 | public LoadImageFromVSCommandsVSIXAssembly(string relativeUri)
22 | {
23 | this.RelativeUri = relativeUri;
24 | }
25 |
26 | public override object ProvideValue(IServiceProvider serviceProvider)
27 | {
28 | return ResourcesManager.LoadImageFromAssembly(StaticSettings.VSCommandsVSIXAssemblyName, RelativeUri as string);
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/Sources/Shared/Presentation/Presentation.projitems:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath)
5 | true
6 | 58d50a09-0708-42e1-9140-22e2a395441b
7 |
8 |
9 | SquaredInfinity.VSCommands.Presentation
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/Sources/Shared/Presentation/Presentation.shproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 58d50a09-0708-42e1-9140-22e2a395441b
5 | 14.0
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/Sources/Shared/Presentation/VscUIService.cs:
--------------------------------------------------------------------------------
1 | using SquaredInfinity.Foundation.Presentation;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Text;
5 | using SquaredInfinity.Foundation.Presentation.Views;
6 | using SquaredInfinity.Foundation.Presentation.Windows;
7 | using Microsoft.VisualStudio.Shell;
8 | using SquaredInfinity.VSCommands.Foundation;
9 | using System.Windows.Threading;
10 | using System.Windows;
11 | using SquaredInfinity.Foundation.Presentation.Styles.Modern;
12 |
13 | namespace SquaredInfinity.VSCommands.Presentation
14 | {
15 | public class VscUIService : DefaultUIService, IVscUIService
16 | {
17 | public VscUIService()
18 | : base(Application.Current.Dispatcher, GetNewDialogWindow, GetNewToolWindow)
19 | { }
20 |
21 | static ViewHostWindow GetNewDialogWindow()
22 | {
23 | return new SquaredInfinity.Foundation.Presentation.Xaml.Styles.Modern.Windows.DefaultDialogWindow();
24 | }
25 |
26 | static ViewHostWindow GetNewToolWindow()
27 | {
28 | return new SquaredInfinity.Foundation.Presentation.Xaml.Styles.Modern.Windows.ModernWindow();
29 | }
30 |
31 | protected override void PrepareViewForDisplay(ViewHostWindow viewHost, View view)
32 | {
33 | base.PrepareViewForDisplay(viewHost, view);
34 |
35 | var fe = viewHost as FrameworkElement;
36 | if(fe != null)
37 | {
38 | DefaultXamlResources.ApplyAllStyles(fe.Resources);
39 | }
40 |
41 | fe = view as FrameworkElement;
42 | if(fe != null)
43 | {
44 | DefaultXamlResources.ApplyAllStyles(fe.Resources);
45 | }
46 | }
47 |
48 |
49 | public void Run(Action action)
50 | {
51 | ThreadHelper.Generic.Invoke(action);
52 | }
53 |
54 | public T Run(Func action)
55 | {
56 | return ThreadHelper.Generic.Invoke(action);
57 | }
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/Sources/Shared/VscPackage/Content/!about_this_content.txt:
--------------------------------------------------------------------------------
1 | build action of this content set to NONE
2 | each item added as a link to VscPackage.vsix.vsXX projects and build action there set to content + include in vsix
3 |
4 | Include in VSIX cannot be set from shared project (to my knowledge)
--------------------------------------------------------------------------------
/Sources/Shared/VscPackage/Resources/!read.me:
--------------------------------------------------------------------------------
1 | Shared projects do not support 'Resource' build type
2 | All files from this folder must be added 'as a link' to VscPackage.vsix.vsXX projects
--------------------------------------------------------------------------------
/Sources/Shared/VscPackage/Resources/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/squaredinfinity/VSCommands/b48bc561177c80ef6b512e7b0071461104096a61/Sources/Shared/VscPackage/Resources/logo.png
--------------------------------------------------------------------------------
/Sources/Shared/VscPackage/Resources/solutionbadge-breakmode.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/squaredinfinity/VSCommands/b48bc561177c80ef6b512e7b0071461104096a61/Sources/Shared/VscPackage/Resources/solutionbadge-breakmode.png
--------------------------------------------------------------------------------
/Sources/Shared/VscPackage/Resources/solutionbadge-bug.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/squaredinfinity/VSCommands/b48bc561177c80ef6b512e7b0071461104096a61/Sources/Shared/VscPackage/Resources/solutionbadge-bug.png
--------------------------------------------------------------------------------
/Sources/Shared/VscPackage/Resources/solutionbadge-feature.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/squaredinfinity/VSCommands/b48bc561177c80ef6b512e7b0071461104096a61/Sources/Shared/VscPackage/Resources/solutionbadge-feature.png
--------------------------------------------------------------------------------
/Sources/Shared/VscPackage/Resources/solutionbadge-runmode.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/squaredinfinity/VSCommands/b48bc561177c80ef6b512e7b0071461104096a61/Sources/Shared/VscPackage/Resources/solutionbadge-runmode.png
--------------------------------------------------------------------------------
/Sources/Shared/VscPackage/Resources/solutionbadge-solution.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/squaredinfinity/VSCommands/b48bc561177c80ef6b512e7b0071461104096a61/Sources/Shared/VscPackage/Resources/solutionbadge-solution.png
--------------------------------------------------------------------------------
/Sources/Shared/VscPackage/Resources/solutionbadge-team.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/squaredinfinity/VSCommands/b48bc561177c80ef6b512e7b0071461104096a61/Sources/Shared/VscPackage/Resources/solutionbadge-team.png
--------------------------------------------------------------------------------
/Sources/Shared/VscPackage/VscPackage.projitems:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath)
5 | true
6 | 2901cef8-4f81-42b2-8c43-ec450401dc03
7 |
8 |
9 | SquaredInfinity.VSCommands.VscPackage
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 | Designer
33 | MSBuild:Compile
34 |
35 |
36 |
--------------------------------------------------------------------------------
/Sources/Shared/VscPackage/VscPackage.shproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 2901cef8-4f81-42b2-8c43-ec450401dc03
5 | 14.0
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/Sources/Shared/VscPackage/XamlResources.cs:
--------------------------------------------------------------------------------
1 | using SquaredInfinity.Foundation.Presentation.Resources;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.ComponentModel.Composition;
5 | using System.Text;
6 |
7 | namespace SquaredInfinity.VSCommands.VscPackage
8 | {
9 | [ExportAttribute(typeof(IXamlResourcesProvider))]
10 | [XamlResourcesProviderMetadata(ImportOrder = XamlResources.ImportOrder)]
11 | public class XamlResources : IXamlResourcesProvider
12 | {
13 | // Import Order is higher than Features Import Order (on which resources from this assembly may depend)
14 | public const int ImportOrder = Features.XamlResources.ImportOrder + 100;
15 |
16 | public void LoadAndMergeResources()
17 | {
18 | ResourcesManager.LoadAndMergeCompiledResourceDictionaryFromThisAssembly("XamlResources.xaml");
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/Sources/Shared/VscPackage/XamlResources.xaml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
8 |
9 |
14 |
15 |
20 |
21 |
26 |
27 |
32 |
33 |
38 |
39 |
44 |
45 |
--------------------------------------------------------------------------------
/Sources/VS14/Features.Infrastructure.vs14/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Sources/VS14/Features.vs14/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/Sources/VS14/Features.vs14/bin/Debug/SquaredInfinity.VSCommands.Features.vs14.dll.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/Sources/VS14/Features.vs14/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/Sources/VS14/Foundation.vs14/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/Sources/VS14/Foundation.vs14/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/Sources/VS14/Integration/Git.vs14/Git.vs14.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {DAB3B211-FC1F-4FC7-8177-9B28EA3E9F65}
8 | Library
9 | Properties
10 | SquaredInfinity.VSCommands.Integration.Git
11 | SquaredInfinity.VSCommands.Integration.Git.vs14
12 | v4.5.2
13 | 512
14 |
15 |
16 | true
17 | full
18 | false
19 | bin\Debug\
20 | DEBUG;TRACE
21 | prompt
22 | 4
23 |
24 |
25 | pdbonly
26 | true
27 | bin\Release\
28 | TRACE;VS14;SIGN
29 | prompt
30 | 4
31 |
32 |
33 |
34 | ..\..\..\..\packages\SquaredInfinity.Foundation.1.1.7-beta022\lib\net45\SquaredInfinity.Foundation.DotNet45.dll
35 | True
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 | {43b7deff-cac6-4f26-92e0-5d3cad22aa20}
50 | Features.Infrastructure.vs14
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
69 |
--------------------------------------------------------------------------------
/Sources/VS14/Integration/Git.vs14/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/Sources/VS14/Integration/Mercurial.vs14/Mercurial.vs14.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {AFFB7B1A-959A-4B43-A3D0-E29715A387C5}
8 | Library
9 | Properties
10 | Mercurial.vs14
11 | Mercurial.vs14
12 | v4.5.2
13 | 512
14 |
15 |
16 | true
17 | full
18 | false
19 | bin\Debug\
20 | DEBUG;TRACE
21 | prompt
22 | 4
23 |
24 |
25 | pdbonly
26 | true
27 | bin\Release\
28 | TRACE;VS14;SIGN
29 | prompt
30 | 4
31 |
32 |
33 |
34 | ..\..\..\..\packages\SquaredInfinity.Foundation.1.1.7-beta022\lib\net45\SquaredInfinity.Foundation.DotNet45.dll
35 | True
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 | {43b7deff-cac6-4f26-92e0-5d3cad22aa20}
50 | Features.Infrastructure.vs14
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
69 |
--------------------------------------------------------------------------------
/Sources/VS14/Integration/Mercurial.vs14/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/Sources/VS14/Integration/TeamFoundationServer.vs14/TeamFoundation.vs14/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/Sources/VS14/Presentation.Xaml.Styles.Modern.vs14/All.tt:
--------------------------------------------------------------------------------
1 | <#@ template debug="false" hostspecific="false" language="C#" #>
2 | <#@ include file="_Global.tt" #>
3 | <#@ assembly name="System.Core" #>
4 | <#@ import namespace="System.Linq" #>
5 | <#@ import namespace="System.Text" #>
6 | <#@ import namespace="System.Collections.Generic" #>
7 | <#@ output extension=".xaml" #>
8 |
9 |
12 |
13 |
14 |
15 |
16 |
17 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
--------------------------------------------------------------------------------
/Sources/VS14/Presentation.Xaml.Styles.Modern.vs14/All.xaml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
8 |
9 |
10 |
11 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/Sources/VS14/Presentation.Xaml.Styles.Modern.vs14/DefaultXamlResources.cs:
--------------------------------------------------------------------------------
1 | using SquaredInfinity.Foundation.Presentation;
2 | using SquaredInfinity.Foundation.Presentation.Resources;
3 | using System;
4 | using System.Collections.Generic;
5 | using System.ComponentModel.Composition;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Threading.Tasks;
9 | using System.Windows;
10 | using System.Windows.Controls;
11 | using System.Windows.Controls.Primitives;
12 |
13 | namespace SquaredInfinity.Foundation.Presentation.Styles.Modern
14 | {
15 |
16 | [ExportAttribute(typeof(IXamlResourcesProvider))]
17 | [XamlResourcesProviderMetadata(ImportOrder = XamlResources.ImportOrder)]
18 | public partial class DefaultXamlResources : IXamlResourcesProvider
19 | {
20 | // Import Order is higher than Foundation.Presentation Import Order (on which resources from this assembly may depend)
21 | public const int ImportOrder = SquaredInfinity.Foundation.Presentation.XamlResources.ImportOrder + 100;
22 |
23 | public void LoadAndMergeResources()
24 | {
25 | ResourcesManager.LoadAndMergeCompiledResourceDictionaryFromThisAssembly(@"All.xaml");
26 | }
27 |
28 | public static void ApplyAllStyles()
29 | {
30 | ApplyAllStyles(Application.Current.Resources);
31 | }
32 |
33 | public static void ApplyAllStyles(ResourceDictionary resourceDictionary)
34 | {
35 | resourceDictionary[typeof(Button)] = Application.Current.Resources["Styles.Button"];
36 | resourceDictionary[typeof(CheckBox)] = Application.Current.Resources["Styles.CheckBox"];
37 | resourceDictionary[typeof(ComboBox)] = Application.Current.Resources["Styles.ComboBox"];
38 | resourceDictionary[typeof(Expander)] = Application.Current.Resources["Styles.Expander"];
39 | resourceDictionary[typeof(Menu)] = Application.Current.Resources["Styles.Menu"];
40 | resourceDictionary[typeof(MenuItem)] = Application.Current.Resources["Styles.MenuItem"];
41 | resourceDictionary[typeof(ListView)] = Application.Current.Resources["Styles.ListView"];
42 | resourceDictionary[typeof(ListViewItem)] = Application.Current.Resources["Styles.ListViewItem"];
43 | resourceDictionary[typeof(RadioButton)] = Application.Current.Resources["Styles.RadioButton"];
44 | resourceDictionary[typeof(ScrollBar)] = Application.Current.Resources["Styles.ScrollBar"];
45 | resourceDictionary[typeof(TabControl)] = Application.Current.Resources["Styles.TabControl"];
46 | resourceDictionary[typeof(TabItem)] = Application.Current.Resources["Styles.TabItem"];
47 | resourceDictionary[typeof(TextBox)] = Application.Current.Resources["Styles.TextBox"];
48 | resourceDictionary[typeof(TextBlock)] = Application.Current.Resources["Styles.TextBlock"];
49 | resourceDictionary[typeof(Label)] = Application.Current.Resources["Styles.Label"];
50 | }
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/Sources/VS14/Presentation.Xaml.Styles.Modern.vs14/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("Presentation.Xaml.Styles.Modern.vs14")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("Presentation.Xaml.Styles.Modern.vs14")]
13 | [assembly: AssemblyCopyright("Copyright © 2016")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("1abca53b-4191-40d4-94cf-b8ca37ebb153")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/Sources/VS14/Presentation.Xaml.Styles.Modern.vs14/Styles/CheckBox.tt:
--------------------------------------------------------------------------------
1 | <#@ template debug="false" hostspecific="false" language="C#" #>
2 | <#@ include file="../_Global.tt" #>
3 | <#@ assembly name="System.Core" #>
4 | <#@ import namespace="System.Linq" #>
5 | <#@ import namespace="System.Text" #>
6 | <#@ import namespace="System.Collections.Generic" #>
7 | <#@ output extension=".xaml" #>
8 |
9 |
11 |
12 |
71 |
72 |
--------------------------------------------------------------------------------
/Sources/VS14/Presentation.Xaml.Styles.Modern.vs14/Styles/CheckBox.xaml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
65 |
66 |
--------------------------------------------------------------------------------
/Sources/VS14/Presentation.Xaml.Styles.Modern.vs14/Styles/FocusVisual.tt:
--------------------------------------------------------------------------------
1 | <#@ template debug="false" hostspecific="false" language="C#" #>
2 | <#@ include file="../_Global.tt" #>
3 | <#@ assembly name="System.Core" #>
4 | <#@ import namespace="System.Linq" #>
5 | <#@ import namespace="System.Text" #>
6 | <#@ import namespace="System.Collections.Generic" #>
7 | <#@ output extension=".xaml" #>
8 |
9 |
11 |
12 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/Sources/VS14/Presentation.Xaml.Styles.Modern.vs14/Styles/FocusVisual.xaml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/Sources/VS14/Presentation.Xaml.Styles.Modern.vs14/Styles/GridViewColumnHeaderGripper.tt:
--------------------------------------------------------------------------------
1 | <#@ template debug="false" hostspecific="false" language="C#" #>
2 | <#@ include file="../_Global.tt" #>
3 | <#@ assembly name="System.Core" #>
4 | <#@ import namespace="System.Linq" #>
5 | <#@ import namespace="System.Text" #>
6 | <#@ import namespace="System.Collections.Generic" #>
7 | <#@ output extension=".xaml" #>
8 |
9 |
12 |
13 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/Sources/VS14/Presentation.Xaml.Styles.Modern.vs14/Styles/GridViewColumnHeaderGripper.xaml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/Sources/VS14/Presentation.Xaml.Styles.Modern.vs14/Styles/GroupBox.tt:
--------------------------------------------------------------------------------
1 | <#@ template debug="false" hostspecific="false" language="C#" #>
2 | <#@ include file="../_Global.tt" #>
3 | <#@ assembly name="System.Core" #>
4 | <#@ import namespace="System.Linq" #>
5 | <#@ import namespace="System.Text" #>
6 | <#@ import namespace="System.Collections.Generic" #>
7 | <#@ output extension=".xaml" #>
8 |
9 |
10 |
12 |
13 |
14 |
15 |
77 |
78 |
--------------------------------------------------------------------------------
/Sources/VS14/Presentation.Xaml.Styles.Modern.vs14/Styles/GroupBox.xaml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
6 |
7 |
8 |
9 |
71 |
72 |
--------------------------------------------------------------------------------
/Sources/VS14/Presentation.Xaml.Styles.Modern.vs14/Styles/Hyperlink.tt:
--------------------------------------------------------------------------------
1 | <#@ template debug="false" hostspecific="false" language="C#" #>
2 | <#@ include file="../_Global.tt" #>
3 | <#@ assembly name="System.Core" #>
4 | <#@ import namespace="System.Linq" #>
5 | <#@ import namespace="System.Text" #>
6 | <#@ import namespace="System.Collections.Generic" #>
7 | <#@ output extension=".xaml" #>
8 |
9 |
11 |
12 |
35 |
36 |
--------------------------------------------------------------------------------
/Sources/VS14/Presentation.Xaml.Styles.Modern.vs14/Styles/Hyperlink.xaml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
29 |
30 |
--------------------------------------------------------------------------------
/Sources/VS14/Presentation.Xaml.Styles.Modern.vs14/Styles/Label.tt:
--------------------------------------------------------------------------------
1 | <#@ template debug="false" hostspecific="false" language="C#" #>
2 | <#@ include file="../_Global.tt" #>
3 | <#@ assembly name="System.Core" #>
4 | <#@ import namespace="System.Linq" #>
5 | <#@ import namespace="System.Text" #>
6 | <#@ import namespace="System.Collections.Generic" #>
7 | <#@ output extension=".xaml" #>
8 |
9 |
10 |
12 |
13 |
32 |
33 |
54 |
55 |
56 |
--------------------------------------------------------------------------------
/Sources/VS14/Presentation.Xaml.Styles.Modern.vs14/Styles/Label.xaml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
6 |
7 |
26 |
27 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/Sources/VS14/Presentation.Xaml.Styles.Modern.vs14/Styles/Menu.tt:
--------------------------------------------------------------------------------
1 | <#@ template debug="false" hostspecific="false" language="C#" #>
2 | <#@ include file="../_Global.tt" #>
3 | <#@ assembly name="System.Core" #>
4 | <#@ import namespace="System.Linq" #>
5 | <#@ import namespace="System.Text" #>
6 | <#@ import namespace="System.Collections.Generic" #>
7 | <#@ output extension=".xaml" #>
8 |
9 |
11 |
12 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/Sources/VS14/Presentation.Xaml.Styles.Modern.vs14/Styles/Menu.xaml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/Sources/VS14/Presentation.Xaml.Styles.Modern.vs14/Styles/RadioButton.tt:
--------------------------------------------------------------------------------
1 | <#@ template debug="false" hostspecific="false" language="C#" #>
2 | <#@ include file="../_Global.tt" #>
3 | <#@ assembly name="System.Core" #>
4 | <#@ import namespace="System.Linq" #>
5 | <#@ import namespace="System.Text" #>
6 | <#@ import namespace="System.Collections.Generic" #>
7 | <#@ output extension=".xaml" #>
8 |
9 |
11 |
12 |
64 |
65 |
--------------------------------------------------------------------------------
/Sources/VS14/Presentation.Xaml.Styles.Modern.vs14/Styles/RadioButton.xaml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
58 |
59 |
--------------------------------------------------------------------------------
/Sources/VS14/Presentation.Xaml.Styles.Modern.vs14/Styles/TextBlock.tt:
--------------------------------------------------------------------------------
1 | <#@ template debug="false" hostspecific="false" language="C#" #>
2 | <#@ include file="../_Global.tt" #>
3 | <#@ assembly name="System.Core" #>
4 | <#@ import namespace="System.Linq" #>
5 | <#@ import namespace="System.Text" #>
6 | <#@ import namespace="System.Collections.Generic" #>
7 | <#@ output extension=".xaml" #>
8 |
9 |
12 |
13 |
26 |
27 |
32 |
33 |
38 |
39 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/Sources/VS14/Presentation.Xaml.Styles.Modern.vs14/Styles/TextBlock.xaml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
20 |
21 |
26 |
27 |
32 |
33 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/Sources/VS14/Presentation.Xaml.Styles.Modern.vs14/Styles/ToggleButton.xaml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
76 |
77 |
78 |
--------------------------------------------------------------------------------
/Sources/VS14/Presentation.Xaml.Styles.Modern.vs14/Styles/ToolTip.tt:
--------------------------------------------------------------------------------
1 | <#@ template debug="false" hostspecific="false" language="C#" #>
2 | <#@ include file="../_Global.tt" #>
3 | <#@ assembly name="System.Core" #>
4 | <#@ import namespace="System.Linq" #>
5 | <#@ import namespace="System.Text" #>
6 | <#@ import namespace="System.Collections.Generic" #>
7 | <#@ output extension=".xaml" #>
8 |
9 |
13 |
14 |
36 |
--------------------------------------------------------------------------------
/Sources/VS14/Presentation.Xaml.Styles.Modern.vs14/Styles/ToolTip.xaml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
30 |
--------------------------------------------------------------------------------
/Sources/VS14/Presentation.Xaml.Styles.Modern.vs14/Styles/TreeView.tt:
--------------------------------------------------------------------------------
1 | <#@ template debug="false" hostspecific="false" language="C#" #>
2 | <#@ include file="../_Global.tt" #>
3 | <#@ assembly name="System.Core" #>
4 | <#@ import namespace="System.Linq" #>
5 | <#@ import namespace="System.Text" #>
6 | <#@ import namespace="System.Collections.Generic" #>
7 | <#@ output extension=".xaml" #>
8 |
9 |
13 |
14 |
22 |
23 |
31 |
32 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/Sources/VS14/Presentation.Xaml.Styles.Modern.vs14/Styles/TreeView.xaml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
16 |
17 |
25 |
26 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/Sources/VS14/Presentation.Xaml.Styles.Modern.vs14/Windows/DefaultDialogWindow.xaml:
--------------------------------------------------------------------------------
1 |
16 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
44 |
45 |
50 |
51 |
52 |
53 |
54 |
--------------------------------------------------------------------------------
/Sources/VS14/Presentation.Xaml.Styles.Modern.vs14/Windows/DefaultDialogWindow.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using System.Windows;
7 | using System.Windows.Controls;
8 | using System.Windows.Data;
9 | using System.Windows.Documents;
10 | using System.Windows.Input;
11 | using System.Windows.Media;
12 | using System.Windows.Media.Imaging;
13 | using System.Windows.Shapes;
14 |
15 | namespace SquaredInfinity.Foundation.Presentation.Xaml.Styles.Modern.Windows
16 | {
17 | ///
18 | /// Interaction logic for DefaultDialogWindow.xaml
19 | ///
20 | public partial class DefaultDialogWindow : ModernWindow
21 | {
22 | public DefaultDialogWindow()
23 | {
24 | InitializeComponent();
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/Sources/VS14/Presentation.Xaml.Styles.Modern.vs14/Windows/ModernWindow.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using System.Windows;
7 | using System.Windows.Input;
8 |
9 | namespace SquaredInfinity.Foundation.Presentation.Xaml.Styles.Modern.Windows
10 | {
11 | public class ModernWindow : SquaredInfinity.Foundation.Presentation.Windows.ViewHostWindow
12 | {
13 | #region Title Horizontal Alignment
14 |
15 | public HorizontalAlignment TitleHorizontalAlignment
16 | {
17 | get { return (HorizontalAlignment)GetValue(TitleHorizontalAlignmentProperty); }
18 | set { SetValue(TitleHorizontalAlignmentProperty, value); }
19 | }
20 |
21 | public static readonly DependencyProperty TitleHorizontalAlignmentProperty =
22 | DependencyProperty.Register(
23 | "TitleHorizontalAlignment",
24 | typeof(HorizontalAlignment),
25 | typeof(ModernWindow),
26 | new PropertyMetadata(HorizontalAlignment.Left));
27 |
28 | #endregion
29 |
30 | #region Title Bar Additional Content
31 |
32 | public FrameworkElement TitleBarAdditionalContent
33 | {
34 | get { return (FrameworkElement)GetValue(TitleBarAdditionalContentProperty); }
35 | set { SetValue(TitleBarAdditionalContentProperty, value); }
36 | }
37 |
38 | public static readonly DependencyProperty TitleBarAdditionalContentProperty =
39 | DependencyProperty.Register(
40 | "TitleBarAdditionalContent",
41 | typeof(FrameworkElement),
42 | typeof(ModernWindow),
43 | new PropertyMetadata(null));
44 |
45 | #endregion
46 |
47 | static ModernWindow()
48 | {
49 | //DefaultStyleKeyProperty.OverrideMetadata(typeof(ModernWindow), new FrameworkPropertyMetadata("Styles.ModernWindow"));
50 | }
51 |
52 | public ModernWindow()
53 | {
54 | this.CommandBindings.Add(new CommandBinding(SystemCommands.CloseWindowCommand, this.OnCloseWindow));
55 | this.CommandBindings.Add(new CommandBinding(SystemCommands.MaximizeWindowCommand, this.OnMaximizeWindow, this.OnCanResizeWindow));
56 | this.CommandBindings.Add(new CommandBinding(SystemCommands.MinimizeWindowCommand, this.OnMinimizeWindow, this.OnCanMinimizeWindow));
57 | this.CommandBindings.Add(new CommandBinding(SystemCommands.RestoreWindowCommand, this.OnRestoreWindow, this.OnCanResizeWindow));
58 | }
59 |
60 | protected override void OnViewModelEvent(SquaredInfinity.Foundation.Presentation.ViewModels.ViewModelEventArgs args)
61 | {
62 | base.OnViewModelEvent(args);
63 | }
64 |
65 | private void OnCanResizeWindow(object sender, CanExecuteRoutedEventArgs e)
66 | {
67 | e.CanExecute = this.ResizeMode == ResizeMode.CanResize || this.ResizeMode == ResizeMode.CanResizeWithGrip;
68 | }
69 |
70 | private void OnCanMinimizeWindow(object sender, CanExecuteRoutedEventArgs e)
71 | {
72 | e.CanExecute = this.ResizeMode != ResizeMode.NoResize;
73 | }
74 |
75 | private void OnCloseWindow(object target, ExecutedRoutedEventArgs e)
76 | {
77 | SystemCommands.CloseWindow(this);
78 | }
79 |
80 | private void OnMaximizeWindow(object target, ExecutedRoutedEventArgs e)
81 | {
82 | SystemCommands.MaximizeWindow(this);
83 | }
84 |
85 | private void OnMinimizeWindow(object target, ExecutedRoutedEventArgs e)
86 | {
87 | SystemCommands.MinimizeWindow(this);
88 | }
89 |
90 | private void OnRestoreWindow(object target, ExecutedRoutedEventArgs e)
91 | {
92 | SystemCommands.RestoreWindow(this);
93 | }
94 | }
95 | }
96 |
--------------------------------------------------------------------------------
/Sources/VS14/Presentation.Xaml.Styles.Modern.vs14/_Global.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/squaredinfinity/VSCommands/b48bc561177c80ef6b512e7b0071461104096a61/Sources/VS14/Presentation.Xaml.Styles.Modern.vs14/_Global.cs
--------------------------------------------------------------------------------
/Sources/VS14/Presentation.Xaml.Styles.Modern.vs14/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Sources/VS14/Presentation.vs14/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/Sources/VS14/Presentation.vs14/bin/Debug/SquaredInfinity.VSCommands.Presentation.vs14.dll.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/Sources/VS14/Presentation.vs14/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/Sources/VS14/VscPackage.vs14/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/Sources/VS14/VscPackage.vs14/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/Sources/VS14/VscPackage.vsix.vs14/Vsc14Package.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // Copyright (c) Company. All rights reserved.
4 | //
5 | //------------------------------------------------------------------------------
6 |
7 | using System;
8 | using System.ComponentModel.Design;
9 | using System.Diagnostics;
10 | using System.Diagnostics.CodeAnalysis;
11 | using System.Globalization;
12 | using System.Runtime.InteropServices;
13 | using Microsoft.VisualStudio;
14 | using Microsoft.VisualStudio.OLE.Interop;
15 | using Microsoft.VisualStudio.Shell;
16 | using Microsoft.VisualStudio.Shell.Interop;
17 | using Microsoft.Win32;
18 | using SquaredInfinity.VSCommands.Foundation;
19 | using System.Reflection;
20 | using SquaredInfinity.VSCommands.Foundation.FontsAndColors;
21 |
22 | namespace SquaredInfinity.VSCommands.VscPackage
23 | {
24 |
25 | [ProvideService(typeof(IVsFontAndColorDefaultsProvider))]
26 | [ProvideService(typeof(VSCFontAndColorDefaultsProvider))]
27 |
28 | [PackageRegistration(UseManagedResourcesOnly = true)]
29 | [InstalledProductRegistration("#110", "#112", "1.0", IconResourceID = 400)] // Info on this package for Help/About
30 | [Guid(StaticSettings.PackageGuidString)]
31 | [SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1650:ElementDocumentationMustBeSpelledCorrectly", Justification = "pkgdef, VS and vsixmanifest are valid VS terms")]
32 | [ProvideAutoLoad(VSConstants.UICONTEXT.NoSolution_string)]
33 | public sealed class Vsc14Package : Package
34 | {
35 | readonly Bootstrapper Bootstrapper;
36 |
37 | ///
38 | /// Initializes a new instance of the class.
39 | ///
40 | public Vsc14Package()
41 | {
42 | // Inside this method you can place any initialization code that does not require
43 | // any Visual Studio service because at this point the package object is created but
44 | // not sited yet inside Visual Studio environment. The place to do all the other
45 | // initialization is the Initialize method.
46 |
47 | Bootstrapper = new Bootstrapper();
48 | }
49 |
50 | #region Package Members
51 |
52 | ///
53 | /// Initialization of the package; this method is called right after the package is sited, so this is the place
54 | /// where you can put all the initialization code that rely on services provided by VisualStudio.
55 | ///
56 | protected override void Initialize()
57 | {
58 | base.Initialize();
59 |
60 | var vscAssembly = Assembly.GetExecutingAssembly();
61 | StaticSettings.VSCommandsVSIXAssembly = vscAssembly;
62 |
63 | Bootstrapper.InitializeServices(this);
64 | }
65 |
66 | #endregion
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/Sources/VS14/VscPackage.vsix.vs14/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/Sources/VS14/VscPackage.vsix.vs14/source.extension.vsixmanifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | VSCommands 14 for Visual Studio 2015
6 | VSCommands for Visual Studio 2015
7 | http://vscommands.squaredinfinity.com/blog
8 | Content\vsc11.eula.txt
9 | Resources\logo.png
10 | Resources\logo.png
11 | vscommands
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/packages/Microsoft.VSSDK.BuildTools.14.0.23205/tools/vssdk/bin/CreatePkgDef.exe.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/packages/WindowsAzure.ServiceBus.2.5.1.0/content/app.config.transform:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/packages/WindowsAzure.ServiceBus.2.5.1.0/content/web.config.transform:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------