Skip to content

Commit

Permalink
Merge branch 'ulex-master'
Browse files Browse the repository at this point in the history
  • Loading branch information
citizenmatt committed Apr 18, 2016
2 parents d0e7299 + 9a5ebb2 commit 0c67978
Show file tree
Hide file tree
Showing 6 changed files with 103 additions and 83 deletions.
6 changes: 3 additions & 3 deletions install/presentation-assistant.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@
<metadata>
<id>JetBrains.PresentationAssistant</id>
<title>Presentation Assistant</title>
<version>2.3.1</version>
<version>2.4.1</version>
<authors>JetBrains</authors>
<owners>JetBrains</owners>
<description>Shows the name and keyboard shortcuts of invoked actions.</description>
<summary>Shows the name and keyboard shortcuts of invoked actions.</summary>
<releaseNotes>
&#8226; Support for ReSharper 10 RTM
&#8226; Support for ReSharper 2016.1
</releaseNotes>
<projectUrl>https://github.com/JetBrains/resharper-presentation-assistant</projectUrl>
<licenseUrl>https://raw.githubusercontent.com/JetBrains/resharper-presentaton-assistant/license.txt</licenseUrl>
<iconUrl>http://resharper-plugins.jetbrains.com/Content/Images/packageReSharper.png</iconUrl>
<copyright>Copyright 2015 JetBrains, s.r.o</copyright>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<dependencies>
<dependency id="Wave" version="[4.0]" />
<dependency id="Wave" version="[5.0, 6.0)" />
</dependencies>
<tags>resharper presentation assistant keymap</tags>
</metadata>
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Presentation Assistant for ReSharper

Presentation Assistant is an extension for ReSharper 10, 9.2, 9.1 and 9.0 that will display the keyboard shortcuts for the currently executing action. Useful for demos, but also handy for pair programming - easily answer those "how did you do that?" questions.
Presentation Assistant is an extension for ReSharper 2016.1, 10, 9.2, 9.1 and 9.0 that will display the keyboard shortcuts for the currently executing action. Useful for demos, but also handy for pair programming - easily answer those "how did you do that?" questions.

![Presentation Assistant showing a shortcut for Extend Selection](docs/presentation_assistant.png)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ private void EnableShortcuts(Lifetime enabledLifetime)

var window = new PresentationAssistantWindow();

theming.PopulateResourceDictionary(popupWindowLifetimeDefinition, window.Resources);
theming.PopulateResourceDictionary(popupWindowLifetimeDefinition.Lifetime, window.Resources);

var popupWindow = new FadingWpfPopupWindow(popupWindowLifetimeDefinition, context, context.Mutex,
popupWindowManager, window, opacity: 0.8);

var visibilityLifetimes = new SequentialLifetimes(popupWindowLifetimeDefinition);
var visibilityLifetimes = new SequentialLifetimes(popupWindowLifetimeDefinition.Lifetime);

showAction = shortcut =>
{
Expand Down
22 changes: 11 additions & 11 deletions src/resharper-presentation-assistant/VisualStudio/VsActionFinder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ private void PopulateCachedActionDefs()
foreach (var tuple in enumDescendantControls)
{
// Make sure it's an actionable type (e.g. not a CommandBarPopup, or _CommandBarActiveX)
var commandBarControl = tuple.A;
var commandBarControl = tuple.Item1;
if (commandBarControl is CommandBarButton || commandBarControl is CommandBarComboBox)
{
var commandId = VsCommandHelpersTodo.TryGetVsControlCommandID(commandBarControl, dte);
Expand All @@ -83,7 +83,7 @@ private void PopulateCachedActionDefs()
if (string.IsNullOrEmpty(actionId) || cachedActionDefs.ContainsKey(actionId))
continue;

var commandBarPopups = tuple.B;
var commandBarPopups = tuple.Item2;
var def = new CommandBarActionDef(vsShortcutFinder, dte, actionId, commandId, commandBarControl,
commandBarPopups ?? EmptyArray<CommandBarPopup>.Instance);
cachedActionDefs.Add(actionId, def);
Expand Down Expand Up @@ -204,7 +204,7 @@ public static class VsCommandHelpers2
/// Each returned item is the descandant control plus an array of its parents, top to bottom.
/// </summary>
[NotNull]
public static IEnumerable<JetTuple<CommandBarControl, CommandBarPopup[]>> EnumDescendantControls(
public static IEnumerable<Tuple<CommandBarControl, CommandBarPopup[]>> EnumDescendantControls(
[NotNull] this CommandBar root, [NotNull] CompoundException cex)
{
if (root == null)
Expand All @@ -213,40 +213,40 @@ public static IEnumerable<JetTuple<CommandBarControl, CommandBarPopup[]>> EnumDe
throw new ArgumentNullException("cex");

var queueEnumChildren =
new Queue<JetTuple<CommandBar, CommandBarPopup[]>>(new[]
{JetTuple.Of(root, EmptyArray<CommandBarPopup>.Instance)});
new Queue<Tuple<CommandBar, CommandBarPopup[]>>(new[]
{Tuple.Create(root, EmptyArray<CommandBarPopup>.Instance)});
int nBar = -1;

while (queueEnumChildren.Any())
{
JetTuple<CommandBar, CommandBarPopup[]> tuple = queueEnumChildren.Dequeue();
Tuple<CommandBar, CommandBarPopup[]> tuple = queueEnumChildren.Dequeue();

nBar++;
List<CommandBarControl> children = null;
try
{
// All children
children = tuple.A.Controls.OfType<CommandBarControl>().ToList();
children = tuple.Item1.Controls.OfType<CommandBarControl>().ToList();

// EnqueueJob child containers
children.OfType<CommandBarPopup>()
.Select(popup => JetTuple.Of(popup.CommandBar, tuple.B.Concat(popup).ToArray()))
.Select(popup => Tuple.Create(popup.CommandBar, tuple.Item2.Concat(popup).ToArray()))
.ForEach(queueEnumChildren.Enqueue);
}
catch (Exception e)
{
var ex = new LoggerException("Failed to enum command bar child controls.", e);
ex.AddData("IndexInQueue", () => nBar);
ex.AddData("CommandBarName", () => tuple.A.Name);
ex.AddData("CommandBarIndexProperty", () => tuple.A.Index);
ex.AddData("CommandBarName", () => tuple.Item1.Name);
ex.AddData("CommandBarIndexProperty", () => tuple.Item1.Index);
cex.Exceptions.Add(ex);
}

// Emit
if (children != null) // Null if were exceptions (cannot yield from a catch)
{
foreach (CommandBarControl child in children)
yield return JetTuple.Of(child, tuple.B);
yield return Tuple.Create(child, tuple.Item2);
}
}
}
Expand Down
54 changes: 29 additions & 25 deletions src/resharper-presentation-assistant/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,43 +2,45 @@
<packages>
<package id="Antlr2.Runtime" version="2.7.7.02" targetFramework="net45" />
<package id="Antlr2.Tools" version="2.7.6.4" targetFramework="net45" />
<package id="AsyncBridge.JetBrains" version="0.1.1.0" targetFramework="net45" />
<package id="DotNetZip.Reduced" version="1.9.1.8" targetFramework="net45" />
<package id="JetBrains.Annotations" version="10.0.0" targetFramework="net45" />
<package id="JetBrains.Build.Platform.Tasks.ThemedIconsPacker" version="2.0.20150812.0" targetFramework="net45" developmentDependency="true" />
<package id="JetBrains.ExternalAnnotations" version="10.0.15" targetFramework="net45" />
<package id="JetBrains.Annotations" version="10.1.4" targetFramework="net45" />
<package id="JetBrains.Build.Platform.Tasks.ThemedIconsPacker" version="2.0.20151217.1" targetFramework="net45" developmentDependency="true" />
<package id="JetBrains.ExternalAnnotations" version="10.1.8" targetFramework="net45" />
<package id="JetBrains.Mono.Posix" version="0.1" targetFramework="net45" />
<package id="JetBrains.Platform.Core.Ide" version="104.0.20151101.164845" targetFramework="net45" />
<package id="JetBrains.Platform.Core.Shell" version="104.0.20151101.164331" targetFramework="net45" />
<package id="JetBrains.Platform.Core.Text" version="104.0.20151101.164845" targetFramework="net45" />
<package id="JetBrains.Platform.Installer" version="104.0.20151101.164845" targetFramework="net45" />
<package id="JetBrains.Platform.Interop.dotMemoryUnit.Interop" version="104.0.20151101.164845" targetFramework="net45" />
<package id="JetBrains.Platform.Core.Ide" version="105.0.20160414.153405" targetFramework="net45" />
<package id="JetBrains.Platform.Core.Shell" version="105.0.20160414.95726" targetFramework="net45" />
<package id="JetBrains.Platform.Core.Text" version="105.0.20160414.153405" targetFramework="net45" />
<package id="JetBrains.Platform.Installer" version="105.0.20160414.153405" targetFramework="net45" />
<package id="JetBrains.Platform.Interop.dotMemoryUnit.Interop" version="105.0.20160414.153405" targetFramework="net45" />
<package id="JetBrains.Platform.Lib.DevExpress" version="2.0.20150224.0" targetFramework="net45" />
<package id="JetBrains.Platform.Lib.Microsoft.Deployment.Compression.Cab" version="2.0.20140304.0" targetFramework="net45" />
<package id="JetBrains.Platform.Lib.Microsoft.Deployment.WindowsInstaller" version="2.0.20140821.0" targetFramework="net45" />
<package id="JetBrains.Platform.Lib.System.Windows.Interactivity" version="2.0.20140318.0" targetFramework="net45" />
<package id="JetBrains.Platform.Lib.VisualStudio.AnyVs.ShellInterop.PrivateBuild" version="2.0.20140304.0" targetFramework="net45" />
<package id="JetBrains.Platform.Lib.WpfContrib" version="2.0.20150225.0" targetFramework="net45" />
<package id="JetBrains.Platform.Symbols" version="104.0.20151101.164845" targetFramework="net45" />
<package id="JetBrains.Platform.Tests.Framework" version="104.0.20151101.164845" targetFramework="net45" />
<package id="JetBrains.Platform.VisualStudio" version="104.0.20151101.164845" targetFramework="net45" />
<package id="JetBrains.Psi.Features.Core" version="104.0.20151101.185700" targetFramework="net45" />
<package id="JetBrains.Psi.Features.Cpp.src" version="104.0.20151101.190744" targetFramework="net45" />
<package id="JetBrains.Psi.Features.SolutionBuilder" version="104.0.20151101.185700" targetFramework="net45" />
<package id="JetBrains.Psi.Features.src" version="104.0.20151101.185700" targetFramework="net45" />
<package id="JetBrains.Psi.Features.Tasks" version="104.0.20151101.185700" targetFramework="net45" />
<package id="JetBrains.Psi.Features.test.Framework" version="104.0.20151101.185700" targetFramework="net45" />
<package id="JetBrains.Psi.Features.UnitTesting" version="104.0.20151101.185700" targetFramework="net45" />
<package id="JetBrains.Psi.Features.VisualStudio" version="104.0.20151101.185700" targetFramework="net45" />
<package id="JetBrains.ReSharper.SDK" version="10.0.20151101.194233" targetFramework="net45" />
<package id="JetBrains.ReSharper.SDK.Internal" version="104.0.20151101.194233" targetFramework="net45" />
<package id="JetBrains.Platform.Symbols" version="105.0.20160414.153405" targetFramework="net45" />
<package id="JetBrains.Platform.Tests.Framework" version="105.0.20160414.153405" targetFramework="net45" />
<package id="JetBrains.Platform.VisualStudio" version="105.0.20160414.153405" targetFramework="net45" />
<package id="JetBrains.Psi.Features.Core" version="105.0.20160414.153845" targetFramework="net45" />
<package id="JetBrains.Psi.Features.Cpp.Src" version="105.0.20160414.155000" targetFramework="net45" />
<package id="JetBrains.Psi.Features.SolutionBuilder" version="105.0.20160414.153845" targetFramework="net45" />
<package id="JetBrains.Psi.Features.src" version="105.0.20160414.153845" targetFramework="net45" />
<package id="JetBrains.Psi.Features.Tasks" version="105.0.20160414.153845" targetFramework="net45" />
<package id="JetBrains.Psi.Features.test.Framework" version="105.0.20160414.153845" targetFramework="net45" />
<package id="JetBrains.Psi.Features.UnitTesting" version="105.0.20160414.153845" targetFramework="net45" />
<package id="JetBrains.Psi.Features.VisualStudio" version="105.0.20160414.153845" targetFramework="net45" />
<package id="JetBrains.ReSharper.SDK" version="2016.1.20160414.161610" targetFramework="net45" />
<package id="JetBrains.ReSharper.SDK.Internal" version="105.0.20160414.161610" targetFramework="net45" />
<package id="JetBrains.WinDbg.SymStore" version="10.0.10586.20151201" targetFramework="net45" developmentDependency="true" />
<package id="Microsoft.VC100.CRT.JetBrains" version="10.00.40219.2" targetFramework="net45" />
<package id="Microsoft.VC120.CRT.JetBrains" version="12.0.21005.2" targetFramework="net45" />
<package id="Microsoft.Web.Xdt" version="2.1.1" targetFramework="net45" />
<package id="Newtonsoft35.Json" version="7.0.1" targetFramework="net45" />
<package id="NuGet.Core" version="2.8.6" targetFramework="net45" />
<package id="NuGet.Core" version="2.10.1" targetFramework="net45" />
<package id="NUnit" version="2.6.4" targetFramework="net45" />
<package id="NUnit.ReSharperRunner2" version="2.6.408" targetFramework="net45" />
<package id="NUnit.ReSharperRunner3" version="3.0.11" targetFramework="net45" />
<package id="NUnit.ReSharperRunner3" version="3.0.12" targetFramework="net45" />
<package id="NVelocity" version="1.0.3" targetFramework="net45" />
<package id="SharpZipLib.JetBrains.Stripped" version="0.86.20150204.1" targetFramework="net45" />
<package id="Sprache.JetBrains" version="2.0.0.44" targetFramework="net45" />
Expand All @@ -65,8 +67,10 @@
<package id="VSSDK.Shell.Interop.9" version="9.0.4" targetFramework="net45" />
<package id="VSSDK.TextManager.Interop" version="7.0.4" targetFramework="net45" />
<package id="VSSDK.TextManager.Interop.8" version="8.0.4" targetFramework="net45" />
<package id="Wave" version="4.0.0.0" targetFramework="net45" />
<package id="WinDbg.SymStore" version="8.1.20130822.1833" targetFramework="net45" developmentDependency="true" />
<package id="Wave" version="5.0.0.0" targetFramework="net45" />
<package id="Windows7APICodePack.JetBrains.Stripped" version="1.1.20150225.0" targetFramework="net45" />
<package id="xmlrpcnet" version="2.5.0" targetFramework="net45" />
<package id="xunit.abstractions.JetBrains" version="2.0.0" targetFramework="net45" />
<package id="xunit.JetBrains" version="1.9.2" targetFramework="net45" />
<package id="xunit.runner.utility.JetBrains" version="2.2.0" targetFramework="net45" />
</packages>
Loading

0 comments on commit 0c67978

Please sign in to comment.