rubberduck-vba / Rubberduck

@@ -9,7 +9,7 @@
Loading
9 9
             xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
10 10
             xmlns:controls="clr-namespace:Rubberduck.UI.Controls"
11 11
             xmlns:system="clr-namespace:System;assembly=mscorlib"
12 -
             mc:Ignorable="d" 
12 +
             mc:Ignorable="d"
13 13
             d:DesignHeight="380" d:DesignWidth="600"
14 14
             d:DataContext="{d:DesignInstance local:AddRemoveReferencesViewModel}">
15 15
    <UserControl.Resources>
@@ -26,7 +26,6 @@
Loading
26 26
        <local:ReferenceStatusImageSourceConverter x:Key="StatusToIcon" />
27 27
        <local:PriorityButtonVisibilityConverter x:Key="PriorityButtonVisibility" />
28 28
        <local:PriorityButtonImageSourceConverter x:Key="PriorityButtonIcon" />
29 -
        <converters:SearchImageSourceConverter x:Key="SearchToIcon" />
30 29
        <converters:BooleanToNonDimmedBrushConverter x:Key="BooleanToNonDimmed" />
31 30
        <converters:BoolToHiddenVisibilityConverter x:Key="ProjectVisibilityConverter" />
32 31
@@ -35,39 +34,6 @@
Loading
35 34
            <Setter Property="Height" Value="24" />
36 35
            <Setter Property="Padding" Value="10,0" />
37 36
        </Style>
38 -
        <Style x:Key="PlaceHolder" TargetType="{x:Type TextBox}" BasedOn="{StaticResource {x:Type TextBox}}">
39 -
            <Setter Property="Template">
40 -
                <Setter.Value>
41 -
                    <ControlTemplate TargetType="{x:Type TextBox}">
42 -
                        <Grid>
43 -
                            <TextBox Text="{Binding Path=Text,
44 -
                                                RelativeSource={RelativeSource TemplatedParent}, 
45 -
                                                Mode=TwoWay,
46 -
                                                UpdateSourceTrigger=PropertyChanged}"
47 -
                                     x:Name="textSource" 
48 -
                                     Background="Transparent" 
49 -
                                     Panel.ZIndex="2" 
50 -
                                     VerticalContentAlignment="Center" />
51 -
                            <TextBox Text="{TemplateBinding Tag}" Background="{TemplateBinding Background}" Panel.ZIndex="1">
52 -
                                <TextBox.Style>
53 -
                                    <Style TargetType="{x:Type TextBox}">
54 -
                                        <Setter Property="Foreground" Value="Transparent"/>
55 -
                                        <Setter Property="VerticalContentAlignment" Value="Center"/>
56 -
                                        <Style.Triggers>
57 -
                                            <DataTrigger Binding="{Binding Path=Text, Source={x:Reference textSource}}" Value="">
58 -
                                                <Setter Property="Foreground" Value="LightGray"/>
59 -
                                            </DataTrigger>
60 -
                                        </Style.Triggers>
61 -
                                    </Style>
62 -
                                </TextBox.Style>
63 -
                            </TextBox>
64 -
                        </Grid>
65 -
                    </ControlTemplate>
66 -
                </Setter.Value>
67 -
            </Setter>
68 -
            <Setter Property="Margin" Value="0" />
69 -
            <Setter Property="VerticalAlignment" Value="Center" />
70 -
        </Style>
71 37
        <Style TargetType="{x:Type TabItem}">
72 38
            <Setter Property="Background" Value="Transparent" />
73 39
            <Setter Property="Template">
@@ -204,32 +170,11 @@
Loading
204 170
                                BorderThickness="1" 
205 171
                                Margin="0,5" 
206 172
                                Padding="2">
207 -
                            <Grid>
208 -
                                <Grid.ColumnDefinitions>
209 -
                                    <ColumnDefinition Width="*" />
210 -
                                    <ColumnDefinition Width="20" />
211 -
                                </Grid.ColumnDefinitions>
212 -
                                <TextBox Name="SearchBox" Grid.Column="0">
213 -
                                    <TextBox.Style>
214 -
                                        <Style TargetType="{x:Type TextBox}" BasedOn="{StaticResource PlaceHolder}">
215 -
                                            <Setter Property="Height" Value="20" />
216 -
                                            <Setter Property="Width" Value="Auto" />
217 -
                                            <Setter Property="Tag" Value="{Resx ResxName=Rubberduck.Resources.RubberduckUI, Key=References_SearchPlaceholder}" />
218 -
                                            <Setter Property="Text" Value="{Binding Search, UpdateSourceTrigger=PropertyChanged}" />
219 -
                                        </Style>
220 -
                                    </TextBox.Style>
221 -
                                </TextBox>
222 -
                                <Button Name="SearchButton"  Grid.Column="1" Command="{Binding ClearSearchCommand}" 
223 -
                                        BorderBrush="{x:Static SystemColors.ControlLightBrush}"
224 -
                                        Background="Transparent"
225 -
                                        Width="20" Height="20" Padding="0" Margin="0,1">
226 -
                                    <Image VerticalAlignment="Center" HorizontalAlignment="Center" 
227 -
                                           Width="16" Height="16" Source="{Binding Search, Converter={StaticResource SearchToIcon}, UpdateSourceTrigger=PropertyChanged}" />
228 -
                                    <i:Interaction.Behaviors>
229 -
                                        <controls:FocusElementAfterClickBehavior FocusElement="{Binding ElementName=SearchBox, Mode=OneWay}"/>
230 -
                                    </i:Interaction.Behaviors>
231 -
                                </Button>
232 -
                            </Grid>
173 +
                            <controls:SearchBox x:Name="SearchBox" Grid.Column="0"
174 +
                                                Background="{x:Static SystemColors.WindowBrush}"
175 +
                                                Width="Auto"
176 +
                                                Text="{Binding Search, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
177 +
                                                Hint="{Resx ResxName=Rubberduck.Resources.RubberduckUI, Key=References_SearchPlaceholder}" />
233 178
                        </Border>
234 179
                        <Border Grid.Row="1" Grid.Column="0">
235 180
                            <ListView Name="LibrarySelect" SelectedItem="{Binding SelectedLibrary, Mode=TwoWay}" 

@@ -5,9 +5,9 @@
Loading
5 5
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
6 6
             xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
7 7
             xmlns:codeExplorer="clr-namespace:Rubberduck.Navigation.CodeExplorer"
8 -
             xmlns:controls="clr-namespace:Rubberduck.UI.Controls"
9 -
             xmlns:converters="clr-namespace:Rubberduck.UI.Converters"
10 -
             xmlns:local="clr-namespace:Rubberduck.UI.CodeExplorer"
8 +
             xmlns:controls="clr-namespace:Rubberduck.UI.Controls;assembly="
9 +
             xmlns:converters="clr-namespace:Rubberduck.UI.Converters;assembly="
10 +
             xmlns:local="clr-namespace:Rubberduck.UI.CodeExplorer;assembly="
11 11
             ResxExtension.DefaultResxName="Rubberduck.Resources.CodeExplorer.CodeExplorerUI" 
12 12
             Language="{UICulture}"
13 13
             Name="CodeExplorer"
@@ -48,7 +48,6 @@
Loading
48 48
            <converters:BoolToHiddenVisibilityConverter x:Key="BoolToHiddenVisibility" />
49 49
            <converters:BooleanToDimmedBrushConverter x:Key="BooleanToDimmed" />
50 50
            <converters:TemplateCommandParameterToTupleConverter x:Key="TemplateCommandParameterToTuple" />
51 -
            <converters:SearchImageSourceConverter x:Key="SearchToIcon" />
52 51
            <converters:InvertBoolValueConverter x:Key="NotBool" />
53 52
            <converters:CodeExplorerNodeToIconConverter x:Key="NodeToIcon" />
54 53
            <converters:AccessibilityToIconConverter x:Key="AccessibilityToIcon" />
@@ -64,37 +63,6 @@
Loading
64 63
            <SolidColorBrush x:Key="{x:Static SystemColors.HighlightTextBrushKey}" Color="Black" />
65 64
            <SolidColorBrush x:Key="{x:Static SystemColors.ControlTextBrushKey}" Color="Black" />
66 65
67 -
            <Style x:Key="PlaceHolder" TargetType="{x:Type TextBox}" BasedOn="{StaticResource {x:Type TextBox}}">
68 -
                <Setter Property="Template">
69 -
                    <Setter.Value>
70 -
                        <ControlTemplate TargetType="{x:Type TextBox}">
71 -
                            <Grid>
72 -
                                <TextBox Text="{Binding Path=Text, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
73 -
                                         x:Name="textSource" 
74 -
                                         Background="Transparent" 
75 -
                                         Panel.ZIndex="2" 
76 -
                                         VerticalContentAlignment="Center"/>
77 -
                                <TextBox Text="{TemplateBinding Tag}" Background="{TemplateBinding Background}" Panel.ZIndex="1">
78 -
                                    <TextBox.Style>
79 -
                                        <Style TargetType="{x:Type TextBox}">
80 -
                                            <Setter Property="Foreground" Value="Transparent"/>
81 -
                                            <Setter Property="VerticalContentAlignment" Value="Center"/>
82 -
                                            <Style.Triggers>
83 -
                                                <DataTrigger Binding="{Binding Path=Text, Source={x:Reference textSource}}" Value="">
84 -
                                                    <Setter Property="Foreground" Value="LightGray"/>
85 -
                                                </DataTrigger>
86 -
                                            </Style.Triggers>
87 -
                                        </Style>
88 -
                                    </TextBox.Style>
89 -
                                </TextBox>
90 -
                            </Grid>
91 -
                        </ControlTemplate>
92 -
                    </Setter.Value>
93 -
                </Setter>
94 -
                <Setter Property="Margin" Value="0" />
95 -
                <Setter Property="VerticalAlignment" Value="Center" />
96 -
            </Style>
97 -
98 66
            <CompositeCollection x:Key="AddModuleCommands">
99 67
                <MenuItem Header="{Resx ResxName=Rubberduck.Resources.CodeExplorer.CodeExplorerUI, Key=CodeExplorer_AddVBFormText}"
100 68
                                  Command="{Binding AddVBFormCommand}"
@@ -419,32 +387,13 @@
Loading
419 387
                BorderBrush="{x:Static SystemColors.ActiveBorderBrush}" 
420 388
                BorderThickness="1" 
421 389
                Padding="2">
422 -
            <Grid>
423 -
                <Grid.ColumnDefinitions>
424 -
                    <ColumnDefinition Width="*" />
425 -
                    <ColumnDefinition Width="20" />
426 -
                </Grid.ColumnDefinitions>
427 -
                <TextBox Name="SearchBox" Grid.Column="0">
428 -
                    <TextBox.Style>
429 -
                        <Style TargetType="{x:Type TextBox}" BasedOn="{StaticResource PlaceHolder}">
430 -
                            <Setter Property="Height" Value="20" />
431 -
                            <Setter Property="Width" Value="Auto" />
432 -
                            <Setter Property="Tag" Value="{Resx ResxName=Rubberduck.Resources.CodeExplorer.CodeExplorerUI, Key=CodeExplorer_SearchPlaceholder}" />
433 -
                            <Setter Property="Text" Value="{Binding Search, UpdateSourceTrigger=PropertyChanged}" />
434 -
                        </Style>
435 -
                    </TextBox.Style>
436 -
                </TextBox>
437 -
                <Button Name="SearchButton"  Grid.Column="1" Command="{Binding ClearSearchCommand}" 
438 -
                                        BorderBrush="{x:Static SystemColors.ControlLightBrush}"
439 -
                                        Background="Transparent"
440 -
                                        Width="20" Height="20" Padding="0" Margin="0,1">
441 -
                    <Image VerticalAlignment="Center" HorizontalAlignment="Center"  
442 -
                           Width="16" Height="16" Source="{Binding Search, Converter={StaticResource SearchToIcon}, UpdateSourceTrigger=PropertyChanged}" />
443 -
                    <i:Interaction.Behaviors>
444 -
                        <controls:FocusElementAfterClickBehavior FocusElement="{Binding ElementName=SearchBox, Mode=OneWay}"/>
445 -
                    </i:Interaction.Behaviors>
446 -
                </Button>
447 -
            </Grid>
390 +
            <controls:SearchBox x:Name="SearchBox"
391 +
                      Background="{x:Static SystemColors.WindowBrush}"
392 +
                      Text="{Binding Search, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
393 +
                      Hint="{Resx ResxName=Rubberduck.Resources.CodeExplorer.CodeExplorerUI,
394 +
                          Key=CodeExplorer_SearchPlaceholder}"
395 +
                      Grid.Column="0"
396 +
                      Width="Auto"/>
448 397
        </Border>
449 398
450 399
        <TreeView x:Name="ProjectTree"
Files Coverage
Rubberduck.CodeAnalysis 88.89%
Rubberduck.Core 31.82%
Rubberduck.Interaction 9.80%
Rubberduck.Main 45.91%
Rubberduck.Parsing 81.01%
Rubberduck.Refactorings 89.20%
Rubberduck.RegexAssistant 65.19%
Rubberduck.Resources 66.67%
Rubberduck.SettingsProvider 28.19%
Rubberduck.SmartIndenter 78.72%
Rubberduck.UnitTesting 68.22%
RubberduckCodeAnalysis 99.28%
Rubberduck.JunkDrawer/Output/StringExtensions.cs 87.50%
Project Totals (1068 files) 64.47%
4xa25ydmdwuenmpy
1
codecov:
2
  branch: next
3
  ci:
4
    - appveyor
5
  max_report_age: off
6
  
7
ignore:
8
  # as requested by MDoerner, because they aren't really testable
9
  - Rubberduck.VBEEditor
10
  - Rubberduck.VBEditor.*
11
  # it makes no sense to track coverage on unit-tests
12
  - RubberduckTests
13
  # xaml files are not checked for coverage
14
  # AutoGenerated files are not contributing to coverage
15
  - **/*.Designer.cs
16
    
17
coverage:
18
  round: nearest
19
  precision: 2
20
  range: 40..80 
21
  status:
22
    # don't check patch coverage
23
    patch: off
24
    project:
25
      default:
26
        target: 0 # don't force a minimum coverage
27
        # allow decrease by up to 5 %
28
        threshold: 5
29
        base: auto
30
  
31
comment:
32
  layout: "flags, diff, files"
33
  behavior: once
34
  require_changes: yes
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading