Skip to content

Commit 44eb5af

Browse files
committed
fixes merge conflict
2 parents a08aaa9 + 9aa4d9b commit 44eb5af

38 files changed

+3945
-3397
lines changed

README.md

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,36 +8,31 @@
88
[nextBuildStatus]:https://ci.appveyor.com/api/projects/status/we3pdnkeebo4nlck/branch/next?svg=true
99
[masterBuildStatus]:https://ci.appveyor.com/api/projects/status/we3pdnkeebo4nlck/branch/master?svg=true
1010

11-
Rubberduck is a COM Add-In for the VBA IDE that makes VBA development even more enjoyable, by extending the Visual Basic Editor (VBE) with menus, toolbars and toolwindows that enable things we didn't even think were possible when we first started this project.
11+
[![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/rubberduck-vba/rubberduck.svg)](http://isitmaintained.com/project/rubberduck-vba/rubberduck "Average time to resolve an issue") [![Percentage of issues still open](http://isitmaintained.com/badge/open/rubberduck-vba/rubberduck.svg)](http://isitmaintained.com/project/rubberduck-vba/rubberduck "Percentage of issues still open")
1212

13-
If you're learning VBA, Rubberduck can help you avoid a few common beginner mistakes, and can probably show you a trick or two - even if you're only ever writing *macros*. If you're a more advanced programmer, you will appreciate the richness of [Rubberduck's feature set](https://github.com/retailcoder/Rubberduck/wiki/Features).
14-
15-
[**Follow us on Twitter!**](https://twitter.com/rubberduckvba)
16-
17-
[**Rubberduck Wiki**](https://github.com/retailcoder/Rubberduck/wiki)
13+
> **[rubberduckvba.com](http://rubberduckvba.com)** [Wiki](https://github.com/retailcoder/Rubberduck/wiki) [Rubberduck News](https://rubberduckvba.wordpress.com/)
14+
> contact@rubberduckvba.com
15+
> Follow [@rubberduckvba](https://twitter.com/rubberduckvba) on Twitter
1816
1917
---
2018

21-
#[Contributing](https://github.com/rubberduck-vba/Rubberduck/wiki/Contributing)
19+
##What is Rubberduck?
2220

23-
If you're a C# developer looking for a fun project to contribute to, feel free to fork the project and
24-
[come meet the devs in Code Review's "VBA Rubberducking" chatroom][chat] - we'll be happy to answer your questions and help you help us!
21+
It's an add-in for the VBA IDE, the glorious *Visual Basic Editor* (VBE) - which hasn't seen an update in this century, but that's still in use everywhere around the world. Rubberduck wants to give its users access to features you would find in the VBE if it had kept up with the features of Visual Studio and other IDE's in the past, oh, *decade* or so.
2522

26-
We follow a [development branch workflow][branch], so please submit any Pull Requests to the `next` branch.
23+
Rubberduck wants to help its users write better, cleaner, maintainable code. The many **code inspections** and **refactoring tools** help harmlessly making changes to the code, and **unit testing** helps writing a *safety net* that makes it easy to know exactly what broke when you made that *small little harmless modification*.
2724

28-
[chat]:http://chat.stackexchange.com/rooms/14929
29-
[helpwanted]:https://github.com/rubberduck-vba/Rubberduck/labels/help-wanted
30-
[branch]:https://github.com/rubberduck-vba/Rubberduck/issues/288
25+
Rubberduck wants to bring VBA into the 21st century, and wants to see more open-source VBA repositories on [GitHub](https://github.com/) - VBA code and **source control** don't traditionally exactly work hand in hand; unless you've automated it, exporting each module one by one to your local repository, fetching the remote changes, re-importing every module one by one back into the project, ...is *a little bit* tedious. Rubberduck integrates Git into the IDE, and handles all the file handling behind the scenes - a bit like Visual Studio's *Team Explorer*.
3126

3227
---
3328

34-
#[Installing](https://github.com/rubberduck-vba/Rubberduck/wiki/Installing)
29+
If you're learning VBA, Rubberduck can help you avoid a few common beginner mistakes, and can probably show you a trick or two - even if you're only ever writing *macros*. If you're a more advanced programmer, you will appreciate the richness of [Rubberduck's feature set](https://github.com/retailcoder/Rubberduck/wiki/Features). See the [Installing](https://github.com/rubberduck-vba/Rubberduck/wiki/Installing) wiki page.
3530

36-
This section was moved to a dedicated wiki page.
31+
If you're a C# developer looking for a fun project to contribute to, see the [Contributing](https://github.com/rubberduck-vba/Rubberduck/wiki/Contributing) wiki page.
3732

3833
---
3934

40-
#License
35+
##License
4136

4237
Rubberduck is a COM add-in for the VBA IDE (VBE).
4338

RetailCoder.VBE/App.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
using System.Runtime.InteropServices.ComTypes;
1919
using System.Threading.Tasks;
2020
using System.Windows.Forms;
21+
using Rubberduck.Common.Hotkeys;
2122

2223
namespace Rubberduck
2324
{
@@ -132,9 +133,9 @@ private bool ShouldEvaluateCanExecute(Declaration selectedDeclaration, ParserSta
132133
private void _configService_SettingsChanged(object sender, EventArgs e)
133134
{
134135
_config = _configService.LoadConfiguration();
136+
_hooks.HookHotkeys();
135137
// also updates the ShortcutKey text
136138
_appMenus.Localize();
137-
_hooks.HookHotkeys();
138139
UpdateLoggingLevel();
139140
}
140141

@@ -147,9 +148,9 @@ public void Startup()
147148
{
148149
CleanReloadConfig();
149150
_appMenus.Initialize();
151+
_hooks.HookHotkeys(); // need to hook hotkeys before we localize menus, to correctly display ShortcutTexts
150152
_appMenus.Localize();
151153
Task.Delay(1000).ContinueWith(t => UiDispatcher.Invoke(() => _parser.State.OnParseRequested(this))).ConfigureAwait(false);
152-
_hooks.HookHotkeys();
153154
UpdateLoggingLevel();
154155
}
155156

RetailCoder.VBE/Common/Hotkeys/Hotkey.cs

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
using System.Windows.Input;
66
using Rubberduck.Common.WinAPI;
77
using NLog;
8+
using Rubberduck.UI.Command;
89

910
namespace Rubberduck.Common.Hotkeys
1011
{
@@ -58,6 +59,7 @@ public void Attach()
5859
}
5960

6061
HookKey(key, shift);
62+
SetCommandShortcutText();
6163
}
6264

6365
public void Detach()
@@ -71,6 +73,7 @@ public void Detach()
7173
Kernel32.GlobalDeleteAtom(HotkeyInfo.HookId);
7274

7375
IsAttached = false;
76+
ClearCommandShortcutText();
7477
}
7578

7679
private void HookKey(Keys key, uint shift)
@@ -90,9 +93,29 @@ private void HookKey(Keys key, uint shift)
9093

9194
HotkeyInfo = new HotkeyInfo(hookId, Combo);
9295
IsAttached = true;
96+
9397
_logger.Debug("Hotkey '{0}' hooked successfully to command '{1}'", Key, Command.GetType()); //no translation needed for Debug.Writeline
9498
}
9599

100+
private void SetCommandShortcutText()
101+
{
102+
var command = Command as CommandBase;
103+
if (command != null)
104+
{
105+
command.ShortcutText = HotkeyInfo.ToString();
106+
}
107+
}
108+
109+
private void ClearCommandShortcutText()
110+
{
111+
var command = Command as CommandBase;
112+
if (command != null)
113+
{
114+
command.ShortcutText = string.Empty;
115+
}
116+
}
117+
118+
96119
private static readonly IDictionary<char,uint> Modifiers = new Dictionary<char, uint>
97120
{
98121
{ '+', (uint)KeyModifier.SHIFT },

RetailCoder.VBE/Common/Hotkeys/HotkeyInfo.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,17 @@ public override string ToString()
2525
var builder = new StringBuilder();
2626
if (_keys.HasFlag(Keys.Alt))
2727
{
28-
builder.Append("Alt");
28+
builder.Append(Rubberduck.UI.RubberduckUI.GeneralSettings_HotkeyAlt);
2929
builder.Append('+');
3030
}
3131
if (_keys.HasFlag(Keys.Control))
3232
{
33-
builder.Append("Ctrl");
33+
builder.Append(Rubberduck.UI.RubberduckUI.GeneralSettings_HotkeyCtrl);
3434
builder.Append('+');
3535
}
3636
if (_keys.HasFlag(Keys.Shift))
3737
{
38-
builder.Append("Shift");
38+
builder.Append(Rubberduck.UI.RubberduckUI.GeneralSettings_HotkeyShift);
3939
builder.Append('+');
4040
}
4141
builder.Append(_keys & ~Modifiers);

RetailCoder.VBE/Inspections/InspectionsUI.de.resx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?xml version="1.0" encoding="utf-8"?>
1+
<?xml version="1.0" encoding="UTF-8"?>
22
<root>
33
<!--
44
Microsoft ResX Schema
@@ -59,7 +59,7 @@
5959
: using a System.ComponentModel.TypeConverter
6060
: and then encoded with base64 encoding.
6161
-->
62-
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
62+
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" id="root">
6363
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
6464
<xsd:element name="root" msdata:IsDataSet="true">
6565
<xsd:complexType>

0 commit comments

Comments
 (0)