Skip to content

Commit 425b732

Browse files
committed
Merge branch 'rdnext' into next
2 parents eeb205f + 6452b1b commit 425b732

32 files changed

+1814
-349
lines changed

RetailCoder.VBE/Refactorings/EncapsulateField/EncapsulateFieldRefactoring.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ private string GetPropertyText()
231231
(_model.ImplementSetSetterType ? setterText : string.Empty)).TrimEnd() + Environment.NewLine;
232232

233233
var propertyTextLines = propertyText.Split(new[] {Environment.NewLine}, StringSplitOptions.None);
234-
return string.Join(Environment.NewLine, _indenter.Indent(propertyTextLines, "test", false));
234+
return string.Join(Environment.NewLine, _indenter.Indent(propertyTextLines, "test"));
235235
}
236236
}
237237
}

RetailCoder.VBE/Refactorings/ExtractMethod/ExtractMethodPresenter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ private void GeneratePreview(IExtractMethodModel extractMethodModel,IExtractMeth
8585
*/
8686
var extractedMethod = extractMethodProc.createProc(extractMethodModel);
8787
var code = extractedMethod.Split(new[]{Environment.NewLine}, StringSplitOptions.RemoveEmptyEntries);
88-
code = _indenter.Indent(code, "Preview", false).ToArray();
88+
code = _indenter.Indent(code, "Preview").ToArray();
8989
_view.Preview = string.Join(Environment.NewLine, code);
9090
}
9191
}

RetailCoder.VBE/UI/Refactorings/EncapsulateFieldDialog.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ private string GetPropertyText()
164164
(MustImplementSetSetterType ? setterText : string.Empty);
165165

166166
var propertyTextLines = propertyText.Split(new[] { Environment.NewLine }, StringSplitOptions.None);
167-
return string.Join(Environment.NewLine, _indenter.Indent(propertyTextLines, "test", false));
167+
return string.Join(Environment.NewLine, _indenter.Indent(propertyTextLines, "test"));
168168
}
169169

170170
private void ValidatePropertyName()

RetailCoder.VBE/UI/RubberduckUI.Designer.cs

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

RetailCoder.VBE/UI/RubberduckUI.de.resx

Lines changed: 52 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?xml version="1.0" encoding="utf-8"?>
1+
<?xml version="1.0" encoding="UTF-8"?>
22
<root>
33
<!--
44
Microsoft ResX Schema
@@ -59,7 +59,7 @@
5959
: using a System.ComponentModel.TypeConverter
6060
: and then encoded with base64 encoding.
6161
-->
62-
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
62+
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" id="root">
6363
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
6464
<xsd:element name="root" msdata:IsDataSet="true">
6565
<xsd:complexType>
@@ -667,7 +667,8 @@ Warnung: Alle eigenen Einstellungen gehen dabei verloren. Die Originaldatei wird
667667
<value>Einstellungen auf Standardkonfiguration zurücksetzen?</value>
668668
</data>
669669
<data name="RenameDialog_ConflictingNames" xml:space="preserve">
670-
<value>Das Umbenenen zu '{0}' wird einen Konflikt mit '{1}' auslösen. Wollen Sie fortfahren?</value>
670+
<value>Das Umbenenen zu '{0}' wird einen Konflikt mit '{1}' auslösen.'
671+
Wollen Sie trotzdem fortfahren?</value>
671672
</data>
672673
<data name="Rename_DeclarationType" xml:space="preserve">
673674
<value>{0} Umbenennen</value>
@@ -1686,64 +1687,91 @@ Allen Sternguckern, Likern &amp; Followern, für das warme Kribbeln
16861687
<data name="RubberduckFatalError" xml:space="preserve">
16871688
<value>In Rubberduck ist ein Fehler aufgetreten. Bitte speichern Sie Ihre Arbeit und starten Sie das Hostprogramm neu. Laden Sie dann Ihre Logdatei zu unserer GitHub-Seite hoch.</value>
16881689
</data>
1689-
<data name="ToolsMenu_SourceControl">
1690+
<data name="ToolsMenu_SourceControl" xml:space="preserve">
16901691
<value>Version&amp;skontrolle</value>
16911692
</data>
1692-
<data name="RegexAssistant_NoPatternError">
1693+
<data name="RegexAssistant_NoPatternError" xml:space="preserve">
16931694
<value>(kein Ausdruck gegeben)</value>
16941695
</data>
1695-
<data name="TestExplorerMenu_AddTestModule">
1696+
<data name="TestExplorerMenu_AddTestModule" xml:space="preserve">
16961697
<value>Testm&amp;odul</value>
16971698
</data>
1698-
<data name="RegexAssistant_GlobalFlag">
1699+
<data name="RegexAssistant_GlobalFlag" xml:space="preserve">
16991700
<value>Global</value>
17001701
</data>
1701-
<data name="RegexAssistant_Caption">
1702+
<data name="RegexAssistant_Caption" xml:space="preserve">
17021703
<value>Rubberduck - Regexassistent</value>
17031704
</data>
1704-
<data name="ToolsMenu">
1705+
<data name="ToolsMenu" xml:space="preserve">
17051706
<value>T&amp;ools</value>
17061707
</data>
1707-
<data name="ToolsMenu_RegexAssistant">
1708+
<data name="ToolsMenu_RegexAssistant" xml:space="preserve">
17081709
<value>Regex&amp;assistent</value>
17091710
</data>
1710-
<data name="RegexAssistant_Title">
1711+
<data name="RegexAssistant_Title" xml:space="preserve">
17111712
<value>Assistent für Reguläre Ausdrücke</value>
17121713
</data>
1713-
<data name="CodeInspectionSettings_WhitelistedIdentifiersLabel">
1714+
<data name="CodeInspectionSettings_WhitelistedIdentifiersLabel" xml:space="preserve">
17141715
<value>Explizit erlaubte Namen</value>
17151716
</data>
1716-
<data name="ToolsMenu_TodoItems">
1717+
<data name="ToolsMenu_TodoItems" xml:space="preserve">
17171718
<value>To&amp;Do Liste</value>
17181719
</data>
1719-
<data name="RegexAssistant_Instructions">
1720+
<data name="RegexAssistant_Instructions" xml:space="preserve">
17201721
<value>Einen Regulären Ausdruck zur Analyse in die Box unten eingeben.</value>
17211722
</data>
1722-
<data name="TestExplorerMenu_AddTestMethod">
1723+
<data name="TestExplorerMenu_AddTestMethod" xml:space="preserve">
17231724
<value>Test&amp;methode</value>
17241725
</data>
1725-
<data name="RegexAssistant_IgnoreCaseFlag">
1726+
<data name="RegexAssistant_IgnoreCaseFlag" xml:space="preserve">
17261727
<value>Ignoriere Groß-/Kleinschreibung</value>
17271728
</data>
1728-
<data name="HotkeyDescription_SourceControl">
1729+
<data name="HotkeyDescription_SourceControl" xml:space="preserve">
17291730
<value>Versionskontrolle</value>
17301731
</data>
1731-
<data name="TestExplorerMenu_AddExpectedErrorTestMethod">
1732+
<data name="TestExplorerMenu_AddExpectedErrorTestMethod" xml:space="preserve">
17321733
<value>Testmethode (&amp;erwartet Fehler)</value>
17331734
</data>
1734-
<data name="CodeInspectionSettings_WhitelistedIdentifiersDescription">
1735+
<data name="CodeInspectionSettings_WhitelistedIdentifiersDescription" xml:space="preserve">
17351736
<value>Diese Namen werden von der Inspektion "Nutze aussagekräftige Namen" ignoriert.</value>
17361737
</data>
1737-
<data name="CodeInspectionSettings_InspectionSeveritySettingsLabel">
1738+
<data name="CodeInspectionSettings_InspectionSeveritySettingsLabel" xml:space="preserve">
17381739
<value>Inspektionsschwere</value>
17391740
</data>
1740-
<data name="RegexAssistant_DescriptionResultsLabel">
1741+
<data name="RegexAssistant_DescriptionResultsLabel" xml:space="preserve">
17411742
<value>Beschreibung</value>
17421743
</data>
1743-
<data name="CodeExplorer_Indent">
1744+
<data name="CodeExplorer_Indent" xml:space="preserve">
17441745
<value>Einrücken</value>
17451746
</data>
1746-
<data name="RegexAssistant_RegexPatternLabel">
1747+
<data name="RegexAssistant_RegexPatternLabel" xml:space="preserve">
17471748
<value>Ausdruck</value>
17481749
</data>
1749-
</root>
1750+
<data name="IndenterSettings_IndentEnumTypeAsProcedure" xml:space="preserve">
1751+
<value>Kommentare in Enums und Typen wie in Prozeduren einrücken</value>
1752+
</data>
1753+
<data name="CodeInspectionSettings_Misc_RunInspectionsOnSuccessfulParse">
1754+
<value>Inspektionen nach erfolgreichem Parsen automatisch starten</value>
1755+
</data>
1756+
<data name="RubberduckReloadFailure_Title">
1757+
<value>Rubberduck wird nicht neu geladen</value>
1758+
</data>
1759+
<data name="GeneralSettings_ShowSplash">
1760+
<value>Ein Startlogo zu Beginn zeigen</value>
1761+
</data>
1762+
<data name="HotkeyDescription_RefactorEncapsulateField">
1763+
<value>Refactor / Feld kapseln</value>
1764+
</data>
1765+
<data name="CodeExplorer_CollapseSubnodesToolTip">
1766+
<value>Knoten und alle Kindknoten einklappen</value>
1767+
</data>
1768+
<data name="CodeInspectionSettings_Misc">
1769+
<value>Verschiedenes</value>
1770+
</data>
1771+
<data name="CodeExplorer_ExpandSubnodesToolTip">
1772+
<value>Expand node and all child nodes</value>
1773+
</data>
1774+
<data name="RubberduckReloadFailure_Message">
1775+
<value>Werkzeugfenster wurden nicht korrekt entfernt und/oder konnten nicht wieder hergestellt werden; Die VBE könnte instabil sein. Rubberduck wird beim nächsten Start der VBE normal laden.</value>
1776+
</data>
1777+
</root>

RetailCoder.VBE/UI/RubberduckUI.fr.resx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?xml version="1.0" encoding="utf-8"?>
1+
<?xml version="1.0" encoding="UTF-8"?>
22
<root>
33
<!--
44
Microsoft ResX Schema
@@ -59,7 +59,7 @@
5959
: using a System.ComponentModel.TypeConverter
6060
: and then encoded with base64 encoding.
6161
-->
62-
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
62+
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" id="root">
6363
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
6464
<xsd:element name="root" msdata:IsDataSet="true">
6565
<xsd:complexType>
@@ -1586,4 +1586,4 @@ Tous ceux qui nous ont donné une étoile ou un "like"
15861586
<data name="ReparseToolTipText" xml:space="preserve">
15871587
<value>{0}. Cliquez pour rafraîchir.</value>
15881588
</data>
1589-
</root>
1589+
</root>

RetailCoder.VBE/UI/RubberduckUI.resx

Lines changed: 47 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?xml version="1.0" encoding="utf-8"?>
1+
<?xml version="1.0" encoding="UTF-8"?>
22
<root>
33
<!--
44
Microsoft ResX Schema
@@ -59,7 +59,7 @@
5959
: using a System.ComponentModel.TypeConverter
6060
: and then encoded with base64 encoding.
6161
-->
62-
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
62+
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" id="root">
6363
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
6464
<xsd:element name="root" msdata:IsDataSet="true">
6565
<xsd:complexType>
@@ -1796,4 +1796,48 @@ All our stargazers, likers &amp; followers, for the warm fuzzies
17961796
<data name="ReparseToolTipText" xml:space="preserve">
17971797
<value>{0}. Click to refresh.</value>
17981798
</data>
1799-
</root>
1799+
<data name="IndenterSettings_IndentEnumTypeAsProcedure" xml:space="preserve">
1800+
<value>Indent comments in Enum and Type blocks like in procedures</value>
1801+
</data>
1802+
<data name="IndenterSettings_PreviewCode" xml:space="preserve">
1803+
<value>Public Enum ExampleEnum
1804+
' Enum comment.
1805+
Foo
1806+
Bar ' Member comment.
1807+
End Enum
1808+
1809+
' Example Procedure
1810+
Sub ExampleProc()
1811+
1812+
' SMART INDENTER
1813+
' Original VB6 code graciously offered to Rubberduck by Stephen Bullen &amp; Rob Bovey
1814+
' © 2016 by Rubberduck VBA.
1815+
1816+
Dim count As Integer
1817+
Static name As String
1818+
1819+
If YouLikeRubberduck Then
1820+
' Star us on GitHub http://github.com/rubberduck-vba/Rubberduck
1821+
' Follow us on Twitter @rubberduck-vba/contributors
1822+
' Visit http://rubberduckvba.com for news and updates
1823+
1824+
Select Case X
1825+
Case "A"
1826+
' If you have any comments or suggestions, _
1827+
or find valid VBA code that isn't indented correctly,
1828+
1829+
#If VBA6 Then
1830+
MsgBox "Contact contact@rubberduck-vba.com"
1831+
#End If
1832+
1833+
Case "Continued strings and parameters can be" _
1834+
&amp; "lined up for easier reading, optionally ignoring" _
1835+
&amp; "any operators (&amp;+, etc) at the start of the line."
1836+
1837+
Debug.Print "X&lt;&gt;1"
1838+
End Select 'Case X
1839+
End If 'More Tools?
1840+
1841+
End Sub</value>
1842+
</data>
1843+
</root>

RetailCoder.VBE/UI/Settings/IndenterSettings.xaml

Lines changed: 25 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@
2626
</UserControl.Resources>
2727
<Grid>
2828
<Grid.RowDefinitions>
29-
<RowDefinition />
29+
<RowDefinition Height="280" MaxHeight="280"/>
3030
<RowDefinition Height="5" />
31-
<RowDefinition Height="200" />
31+
<RowDefinition />
3232
</Grid.RowDefinitions>
3333
<ScrollViewer>
3434
<StackPanel Margin="5">
@@ -104,6 +104,21 @@
104104
<AccessText Text="{Resx ResxName=Rubberduck.UI.RubberduckUI, Key=IndenterSettings_ForceCompilerDirectivesToColumn1}"
105105
TextWrapping="WrapWithOverflow" />
106106
</CheckBox>
107+
<Label Content="{Resx ResxName=Rubberduck.UI.RubberduckUI, Key=IndenterSettings_EndOfLineCommentStyle}"
108+
FontWeight="SemiBold"
109+
HorizontalAlignment="Left" />
110+
<StackPanel Orientation="Horizontal">
111+
<ComboBox Margin="5,0,0,5"
112+
Width="210"
113+
HorizontalAlignment="Left"
114+
ItemsSource="{Binding Source={StaticResource CommentStyles}, Converter={StaticResource LocalizedEndOfLineCommentStyles}, UpdateSourceTrigger=PropertyChanged}"
115+
SelectedItem="{Binding EndOfLineCommentStyle, Mode=TwoWay, Converter={StaticResource EndOfLineCommentStyleTextToEnumValue}, UpdateSourceTrigger=PropertyChanged}" />
116+
<controls:NumberPicker Margin="0,-4,0,0"
117+
NumValue="{Binding EndOfLineCommentColumnSpaceAlignment, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
118+
Visibility="{Binding EndOfLineCommentStyle, Converter={StaticResource EndOfLineCommentStyleToVisibility}}"
119+
HorizontalAlignment="Left"
120+
MinNumber="0" />
121+
</StackPanel>
107122
</StackPanel>
108123

109124
<StackPanel Grid.Column="1">
@@ -130,6 +145,12 @@
130145
<AccessText Text="{Resx ResxName=Rubberduck.UI.RubberduckUI, Key=IndenterSettings_IndentFirstDeclarationBlock}"
131146
TextWrapping="WrapWithOverflow" />
132147
</CheckBox>
148+
<CheckBox IsChecked="{Binding IndentEnumTypeAsProcedure, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
149+
Margin="5,0,0,5"
150+
HorizontalAlignment="Left">
151+
<AccessText Text="{Resx ResxName=Rubberduck.UI.RubberduckUI, Key=IndenterSettings_IndentEnumTypeAsProcedure}"
152+
TextWrapping="WrapWithOverflow" />
153+
</CheckBox>
133154
<CheckBox IsChecked="{Binding IndentCase, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
134155
Margin="5,0,0,5"
135156
HorizontalAlignment="Left">
@@ -161,21 +182,6 @@
161182
</CheckBox>
162183
</StackPanel>
163184
</Grid>
164-
<Label Content="{Resx ResxName=Rubberduck.UI.RubberduckUI, Key=IndenterSettings_EndOfLineCommentStyle}"
165-
FontWeight="SemiBold"
166-
HorizontalAlignment="Left" />
167-
<StackPanel Orientation="Horizontal">
168-
<ComboBox Margin="5,0,0,5"
169-
Width="210"
170-
HorizontalAlignment="Left"
171-
ItemsSource="{Binding Source={StaticResource CommentStyles}, Converter={StaticResource LocalizedEndOfLineCommentStyles}, UpdateSourceTrigger=PropertyChanged}"
172-
SelectedItem="{Binding EndOfLineCommentStyle, Mode=TwoWay, Converter={StaticResource EndOfLineCommentStyleTextToEnumValue}, UpdateSourceTrigger=PropertyChanged}" />
173-
<controls:NumberPicker Margin="0,-4,0,0"
174-
NumValue="{Binding EndOfLineCommentColumnSpaceAlignment, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
175-
Visibility="{Binding EndOfLineCommentStyle, Converter={StaticResource EndOfLineCommentStyleToVisibility}}"
176-
HorizontalAlignment="Left"
177-
MinNumber="0" />
178-
</StackPanel>
179185
</StackPanel>
180186
</ScrollViewer>
181187

@@ -192,7 +198,8 @@
192198

193199
<ScrollViewer Grid.Row="2"
194200
VerticalScrollBarVisibility="Auto"
195-
HorizontalScrollBarVisibility="Auto">
201+
HorizontalScrollBarVisibility="Auto"
202+
Background="White">
196203
<TextBlock Background="White"
197204
xml:space="preserve"
198205
Margin="5,0"

0 commit comments

Comments
 (0)