
42 changed files with 318 additions and 492 deletions
-
2CommonAssemblyInfo.cs
-
16GitExtensions.VS2015.sln
-
27GitExtensionsVSIX/GitExtCommands.cs
-
12GitExtensionsVSIX/GitExtensionsVSIX.csproj
-
2GitExtensionsVSIX/source.extension.vsixmanifest
-
3GitPlugin/Connect.cs
-
49GitPlugin/GitPlugin.csproj
-
395GitPlugin/Plugin.cs
-
2GitPlugin/Properties/Resources.Designer.cs
-
2GitPluginShared/Commands/About.cs
-
2GitPluginShared/Commands/ApplyPatch.cs
-
2GitPluginShared/Commands/Browse.cs
-
2GitPluginShared/Commands/Cherry.cs
-
2GitPluginShared/Commands/Clone.cs
-
4GitPluginShared/Commands/CommandBase.cs
-
6GitPluginShared/Commands/Commit.cs
-
2GitPluginShared/Commands/CreateBranch.cs
-
2GitPluginShared/Commands/FileHistory.cs
-
4GitPluginShared/Commands/FindFile.cs
-
2GitPluginShared/Commands/FormatPatch.cs
-
2GitPluginShared/Commands/GitBash.cs
-
2GitPluginShared/Commands/GitIgnore.cs
-
2GitPluginShared/Commands/Init.cs
-
2GitPluginShared/Commands/ItemCommandBase.cs
-
2GitPluginShared/Commands/Merge.cs
-
2GitPluginShared/Commands/OpenWithDifftool.cs
-
2GitPluginShared/Commands/Pull.cs
-
2GitPluginShared/Commands/Push.cs
-
2GitPluginShared/Commands/Rebase.cs
-
2GitPluginShared/Commands/Remotes.cs
-
2GitPluginShared/Commands/Revert.cs
-
2GitPluginShared/Commands/Settings.cs
-
2GitPluginShared/Commands/SolveMergeConflicts.cs
-
2GitPluginShared/Commands/Stash.cs
-
2GitPluginShared/Commands/SwitchBranch.cs
-
4GitPluginShared/Commands/ToolbarCommand.cs
-
2GitPluginShared/Commands/ViewChanges.cs
-
4GitPluginShared/Git/GitCommands.cs
-
137GitPluginShared/GitPluginShared.csproj
-
84GitPluginShared/PluginHelpers.cs
-
5GitPluginShared/Properties/AssemblyInfo.cs
-
6Setup/Product.wxs
@ -1,6 +1,6 @@ |
|||
using EnvDTE; |
|||
|
|||
namespace GitPlugin.Commands |
|||
namespace GitPluginShared.Commands |
|||
{ |
|||
public sealed class About : ItemCommandBase |
|||
{ |
@ -1,6 +1,6 @@ |
|||
using EnvDTE; |
|||
|
|||
namespace GitPlugin.Commands |
|||
namespace GitPluginShared.Commands |
|||
{ |
|||
public sealed class ApplyPatch : ItemCommandBase |
|||
{ |
@ -1,6 +1,6 @@ |
|||
using EnvDTE; |
|||
|
|||
namespace GitPlugin.Commands |
|||
namespace GitPluginShared.Commands |
|||
{ |
|||
public sealed class Browse : ItemCommandBase |
|||
{ |
@ -1,6 +1,6 @@ |
|||
using EnvDTE; |
|||
|
|||
namespace GitPlugin.Commands |
|||
namespace GitPluginShared.Commands |
|||
{ |
|||
public sealed class Cherry : ItemCommandBase |
|||
{ |
@ -1,8 +1,8 @@ |
|||
using EnvDTE; |
|||
using EnvDTE80; |
|||
using GitPlugin.Git; |
|||
using GitPluginShared.Git; |
|||
|
|||
namespace GitPlugin.Commands |
|||
namespace GitPluginShared.Commands |
|||
{ |
|||
public abstract class CommandBase |
|||
{ |
@ -1,6 +1,6 @@ |
|||
using EnvDTE; |
|||
|
|||
namespace GitPlugin.Commands |
|||
namespace GitPluginShared.Commands |
|||
{ |
|||
public sealed class CreateBranch : ItemCommandBase |
|||
{ |
@ -1,6 +1,6 @@ |
|||
using EnvDTE; |
|||
|
|||
namespace GitPlugin.Commands |
|||
namespace GitPluginShared.Commands |
|||
{ |
|||
public sealed class FileHistory : ItemCommandBase |
|||
{ |
@ -1,9 +1,9 @@ |
|||
using System.Threading; |
|||
using EnvDTE; |
|||
using EnvDTE80; |
|||
using GitPlugin.Git; |
|||
using GitPluginShared.Git; |
|||
|
|||
namespace GitPlugin.Commands |
|||
namespace GitPluginShared.Commands |
|||
{ |
|||
public sealed class FindFile : ItemCommandBase |
|||
{ |
@ -1,6 +1,6 @@ |
|||
using EnvDTE; |
|||
|
|||
namespace GitPlugin.Commands |
|||
namespace GitPluginShared.Commands |
|||
{ |
|||
public sealed class FormatPatch : ItemCommandBase |
|||
{ |
@ -1,6 +1,6 @@ |
|||
using EnvDTE; |
|||
|
|||
namespace GitPlugin.Commands |
|||
namespace GitPluginShared.Commands |
|||
{ |
|||
public sealed class Bash : ItemCommandBase |
|||
{ |
@ -1,6 +1,6 @@ |
|||
using EnvDTE; |
|||
|
|||
namespace GitPlugin.Commands |
|||
namespace GitPluginShared.Commands |
|||
{ |
|||
public sealed class GitIgnore : ItemCommandBase |
|||
{ |
@ -1,6 +1,6 @@ |
|||
using EnvDTE; |
|||
|
|||
namespace GitPlugin.Commands |
|||
namespace GitPluginShared.Commands |
|||
{ |
|||
public sealed class Merge : ItemCommandBase |
|||
{ |
@ -1,6 +1,6 @@ |
|||
using EnvDTE; |
|||
|
|||
namespace GitPlugin.Commands |
|||
namespace GitPluginShared.Commands |
|||
{ |
|||
public sealed class OpenWithDiftool : ItemCommandBase |
|||
{ |
@ -1,6 +1,6 @@ |
|||
using EnvDTE; |
|||
|
|||
namespace GitPlugin.Commands |
|||
namespace GitPluginShared.Commands |
|||
{ |
|||
public sealed class Pull : ItemCommandBase |
|||
{ |
@ -1,6 +1,6 @@ |
|||
using EnvDTE; |
|||
|
|||
namespace GitPlugin.Commands |
|||
namespace GitPluginShared.Commands |
|||
{ |
|||
public sealed class Push : ItemCommandBase |
|||
{ |
@ -1,6 +1,6 @@ |
|||
using EnvDTE; |
|||
|
|||
namespace GitPlugin.Commands |
|||
namespace GitPluginShared.Commands |
|||
{ |
|||
public sealed class Rebase : ItemCommandBase |
|||
{ |
@ -1,6 +1,6 @@ |
|||
using EnvDTE; |
|||
|
|||
namespace GitPlugin.Commands |
|||
namespace GitPluginShared.Commands |
|||
{ |
|||
public sealed class Remotes : ItemCommandBase |
|||
{ |
@ -1,6 +1,6 @@ |
|||
using EnvDTE; |
|||
|
|||
namespace GitPlugin.Commands |
|||
namespace GitPluginShared.Commands |
|||
{ |
|||
public sealed class Revert : ItemCommandBase |
|||
{ |
@ -1,6 +1,6 @@ |
|||
using EnvDTE; |
|||
|
|||
namespace GitPlugin.Commands |
|||
namespace GitPluginShared.Commands |
|||
{ |
|||
public sealed class Settings : ItemCommandBase |
|||
{ |
@ -1,6 +1,6 @@ |
|||
using EnvDTE; |
|||
|
|||
namespace GitPlugin.Commands |
|||
namespace GitPluginShared.Commands |
|||
{ |
|||
public sealed class SolveMergeConflicts : ItemCommandBase |
|||
{ |
@ -1,6 +1,6 @@ |
|||
using EnvDTE; |
|||
|
|||
namespace GitPlugin.Commands |
|||
namespace GitPluginShared.Commands |
|||
{ |
|||
public sealed class Stash : ItemCommandBase |
|||
{ |
@ -1,6 +1,6 @@ |
|||
using EnvDTE; |
|||
|
|||
namespace GitPlugin.Commands |
|||
namespace GitPluginShared.Commands |
|||
{ |
|||
public sealed class SwitchBranch : ItemCommandBase |
|||
{ |
@ -1,6 +1,6 @@ |
|||
using EnvDTE; |
|||
|
|||
namespace GitPlugin.Commands |
|||
namespace GitPluginShared.Commands |
|||
{ |
|||
public sealed class ViewChanges : ItemCommandBase |
|||
{ |
@ -0,0 +1,137 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> |
|||
<PropertyGroup> |
|||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> |
|||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> |
|||
<ProjectGuid>{C0A7B025-B7EE-477A-BAC7-A6365E7BD893}</ProjectGuid> |
|||
<OutputType>Library</OutputType> |
|||
<AppDesignerFolder>Properties</AppDesignerFolder> |
|||
<RootNamespace>GitPluginShared</RootNamespace> |
|||
<AssemblyName>GitPluginShared</AssemblyName> |
|||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion> |
|||
<FileAlignment>512</FileAlignment> |
|||
<TargetFrameworkProfile /> |
|||
</PropertyGroup> |
|||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
|||
<DebugSymbols>true</DebugSymbols> |
|||
<DebugType>full</DebugType> |
|||
<Optimize>false</Optimize> |
|||
<OutputPath>bin\Debug\</OutputPath> |
|||
<DefineConstants>DEBUG;TRACE</DefineConstants> |
|||
<ErrorReport>prompt</ErrorReport> |
|||
<WarningLevel>4</WarningLevel> |
|||
</PropertyGroup> |
|||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> |
|||
<DebugType>pdbonly</DebugType> |
|||
<Optimize>true</Optimize> |
|||
<OutputPath>bin\Release\</OutputPath> |
|||
<DefineConstants>TRACE</DefineConstants> |
|||
<ErrorReport>prompt</ErrorReport> |
|||
<WarningLevel>4</WarningLevel> |
|||
</PropertyGroup> |
|||
<ItemGroup> |
|||
<Reference Include="Extensibility, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> |
|||
<Reference Include="System" /> |
|||
<Reference Include="System.Core"> |
|||
<RequiredTargetFramework>3.5</RequiredTargetFramework> |
|||
</Reference> |
|||
<Reference Include="System.Drawing" /> |
|||
<Reference Include="System.Windows.Forms" /> |
|||
</ItemGroup> |
|||
<ItemGroup> |
|||
<COMReference Include="EnvDTE"> |
|||
<Guid>{80CC9F66-E7D8-4DDD-85B6-D9E6CD0E93E2}</Guid> |
|||
<VersionMajor>8</VersionMajor> |
|||
<VersionMinor>0</VersionMinor> |
|||
<Lcid>0</Lcid> |
|||
<WrapperTool>primary</WrapperTool> |
|||
<Isolated>False</Isolated> |
|||
</COMReference> |
|||
<COMReference Include="EnvDTE100"> |
|||
<Guid>{26AD1324-4B7C-44BC-84F8-B86AED45729F}</Guid> |
|||
<VersionMajor>10</VersionMajor> |
|||
<VersionMinor>0</VersionMinor> |
|||
<Lcid>0</Lcid> |
|||
<WrapperTool>primary</WrapperTool> |
|||
<Isolated>False</Isolated> |
|||
<EmbedInteropTypes>True</EmbedInteropTypes> |
|||
</COMReference> |
|||
<COMReference Include="EnvDTE80"> |
|||
<Guid>{1A31287A-4D7D-413E-8E32-3B374931BD89}</Guid> |
|||
<VersionMajor>8</VersionMajor> |
|||
<VersionMinor>0</VersionMinor> |
|||
<Lcid>0</Lcid> |
|||
<WrapperTool>primary</WrapperTool> |
|||
<Isolated>False</Isolated> |
|||
</COMReference> |
|||
<COMReference Include="EnvDTE90"> |
|||
<Guid>{2CE2370E-D744-4936-A090-3FFFE667B0E1}</Guid> |
|||
<VersionMajor>9</VersionMajor> |
|||
<VersionMinor>0</VersionMinor> |
|||
<Lcid>0</Lcid> |
|||
<WrapperTool>primary</WrapperTool> |
|||
<Isolated>False</Isolated> |
|||
</COMReference> |
|||
<COMReference Include="Microsoft.VisualStudio.CommandBars"> |
|||
<Guid>{1CBA492E-7263-47BB-87FE-639000619B15}</Guid> |
|||
<VersionMajor>8</VersionMajor> |
|||
<VersionMinor>0</VersionMinor> |
|||
<Lcid>0</Lcid> |
|||
<WrapperTool>primary</WrapperTool> |
|||
<Isolated>False</Isolated> |
|||
</COMReference> |
|||
<COMReference Include="stdole"> |
|||
<Guid>{00020430-0000-0000-C000-000000000046}</Guid> |
|||
<VersionMajor>2</VersionMajor> |
|||
<VersionMinor>0</VersionMinor> |
|||
<Lcid>0</Lcid> |
|||
<WrapperTool>primary</WrapperTool> |
|||
<Isolated>False</Isolated> |
|||
</COMReference> |
|||
</ItemGroup> |
|||
<ItemGroup> |
|||
<Compile Include="..\CommonAssemblyInfo.cs"> |
|||
<Link>Properties\CommonAssemblyInfo.cs</Link> |
|||
</Compile> |
|||
<Compile Include="Commands\About.cs" /> |
|||
<Compile Include="Commands\ApplyPatch.cs" /> |
|||
<Compile Include="Commands\Browse.cs" /> |
|||
<Compile Include="Commands\Cherry.cs" /> |
|||
<Compile Include="Commands\Clone.cs" /> |
|||
<Compile Include="Commands\CommandBase.cs" /> |
|||
<Compile Include="Commands\Commit.cs" /> |
|||
<Compile Include="Commands\CreateBranch.cs" /> |
|||
<Compile Include="Commands\FileHistory.cs" /> |
|||
<Compile Include="Commands\FindFile.cs" /> |
|||
<Compile Include="Commands\FormatPatch.cs" /> |
|||
<Compile Include="Commands\GitBash.cs" /> |
|||
<Compile Include="Commands\GitIgnore.cs" /> |
|||
<Compile Include="Commands\Init.cs" /> |
|||
<Compile Include="Commands\ItemCommandBase.cs" /> |
|||
<Compile Include="Commands\Merge.cs" /> |
|||
<Compile Include="Commands\OpenWithDifftool.cs" /> |
|||
<Compile Include="Commands\Pull.cs" /> |
|||
<Compile Include="Commands\Push.cs" /> |
|||
<Compile Include="Commands\Rebase.cs" /> |
|||
<Compile Include="Commands\Remotes.cs" /> |
|||
<Compile Include="Commands\Revert.cs" /> |
|||
<Compile Include="Commands\Settings.cs" /> |
|||
<Compile Include="Commands\SolveMergeConflicts.cs" /> |
|||
<Compile Include="Commands\Stash.cs" /> |
|||
<Compile Include="Commands\SwitchBranch.cs" /> |
|||
<Compile Include="Commands\ToolbarCommand.cs" /> |
|||
<Compile Include="Commands\ViewChanges.cs" /> |
|||
<Compile Include="Git\GitCommands.cs" /> |
|||
<Compile Include="PluginHelpers.cs" /> |
|||
<Compile Include="Properties\AssemblyInfo.cs" /> |
|||
</ItemGroup> |
|||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> |
|||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. |
|||
Other similar extension points exist, see Microsoft.Common.targets. |
|||
<Target Name="BeforeBuild"> |
|||
</Target> |
|||
<Target Name="AfterBuild"> |
|||
</Target> |
|||
--> |
|||
</Project> |
@ -0,0 +1,84 @@ |
|||
// Copyright (C) 2006-2008 Jim Tilander. See COPYING for and README for more details.
|
|||
using System; |
|||
using System.Linq; |
|||
using EnvDTE; |
|||
using EnvDTE80; |
|||
using Microsoft.VisualStudio.CommandBars; |
|||
|
|||
namespace GitPluginShared |
|||
{ |
|||
public static class PluginHelpers |
|||
{ |
|||
public static bool ChangeCommandCaption(DTE2 application, string commandBarName, string tooltipText, string caption) |
|||
{ |
|||
try |
|||
{ |
|||
var cmdBars = (CommandBars)application.CommandBars; |
|||
CommandBar commandBar = cmdBars[commandBarName]; |
|||
var cbcc = commandBar.Controls.Cast<CommandBarButton>().ToArray(); |
|||
foreach (var control in cbcc) |
|||
{ |
|||
if (control.TooltipText.Trim().Equals(tooltipText.Trim(), StringComparison.CurrentCultureIgnoreCase)) |
|||
{ |
|||
control.Caption = caption; |
|||
control.Style = MsoButtonStyle.msoButtonIconAndCaption; |
|||
} |
|||
} |
|||
return true; |
|||
} |
|||
catch (Exception) |
|||
{ |
|||
//ignore!
|
|||
return false; |
|||
} |
|||
} |
|||
|
|||
public static OutputWindowPane AquireOutputPane(DTE2 app, string name) |
|||
{ |
|||
try |
|||
{ |
|||
if ("" == name) |
|||
return null; |
|||
|
|||
OutputWindowPane result = FindOutputPane(app, name); |
|||
if (null != result) |
|||
return result; |
|||
|
|||
var outputWindow = (OutputWindow)app.Windows.Item(Constants.vsWindowKindOutput).Object; |
|||
OutputWindowPanes panes = outputWindow.OutputWindowPanes; |
|||
return panes.Add(name); |
|||
} |
|||
catch (Exception) |
|||
{ |
|||
//ignore!!
|
|||
return null; |
|||
} |
|||
} |
|||
|
|||
public static OutputWindowPane FindOutputPane(DTE2 app, string name) |
|||
{ |
|||
try |
|||
{ |
|||
if ("" == name) |
|||
return null; |
|||
|
|||
var outputWindow = (OutputWindow)app.Windows.Item(Constants.vsWindowKindOutput).Object; |
|||
OutputWindowPanes panes = outputWindow.OutputWindowPanes; |
|||
|
|||
foreach (OutputWindowPane pane in panes) |
|||
{ |
|||
if (name != pane.Name) |
|||
continue; |
|||
|
|||
return pane; |
|||
} |
|||
|
|||
} |
|||
catch (Exception) |
|||
{ |
|||
//ignore!!
|
|||
} |
|||
return null; |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,5 @@ |
|||
using System.Reflection; |
|||
using System.Runtime.CompilerServices; |
|||
|
|||
[assembly: System.CLSCompliant(false)] |
|||
[assembly: InternalsVisibleTo("GitPluginShared")] |
Write
Preview
Loading…
Cancel
Save
Reference in new issue