Skip to content

Commit 3a61580

Browse files
committed
Merge branch 'next' into PimpUiDispatcher
2 parents f0b05fe + 4ebeece commit 3a61580

File tree

121 files changed

+698
-17306
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

121 files changed

+698
-17306
lines changed

RetailCoder.VBE/API/VBA/ParserState.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
using Rubberduck.UI.Command.MenuItems;
1212
using Rubberduck.Parsing.Symbols;
1313
using Rubberduck.VBEditor.ComManagement;
14+
using Rubberduck.VBEditor.Events;
1415
using Rubberduck.VBEditor.SafeComWrappers.VBA;
1516

1617
namespace Rubberduck.API.VBA

RetailCoder.VBE/Navigation/CodeExplorer/CodeExplorerViewModel.cs

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,7 @@ public CodeExplorerViewModel(FolderHelper folderHelper, RubberduckParserState st
9191
}
9292

9393
PrintCommand = commands.OfType<PrintCommand>().SingleOrDefault();
94-
95-
CommitCommand = commands.OfType<CommitCommand>().SingleOrDefault();
96-
UndoCommand = commands.OfType<UndoCommand>().SingleOrDefault();
97-
94+
9895
CopyResultsCommand = commands.OfType<CopyResultsCommand>().SingleOrDefault();
9996

10097
SetNameSortCommand = new DelegateCommand(LogManager.GetCurrentClassLogger(), param =>
@@ -533,9 +530,6 @@ private void SwitchNodeState(CodeExplorerItemViewModel node, bool expandedState)
533530
public CommandBase RemoveCommand { get; }
534531

535532
public CommandBase PrintCommand { get; }
536-
537-
public CommandBase CommitCommand { get; }
538-
public CommandBase UndoCommand { get; }
539533

540534
private readonly CommandBase _externalRemoveCommand;
541535

@@ -554,9 +548,7 @@ private void ExecuteRemoveComand(object param)
554548
public Visibility ExportVisibility => CanExecuteExportAllCommand ? Visibility.Collapsed : Visibility.Visible;
555549

556550
public Visibility ExportAllVisibility => CanExecuteExportAllCommand ? Visibility.Visible : Visibility.Collapsed;
557-
558-
public bool EnableSourceControl => _generalSettings.EnableExperimentalFeatures.Any(a => a.Key == RubberduckUI.GeneralSettings_EnableSourceControl);
559-
551+
560552
public Visibility TreeViewVisibility => Projects == null || Projects.Count == 0 ? Visibility.Collapsed : Visibility.Visible;
561553

562554
public Visibility EmptyUIRefreshMessageVisibility => _isBusy ? Visibility.Hidden : Visibility.Visible;

RetailCoder.VBE/Properties/Settings.Designer.cs

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

RetailCoder.VBE/Properties/Settings.settings

Lines changed: 12 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -121,17 +121,6 @@
121121
&lt;HasAltModifier&gt;false&lt;/HasAltModifier&gt;
122122
&lt;HasCtrlModifier&gt;true&lt;/HasCtrlModifier&gt;
123123
&lt;CommandTypeName&gt;ReparseCommand&lt;/CommandTypeName&gt;
124-
&lt;/HotkeySetting&gt;</Value>
125-
</Setting>
126-
<Setting Name="DefaultHotkey_SourceControlCommand" Type="Rubberduck.Settings.HotkeySetting" Scope="Application">
127-
<Value Profile="(Default)">&lt;?xml version="1.0" encoding="utf-16"?&gt;
128-
&lt;HotkeySetting xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
129-
&lt;Key1&gt;D6&lt;/Key1&gt;
130-
&lt;IsEnabled&gt;true&lt;/IsEnabled&gt;
131-
&lt;HasShiftModifier&gt;true&lt;/HasShiftModifier&gt;
132-
&lt;HasAltModifier&gt;false&lt;/HasAltModifier&gt;
133-
&lt;HasCtrlModifier&gt;true&lt;/HasCtrlModifier&gt;
134-
&lt;CommandTypeName&gt;SourceControlCommand&lt;/CommandTypeName&gt;
135124
&lt;/HotkeySetting&gt;</Value>
136125
</Setting>
137126
<Setting Name="DefaultHotkey_TestExplorerCommand" Type="Rubberduck.Settings.HotkeySetting" Scope="Application">
@@ -156,19 +145,6 @@
156145
<Setting Name="ToDoMarker_Bug" Type="Rubberduck.Settings.ToDoMarker" Scope="Application">
157146
<Value Profile="(Default)">&lt;?xml version="1.0" encoding="utf-16"?&gt;
158147
&lt;ToDoMarker xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Text="BUG" /&gt;</Value>
159-
</Setting>
160-
<Setting Name="WindowSettings" Type="Rubberduck.Settings.WindowSettings" Scope="Application">
161-
<Value Profile="(Default)">&lt;?xml version="1.0" encoding="utf-16"?&gt;
162-
&lt;WindowSettings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
163-
&lt;CodeExplorerVisibleOnStartup&gt;false&lt;/CodeExplorerVisibleOnStartup&gt;
164-
&lt;CodeInspectionsVisibleOnStartup&gt;false&lt;/CodeInspectionsVisibleOnStartup&gt;
165-
&lt;SourceControlVisibleOnStartup&gt;false&lt;/SourceControlVisibleOnStartup&gt;
166-
&lt;TestExplorerVisibleOnStartup&gt;false&lt;/TestExplorerVisibleOnStartup&gt;
167-
&lt;TodoExplorerVisibleOnStartup&gt;false&lt;/TodoExplorerVisibleOnStartup&gt;
168-
&lt;CodeExplorer_SortByName&gt;true&lt;/CodeExplorer_SortByName&gt;
169-
&lt;CodeExplorer_SortByCodeOrder&gt;false&lt;/CodeExplorer_SortByCodeOrder&gt;
170-
&lt;CodeExplorer_GroupByType&gt;false&lt;/CodeExplorer_GroupByType&gt;
171-
&lt;/WindowSettings&gt;</Value>
172148
</Setting>
173149
<Setting Name="UnitTestSettings" Type="Rubberduck.Settings.UnitTestSettings" Scope="Application">
174150
<Value Profile="(Default)">&lt;?xml version="1.0" encoding="utf-16"?&gt;
@@ -267,5 +243,17 @@
267243
&lt;RunInspectionsOnSuccessfulParse&gt;true&lt;/RunInspectionsOnSuccessfulParse&gt;
268244
&lt;/CodeInspectionSettings&gt;</Value>
269245
</Setting>
246+
<Setting Name="WindowSettings" Type="Rubberduck.Settings.WindowSettings" Scope="Application">
247+
<Value Profile="(Default)">&lt;?xml version="1.0" encoding="utf-16"?&gt;
248+
&lt;WindowSettings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
249+
&lt;CodeExplorerVisibleOnStartup&gt;false&lt;/CodeExplorerVisibleOnStartup&gt;
250+
&lt;CodeInspectionsVisibleOnStartup&gt;false&lt;/CodeInspectionsVisibleOnStartup&gt;
251+
&lt;TestExplorerVisibleOnStartup&gt;false&lt;/TestExplorerVisibleOnStartup&gt;
252+
&lt;TodoExplorerVisibleOnStartup&gt;false&lt;/TodoExplorerVisibleOnStartup&gt;
253+
&lt;CodeExplorer_SortByName&gt;true&lt;/CodeExplorer_SortByName&gt;
254+
&lt;CodeExplorer_SortByCodeOrder&gt;false&lt;/CodeExplorer_SortByCodeOrder&gt;
255+
&lt;CodeExplorer_GroupByType&gt;false&lt;/CodeExplorer_GroupByType&gt;
256+
&lt;/WindowSettings&gt;</Value>
257+
</Setting>
270258
</Settings>
271259
</SettingsFile>

RetailCoder.VBE/Root/RubberduckIoCInstaller.cs

Lines changed: 3 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
using Rubberduck.Settings;
2424
using Rubberduck.SettingsProvider;
2525
using Rubberduck.SmartIndenter;
26-
using Rubberduck.SourceControl;
2726
using Rubberduck.UI;
2827
using Rubberduck.UI.CodeExplorer;
2928
using Rubberduck.UI.CodeExplorer.Commands;
@@ -36,7 +35,6 @@
3635
using Rubberduck.UI.Inspections;
3736
using Rubberduck.UI.Refactorings;
3837
using Rubberduck.UI.Refactorings.Rename;
39-
using Rubberduck.UI.SourceControl;
4038
using Rubberduck.UI.ToDoItems;
4139
using Rubberduck.UI.UnitTesting;
4240
using Rubberduck.UnitTesting;
@@ -96,11 +94,6 @@ public void Install(IWindsorContainer container, IConfigurationStore store)
9694
container.Register(Component.For<ISelectionChangeService>()
9795
.ImplementedBy<SelectionChangeService>()
9896
.LifestyleSingleton());
99-
container.Register(Component.For<ISourceControlProvider>()
100-
.ImplementedBy<GitProvider>()
101-
.LifestyleTransient());
102-
//container.Register(Component.For<GitProvider>()
103-
// .LifestyleSingleton());
10497
container.Register(Component.For<IOperatingSystem>()
10598
.ImplementedBy<WindowsOperatingSystem>()
10699
.LifestyleSingleton());
@@ -122,9 +115,7 @@ public void Install(IWindsorContainer container, IConfigurationStore store)
122115
.LifestyleSingleton());
123116
container.Register(Component.For<SearchResultPresenterInstanceManager>()
124117
.LifestyleSingleton());
125-
126-
RegisterSourceControlControls(container);
127-
118+
128119
RegisterDockablePresenters(container);
129120
RegisterDockableUserControls(container);
130121

@@ -182,13 +173,6 @@ private void RegisterConfiguration(IWindsorContainer container, Assembly[] assem
182173
container.Register(Component.For<IConfigProvider<IndenterSettings>>()
183174
.ImplementedBy<IndenterConfigProvider>()
184175
.LifestyleSingleton());
185-
container.Register(Component.For<IConfigProvider<SourceControlSettings>>()
186-
.ImplementedBy<SourceControlConfigProvider>()
187-
.LifestyleSingleton());
188-
189-
container.Register(Component.For<ISourceControlSettings>()
190-
.ImplementedBy<SourceControlSettings>()
191-
.LifestyleTransient());
192176
}
193177

194178
private void ApplyDefaultInterfaceConvention(IWindsorContainer container, Assembly[] assembliesToRegister)
@@ -515,11 +499,7 @@ private Type[] ToolsMenuItems()
515499
typeof(CodeMetricsCommandMenuItem),
516500
typeof(ExportAllCommandMenuItem)
517501
};
518-
519-
if (_initialSettings.EnableExperimentalFeatures.Any(a => a.Key == nameof(RubberduckUI.GeneralSettings_EnableSourceControl) && a.IsEnabled))
520-
{
521-
items.Add(typeof(SourceControlCommandMenuItem));
522-
}
502+
523503
return items.ToArray();
524504
}
525505

@@ -583,25 +563,6 @@ private void RegisterCommands(IWindsorContainer container)
583563

584564
private void RegisterCommandsWithPresenters(IWindsorContainer container)
585565
{
586-
if (_initialSettings.EnableExperimentalFeatures.Any(a => a.Key == nameof(RubberduckUI.GeneralSettings_EnableSourceControl) && a.IsEnabled))
587-
{
588-
container.Register(Component.For<CommandBase>()
589-
.ImplementedBy<SourceControlCommand>()
590-
.DependsOn(Dependency.OnComponent<IDockablePresenter, SourceControlDockablePresenter>())
591-
.LifestyleTransient()
592-
.Named(typeof(SourceControlCommand).Name));
593-
container.Register(Component.For<CommandBase>()
594-
.ImplementedBy<CommitCommand>()
595-
.DependsOn(Dependency.OnComponent<IDockablePresenter, SourceControlDockablePresenter>())
596-
.LifestyleTransient()
597-
.Named(typeof(CommitCommand).Name));
598-
container.Register(Component.For<CommandBase>()
599-
.ImplementedBy<UndoCommand>()
600-
.DependsOn(Dependency.OnComponent<IDockablePresenter, SourceControlDockablePresenter>())
601-
.LifestyleTransient()
602-
.Named(typeof(UndoCommand).Name));
603-
}
604-
605566
container.Register(Component.For<CommandBase>()
606567
.ImplementedBy<RunAllTestsCommand>()
607568
.DependsOn(Dependency.OnComponent<IDockablePresenter, TestExplorerDockablePresenter>())
@@ -661,49 +622,7 @@ private void RegisterWindowsHooks(IWindsorContainer container)
661622
.DependsOn(Dependency.OnValue<IntPtr>(mainWindowHwnd))
662623
.LifestyleSingleton());
663624
}
664-
665-
private static void RegisterSourceControlControls(IWindsorContainer container)
666-
{
667-
container.Register(Component.For<SourceControlViewViewModel>()
668-
.LifestyleSingleton());
669-
670-
container.Register(Component.For<IControlViewModel>()
671-
.ImplementedBy<ChangesPanelViewModel>()
672-
.Named(nameof(ChangesPanelViewModel))
673-
.LifestyleTransient());
674-
container.Register(Component.For<IControlView>()
675-
.ImplementedBy<ChangesView>()
676-
.DependsOn(Dependency.OnComponent<IControlViewModel, ChangesPanelViewModel>())
677-
.LifestyleTransient());
678-
679-
container.Register(Component.For<IControlViewModel>()
680-
.ImplementedBy<BranchesPanelViewModel>()
681-
.Named(nameof(BranchesPanelViewModel))
682-
.LifestyleTransient());
683-
container.Register(Component.For<IControlView>()
684-
.ImplementedBy<BranchesView>()
685-
.DependsOn(Dependency.OnComponent<IControlViewModel, BranchesPanelViewModel>())
686-
.LifestyleTransient());
687-
688-
container.Register(Component.For<IControlViewModel>()
689-
.ImplementedBy<UnsyncedCommitsPanelViewModel>()
690-
.Named(nameof(UnsyncedCommitsPanelViewModel))
691-
.LifestyleTransient());
692-
container.Register(Component.For<IControlView>()
693-
.ImplementedBy<UnsyncedCommitsView>()
694-
.DependsOn(Dependency.OnComponent<IControlViewModel, UnsyncedCommitsPanelViewModel>())
695-
.LifestyleTransient());
696-
697-
container.Register(Component.For<IControlViewModel>()
698-
.ImplementedBy<SettingsPanelViewModel>()
699-
.Named(nameof(SettingsPanelViewModel))
700-
.LifestyleTransient());
701-
container.Register(Component.For<IControlView>()
702-
.ImplementedBy<SettingsView>()
703-
.DependsOn(Dependency.OnComponent<IControlViewModel, SettingsPanelViewModel>())
704-
.LifestyleTransient());
705-
}
706-
625+
707626
private static void RegisterDockableUserControls(IWindsorContainer container)
708627
{
709628
container.Register(Classes.FromThisAssembly()
@@ -713,9 +632,6 @@ private static void RegisterDockableUserControls(IWindsorContainer container)
713632

714633
private static void RegisterDockablePresenters(IWindsorContainer container)
715634
{
716-
container.Register(Component.For<IDockablePresenter>()
717-
.ImplementedBy<SourceControlDockablePresenter>()
718-
.LifestyleSingleton());
719635
container.Register(Component.For<IDockablePresenter>()
720636
.ImplementedBy<TestExplorerDockablePresenter>()
721637
.LifestyleSingleton());

0 commit comments

Comments
 (0)