Skip to content

Commit 3934359

Browse files
committed
Pull with conflicts
2 parents 6b98421 + 2ef9bf6 commit 3934359

14 files changed

+791
-215
lines changed

RetailCoder.VBE/Inspections/ObsoleteTypeHintInspectionResult.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ private void FixTypeHintUsage(string hint, CodeModule module, Selection selectio
6767
{
6868
var line = module.Lines[selection.StartLine, 1];
6969

70-
var asTypeClause = ' ' + Tokens.As + ' ' + Declaration.TYPEHINT_TO_TYPENAME[hint];
70+
var asTypeClause = ' ' + Tokens.As + ' ' + Declaration.TypeHintToTypeName[hint];
7171

7272
string fix;
7373

RetailCoder.VBE/Rubberduck.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,7 @@
256256
<Reference Include="PresentationCore" />
257257
<Reference Include="PresentationFramework" />
258258
<Reference Include="PresentationFramework.Aero" />
259+
<Reference Include="PresentationFramework.Aero2" />
259260
<Reference Include="ReachFramework" />
260261
<Reference Include="stdole, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
261262
<EmbedInteropTypes>False</EmbedInteropTypes>
@@ -829,6 +830,7 @@
829830
</Compile>
830831
<Compile Include="UI\SourceControl\ChangesViewViewModel.cs" />
831832
<Compile Include="UI\SourceControl\CommitAction.cs" />
833+
<Compile Include="UI\SourceControl\Converters\ChangeTypesToTextConverter.cs" />
832834
<Compile Include="UI\SourceControl\Converters\CommitActionsToTextConverter.cs" />
833835
<Compile Include="UI\SourceControl\Converters\CommitActionTextToEnum.cs" />
834836
<Compile Include="UI\FileBrowserDialogFactory.cs" />

RetailCoder.VBE/UI/Command/MenuItems/RubberduckCommandBar.cs

Lines changed: 13 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
using Rubberduck.UI.Command.MenuItems.ParentMenus;
88
using Rubberduck.VBEditor;
99
using ParserState = Rubberduck.Parsing.VBA.ParserState;
10-
using NLog;
1110

1211
namespace Rubberduck.UI.Command.MenuItems
1312
{
@@ -31,7 +30,7 @@ public RubberduckCommandBar(RubberduckParserState state, VBE vbe, IShowParserErr
3130
Initialize();
3231
}
3332

34-
private void _statusButton_Click(CommandBarButton Ctrl, ref bool CancelDefault)
33+
private void _statusButton_Click(CommandBarButton ctrl, ref bool cancelDefault)
3534
{
3635
if (_state.Status == ParserState.Error)
3736
{
@@ -53,31 +52,21 @@ public void SetSelectionText(Declaration declaration)
5352
if (selection.HasValue) { SetSelectionText(selection.Value); }
5453
_selectionButton.TooltipText = _selectionButton.Caption;
5554
}
56-
else if (declaration != null && !declaration.IsBuiltIn && declaration.DeclarationType != DeclarationType.ClassModule && declaration.DeclarationType != DeclarationType.ProceduralModule)
55+
else if (declaration != null)
5756
{
57+
var typeName = declaration.HasTypeHint
58+
? Declaration.TypeHintToTypeName[declaration.TypeHint]
59+
: declaration.AsTypeName;
60+
5861
_selectionButton.Caption = string.Format("{0}|{1}: {2} ({3}{4})",
5962
declaration.QualifiedSelection.Selection,
6063
declaration.QualifiedName.QualifiedModuleName,
6164
declaration.IdentifierName,
6265
RubberduckUI.ResourceManager.GetString("DeclarationType_" + declaration.DeclarationType),
63-
string.IsNullOrEmpty(declaration.AsTypeName) ? string.Empty : ": " + declaration.AsTypeName);
64-
_selectionButton.TooltipText = string.IsNullOrEmpty(declaration.DescriptionString)
65-
? _selectionButton.Caption
66-
: declaration.DescriptionString;
67-
}
68-
else if (declaration != null)
69-
{
70-
// todo: confirm this is what we want, and then refator
71-
var selection = _vbe.ActiveCodePane.GetQualifiedSelection();
72-
if (selection.HasValue)
73-
{
74-
_selectionButton.Caption = string.Format("{0}|{1}: {2} ({3}{4})",
75-
selection.Value.Selection,
76-
declaration.QualifiedName.QualifiedModuleName,
77-
declaration.IdentifierName,
78-
RubberduckUI.ResourceManager.GetString("DeclarationType_" + declaration.DeclarationType),
79-
string.IsNullOrEmpty(declaration.AsTypeName) ? string.Empty : ": " + declaration.AsTypeName);
80-
}
66+
string.IsNullOrEmpty(declaration.AsTypeName)
67+
? string.Empty
68+
: ": " + typeName);
69+
8170
_selectionButton.TooltipText = string.IsNullOrEmpty(declaration.DescriptionString)
8271
? _selectionButton.Caption
8372
: declaration.DescriptionString;
@@ -108,15 +97,15 @@ private void OnRefresh()
10897
}
10998
}
11099

111-
public void Initialize()
100+
private void Initialize()
112101
{
113102
_commandbar = _vbe.CommandBars.Add("Rubberduck", MsoBarPosition.msoBarTop, false, true);
114103

115104
_refreshButton = (CommandBarButton)_commandbar.Controls.Add(MsoControlType.msoControlButton);
116105
ParentMenuItemBase.SetButtonImage(_refreshButton, Resources.arrow_circle_double, Resources.arrow_circle_double_mask);
117106
_refreshButton.Style = MsoButtonStyle.msoButtonIcon;
118107
_refreshButton.Tag = "Refresh";
119-
_refreshButton.TooltipText =RubberduckUI.RubberduckCommandbarRefreshButtonTooltip;
108+
_refreshButton.TooltipText = RubberduckUI.RubberduckCommandbarRefreshButtonTooltip;
120109
_refreshButton.Click += refreshButton_Click;
121110

122111
_statusButton = (CommandBarButton)_commandbar.Controls.Add(MsoControlType.msoControlButton);
@@ -132,7 +121,7 @@ public void Initialize()
132121
_commandbar.Visible = true;
133122
}
134123

135-
private void refreshButton_Click(CommandBarButton Ctrl, ref bool CancelDefault)
124+
private void refreshButton_Click(CommandBarButton ctrl, ref bool cancelDefault)
136125
{
137126
OnRefresh();
138127
}

RetailCoder.VBE/UI/RubberduckUI.Designer.cs

Lines changed: 189 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)