Skip to content

Commit b1d96ff

Browse files
committed
Merge remote-tracking branch 'upstream/next' into rkapka-master
# Conflicts: # RubberduckTests/Inspections/ObjectVariableNotSetInspectionTests.cs
2 parents ac2e8be + ded10ed commit b1d96ff

File tree

122 files changed

+4377
-42888
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

122 files changed

+4377
-42888
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Branch | Description | Build Status |
3535

3636
Rubberduck is a COM add-in for the VBA IDE (VBE).
3737

38-
Copyright (C) 2014-2017 Mathieu Guindon & Christopher McClellan
38+
Copyright (C) 2014-2018 Mathieu Guindon & Christopher McClellan
3939

4040
This program is free software: you can redistribute it and/or modify
4141
it under the terms of the GNU General Public License as published by

RetailCoder.VBE/Extension.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,11 @@ public void OnConnection(object Application, ext_ConnectMode ConnectMode, object
6262

6363
var addin = (AddIn)AddInInst;
6464
_addin = new VBEditor.SafeComWrappers.VBA.AddIn(addin) { Object = this };
65+
66+
#if DEBUG
67+
// FOR DEBUGGING/DEVELOPMENT PURPOSES, ALLOW ACCESS TO SOME VBETypeLibsAPI FEATURES FROM VBA
68+
_addin.Object = new Rubberduck.VBEditor.ComManagement.TypeLibsAPI.VBETypeLibsAPI_Object(_ide);
69+
#endif
6570
}
6671
else if (Application is Microsoft.VB6.Interop.VBIDE.VBE vbe2)
6772
{

RetailCoder.VBE/Refactorings/ReorderParameters/ReorderParametersRefactoring.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ private void RewriteCall(VBAParser.ArgumentListContext argList, ICodeModule modu
151151
var args = argList.argument().Select((s, i) => new { Index = i, Text = s.GetText() }).ToList();
152152
for (var i = 0; i < _model.Parameters.Count; i++)
153153
{
154-
if (argList.argument().Count <= i)
154+
if (argList.argument().Length <= i)
155155
{
156156
break;
157157
}

RetailCoder.VBE/Root/RubberduckIoCInstaller.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public void Install(IWindsorContainer container, IConfigurationStore store)
9393
.LifestyleSingleton());
9494
container.Register(Component.For<ISourceControlProvider>()
9595
.ImplementedBy<GitProvider>()
96-
.LifestyleSingleton());
96+
.LifestyleTransient());
9797
//container.Register(Component.For<GitProvider>()
9898
// .LifestyleSingleton());
9999
container.Register(Component.For<IOperatingSystem>()

RetailCoder.VBE/Rubberduck.csproj

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<Import Project="..\packages\LibGit2Sharp.NativeBinaries.1.0.185\build\LibGit2Sharp.NativeBinaries.props" Condition="Exists('..\packages\LibGit2Sharp.NativeBinaries.1.0.185\build\LibGit2Sharp.NativeBinaries.props')" />
4-
<Import Project="..\packages\Antlr4.4.3.0\build\Antlr4.props" Condition="Exists('..\packages\Antlr4.4.3.0\build\Antlr4.props')" />
54
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
65
<PropertyGroup>
76
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -229,9 +228,8 @@
229228
<StartupObject />
230229
</PropertyGroup>
231230
<ItemGroup>
232-
<Reference Include="Antlr4.Runtime.net45">
233-
<HintPath>..\packages\Antlr4.Runtime.4.3.0\lib\net45\Antlr4.Runtime.net45.dll</HintPath>
234-
<EmbedInteropTypes>False</EmbedInteropTypes>
231+
<Reference Include="Antlr4.Runtime, Version=4.6.0.0, Culture=neutral, PublicKeyToken=09abb75b9ed49849, processorArchitecture=MSIL">
232+
<HintPath>..\packages\Antlr4.Runtime.4.6.4\lib\net45\Antlr4.Runtime.dll</HintPath>
235233
</Reference>
236234
<Reference Include="Castle.Core, Version=4.1.1.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
237235
<HintPath>..\packages\Castle.Core.4.1.1\lib\net45\Castle.Core.dll</HintPath>
@@ -1518,12 +1516,9 @@
15181516
<PropertyGroup>
15191517
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
15201518
</PropertyGroup>
1521-
<Error Condition="!Exists('..\packages\Antlr4.4.3.0\build\Antlr4.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Antlr4.4.3.0\build\Antlr4.props'))" />
1522-
<Error Condition="!Exists('..\packages\Antlr4.4.3.0\build\Antlr4.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Antlr4.4.3.0\build\Antlr4.targets'))" />
15231519
<Error Condition="!Exists('$(SolutionDir)\.nuget\NuGet.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\.nuget\NuGet.targets'))" />
15241520
<Error Condition="!Exists('..\packages\LibGit2Sharp.NativeBinaries.1.0.185\build\LibGit2Sharp.NativeBinaries.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\LibGit2Sharp.NativeBinaries.1.0.185\build\LibGit2Sharp.NativeBinaries.props'))" />
15251521
</Target>
1526-
<Import Project="..\packages\Antlr4.4.3.0\build\Antlr4.targets" Condition="Exists('..\packages\Antlr4.4.3.0\build\Antlr4.targets')" />
15271522
<PropertyGroup>
15281523
<PostBuildEvent>
15291524
</PostBuildEvent>

RetailCoder.VBE/UI/RubberduckUI.de.resx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1011,7 +1011,7 @@ Wollen Sie trotzdem fortfahren?</value>
10111011
<value>Über Rubberduck</value>
10121012
</data>
10131013
<data name="AboutWindow_Copyright" xml:space="preserve">
1014-
<value>© Copyright 2014-2017 Mathieu Guindon &amp; Christopher McClellan</value>
1014+
<value>© Copyright 2014-2018 Mathieu Guindon &amp; Christopher McClellan</value>
10151015
</data>
10161016
<data name="AboutWindow_SpecialThanksLabel" xml:space="preserve">
10171017
<value>Spezieller Dank</value>
@@ -2085,4 +2085,4 @@ Möchten sie die Einstellungen in Rubberduck importieren?</value>
20852085
<data name="CodeMetrics_Nesting" xml:space="preserve">
20862086
<value>Maximale Einrückung</value>
20872087
</data>
2088-
</root>
2088+
</root>

RetailCoder.VBE/UI/RubberduckUI.fr.resx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1266,7 +1266,7 @@ Support localisation WPF par Grant Frisken</value>
12661266
<value>Clé invalide</value>
12671267
</data>
12681268
<data name="AboutWindow_Copyright" xml:space="preserve">
1269-
<value>© Copyright 2014-2017 Mathieu Guindon &amp; Christopher McClellan</value>
1269+
<value>© Copyright 2014-2018 Mathieu Guindon &amp; Christopher McClellan</value>
12701270
</data>
12711271
<data name="UnitTest_NewModule_RunOnce" xml:space="preserve">
12721272
<value>cette procédure s'exécute une seule fois par module</value>
@@ -2088,4 +2088,4 @@ les projets dans le VBE.</value>
20882088
<data name="CodeMetrics_Lines" xml:space="preserve">
20892089
<value>Lignes</value>
20902090
</data>
2091-
</root>
2091+
</root>

RetailCoder.VBE/UI/RubberduckUI.resx

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -381,15 +381,6 @@ Warning: All customized settings will be lost. Your old file will be saved in '
381381
<data name="Rubberduck_AboutBuild" xml:space="preserve">
382382
<value>Version {0}</value>
383383
</data>
384-
<data name="TodoMarkerBug" xml:space="preserve">
385-
<value>BUG</value>
386-
</data>
387-
<data name="TodoMarkerNote" xml:space="preserve">
388-
<value>NOTE</value>
389-
</data>
390-
<data name="TodoMarkerTodo" xml:space="preserve">
391-
<value>TODO</value>
392-
</data>
393384
<data name="AllImplementations_Caption" xml:space="preserve">
394385
<value>Implementations of '{0}'</value>
395386
</data>
@@ -710,7 +701,7 @@ Are you sure you want to proceed with this rename?</value>
710701
<value>About Rubberduck</value>
711702
</data>
712703
<data name="AboutWindow_Copyright" xml:space="preserve">
713-
<value>© Copyright 2014-2017 Mathieu Guindon &amp; Christopher McClellan</value>
704+
<value>© Copyright 2014-2018 Mathieu Guindon &amp; Christopher McClellan</value>
714705
</data>
715706
<data name="AboutWindow_SpecialThanksLabel" xml:space="preserve">
716707
<value>Special Thanks</value>
@@ -2155,4 +2146,4 @@ Would you like to import them to Rubberduck?</value>
21552146
<data name="GeneralSettings_ModifierWarning" xml:space="preserve">
21562147
<value>Modifier Warning</value>
21572148
</data>
2158-
</root>
2149+
</root>

RetailCoder.VBE/UI/SourceControl/SourceControlViewViewModel.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -576,9 +576,9 @@ private void ListenForErrors()
576576
private void HandleViewModelError(object sender, ErrorEventArgs e)
577577
{
578578
// smell: relies on implementation detail of 3rd-party library
579-
const string unauthorizedMessage = "Request failed with status code: 401";
579+
const string unauthorizedMessage = "request failed with status code: 401";
580580

581-
if (e.InnerMessage == unauthorizedMessage)
581+
if (e.InnerMessage.ToLower() == unauthorizedMessage)
582582
{
583583
Logger.Trace("Requesting login");
584584
DisplayLoginGrid = true;

RetailCoder.VBE/app.config

Lines changed: 16 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<configuration>
33
<configSections>
4-
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
4+
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
55
<section name="Rubberduck.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
66
</sectionGroup>
77
</configSections>
@@ -17,8 +17,7 @@
1717
<Rubberduck.Properties.Settings>
1818
<setting name="DefaultHotkey_CodePaneRefactorRenameCommand" serializeAs="Xml">
1919
<value>
20-
<HotkeySetting xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
21-
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
20+
<HotkeySetting xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
2221
<Key1>R</Key1>
2322
<IsEnabled>true</IsEnabled>
2423
<HasShiftModifier>true</HasShiftModifier>
@@ -28,11 +27,9 @@
2827
</HotkeySetting>
2928
</value>
3029
</setting>
31-
<setting name="DefaultHotkey_RefactorEncapsulateFieldCommand"
32-
serializeAs="Xml">
30+
<setting name="DefaultHotkey_RefactorEncapsulateFieldCommand" serializeAs="Xml">
3331
<value>
34-
<HotkeySetting xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
35-
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
32+
<HotkeySetting xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
3633
<Key1>F</Key1>
3734
<IsEnabled>true</IsEnabled>
3835
<HasShiftModifier>true</HasShiftModifier>
@@ -44,8 +41,7 @@
4441
</setting>
4542
<setting name="DefaultHotkey_RefactorExtractMethodCommand" serializeAs="Xml">
4643
<value>
47-
<HotkeySetting xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
48-
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
44+
<HotkeySetting xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
4945
<Key1>M</Key1>
5046
<IsEnabled>true</IsEnabled>
5147
<HasShiftModifier>true</HasShiftModifier>
@@ -55,11 +51,9 @@
5551
</HotkeySetting>
5652
</value>
5753
</setting>
58-
<setting name="DefaultHotkey_RefactorMoveCloserToUsageCommand"
59-
serializeAs="Xml">
54+
<setting name="DefaultHotkey_RefactorMoveCloserToUsageCommand" serializeAs="Xml">
6055
<value>
61-
<HotkeySetting xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
62-
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
56+
<HotkeySetting xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
6357
<Key1>C</Key1>
6458
<IsEnabled>true</IsEnabled>
6559
<HasShiftModifier>true</HasShiftModifier>
@@ -71,8 +65,7 @@
7165
</setting>
7266
<setting name="DefaultHotkey_CodeExplorerCommand" serializeAs="Xml">
7367
<value>
74-
<HotkeySetting xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
75-
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
68+
<HotkeySetting xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
7669
<Key1>R</Key1>
7770
<IsEnabled>true</IsEnabled>
7871
<HasShiftModifier>false</HasShiftModifier>
@@ -84,8 +77,7 @@
8477
</setting>
8578
<setting name="DefaultHotkey_ExportAllCommand" serializeAs="Xml">
8679
<value>
87-
<HotkeySetting xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
88-
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
80+
<HotkeySetting xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
8981
<Key1>E</Key1>
9082
<IsEnabled>true</IsEnabled>
9183
<HasShiftModifier>true</HasShiftModifier>
@@ -97,8 +89,7 @@
9789
</setting>
9890
<setting name="DefaultHotkey_FindSymbolCommand" serializeAs="Xml">
9991
<value>
100-
<HotkeySetting xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
101-
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
92+
<HotkeySetting xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
10293
<Key1>T</Key1>
10394
<IsEnabled>true</IsEnabled>
10495
<HasShiftModifier>false</HasShiftModifier>
@@ -110,8 +101,7 @@
110101
</setting>
111102
<setting name="DefaultHotkey_IndentCurrentModuleCommand" serializeAs="Xml">
112103
<value>
113-
<HotkeySetting xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
114-
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
104+
<HotkeySetting xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
115105
<Key1>M</Key1>
116106
<IsEnabled>true</IsEnabled>
117107
<HasShiftModifier>false</HasShiftModifier>
@@ -123,8 +113,7 @@
123113
</setting>
124114
<setting name="DefaultHotkey_IndentCurrentProcedureCommand" serializeAs="Xml">
125115
<value>
126-
<HotkeySetting xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
127-
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
116+
<HotkeySetting xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
128117
<Key1>P</Key1>
129118
<IsEnabled>true</IsEnabled>
130119
<HasShiftModifier>false</HasShiftModifier>
@@ -136,8 +125,7 @@
136125
</setting>
137126
<setting name="DefaultHotkey_InspectionResultsCommand" serializeAs="Xml">
138127
<value>
139-
<HotkeySetting xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
140-
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
128+
<HotkeySetting xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
141129
<Key1>I</Key1>
142130
<IsEnabled>true</IsEnabled>
143131
<HasShiftModifier>true</HasShiftModifier>
@@ -149,8 +137,7 @@
149137
</setting>
150138
<setting name="DefaultHotkey_ReparseCommand" serializeAs="Xml">
151139
<value>
152-
<HotkeySetting xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
153-
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
140+
<HotkeySetting xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
154141
<Key1>`</Key1>
155142
<IsEnabled>true</IsEnabled>
156143
<HasShiftModifier>false</HasShiftModifier>
@@ -162,8 +149,7 @@
162149
</setting>
163150
<setting name="DefaultHotkey_SourceControlCommand" serializeAs="Xml">
164151
<value>
165-
<HotkeySetting xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
166-
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
152+
<HotkeySetting xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
167153
<Key1>D6</Key1>
168154
<IsEnabled>true</IsEnabled>
169155
<HasShiftModifier>true</HasShiftModifier>
@@ -175,8 +161,7 @@
175161
</setting>
176162
<setting name="DefaultHotkey_TestExplorerCommand" serializeAs="Xml">
177163
<value>
178-
<HotkeySetting xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
179-
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
164+
<HotkeySetting xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
180165
<Key1>T</Key1>
181166
<IsEnabled>true</IsEnabled>
182167
<HasShiftModifier>true</HasShiftModifier>

0 commit comments

Comments
 (0)