Skip to content

Commit 5904fa1

Browse files
committed
Clarify instancing wording notice
1 parent b927e4a commit 5904fa1

File tree

4 files changed

+11
-12
lines changed

4 files changed

+11
-12
lines changed

Rubberduck.Core/UI/Refactorings/ExtractInterface/ExtractInterfaceView.xaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,11 @@
5858
<Grid>
5959
<ComboBox ItemsSource="{Binding ClassInstances}"
6060
SelectedValue="{Binding InterfaceInstancing, Mode=TwoWay}"
61-
Visibility="{Binding IsClassInstancingMutable, Converter={StaticResource BoolToVisibility}}">
61+
Visibility="{Binding CanChooseInterfaceInstancing, Converter={StaticResource BoolToVisibility}}">
6262
</ComboBox>
63-
<Label Visibility="{Binding IsClassInstancingMutable, Converter={StaticResource BoolToHiddenVisibility}}"
64-
Content="{Resx ResxName=Rubberduck.Resources.RubberduckUI, Key=ExtractInterface_PublicInstancingMandatedByPublicClass}" />
63+
<TextBlock Visibility="{Binding CanChooseInterfaceInstancing, Converter={StaticResource BoolToHiddenVisibility}}"
64+
Text="{Resx ResxName=Rubberduck.Resources.RubberduckUI, Key=ExtractInterface_PublicInstancingMandatedByPublicClass}"
65+
TextWrapping="Wrap" />
6566
</Grid>
6667
</GroupBox>
6768

Rubberduck.Core/UI/Refactorings/ExtractInterface/ExtractInterfaceViewModel.cs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,7 @@ public bool IsValidInterfaceName
6161
}
6262
}
6363

64-
public bool IsClassInstancingMutable
65-
{
66-
get
67-
{
68-
return Model.ImplementingClassInstancing != ClassInstancing.Public;
69-
}
70-
}
64+
public bool CanChooseInterfaceInstancing => Model.ImplementingClassInstancing != ClassInstancing.Public;
7165

7266
public IEnumerable<ClassInstancing> ClassInstances => Enum.GetValues(typeof(ClassInstancing)).Cast<ClassInstancing>();
7367

Rubberduck.Resources/RubberduckUI.Designer.cs

Lines changed: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Rubberduck.Resources/RubberduckUI.resx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1829,6 +1829,8 @@ Import aborted.</value>
18291829
<value>Public</value>
18301830
</data>
18311831
<data name="ExtractInterface_PublicInstancingMandatedByPublicClass" xml:space="preserve">
1832-
<value>'Public' will be chosen. For private instancing make implementing class private also.</value>
1832+
<value>The implementing class is 'Public' mandating the interface be public as well.
1833+
If you require a 'Private' interface, change the classes instancing to private as well.
1834+
A private class can still implement a public interface.</value>
18331835
</data>
18341836
</root>

0 commit comments

Comments
 (0)