Skip to content

Commit e402465

Browse files
authored
Merge pull request #5559 from retailcoder/vbump251
Changes build version to 2.5.1.x
2 parents e8215e1 + f07117f commit e402465

File tree

12 files changed

+33
-21
lines changed

12 files changed

+33
-21
lines changed

Rubberduck.CodeAnalysis/Inspections/Concrete/ShadowedDeclarationInspection.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -263,15 +263,15 @@ private static bool DeclarationInAnotherComponentCanBeShadowed(Declaration origi
263263

264264
// It is not possible to directly access any declarations placed inside a Document Module. (Document Modules have DeclarationType ClassMoodule.)
265265
if (originalDeclaration.DeclarationType != DeclarationType.ClassModule &&
266-
originalDeclaration.DeclarationType != DeclarationType.Document &&
266+
originalDeclaration.DeclarationType != DeclarationType.Document &&
267267
originalDeclarationEnclosingType == ComponentType.Document)
268268
{
269269
return false;
270270
}
271271

272-
// It is not possible to directly access any declarations placed inside a User Form. (User Forms have DeclarationType ClassMoodule.)
272+
// It is not possible to directly access any declarations placed inside a User Form.
273273
if (originalDeclaration.DeclarationType != DeclarationType.ClassModule &&
274-
originalDeclaration.DeclarationType != DeclarationType.Document &&
274+
originalDeclaration.DeclarationType != DeclarationType.Document &&
275275
originalDeclarationEnclosingType == ComponentType.UserForm)
276276
{
277277
return false;
@@ -312,10 +312,10 @@ private static bool DeclarationInAnotherComponentCanBeShadowed(Declaration origi
312312
private static bool DeclarationInTheSameComponentCanBeShadowed(Declaration originalDeclaration, Declaration userDeclaration)
313313
{
314314
// Shadowing the component containing the declaration is not a problem, because it is possible to directly access declarations inside that component
315-
if (originalDeclaration.DeclarationType == DeclarationType.ProceduralModule ||
315+
if (originalDeclaration.DeclarationType == DeclarationType.ProceduralModule ||
316316
originalDeclaration.DeclarationType == DeclarationType.ClassModule ||
317317
originalDeclaration.DeclarationType == DeclarationType.Document ||
318-
userDeclaration.DeclarationType == DeclarationType.ProceduralModule ||
318+
userDeclaration.DeclarationType == DeclarationType.ProceduralModule ||
319319
userDeclaration.DeclarationType == DeclarationType.ClassModule ||
320320
userDeclaration.DeclarationType == DeclarationType.Document)
321321
{

Rubberduck.Core/Navigation/CodeExplorer/CodeExplorerComponentViewModel.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,11 @@ public CodeExplorerComponentViewModel(ICodeExplorerNode parent, Declaration decl
4949
Declaration.IsUserDefined &&
5050
Declaration.DeclarationType == DeclarationType.ClassModule &&
5151
Declaration.QualifiedName.QualifiedModuleName.ComponentType != ComponentType.Document &&
52+
Declaration.QualifiedName.QualifiedModuleName.ComponentType != ComponentType.UserForm &&
5253
Declaration.Attributes.HasPredeclaredIdAttribute(out _);
5354

5455
public bool IsTestModule => Declaration.DeclarationType == DeclarationType.ProceduralModule
55-
&& Declaration.Annotations.Any(annotation => annotation is TestModuleAnnotation);
56+
&& Declaration.Annotations.Any(annotation => annotation.Annotation is TestModuleAnnotation);
5657

5758
public override void Synchronize(ref List<Declaration> updated)
5859
{

Rubberduck.Core/Rubberduck.Core.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<ApplicationIcon>Ducky.ico</ApplicationIcon>
1414
<!-- Give a fixed version to not blow XAML generated code to smithereens -->
1515
<!-- This also fixes "Input string was not in the correct format" error message when referring to the current assembly in an XAML-Namespace -->
16-
<AssemblyVersion>2.5.0</AssemblyVersion>
16+
<AssemblyVersion>2.5.1</AssemblyVersion>
1717
</PropertyGroup>
1818
<Import Project="..\RubberduckBaseProject.csproj" />
1919
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'DebugAccess|AnyCPU'">

Rubberduck.Core/UI/CodeExplorer/CodeExplorerControl.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@
398398

399399
<TreeView x:Name="ProjectTree"
400400
Grid.Row="2"
401-
Background="{StaticResource BackgroundLightBrush}"
401+
Background="{StaticResource BackgroundWhiteBrush}"
402402
HorizontalContentAlignment="Stretch"
403403
ItemsSource="{Binding Projects}"
404404
ItemContainerStyle="{StaticResource TreeViewContainerStyle}"

Rubberduck.Core/UI/Converters/CodeExplorerNodeToIconConverter.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public class CodeExplorerNodeToIconConverter : ImageSourceConverter, IMultiValue
6262

6363
public override object Convert(object value, Type targetType, object parameter, CultureInfo culture)
6464
{
65-
if ((value as ICodeExplorerNode )?.Declaration is null)
65+
if ((value as ICodeExplorerNode)?.Declaration is null)
6666
{
6767
return NullIcon;
6868
}
@@ -93,19 +93,20 @@ public override object Convert(object value, Type targetType, object parameter,
9393
}
9494

9595
if (component.Declaration is ClassModuleDeclaration classModule &&
96-
(classModule.IsInterface || classModule.Annotations.Any(annotation => annotation is InterfaceAnnotation)))
96+
(classModule.IsInterface || classModule.Annotations.Any(annotation => annotation.Annotation is InterfaceAnnotation)))
9797
{
9898
return InterfaceIcon;
9999
}
100100

101+
var isUserForm = component.Declaration.QualifiedModuleName.ComponentType == VBEditor.SafeComWrappers.ComponentType.UserForm;
101102
return DeclarationIcons.ContainsKey(component.Declaration.DeclarationType)
102-
? DeclarationIcons[component.Declaration.DeclarationType]
103+
? DeclarationIcons[isUserForm ? DeclarationType.UserForm : component.Declaration.DeclarationType]
103104
: ExceptionIcon;
104105
default:
105106
return value is ICodeExplorerNode node &&
106107
node.Declaration != null &&
107108
DeclarationIcons.ContainsKey(node.Declaration.DeclarationType)
108-
? node.Declaration.Annotations.Any(a => a is TestMethodAnnotation)
109+
? node.Declaration.Annotations.Any(a => a.Annotation is TestMethodAnnotation)
109110
? TestMethodIcon
110111
: DeclarationIcons[node.Declaration.DeclarationType]
111112
: ExceptionIcon;

Rubberduck.Core/UI/Styles/LightBlueTheme.xaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,13 @@
3131
<Color x:Key="CaptionHyperlinkVisitedColor">#FFFF0000</Color>
3232
<Color x:Key="BackgroundDarkColor">#FFA9A9A9</Color>
3333
<Color x:Key="BackgroundLightColor">#FFF5F5F5</Color>
34+
<Color x:Key="BackgroundWhiteColor">#FFFFFFFF</Color>
3435
<Color x:Key="BackgroundSoftColor">#FFF8F8FF</Color>
3536
<Color x:Key="HeaderBackgroundDarkColor">#FFA9A9A9</Color>
3637
<Color x:Key="TabSelectionUnderlineColor">#FF0000FF</Color>
3738
<Color x:Key="GrayColor">#FF696969</Color>
38-
<Color x:Key="BlackColor">#FFFFFFFF</Color>
39-
<Color x:Key="WhiteColor">#FF000000</Color>
39+
<Color x:Key="BlackColor">#FFFFFFFF</Color> <!-- FIXME white is black... -->
40+
<Color x:Key="WhiteColor">#FF000000</Color> <!-- FIXME black is white... -->
4041
<Color x:Key="BusyIndicatorFillColor">#FF00569A</Color>
4142

4243
<Color x:Key="ToolBarButtonHoverColor">#210080FF</Color>

Rubberduck.Core/UI/ViewModelBase.cs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,13 @@ protected virtual void OnErrorsChanged(string propertyName = null)
5151

5252
public IEnumerable GetErrors(string propertyName)
5353
{
54-
return _errors.TryGetValue(propertyName, out var errorList)
55-
? errorList
56-
: null;
54+
if (propertyName != null)
55+
{
56+
return _errors.TryGetValue(propertyName, out var errorList)
57+
? errorList
58+
: null;
59+
}
60+
return null;
5761
}
5862

5963
public bool HasErrors => _errors.Any();

Rubberduck.Parsing/VBA/DeclarationCaching/DeclarationFinder.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,7 @@ private IDictionary<ClassModuleDeclaration, List<Declaration>> FindAllInterfaceM
243243
{
244244
return UserDeclarations(DeclarationType.ClassModule)
245245
.Concat(UserDeclarations(DeclarationType.Document))
246+
.Concat(UserDeclarations(DeclarationType.UserForm))
246247
.Cast<ClassModuleDeclaration>()
247248
.Where(module => module.IsInterface)
248249
.ToDictionary(

Rubberduck.Parsing/VBA/DeclarationResolving/DeclarationResolveRunnerBase.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@ private ModuleDeclaration NewModuleDeclaration(
191191
true,
192192
moduleAnnotations,
193193
moduleAttributes);
194+
194195
case ComponentType.ClassModule:
195196
return new ClassModuleDeclaration(
196197
qualifiedModuleName.QualifyMemberName(qualifiedModuleName.ComponentName),
@@ -199,14 +200,16 @@ private ModuleDeclaration NewModuleDeclaration(
199200
true,
200201
moduleAnnotations,
201202
moduleAttributes);
203+
202204
case ComponentType.Document:
203205
return new DocumentModuleDeclaration(
204206
qualifiedModuleName.QualifyMemberName(qualifiedModuleName.ComponentName),
205207
projectDeclaration,
206208
qualifiedModuleName.ComponentName,
207209
moduleAnnotations,
208210
moduleAttributes);
209-
default:
211+
212+
default: /*ComponentType.UserForm*/
210213
return new ClassModuleDeclaration(
211214
qualifiedModuleName.QualifyMemberName(qualifiedModuleName.ComponentName),
212215
projectDeclaration,

Rubberduck.Parsing/VBA/ReferenceManagement/CompilationPasses/TypeHierarchyPass.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ public void Execute(IReadOnlyCollection<QualifiedModuleName> modules)
3333
{
3434
var toRelsolveSupertypesFor = _declarationFinder.UserDeclarations(DeclarationType.ClassModule)
3535
.Concat(_declarationFinder.UserDeclarations(DeclarationType.Document))
36+
.Concat(_declarationFinder.UserDeclarations(DeclarationType.UserForm))
3637
.Where(decl => modules.Contains(decl.QualifiedName.QualifiedModuleName))
3738
.Concat(_declarationFinder.BuiltInDeclarations(DeclarationType.ClassModule));
3839
foreach (var declaration in toRelsolveSupertypesFor)

RubberduckBaseProject.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@
1717
<!-- Ignore MSB4011 warning, rationale above -->
1818
<!-- Ignore VisualStudio whining about the CodeAnalysis assembly changing (IDE1001) -->
1919
<DisabledWarnings>$(DisabledWarnings);4011;1001</DisabledWarnings>
20-
<Version Condition=" '$(Version)' == ''">2.5.0</Version>
20+
<Version Condition=" '$(Version)' == ''">2.5.1</Version>
2121
</PropertyGroup>
2222

2323
<PropertyGroup Condition=" '$(AssemblyVersion)' == '' ">
2424
<!--
2525
This assembly version specification is considered nonstandard.
2626
As such builds that do not override the assembly version generate a warning, which we ignore.
2727
-->
28-
<AssemblyVersion>2.5.0.*</AssemblyVersion>
28+
<AssemblyVersion>2.5.1.*</AssemblyVersion>
2929
<!-- Ignore CSharp compiler warning for nonstandard assembly version (CS7035) -->
3030
<!-- Ignore Linker warning for nonstandard assembly version (AL1053) -->
3131
<DisabledWarnings>$(DisabledWarnings);7035;1053</DisabledWarnings>

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: '2.5.0.{build}'
1+
version: '2.5.1.{build}'
22

33
# add nuget api to hosts file, making sure we can actually nuget restore for the build
44
hosts:

0 commit comments

Comments
 (0)