Skip to content

Commit 648cb22

Browse files
committed
Merge branch 'next' of https://github.com/rubberduck-vba/Rubberduck into next
2 parents 59c52f8 + 747eaf6 commit 648cb22

File tree

190 files changed

+2444
-2212
lines changed

Some content is hidden

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

190 files changed

+2444
-2212
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
<img src="http://i.stack.imgur.com/jnBEp.jpg" width=100% />
22

3+
<!-- campaign is no longer accepting donations
34
### Donate!
45
56
If you like this project and would like to thank its contributors, you are welcome to support our GoFundMe campaign to finance Rubberduck swag and international shipping - contributors will be getting t-shirts, mugs, and other cool things.
67
78
[![GoFundMe campaign](https://user-images.githubusercontent.com/5751684/29191799-e3d20b72-7dec-11e7-8ec6-0c69da4a3135.png)](https://www.gofundme.com/rubberduckvba)
9+
-->
810

911
Branch | Description | Build Status |
1012
|------------|---|--------------|

RetailCoder.VBE/API/VBA/Declaration.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ internal Declaration(RubberduckDeclaration declaration)
5656
{ Parsing.Symbols.DeclarationType.Control, DeclarationType.Control },
5757
{ Parsing.Symbols.DeclarationType.UserForm, DeclarationType.UserForm },
5858
{ Parsing.Symbols.DeclarationType.Document, DeclarationType.Document },
59-
{ Parsing.Symbols.DeclarationType.ModuleOption, DeclarationType.ModuleOption },
6059
{ Parsing.Symbols.DeclarationType.Procedure, DeclarationType.Procedure },
6160
{ Parsing.Symbols.DeclarationType.Function, DeclarationType.Function },
6261
{ Parsing.Symbols.DeclarationType.PropertyGet, DeclarationType.PropertyGet },

RetailCoder.VBE/API/VBA/DeclarationType.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ public enum DeclarationType
1212
Control, //= 1 << 3,
1313
UserForm,// = 1 << 4,
1414
Document,// = 1 << 5,
15-
ModuleOption,// = 1 << 6,
1615
Procedure, //= 1 << 8,
1716
Function,// = 1 << 9,
1817
PropertyGet,// = 1 << 11,

RetailCoder.VBE/Navigation/CodeExplorer/CodeExplorerComponentViewModel.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ public CodeExplorerComponentViewModel(CodeExplorerItemViewModel parent, Declarat
5151
_name = _declaration.IdentifierName;
5252

5353
var component = declaration.QualifiedName.QualifiedModuleName.Component;
54-
if (component.Type == ComponentType.Document)
54+
try
5555
{
56-
try
56+
if (component.Type == ComponentType.Document)
5757
{
5858
var parenthesizedName = component.Properties["Name"].Value.ToString();
5959

@@ -72,10 +72,10 @@ public CodeExplorerComponentViewModel(CodeExplorerItemViewModel parent, Declarat
7272
_name += " (" + parenthesizedName + ")";
7373
}
7474
}
75-
catch
76-
{
77-
// gotcha! (this means that the property either doesn't exist or we weren't able to get it for some reason)
78-
}
75+
}
76+
catch
77+
{
78+
// gotcha! (this means that the property either doesn't exist or we weren't able to get it for some reason)
7979
}
8080
}
8181

RetailCoder.VBE/Navigation/CodeExplorer/CodeExplorerItemViewModel.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,17 @@ public bool IsExpanded
190190

191191
public bool IsSelected { get; set; }
192192

193+
private bool _isVisisble = true;
194+
public bool IsVisible
195+
{
196+
get { return _isVisisble; }
197+
set
198+
{
199+
_isVisisble = value;
200+
OnPropertyChanged();
201+
}
202+
}
203+
193204
public abstract string Name { get; }
194205
public abstract string NameWithSignature { get; }
195206
public abstract BitmapImage CollapsedIcon { get; }

RetailCoder.VBE/Navigation/CodeExplorer/CodeExplorerViewModel.cs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ public CodeExplorerViewModel(FolderHelper folderHelper, RubberduckParserState st
6464
OpenDesignerCommand = commands.OfType<OpenDesignerCommand>().SingleOrDefault();
6565

6666
AddTestModuleCommand = commands.OfType<UI.CodeExplorer.Commands.AddTestModuleCommand>().SingleOrDefault();
67+
AddTestModuleWithStubsCommand = commands.OfType<AddTestModuleWithStubsCommand>().SingleOrDefault();
68+
6769
AddStdModuleCommand = commands.OfType<AddStdModuleCommand>().SingleOrDefault();
6870
AddClassModuleCommand = commands.OfType<AddClassModuleCommand>().SingleOrDefault();
6971
AddUserFormCommand = commands.OfType<AddUserFormCommand>().SingleOrDefault();
@@ -491,6 +493,7 @@ private void SwitchNodeState(CodeExplorerItemViewModel node, bool expandedState)
491493
public CommandBase OpenCommand { get; }
492494

493495
public CommandBase AddTestModuleCommand { get; }
496+
public CommandBase AddTestModuleWithStubsCommand { get; }
494497
public CommandBase AddStdModuleCommand { get; }
495498
public CommandBase AddClassModuleCommand { get; }
496499
public CommandBase AddUserFormCommand { get; }
@@ -574,6 +577,23 @@ public Visibility EmptyUIRefreshMessageVisibility
574577
}
575578
}
576579

580+
public void FilterByName(IEnumerable<CodeExplorerItemViewModel> nodes, string searchString)
581+
{
582+
foreach (var item in nodes)
583+
{
584+
if (item == null) { continue; }
585+
586+
if (item.Items.Any())
587+
{
588+
FilterByName(item.Items, searchString);
589+
}
590+
591+
item.IsVisible = item.Items.Any(c => c.IsVisible) ||
592+
item.Name.ToLowerInvariant().Contains(searchString.ToLowerInvariant()) ||
593+
string.IsNullOrEmpty(searchString);
594+
}
595+
}
596+
577597
public void Dispose()
578598
{
579599
if (_state != null)

RetailCoder.VBE/Refactorings/Rename/RenameModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public RenameModel(IVBE vbe, RubberduckParserState state, QualifiedSelection sel
4040
private void AcquireTarget(out Declaration target, QualifiedSelection selection)
4141
{
4242
target = _declarations
43-
.Where(item => item.IsUserDefined && item.DeclarationType != DeclarationType.ModuleOption)
43+
.Where(item => item.IsUserDefined)
4444
.FirstOrDefault(item => item.IsSelected(selection) || item.References.Any(r => r.IsSelected(selection)));
4545
}
4646
}
586 Bytes
Loading

RetailCoder.VBE/Root/RubberduckModule.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,8 @@ private IEnumerable<IMenuItem> GetFormDesignerContextMenuItems()
613613
{
614614
return new IMenuItem[]
615615
{
616-
KernelInstance.Get<FormDesignerRefactorRenameCommandMenuItem>()
616+
KernelInstance.Get<FormDesignerRefactorRenameCommandMenuItem>(),
617+
KernelInstance.Get<FormDesignerFindAllReferencesCommandMenuItem>()
617618
};
618619
}
619620

RetailCoder.VBE/Rubberduck.csproj

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
<NoWarn>1591</NoWarn>
3030
<PlatformTarget>AnyCPU</PlatformTarget>
3131
<UseVSHostingProcess>true</UseVSHostingProcess>
32+
<LangVersion>7.1</LangVersion>
3233
</PropertyGroup>
3334
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
3435
<DebugType>full</DebugType>
@@ -41,6 +42,7 @@
4142
<DocumentationFile>bin\Release\Rubberduck.XML</DocumentationFile>
4243
<DebugSymbols>true</DebugSymbols>
4344
<NoWarn>1591</NoWarn>
45+
<LangVersion>7.1</LangVersion>
4446
</PropertyGroup>
4547
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'DebugAccess|AnyCPU'">
4648
<DebugSymbols>true</DebugSymbols>
@@ -54,6 +56,7 @@
5456
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
5557
<WarningLevel>4</WarningLevel>
5658
<Optimize>false</Optimize>
59+
<LangVersion>7.1</LangVersion>
5760
</PropertyGroup>
5861
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
5962
<DebugSymbols>true</DebugSymbols>
@@ -151,6 +154,7 @@
151154
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
152155
<WarningLevel>4</WarningLevel>
153156
<Optimize>false</Optimize>
157+
<LangVersion>7.1</LangVersion>
154158
</PropertyGroup>
155159
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug64|x64'">
156160
<DebugSymbols>true</DebugSymbols>
@@ -191,6 +195,7 @@
191195
<ErrorReport>prompt</ErrorReport>
192196
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
193197
<WarningLevel>4</WarningLevel>
198+
<LangVersion>7.1</LangVersion>
194199
</PropertyGroup>
195200
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release64|x64'">
196201
<DebugSymbols>true</DebugSymbols>
@@ -395,10 +400,13 @@
395400
<Compile Include="UI\About\AboutDialog.Designer.cs">
396401
<DependentUpon>AboutDialog.cs</DependentUpon>
397402
</Compile>
403+
<Compile Include="UI\CodeExplorer\Commands\AddTestModuleWithStubsCommand.cs" />
398404
<Compile Include="UI\CodeExplorer\Commands\CodeExplorerCommandAttribute.cs" />
399405
<Compile Include="UI\CodeExplorer\Commands\CommitCommand.cs" />
400406
<Compile Include="UI\CodeExplorer\Commands\AddUserFormCommand.cs" />
401407
<Compile Include="UI\CodeExplorer\Commands\CopyResultsCommand.cs" />
408+
<Compile Include="UI\CodeExplorer\Converters\StringHasNoValueToVisibilityConverter.cs" />
409+
<Compile Include="UI\CodeExplorer\Converters\StringHasValueToVisibilityConverter.cs" />
402410
<Compile Include="UI\Command\ExportAllCommand.cs" />
403411
<Compile Include="UI\CodeExplorer\Commands\OpenProjectPropertiesCommand.cs" />
404412
<Compile Include="UI\CodeExplorer\Commands\RenameCommand.cs" />
@@ -415,8 +423,10 @@
415423
<Compile Include="UI\CodeExplorer\Commands\AddStdModuleCommand.cs" />
416424
<Compile Include="UI\CodeExplorer\Commands\AddTestModuleCommand.cs" />
417425
<Compile Include="UI\CodeExplorer\Commands\AddComponentCommand.cs" />
426+
<Compile Include="UI\Command\FormDesignerFindAllReferencesCommand.cs" />
418427
<Compile Include="UI\Command\IndentCurrentProjectCommand.cs" />
419428
<Compile Include="UI\Command\MenuItems\CommandBars\ContextDescriptionLabelMenuItem.cs" />
429+
<Compile Include="UI\Command\MenuItems\FormDesignerFindAllReferencesCommandMenuItem.cs" />
420430
<Compile Include="UI\Command\MenuItems\IndentCurrentProjectCommandMenuItem.cs" />
421431
<Compile Include="UI\Command\MenuItems\ExportAllCommandMenuItem.cs" />
422432
<Compile Include="UI\Controls\EmptyUIRefresh.xaml.cs">
@@ -1283,6 +1293,7 @@
12831293
<Resource Include="Resources\folder-open.png" />
12841294
<Resource Include="Resources\folder.png" />
12851295
<None Include="Resources\RD-300x250-base.png" />
1296+
<Resource Include="Resources\magnifier-medium.png" />
12861297
<Content Include="Resources\Rubberduck\RD-AboutWindow.png" />
12871298
<Content Include="Resources\Rubberduck\RD-InstallBanner.bmp" />
12881299
<Content Include="Resources\Rubberduck\RD-InstallWindow.bmp" />

0 commit comments

Comments
 (0)