Skip to content

Commit e630de1

Browse files
committed
Remove todo priorities
1 parent d971dda commit e630de1

File tree

12 files changed

+16
-138
lines changed

12 files changed

+16
-138
lines changed

RetailCoder.VBE/Rubberduck.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -770,7 +770,6 @@
770770
<Compile Include="Inspections\OptionExplicitInspectionResult.cs" />
771771
<Compile Include="Inspections\VariableTypeNotDeclaredInspection.cs" />
772772
<Compile Include="Inspections\VariableTypeNotDeclaredInspectionResult.cs" />
773-
<Compile Include="ToDoItems\TodoPriority.cs" />
774773
<Compile Include="UI\AboutWindow.cs">
775774
<SubType>Form</SubType>
776775
</Compile>

RetailCoder.VBE/Settings/ConfigurationLoader.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,9 @@ private GeneralSettings GetDefaultGeneralSettings()
146146

147147
public ToDoMarker[] GetDefaultTodoMarkers()
148148
{
149-
var note = new ToDoMarker(RubberduckUI.TodoMarkerNote, TodoPriority.Low);
150-
var todo = new ToDoMarker(RubberduckUI.TodoMarkerTodo, TodoPriority.Medium);
151-
var bug = new ToDoMarker(RubberduckUI.TodoMarkerBug, TodoPriority.High);
149+
var note = new ToDoMarker(RubberduckUI.TodoMarkerNote);
150+
var todo = new ToDoMarker(RubberduckUI.TodoMarkerTodo);
151+
var bug = new ToDoMarker(RubberduckUI.TodoMarkerBug);
152152

153153
return new[] { note, todo, bug };
154154
}

RetailCoder.VBE/Settings/ToDoMarkers.cs

Lines changed: 3 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ namespace Rubberduck.Settings
77
{
88
public interface IToDoMarker
99
{
10-
TodoPriority Priority { get; set; }
1110
string Text { get; set; }
1211
}
1312

@@ -17,37 +16,16 @@ public class ToDoMarker : IToDoMarker
1716
//either the code can be properly case, or the XML can be, but the xml attributes must here *exactly* match the xml
1817
[XmlAttribute]
1918
public string Text { get; set; }
20-
21-
[XmlAttribute]
22-
public TodoPriority Priority { get; set; }
23-
24-
[XmlIgnore]
25-
public string PriorityLabel
26-
{
27-
get { return RubberduckUI.ResourceManager.GetString("ToDoPriority_" + Priority, RubberduckUI.Culture); }
28-
set
29-
{
30-
foreach (var priority in Enum.GetValues(typeof(TodoPriority)))
31-
{
32-
if (value == RubberduckUI.ResourceManager.GetString("ToDoPriority_" + priority, RubberduckUI.Culture))
33-
{
34-
Priority = (TodoPriority)priority;
35-
return;
36-
}
37-
}
38-
}
39-
}
40-
19+
4120
/// <summary> Default constructor is required for serialization. DO NOT USE. </summary>
4221
public ToDoMarker()
4322
{
4423
// default constructor required for serialization
4524
}
4625

47-
public ToDoMarker(string text, TodoPriority priority)
26+
public ToDoMarker(string text)
4827
{
4928
Text = text;
50-
Priority = priority;
5129
}
5230

5331
/// <summary> Convert this object into a string representation. Over-riden for easy databinding.</summary>
@@ -63,9 +41,7 @@ public override bool Equals(object obj)
6341

6442
if (other == null) { return false; }
6543

66-
// no need to check PriorityLabel as it soley relies on Priority - if one is wrong, the other has to be too
67-
return Text == other.Text &&
68-
Priority == other.Priority;
44+
return Text == other.Text;
6945
}
7046

7147
public override int GetHashCode()

RetailCoder.VBE/ToDoItems/ToDoItem.cs

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,6 @@ namespace Rubberduck.ToDoItems
1212
/// </summary>
1313
public class ToDoItem : INavigateSource
1414
{
15-
private readonly TodoPriority _priority;
16-
public TodoPriority Priority { get { return _priority; } }
17-
18-
public string PriorityLabel { get { return RubberduckUI.ResourceManager.GetString("ToDoPriority_" + Priority, RubberduckUI.Culture); } }
19-
2015
private readonly string _description;
2116
public string Description { get { return _description; } }
2217

@@ -35,14 +30,13 @@ public class ToDoItem : INavigateSource
3530
private readonly QualifiedSelection _selection;
3631
public QualifiedSelection GetSelection() { return _selection; }
3732

38-
public ToDoItem(string markerText, TodoPriority priority, CommentNode comment)
39-
: this(markerText, priority, comment.CommentText, comment.QualifiedSelection)
33+
public ToDoItem(string markerText, CommentNode comment)
34+
: this(markerText, comment.CommentText, comment.QualifiedSelection)
4035
{
4136
}
4237

43-
public ToDoItem(string markerText, TodoPriority priority, string description, QualifiedSelection qualifiedSelection)
38+
public ToDoItem(string markerText, string description, QualifiedSelection qualifiedSelection)
4439
{
45-
_priority = priority;
4640
_description = description;
4741
_selection = qualifiedSelection;
4842
_projectName = qualifiedSelection.QualifiedName.ProjectName;

RetailCoder.VBE/ToDoItems/TodoPriority.cs

Lines changed: 0 additions & 9 deletions
This file was deleted.

RetailCoder.VBE/UI/RubberduckUI.Designer.cs

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

RetailCoder.VBE/UI/RubberduckUI.resx

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -609,9 +609,6 @@ Warning: All customized settings will be lost. Your old file will be saved in '
609609
<data name="_TypeNotDeclared_" xml:space="preserve">
610610
<value>{0} '{1}' is implicitly Variant</value>
611611
</data>
612-
<data name="Priority" xml:space="preserve">
613-
<value>Priority</value>
614-
</data>
615612
<data name="Component" xml:space="preserve">
616613
<value>Component</value>
617614
</data>
@@ -801,9 +798,6 @@ Warning: All customized settings will be lost. Your old file will be saved in '
801798
<data name="Settings_Caption" xml:space="preserve">
802799
<value>Rubberduck Settings</value>
803800
</data>
804-
<data name="TodoSettings_PriorityLabel" xml:space="preserve">
805-
<value>Priority:</value>
806-
</data>
807801
<data name="TodoSettings_TokenLabel" xml:space="preserve">
808802
<value>Token Text:</value>
809803
</data>
@@ -1072,15 +1066,6 @@ Are you sure you want to proceed with this rename?</value>
10721066
<data name="SourceControl_NoRepoFound" xml:space="preserve">
10731067
<value>No repository found.</value>
10741068
</data>
1075-
<data name="TodoPriority_High" xml:space="preserve">
1076-
<value>High</value>
1077-
</data>
1078-
<data name="TodoPriority_Low" xml:space="preserve">
1079-
<value>Low</value>
1080-
</data>
1081-
<data name="TodoPriority_Medium" xml:space="preserve">
1082-
<value>Medium</value>
1083-
</data>
10841069
<data name="SourceControl_SuccessfulMerge" xml:space="preserve">
10851070
<value>Successfully Merged {0} into {1}</value>
10861071
</data>
@@ -1109,9 +1094,6 @@ Are you sure you want to proceed with this rename?</value>
11091094
<data name="TodoSettings_TextLabel" xml:space="preserve">
11101095
<value>Text:</value>
11111096
</data>
1112-
<data name="TodoSettings_Priority" xml:space="preserve">
1113-
<value>Priority</value>
1114-
</data>
11151097
<data name="TodoSettings_Text" xml:space="preserve">
11161098
<value>Text</value>
11171099
</data>

RetailCoder.VBE/UI/Settings/TodoSettings.xaml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
66
xmlns:settings="clr-namespace:Rubberduck.UI.Settings"
77
xmlns:themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero"
8-
xmlns:core="clr-namespace:System;assembly=mscorlib"
9-
xmlns:toDoItems="clr-namespace:Rubberduck.ToDoItems"
108
xmlns:converters="clr-namespace:Rubberduck.UI.Settings.Converters"
119
mc:Ignorable="d"
1210
d:DesignHeight="300" d:DesignWidth="300"
@@ -29,12 +27,6 @@
2927
<BitmapImage x:Key="AddImage" UriSource="../../Resources/plus-circle.png" />
3028
<BitmapImage x:Key="DeleteImage" UriSource="../../Resources/cross-script.png" />
3129

32-
<ObjectDataProvider x:Key="Priorities" MethodName="GetValues" ObjectType="{x:Type core:Enum}">
33-
<ObjectDataProvider.MethodParameters>
34-
<x:Type Type="toDoItems:TodoPriority"/>
35-
</ObjectDataProvider.MethodParameters>
36-
</ObjectDataProvider>
37-
3830
<Style x:Key="PrettifyRow" TargetType="{x:Type DataGridRow}">
3931
<Style.Resources>
4032
<Style TargetType="{x:Type Border}">
@@ -297,7 +289,6 @@
297289
</DataGrid.CellStyle>
298290
<DataGrid.Columns>
299291
<DataGridTextColumn Header="{Resx ResxName=Rubberduck.UI.RubberduckUI, Key=TodoSettings_TextLabel}" Width="*" Binding="{Binding Text}" />
300-
<DataGridComboBoxColumn Header="{Resx ResxName=Rubberduck.UI.RubberduckUI, Key=TodoSettings_PriorityLabel}" Width="*" ItemsSource="{Binding Source={StaticResource Priorities}}" SelectedItemBinding="{Binding Priority}" />
301292
</DataGrid.Columns>
302293
</DataGrid>
303294
</DockPanel>

RetailCoder.VBE/UI/Settings/TodoSettingsViewModel.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public ICommand AddTodoCommand
4242
}
4343
return _addTodoCommand = new DelegateCommand(_ =>
4444
{
45-
TodoSettings.Add(new ToDoMarker("PLACEHOLDER ", TodoPriority.Low));
45+
TodoSettings.Add(new ToDoMarker("PLACEHOLDER "));
4646
});
4747
}
4848
}
@@ -56,9 +56,9 @@ public ICommand DeleteTodoCommand
5656
{
5757
return _deleteTodoCommand;
5858
}
59-
return _deleteTodoCommand = new DelegateCommand(_ =>
59+
return _deleteTodoCommand = new DelegateCommand(value =>
6060
{
61-
TodoSettings.Remove(_ as ToDoMarker);
61+
TodoSettings.Remove(value as ToDoMarker);
6262

6363
// ReSharper disable once ExplicitCallerInfoArgument
6464
OnPropertyChanged("TodoSettings");

RetailCoder.VBE/UI/ToDoItems/ToDoExplorerControl.xaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,6 @@
226226
<controls:GroupingGrid ItemsSource="{Binding ToDos}"
227227
SelectedItem="{Binding SelectedToDo}">
228228
<controls:GroupingGrid.Columns>
229-
<DataGridTextColumn Header="{Resx ResxName=Rubberduck.UI.RubberduckUI, Key=Priority}" Binding="{Binding Priority}" />
230229
<DataGridTextColumn Header="{Resx ResxName=Rubberduck.UI.RubberduckUI, Key=TodoExplorer_Description}" Binding="{Binding Description}" Width="*"/>
231230
<DataGridTextColumn Header="{Resx ResxName=Rubberduck.UI.RubberduckUI, Key=ProjectName}" Binding="{Binding ProjectName}" />
232231
<DataGridTextColumn Header="{Resx ResxName=Rubberduck.UI.RubberduckUI, Key=ModuleName}" Binding="{Binding ModuleName}" />

0 commit comments

Comments
 (0)