diff --git a/Client/Rubberduck.Main/App.cs b/AddIn/Rubberduck.Main/App.cs similarity index 100% rename from Client/Rubberduck.Main/App.cs rename to AddIn/Rubberduck.Main/App.cs diff --git a/Client/Rubberduck.Main/ComClientLibrary/UI/DockableWindowHost.cs b/AddIn/Rubberduck.Main/ComClientLibrary/UI/DockableWindowHost.cs similarity index 100% rename from Client/Rubberduck.Main/ComClientLibrary/UI/DockableWindowHost.cs rename to AddIn/Rubberduck.Main/ComClientLibrary/UI/DockableWindowHost.cs diff --git a/Client/Rubberduck.Main/ComClientLibrary/UI/IOleWrapper.cs b/AddIn/Rubberduck.Main/ComClientLibrary/UI/IOleWrapper.cs similarity index 100% rename from Client/Rubberduck.Main/ComClientLibrary/UI/IOleWrapper.cs rename to AddIn/Rubberduck.Main/ComClientLibrary/UI/IOleWrapper.cs diff --git a/Client/Rubberduck.Main/Commands/AboutCommand.cs b/AddIn/Rubberduck.Main/Commands/AboutCommand.cs similarity index 100% rename from Client/Rubberduck.Main/Commands/AboutCommand.cs rename to AddIn/Rubberduck.Main/Commands/AboutCommand.cs diff --git a/Client/Rubberduck.Main/Commands/NewWorkspaceCommand.cs b/AddIn/Rubberduck.Main/Commands/NewWorkspaceCommand.cs similarity index 100% rename from Client/Rubberduck.Main/Commands/NewWorkspaceCommand.cs rename to AddIn/Rubberduck.Main/Commands/NewWorkspaceCommand.cs diff --git a/Client/Rubberduck.Main/Commands/SettingsCommand.cs b/AddIn/Rubberduck.Main/Commands/SettingsCommand.cs similarity index 100% rename from Client/Rubberduck.Main/Commands/SettingsCommand.cs rename to AddIn/Rubberduck.Main/Commands/SettingsCommand.cs diff --git a/Client/Rubberduck.Main/Commands/ShowApplicationTipsCommand.cs b/AddIn/Rubberduck.Main/Commands/ShowApplicationTipsCommand.cs similarity index 100% rename from Client/Rubberduck.Main/Commands/ShowApplicationTipsCommand.cs rename to AddIn/Rubberduck.Main/Commands/ShowApplicationTipsCommand.cs diff --git a/Client/Rubberduck.Main/Commands/ShowRubberduckEditorCommand.cs b/AddIn/Rubberduck.Main/Commands/ShowRubberduckEditorCommand.cs similarity index 100% rename from Client/Rubberduck.Main/Commands/ShowRubberduckEditorCommand.cs rename to AddIn/Rubberduck.Main/Commands/ShowRubberduckEditorCommand.cs diff --git a/Client/Rubberduck.ClientPlatform/Ducky.ico b/AddIn/Rubberduck.Main/Ducky.ico similarity index 100% rename from Client/Rubberduck.ClientPlatform/Ducky.ico rename to AddIn/Rubberduck.Main/Ducky.ico diff --git a/Client/Rubberduck.Main/Environment/RubberduckFoldersService.cs b/AddIn/Rubberduck.Main/Environment/RubberduckFoldersService.cs similarity index 100% rename from Client/Rubberduck.Main/Environment/RubberduckFoldersService.cs rename to AddIn/Rubberduck.Main/Environment/RubberduckFoldersService.cs diff --git a/Client/Rubberduck.Main/Extension.cs b/AddIn/Rubberduck.Main/Extension.cs similarity index 100% rename from Client/Rubberduck.Main/Extension.cs rename to AddIn/Rubberduck.Main/Extension.cs diff --git a/Client/Rubberduck.Main/IVBIDEAddIn.cs b/AddIn/Rubberduck.Main/IVBIDEAddIn.cs similarity index 100% rename from Client/Rubberduck.Main/IVBIDEAddIn.cs rename to AddIn/Rubberduck.Main/IVBIDEAddIn.cs diff --git a/Client/Rubberduck.Main/NLog-addin.config b/AddIn/Rubberduck.Main/NLog-addin.config similarity index 100% rename from Client/Rubberduck.Main/NLog-addin.config rename to AddIn/Rubberduck.Main/NLog-addin.config diff --git a/Client/Rubberduck.Main/NLog.dll.nlog b/AddIn/Rubberduck.Main/NLog.dll.nlog similarity index 100% rename from Client/Rubberduck.Main/NLog.dll.nlog rename to AddIn/Rubberduck.Main/NLog.dll.nlog diff --git a/Client/Rubberduck.Main/NLog.xsd b/AddIn/Rubberduck.Main/NLog.xsd similarity index 100% rename from Client/Rubberduck.Main/NLog.xsd rename to AddIn/Rubberduck.Main/NLog.xsd diff --git a/Client/Rubberduck.Main/Properties/launchSettings.json b/AddIn/Rubberduck.Main/Properties/launchSettings.json similarity index 100% rename from Client/Rubberduck.Main/Properties/launchSettings.json rename to AddIn/Rubberduck.Main/Properties/launchSettings.json diff --git a/Client/Rubberduck.Main/RPC/EditorServer/EditorClientApp.cs b/AddIn/Rubberduck.Main/RPC/EditorServer/EditorClientApp.cs similarity index 100% rename from Client/Rubberduck.Main/RPC/EditorServer/EditorClientApp.cs rename to AddIn/Rubberduck.Main/RPC/EditorServer/EditorClientApp.cs diff --git a/Client/Rubberduck.Main/RPC/EditorServer/EditorClientService.cs b/AddIn/Rubberduck.Main/RPC/EditorServer/EditorClientService.cs similarity index 100% rename from Client/Rubberduck.Main/RPC/EditorServer/EditorClientService.cs rename to AddIn/Rubberduck.Main/RPC/EditorServer/EditorClientService.cs diff --git a/Client/Rubberduck.Main/RPC/EditorServer/EditorServerProcess.cs b/AddIn/Rubberduck.Main/RPC/EditorServer/EditorServerProcess.cs similarity index 100% rename from Client/Rubberduck.Main/RPC/EditorServer/EditorServerProcess.cs rename to AddIn/Rubberduck.Main/RPC/EditorServer/EditorServerProcess.cs diff --git a/Client/Rubberduck.Main/RPC/EditorServer/EditorServerProcessService.cs b/AddIn/Rubberduck.Main/RPC/EditorServer/EditorServerProcessService.cs similarity index 100% rename from Client/Rubberduck.Main/RPC/EditorServer/EditorServerProcessService.cs rename to AddIn/Rubberduck.Main/RPC/EditorServer/EditorServerProcessService.cs diff --git a/Client/Rubberduck.Main/RPC/EditorServer/Handlers/ApplyWorkspaceEditHandler.cs b/AddIn/Rubberduck.Main/RPC/EditorServer/Handlers/ApplyWorkspaceEditHandler.cs similarity index 100% rename from Client/Rubberduck.Main/RPC/EditorServer/Handlers/ApplyWorkspaceEditHandler.cs rename to AddIn/Rubberduck.Main/RPC/EditorServer/Handlers/ApplyWorkspaceEditHandler.cs diff --git a/Client/Rubberduck.Main/RPC/EditorServer/Handlers/DocumentChangesExtensions.cs b/AddIn/Rubberduck.Main/RPC/EditorServer/Handlers/DocumentChangesExtensions.cs similarity index 100% rename from Client/Rubberduck.Main/RPC/EditorServer/Handlers/DocumentChangesExtensions.cs rename to AddIn/Rubberduck.Main/RPC/EditorServer/Handlers/DocumentChangesExtensions.cs diff --git a/Client/Rubberduck.Main/RPC/EditorServer/Handlers/WorkspaceFoldersHandler.cs b/AddIn/Rubberduck.Main/RPC/EditorServer/Handlers/WorkspaceFoldersHandler.cs similarity index 100% rename from Client/Rubberduck.Main/RPC/EditorServer/Handlers/WorkspaceFoldersHandler.cs rename to AddIn/Rubberduck.Main/RPC/EditorServer/Handlers/WorkspaceFoldersHandler.cs diff --git a/Client/Rubberduck.Main/RPC/IServerProcessService.cs b/AddIn/Rubberduck.Main/RPC/IServerProcessService.cs similarity index 100% rename from Client/Rubberduck.Main/RPC/IServerProcessService.cs rename to AddIn/Rubberduck.Main/RPC/IServerProcessService.cs diff --git a/Client/Rubberduck.Main/RPC/UpdateServer/UpdateServerProcess.cs b/AddIn/Rubberduck.Main/RPC/UpdateServer/UpdateServerProcess.cs similarity index 100% rename from Client/Rubberduck.Main/RPC/UpdateServer/UpdateServerProcess.cs rename to AddIn/Rubberduck.Main/RPC/UpdateServer/UpdateServerProcess.cs diff --git a/Client/Rubberduck.Main/Root/LogLevelService.cs b/AddIn/Rubberduck.Main/Root/LogLevelService.cs similarity index 100% rename from Client/Rubberduck.Main/Root/LogLevelService.cs rename to AddIn/Rubberduck.Main/Root/LogLevelService.cs diff --git a/Client/Rubberduck.Main/Root/ProjectInfoProvider.cs b/AddIn/Rubberduck.Main/Root/ProjectInfoProvider.cs similarity index 100% rename from Client/Rubberduck.Main/Root/ProjectInfoProvider.cs rename to AddIn/Rubberduck.Main/Root/ProjectInfoProvider.cs diff --git a/Client/Rubberduck.Main/Root/RootComWrapperFactory.cs b/AddIn/Rubberduck.Main/Root/RootComWrapperFactory.cs similarity index 100% rename from Client/Rubberduck.Main/Root/RootComWrapperFactory.cs rename to AddIn/Rubberduck.Main/Root/RootComWrapperFactory.cs diff --git a/Client/Rubberduck.Main/Root/RubberduckServicesBuilder.cs b/AddIn/Rubberduck.Main/Root/RubberduckServicesBuilder.cs similarity index 100% rename from Client/Rubberduck.Main/Root/RubberduckServicesBuilder.cs rename to AddIn/Rubberduck.Main/Root/RubberduckServicesBuilder.cs diff --git a/Client/Rubberduck.Main/Root/VbeProvider.cs b/AddIn/Rubberduck.Main/Root/VbeProvider.cs similarity index 100% rename from Client/Rubberduck.Main/Root/VbeProvider.cs rename to AddIn/Rubberduck.Main/Root/VbeProvider.cs diff --git a/Client/Rubberduck.Main/Rubberduck.Main.csproj b/AddIn/Rubberduck.Main/Rubberduck.Main.csproj similarity index 93% rename from Client/Rubberduck.Main/Rubberduck.Main.csproj rename to AddIn/Rubberduck.Main/Rubberduck.Main.csproj index cd580cde..448aeb8c 100644 --- a/Client/Rubberduck.Main/Rubberduck.Main.csproj +++ b/AddIn/Rubberduck.Main/Rubberduck.Main.csproj @@ -32,6 +32,12 @@ + + + {4ccd023c-a503-4bc7-9e9a-a509b4a16d41} + Rubberduck.VBEditor.VBA + + @@ -42,16 +48,7 @@ {ED65BAAD-743D-4144-AEE2-8D956E6DA599} Rubberduck.Resources - - - {4ccd023c-a503-4bc7-9e9a-a509b4a16d41} - Rubberduck.VBEditor.VBA - - - {030FDE59-C347-4B81-AB80-5B4B80B757A0} - Rubberduck.VBEditor - False - + diff --git a/Client/Rubberduck.Main/RubberduckAddIn.cs b/AddIn/Rubberduck.Main/RubberduckAddIn.cs similarity index 100% rename from Client/Rubberduck.Main/RubberduckAddIn.cs rename to AddIn/Rubberduck.Main/RubberduckAddIn.cs diff --git a/Client/Rubberduck.Main/StartupFailedException.cs b/AddIn/Rubberduck.Main/StartupFailedException.cs similarity index 100% rename from Client/Rubberduck.Main/StartupFailedException.cs rename to AddIn/Rubberduck.Main/StartupFailedException.cs diff --git a/Client/Rubberduck.Unmanaged/Abstract/IVbeEvents.cs b/AddIn/Rubberduck.Unmanaged/Abstract/IVbeEvents.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/Abstract/IVbeEvents.cs rename to AddIn/Rubberduck.Unmanaged/Abstract/IVbeEvents.cs diff --git a/Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/IComCollection.cs b/AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/IComCollection.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/IComCollection.cs rename to AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/IComCollection.cs diff --git a/Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/IComIndexedProperty.cs b/AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/IComIndexedProperty.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/IComIndexedProperty.cs rename to AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/IComIndexedProperty.cs diff --git a/Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/IEventSource.cs b/AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/IEventSource.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/IEventSource.cs rename to AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/IEventSource.cs diff --git a/Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/ISafeComWrapper.cs b/AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/ISafeComWrapper.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/ISafeComWrapper.cs rename to AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/ISafeComWrapper.cs diff --git a/Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/ISafeEventedComWrapper.cs b/AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/ISafeEventedComWrapper.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/ISafeEventedComWrapper.cs rename to AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/ISafeEventedComWrapper.cs diff --git a/Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/Office/CommandBarButtonClickEventArgs.cs b/AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/Office/CommandBarButtonClickEventArgs.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/Office/CommandBarButtonClickEventArgs.cs rename to AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/Office/CommandBarButtonClickEventArgs.cs diff --git a/Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/Office/CommandBarControlCaptionGuard.cs b/AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/Office/CommandBarControlCaptionGuard.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/Office/CommandBarControlCaptionGuard.cs rename to AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/Office/CommandBarControlCaptionGuard.cs diff --git a/Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/Office/Enums/ButtonState.cs b/AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/Office/Enums/ButtonState.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/Office/Enums/ButtonState.cs rename to AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/Office/Enums/ButtonState.cs diff --git a/Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/Office/Enums/ButtonStyle.cs b/AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/Office/Enums/ButtonStyle.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/Office/Enums/ButtonStyle.cs rename to AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/Office/Enums/ButtonStyle.cs diff --git a/Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/Office/Enums/CommandBarPosition.cs b/AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/Office/Enums/CommandBarPosition.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/Office/Enums/CommandBarPosition.cs rename to AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/Office/Enums/CommandBarPosition.cs diff --git a/Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/Office/Enums/CommandBarType.cs b/AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/Office/Enums/CommandBarType.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/Office/Enums/CommandBarType.cs rename to AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/Office/Enums/CommandBarType.cs diff --git a/Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/Office/Enums/ControlType.cs b/AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/Office/Enums/ControlType.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/Office/Enums/ControlType.cs rename to AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/Office/Enums/ControlType.cs diff --git a/Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/Office/ICommandBar.cs b/AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/Office/ICommandBar.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/Office/ICommandBar.cs rename to AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/Office/ICommandBar.cs diff --git a/Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/Office/ICommandBarButton.cs b/AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/Office/ICommandBarButton.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/Office/ICommandBarButton.cs rename to AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/Office/ICommandBarButton.cs diff --git a/Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/Office/ICommandBarControl.cs b/AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/Office/ICommandBarControl.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/Office/ICommandBarControl.cs rename to AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/Office/ICommandBarControl.cs diff --git a/Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/Office/ICommandBarControls.cs b/AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/Office/ICommandBarControls.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/Office/ICommandBarControls.cs rename to AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/Office/ICommandBarControls.cs diff --git a/Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/Office/ICommandBarPopup.cs b/AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/Office/ICommandBarPopup.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/Office/ICommandBarPopup.cs rename to AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/Office/ICommandBarPopup.cs diff --git a/Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/Office/ICommandBars.cs b/AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/Office/ICommandBars.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/Office/ICommandBars.cs rename to AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/Office/ICommandBars.cs diff --git a/Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/Enums/CodePaneView.cs b/AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/Enums/CodePaneView.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/Enums/CodePaneView.cs rename to AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/Enums/CodePaneView.cs diff --git a/Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/Enums/EnvironmentMode.cs b/AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/Enums/EnvironmentMode.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/Enums/EnvironmentMode.cs rename to AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/Enums/EnvironmentMode.cs diff --git a/Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/Enums/MSAccessComponentType.cs b/AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/Enums/MSAccessComponentType.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/Enums/MSAccessComponentType.cs rename to AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/Enums/MSAccessComponentType.cs diff --git a/Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/Enums/ProcKind.cs b/AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/Enums/ProcKind.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/Enums/ProcKind.cs rename to AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/Enums/ProcKind.cs diff --git a/Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/Enums/ProjectProtection.cs b/AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/Enums/ProjectProtection.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/Enums/ProjectProtection.cs rename to AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/Enums/ProjectProtection.cs diff --git a/Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/Enums/ProjectType.cs b/AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/Enums/ProjectType.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/Enums/ProjectType.cs rename to AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/Enums/ProjectType.cs diff --git a/Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/Enums/ProjectTypes.cs b/AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/Enums/ProjectTypes.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/Enums/ProjectTypes.cs rename to AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/Enums/ProjectTypes.cs diff --git a/Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/Enums/ReferenceKind.cs b/AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/Enums/ReferenceKind.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/Enums/ReferenceKind.cs rename to AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/Enums/ReferenceKind.cs diff --git a/Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/Enums/VBEKind.cs b/AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/Enums/VBEKind.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/Enums/VBEKind.cs rename to AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/Enums/VBEKind.cs diff --git a/Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/Enums/WindowKind.cs b/AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/Enums/WindowKind.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/Enums/WindowKind.cs rename to AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/Enums/WindowKind.cs diff --git a/Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/Enums/WindowState.cs b/AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/Enums/WindowState.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/Enums/WindowState.cs rename to AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/Enums/WindowState.cs diff --git a/Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/HostAutoMacro.cs b/AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/HostAutoMacro.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/HostAutoMacro.cs rename to AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/HostAutoMacro.cs diff --git a/Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/HostDocument.cs b/AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/HostDocument.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/HostDocument.cs rename to AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/HostDocument.cs diff --git a/Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/IAddIn.cs b/AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/IAddIn.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/IAddIn.cs rename to AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/IAddIn.cs diff --git a/Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/IAddIns.cs b/AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/IAddIns.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/IAddIns.cs rename to AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/IAddIns.cs diff --git a/Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/IApplication.cs b/AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/IApplication.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/IApplication.cs rename to AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/IApplication.cs diff --git a/Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/ICodeModule.cs b/AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/ICodeModule.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/ICodeModule.cs rename to AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/ICodeModule.cs diff --git a/Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/ICodePane.cs b/AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/ICodePane.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/ICodePane.cs rename to AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/ICodePane.cs diff --git a/Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/ICodePanes.cs b/AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/ICodePanes.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/ICodePanes.cs rename to AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/ICodePanes.cs diff --git a/Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/ICommandBarButtonEvents.cs b/AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/ICommandBarButtonEvents.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/ICommandBarButtonEvents.cs rename to AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/ICommandBarButtonEvents.cs diff --git a/Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/ICommandBarEvents.cs b/AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/ICommandBarEvents.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/ICommandBarEvents.cs rename to AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/ICommandBarEvents.cs diff --git a/Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/IControl.cs b/AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/IControl.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/IControl.cs rename to AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/IControl.cs diff --git a/Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/IControls.cs b/AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/IControls.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/IControls.cs rename to AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/IControls.cs diff --git a/Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/IEvents.cs b/AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/IEvents.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/IEvents.cs rename to AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/IEvents.cs diff --git a/Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/IHostApplication.cs b/AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/IHostApplication.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/IHostApplication.cs rename to AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/IHostApplication.cs diff --git a/Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/ILinkedWindows.cs b/AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/ILinkedWindows.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/ILinkedWindows.cs rename to AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/ILinkedWindows.cs diff --git a/Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/IProperties.cs b/AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/IProperties.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/IProperties.cs rename to AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/IProperties.cs diff --git a/Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/IProperty.cs b/AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/IProperty.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/IProperty.cs rename to AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/IProperty.cs diff --git a/Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/IReference.cs b/AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/IReference.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/IReference.cs rename to AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/IReference.cs diff --git a/Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/IReferences.cs b/AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/IReferences.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/IReferences.cs rename to AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/IReferences.cs diff --git a/Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/IUserForm.cs b/AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/IUserForm.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/IUserForm.cs rename to AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/IUserForm.cs diff --git a/Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/IVBComponent.cs b/AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/IVBComponent.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/IVBComponent.cs rename to AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/IVBComponent.cs diff --git a/Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/IVBComponents.cs b/AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/IVBComponents.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/IVBComponents.cs rename to AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/IVBComponents.cs diff --git a/Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/IVBE.cs b/AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/IVBE.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/IVBE.cs rename to AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/IVBE.cs diff --git a/Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/IVBProject.cs b/AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/IVBProject.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/IVBProject.cs rename to AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/IVBProject.cs diff --git a/Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/IVBProjects.cs b/AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/IVBProjects.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/IVBProjects.cs rename to AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/IVBProjects.cs diff --git a/Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/IWindow.cs b/AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/IWindow.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/IWindow.cs rename to AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/IWindow.cs diff --git a/Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/IWindows.cs b/AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/IWindows.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/IWindows.cs rename to AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/IWindows.cs diff --git a/Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/VBProjectExtensions.cs b/AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/VBProjectExtensions.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/VBProjectExtensions.cs rename to AddIn/Rubberduck.Unmanaged/Abstract/SafeComWrappers/VB/VBProjectExtensions.cs diff --git a/Client/Rubberduck.Unmanaged/Abstract/SourceCodeProvider/IComponentSourceCodeHandler.cs b/AddIn/Rubberduck.Unmanaged/Abstract/SourceCodeProvider/IComponentSourceCodeHandler.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/Abstract/SourceCodeProvider/IComponentSourceCodeHandler.cs rename to AddIn/Rubberduck.Unmanaged/Abstract/SourceCodeProvider/IComponentSourceCodeHandler.cs diff --git a/Client/Rubberduck.Unmanaged/Abstract/SourceCodeProvider/ISourceCodeHandler.cs b/AddIn/Rubberduck.Unmanaged/Abstract/SourceCodeProvider/ISourceCodeHandler.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/Abstract/SourceCodeProvider/ISourceCodeHandler.cs rename to AddIn/Rubberduck.Unmanaged/Abstract/SourceCodeProvider/ISourceCodeHandler.cs diff --git a/Client/Rubberduck.Unmanaged/Abstract/SourceCodeProvider/ISourceCodeProvider.cs b/AddIn/Rubberduck.Unmanaged/Abstract/SourceCodeProvider/ISourceCodeProvider.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/Abstract/SourceCodeProvider/ISourceCodeProvider.cs rename to AddIn/Rubberduck.Unmanaged/Abstract/SourceCodeProvider/ISourceCodeProvider.cs diff --git a/Client/Rubberduck.Unmanaged/Abstract/SourceCodeProvider/ITempSourceFileHandler.cs b/AddIn/Rubberduck.Unmanaged/Abstract/SourceCodeProvider/ITempSourceFileHandler.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/Abstract/SourceCodeProvider/ITempSourceFileHandler.cs rename to AddIn/Rubberduck.Unmanaged/Abstract/SourceCodeProvider/ITempSourceFileHandler.cs diff --git a/Client/Rubberduck.Unmanaged/ComMessagePumper.cs b/AddIn/Rubberduck.Unmanaged/ComMessagePumper.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/ComMessagePumper.cs rename to AddIn/Rubberduck.Unmanaged/ComMessagePumper.cs diff --git a/Client/Rubberduck.Unmanaged/ComSafeBase.cs b/AddIn/Rubberduck.Unmanaged/ComSafeBase.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/ComSafeBase.cs rename to AddIn/Rubberduck.Unmanaged/ComSafeBase.cs diff --git a/Client/Rubberduck.Unmanaged/ComSafeBaseDebug.cs b/AddIn/Rubberduck.Unmanaged/ComSafeBaseDebug.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/ComSafeBaseDebug.cs rename to AddIn/Rubberduck.Unmanaged/ComSafeBaseDebug.cs diff --git a/Client/Rubberduck.Unmanaged/ComSafeManager.cs b/AddIn/Rubberduck.Unmanaged/ComSafeManager.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/ComSafeManager.cs rename to AddIn/Rubberduck.Unmanaged/ComSafeManager.cs diff --git a/Client/Rubberduck.Unmanaged/ComWrapperEnumerator.cs b/AddIn/Rubberduck.Unmanaged/ComWrapperEnumerator.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/ComWrapperEnumerator.cs rename to AddIn/Rubberduck.Unmanaged/ComWrapperEnumerator.cs diff --git a/Client/Rubberduck.Unmanaged/CommandBarLocation.cs b/AddIn/Rubberduck.Unmanaged/CommandBarLocation.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/CommandBarLocation.cs rename to AddIn/Rubberduck.Unmanaged/CommandBarLocation.cs diff --git a/Client/Rubberduck.Unmanaged/CommandBarSite.cs b/AddIn/Rubberduck.Unmanaged/CommandBarSite.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/CommandBarSite.cs rename to AddIn/Rubberduck.Unmanaged/CommandBarSite.cs diff --git a/Client/Rubberduck.Unmanaged/DispatcherEventArgs.cs b/AddIn/Rubberduck.Unmanaged/DispatcherEventArgs.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/DispatcherEventArgs.cs rename to AddIn/Rubberduck.Unmanaged/DispatcherEventArgs.cs diff --git a/Client/Rubberduck.Unmanaged/Events/ComponentEventArgs.cs b/AddIn/Rubberduck.Unmanaged/Events/ComponentEventArgs.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/Events/ComponentEventArgs.cs rename to AddIn/Rubberduck.Unmanaged/Events/ComponentEventArgs.cs diff --git a/Client/Rubberduck.Unmanaged/Events/ComponentRenamedEventArgs.cs b/AddIn/Rubberduck.Unmanaged/Events/ComponentRenamedEventArgs.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/Events/ComponentRenamedEventArgs.cs rename to AddIn/Rubberduck.Unmanaged/Events/ComponentRenamedEventArgs.cs diff --git a/Client/Rubberduck.Unmanaged/Events/ProjectEventArgs.cs b/AddIn/Rubberduck.Unmanaged/Events/ProjectEventArgs.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/Events/ProjectEventArgs.cs rename to AddIn/Rubberduck.Unmanaged/Events/ProjectEventArgs.cs diff --git a/Client/Rubberduck.Unmanaged/Events/ProjectRenamedEventArgs.cs b/AddIn/Rubberduck.Unmanaged/Events/ProjectRenamedEventArgs.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/Events/ProjectRenamedEventArgs.cs rename to AddIn/Rubberduck.Unmanaged/Events/ProjectRenamedEventArgs.cs diff --git a/Client/Rubberduck.Unmanaged/Events/ReferenceEventArgs.cs b/AddIn/Rubberduck.Unmanaged/Events/ReferenceEventArgs.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/Events/ReferenceEventArgs.cs rename to AddIn/Rubberduck.Unmanaged/Events/ReferenceEventArgs.cs diff --git a/Client/Rubberduck.Unmanaged/Events/SubClassingWindowEventArgs.cs b/AddIn/Rubberduck.Unmanaged/Events/SubClassingWindowEventArgs.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/Events/SubClassingWindowEventArgs.cs rename to AddIn/Rubberduck.Unmanaged/Events/SubClassingWindowEventArgs.cs diff --git a/Client/Rubberduck.Unmanaged/Events/VBENativeServices.cs b/AddIn/Rubberduck.Unmanaged/Events/VBENativeServices.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/Events/VBENativeServices.cs rename to AddIn/Rubberduck.Unmanaged/Events/VBENativeServices.cs diff --git a/Client/Rubberduck.Unmanaged/Events/WindowChangedEventArgs.cs b/AddIn/Rubberduck.Unmanaged/Events/WindowChangedEventArgs.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/Events/WindowChangedEventArgs.cs rename to AddIn/Rubberduck.Unmanaged/Events/WindowChangedEventArgs.cs diff --git a/Client/Rubberduck.Unmanaged/FileSystemProvider.cs b/AddIn/Rubberduck.Unmanaged/FileSystemProvider.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/FileSystemProvider.cs rename to AddIn/Rubberduck.Unmanaged/FileSystemProvider.cs diff --git a/Client/Rubberduck.Unmanaged/HostApplicationBase.cs b/AddIn/Rubberduck.Unmanaged/HostApplicationBase.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/HostApplicationBase.cs rename to AddIn/Rubberduck.Unmanaged/HostApplicationBase.cs diff --git a/Client/Rubberduck.Unmanaged/IComSafe.cs b/AddIn/Rubberduck.Unmanaged/IComSafe.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/IComSafe.cs rename to AddIn/Rubberduck.Unmanaged/IComSafe.cs diff --git a/Client/Rubberduck.Unmanaged/IEnumVARIANT.cs b/AddIn/Rubberduck.Unmanaged/IEnumVARIANT.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/IEnumVARIANT.cs rename to AddIn/Rubberduck.Unmanaged/IEnumVARIANT.cs diff --git a/Client/Rubberduck.Unmanaged/IProjectsProvider.cs b/AddIn/Rubberduck.Unmanaged/IProjectsProvider.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/IProjectsProvider.cs rename to AddIn/Rubberduck.Unmanaged/IProjectsProvider.cs diff --git a/Client/Rubberduck.Unmanaged/IProjectsRepository.cs b/AddIn/Rubberduck.Unmanaged/IProjectsRepository.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/IProjectsRepository.cs rename to AddIn/Rubberduck.Unmanaged/IProjectsRepository.cs diff --git a/Client/Rubberduck.Unmanaged/Model/Abstract/IQualifiedModuleName.cs b/AddIn/Rubberduck.Unmanaged/Model/Abstract/IQualifiedModuleName.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/Model/Abstract/IQualifiedModuleName.cs rename to AddIn/Rubberduck.Unmanaged/Model/Abstract/IQualifiedModuleName.cs diff --git a/Client/Rubberduck.Unmanaged/Model/CodeString.cs b/AddIn/Rubberduck.Unmanaged/Model/CodeString.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/Model/CodeString.cs rename to AddIn/Rubberduck.Unmanaged/Model/CodeString.cs diff --git a/Client/Rubberduck.Unmanaged/Model/ComponentType.cs b/AddIn/Rubberduck.Unmanaged/Model/ComponentType.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/Model/ComponentType.cs rename to AddIn/Rubberduck.Unmanaged/Model/ComponentType.cs diff --git a/Client/Rubberduck.Unmanaged/Model/QualifiedMemberName.cs b/AddIn/Rubberduck.Unmanaged/Model/QualifiedMemberName.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/Model/QualifiedMemberName.cs rename to AddIn/Rubberduck.Unmanaged/Model/QualifiedMemberName.cs diff --git a/Client/Rubberduck.Unmanaged/Model/QualifiedModuleName.cs b/AddIn/Rubberduck.Unmanaged/Model/QualifiedModuleName.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/Model/QualifiedModuleName.cs rename to AddIn/Rubberduck.Unmanaged/Model/QualifiedModuleName.cs diff --git a/Client/Rubberduck.Unmanaged/Model/QualifiedModuleNameExtensions.cs b/AddIn/Rubberduck.Unmanaged/Model/QualifiedModuleNameExtensions.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/Model/QualifiedModuleNameExtensions.cs rename to AddIn/Rubberduck.Unmanaged/Model/QualifiedModuleNameExtensions.cs diff --git a/Client/Rubberduck.Unmanaged/Model/QualifiedSelection.cs b/AddIn/Rubberduck.Unmanaged/Model/QualifiedSelection.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/Model/QualifiedSelection.cs rename to AddIn/Rubberduck.Unmanaged/Model/QualifiedSelection.cs diff --git a/Client/Rubberduck.Unmanaged/Model/ReferenceInfo.cs b/AddIn/Rubberduck.Unmanaged/Model/ReferenceInfo.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/Model/ReferenceInfo.cs rename to AddIn/Rubberduck.Unmanaged/Model/ReferenceInfo.cs diff --git a/Client/Rubberduck.Unmanaged/Model/Selection.cs b/AddIn/Rubberduck.Unmanaged/Model/Selection.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/Model/Selection.cs rename to AddIn/Rubberduck.Unmanaged/Model/Selection.cs diff --git a/Client/Rubberduck.Unmanaged/NonDisposingDecorators/AddInNonDisposingDecorator.cs b/AddIn/Rubberduck.Unmanaged/NonDisposingDecorators/AddInNonDisposingDecorator.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/NonDisposingDecorators/AddInNonDisposingDecorator.cs rename to AddIn/Rubberduck.Unmanaged/NonDisposingDecorators/AddInNonDisposingDecorator.cs diff --git a/Client/Rubberduck.Unmanaged/NonDisposingDecorators/CommandBarsNonDisposingDecorator.cs b/AddIn/Rubberduck.Unmanaged/NonDisposingDecorators/CommandBarsNonDisposingDecorator.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/NonDisposingDecorators/CommandBarsNonDisposingDecorator.cs rename to AddIn/Rubberduck.Unmanaged/NonDisposingDecorators/CommandBarsNonDisposingDecorator.cs diff --git a/Client/Rubberduck.Unmanaged/NonDisposingDecorators/NonDisposingDecoratorBase.cs b/AddIn/Rubberduck.Unmanaged/NonDisposingDecorators/NonDisposingDecoratorBase.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/NonDisposingDecorators/NonDisposingDecoratorBase.cs rename to AddIn/Rubberduck.Unmanaged/NonDisposingDecorators/NonDisposingDecoratorBase.cs diff --git a/Client/Rubberduck.Unmanaged/NonDisposingDecorators/VBComponentNonDisposingDecorator.cs b/AddIn/Rubberduck.Unmanaged/NonDisposingDecorators/VBComponentNonDisposingDecorator.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/NonDisposingDecorators/VBComponentNonDisposingDecorator.cs rename to AddIn/Rubberduck.Unmanaged/NonDisposingDecorators/VBComponentNonDisposingDecorator.cs diff --git a/Client/Rubberduck.Unmanaged/NonDisposingDecorators/VBComponentsNonDisposingDecorator.cs b/AddIn/Rubberduck.Unmanaged/NonDisposingDecorators/VBComponentsNonDisposingDecorator.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/NonDisposingDecorators/VBComponentsNonDisposingDecorator.cs rename to AddIn/Rubberduck.Unmanaged/NonDisposingDecorators/VBComponentsNonDisposingDecorator.cs diff --git a/Client/Rubberduck.Unmanaged/NonDisposingDecorators/VBProjectNonDisposingDecorator.cs b/AddIn/Rubberduck.Unmanaged/NonDisposingDecorators/VBProjectNonDisposingDecorator.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/NonDisposingDecorators/VBProjectNonDisposingDecorator.cs rename to AddIn/Rubberduck.Unmanaged/NonDisposingDecorators/VBProjectNonDisposingDecorator.cs diff --git a/Client/Rubberduck.Unmanaged/NonDisposingDecorators/VBProjectsNonDisposingDecorator.cs b/AddIn/Rubberduck.Unmanaged/NonDisposingDecorators/VBProjectsNonDisposingDecorator.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/NonDisposingDecorators/VBProjectsNonDisposingDecorator.cs rename to AddIn/Rubberduck.Unmanaged/NonDisposingDecorators/VBProjectsNonDisposingDecorator.cs diff --git a/Client/Rubberduck.Unmanaged/NonDisposingDecorators/VbeNonDisposingDecorator.cs b/AddIn/Rubberduck.Unmanaged/NonDisposingDecorators/VbeNonDisposingDecorator.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/NonDisposingDecorators/VbeNonDisposingDecorator.cs rename to AddIn/Rubberduck.Unmanaged/NonDisposingDecorators/VbeNonDisposingDecorator.cs diff --git a/Client/Rubberduck.Unmanaged/ProjectsRepository.cs b/AddIn/Rubberduck.Unmanaged/ProjectsRepository.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/ProjectsRepository.cs rename to AddIn/Rubberduck.Unmanaged/ProjectsRepository.cs diff --git a/Client/Rubberduck.Unmanaged/ReferenceEqualityComparer.cs b/AddIn/Rubberduck.Unmanaged/ReferenceEqualityComparer.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/ReferenceEqualityComparer.cs rename to AddIn/Rubberduck.Unmanaged/ReferenceEqualityComparer.cs diff --git a/Client/Rubberduck.Unmanaged/Registration/RubberduckGuid.cs b/AddIn/Rubberduck.Unmanaged/Registration/RubberduckGuid.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/Registration/RubberduckGuid.cs rename to AddIn/Rubberduck.Unmanaged/Registration/RubberduckGuid.cs diff --git a/Client/Rubberduck.Unmanaged/Registration/RubberduckProgId.cs b/AddIn/Rubberduck.Unmanaged/Registration/RubberduckProgId.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/Registration/RubberduckProgId.cs rename to AddIn/Rubberduck.Unmanaged/Registration/RubberduckProgId.cs diff --git a/Client/Rubberduck.Unmanaged/Registration/WellKnownDispIds.cs b/AddIn/Rubberduck.Unmanaged/Registration/WellKnownDispIds.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/Registration/WellKnownDispIds.cs rename to AddIn/Rubberduck.Unmanaged/Registration/WellKnownDispIds.cs diff --git a/Client/Rubberduck.Unmanaged/RegistryWrapper.cs b/AddIn/Rubberduck.Unmanaged/RegistryWrapper.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/RegistryWrapper.cs rename to AddIn/Rubberduck.Unmanaged/RegistryWrapper.cs diff --git a/Client/Rubberduck.Unmanaged/Rubberduck.Unmanaged.csproj b/AddIn/Rubberduck.Unmanaged/Rubberduck.Unmanaged.csproj similarity index 100% rename from Client/Rubberduck.Unmanaged/Rubberduck.Unmanaged.csproj rename to AddIn/Rubberduck.Unmanaged/Rubberduck.Unmanaged.csproj diff --git a/Client/Rubberduck.Unmanaged/SafeComWrapper.cs b/AddIn/Rubberduck.Unmanaged/SafeComWrapper.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/SafeComWrapper.cs rename to AddIn/Rubberduck.Unmanaged/SafeComWrapper.cs diff --git a/Client/Rubberduck.Unmanaged/SafeEventedComWrapper.cs b/AddIn/Rubberduck.Unmanaged/SafeEventedComWrapper.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/SafeEventedComWrapper.cs rename to AddIn/Rubberduck.Unmanaged/SafeEventedComWrapper.cs diff --git a/Client/Rubberduck.Unmanaged/SafeIDispatchWrapper.cs b/AddIn/Rubberduck.Unmanaged/SafeIDispatchWrapper.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/SafeIDispatchWrapper.cs rename to AddIn/Rubberduck.Unmanaged/SafeIDispatchWrapper.cs diff --git a/Client/Rubberduck.Unmanaged/SafeRedirectedEventedComWrapper.cs b/AddIn/Rubberduck.Unmanaged/SafeRedirectedEventedComWrapper.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/SafeRedirectedEventedComWrapper.cs rename to AddIn/Rubberduck.Unmanaged/SafeRedirectedEventedComWrapper.cs diff --git a/Client/Rubberduck.Unmanaged/StringExtensions.cs b/AddIn/Rubberduck.Unmanaged/StringExtensions.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/StringExtensions.cs rename to AddIn/Rubberduck.Unmanaged/StringExtensions.cs diff --git a/Client/Rubberduck.Unmanaged/StrongComSafe.cs b/AddIn/Rubberduck.Unmanaged/StrongComSafe.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/StrongComSafe.cs rename to AddIn/Rubberduck.Unmanaged/StrongComSafe.cs diff --git a/Client/Rubberduck.Unmanaged/TypeLibs/Abstract/IDispatch.cs b/AddIn/Rubberduck.Unmanaged/TypeLibs/Abstract/IDispatch.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/TypeLibs/Abstract/IDispatch.cs rename to AddIn/Rubberduck.Unmanaged/TypeLibs/Abstract/IDispatch.cs diff --git a/Client/Rubberduck.Unmanaged/TypeLibs/Abstract/ITypeInfoFunction.cs b/AddIn/Rubberduck.Unmanaged/TypeLibs/Abstract/ITypeInfoFunction.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/TypeLibs/Abstract/ITypeInfoFunction.cs rename to AddIn/Rubberduck.Unmanaged/TypeLibs/Abstract/ITypeInfoFunction.cs diff --git a/Client/Rubberduck.Unmanaged/TypeLibs/Abstract/ITypeInfoFunctionCollection.cs b/AddIn/Rubberduck.Unmanaged/TypeLibs/Abstract/ITypeInfoFunctionCollection.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/TypeLibs/Abstract/ITypeInfoFunctionCollection.cs rename to AddIn/Rubberduck.Unmanaged/TypeLibs/Abstract/ITypeInfoFunctionCollection.cs diff --git a/Client/Rubberduck.Unmanaged/TypeLibs/Abstract/ITypeInfoImplementedInterfacesCollection.cs b/AddIn/Rubberduck.Unmanaged/TypeLibs/Abstract/ITypeInfoImplementedInterfacesCollection.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/TypeLibs/Abstract/ITypeInfoImplementedInterfacesCollection.cs rename to AddIn/Rubberduck.Unmanaged/TypeLibs/Abstract/ITypeInfoImplementedInterfacesCollection.cs diff --git a/Client/Rubberduck.Unmanaged/TypeLibs/Abstract/ITypeInfoInternal.cs b/AddIn/Rubberduck.Unmanaged/TypeLibs/Abstract/ITypeInfoInternal.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/TypeLibs/Abstract/ITypeInfoInternal.cs rename to AddIn/Rubberduck.Unmanaged/TypeLibs/Abstract/ITypeInfoInternal.cs diff --git a/Client/Rubberduck.Unmanaged/TypeLibs/Abstract/ITypeInfoVBEExtensions.cs b/AddIn/Rubberduck.Unmanaged/TypeLibs/Abstract/ITypeInfoVBEExtensions.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/TypeLibs/Abstract/ITypeInfoVBEExtensions.cs rename to AddIn/Rubberduck.Unmanaged/TypeLibs/Abstract/ITypeInfoVBEExtensions.cs diff --git a/Client/Rubberduck.Unmanaged/TypeLibs/Abstract/ITypeInfoVariable.cs b/AddIn/Rubberduck.Unmanaged/TypeLibs/Abstract/ITypeInfoVariable.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/TypeLibs/Abstract/ITypeInfoVariable.cs rename to AddIn/Rubberduck.Unmanaged/TypeLibs/Abstract/ITypeInfoVariable.cs diff --git a/Client/Rubberduck.Unmanaged/TypeLibs/Abstract/ITypeInfoVariablesCollection.cs b/AddIn/Rubberduck.Unmanaged/TypeLibs/Abstract/ITypeInfoVariablesCollection.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/TypeLibs/Abstract/ITypeInfoVariablesCollection.cs rename to AddIn/Rubberduck.Unmanaged/TypeLibs/Abstract/ITypeInfoVariablesCollection.cs diff --git a/Client/Rubberduck.Unmanaged/TypeLibs/Abstract/ITypeInfoWrapper.cs b/AddIn/Rubberduck.Unmanaged/TypeLibs/Abstract/ITypeInfoWrapper.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/TypeLibs/Abstract/ITypeInfoWrapper.cs rename to AddIn/Rubberduck.Unmanaged/TypeLibs/Abstract/ITypeInfoWrapper.cs diff --git a/Client/Rubberduck.Unmanaged/TypeLibs/Abstract/ITypeInfoWrapperCollection.cs b/AddIn/Rubberduck.Unmanaged/TypeLibs/Abstract/ITypeInfoWrapperCollection.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/TypeLibs/Abstract/ITypeInfoWrapperCollection.cs rename to AddIn/Rubberduck.Unmanaged/TypeLibs/Abstract/ITypeInfoWrapperCollection.cs diff --git a/Client/Rubberduck.Unmanaged/TypeLibs/Abstract/ITypeLibReference.cs b/AddIn/Rubberduck.Unmanaged/TypeLibs/Abstract/ITypeLibReference.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/TypeLibs/Abstract/ITypeLibReference.cs rename to AddIn/Rubberduck.Unmanaged/TypeLibs/Abstract/ITypeLibReference.cs diff --git a/Client/Rubberduck.Unmanaged/TypeLibs/Abstract/ITypeLibReferenceCollection.cs b/AddIn/Rubberduck.Unmanaged/TypeLibs/Abstract/ITypeLibReferenceCollection.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/TypeLibs/Abstract/ITypeLibReferenceCollection.cs rename to AddIn/Rubberduck.Unmanaged/TypeLibs/Abstract/ITypeLibReferenceCollection.cs diff --git a/Client/Rubberduck.Unmanaged/TypeLibs/Abstract/ITypeLibVBEExtensions.cs b/AddIn/Rubberduck.Unmanaged/TypeLibs/Abstract/ITypeLibVBEExtensions.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/TypeLibs/Abstract/ITypeLibVBEExtensions.cs rename to AddIn/Rubberduck.Unmanaged/TypeLibs/Abstract/ITypeLibVBEExtensions.cs diff --git a/Client/Rubberduck.Unmanaged/TypeLibs/Abstract/ITypeLibWrapper.cs b/AddIn/Rubberduck.Unmanaged/TypeLibs/Abstract/ITypeLibWrapper.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/TypeLibs/Abstract/ITypeLibWrapper.cs rename to AddIn/Rubberduck.Unmanaged/TypeLibs/Abstract/ITypeLibWrapper.cs diff --git a/Client/Rubberduck.Unmanaged/TypeLibs/Abstract/ITypeLibWrapperProvider.cs b/AddIn/Rubberduck.Unmanaged/TypeLibs/Abstract/ITypeLibWrapperProvider.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/TypeLibs/Abstract/ITypeLibWrapperProvider.cs rename to AddIn/Rubberduck.Unmanaged/TypeLibs/Abstract/ITypeLibWrapperProvider.cs diff --git a/Client/Rubberduck.Unmanaged/TypeLibs/Abstract/IVBETypeLibsAPI.cs b/AddIn/Rubberduck.Unmanaged/TypeLibs/Abstract/IVBETypeLibsAPI.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/TypeLibs/Abstract/IVBETypeLibsAPI.cs rename to AddIn/Rubberduck.Unmanaged/TypeLibs/Abstract/IVBETypeLibsAPI.cs diff --git a/Client/Rubberduck.Unmanaged/TypeLibs/DebugInternal/TypeInfoWrapperTracer.cs b/AddIn/Rubberduck.Unmanaged/TypeLibs/DebugInternal/TypeInfoWrapperTracer.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/TypeLibs/DebugInternal/TypeInfoWrapperTracer.cs rename to AddIn/Rubberduck.Unmanaged/TypeLibs/DebugInternal/TypeInfoWrapperTracer.cs diff --git a/Client/Rubberduck.Unmanaged/TypeLibs/DebugInternal/TypeLibWrapperTracer.cs b/AddIn/Rubberduck.Unmanaged/TypeLibs/DebugInternal/TypeLibWrapperTracer.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/TypeLibs/DebugInternal/TypeLibWrapperTracer.cs rename to AddIn/Rubberduck.Unmanaged/TypeLibs/DebugInternal/TypeLibWrapperTracer.cs diff --git a/Client/Rubberduck.Unmanaged/TypeLibs/Public/TypeLibWrapperProvider.cs b/AddIn/Rubberduck.Unmanaged/TypeLibs/Public/TypeLibWrapperProvider.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/TypeLibs/Public/TypeLibWrapperProvider.cs rename to AddIn/Rubberduck.Unmanaged/TypeLibs/Public/TypeLibWrapperProvider.cs diff --git a/Client/Rubberduck.Unmanaged/TypeLibs/Public/TypeLibsAPI.cs b/AddIn/Rubberduck.Unmanaged/TypeLibs/Public/TypeLibsAPI.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/TypeLibs/Public/TypeLibsAPI.cs rename to AddIn/Rubberduck.Unmanaged/TypeLibs/Public/TypeLibsAPI.cs diff --git a/Client/Rubberduck.Unmanaged/TypeLibs/TypeApiFactory.cs b/AddIn/Rubberduck.Unmanaged/TypeLibs/TypeApiFactory.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/TypeLibs/TypeApiFactory.cs rename to AddIn/Rubberduck.Unmanaged/TypeLibs/TypeApiFactory.cs diff --git a/Client/Rubberduck.Unmanaged/TypeLibs/TypeInfoConstantsCollection.cs b/AddIn/Rubberduck.Unmanaged/TypeLibs/TypeInfoConstantsCollection.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/TypeLibs/TypeInfoConstantsCollection.cs rename to AddIn/Rubberduck.Unmanaged/TypeLibs/TypeInfoConstantsCollection.cs diff --git a/Client/Rubberduck.Unmanaged/TypeLibs/TypeInfoFunction.cs b/AddIn/Rubberduck.Unmanaged/TypeLibs/TypeInfoFunction.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/TypeLibs/TypeInfoFunction.cs rename to AddIn/Rubberduck.Unmanaged/TypeLibs/TypeInfoFunction.cs diff --git a/Client/Rubberduck.Unmanaged/TypeLibs/TypeInfoFunctionCollection.cs b/AddIn/Rubberduck.Unmanaged/TypeLibs/TypeInfoFunctionCollection.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/TypeLibs/TypeInfoFunctionCollection.cs rename to AddIn/Rubberduck.Unmanaged/TypeLibs/TypeInfoFunctionCollection.cs diff --git a/Client/Rubberduck.Unmanaged/TypeLibs/TypeInfoImplementedInterfacesCollection.cs b/AddIn/Rubberduck.Unmanaged/TypeLibs/TypeInfoImplementedInterfacesCollection.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/TypeLibs/TypeInfoImplementedInterfacesCollection.cs rename to AddIn/Rubberduck.Unmanaged/TypeLibs/TypeInfoImplementedInterfacesCollection.cs diff --git a/Client/Rubberduck.Unmanaged/TypeLibs/TypeInfoVBEExtensions.cs b/AddIn/Rubberduck.Unmanaged/TypeLibs/TypeInfoVBEExtensions.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/TypeLibs/TypeInfoVBEExtensions.cs rename to AddIn/Rubberduck.Unmanaged/TypeLibs/TypeInfoVBEExtensions.cs diff --git a/Client/Rubberduck.Unmanaged/TypeLibs/TypeInfoVariable.cs b/AddIn/Rubberduck.Unmanaged/TypeLibs/TypeInfoVariable.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/TypeLibs/TypeInfoVariable.cs rename to AddIn/Rubberduck.Unmanaged/TypeLibs/TypeInfoVariable.cs diff --git a/Client/Rubberduck.Unmanaged/TypeLibs/TypeInfoVariablesCollection.cs b/AddIn/Rubberduck.Unmanaged/TypeLibs/TypeInfoVariablesCollection.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/TypeLibs/TypeInfoVariablesCollection.cs rename to AddIn/Rubberduck.Unmanaged/TypeLibs/TypeInfoVariablesCollection.cs diff --git a/Client/Rubberduck.Unmanaged/TypeLibs/TypeInfoWrapper.cs b/AddIn/Rubberduck.Unmanaged/TypeLibs/TypeInfoWrapper.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/TypeLibs/TypeInfoWrapper.cs rename to AddIn/Rubberduck.Unmanaged/TypeLibs/TypeInfoWrapper.cs diff --git a/Client/Rubberduck.Unmanaged/TypeLibs/TypeInfoWrapperCollection.cs b/AddIn/Rubberduck.Unmanaged/TypeLibs/TypeInfoWrapperCollection.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/TypeLibs/TypeInfoWrapperCollection.cs rename to AddIn/Rubberduck.Unmanaged/TypeLibs/TypeInfoWrapperCollection.cs diff --git a/Client/Rubberduck.Unmanaged/TypeLibs/TypeInfoWrapperHelpers.cs b/AddIn/Rubberduck.Unmanaged/TypeLibs/TypeInfoWrapperHelpers.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/TypeLibs/TypeInfoWrapperHelpers.cs rename to AddIn/Rubberduck.Unmanaged/TypeLibs/TypeInfoWrapperHelpers.cs diff --git a/Client/Rubberduck.Unmanaged/TypeLibs/TypeLibReference.cs b/AddIn/Rubberduck.Unmanaged/TypeLibs/TypeLibReference.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/TypeLibs/TypeLibReference.cs rename to AddIn/Rubberduck.Unmanaged/TypeLibs/TypeLibReference.cs diff --git a/Client/Rubberduck.Unmanaged/TypeLibs/TypeLibReferenceCollection.cs b/AddIn/Rubberduck.Unmanaged/TypeLibs/TypeLibReferenceCollection.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/TypeLibs/TypeLibReferenceCollection.cs rename to AddIn/Rubberduck.Unmanaged/TypeLibs/TypeLibReferenceCollection.cs diff --git a/Client/Rubberduck.Unmanaged/TypeLibs/TypeLibVBEExtensions.cs b/AddIn/Rubberduck.Unmanaged/TypeLibs/TypeLibVBEExtensions.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/TypeLibs/TypeLibVBEExtensions.cs rename to AddIn/Rubberduck.Unmanaged/TypeLibs/TypeLibVBEExtensions.cs diff --git a/Client/Rubberduck.Unmanaged/TypeLibs/TypeLibWrapper.cs b/AddIn/Rubberduck.Unmanaged/TypeLibs/TypeLibWrapper.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/TypeLibs/TypeLibWrapper.cs rename to AddIn/Rubberduck.Unmanaged/TypeLibs/TypeLibWrapper.cs diff --git a/Client/Rubberduck.Unmanaged/TypeLibs/Unmanaged/AddressableVariables.cs b/AddIn/Rubberduck.Unmanaged/TypeLibs/Unmanaged/AddressableVariables.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/TypeLibs/Unmanaged/AddressableVariables.cs rename to AddIn/Rubberduck.Unmanaged/TypeLibs/Unmanaged/AddressableVariables.cs diff --git a/Client/Rubberduck.Unmanaged/TypeLibs/Unmanaged/ComHelper.cs b/AddIn/Rubberduck.Unmanaged/TypeLibs/Unmanaged/ComHelper.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/TypeLibs/Unmanaged/ComHelper.cs rename to AddIn/Rubberduck.Unmanaged/TypeLibs/Unmanaged/ComHelper.cs diff --git a/Client/Rubberduck.Unmanaged/TypeLibs/Unmanaged/ComPointer.cs b/AddIn/Rubberduck.Unmanaged/TypeLibs/Unmanaged/ComPointer.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/TypeLibs/Unmanaged/ComPointer.cs rename to AddIn/Rubberduck.Unmanaged/TypeLibs/Unmanaged/ComPointer.cs diff --git a/Client/Rubberduck.Unmanaged/TypeLibs/Unmanaged/IDispatchHelper.cs b/AddIn/Rubberduck.Unmanaged/TypeLibs/Unmanaged/IDispatchHelper.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/TypeLibs/Unmanaged/IDispatchHelper.cs rename to AddIn/Rubberduck.Unmanaged/TypeLibs/Unmanaged/IDispatchHelper.cs diff --git a/Client/Rubberduck.Unmanaged/TypeLibs/Unmanaged/RDMarshal.cs b/AddIn/Rubberduck.Unmanaged/TypeLibs/Unmanaged/RDMarshal.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/TypeLibs/Unmanaged/RDMarshal.cs rename to AddIn/Rubberduck.Unmanaged/TypeLibs/Unmanaged/RDMarshal.cs diff --git a/Client/Rubberduck.Unmanaged/TypeLibs/Unmanaged/TypeInfoInternalSelfMarshalForwarderBase.cs b/AddIn/Rubberduck.Unmanaged/TypeLibs/Unmanaged/TypeInfoInternalSelfMarshalForwarderBase.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/TypeLibs/Unmanaged/TypeInfoInternalSelfMarshalForwarderBase.cs rename to AddIn/Rubberduck.Unmanaged/TypeLibs/Unmanaged/TypeInfoInternalSelfMarshalForwarderBase.cs diff --git a/Client/Rubberduck.Unmanaged/TypeLibs/Unmanaged/TypeLibInternalSelfMarshalForwarderBase.cs b/AddIn/Rubberduck.Unmanaged/TypeLibs/Unmanaged/TypeLibInternalSelfMarshalForwarderBase.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/TypeLibs/Unmanaged/TypeLibInternalSelfMarshalForwarderBase.cs rename to AddIn/Rubberduck.Unmanaged/TypeLibs/Unmanaged/TypeLibInternalSelfMarshalForwarderBase.cs diff --git a/Client/Rubberduck.Unmanaged/TypeLibs/Unmanaged/UnmanagedMemoryHelper.cs b/AddIn/Rubberduck.Unmanaged/TypeLibs/Unmanaged/UnmanagedMemoryHelper.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/TypeLibs/Unmanaged/UnmanagedMemoryHelper.cs rename to AddIn/Rubberduck.Unmanaged/TypeLibs/Unmanaged/UnmanagedMemoryHelper.cs diff --git a/Client/Rubberduck.Unmanaged/TypeLibs/Unmanaged/VBETypeLibsIterator.cs b/AddIn/Rubberduck.Unmanaged/TypeLibs/Unmanaged/VBETypeLibsIterator.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/TypeLibs/Unmanaged/VBETypeLibsIterator.cs rename to AddIn/Rubberduck.Unmanaged/TypeLibs/Unmanaged/VBETypeLibsIterator.cs diff --git a/Client/Rubberduck.Unmanaged/TypeLibs/Utility/DocClassHelper.cs b/AddIn/Rubberduck.Unmanaged/TypeLibs/Utility/DocClassHelper.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/TypeLibs/Utility/DocClassHelper.cs rename to AddIn/Rubberduck.Unmanaged/TypeLibs/Utility/DocClassHelper.cs diff --git a/Client/Rubberduck.Unmanaged/TypeLibs/Utility/IDisposableList.cs b/AddIn/Rubberduck.Unmanaged/TypeLibs/Utility/IDisposableList.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/TypeLibs/Utility/IDisposableList.cs rename to AddIn/Rubberduck.Unmanaged/TypeLibs/Utility/IDisposableList.cs diff --git a/Client/Rubberduck.Unmanaged/TypeLibs/Utility/IndexedCollection.cs b/AddIn/Rubberduck.Unmanaged/TypeLibs/Utility/IndexedCollection.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/TypeLibs/Utility/IndexedCollection.cs rename to AddIn/Rubberduck.Unmanaged/TypeLibs/Utility/IndexedCollection.cs diff --git a/Client/Rubberduck.Unmanaged/TypeLibs/Utility/SimpleCustomTypeLibrary.cs b/AddIn/Rubberduck.Unmanaged/TypeLibs/Utility/SimpleCustomTypeLibrary.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/TypeLibs/Utility/SimpleCustomTypeLibrary.cs rename to AddIn/Rubberduck.Unmanaged/TypeLibs/Utility/SimpleCustomTypeLibrary.cs diff --git a/Client/Rubberduck.Unmanaged/TypeLibs/Utility/TypeInfoDocumentationExtensions.cs b/AddIn/Rubberduck.Unmanaged/TypeLibs/Utility/TypeInfoDocumentationExtensions.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/TypeLibs/Utility/TypeInfoDocumentationExtensions.cs rename to AddIn/Rubberduck.Unmanaged/TypeLibs/Utility/TypeInfoDocumentationExtensions.cs diff --git a/Client/Rubberduck.Unmanaged/TypeLibs/Utility/TypeKindMapper.cs b/AddIn/Rubberduck.Unmanaged/TypeLibs/Utility/TypeKindMapper.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/TypeLibs/Utility/TypeKindMapper.cs rename to AddIn/Rubberduck.Unmanaged/TypeLibs/Utility/TypeKindMapper.cs diff --git a/Client/Rubberduck.Unmanaged/TypeLibs/Utility/VarDescExtensions.cs b/AddIn/Rubberduck.Unmanaged/TypeLibs/Utility/VarDescExtensions.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/TypeLibs/Utility/VarDescExtensions.cs rename to AddIn/Rubberduck.Unmanaged/TypeLibs/Utility/VarDescExtensions.cs diff --git a/Client/Rubberduck.Unmanaged/TypeLibs/VBETypeLibsAccessor.cs b/AddIn/Rubberduck.Unmanaged/TypeLibs/VBETypeLibsAccessor.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/TypeLibs/VBETypeLibsAccessor.cs rename to AddIn/Rubberduck.Unmanaged/TypeLibs/VBETypeLibsAccessor.cs diff --git a/Client/Rubberduck.Unmanaged/UIContext/IUiContextProvider.cs b/AddIn/Rubberduck.Unmanaged/UIContext/IUiContextProvider.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/UIContext/IUiContextProvider.cs rename to AddIn/Rubberduck.Unmanaged/UIContext/IUiContextProvider.cs diff --git a/Client/Rubberduck.Unmanaged/UIContext/IUiDispatcher.cs b/AddIn/Rubberduck.Unmanaged/UIContext/IUiDispatcher.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/UIContext/IUiDispatcher.cs rename to AddIn/Rubberduck.Unmanaged/UIContext/IUiDispatcher.cs diff --git a/Client/Rubberduck.Unmanaged/UIContext/UiContextProvider.cs b/AddIn/Rubberduck.Unmanaged/UIContext/UiContextProvider.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/UIContext/UiContextProvider.cs rename to AddIn/Rubberduck.Unmanaged/UIContext/UiContextProvider.cs diff --git a/Client/Rubberduck.Unmanaged/UIContext/UiDispatcher.cs b/AddIn/Rubberduck.Unmanaged/UIContext/UiDispatcher.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/UIContext/UiDispatcher.cs rename to AddIn/Rubberduck.Unmanaged/UIContext/UiDispatcher.cs diff --git a/Client/Rubberduck.Unmanaged/VBERuntime/IVbeNativeApi.cs b/AddIn/Rubberduck.Unmanaged/VBERuntime/IVbeNativeApi.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/VBERuntime/IVbeNativeApi.cs rename to AddIn/Rubberduck.Unmanaged/VBERuntime/IVbeNativeApi.cs diff --git a/Client/Rubberduck.Unmanaged/VBERuntime/Settings/IVBESettings.cs b/AddIn/Rubberduck.Unmanaged/VBERuntime/Settings/IVBESettings.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/VBERuntime/Settings/IVBESettings.cs rename to AddIn/Rubberduck.Unmanaged/VBERuntime/Settings/IVBESettings.cs diff --git a/Client/Rubberduck.Unmanaged/VBERuntime/Settings/VBESettings.cs b/AddIn/Rubberduck.Unmanaged/VBERuntime/Settings/VBESettings.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/VBERuntime/Settings/VBESettings.cs rename to AddIn/Rubberduck.Unmanaged/VBERuntime/Settings/VBESettings.cs diff --git a/Client/Rubberduck.Unmanaged/VBERuntime/VBEDllVersion.cs b/AddIn/Rubberduck.Unmanaged/VBERuntime/VBEDllVersion.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/VBERuntime/VBEDllVersion.cs rename to AddIn/Rubberduck.Unmanaged/VBERuntime/VBEDllVersion.cs diff --git a/Client/Rubberduck.Unmanaged/VBERuntime/Vb6NativeApi.cs b/AddIn/Rubberduck.Unmanaged/VBERuntime/Vb6NativeApi.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/VBERuntime/Vb6NativeApi.cs rename to AddIn/Rubberduck.Unmanaged/VBERuntime/Vb6NativeApi.cs diff --git a/Client/Rubberduck.Unmanaged/VBERuntime/VbeNativeApi6.cs b/AddIn/Rubberduck.Unmanaged/VBERuntime/VbeNativeApi6.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/VBERuntime/VbeNativeApi6.cs rename to AddIn/Rubberduck.Unmanaged/VBERuntime/VbeNativeApi6.cs diff --git a/Client/Rubberduck.Unmanaged/VBERuntime/VbeNativeApi7.cs b/AddIn/Rubberduck.Unmanaged/VBERuntime/VbeNativeApi7.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/VBERuntime/VbeNativeApi7.cs rename to AddIn/Rubberduck.Unmanaged/VBERuntime/VbeNativeApi7.cs diff --git a/Client/Rubberduck.Unmanaged/VBERuntime/VbeNativeApiAccessor.cs b/AddIn/Rubberduck.Unmanaged/VBERuntime/VbeNativeApiAccessor.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/VBERuntime/VbeNativeApiAccessor.cs rename to AddIn/Rubberduck.Unmanaged/VBERuntime/VbeNativeApiAccessor.cs diff --git a/Client/Rubberduck.Unmanaged/WeakComSafe.cs b/AddIn/Rubberduck.Unmanaged/WeakComSafe.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/WeakComSafe.cs rename to AddIn/Rubberduck.Unmanaged/WeakComSafe.cs diff --git a/Client/Rubberduck.Unmanaged/WindowsApi/CodePaneSubclass.cs b/AddIn/Rubberduck.Unmanaged/WindowsApi/CodePaneSubclass.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/WindowsApi/CodePaneSubclass.cs rename to AddIn/Rubberduck.Unmanaged/WindowsApi/CodePaneSubclass.cs diff --git a/Client/Rubberduck.Unmanaged/WindowsApi/DesignerWindowSubclass.cs b/AddIn/Rubberduck.Unmanaged/WindowsApi/DesignerWindowSubclass.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/WindowsApi/DesignerWindowSubclass.cs rename to AddIn/Rubberduck.Unmanaged/WindowsApi/DesignerWindowSubclass.cs diff --git a/Client/Rubberduck.Unmanaged/WindowsApi/EnumHelper.cs b/AddIn/Rubberduck.Unmanaged/WindowsApi/EnumHelper.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/WindowsApi/EnumHelper.cs rename to AddIn/Rubberduck.Unmanaged/WindowsApi/EnumHelper.cs diff --git a/Client/Rubberduck.Unmanaged/WindowsApi/FocusSource.cs b/AddIn/Rubberduck.Unmanaged/WindowsApi/FocusSource.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/WindowsApi/FocusSource.cs rename to AddIn/Rubberduck.Unmanaged/WindowsApi/FocusSource.cs diff --git a/Client/Rubberduck.Unmanaged/WindowsApi/IFocusProvider.cs b/AddIn/Rubberduck.Unmanaged/WindowsApi/IFocusProvider.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/WindowsApi/IFocusProvider.cs rename to AddIn/Rubberduck.Unmanaged/WindowsApi/IFocusProvider.cs diff --git a/Client/Rubberduck.Unmanaged/WindowsApi/IWindowEventProvider.cs b/AddIn/Rubberduck.Unmanaged/WindowsApi/IWindowEventProvider.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/WindowsApi/IWindowEventProvider.cs rename to AddIn/Rubberduck.Unmanaged/WindowsApi/IWindowEventProvider.cs diff --git a/Client/Rubberduck.Unmanaged/WindowsApi/Kernel32.cs b/AddIn/Rubberduck.Unmanaged/WindowsApi/Kernel32.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/WindowsApi/Kernel32.cs rename to AddIn/Rubberduck.Unmanaged/WindowsApi/Kernel32.cs diff --git a/Client/Rubberduck.Unmanaged/WindowsApi/NativeMethods.cs b/AddIn/Rubberduck.Unmanaged/WindowsApi/NativeMethods.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/WindowsApi/NativeMethods.cs rename to AddIn/Rubberduck.Unmanaged/WindowsApi/NativeMethods.cs diff --git a/Client/Rubberduck.Unmanaged/WindowsApi/ObjId.cs b/AddIn/Rubberduck.Unmanaged/WindowsApi/ObjId.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/WindowsApi/ObjId.cs rename to AddIn/Rubberduck.Unmanaged/WindowsApi/ObjId.cs diff --git a/Client/Rubberduck.Unmanaged/WindowsApi/ReflectionIgnoreAttribute.cs b/AddIn/Rubberduck.Unmanaged/WindowsApi/ReflectionIgnoreAttribute.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/WindowsApi/ReflectionIgnoreAttribute.cs rename to AddIn/Rubberduck.Unmanaged/WindowsApi/ReflectionIgnoreAttribute.cs diff --git a/Client/Rubberduck.Unmanaged/WindowsApi/SHCore.cs b/AddIn/Rubberduck.Unmanaged/WindowsApi/SHCore.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/WindowsApi/SHCore.cs rename to AddIn/Rubberduck.Unmanaged/WindowsApi/SHCore.cs diff --git a/Client/Rubberduck.Unmanaged/WindowsApi/SubclassManager.cs b/AddIn/Rubberduck.Unmanaged/WindowsApi/SubclassManager.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/WindowsApi/SubclassManager.cs rename to AddIn/Rubberduck.Unmanaged/WindowsApi/SubclassManager.cs diff --git a/Client/Rubberduck.Unmanaged/WindowsApi/SubclassingWindow.cs b/AddIn/Rubberduck.Unmanaged/WindowsApi/SubclassingWindow.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/WindowsApi/SubclassingWindow.cs rename to AddIn/Rubberduck.Unmanaged/WindowsApi/SubclassingWindow.cs diff --git a/Client/Rubberduck.Unmanaged/WindowsApi/User32.cs b/AddIn/Rubberduck.Unmanaged/WindowsApi/User32.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/WindowsApi/User32.cs rename to AddIn/Rubberduck.Unmanaged/WindowsApi/User32.cs diff --git a/Client/Rubberduck.Unmanaged/WindowsApi/VbeAttachableSubclass.cs b/AddIn/Rubberduck.Unmanaged/WindowsApi/VbeAttachableSubclass.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/WindowsApi/VbeAttachableSubclass.cs rename to AddIn/Rubberduck.Unmanaged/WindowsApi/VbeAttachableSubclass.cs diff --git a/Client/Rubberduck.Unmanaged/WindowsApi/WM.cs b/AddIn/Rubberduck.Unmanaged/WindowsApi/WM.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/WindowsApi/WM.cs rename to AddIn/Rubberduck.Unmanaged/WindowsApi/WM.cs diff --git a/Client/Rubberduck.Unmanaged/WindowsApi/WinEvent.cs b/AddIn/Rubberduck.Unmanaged/WindowsApi/WinEvent.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/WindowsApi/WinEvent.cs rename to AddIn/Rubberduck.Unmanaged/WindowsApi/WinEvent.cs diff --git a/Client/Rubberduck.Unmanaged/WindowsApi/WinEventFlags.cs b/AddIn/Rubberduck.Unmanaged/WindowsApi/WinEventFlags.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/WindowsApi/WinEventFlags.cs rename to AddIn/Rubberduck.Unmanaged/WindowsApi/WinEventFlags.cs diff --git a/Client/Rubberduck.Unmanaged/WindowsApi/WindowLocator.cs b/AddIn/Rubberduck.Unmanaged/WindowsApi/WindowLocator.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/WindowsApi/WindowLocator.cs rename to AddIn/Rubberduck.Unmanaged/WindowsApi/WindowLocator.cs diff --git a/Client/Rubberduck.Unmanaged/WindowsApi/WindowType.cs b/AddIn/Rubberduck.Unmanaged/WindowsApi/WindowType.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/WindowsApi/WindowType.cs rename to AddIn/Rubberduck.Unmanaged/WindowsApi/WindowType.cs diff --git a/Client/Rubberduck.Unmanaged/WindowsApi/WindowsHook.cs b/AddIn/Rubberduck.Unmanaged/WindowsApi/WindowsHook.cs similarity index 100% rename from Client/Rubberduck.Unmanaged/WindowsApi/WindowsHook.cs rename to AddIn/Rubberduck.Unmanaged/WindowsApi/WindowsHook.cs diff --git a/Client/Rubberduck.VBEditor.VB6/ExternalFileTempSourceFileHandlerEmulator.cs b/AddIn/Rubberduck.VBEditor.VB6/ExternalFileTempSourceFileHandlerEmulator.cs similarity index 100% rename from Client/Rubberduck.VBEditor.VB6/ExternalFileTempSourceFileHandlerEmulator.cs rename to AddIn/Rubberduck.VBEditor.VB6/ExternalFileTempSourceFileHandlerEmulator.cs diff --git a/Client/Rubberduck.VBEditor.VB6/Properties/AssemblyInfo.cs b/AddIn/Rubberduck.VBEditor.VB6/Properties/AssemblyInfo.cs similarity index 100% rename from Client/Rubberduck.VBEditor.VB6/Properties/AssemblyInfo.cs rename to AddIn/Rubberduck.VBEditor.VB6/Properties/AssemblyInfo.cs diff --git a/Client/Rubberduck.VBEditor.VB6/Providers/VB6AddInProvider.cs b/AddIn/Rubberduck.VBEditor.VB6/Providers/VB6AddInProvider.cs similarity index 100% rename from Client/Rubberduck.VBEditor.VB6/Providers/VB6AddInProvider.cs rename to AddIn/Rubberduck.VBEditor.VB6/Providers/VB6AddInProvider.cs diff --git a/Client/Rubberduck.VBEditor.VB6/Providers/VB6VBEProvider.cs b/AddIn/Rubberduck.VBEditor.VB6/Providers/VB6VBEProvider.cs similarity index 100% rename from Client/Rubberduck.VBEditor.VB6/Providers/VB6VBEProvider.cs rename to AddIn/Rubberduck.VBEditor.VB6/Providers/VB6VBEProvider.cs diff --git a/Client/Rubberduck.VBEditor.VB6/Rubberduck.VBEditor.VB6.csproj b/AddIn/Rubberduck.VBEditor.VB6/Rubberduck.VBEditor.VB6.csproj similarity index 100% rename from Client/Rubberduck.VBEditor.VB6/Rubberduck.VBEditor.VB6.csproj rename to AddIn/Rubberduck.VBEditor.VB6/Rubberduck.VBEditor.VB6.csproj diff --git a/Client/Rubberduck.VBEditor.VB6/SafeComWrappers/Office/CommandBar.cs b/AddIn/Rubberduck.VBEditor.VB6/SafeComWrappers/Office/CommandBar.cs similarity index 100% rename from Client/Rubberduck.VBEditor.VB6/SafeComWrappers/Office/CommandBar.cs rename to AddIn/Rubberduck.VBEditor.VB6/SafeComWrappers/Office/CommandBar.cs diff --git a/Client/Rubberduck.VBEditor.VB6/SafeComWrappers/Office/CommandBarButton.cs b/AddIn/Rubberduck.VBEditor.VB6/SafeComWrappers/Office/CommandBarButton.cs similarity index 100% rename from Client/Rubberduck.VBEditor.VB6/SafeComWrappers/Office/CommandBarButton.cs rename to AddIn/Rubberduck.VBEditor.VB6/SafeComWrappers/Office/CommandBarButton.cs diff --git a/Client/Rubberduck.VBEditor.VB6/SafeComWrappers/Office/CommandBarControl.cs b/AddIn/Rubberduck.VBEditor.VB6/SafeComWrappers/Office/CommandBarControl.cs similarity index 100% rename from Client/Rubberduck.VBEditor.VB6/SafeComWrappers/Office/CommandBarControl.cs rename to AddIn/Rubberduck.VBEditor.VB6/SafeComWrappers/Office/CommandBarControl.cs diff --git a/Client/Rubberduck.VBEditor.VB6/SafeComWrappers/Office/CommandBarControls.cs b/AddIn/Rubberduck.VBEditor.VB6/SafeComWrappers/Office/CommandBarControls.cs similarity index 100% rename from Client/Rubberduck.VBEditor.VB6/SafeComWrappers/Office/CommandBarControls.cs rename to AddIn/Rubberduck.VBEditor.VB6/SafeComWrappers/Office/CommandBarControls.cs diff --git a/Client/Rubberduck.VBEditor.VB6/SafeComWrappers/Office/CommandBarPopup.cs b/AddIn/Rubberduck.VBEditor.VB6/SafeComWrappers/Office/CommandBarPopup.cs similarity index 100% rename from Client/Rubberduck.VBEditor.VB6/SafeComWrappers/Office/CommandBarPopup.cs rename to AddIn/Rubberduck.VBEditor.VB6/SafeComWrappers/Office/CommandBarPopup.cs diff --git a/Client/Rubberduck.VBEditor.VB6/SafeComWrappers/Office/CommandBars.cs b/AddIn/Rubberduck.VBEditor.VB6/SafeComWrappers/Office/CommandBars.cs similarity index 100% rename from Client/Rubberduck.VBEditor.VB6/SafeComWrappers/Office/CommandBars.cs rename to AddIn/Rubberduck.VBEditor.VB6/SafeComWrappers/Office/CommandBars.cs diff --git a/Client/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/AddIn.cs b/AddIn/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/AddIn.cs similarity index 100% rename from Client/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/AddIn.cs rename to AddIn/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/AddIn.cs diff --git a/Client/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/AddIns.cs b/AddIn/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/AddIns.cs similarity index 100% rename from Client/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/AddIns.cs rename to AddIn/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/AddIns.cs diff --git a/Client/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/Application.cs b/AddIn/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/Application.cs similarity index 100% rename from Client/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/Application.cs rename to AddIn/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/Application.cs diff --git a/Client/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/CodeModule.cs b/AddIn/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/CodeModule.cs similarity index 100% rename from Client/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/CodeModule.cs rename to AddIn/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/CodeModule.cs diff --git a/Client/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/CodePane.cs b/AddIn/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/CodePane.cs similarity index 100% rename from Client/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/CodePane.cs rename to AddIn/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/CodePane.cs diff --git a/Client/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/CodePanes.cs b/AddIn/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/CodePanes.cs similarity index 100% rename from Client/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/CodePanes.cs rename to AddIn/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/CodePanes.cs diff --git a/Client/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/CommandBarButtonEvents.cs b/AddIn/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/CommandBarButtonEvents.cs similarity index 100% rename from Client/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/CommandBarButtonEvents.cs rename to AddIn/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/CommandBarButtonEvents.cs diff --git a/Client/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/CommandBarEvents.cs b/AddIn/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/CommandBarEvents.cs similarity index 100% rename from Client/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/CommandBarEvents.cs rename to AddIn/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/CommandBarEvents.cs diff --git a/Client/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/Events.cs b/AddIn/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/Events.cs similarity index 100% rename from Client/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/Events.cs rename to AddIn/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/Events.cs diff --git a/Client/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/LinkedWindows.cs b/AddIn/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/LinkedWindows.cs similarity index 100% rename from Client/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/LinkedWindows.cs rename to AddIn/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/LinkedWindows.cs diff --git a/Client/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/Properties.cs b/AddIn/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/Properties.cs similarity index 100% rename from Client/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/Properties.cs rename to AddIn/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/Properties.cs diff --git a/Client/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/Property.cs b/AddIn/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/Property.cs similarity index 100% rename from Client/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/Property.cs rename to AddIn/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/Property.cs diff --git a/Client/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/Reference.cs b/AddIn/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/Reference.cs similarity index 100% rename from Client/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/Reference.cs rename to AddIn/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/Reference.cs diff --git a/Client/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/References.cs b/AddIn/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/References.cs similarity index 100% rename from Client/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/References.cs rename to AddIn/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/References.cs diff --git a/Client/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/SelectedVBControls.cs b/AddIn/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/SelectedVBControls.cs similarity index 100% rename from Client/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/SelectedVBControls.cs rename to AddIn/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/SelectedVBControls.cs diff --git a/Client/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/VBComponent.cs b/AddIn/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/VBComponent.cs similarity index 100% rename from Client/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/VBComponent.cs rename to AddIn/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/VBComponent.cs diff --git a/Client/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/VBComponents.cs b/AddIn/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/VBComponents.cs similarity index 100% rename from Client/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/VBComponents.cs rename to AddIn/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/VBComponents.cs diff --git a/Client/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/VBControl.cs b/AddIn/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/VBControl.cs similarity index 100% rename from Client/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/VBControl.cs rename to AddIn/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/VBControl.cs diff --git a/Client/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/VBControls.cs b/AddIn/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/VBControls.cs similarity index 100% rename from Client/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/VBControls.cs rename to AddIn/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/VBControls.cs diff --git a/Client/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/VBE.cs b/AddIn/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/VBE.cs similarity index 100% rename from Client/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/VBE.cs rename to AddIn/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/VBE.cs diff --git a/Client/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/VBForm.cs b/AddIn/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/VBForm.cs similarity index 100% rename from Client/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/VBForm.cs rename to AddIn/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/VBForm.cs diff --git a/Client/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/VBProject.cs b/AddIn/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/VBProject.cs similarity index 100% rename from Client/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/VBProject.cs rename to AddIn/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/VBProject.cs diff --git a/Client/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/VBProjects.cs b/AddIn/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/VBProjects.cs similarity index 100% rename from Client/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/VBProjects.cs rename to AddIn/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/VBProjects.cs diff --git a/Client/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/Window.cs b/AddIn/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/Window.cs similarity index 100% rename from Client/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/Window.cs rename to AddIn/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/Window.cs diff --git a/Client/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/Windows.cs b/AddIn/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/Windows.cs similarity index 100% rename from Client/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/Windows.cs rename to AddIn/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/Windows.cs diff --git a/Client/Rubberduck.VBEditor.VB6/app.config b/AddIn/Rubberduck.VBEditor.VB6/app.config similarity index 100% rename from Client/Rubberduck.VBEditor.VB6/app.config rename to AddIn/Rubberduck.VBEditor.VB6/app.config diff --git a/Client/Rubberduck.VBEditor.VBA/Providers/VBAAddInProvider.cs b/AddIn/Rubberduck.VBEditor.VBA/Providers/VBAAddInProvider.cs similarity index 100% rename from Client/Rubberduck.VBEditor.VBA/Providers/VBAAddInProvider.cs rename to AddIn/Rubberduck.VBEditor.VBA/Providers/VBAAddInProvider.cs diff --git a/Client/Rubberduck.VBEditor.VBA/Providers/VBAVBEProvider.cs b/AddIn/Rubberduck.VBEditor.VBA/Providers/VBAVBEProvider.cs similarity index 100% rename from Client/Rubberduck.VBEditor.VBA/Providers/VBAVBEProvider.cs rename to AddIn/Rubberduck.VBEditor.VBA/Providers/VBAVBEProvider.cs diff --git a/Client/Rubberduck.VBEditor.VBA/Rubberduck.VBEditor.VBA.csproj b/AddIn/Rubberduck.VBEditor.VBA/Rubberduck.VBEditor.VBA.csproj similarity index 100% rename from Client/Rubberduck.VBEditor.VBA/Rubberduck.VBEditor.VBA.csproj rename to AddIn/Rubberduck.VBEditor.VBA/Rubberduck.VBEditor.VBA.csproj diff --git a/Client/Rubberduck.VBEditor.VBA/SafeComWrappers/Application/AccessApp.cs b/AddIn/Rubberduck.VBEditor.VBA/SafeComWrappers/Application/AccessApp.cs similarity index 100% rename from Client/Rubberduck.VBEditor.VBA/SafeComWrappers/Application/AccessApp.cs rename to AddIn/Rubberduck.VBEditor.VBA/SafeComWrappers/Application/AccessApp.cs diff --git a/Client/Rubberduck.VBEditor.VBA/SafeComWrappers/Application/AutoCADApp.cs b/AddIn/Rubberduck.VBEditor.VBA/SafeComWrappers/Application/AutoCADApp.cs similarity index 100% rename from Client/Rubberduck.VBEditor.VBA/SafeComWrappers/Application/AutoCADApp.cs rename to AddIn/Rubberduck.VBEditor.VBA/SafeComWrappers/Application/AutoCADApp.cs diff --git a/Client/Rubberduck.VBEditor.VBA/SafeComWrappers/Application/CorelDRAWApp.cs b/AddIn/Rubberduck.VBEditor.VBA/SafeComWrappers/Application/CorelDRAWApp.cs similarity index 100% rename from Client/Rubberduck.VBEditor.VBA/SafeComWrappers/Application/CorelDRAWApp.cs rename to AddIn/Rubberduck.VBEditor.VBA/SafeComWrappers/Application/CorelDRAWApp.cs diff --git a/Client/Rubberduck.VBEditor.VBA/SafeComWrappers/Application/ExcelApp.cs b/AddIn/Rubberduck.VBEditor.VBA/SafeComWrappers/Application/ExcelApp.cs similarity index 100% rename from Client/Rubberduck.VBEditor.VBA/SafeComWrappers/Application/ExcelApp.cs rename to AddIn/Rubberduck.VBEditor.VBA/SafeComWrappers/Application/ExcelApp.cs diff --git a/Client/Rubberduck.VBEditor.VBA/SafeComWrappers/Application/FallbackApp.cs b/AddIn/Rubberduck.VBEditor.VBA/SafeComWrappers/Application/FallbackApp.cs similarity index 100% rename from Client/Rubberduck.VBEditor.VBA/SafeComWrappers/Application/FallbackApp.cs rename to AddIn/Rubberduck.VBEditor.VBA/SafeComWrappers/Application/FallbackApp.cs diff --git a/Client/Rubberduck.VBEditor.VBA/SafeComWrappers/Application/OutlookApp.cs b/AddIn/Rubberduck.VBEditor.VBA/SafeComWrappers/Application/OutlookApp.cs similarity index 100% rename from Client/Rubberduck.VBEditor.VBA/SafeComWrappers/Application/OutlookApp.cs rename to AddIn/Rubberduck.VBEditor.VBA/SafeComWrappers/Application/OutlookApp.cs diff --git a/Client/Rubberduck.VBEditor.VBA/SafeComWrappers/Application/PowerPointApp.cs b/AddIn/Rubberduck.VBEditor.VBA/SafeComWrappers/Application/PowerPointApp.cs similarity index 100% rename from Client/Rubberduck.VBEditor.VBA/SafeComWrappers/Application/PowerPointApp.cs rename to AddIn/Rubberduck.VBEditor.VBA/SafeComWrappers/Application/PowerPointApp.cs diff --git a/Client/Rubberduck.VBEditor.VBA/SafeComWrappers/Application/ProjectApp.cs b/AddIn/Rubberduck.VBEditor.VBA/SafeComWrappers/Application/ProjectApp.cs similarity index 100% rename from Client/Rubberduck.VBEditor.VBA/SafeComWrappers/Application/ProjectApp.cs rename to AddIn/Rubberduck.VBEditor.VBA/SafeComWrappers/Application/ProjectApp.cs diff --git a/Client/Rubberduck.VBEditor.VBA/SafeComWrappers/Application/PublisherApp.cs b/AddIn/Rubberduck.VBEditor.VBA/SafeComWrappers/Application/PublisherApp.cs similarity index 100% rename from Client/Rubberduck.VBEditor.VBA/SafeComWrappers/Application/PublisherApp.cs rename to AddIn/Rubberduck.VBEditor.VBA/SafeComWrappers/Application/PublisherApp.cs diff --git a/Client/Rubberduck.VBEditor.VBA/SafeComWrappers/Application/SolidWorksApp.cs b/AddIn/Rubberduck.VBEditor.VBA/SafeComWrappers/Application/SolidWorksApp.cs similarity index 100% rename from Client/Rubberduck.VBEditor.VBA/SafeComWrappers/Application/SolidWorksApp.cs rename to AddIn/Rubberduck.VBEditor.VBA/SafeComWrappers/Application/SolidWorksApp.cs diff --git a/Client/Rubberduck.VBEditor.VBA/SafeComWrappers/Application/Visio.cs b/AddIn/Rubberduck.VBEditor.VBA/SafeComWrappers/Application/Visio.cs similarity index 100% rename from Client/Rubberduck.VBEditor.VBA/SafeComWrappers/Application/Visio.cs rename to AddIn/Rubberduck.VBEditor.VBA/SafeComWrappers/Application/Visio.cs diff --git a/Client/Rubberduck.VBEditor.VBA/SafeComWrappers/Application/WordApp.cs b/AddIn/Rubberduck.VBEditor.VBA/SafeComWrappers/Application/WordApp.cs similarity index 100% rename from Client/Rubberduck.VBEditor.VBA/SafeComWrappers/Application/WordApp.cs rename to AddIn/Rubberduck.VBEditor.VBA/SafeComWrappers/Application/WordApp.cs diff --git a/Client/Rubberduck.VBEditor.VBA/SafeComWrappers/Office/CommandBar.cs b/AddIn/Rubberduck.VBEditor.VBA/SafeComWrappers/Office/CommandBar.cs similarity index 100% rename from Client/Rubberduck.VBEditor.VBA/SafeComWrappers/Office/CommandBar.cs rename to AddIn/Rubberduck.VBEditor.VBA/SafeComWrappers/Office/CommandBar.cs diff --git a/Client/Rubberduck.VBEditor.VBA/SafeComWrappers/Office/CommandBarButton.cs b/AddIn/Rubberduck.VBEditor.VBA/SafeComWrappers/Office/CommandBarButton.cs similarity index 100% rename from Client/Rubberduck.VBEditor.VBA/SafeComWrappers/Office/CommandBarButton.cs rename to AddIn/Rubberduck.VBEditor.VBA/SafeComWrappers/Office/CommandBarButton.cs diff --git a/Client/Rubberduck.VBEditor.VBA/SafeComWrappers/Office/CommandBarControl.cs b/AddIn/Rubberduck.VBEditor.VBA/SafeComWrappers/Office/CommandBarControl.cs similarity index 100% rename from Client/Rubberduck.VBEditor.VBA/SafeComWrappers/Office/CommandBarControl.cs rename to AddIn/Rubberduck.VBEditor.VBA/SafeComWrappers/Office/CommandBarControl.cs diff --git a/Client/Rubberduck.VBEditor.VBA/SafeComWrappers/Office/CommandBarControls.cs b/AddIn/Rubberduck.VBEditor.VBA/SafeComWrappers/Office/CommandBarControls.cs similarity index 100% rename from Client/Rubberduck.VBEditor.VBA/SafeComWrappers/Office/CommandBarControls.cs rename to AddIn/Rubberduck.VBEditor.VBA/SafeComWrappers/Office/CommandBarControls.cs diff --git a/Client/Rubberduck.VBEditor.VBA/SafeComWrappers/Office/CommandBarPopup.cs b/AddIn/Rubberduck.VBEditor.VBA/SafeComWrappers/Office/CommandBarPopup.cs similarity index 100% rename from Client/Rubberduck.VBEditor.VBA/SafeComWrappers/Office/CommandBarPopup.cs rename to AddIn/Rubberduck.VBEditor.VBA/SafeComWrappers/Office/CommandBarPopup.cs diff --git a/Client/Rubberduck.VBEditor.VBA/SafeComWrappers/Office/CommandBars.cs b/AddIn/Rubberduck.VBEditor.VBA/SafeComWrappers/Office/CommandBars.cs similarity index 100% rename from Client/Rubberduck.VBEditor.VBA/SafeComWrappers/Office/CommandBars.cs rename to AddIn/Rubberduck.VBEditor.VBA/SafeComWrappers/Office/CommandBars.cs diff --git a/Client/Rubberduck.VBEditor.VBA/SafeComWrappers/VB/AddIn.cs b/AddIn/Rubberduck.VBEditor.VBA/SafeComWrappers/VB/AddIn.cs similarity index 100% rename from Client/Rubberduck.VBEditor.VBA/SafeComWrappers/VB/AddIn.cs rename to AddIn/Rubberduck.VBEditor.VBA/SafeComWrappers/VB/AddIn.cs diff --git a/Client/Rubberduck.VBEditor.VBA/SafeComWrappers/VB/AddIns.cs b/AddIn/Rubberduck.VBEditor.VBA/SafeComWrappers/VB/AddIns.cs similarity index 100% rename from Client/Rubberduck.VBEditor.VBA/SafeComWrappers/VB/AddIns.cs rename to AddIn/Rubberduck.VBEditor.VBA/SafeComWrappers/VB/AddIns.cs diff --git a/Client/Rubberduck.VBEditor.VBA/SafeComWrappers/VB/Application.cs b/AddIn/Rubberduck.VBEditor.VBA/SafeComWrappers/VB/Application.cs similarity index 100% rename from Client/Rubberduck.VBEditor.VBA/SafeComWrappers/VB/Application.cs rename to AddIn/Rubberduck.VBEditor.VBA/SafeComWrappers/VB/Application.cs diff --git a/Client/Rubberduck.VBEditor.VBA/SafeComWrappers/VB/CodeModule.cs b/AddIn/Rubberduck.VBEditor.VBA/SafeComWrappers/VB/CodeModule.cs similarity index 100% rename from Client/Rubberduck.VBEditor.VBA/SafeComWrappers/VB/CodeModule.cs rename to AddIn/Rubberduck.VBEditor.VBA/SafeComWrappers/VB/CodeModule.cs diff --git a/Client/Rubberduck.VBEditor.VBA/SafeComWrappers/VB/CodePane.cs b/AddIn/Rubberduck.VBEditor.VBA/SafeComWrappers/VB/CodePane.cs similarity index 100% rename from Client/Rubberduck.VBEditor.VBA/SafeComWrappers/VB/CodePane.cs rename to AddIn/Rubberduck.VBEditor.VBA/SafeComWrappers/VB/CodePane.cs diff --git a/Client/Rubberduck.VBEditor.VBA/SafeComWrappers/VB/CodePanes.cs b/AddIn/Rubberduck.VBEditor.VBA/SafeComWrappers/VB/CodePanes.cs similarity index 100% rename from Client/Rubberduck.VBEditor.VBA/SafeComWrappers/VB/CodePanes.cs rename to AddIn/Rubberduck.VBEditor.VBA/SafeComWrappers/VB/CodePanes.cs diff --git a/Client/Rubberduck.VBEditor.VBA/SafeComWrappers/VB/Control.cs b/AddIn/Rubberduck.VBEditor.VBA/SafeComWrappers/VB/Control.cs similarity index 100% rename from Client/Rubberduck.VBEditor.VBA/SafeComWrappers/VB/Control.cs rename to AddIn/Rubberduck.VBEditor.VBA/SafeComWrappers/VB/Control.cs diff --git a/Client/Rubberduck.VBEditor.VBA/SafeComWrappers/VB/Controls.cs b/AddIn/Rubberduck.VBEditor.VBA/SafeComWrappers/VB/Controls.cs similarity index 100% rename from Client/Rubberduck.VBEditor.VBA/SafeComWrappers/VB/Controls.cs rename to AddIn/Rubberduck.VBEditor.VBA/SafeComWrappers/VB/Controls.cs diff --git a/Client/Rubberduck.VBEditor.VBA/SafeComWrappers/VB/LinkedWindows.cs b/AddIn/Rubberduck.VBEditor.VBA/SafeComWrappers/VB/LinkedWindows.cs similarity index 100% rename from Client/Rubberduck.VBEditor.VBA/SafeComWrappers/VB/LinkedWindows.cs rename to AddIn/Rubberduck.VBEditor.VBA/SafeComWrappers/VB/LinkedWindows.cs diff --git a/Client/Rubberduck.VBEditor.VBA/SafeComWrappers/VB/Properties.cs b/AddIn/Rubberduck.VBEditor.VBA/SafeComWrappers/VB/Properties.cs similarity index 100% rename from Client/Rubberduck.VBEditor.VBA/SafeComWrappers/VB/Properties.cs rename to AddIn/Rubberduck.VBEditor.VBA/SafeComWrappers/VB/Properties.cs diff --git a/Client/Rubberduck.VBEditor.VBA/SafeComWrappers/VB/Property.cs b/AddIn/Rubberduck.VBEditor.VBA/SafeComWrappers/VB/Property.cs similarity index 100% rename from Client/Rubberduck.VBEditor.VBA/SafeComWrappers/VB/Property.cs rename to AddIn/Rubberduck.VBEditor.VBA/SafeComWrappers/VB/Property.cs diff --git a/Client/Rubberduck.VBEditor.VBA/SafeComWrappers/VB/Reference.cs b/AddIn/Rubberduck.VBEditor.VBA/SafeComWrappers/VB/Reference.cs similarity index 100% rename from Client/Rubberduck.VBEditor.VBA/SafeComWrappers/VB/Reference.cs rename to AddIn/Rubberduck.VBEditor.VBA/SafeComWrappers/VB/Reference.cs diff --git a/Client/Rubberduck.VBEditor.VBA/SafeComWrappers/VB/References.cs b/AddIn/Rubberduck.VBEditor.VBA/SafeComWrappers/VB/References.cs similarity index 100% rename from Client/Rubberduck.VBEditor.VBA/SafeComWrappers/VB/References.cs rename to AddIn/Rubberduck.VBEditor.VBA/SafeComWrappers/VB/References.cs diff --git a/Client/Rubberduck.VBEditor.VBA/SafeComWrappers/VB/UserForm.cs b/AddIn/Rubberduck.VBEditor.VBA/SafeComWrappers/VB/UserForm.cs similarity index 100% rename from Client/Rubberduck.VBEditor.VBA/SafeComWrappers/VB/UserForm.cs rename to AddIn/Rubberduck.VBEditor.VBA/SafeComWrappers/VB/UserForm.cs diff --git a/Client/Rubberduck.VBEditor.VBA/SafeComWrappers/VB/VBComponent.cs b/AddIn/Rubberduck.VBEditor.VBA/SafeComWrappers/VB/VBComponent.cs similarity index 100% rename from Client/Rubberduck.VBEditor.VBA/SafeComWrappers/VB/VBComponent.cs rename to AddIn/Rubberduck.VBEditor.VBA/SafeComWrappers/VB/VBComponent.cs diff --git a/Client/Rubberduck.VBEditor.VBA/SafeComWrappers/VB/VBComponents.cs b/AddIn/Rubberduck.VBEditor.VBA/SafeComWrappers/VB/VBComponents.cs similarity index 100% rename from Client/Rubberduck.VBEditor.VBA/SafeComWrappers/VB/VBComponents.cs rename to AddIn/Rubberduck.VBEditor.VBA/SafeComWrappers/VB/VBComponents.cs diff --git a/Client/Rubberduck.VBEditor.VBA/SafeComWrappers/VB/VBE.cs b/AddIn/Rubberduck.VBEditor.VBA/SafeComWrappers/VB/VBE.cs similarity index 100% rename from Client/Rubberduck.VBEditor.VBA/SafeComWrappers/VB/VBE.cs rename to AddIn/Rubberduck.VBEditor.VBA/SafeComWrappers/VB/VBE.cs diff --git a/Client/Rubberduck.VBEditor.VBA/SafeComWrappers/VB/VBProject.cs b/AddIn/Rubberduck.VBEditor.VBA/SafeComWrappers/VB/VBProject.cs similarity index 100% rename from Client/Rubberduck.VBEditor.VBA/SafeComWrappers/VB/VBProject.cs rename to AddIn/Rubberduck.VBEditor.VBA/SafeComWrappers/VB/VBProject.cs diff --git a/Client/Rubberduck.VBEditor.VBA/SafeComWrappers/VB/VBProjects.cs b/AddIn/Rubberduck.VBEditor.VBA/SafeComWrappers/VB/VBProjects.cs similarity index 100% rename from Client/Rubberduck.VBEditor.VBA/SafeComWrappers/VB/VBProjects.cs rename to AddIn/Rubberduck.VBEditor.VBA/SafeComWrappers/VB/VBProjects.cs diff --git a/Client/Rubberduck.VBEditor.VBA/SafeComWrappers/VB/Window.cs b/AddIn/Rubberduck.VBEditor.VBA/SafeComWrappers/VB/Window.cs similarity index 100% rename from Client/Rubberduck.VBEditor.VBA/SafeComWrappers/VB/Window.cs rename to AddIn/Rubberduck.VBEditor.VBA/SafeComWrappers/VB/Window.cs diff --git a/Client/Rubberduck.VBEditor.VBA/SafeComWrappers/VB/Windows.cs b/AddIn/Rubberduck.VBEditor.VBA/SafeComWrappers/VB/Windows.cs similarity index 100% rename from Client/Rubberduck.VBEditor.VBA/SafeComWrappers/VB/Windows.cs rename to AddIn/Rubberduck.VBEditor.VBA/SafeComWrappers/VB/Windows.cs diff --git a/Client/Rubberduck.VBEditor.VBA/TempSourceFileHandler.cs b/AddIn/Rubberduck.VBEditor.VBA/TempSourceFileHandler.cs similarity index 100% rename from Client/Rubberduck.VBEditor.VBA/TempSourceFileHandler.cs rename to AddIn/Rubberduck.VBEditor.VBA/TempSourceFileHandler.cs diff --git a/Client/Rubberduck.VBEditor.VBA/app.config b/AddIn/Rubberduck.VBEditor.VBA/app.config similarity index 100% rename from Client/Rubberduck.VBEditor.VBA/app.config rename to AddIn/Rubberduck.VBEditor.VBA/app.config diff --git a/Client/Rubberduck.VBEditor/Extensions/KeyValuePairExtensions.cs b/AddIn/Rubberduck.VBEditor/Extensions/KeyValuePairExtensions.cs similarity index 100% rename from Client/Rubberduck.VBEditor/Extensions/KeyValuePairExtensions.cs rename to AddIn/Rubberduck.VBEditor/Extensions/KeyValuePairExtensions.cs diff --git a/Client/Rubberduck.VBEditor/Extensions/MSAccessComponentTypeExtensions.cs b/AddIn/Rubberduck.VBEditor/Extensions/MSAccessComponentTypeExtensions.cs similarity index 100% rename from Client/Rubberduck.VBEditor/Extensions/MSAccessComponentTypeExtensions.cs rename to AddIn/Rubberduck.VBEditor/Extensions/MSAccessComponentTypeExtensions.cs diff --git a/Client/Rubberduck.VBEditor/Extensions/VBComponentExtensions.cs b/AddIn/Rubberduck.VBEditor/Extensions/VBComponentExtensions.cs similarity index 100% rename from Client/Rubberduck.VBEditor/Extensions/VBComponentExtensions.cs rename to AddIn/Rubberduck.VBEditor/Extensions/VBComponentExtensions.cs diff --git a/Client/Rubberduck.VBEditor/Extensions/VBProjectExtensions.cs b/AddIn/Rubberduck.VBEditor/Extensions/VBProjectExtensions.cs similarity index 100% rename from Client/Rubberduck.VBEditor/Extensions/VBProjectExtensions.cs rename to AddIn/Rubberduck.VBEditor/Extensions/VBProjectExtensions.cs diff --git a/Client/Rubberduck.VBEditor/Factories/AddInFactory.cs b/AddIn/Rubberduck.VBEditor/Factories/AddInFactory.cs similarity index 100% rename from Client/Rubberduck.VBEditor/Factories/AddInFactory.cs rename to AddIn/Rubberduck.VBEditor/Factories/AddInFactory.cs diff --git a/Client/Rubberduck.VBEditor/Factories/ISafeComWrapperProvider.cs b/AddIn/Rubberduck.VBEditor/Factories/ISafeComWrapperProvider.cs similarity index 100% rename from Client/Rubberduck.VBEditor/Factories/ISafeComWrapperProvider.cs rename to AddIn/Rubberduck.VBEditor/Factories/ISafeComWrapperProvider.cs diff --git a/Client/Rubberduck.VBEditor/Factories/VBEFactory.cs b/AddIn/Rubberduck.VBEditor/Factories/VBEFactory.cs similarity index 100% rename from Client/Rubberduck.VBEditor/Factories/VBEFactory.cs rename to AddIn/Rubberduck.VBEditor/Factories/VBEFactory.cs diff --git a/Client/Rubberduck.VBEditor/Rubberduck.VBEditor.csproj b/AddIn/Rubberduck.VBEditor/Rubberduck.VBEditor.csproj similarity index 94% rename from Client/Rubberduck.VBEditor/Rubberduck.VBEditor.csproj rename to AddIn/Rubberduck.VBEditor/Rubberduck.VBEditor.csproj index c12c385e..1133cdc9 100644 --- a/Client/Rubberduck.VBEditor/Rubberduck.VBEditor.csproj +++ b/AddIn/Rubberduck.VBEditor/Rubberduck.VBEditor.csproj @@ -21,7 +21,7 @@ - + {5E2588A5-2EF2-4267-952D-53AEC8F5F173} Rubberduck.InternalApi diff --git a/Client/Rubberduck.VBEditor/UI/OfficeMenus/AxHostConverter.cs b/AddIn/Rubberduck.VBEditor/UI/OfficeMenus/AxHostConverter.cs similarity index 100% rename from Client/Rubberduck.VBEditor/UI/OfficeMenus/AxHostConverter.cs rename to AddIn/Rubberduck.VBEditor/UI/OfficeMenus/AxHostConverter.cs diff --git a/Client/Rubberduck.VBEditor/UI/OfficeMenus/ComCommandBase.cs b/AddIn/Rubberduck.VBEditor/UI/OfficeMenus/ComCommandBase.cs similarity index 100% rename from Client/Rubberduck.VBEditor/UI/OfficeMenus/ComCommandBase.cs rename to AddIn/Rubberduck.VBEditor/UI/OfficeMenus/ComCommandBase.cs diff --git a/Client/Rubberduck.VBEditor/UI/OfficeMenus/CommandBarMenuBuilder.cs b/AddIn/Rubberduck.VBEditor/UI/OfficeMenus/CommandBarMenuBuilder.cs similarity index 100% rename from Client/Rubberduck.VBEditor/UI/OfficeMenus/CommandBarMenuBuilder.cs rename to AddIn/Rubberduck.VBEditor/UI/OfficeMenus/CommandBarMenuBuilder.cs diff --git a/Client/Rubberduck.VBEditor/UI/OfficeMenus/CommandMenuItemBase.cs b/AddIn/Rubberduck.VBEditor/UI/OfficeMenus/CommandMenuItemBase.cs similarity index 100% rename from Client/Rubberduck.VBEditor/UI/OfficeMenus/CommandMenuItemBase.cs rename to AddIn/Rubberduck.VBEditor/UI/OfficeMenus/CommandMenuItemBase.cs diff --git a/Client/Rubberduck.VBEditor/UI/OfficeMenus/ICommandMenuItem.cs b/AddIn/Rubberduck.VBEditor/UI/OfficeMenus/ICommandMenuItem.cs similarity index 100% rename from Client/Rubberduck.VBEditor/UI/OfficeMenus/ICommandMenuItem.cs rename to AddIn/Rubberduck.VBEditor/UI/OfficeMenus/ICommandMenuItem.cs diff --git a/Client/Rubberduck.VBEditor/UI/OfficeMenus/IMenuCommand.cs b/AddIn/Rubberduck.VBEditor/UI/OfficeMenus/IMenuCommand.cs similarity index 100% rename from Client/Rubberduck.VBEditor/UI/OfficeMenus/IMenuCommand.cs rename to AddIn/Rubberduck.VBEditor/UI/OfficeMenus/IMenuCommand.cs diff --git a/Client/Rubberduck.VBEditor/UI/OfficeMenus/IMenuItem.cs b/AddIn/Rubberduck.VBEditor/UI/OfficeMenus/IMenuItem.cs similarity index 100% rename from Client/Rubberduck.VBEditor/UI/OfficeMenus/IMenuItem.cs rename to AddIn/Rubberduck.VBEditor/UI/OfficeMenus/IMenuItem.cs diff --git a/Client/Rubberduck.VBEditor/UI/OfficeMenus/IParentMenuItem.cs b/AddIn/Rubberduck.VBEditor/UI/OfficeMenus/IParentMenuItem.cs similarity index 100% rename from Client/Rubberduck.VBEditor/UI/OfficeMenus/IParentMenuItem.cs rename to AddIn/Rubberduck.VBEditor/UI/OfficeMenus/IParentMenuItem.cs diff --git a/Client/Rubberduck.VBEditor/UI/OfficeMenus/ParentMenuItemBase.cs b/AddIn/Rubberduck.VBEditor/UI/OfficeMenus/ParentMenuItemBase.cs similarity index 100% rename from Client/Rubberduck.VBEditor/UI/OfficeMenus/ParentMenuItemBase.cs rename to AddIn/Rubberduck.VBEditor/UI/OfficeMenus/ParentMenuItemBase.cs diff --git a/Client/Rubberduck.VBEditor/UI/OfficeMenus/RubberduckMenu/AboutCommandMenuItem.cs b/AddIn/Rubberduck.VBEditor/UI/OfficeMenus/RubberduckMenu/AboutCommandMenuItem.cs similarity index 100% rename from Client/Rubberduck.VBEditor/UI/OfficeMenus/RubberduckMenu/AboutCommandMenuItem.cs rename to AddIn/Rubberduck.VBEditor/UI/OfficeMenus/RubberduckMenu/AboutCommandMenuItem.cs diff --git a/Client/Rubberduck.VBEditor/UI/OfficeMenus/RubberduckMenu/RubberduckParentMenu.cs b/AddIn/Rubberduck.VBEditor/UI/OfficeMenus/RubberduckMenu/RubberduckParentMenu.cs similarity index 100% rename from Client/Rubberduck.VBEditor/UI/OfficeMenus/RubberduckMenu/RubberduckParentMenu.cs rename to AddIn/Rubberduck.VBEditor/UI/OfficeMenus/RubberduckMenu/RubberduckParentMenu.cs diff --git a/Client/Rubberduck.VBEditor/UI/OfficeMenus/RubberduckMenu/SettingsCommandMenuItem.cs b/AddIn/Rubberduck.VBEditor/UI/OfficeMenus/RubberduckMenu/SettingsCommandMenuItem.cs similarity index 100% rename from Client/Rubberduck.VBEditor/UI/OfficeMenus/RubberduckMenu/SettingsCommandMenuItem.cs rename to AddIn/Rubberduck.VBEditor/UI/OfficeMenus/RubberduckMenu/SettingsCommandMenuItem.cs diff --git a/Client/Rubberduck.VBEditor/UI/OfficeMenus/RubberduckMenu/ShowRubberduckEditorCommandMenuItem.cs b/AddIn/Rubberduck.VBEditor/UI/OfficeMenus/RubberduckMenu/ShowRubberduckEditorCommandMenuItem.cs similarity index 100% rename from Client/Rubberduck.VBEditor/UI/OfficeMenus/RubberduckMenu/ShowRubberduckEditorCommandMenuItem.cs rename to AddIn/Rubberduck.VBEditor/UI/OfficeMenus/RubberduckMenu/ShowRubberduckEditorCommandMenuItem.cs diff --git a/Client/Rubberduck.VBEditor/Utility/AddComponentService.cs b/AddIn/Rubberduck.VBEditor/Utility/AddComponentService.cs similarity index 100% rename from Client/Rubberduck.VBEditor/Utility/AddComponentService.cs rename to AddIn/Rubberduck.VBEditor/Utility/AddComponentService.cs diff --git a/Client/Rubberduck.VBEditor/Utility/DisposalActionContainer.cs b/AddIn/Rubberduck.VBEditor/Utility/DisposalActionContainer.cs similarity index 100% rename from Client/Rubberduck.VBEditor/Utility/DisposalActionContainer.cs rename to AddIn/Rubberduck.VBEditor/Utility/DisposalActionContainer.cs diff --git a/Client/Rubberduck.VBEditor/Utility/IAddComponentService.cs b/AddIn/Rubberduck.VBEditor/Utility/IAddComponentService.cs similarity index 100% rename from Client/Rubberduck.VBEditor/Utility/IAddComponentService.cs rename to AddIn/Rubberduck.VBEditor/Utility/IAddComponentService.cs diff --git a/Client/Rubberduck.VBEditor/Utility/IRequiredBinaryFilesFromFileNameExtractor.cs b/AddIn/Rubberduck.VBEditor/Utility/IRequiredBinaryFilesFromFileNameExtractor.cs similarity index 100% rename from Client/Rubberduck.VBEditor/Utility/IRequiredBinaryFilesFromFileNameExtractor.cs rename to AddIn/Rubberduck.VBEditor/Utility/IRequiredBinaryFilesFromFileNameExtractor.cs diff --git a/Client/Rubberduck.VBEditor/Utility/ISelectionProvider.cs b/AddIn/Rubberduck.VBEditor/Utility/ISelectionProvider.cs similarity index 100% rename from Client/Rubberduck.VBEditor/Utility/ISelectionProvider.cs rename to AddIn/Rubberduck.VBEditor/Utility/ISelectionProvider.cs diff --git a/Client/Rubberduck.VBEditor/Utility/ISelectionService.cs b/AddIn/Rubberduck.VBEditor/Utility/ISelectionService.cs similarity index 100% rename from Client/Rubberduck.VBEditor/Utility/ISelectionService.cs rename to AddIn/Rubberduck.VBEditor/Utility/ISelectionService.cs diff --git a/Client/Rubberduck.VBEditor/Utility/ModuleNameFromFileExtractor.cs b/AddIn/Rubberduck.VBEditor/Utility/ModuleNameFromFileExtractor.cs similarity index 100% rename from Client/Rubberduck.VBEditor/Utility/ModuleNameFromFileExtractor.cs rename to AddIn/Rubberduck.VBEditor/Utility/ModuleNameFromFileExtractor.cs diff --git a/Client/Rubberduck.VBEditor/Utility/UserFormRequiredBinaryFileNameExtractor.cs b/AddIn/Rubberduck.VBEditor/Utility/UserFormRequiredBinaryFileNameExtractor.cs similarity index 100% rename from Client/Rubberduck.VBEditor/Utility/UserFormRequiredBinaryFileNameExtractor.cs rename to AddIn/Rubberduck.VBEditor/Utility/UserFormRequiredBinaryFileNameExtractor.cs diff --git a/Client/Rubberduck.VBEditor/VbeCommandBarMenuNames.cs b/AddIn/Rubberduck.VBEditor/VbeCommandBarMenuNames.cs similarity index 100% rename from Client/Rubberduck.VBEditor/VbeCommandBarMenuNames.cs rename to AddIn/Rubberduck.VBEditor/VbeCommandBarMenuNames.cs diff --git a/Client/Rubberduck.VBEditor/app.config b/AddIn/Rubberduck.VBEditor/app.config similarity index 100% rename from Client/Rubberduck.VBEditor/app.config rename to AddIn/Rubberduck.VBEditor/app.config diff --git a/Client/Rubberduck.ClientPlatform/Rubberduck.ClientPlatform.csproj b/Client/Rubberduck.ClientPlatform/Rubberduck.ClientPlatform.csproj deleted file mode 100644 index baa361d5..00000000 --- a/Client/Rubberduck.ClientPlatform/Rubberduck.ClientPlatform.csproj +++ /dev/null @@ -1,39 +0,0 @@ - - - net7.0 - Windows - 10.0 - enable - true - AnyCPU - AnyCPU - Ducky.ico - - - - - - - - - - - - - - - - - - - - - - - Always - - - Designer - - - diff --git a/Client/Rubberduck.Editor/Commands/FileCommandHandlers.cs b/Client/Rubberduck.Editor/Commands/FileCommandHandlers.cs index dbb58a8e..f3b6b98b 100644 --- a/Client/Rubberduck.Editor/Commands/FileCommandHandlers.cs +++ b/Client/Rubberduck.Editor/Commands/FileCommandHandlers.cs @@ -1,5 +1,6 @@ using Rubberduck.UI.Command; using Rubberduck.UI.Command.Abstract; +using Rubberduck.UI.Command.StaticRouted; using System.Collections.Generic; using System.Windows.Input; diff --git a/Client/Rubberduck.Editor/Commands/OpenProjectCommand.cs b/Client/Rubberduck.Editor/Commands/OpenProjectCommand.cs index b2981d6e..4030da31 100644 --- a/Client/Rubberduck.Editor/Commands/OpenProjectCommand.cs +++ b/Client/Rubberduck.Editor/Commands/OpenProjectCommand.cs @@ -2,6 +2,7 @@ using Rubberduck.InternalApi.Services; using Rubberduck.UI.Command; using Rubberduck.UI.Command.Abstract; +using Rubberduck.UI.Command.StaticRouted; using Rubberduck.UI.Services; using System; using System.IO.Abstractions; diff --git a/Client/Rubberduck.Editor/Commands/ToolsCommandHandlers.cs b/Client/Rubberduck.Editor/Commands/ToolsCommandHandlers.cs index 3f79fb75..18473b43 100644 --- a/Client/Rubberduck.Editor/Commands/ToolsCommandHandlers.cs +++ b/Client/Rubberduck.Editor/Commands/ToolsCommandHandlers.cs @@ -1,6 +1,6 @@ -using Rubberduck.UI.Command; -using Rubberduck.UI.Command.Abstract; +using Rubberduck.UI.Command.Abstract; using Rubberduck.UI.Command.SharedHandlers; +using Rubberduck.UI.Command.StaticRouted; using System.Collections.Generic; using System.Windows.Input; diff --git a/Client/Rubberduck.Editor/Commands/ViewCommandHandlers.cs b/Client/Rubberduck.Editor/Commands/ViewCommandHandlers.cs index 2cfdf2d8..f0878a5d 100644 --- a/Client/Rubberduck.Editor/Commands/ViewCommandHandlers.cs +++ b/Client/Rubberduck.Editor/Commands/ViewCommandHandlers.cs @@ -1,5 +1,6 @@ using Rubberduck.UI.Command; using Rubberduck.UI.Command.Abstract; +using Rubberduck.UI.Command.StaticRouted; using System.Collections.Generic; using System.Windows.Input; diff --git a/Client/Rubberduck.Editor/Shell/Document/CodeDocumentTabViewModel.cs b/Client/Rubberduck.Editor/Shell/Document/CodeDocumentTabViewModel.cs index 722bcf2c..4bb741c2 100644 --- a/Client/Rubberduck.Editor/Shell/Document/CodeDocumentTabViewModel.cs +++ b/Client/Rubberduck.Editor/Shell/Document/CodeDocumentTabViewModel.cs @@ -1,5 +1,4 @@ -using AsyncAwaitBestPractices; -using OmniSharp.Extensions.LanguageServer.Protocol.Client; +using OmniSharp.Extensions.LanguageServer.Protocol.Client; using OmniSharp.Extensions.LanguageServer.Protocol.Document; using OmniSharp.Extensions.LanguageServer.Protocol.Models; using Rubberduck.InternalApi.Extensions; @@ -14,175 +13,187 @@ using System.Threading; using System.Threading.Tasks; -namespace Rubberduck.Editor.Shell.Document +namespace Rubberduck.Editor.Shell.Document; + +/// +/// The base view model for a type of document tab that contains code managed by a language server. +/// +public abstract class CodeDocumentTabViewModel : DocumentTabViewModel, ICodeDocumentTabViewModel { - /// - /// The base view model for a type of document tab that contains code managed by a language server. - /// - public abstract class CodeDocumentTabViewModel : DocumentTabViewModel, ICodeDocumentTabViewModel + public event EventHandler CodeDocumentStateChanged = delegate { }; + + private readonly Lazy _languageClient; + private readonly UIServiceHelper _service; + + public CodeDocumentTabViewModel(CodeDocumentState state, bool isReadOnly, + ShowRubberduckSettingsCommand showSettingsCommand, + CloseToolWindowCommand closeToolWindowCommand, + IDocumentStatusViewModel activeDocumentStatus, + Func lsp, UIServiceHelper service) + : base(state, isReadOnly, showSettingsCommand, closeToolWindowCommand, activeDocumentStatus) { - public event EventHandler CodeDocumentStateChanged = delegate { }; + _languageClient = new Lazy(() => lsp.Invoke(), isThreadSafe: true); + _service = service; + _uri = state.Uri; - private readonly Lazy _languageClient; - private readonly UIServiceHelper _service; + Title = state.Name; + SettingKey = nameof(EditorSettings); - public CodeDocumentTabViewModel(CodeDocumentState state, bool isReadOnly, - ShowRubberduckSettingsCommand showSettingsCommand, - CloseToolWindowCommand closeToolWindowCommand, - IDocumentStatusViewModel activeDocumentStatus, - Func lsp, UIServiceHelper service) - : base(state, isReadOnly, showSettingsCommand, closeToolWindowCommand, activeDocumentStatus) - { - _languageClient = new Lazy(() => lsp.Invoke(), isThreadSafe: true); - _service = service; - _uri = state.Uri; + IdleTimer = new Timer(IdleTimerCallback, null, Convert.ToInt32(IdleDelay.TotalMicroseconds), Timeout.Infinite); + } - Title = state.Name; - SettingKey = nameof(EditorSettings); + /// + /// A timer that runs between keypresses to evaluate idle time; + /// callback is invoked if/when a configurable threshold is met, to notify the server of document changes. + /// + private Timer IdleTimer { get; } + private TimeSpan IdleDelay => UIServiceHelper.Instance!.Settings.EditorSettings.IdleTimerDuration; + private async void IdleTimerCallback(object? _) + { + Status.IsWriting = false; + DisableIdleTimer(); - IdleTimer = new Timer(IdleTimerCallback, null, Convert.ToInt32(IdleDelay.TotalMicroseconds), Timeout.Infinite); - } + NotifyDocumentChanged(); + await Task.Delay(IdleDelay / 2); // arbitrary - we likely need a few dozen milliseconds, tops. - /// - /// A timer that runs between keypresses to evaluate idle time; - /// callback is invoked if/when a configurable threshold is met, to notify the server of document changes. - /// - private Timer IdleTimer { get; } - private TimeSpan IdleDelay => UIServiceHelper.Instance!.Settings.EditorSettings.IdleTimerDuration; - private void IdleTimerCallback(object? _) => NotifyDocumentChangedAsync().SafeFireAndForget(); + await RequestDiagnosticsAsync(); + await RequestFoldingsAsync(); + } + + /// + /// Resets the idle timer to fire a callback in IdleDelay milliseconds (unless it's reset again by then). + /// + /// + /// Invoked at every keypress. + /// + private void ResetIdleTimer() => IdleTimer.Change(Convert.ToInt32(IdleDelay.TotalMilliseconds), Timeout.Infinite); - /// - /// Resets the idle timer to fire a callback in IdleDelay milliseconds. - /// - private void ResetIdleTimer() => IdleTimer.Change(Convert.ToInt32(IdleDelay.TotalMilliseconds), Timeout.Infinite); - private void DisableIdleTimer() => IdleTimer.Change(Timeout.Infinite, Timeout.Infinite); + private void DisableIdleTimer() => IdleTimer.Change(Timeout.Infinite, Timeout.Infinite); - private ILanguageClient LanguageClient => _languageClient.Value; + private ILanguageClient LanguageClient => _languageClient.Value; - private CodeDocumentState _state; - public CodeDocumentState CodeDocumentState + private CodeDocumentState _state; + public CodeDocumentState CodeDocumentState + { + get => _state; + set { - get => _state; - set - { - _state = value; - OnPropertyChanged(); - CodeDocumentStateChanged?.Invoke(this, EventArgs.Empty); - } + _state = value; + OnPropertyChanged(); + CodeDocumentStateChanged?.Invoke(this, EventArgs.Empty); } + } - public override DocumentState DocumentState - { - get => _state; - set => CodeDocumentState = value as CodeDocumentState ?? throw new InvalidOperationException(); - } + public override DocumentState DocumentState + { + get => _state; + set => CodeDocumentState = value as CodeDocumentState ?? throw new InvalidOperationException(); + } - public override Uri DocumentUri - { - get => _uri; - set => CodeDocumentUri = value as WorkspaceFileUri ?? throw new InvalidOperationException(); - } + public override Uri DocumentUri + { + get => _uri; + set => CodeDocumentUri = value as WorkspaceFileUri ?? throw new InvalidOperationException(); + } - protected override void OnTextChanged() - { - DisableIdleTimer(); - NotifyDocumentChangedAsync().SafeFireAndForget(e => _service.LogException(e)); - } + protected override void OnTextChanged() + { + Status.IsWriting = true; + ResetIdleTimer(); + } - public string LanguageId => _state.Language.Id; + public string LanguageId => _state.Language.Id; - private WorkspaceFileUri _uri; - public WorkspaceFileUri CodeDocumentUri + private WorkspaceFileUri _uri; + public WorkspaceFileUri CodeDocumentUri + { + get => _uri; + set { - get => _uri; - set + if (_uri != value) { - if (_uri != value) - { - _uri = value; - OnPropertyChanged(); - } + _uri = value; + OnPropertyChanged(); } } + } - public override SupportedDocumentType DocumentType => SupportedDocumentType.SourceFile; + public override SupportedDocumentType DocumentType => SupportedDocumentType.SourceFile; - private async Task NotifyDocumentChangedAsync() => await NotifyDocumentChangedAsync(null!, null!); + private void NotifyDocumentChanged() => NotifyDocumentChanged(null, null); - private async Task NotifyDocumentChangedAsync(OmniSharp.Extensions.LanguageServer.Protocol.Models.Range? range, string? text) - { - // increment local version first... - DocumentState = _state with { Version = _state.Version + 1 }; + private void NotifyDocumentChanged(OmniSharp.Extensions.LanguageServer.Protocol.Models.Range? range, string? text) + { + Status.ProgressMessage = "Processing changes..."; + // increment local version first... + DocumentState = _state with { Version = _state.Version + 1 }; - var request = new DidChangeTextDocumentParams + var request = new DidChangeTextDocumentParams + { + TextDocument = new OptionalVersionedTextDocumentIdentifier { - TextDocument = new OptionalVersionedTextDocumentIdentifier - { - Uri = DocumentState.Uri.AbsoluteLocation, - Version = DocumentState.Version, // ...so that the server-side latest matches local version - }, - ContentChanges = new Container( - new TextDocumentContentChangeEvent - { - // if only Text is supplied, server considers it the document's entire content - Text = text ?? TextContent, - Range = range - }) - }; - - _service.LogDebug($"Notifying server of document changes.", $"DocumentId: {DocumentState.Id} Version: {DocumentState.Version}"); - LanguageClient.DidChangeTextDocument(request); - - await Task.WhenAll(RequestFoldingsAsync(), RequestDiagnosticsAsync()).ConfigureAwait(false); - } + Uri = DocumentState.Uri.AbsoluteLocation, + Version = DocumentState.Version, // ...so that the server-side latest matches local version + }, + ContentChanges = new Container( + new TextDocumentContentChangeEvent + { + // if only Text is supplied, server considers it the document's entire content + Text = text ?? TextContent, + Range = range + }) + }; + + _service.LogDebug($"Notifying server of document changes.", $"DocumentId: {DocumentState.Id} Version: {DocumentState.Version}"); + LanguageClient.DidChangeTextDocument(request); + } - private async Task RequestDiagnosticsAsync() + private async Task RequestDiagnosticsAsync() + { + var request = new DocumentDiagnosticParams { - var request = new DocumentDiagnosticParams + Identifier = "RDE", + TextDocument = new TextDocumentIdentifier { - Identifier = "RDE", - TextDocument = new TextDocumentIdentifier - { - Uri = _uri.AbsoluteLocation, - } - }; + Uri = _uri.AbsoluteLocation, + } + }; - _service.LogDebug($"Requesting document diagnostics."); - var report = await LanguageClient.RequestDocumentDiagnostic(request); + _service.LogDebug($"Requesting document diagnostics."); + var report = await LanguageClient.RequestDocumentDiagnostic(request); - if (report is IFullDocumentDiagnosticReport fullReport) - { - _service.LogDebug($"Received {fullReport.Items.Count()} diagnostics."); - CodeDocumentState = _state.WithDiagnostics(fullReport.Items); - } - else - { - _service.LogDebug($"Received a diagnostic report that was not a IFullDocumentDiagnosticReport.", $"Report type : {report?.GetType().Name ?? "(null)"}"); - } + if (report is IFullDocumentDiagnosticReport fullReport) + { + _service.LogDebug($"Received {fullReport.Items.Count()} diagnostics."); + CodeDocumentState = _state.WithDiagnostics(fullReport.Items); } + else + { + _service.LogDebug($"Received a diagnostic report that was not a IFullDocumentDiagnosticReport.", $"Report type : {report?.GetType().Name ?? "(null)"}"); + } + } - private async Task RequestFoldingsAsync() + private async Task RequestFoldingsAsync() + { + var request = new FoldingRangeRequestParam { - var request = new FoldingRangeRequestParam + TextDocument = new TextDocumentIdentifier { - TextDocument = new TextDocumentIdentifier - { - Uri = _uri.AbsoluteLocation, - } - }; - - _service.LogDebug($"Requesting document folding ranges."); - var foldings = await LanguageClient.RequestFoldingRange(request); - if (foldings is not null) - { - _service.LogDebug($"Received {foldings.Count()} document folding ranges."); - CodeDocumentState = _state.WithFoldings(foldings); - } - else - { - _service.LogDebug($"Received a null response for folding ranges."); + Uri = _uri.AbsoluteLocation, } + }; + + _service.LogDebug($"Requesting document folding ranges."); + var foldings = await LanguageClient.RequestFoldingRange(request); + if (foldings is not null) + { + _service.LogDebug($"Received {foldings.Count()} document folding ranges."); + CodeDocumentState = _state.WithFoldings(foldings); + } + else + { + _service.LogDebug($"Received a null response for folding ranges."); } } } diff --git a/Client/Rubberduck.Editor/Shell/ShellWindowViewModel.cs b/Client/Rubberduck.Editor/Shell/ShellWindowViewModel.cs index 8db04603..a8bafab5 100644 --- a/Client/Rubberduck.Editor/Shell/ShellWindowViewModel.cs +++ b/Client/Rubberduck.Editor/Shell/ShellWindowViewModel.cs @@ -4,7 +4,7 @@ using Rubberduck.InternalApi.Settings.Model.Editor.Tools; using Rubberduck.UI; using Rubberduck.UI.Chrome; -using Rubberduck.UI.Command; +using Rubberduck.UI.Command.StaticRouted; using Rubberduck.UI.Services; using Rubberduck.UI.Shared.Message; using Rubberduck.UI.Shell; diff --git a/Client/Rubberduck.Editor/Shell/StatusBar/ActiveDocumentStatusViewModel.cs b/Client/Rubberduck.Editor/Shell/StatusBar/ActiveDocumentStatusViewModel.cs index 279dad2c..297a7889 100644 --- a/Client/Rubberduck.Editor/Shell/StatusBar/ActiveDocumentStatusViewModel.cs +++ b/Client/Rubberduck.Editor/Shell/StatusBar/ActiveDocumentStatusViewModel.cs @@ -89,6 +89,21 @@ public bool IsReadOnly } } } + + private bool _isWriting; + public bool IsWriting + { + get => _isWriting; + set + { + if (_isWriting != value) + { + _isWriting = value; + OnPropertyChanged(); + } + } + } + public ICommand CancelWorkDoneProgressCommand { get; set; } private SupportedDocumentType _documentType; diff --git a/Client/Rubberduck.Editor/Shell/StatusBar/StatusBarViewModel.cs b/Client/Rubberduck.Editor/Shell/StatusBar/StatusBarViewModel.cs index 41e781e1..9cae5cc2 100644 --- a/Client/Rubberduck.Editor/Shell/StatusBar/StatusBarViewModel.cs +++ b/Client/Rubberduck.Editor/Shell/StatusBar/StatusBarViewModel.cs @@ -186,5 +186,19 @@ public string StatusText } } } + + private bool _isWriting; + public bool IsWriting + { + get => _isWriting; + set + { + if (_isWriting != value) + { + _isWriting = value; + OnPropertyChanged(); + } + } + } } } diff --git a/Client/Rubberduck.Main/Ducky.ico b/Client/Rubberduck.Main/Ducky.ico deleted file mode 100644 index 7f989a7f..00000000 Binary files a/Client/Rubberduck.Main/Ducky.ico and /dev/null differ diff --git a/Client/Rubberduck.UI/Command/HelpCommands.cs b/Client/Rubberduck.UI/Command/HelpCommands.cs deleted file mode 100644 index f4db6990..00000000 --- a/Client/Rubberduck.UI/Command/HelpCommands.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System.Windows.Input; -using System.Windows; - -namespace Rubberduck.UI.Command -{ - public static class HelpCommands - { - public static RoutedCommand ShowReleaseNotesCommand { get; } - = new RoutedCommand(nameof(ShowReleaseNotesCommand), typeof(Window)); - public static RoutedCommand CheckForUpdates { get; } - = new RoutedCommand(nameof(CheckForUpdates), typeof(Window)); - public static RoutedCommand ShowAboutCommand { get; } - = new RoutedCommand(nameof(ShowAboutCommand), typeof(Window)); - } -} diff --git a/Client/Rubberduck.UI/Command/SharedHandlers/DialogCommandHandlers.cs b/Client/Rubberduck.UI/Command/SharedHandlers/DialogCommandHandlers.cs index d730d8fc..b4081b1f 100644 --- a/Client/Rubberduck.UI/Command/SharedHandlers/DialogCommandHandlers.cs +++ b/Client/Rubberduck.UI/Command/SharedHandlers/DialogCommandHandlers.cs @@ -1,4 +1,5 @@ -using System.Windows.Input; +using Rubberduck.UI.Command.StaticRouted; +using System.Windows.Input; namespace Rubberduck.UI.Command.SharedHandlers { diff --git a/Client/Rubberduck.UI/Command/SharedHandlers/NavigationCommandHandlers.cs b/Client/Rubberduck.UI/Command/SharedHandlers/NavigationCommandHandlers.cs deleted file mode 100644 index 96ca4746..00000000 --- a/Client/Rubberduck.UI/Command/SharedHandlers/NavigationCommandHandlers.cs +++ /dev/null @@ -1,29 +0,0 @@ -using Rubberduck.UI.Command.Abstract; -using System.Collections.Generic; -using System.Windows.Input; - -namespace Rubberduck.UI.Command.SharedHandlers; - -public class NavigationCommandHandlers : CommandHandlers -{ - private readonly ICommand _navigateBackwardCommand; - private readonly ICommand _navigateForwardCommand; - private readonly ICommand _searchCommand; - - public NavigationCommandHandlers( - ICommand navigateBackwardCommand, - ICommand navigateForwardCommand, - ICommand searchCommand) - { - _navigateBackwardCommand = navigateBackwardCommand; - _navigateForwardCommand = navigateForwardCommand; - _searchCommand = searchCommand; - } - - public override IEnumerable CreateCommandBindings() => - Bind( - (NavigationCommands.BrowseBack, _navigateBackwardCommand), - (NavigationCommands.BrowseForward, _navigateForwardCommand), - (NavigationCommands.Search, _searchCommand) - ); -} \ No newline at end of file diff --git a/Client/Rubberduck.UI/Command/SharedHandlers/ShowRubberduckSettingsCommand.cs b/Client/Rubberduck.UI/Command/SharedHandlers/ShowRubberduckSettingsCommand.cs index 57cb2214..551fb17f 100644 --- a/Client/Rubberduck.UI/Command/SharedHandlers/ShowRubberduckSettingsCommand.cs +++ b/Client/Rubberduck.UI/Command/SharedHandlers/ShowRubberduckSettingsCommand.cs @@ -1,5 +1,4 @@ -using System.Diagnostics; -using System.Linq; +using System.Linq; using System.Text; using System.Threading.Tasks; using Microsoft.Extensions.Logging; @@ -52,29 +51,33 @@ protected async override Task OnExecuteAsync(object? parameter) if (diff.Any()) { Service.SettingsProvider.Write(newSettings); + ShowSettingsSavedMessage(diff); + } + } + } - var details = new StringBuilder(); - foreach (var item in diff) - { - var itemTitle = SettingsUI.ResourceManager.GetString($"{item.Key}_Title"); - if (item.SettingDataType == SettingDataType.ListSetting) - { - var nbReferenceValues = item.ReferenceValue is null ? 0 : ((object[])item.ReferenceValue.Value!).Length; - var nbComparableValues = item.ComparableValue is null ? 0 : ((object[])item.ComparableValue.Value!).Length; - details.AppendLine($"•{itemTitle}: {nbReferenceValues} items -> {nbComparableValues} items"); - } - else - { - details.AppendLine($"•{itemTitle}: {item.ReferenceValue?.Value ?? "(added)"} -> {item.ComparableValue?.Value ?? "(removed)"}"); - } - } - - var msgKey = "SettingsSaved"; - var message = SettingsUI.ResourceManager.GetString($"{msgKey}_Message") ?? $"[missing key:{msgKey}_Message]"; - var title = SettingsUI.ResourceManager.GetString($"{msgKey}_Title") ?? $"[missing key:{msgKey}_Title]"; - _message.ShowMessage(new() { Key = msgKey, Level = LogLevel.Information, Title = title, Message = message, Verbose = $"Modified settings:\n{details}" }); + private void ShowSettingsSavedMessage(System.Collections.Generic.IEnumerable diff) + { + var details = new StringBuilder(); + foreach (var item in diff) + { + var itemTitle = SettingsUI.ResourceManager.GetString($"{item.Key}_Title"); + if (item.SettingDataType == SettingDataType.ListSetting) + { + var nbReferenceValues = item.ReferenceValue is null ? 0 : ((object[])item.ReferenceValue.Value!).Length; + var nbComparableValues = item.ComparableValue is null ? 0 : ((object[])item.ComparableValue.Value!).Length; + details.AppendLine($"•{itemTitle}: {nbReferenceValues} items -> {nbComparableValues} items"); + } + else + { + details.AppendLine($"•{itemTitle}: {item.ReferenceValue?.Value ?? "(added)"} -> {item.ComparableValue?.Value ?? "(removed)"}"); } } + + var msgKey = "SettingsSaved"; + var message = SettingsUI.ResourceManager.GetString($"{msgKey}_Message") ?? $"[missing key:{msgKey}_Message]"; + var title = SettingsUI.ResourceManager.GetString($"{msgKey}_Title") ?? $"[missing key:{msgKey}_Title]"; + _message.ShowMessage(new() { Key = msgKey, Level = LogLevel.Information, Title = title, Message = message, Verbose = $"Modified settings:\n{details}" }); } } } diff --git a/Client/Rubberduck.UI/Command/SharedHandlers/ToolWindowCommandHandlers.cs b/Client/Rubberduck.UI/Command/SharedHandlers/ToolWindowCommandHandlers.cs index d80563ab..aad9afbc 100644 --- a/Client/Rubberduck.UI/Command/SharedHandlers/ToolWindowCommandHandlers.cs +++ b/Client/Rubberduck.UI/Command/SharedHandlers/ToolWindowCommandHandlers.cs @@ -1,4 +1,5 @@ using Rubberduck.UI.Command.Abstract; +using Rubberduck.UI.Command.StaticRouted; using System.Collections.Generic; using System.Windows.Input; diff --git a/Client/Rubberduck.UI/Command/AnalyzeCommands.cs b/Client/Rubberduck.UI/Command/StaticRouted/AnalyzeCommands.cs similarity index 87% rename from Client/Rubberduck.UI/Command/AnalyzeCommands.cs rename to Client/Rubberduck.UI/Command/StaticRouted/AnalyzeCommands.cs index f47d98fa..44b21dcb 100644 --- a/Client/Rubberduck.UI/Command/AnalyzeCommands.cs +++ b/Client/Rubberduck.UI/Command/StaticRouted/AnalyzeCommands.cs @@ -1,6 +1,6 @@ using System.Windows.Input; -namespace Rubberduck.UI.Command +namespace Rubberduck.UI.Command.StaticRouted { public static class AnalyzeCommands { diff --git a/Client/Rubberduck.UI/Command/DebugCommands.cs b/Client/Rubberduck.UI/Command/StaticRouted/DebugCommands.cs similarity index 83% rename from Client/Rubberduck.UI/Command/DebugCommands.cs rename to Client/Rubberduck.UI/Command/StaticRouted/DebugCommands.cs index eda345a4..a4a5f7dc 100644 --- a/Client/Rubberduck.UI/Command/DebugCommands.cs +++ b/Client/Rubberduck.UI/Command/StaticRouted/DebugCommands.cs @@ -1,7 +1,7 @@ using System.Windows.Input; using System.Windows; -namespace Rubberduck.UI.Command +namespace Rubberduck.UI.Command.StaticRouted { public static class DebugCommands { diff --git a/Client/Rubberduck.UI/Command/DialogCommands.cs b/Client/Rubberduck.UI/Command/StaticRouted/DialogCommands.cs similarity index 98% rename from Client/Rubberduck.UI/Command/DialogCommands.cs rename to Client/Rubberduck.UI/Command/StaticRouted/DialogCommands.cs index bcaef2af..824247e0 100644 --- a/Client/Rubberduck.UI/Command/DialogCommands.cs +++ b/Client/Rubberduck.UI/Command/StaticRouted/DialogCommands.cs @@ -3,7 +3,7 @@ using System; using System.Windows.Controls; -namespace Rubberduck.UI.Command +namespace Rubberduck.UI.Command.StaticRouted { public static class DialogCommands { diff --git a/Client/Rubberduck.UI/Command/EditCommands.cs b/Client/Rubberduck.UI/Command/StaticRouted/EditCommands.cs similarity index 99% rename from Client/Rubberduck.UI/Command/EditCommands.cs rename to Client/Rubberduck.UI/Command/StaticRouted/EditCommands.cs index d9fe953c..50207c02 100644 --- a/Client/Rubberduck.UI/Command/EditCommands.cs +++ b/Client/Rubberduck.UI/Command/StaticRouted/EditCommands.cs @@ -1,7 +1,7 @@ using System.Windows.Input; using System.Windows; -namespace Rubberduck.UI.Command +namespace Rubberduck.UI.Command.StaticRouted { public static class EditCommands { diff --git a/Client/Rubberduck.UI/Command/ExtensionsCommands.cs b/Client/Rubberduck.UI/Command/StaticRouted/ExtensionsCommands.cs similarity index 85% rename from Client/Rubberduck.UI/Command/ExtensionsCommands.cs rename to Client/Rubberduck.UI/Command/StaticRouted/ExtensionsCommands.cs index 9bc6f8d8..34b896b8 100644 --- a/Client/Rubberduck.UI/Command/ExtensionsCommands.cs +++ b/Client/Rubberduck.UI/Command/StaticRouted/ExtensionsCommands.cs @@ -1,7 +1,7 @@ using System.Windows.Input; using System.Windows; -namespace Rubberduck.UI.Command +namespace Rubberduck.UI.Command.StaticRouted { public static class ExtensionsCommands { diff --git a/Client/Rubberduck.UI/Command/FileCommands.cs b/Client/Rubberduck.UI/Command/StaticRouted/FileCommands.cs similarity index 98% rename from Client/Rubberduck.UI/Command/FileCommands.cs rename to Client/Rubberduck.UI/Command/StaticRouted/FileCommands.cs index df6b8d39..0b7dd7dc 100644 --- a/Client/Rubberduck.UI/Command/FileCommands.cs +++ b/Client/Rubberduck.UI/Command/StaticRouted/FileCommands.cs @@ -2,7 +2,7 @@ using System.Windows; using Resx = Rubberduck.Resources.v3.RubberduckUICommands; -namespace Rubberduck.UI.Command +namespace Rubberduck.UI.Command.StaticRouted { public static class FileCommands { diff --git a/Client/Rubberduck.UI/Command/StaticRouted/HelpCommands.cs b/Client/Rubberduck.UI/Command/StaticRouted/HelpCommands.cs new file mode 100644 index 00000000..ec136856 --- /dev/null +++ b/Client/Rubberduck.UI/Command/StaticRouted/HelpCommands.cs @@ -0,0 +1,14 @@ +using System.Windows.Input; +using System.Windows; + +namespace Rubberduck.UI.Command.StaticRouted; + +public static class HelpCommands +{ + public static RoutedCommand ShowReleaseNotesCommand { get; } + = new RoutedCommand(nameof(ShowReleaseNotesCommand), typeof(Window)); + public static RoutedCommand CheckForUpdates { get; } + = new RoutedCommand(nameof(CheckForUpdates), typeof(Window)); + public static RoutedCommand ShowAboutCommand { get; } + = new RoutedCommand(nameof(ShowAboutCommand), typeof(Window)); +} diff --git a/Client/Rubberduck.UI/Command/ProjectCommands.cs b/Client/Rubberduck.UI/Command/StaticRouted/ProjectCommands.cs similarity index 96% rename from Client/Rubberduck.UI/Command/ProjectCommands.cs rename to Client/Rubberduck.UI/Command/StaticRouted/ProjectCommands.cs index a99cf23e..d75d65ca 100644 --- a/Client/Rubberduck.UI/Command/ProjectCommands.cs +++ b/Client/Rubberduck.UI/Command/StaticRouted/ProjectCommands.cs @@ -1,7 +1,7 @@ using System.Windows.Input; using System.Windows; -namespace Rubberduck.UI.Command +namespace Rubberduck.UI.Command.StaticRouted { public static class ProjectCommands { diff --git a/Client/Rubberduck.UI/Command/StaticRouted/SettingCommands.cs b/Client/Rubberduck.UI/Command/StaticRouted/SettingCommands.cs new file mode 100644 index 00000000..0fbc1260 --- /dev/null +++ b/Client/Rubberduck.UI/Command/StaticRouted/SettingCommands.cs @@ -0,0 +1,13 @@ +using System.Windows.Input; +using System.Windows.Controls; + +namespace Rubberduck.UI.Command.StaticRouted; + +public static class SettingCommands +{ + public static RoutedCommand ShowSettingsCommand { get; } + = new RoutedCommand(nameof(ShowSettingsCommand), typeof(UserControl)); + + public static RoutedCommand AddListSettingItemCommand { get; } + = new RoutedCommand(nameof(AddListSettingItemCommand), typeof(UserControl)); +} \ No newline at end of file diff --git a/Client/Rubberduck.UI/Command/TestCommands.cs b/Client/Rubberduck.UI/Command/StaticRouted/TestCommands.cs similarity index 91% rename from Client/Rubberduck.UI/Command/TestCommands.cs rename to Client/Rubberduck.UI/Command/StaticRouted/TestCommands.cs index 6a7931e8..3ce55d66 100644 --- a/Client/Rubberduck.UI/Command/TestCommands.cs +++ b/Client/Rubberduck.UI/Command/StaticRouted/TestCommands.cs @@ -1,7 +1,7 @@ using System.Windows.Input; using System.Windows; -namespace Rubberduck.UI.Command +namespace Rubberduck.UI.Command.StaticRouted { public static class TestCommands { diff --git a/Client/Rubberduck.UI/Command/ToolsCommands.cs b/Client/Rubberduck.UI/Command/StaticRouted/ToolsCommands.cs similarity index 80% rename from Client/Rubberduck.UI/Command/ToolsCommands.cs rename to Client/Rubberduck.UI/Command/StaticRouted/ToolsCommands.cs index 9f661c02..aa7486c2 100644 --- a/Client/Rubberduck.UI/Command/ToolsCommands.cs +++ b/Client/Rubberduck.UI/Command/StaticRouted/ToolsCommands.cs @@ -2,7 +2,7 @@ using System.Windows; using System.Windows.Controls; -namespace Rubberduck.UI.Command +namespace Rubberduck.UI.Command.StaticRouted { public static class ToolsCommands { @@ -11,7 +11,6 @@ public static class ToolsCommands public static RoutedCommand ShowRegularExpressionToolCommand { get; } = new RoutedCommand(nameof(ShowRegularExpressionToolCommand), typeof(Window)); - public static RoutedCommand ShowRubberduckSettingsCommand { get; } - = new RoutedCommand(nameof(ShowRubberduckSettingsCommand), typeof(Window)); + public static RoutedCommand ShowRubberduckSettingsCommand => SettingCommands.ShowSettingsCommand; } } diff --git a/Client/Rubberduck.UI/Command/ViewCommands.cs b/Client/Rubberduck.UI/Command/StaticRouted/ViewCommands.cs similarity index 98% rename from Client/Rubberduck.UI/Command/ViewCommands.cs rename to Client/Rubberduck.UI/Command/StaticRouted/ViewCommands.cs index 30841784..928e2151 100644 --- a/Client/Rubberduck.UI/Command/ViewCommands.cs +++ b/Client/Rubberduck.UI/Command/StaticRouted/ViewCommands.cs @@ -1,7 +1,7 @@ using System.Windows.Input; using System.Windows; -namespace Rubberduck.UI.Command +namespace Rubberduck.UI.Command.StaticRouted { public static class ViewCommands { diff --git a/Client/Rubberduck.UI/Command/WindowsCommands.cs b/Client/Rubberduck.UI/Command/StaticRouted/WindowsCommands.cs similarity index 94% rename from Client/Rubberduck.UI/Command/WindowsCommands.cs rename to Client/Rubberduck.UI/Command/StaticRouted/WindowsCommands.cs index f656af26..4bfb7a3c 100644 --- a/Client/Rubberduck.UI/Command/WindowsCommands.cs +++ b/Client/Rubberduck.UI/Command/StaticRouted/WindowsCommands.cs @@ -1,7 +1,7 @@ using System.Windows.Input; using System.Windows; -namespace Rubberduck.UI.Command +namespace Rubberduck.UI.Command.StaticRouted { public static class WindowsCommands { diff --git a/Client/Rubberduck.UI/Converters/DiagnosticSeverityToIconConverter.cs b/Client/Rubberduck.UI/Converters/DiagnosticSeverityToIconConverter.cs new file mode 100644 index 00000000..a668b542 --- /dev/null +++ b/Client/Rubberduck.UI/Converters/DiagnosticSeverityToIconConverter.cs @@ -0,0 +1,35 @@ +using OmniSharp.Extensions.LanguageServer.Protocol.Models; +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Windows.Media; +using Icons = Rubberduck.Resources.v3.LogLevelIcons; + +namespace Rubberduck.UI.Converters; + +public class DiagnosticSeverityToIconConverter : ImageSourceConverter +{ + private static readonly IDictionary IconMap = new Dictionary + { + [DiagnosticSeverity.Error] = ToImageSource(Icons.cross_circle), + [DiagnosticSeverity.Warning] = ToImageSource(Icons.exclamation_diamond), + [DiagnosticSeverity.Information] = ToImageSource(Icons.information), + [DiagnosticSeverity.Hint] = ToImageSource(Icons.information_white), + }; + + public override object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + if (value is null) + { + return null!; + } + + var level = (DiagnosticSeverity)value; + if (IconMap.TryGetValue(level, out var icon)) + { + return icon; + } + + return null!; + } +} diff --git a/Client/Rubberduck.UI/Converters/HasItemsBoolConverter.cs b/Client/Rubberduck.UI/Converters/HasItemsBoolConverter.cs index 90d41c4c..fbaf2a91 100644 --- a/Client/Rubberduck.UI/Converters/HasItemsBoolConverter.cs +++ b/Client/Rubberduck.UI/Converters/HasItemsBoolConverter.cs @@ -4,12 +4,14 @@ using System.Globalization; using System.Linq; using System.Windows; +using System.Windows.Controls; using System.Windows.Data; namespace Rubberduck.UI.Converters { public class HasItemsVisibilityConverter : IValueConverter { + public bool HiddenWhenGreaterThan { get; set; } = false; public int VisibleWhenGreaterThan { get; set; } = 0; public Visibility FalseVisibility { get; set; } = Visibility.Collapsed; @@ -44,8 +46,8 @@ public object Convert(object value, Type targetType, object parameter, CultureIn } return count > VisibleWhenGreaterThan - ? Visibility.Visible - : FalseVisibility; + ? HiddenWhenGreaterThan ? FalseVisibility : Visibility.Visible + : HiddenWhenGreaterThan ? Visibility.Visible : FalseVisibility; } public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) @@ -56,6 +58,8 @@ public object ConvertBack(object value, Type targetType, object parameter, Cultu public class HasItemsBoolConverter : IValueConverter { + public bool InverseValue { get; set; } + public int? TrueWhenExactly { get; set; } public int TrueWhenGreaterThan { get; set; } = 0; public object Convert(object value, Type targetType, object parameter, CultureInfo culture) @@ -75,7 +79,13 @@ public object Convert(object value, Type targetType, object parameter, CultureIn count = n; } - return count > TrueWhenGreaterThan; + var result = TrueWhenExactly.HasValue + ? count == TrueWhenExactly.Value + : (count > TrueWhenGreaterThan); + + return InverseValue + ? !result + : result; } public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) diff --git a/Client/Rubberduck.UI/Converters/LogLevelToIconConverter.cs b/Client/Rubberduck.UI/Converters/LogLevelToIconConverter.cs index 84a1724f..97af7c78 100644 --- a/Client/Rubberduck.UI/Converters/LogLevelToIconConverter.cs +++ b/Client/Rubberduck.UI/Converters/LogLevelToIconConverter.cs @@ -5,35 +5,34 @@ using System.Windows.Media; using Icons = Rubberduck.Resources.v3.LogLevelIcons; -namespace Rubberduck.UI.Converters +namespace Rubberduck.UI.Converters; + +public class LogLevelToIconConverter : ImageSourceConverter { - public class LogLevelToIconConverter : ImageSourceConverter + private static readonly IDictionary IconMap = new Dictionary { - private static readonly IDictionary IconMap = new Dictionary - { - [LogLevel.Trace] = ToImageSource(Icons.information_white), - [LogLevel.Debug] = ToImageSource(Icons.tick_circle), - [LogLevel.Information] = ToImageSource(Icons.information), - [LogLevel.Warning] = ToImageSource(Icons.exclamation_diamond), - [LogLevel.Error] = ToImageSource(Icons.cross_circle), - [LogLevel.Critical] = ToImageSource (Icons.cross_circle), - [LogLevel.None] = null!, - }; + [LogLevel.Trace] = ToImageSource(Icons.information_white), + [LogLevel.Debug] = ToImageSource(Icons.tick_circle), + [LogLevel.Information] = ToImageSource(Icons.information), + [LogLevel.Warning] = ToImageSource(Icons.exclamation_diamond), + [LogLevel.Error] = ToImageSource(Icons.cross_circle), + [LogLevel.Critical] = ToImageSource (Icons.cross_circle), + [LogLevel.None] = null!, + }; - public override object Convert(object value, Type targetType, object parameter, CultureInfo culture) + public override object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + if (value is null) { - if (value is null) - { - return null!; - } - - var level = (LogLevel)value; - if (IconMap.TryGetValue(level, out var icon)) - { - return icon; - } - return null!; } + + var level = (LogLevel)value; + if (IconMap.TryGetValue(level, out var icon)) + { + return icon; + } + + return null!; } } \ No newline at end of file diff --git a/Client/Rubberduck.UI/Converters/WrapPanelItemWidthConverter.cs b/Client/Rubberduck.UI/Converters/WrapPanelItemWidthConverter.cs index a1f6c832..cdcb210e 100644 --- a/Client/Rubberduck.UI/Converters/WrapPanelItemWidthConverter.cs +++ b/Client/Rubberduck.UI/Converters/WrapPanelItemWidthConverter.cs @@ -22,11 +22,14 @@ public object Convert(object[] values, Type targetType, object parameter, Cultur return fullPanelWidth; } var items = (IEnumerable)((ListCollectionView)values[1]).SourceCollection; - if (values.Length > 2) + if (values.Length > 2 && !double.IsNaN((double)values[2])) { return fullPanelWidth; } + var groupingItems = items.OfType().ToArray(); + var forceSmallerBoxes = groupingItems.Count(e => e.Items.Count == 1) > 20; + var nonGroupingItems = items.Except(items.OfType()).ToArray(); var isSingleItem = nonGroupingItems.Length == 1; @@ -35,22 +38,22 @@ public object Convert(object[] values, Type targetType, object parameter, Cultur return fullPanelWidth; } - if (nonGroupingItems.Length >= 4 && fullPanelWidth >= 4 * SmallItemWidth) - { - return fullPanelWidth / 4d; - } + //if (nonGroupingItems.Length >= 4 && fullPanelWidth >= 4 * SmallItemWidth) + //{ + // return fullPanelWidth / 4d; + //} - if (nonGroupingItems.Length >= 3 && fullPanelWidth >= 3 * SmallItemWidth) - { - return fullPanelWidth / 3d; - } + //if (forceSmallerBoxes || nonGroupingItems.Length >= 3 && fullPanelWidth >= 3 * SmallItemWidth) + //{ + // return fullPanelWidth / 3d; + //} - if (nonGroupingItems.Length >= 2 && fullPanelWidth >= 2 * SmallItemWidth) + if (forceSmallerBoxes || nonGroupingItems.Length >= 2 && fullPanelWidth >= 2 * SmallItemWidth) { return fullPanelWidth / 2d; } - if (nonGroupingItems.Length >= 3 && nonGroupingItems.Length % 3 == 0) + if (forceSmallerBoxes || nonGroupingItems.Length >= 3 && nonGroupingItems.Length % 3 == 0) { var idealWidth = (int)(fullPanelWidth / 3d); if (idealWidth < SmallItemWidth) @@ -60,7 +63,7 @@ public object Convert(object[] values, Type targetType, object parameter, Cultur return idealWidth; } - if (nonGroupingItems.Length >= 2 && nonGroupingItems.Length % 2 == 0) + if (forceSmallerBoxes || nonGroupingItems.Length >= 2 && nonGroupingItems.Length % 2 == 0) { var idealWidth = (int)(fullPanelWidth / 2d); if (idealWidth < SmallItemWidth) diff --git a/Client/Rubberduck.UI/Resources/FontAwesome/circle-plus-solid.png b/Client/Rubberduck.UI/Resources/FontAwesome/circle-plus-solid.png new file mode 100644 index 00000000..9db2b139 Binary files /dev/null and b/Client/Rubberduck.UI/Resources/FontAwesome/circle-plus-solid.png differ diff --git a/Client/Rubberduck.UI/Resources/FontAwesome/circle-question-regular.png b/Client/Rubberduck.UI/Resources/FontAwesome/circle-question-regular.png new file mode 100644 index 00000000..1ec72b17 Binary files /dev/null and b/Client/Rubberduck.UI/Resources/FontAwesome/circle-question-regular.png differ diff --git a/Client/Rubberduck.UI/Resources/FontAwesome/circle-question-solid.png b/Client/Rubberduck.UI/Resources/FontAwesome/circle-question-solid.png new file mode 100644 index 00000000..0c57e257 Binary files /dev/null and b/Client/Rubberduck.UI/Resources/FontAwesome/circle-question-solid.png differ diff --git a/Client/Rubberduck.UI/Rubberduck.UI.csproj b/Client/Rubberduck.UI/Rubberduck.UI.csproj index 99068cbb..b29a9c9f 100644 --- a/Client/Rubberduck.UI/Rubberduck.UI.csproj +++ b/Client/Rubberduck.UI/Rubberduck.UI.csproj @@ -168,6 +168,9 @@ + + + @@ -279,7 +282,7 @@ - + @@ -439,6 +442,9 @@ + + + diff --git a/Client/Rubberduck.UI/Services/FoldingExtensions.cs b/Client/Rubberduck.UI/Services/FoldingExtensions.cs index 8618c715..7a79cfe2 100644 --- a/Client/Rubberduck.UI/Services/FoldingExtensions.cs +++ b/Client/Rubberduck.UI/Services/FoldingExtensions.cs @@ -1,10 +1,8 @@ -using ICSharpCode.AvalonEdit.Document; -using ICSharpCode.AvalonEdit.Folding; +using ICSharpCode.AvalonEdit.Folding; using OmniSharp.Extensions.LanguageServer.Protocol.Models; using Rubberduck.InternalApi.Model; using Rubberduck.UI.Extensions; using Rubberduck.Unmanaged.Model; -using System.Windows; namespace Rubberduck.UI.Services; diff --git a/Client/Rubberduck.UI/Services/Settings/ISettingViewModelFactory.cs b/Client/Rubberduck.UI/Services/Settings/ISettingViewModelFactory.cs index a2f0a952..6b792955 100644 --- a/Client/Rubberduck.UI/Services/Settings/ISettingViewModelFactory.cs +++ b/Client/Rubberduck.UI/Services/Settings/ISettingViewModelFactory.cs @@ -1,5 +1,6 @@ using Rubberduck.InternalApi.Settings.Model; using Rubberduck.InternalApi.Settings.Model.Editor.Tools; +using Rubberduck.InternalApi.Settings.Model.LanguageServer.Diagnostics; using Rubberduck.InternalApi.Settings.Model.Logging; using Rubberduck.InternalApi.Settings.Model.ServerStartup; using Rubberduck.UI.Shared.Settings.Abstract; @@ -21,6 +22,7 @@ public interface ISettingViewModelFactory ISettingViewModel CreateViewModel(ServerMessageModeSetting setting); ISettingViewModel CreateViewModel(TypedRubberduckSetting setting); ISettingViewModel CreateViewModel(TypedRubberduckSetting setting); + ISettingGroupViewModel CreateViewModel(DiagnosticSetting settingGroup); ISettingGroupViewModel CreateViewModel(TypedSettingGroup settingGroup); } diff --git a/Client/Rubberduck.UI/Services/Settings/SettingViewModelFactory.cs b/Client/Rubberduck.UI/Services/Settings/SettingViewModelFactory.cs index 49c3dfb9..08aaeaf6 100644 --- a/Client/Rubberduck.UI/Services/Settings/SettingViewModelFactory.cs +++ b/Client/Rubberduck.UI/Services/Settings/SettingViewModelFactory.cs @@ -1,6 +1,7 @@ using Rubberduck.InternalApi.Settings.Model; using Rubberduck.InternalApi.Settings.Model.Editor.CodeFolding; using Rubberduck.InternalApi.Settings.Model.Editor.Tools; +using Rubberduck.InternalApi.Settings.Model.LanguageServer.Diagnostics; using Rubberduck.InternalApi.Settings.Model.Logging; using Rubberduck.InternalApi.Settings.Model.ServerStartup; using Rubberduck.InternalApi.Settings.Model.TelemetryServer; @@ -31,6 +32,7 @@ public SettingViewModelFactory(UIServiceHelper service) public ISettingViewModel CreateViewModel(UriRubberduckSetting setting) => new UriSettingViewModel(setting); public ISettingViewModel CreateViewModel(LogLevelSetting setting) => new LogLevelSettingViewModel(setting); + public ISettingViewModel CreateViewModel(DiagnosticSeveritySetting setting) => new DiagnosticSeveritySettingViewModel(setting); public ISettingViewModel CreateViewModel(DefaultToolWindowLocationSetting setting) => new DefaultToolWindowLocationSettingViewModel(setting); public ISettingViewModel CreateViewModel(TraceLevelSetting setting) => new MessageTraceLevelSettingViewModel(setting); @@ -49,10 +51,16 @@ public ISettingGroupViewModel CreateViewModel(TypedRubberduckSetting settingGroup) { - var items = settingGroup.TypedValue?.Cast().Select(e => CreateViewModel(e)).ToList() ?? Enumerable.Empty().ToList(); + var items = settingGroup.TypedValue?.OfType().Select(e => CreateViewModel(e)).ToArray() ?? Array.Empty(); return new SettingGroupViewModel(settingGroup, items); } + public ISettingGroupViewModel CreateViewModel(DiagnosticSetting settingGroup) + { + var items = GetChildItems(settingGroup); + return new DiagnosticSettingsViewModel(settingGroup, items); + } + public ISettingGroupViewModel CreateViewModel(TypedSettingGroup settingGroup) { if (settingGroup is RubberduckSettings root) @@ -60,6 +68,11 @@ public ISettingGroupViewModel CreateViewModel(TypedSettingGroup settingGroup) var items = root.TypedValue.OfType().Select(CreateViewModel).ToList(); return new SettingGroupViewModel(root, items); } + else if (settingGroup is DiagnosticsSettings settings) + { + var items = settings.TypedValue.OfType().Select(e => new DiagnosticSetting(e)).Select(CreateViewModel).ToList(); + return new DiagnosticsSettingsViewModel(settingGroup, items); + } else { return new SettingGroupViewModel(settingGroup, GetChildItems(settingGroup).ToList()); @@ -74,6 +87,14 @@ private IEnumerable GetChildItems(TypedSettingGroup settingGr } } + private IEnumerable GetChildItems(DiagnosticsSettings settingGroup) + { + foreach (var setting in settingGroup.TypedValue.OfType()) + { + yield return GetChildItem(setting); + } + } + private ISettingViewModel GetChildItem(TSetting setting) where TSetting : RubberduckSetting { switch (setting) @@ -88,6 +109,8 @@ private ISettingViewModel GetChildItem(TSetting setting) where TSettin return CreateViewModel(uriSetting); case LogLevelSetting loglevelSetting: return CreateViewModel(loglevelSetting); + case DiagnosticSeveritySetting severitySetting: + return CreateViewModel(severitySetting); case DefaultToolWindowLocationSetting toolwindowLocationSetting: return CreateViewModel(toolwindowLocationSetting); case TraceLevelSetting tracelevelSetting: @@ -102,10 +125,10 @@ private ISettingViewModel GetChildItem(TSetting setting) where TSettin return CreateViewModel(timeSpanSetting); case TypedRubberduckSetting listSetting: return new StringListSettingViewModel(_service, listSetting); + case DiagnosticSetting diagnostic: + return CreateViewModel(diagnostic); case TypedSettingGroup subGroup: return CreateViewModel(subGroup); - case MappedBoolSettingGroup mappedGroup: - return CreateViewModel(mappedGroup); default: Debug.WriteLine($"**BUG** Missing case for '{setting.Key}' (data type: {setting.SettingDataType}) in SettingViewModelFactory."); throw new NotSupportedException(); diff --git a/Client/Rubberduck.UI/Services/Settings/SettingsWindowViewModel.cs b/Client/Rubberduck.UI/Services/Settings/SettingsWindowViewModel.cs index 736cde64..75d61e8a 100644 --- a/Client/Rubberduck.UI/Services/Settings/SettingsWindowViewModel.cs +++ b/Client/Rubberduck.UI/Services/Settings/SettingsWindowViewModel.cs @@ -3,9 +3,9 @@ using Rubberduck.Resources; using Rubberduck.Resources.v3; using Rubberduck.UI.Chrome; -using Rubberduck.UI.Command; using Rubberduck.UI.Command.Abstract; using Rubberduck.UI.Command.SharedHandlers; +using Rubberduck.UI.Command.StaticRouted; using Rubberduck.UI.Shared.Message; using Rubberduck.UI.Shared.Settings; using Rubberduck.UI.Shared.Settings.Abstract; diff --git a/Client/Rubberduck.UI/Services/TextMarkerExtensions.cs b/Client/Rubberduck.UI/Services/TextMarkerExtensions.cs index 4d6ae2c5..02299570 100644 --- a/Client/Rubberduck.UI/Services/TextMarkerExtensions.cs +++ b/Client/Rubberduck.UI/Services/TextMarkerExtensions.cs @@ -1,10 +1,15 @@ using OmniSharp.Extensions.LanguageServer.Protocol.Models; using Rubberduck.InternalApi.Model; +using Rubberduck.UI.Command.SharedHandlers; using Rubberduck.UI.Services.Abstract; using Rubberduck.UI.Shell; using Rubberduck.UI.Shell.Document; using System; +using System.Linq; +using System.Text; using System.Windows.Controls; +using System.Windows.Controls.Primitives; +using System.Windows.Input; using System.Windows.Media; namespace Rubberduck.UI.Services; @@ -18,7 +23,7 @@ public static class TextMarkerExtensions public static readonly Color ErrorMarkerColor = Color.FromRgb(168, 18, 18); public static readonly Color UndefinedMarkerColor = Color.FromRgb(0, 0, 0); - public static void WithTextMarker(this Diagnostic diagnostic, BindableTextEditor editor, TextMarkerService service) + public static void WithTextMarker(this Diagnostic diagnostic, BindableTextEditor editor, TextMarkerService service, ICommand showSettingsCommand, ICommand gotoHelpUrlCommand) { var document = editor.Document; var start = document.GetOffset(diagnostic.Range.Start.Line, diagnostic.Range.Start.Character + 1); @@ -42,34 +47,46 @@ public static void WithTextMarker(this Diagnostic diagnostic, BindableTextEditor _ => (TextMarkerTypes.NormalUnderline, UndefinedMarkerColor), }; - marker.ToolTip = CreateToolTip(editor, diagnostic); + marker.ToolTip = CreateToolTip(editor, diagnostic, showSettingsCommand, gotoHelpUrlCommand); } } - private static ToolTip CreateToolTip(BindableTextEditor editor, Diagnostic diagnostic) + private static Popup CreateToolTip(BindableTextEditor editor, Diagnostic diagnostic, ICommand showSettingsCommand, ICommand gotoHelpUrlCommand) { - var vm = GetToolTipViewModel(diagnostic); + var vm = GetToolTipViewModel(diagnostic, showSettingsCommand, gotoHelpUrlCommand); var tooltip = new TextMarkerToolTip { DataContext = vm, - PlacementTarget = editor + PlacementTarget = editor, }; return tooltip; } - private static object GetToolTipViewModel(Diagnostic diagnostic) + private static ITextMarkerToolTip GetToolTipViewModel(Diagnostic diagnostic, ICommand showSettingsCommand, ICommand gotoHelpUrlCommand) { - var isError = diagnostic.Code?.String == RubberduckDiagnosticId.SyntaxError.Code(); - - // FIXME assumes XYZ000123 format for diagnostic codes - var id = (RubberduckDiagnosticId)Convert.ToInt32(diagnostic.Code?.String?.Substring(3) ?? "-1"); + var code = diagnostic.Code!.Value.String!; + var id = (RubberduckDiagnosticId)Convert.ToInt32(code.Substring(3)); - return new + var title = id.ToString(); // TODO get from resources + var tla = code.Substring(0, 3); + var type = tla switch { - TipTitle = $"{diagnostic.Code!.Value.String} {id}", - TipText = diagnostic.Message, - IsError = isError, - IsDiagnostic = !isError + "VBC" => "VB Compile Error", + "VBR" => "VB Runtime Error", + "RD3" => "Rubberduck Diagnostic", + _ => null, + }; + return new TextMarkerToolTipViewModel + { + Code = code, + Title = title is null ? code : $"[{code}] {title}", + Text = diagnostic.Message, + Type = type ?? "unknown", + Severity = diagnostic.Severity ?? 0, + SettingKey = code, + HelpUri = diagnostic.CodeDescription?.Href, + GoToHelpUrlCommand = gotoHelpUrlCommand, + ShowSettingsCommand = showSettingsCommand, }; } } \ No newline at end of file diff --git a/Client/Rubberduck.UI/Services/WebNavigator.cs b/Client/Rubberduck.UI/Services/WebNavigator.cs index bec80310..88de65c3 100644 --- a/Client/Rubberduck.UI/Services/WebNavigator.cs +++ b/Client/Rubberduck.UI/Services/WebNavigator.cs @@ -6,9 +6,18 @@ namespace Rubberduck.UI.Services { public class WebNavigator : IWebNavigator { + // TODO validate that we can get a 200/OK from the specified URL before actually launching a browser process. + public void Navigate(Uri uri) { - Process.Start(new ProcessStartInfo(uri.AbsoluteUri)); + try + { + Process.Start(new ProcessStartInfo(uri.AbsoluteUri)); + } + catch + { + // gulp. + } } } } diff --git a/Client/Rubberduck.UI/Shared/Settings/Abstract/EnumValueSettingViewModel.cs b/Client/Rubberduck.UI/Shared/Settings/Abstract/EnumValueSettingViewModel.cs index 4ff0a31d..e83f72a0 100644 --- a/Client/Rubberduck.UI/Shared/Settings/Abstract/EnumValueSettingViewModel.cs +++ b/Client/Rubberduck.UI/Shared/Settings/Abstract/EnumValueSettingViewModel.cs @@ -66,6 +66,7 @@ protected EnumValueSettingViewModel(TypedRubberduckSetting setting) } public override IEnumerable Values { get; } = Members; + public IEnumerable EnumValues { get; } = Enum.GetValues(); private string _selection; public string Selection diff --git a/Client/Rubberduck.UI/Shared/Settings/Abstract/SettingViewModel.cs b/Client/Rubberduck.UI/Shared/Settings/Abstract/SettingViewModel.cs index c4db7700..0eadb3f9 100644 --- a/Client/Rubberduck.UI/Shared/Settings/Abstract/SettingViewModel.cs +++ b/Client/Rubberduck.UI/Shared/Settings/Abstract/SettingViewModel.cs @@ -13,7 +13,7 @@ protected SettingViewModel(TypedRubberduckSetting setting) _setting = setting; _value = setting.TypedValue; - IsEnabled = !IsReadOnlyRecommended; + IsEnabled = true; // !IsReadOnlyRecommended; } public SettingDataType SettingDataType => _setting.SettingDataType; diff --git a/Client/Rubberduck.UI/Shared/Settings/DiagnosticSeveritySettingViewModel.cs b/Client/Rubberduck.UI/Shared/Settings/DiagnosticSeveritySettingViewModel.cs new file mode 100644 index 00000000..68cbf645 --- /dev/null +++ b/Client/Rubberduck.UI/Shared/Settings/DiagnosticSeveritySettingViewModel.cs @@ -0,0 +1,44 @@ +using OmniSharp.Extensions.LanguageServer.Protocol.Models; +using Rubberduck.InternalApi.Settings.Model; +using Rubberduck.InternalApi.Settings.Model.LanguageServer.Diagnostics; +using Rubberduck.Resources.v3; +using Rubberduck.UI.Shared.Settings.Abstract; +using System.Collections.Generic; +using System.Linq; + +namespace Rubberduck.UI.Shared.Settings +{ + public class DiagnosticsSettingsViewModel : SettingGroupViewModel + { + public DiagnosticsSettingsViewModel(TypedSettingGroup settingGroup, IEnumerable items) + : base(settingGroup, items) + { + } + + } + + public class DiagnosticSettingsViewModel : SettingGroupViewModel + { + public DiagnosticSettingsViewModel(DiagnosticSetting settingGroup, IEnumerable items) + : base(settingGroup, items.Where(e => e is not DiagnosticSeveritySettingViewModel)) + { + Code = settingGroup.Key; + Severity = items.OfType().SingleOrDefault(); + + SettingGroupKey = settingGroup.Key; + SettingGroupName = settingGroup.LocalizedName; + } + + public string Code { get; init; } + public DiagnosticSeveritySettingViewModel Severity { get; init; } + public string SettingGroupName { get; init; } + public override string Name => $"[{Code}]: {SettingsUI.ResourceManager.GetString($"{SettingGroupKey}_Title") ?? $"[missing key:{SettingGroupKey}_Title]"}"; + } + + public class DiagnosticSeveritySettingViewModel : EnumValueSettingViewModel + { + public DiagnosticSeveritySettingViewModel(TypedRubberduckSetting setting) : base(setting) + { + } + } +} diff --git a/Client/Rubberduck.UI/Shared/Settings/SettingGroupViewModel.cs b/Client/Rubberduck.UI/Shared/Settings/SettingGroupViewModel.cs index 8b2a17bc..b4a8fa00 100644 --- a/Client/Rubberduck.UI/Shared/Settings/SettingGroupViewModel.cs +++ b/Client/Rubberduck.UI/Shared/Settings/SettingGroupViewModel.cs @@ -31,7 +31,7 @@ public SettingGroupViewModel(TypedSettingGroup settingGroup, IEnumerable string.IsNullOrWhiteSpace(_searchString) || ((ISettingViewModel)value).IsSearchResult(_searchString); @@ -68,6 +69,7 @@ public SettingGroupViewModel(TypedRubberduckSetting ItemsView = CollectionViewSource.GetDefaultView(Items); ItemsView.SortDescriptions.Add(new SortDescription(nameof(ISettingViewModel.IsSettingGroup), ListSortDirection.Ascending)); + ItemsView.SortDescriptions.Add(new SortDescription(nameof(ISettingViewModel.SettingDataType), ListSortDirection.Ascending)); ItemsView.SortDescriptions.Add(new SortDescription(nameof(ISettingViewModel.Name), ListSortDirection.Ascending)); ItemsView.Filter = value => string.IsNullOrWhiteSpace(_searchString) || ((ISettingViewModel)value).IsSearchResult(_searchString); @@ -94,6 +96,7 @@ public SettingGroupViewModel(TypedRubberduckSetting setting ItemsView = CollectionViewSource.GetDefaultView(Items); ItemsView.SortDescriptions.Add(new SortDescription(nameof(ISettingViewModel.IsSettingGroup), ListSortDirection.Ascending)); + ItemsView.SortDescriptions.Add(new SortDescription(nameof(ISettingViewModel.SettingDataType), ListSortDirection.Ascending)); ItemsView.SortDescriptions.Add(new SortDescription(nameof(ISettingViewModel.Name), ListSortDirection.Ascending)); ItemsView.Filter = value => string.IsNullOrWhiteSpace(_searchString) || ((ISettingViewModel)value).IsSearchResult(_searchString); @@ -154,7 +157,7 @@ public ISettingViewModel Selection public string Key => _settingGroup.Key; public string SettingGroupKey { get; set; } - public string Name => SettingsUI.ResourceManager.GetString($"{_settingGroup.Key}_Title") ?? $"[missing key:{_settingGroup.Key}_Title]"; + public virtual string Name => SettingsUI.ResourceManager.GetString($"{_settingGroup.Key}_Title") ?? $"[missing key:{_settingGroup.Key}_Title]"; public string Description => SettingsUI.ResourceManager.GetString($"{_settingGroup.Key}_Description") ?? $"[missing key:{_settingGroup.Key}_Description]"; public bool AllowToggleAllBooleans => Items.All(e => e is BooleanSettingViewModel); diff --git a/Client/Rubberduck.UI/Shared/Settings/Templates/BooleanSettingControl.xaml b/Client/Rubberduck.UI/Shared/Settings/Templates/BooleanSettingControl.xaml index c1ca52df..abd38fce 100644 --- a/Client/Rubberduck.UI/Shared/Settings/Templates/BooleanSettingControl.xaml +++ b/Client/Rubberduck.UI/Shared/Settings/Templates/BooleanSettingControl.xaml @@ -6,9 +6,9 @@ xmlns:local="clr-namespace:Rubberduck.UI.Shared.Settings.Templates" xmlns:viewmodels="clr-namespace:Rubberduck.UI.Shared.Settings" xmlns:shell="clr-namespace:Rubberduck.UI.Shell" d:DataContext="{d:DesignInstance Type=viewmodels:BooleanSettingViewModel}" - Padding="4" MinHeight="84" mc:Ignorable="d" - d:DesignHeight="84" d:DesignWidth="255"> + d:DesignWidth="500" + d:Background="{StaticResource ThemeBackgroundColorBrush}"> @@ -18,33 +18,36 @@ - + - + - - diff --git a/Client/Rubberduck.UI/Shared/Settings/Templates/DiagnosticSettingsControl.xaml b/Client/Rubberduck.UI/Shared/Settings/Templates/DiagnosticSettingsControl.xaml new file mode 100644 index 00000000..208e02de --- /dev/null +++ b/Client/Rubberduck.UI/Shared/Settings/Templates/DiagnosticSettingsControl.xaml @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Client/Rubberduck.UI/Shared/Settings/Templates/DiagnosticSettingsControl.xaml.cs b/Client/Rubberduck.UI/Shared/Settings/Templates/DiagnosticSettingsControl.xaml.cs new file mode 100644 index 00000000..d8f2404e --- /dev/null +++ b/Client/Rubberduck.UI/Shared/Settings/Templates/DiagnosticSettingsControl.xaml.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace Rubberduck.UI.Shared.Settings.Templates +{ + /// + /// Interaction logic for DiagnosticSettingsControl.xaml + /// + public partial class DiagnosticSettingsControl : UserControl + { + public DiagnosticSettingsControl() + { + InitializeComponent(); + } + } +} diff --git a/Client/Rubberduck.UI/Shared/Settings/Templates/EnumValueSettingControl.xaml b/Client/Rubberduck.UI/Shared/Settings/Templates/EnumValueSettingControl.xaml index 230d685a..41ce0191 100644 --- a/Client/Rubberduck.UI/Shared/Settings/Templates/EnumValueSettingControl.xaml +++ b/Client/Rubberduck.UI/Shared/Settings/Templates/EnumValueSettingControl.xaml @@ -6,9 +6,9 @@ xmlns:local="clr-namespace:Rubberduck.UI.Shared.Settings.Templates" xmlns:viewmodels="clr-namespace:Rubberduck.UI.Shared.Settings" xmlns:shell="clr-namespace:Rubberduck.UI.Shell" xmlns:abstract="clr-namespace:Rubberduck.UI.Shared.Settings.Abstract" d:DataContext="{d:DesignInstance Type=abstract:EnumValueSettingViewModel}" - Padding="4" MinHeight="96" mc:Ignorable="d" - d:DesignHeight="96" d:DesignWidth="255"> + d:DesignWidth="500" + d:Background="{DynamicResource ThemeBackgroundColorBrush}"> @@ -17,36 +17,36 @@ - - - + diff --git a/Client/Rubberduck.UI/Shared/Settings/Templates/ListSettingControl.xaml b/Client/Rubberduck.UI/Shared/Settings/Templates/ListSettingControl.xaml index bed4d66c..49b07c14 100644 --- a/Client/Rubberduck.UI/Shared/Settings/Templates/ListSettingControl.xaml +++ b/Client/Rubberduck.UI/Shared/Settings/Templates/ListSettingControl.xaml @@ -5,10 +5,12 @@ xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:local="clr-namespace:Rubberduck.UI.Shared.Settings.Templates" xmlns:viewmodels="clr-namespace:Rubberduck.UI.Shared.Settings" - xmlns:shell="clr-namespace:Rubberduck.UI.Shell" - Padding="4" MinHeight="192" + xmlns:cmd="clr-namespace:Rubberduck.UI.Command.StaticRouted" + xmlns:shell="clr-namespace:Rubberduck.UI.Shell" + d:DataContext="{d:DesignInstance Type=viewmodels:ListSettingViewModel}" mc:Ignorable="d" - d:DesignHeight="84" d:DesignWidth="255"> + d:DesignWidth="500" + d:Background="{DynamicResource ThemeBackgroundColorBrush}"> @@ -17,34 +19,29 @@ + + + - - + - - - - - diff --git a/Client/Rubberduck.UI/Shared/Settings/Templates/ListSettingControl.xaml.cs b/Client/Rubberduck.UI/Shared/Settings/Templates/ListSettingControl.xaml.cs index 4ce01331..b2444ac8 100644 --- a/Client/Rubberduck.UI/Shared/Settings/Templates/ListSettingControl.xaml.cs +++ b/Client/Rubberduck.UI/Shared/Settings/Templates/ListSettingControl.xaml.cs @@ -1,4 +1,5 @@ -using System; +using Ookii.Dialogs.Wpf; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -24,5 +25,10 @@ public ListSettingControl() { InitializeComponent(); } + + private void OnAddListItemCommandExecuted(object sender, ExecutedRoutedEventArgs e) + { + // TODO + } } } diff --git a/Client/Rubberduck.UI/Shared/Settings/Templates/NumericSettingControl.xaml b/Client/Rubberduck.UI/Shared/Settings/Templates/NumericSettingControl.xaml index fee99764..51daf227 100644 --- a/Client/Rubberduck.UI/Shared/Settings/Templates/NumericSettingControl.xaml +++ b/Client/Rubberduck.UI/Shared/Settings/Templates/NumericSettingControl.xaml @@ -6,10 +6,11 @@ xmlns:local="clr-namespace:Rubberduck.UI.Shared.Settings.Templates" xmlns:viewmodels="clr-namespace:Rubberduck.UI.Shared.Settings" xmlns:shell="clr-namespace:Rubberduck.UI.Shell" - xmlns:b="clr-namespace:Rubberduck.UI.Behaviors" - Padding="4" MinHeight="96" + xmlns:b="clr-namespace:Rubberduck.UI.Behaviors" + d:DataContext="{d:DesignInstance Type=viewmodels:NumericSettingViewModel}" mc:Ignorable="d" - d:DesignHeight="96" d:DesignWidth="255"> + d:DesignWidth="500" + d:Background="{DynamicResource ThemeBackgroundColorBrush}"> @@ -18,34 +19,30 @@ - - - + diff --git a/Client/Rubberduck.UI/Shared/Settings/Templates/SettingGroupControl.xaml b/Client/Rubberduck.UI/Shared/Settings/Templates/SettingGroupControl.xaml index d41c7bff..07252660 100644 --- a/Client/Rubberduck.UI/Shared/Settings/Templates/SettingGroupControl.xaml +++ b/Client/Rubberduck.UI/Shared/Settings/Templates/SettingGroupControl.xaml @@ -25,7 +25,7 @@ - + + HorizontalAlignment="Left"> + + + diff --git a/Client/Rubberduck.UI/Shared/Settings/Templates/SettingSubGroupControl.xaml b/Client/Rubberduck.UI/Shared/Settings/Templates/SettingSubGroupControl.xaml index c7ea1eac..d6304258 100644 --- a/Client/Rubberduck.UI/Shared/Settings/Templates/SettingSubGroupControl.xaml +++ b/Client/Rubberduck.UI/Shared/Settings/Templates/SettingSubGroupControl.xaml @@ -5,49 +5,42 @@ xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:local="clr-namespace:Rubberduck.UI.Shared.Settings.Templates" xmlns:viewmodels="clr-namespace:Rubberduck.UI.Shared.Settings" - xmlns:shell="clr-namespace:Rubberduck.UI.Shell" - Padding="4" MinHeight="96" + xmlns:shell="clr-namespace:Rubberduck.UI.Shell" d:DataContext="{d:DesignInstance Type=viewmodels:SettingGroupViewModel}" mc:Ignorable="d" - d:DesignHeight="400" d:DesignWidth="255"> + d:DesignWidth="500" + d:Background="{DynamicResource ThemeBackgroundColorBrush}"> - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - + + + + + diff --git a/Client/Rubberduck.UI/Shared/Settings/Templates/SettingTemplateSelector.cs b/Client/Rubberduck.UI/Shared/Settings/Templates/SettingTemplateSelector.cs index 42bd61ae..cd6ab01f 100644 --- a/Client/Rubberduck.UI/Shared/Settings/Templates/SettingTemplateSelector.cs +++ b/Client/Rubberduck.UI/Shared/Settings/Templates/SettingTemplateSelector.cs @@ -1,5 +1,6 @@ using Rubberduck.InternalApi.Settings.Model; using Rubberduck.UI.Shared.Settings.Abstract; +using Rubberduck.UI.Shell.StatusBar; using System.Collections.Generic; using System.Windows; using System.Windows.Controls; @@ -16,6 +17,7 @@ internal class SettingTemplateSelector : DataTemplateSelector public DataTemplate? StringSettingTemplate { get; set; } public DataTemplate? TimeSpanSettingTemplate { get; set; } public DataTemplate? UriSettingTemplate { get; set; } + public DataTemplate? DiagnosticSettingTemplate { get; set; } private Dictionary TemplateMap => new() { @@ -32,7 +34,11 @@ internal class SettingTemplateSelector : DataTemplateSelector public override DataTemplate? SelectTemplate(object item, DependencyObject container) { - if (item is ISettingViewModel setting) + if (item is DiagnosticSettingsViewModel) + { + return DiagnosticSettingTemplate; + } + else if (item is ISettingViewModel setting) { if (TemplateMap.TryGetValue(setting.SettingDataType, out var template)) { diff --git a/Client/Rubberduck.UI/Shared/Settings/Templates/StringSettingControl.xaml b/Client/Rubberduck.UI/Shared/Settings/Templates/StringSettingControl.xaml index 6127b852..7cfd1528 100644 --- a/Client/Rubberduck.UI/Shared/Settings/Templates/StringSettingControl.xaml +++ b/Client/Rubberduck.UI/Shared/Settings/Templates/StringSettingControl.xaml @@ -6,8 +6,9 @@ xmlns:local="clr-namespace:Rubberduck.UI.Shared.Settings.Templates" xmlns:viewmodels="clr-namespace:Rubberduck.UI.Shared.Settings" xmlns:shell="clr-namespace:Rubberduck.UI.Shell" - Padding="4" MinHeight="96" - mc:Ignorable="d"> + mc:Ignorable="d" + d:DesignWidth="500" + d:Background="{DynamicResource ThemeBackgroundColorBrush}"> @@ -16,31 +17,32 @@ - - - + diff --git a/Client/Rubberduck.UI/Shared/Settings/Templates/TimeSpanSettingControl.xaml b/Client/Rubberduck.UI/Shared/Settings/Templates/TimeSpanSettingControl.xaml index 99ad7977..7b5f0edd 100644 --- a/Client/Rubberduck.UI/Shared/Settings/Templates/TimeSpanSettingControl.xaml +++ b/Client/Rubberduck.UI/Shared/Settings/Templates/TimeSpanSettingControl.xaml @@ -6,9 +6,12 @@ xmlns:local="clr-namespace:Rubberduck.UI.Shared.Settings.Templates" xmlns:viewmodels="clr-namespace:Rubberduck.UI.Shared.Settings" xmlns:shell="clr-namespace:Rubberduck.UI.Shell" - xmlns:b="clr-namespace:Rubberduck.UI.Behaviors" - Padding="4" MinHeight="96" - mc:Ignorable="d"> + xmlns:b="clr-namespace:Rubberduck.UI.Behaviors" + d:DataContext="{d:DesignInstance Type=viewmodels:TimeSpanSettingViewModel}" + MinWidth="214" + mc:Ignorable="d" + d:DesignWidth="500" + d:Background="{DynamicResource ThemeBackgroundColorBrush}"> @@ -17,42 +20,34 @@ - - - + diff --git a/Client/Rubberduck.UI/Shared/Settings/Templates/UriSettingControl.xaml b/Client/Rubberduck.UI/Shared/Settings/Templates/UriSettingControl.xaml index a8fbfda2..2fac42d1 100644 --- a/Client/Rubberduck.UI/Shared/Settings/Templates/UriSettingControl.xaml +++ b/Client/Rubberduck.UI/Shared/Settings/Templates/UriSettingControl.xaml @@ -4,11 +4,12 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:local="clr-namespace:Rubberduck.UI.Shared.Settings.Templates" - xmlns:cmd="clr-namespace:Rubberduck.UI.Command" + xmlns:cmd="clr-namespace:Rubberduck.UI.Command.StaticRouted" xmlns:vm="clr-namespace:Rubberduck.UI.Shared.Settings" xmlns:shell="clr-namespace:Rubberduck.UI.Shell" d:DataContext="{d:DesignInstance Type=vm:UriSettingViewModel}" - Padding="4" MinHeight="96" MinWidth="128" - mc:Ignorable="d"> + mc:Ignorable="d" + d:DesignWidth="500" + d:Background="{DynamicResource ThemeBackgroundColorBrush}"> @@ -17,54 +18,55 @@ - - - + + diff --git a/Client/Rubberduck.UI/Shell/Document/IDocumentTabViewModel.cs b/Client/Rubberduck.UI/Shell/Document/IDocumentTabViewModel.cs index 72f28510..91ca1005 100644 --- a/Client/Rubberduck.UI/Shell/Document/IDocumentTabViewModel.cs +++ b/Client/Rubberduck.UI/Shell/Document/IDocumentTabViewModel.cs @@ -3,6 +3,7 @@ using Rubberduck.UI.Shell.StatusBar; using Rubberduck.UI.Windows; using System; +using System.Windows.Input; namespace Rubberduck.UI.Shell.Document { @@ -35,6 +36,7 @@ public interface IDocumentTabViewModel : ITabViewModel SupportedDocumentType DocumentType { get; } IDocumentStatusViewModel Status { get; } + ICommand? ShowSettingsCommand { get; } } public interface ICodeDocumentTabViewModel : IDocumentTabViewModel diff --git a/Client/Rubberduck.UI/Shell/Document/ITextMarkerToolTip.cs b/Client/Rubberduck.UI/Shell/Document/ITextMarkerToolTip.cs new file mode 100644 index 00000000..771ebbb4 --- /dev/null +++ b/Client/Rubberduck.UI/Shell/Document/ITextMarkerToolTip.cs @@ -0,0 +1,34 @@ +using OmniSharp.Extensions.LanguageServer.Protocol.Models; +using System; +using System.Windows.Input; + +namespace Rubberduck.UI.Shell.Document; + +public interface ITextMarkerToolTip +{ + string Code { get; } + string Text { get; } + string Title { get; } + string Type { get; } + Uri? HelpUri { get; } + + string? SettingKey { get; } + DiagnosticSeverity Severity { get; } + + ICommand ShowSettingsCommand { get; } + ICommand GoToHelpUrlCommand { get; } +} + +internal class TextMarkerToolTipViewModel : ITextMarkerToolTip +{ + public string Code { get; init; } + public string Title { get; init; } + public string Type { get; init; } + public string Text { get; init; } + public string? SettingKey { get; init; } + public DiagnosticSeverity Severity { get; init; } + public Uri? HelpUri { get; init; } + + public ICommand ShowSettingsCommand { get; init; } + public ICommand GoToHelpUrlCommand { get; init; } +} \ No newline at end of file diff --git a/Client/Rubberduck.UI/Shell/Document/SourceCodeEditorControl.xaml.cs b/Client/Rubberduck.UI/Shell/Document/SourceCodeEditorControl.xaml.cs index 22c809cd..c5a9c359 100644 --- a/Client/Rubberduck.UI/Shell/Document/SourceCodeEditorControl.xaml.cs +++ b/Client/Rubberduck.UI/Shell/Document/SourceCodeEditorControl.xaml.cs @@ -1,18 +1,18 @@ using AsyncAwaitBestPractices; using ICSharpCode.AvalonEdit.Folding; using ICSharpCode.AvalonEdit.Rendering; -using Microsoft.Xaml.Behaviors.Core; -using Rubberduck.InternalApi.Extensions; using Rubberduck.InternalApi.Model; using Rubberduck.UI.Command.Abstract; using Rubberduck.UI.Services; using Rubberduck.UI.Services.Abstract; using System; using System.ComponentModel.Design; +using System.Diagnostics; using System.Linq; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; +using System.Windows.Controls.Primitives; using System.Windows.Input; namespace Rubberduck.UI.Shell.Document; @@ -44,6 +44,7 @@ public SourceCodeEditorControl() var service = UIServiceHelper.Instance ?? throw new InvalidOperationException(); ExpandAllCommand = new DelegateCommand(service, parameter => ExpandAllFoldings(), parameter => _foldings.AllFoldings.Any(folding => folding.IsFolded)) { Name = nameof(ExpandAllCommand) }; CollapseAllCommand = new DelegateCommand(service, parameter => CollapseAllFoldings(), parameter => _foldings.AllFoldings.Any(folding => !folding.IsFolded)) { Name = nameof(CollapseAllCommand) }; + GoToHelpUrlCommand = new DelegateCommand(service, ExecuteGoToPageCommand); } private void Initialize(TextMarkerService service) @@ -72,6 +73,12 @@ private void OnTextViewScrollOffsetChanged(object? sender, EventArgs e) _margin.UpdateLayout(); } + private void ExecuteGoToPageCommand(object? parameter) + { + var uri = (Uri)parameter; + new WebNavigator().Navigate(uri); + } + private void OnMouseHover(object sender, MouseEventArgs e) { var textPosition = Editor.GetPositionFromPoint(e.GetPosition(Editor)); @@ -94,7 +101,7 @@ private bool ShowMarkerToolTip(int offset) .OfType() .FirstOrDefault(); - if (marker?.ToolTip is ToolTip tooltip) + if (marker?.ToolTip is Popup tooltip) { var markerRect = BackgroundGeometryBuilder.GetRectsForSegment(Editor.TextArea.TextView, marker).First(); markerRect.Offset(2d, 1d); @@ -112,14 +119,14 @@ private bool ShowMarkerToolTip(int offset) private void HideMarkerToolTip() { - if (Editor.ToolTip is ToolTip toolTip) + if (Editor.ToolTip is Popup toolTip) { toolTip.IsOpen = false; Editor.ToolTip = null; } } - + public ICommand GoToHelpUrlCommand { get; } public ICommand ExpandAllCommand { get; } public ICommand CollapseAllCommand { get; } @@ -152,16 +159,14 @@ private void OnDataContextChanged(object sender, DependencyPropertyChangedEventA DataContextChanged -= OnDataContextChanged; Editor.Text = ViewModel.TextContent; - UpdateFoldingsAsync().SafeFireAndForget(); - UpdateDiagnostics(); - UpdateStatusInfo(); + ViewModelDocumentStateChanged(null, EventArgs.Empty); } private void ViewModelDocumentStateChanged(object? sender, EventArgs e) { - UpdateStatusInfo(); - UpdateDiagnostics(); UpdateFoldingsAsync().SafeFireAndForget(); + UpdateDiagnostics(); + UpdateStatusInfo(); } private async Task UpdateFoldingsAsync() @@ -186,18 +191,29 @@ await Dispatcher.InvokeAsync(() => firstErrorOffset = Editor.Document.GetOffset(firstErrorRange.Start.Line, 1); } - _foldings.UpdateFoldings(newFoldings, firstErrorOffset); + try + { + _foldings.UpdateFoldings(newFoldings, firstErrorOffset); + } + catch (Exception exception) + { + Debug.WriteLine(exception.ToString()); + _foldings.Clear(); + } }); } private void UpdateDiagnostics() { - _markers.RemoveAll(e => true); - _margin.InvalidateVisual(); - foreach (var diagnostic in ViewModel.CodeDocumentState.Diagnostics) + Dispatcher.Invoke(() => { - diagnostic.WithTextMarker(Editor, _markers); - } + _markers.RemoveAll(e => true); + foreach (var diagnostic in ViewModel.CodeDocumentState.Diagnostics) + { + diagnostic.WithTextMarker(Editor, _markers, ViewModel.ShowSettingsCommand!, GoToHelpUrlCommand); + } + _margin.InvalidateVisual(); + }); } private BindableTextEditor Editor { get; } diff --git a/Client/Rubberduck.UI/Shell/Document/TextMarkerToolTip.xaml b/Client/Rubberduck.UI/Shell/Document/TextMarkerToolTip.xaml index 5e940ea9..ec6f5096 100644 --- a/Client/Rubberduck.UI/Shell/Document/TextMarkerToolTip.xaml +++ b/Client/Rubberduck.UI/Shell/Document/TextMarkerToolTip.xaml @@ -1,49 +1,60 @@ - - + MaxWidth="500" + d:DataContext="{d:DesignInstance Type=local:TextMarkerToolTipViewModel, IsDesignTimeCreatable=True}" + d:DesignHeight="80" d:DesignWidth="200"> + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + - + diff --git a/Client/Rubberduck.UI/Shell/Document/TextMarkerToolTip.xaml.cs b/Client/Rubberduck.UI/Shell/Document/TextMarkerToolTip.xaml.cs index 1bb9adfd..6fdf3c39 100644 --- a/Client/Rubberduck.UI/Shell/Document/TextMarkerToolTip.xaml.cs +++ b/Client/Rubberduck.UI/Shell/Document/TextMarkerToolTip.xaml.cs @@ -1,15 +1,32 @@ -using System.Windows.Controls; +using Rubberduck.UI.Services.Abstract; +using System.Windows; +using System.Windows.Controls.Primitives; +using System.Windows.Input; namespace Rubberduck.UI.Shell.Document { /// /// Interaction logic for TextMarkerToolTip.xaml /// - public partial class TextMarkerToolTip : ToolTip + public partial class TextMarkerToolTip : Popup { public TextMarkerToolTip() { InitializeComponent(); + var thumb = new Thumb { Width = 0, Height = 0 }; + ContentCanvas.Children.Add(thumb); + + MouseDown += (sender, e) => thumb.RaiseEvent(e); + thumb.DragDelta += (sender, e) => + { + HorizontalOffset += e.HorizontalChange; + VerticalOffset += e.VerticalChange; + }; + } + + private void OnDismiss(object sender, RoutedEventArgs e) + { + IsOpen = false; } } } diff --git a/Client/Rubberduck.UI/Shell/Document/TextMarkersMargin.cs b/Client/Rubberduck.UI/Shell/Document/TextMarkersMargin.cs index 2b8665c2..b4279618 100644 --- a/Client/Rubberduck.UI/Shell/Document/TextMarkersMargin.cs +++ b/Client/Rubberduck.UI/Shell/Document/TextMarkersMargin.cs @@ -15,7 +15,7 @@ namespace Rubberduck.UI.Shell.Document { /// - /// TODO see https://github.com/AvaloniaUI/AvaloniaEdit/blob/master/src/AvaloniaEdit/Editing/LineNumberMargin.cs for how-to + /// See https://github.com/AvaloniaUI/AvaloniaEdit/blob/master/src/AvaloniaEdit/Editing/LineNumberMargin.cs for how-to /// public class TextMarkersMargin : AbstractMargin { @@ -42,9 +42,13 @@ protected override HitTestResult HitTestCore(PointHitTestParameters hitTestParam protected override Size MeasureOverride(Size availableSize) { - return new Size(24, 0); + return new Size(MarginWidth, 0); } + private static readonly int MarginWidth = 24; + private static readonly int IconWidth = 16; + private static readonly int IconPositionX = (MarginWidth - IconWidth) / 2; + protected override void OnRender(DrawingContext drawingContext) { TextView textView = base.TextView; @@ -69,9 +73,9 @@ protected override void OnRender(DrawingContext drawingContext) var visualYPosition = visualLine.GetTextLineVisualYPosition(visualLine.TextLines[0], VisualYPosition.TextTop); var rect = new Rect { - Width = 16, - Height = 16, - X = 2, + Width = IconWidth, + Height = IconWidth, // not a typo, it's 16x16 + X = IconPositionX, Y = visualYPosition - textView.VerticalOffset }; diff --git a/Client/Rubberduck.UI/Shell/MenuBarControl.xaml b/Client/Rubberduck.UI/Shell/MenuBarControl.xaml index 9e647203..780f6a9f 100644 --- a/Client/Rubberduck.UI/Shell/MenuBarControl.xaml +++ b/Client/Rubberduck.UI/Shell/MenuBarControl.xaml @@ -4,7 +4,7 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:local="clr-namespace:Rubberduck.UI.Shell" - xmlns:cmd="clr-namespace:Rubberduck.UI.Command" + xmlns:cmd="clr-namespace:Rubberduck.UI.Command.StaticRouted" mc:Ignorable="d" d:DesignHeight="24" d:DesignWidth="800" VerticalContentAlignment="Center"> diff --git a/Client/Rubberduck.UI/Shell/StatusBar/IProgressStatusViewModel.cs b/Client/Rubberduck.UI/Shell/StatusBar/IProgressStatusViewModel.cs index 8d522bef..1386a7e7 100644 --- a/Client/Rubberduck.UI/Shell/StatusBar/IProgressStatusViewModel.cs +++ b/Client/Rubberduck.UI/Shell/StatusBar/IProgressStatusViewModel.cs @@ -7,6 +7,11 @@ namespace Rubberduck.UI.Shell.StatusBar /// public interface IProgressStatusViewModel : IStatusBarViewModel { + /// + /// An indicator, true whenever the document's idle timer is ticking, indicating the user is typing in the editor. + /// + bool IsWriting { get; set; } + /// /// Gets or sets the current progress indicator value. /// diff --git a/Client/Rubberduck.UI/Shell/StatusBar/StatusBarControl.xaml b/Client/Rubberduck.UI/Shell/StatusBar/StatusBarControl.xaml index ef3a1482..08576af6 100644 --- a/Client/Rubberduck.UI/Shell/StatusBar/StatusBarControl.xaml +++ b/Client/Rubberduck.UI/Shell/StatusBar/StatusBarControl.xaml @@ -28,21 +28,10 @@ - - - - + Icon="{Binding StatusBar.ServerConnectionState, Converter={StaticResource ServerConnectionStateToIconConverter}}" + Height="14" Width="14" + Command="{Binding StatusBar.ShowLanguageServerTraceCommand}"/> + @@ -51,7 +40,7 @@ Visibility="{Binding StatusBar.ProgressMaxValue, Converter={StaticResource HasItemsVisibilityConverter}}"/> - + @@ -144,20 +133,27 @@ - + + + + + + + + diff --git a/Client/Rubberduck.UI/Shell/Tools/WorkspaceExplorer/WorkspaceExplorerControl.xaml b/Client/Rubberduck.UI/Shell/Tools/WorkspaceExplorer/WorkspaceExplorerControl.xaml index 508f92e0..c70ce4ce 100644 --- a/Client/Rubberduck.UI/Shell/Tools/WorkspaceExplorer/WorkspaceExplorerControl.xaml +++ b/Client/Rubberduck.UI/Shell/Tools/WorkspaceExplorer/WorkspaceExplorerControl.xaml @@ -6,7 +6,7 @@ xmlns:b="clr-namespace:Rubberduck.UI.Behaviors" xmlns:xb="http://schemas.microsoft.com/xaml/behaviors" xmlns:shell="clr-namespace:Rubberduck.UI.Shell" - xmlns:cmd="clr-namespace:Rubberduck.UI.Command" + xmlns:cmd="clr-namespace:Rubberduck.UI.Command.StaticRouted" xmlns:local="clr-namespace:Rubberduck.UI.Shell.Tools.WorkspaceExplorer" d:DataContext="{d:DesignInstance Type=local:IWorkspaceExplorerViewModel, IsDesignTimeCreatable=False}" mc:Ignorable="d" diff --git a/Client/Rubberduck.UI/Styles/DefaultStyle.xaml b/Client/Rubberduck.UI/Styles/DefaultStyle.xaml index 6207b3dc..7e86b660 100644 --- a/Client/Rubberduck.UI/Styles/DefaultStyle.xaml +++ b/Client/Rubberduck.UI/Styles/DefaultStyle.xaml @@ -67,12 +67,16 @@ + + + + @@ -356,10 +360,10 @@ + + + + + - + + + + + \ No newline at end of file diff --git a/Client/Rubberduck.UI/Styles/Icons.xaml b/Client/Rubberduck.UI/Styles/Icons.xaml index 32416850..90b35efc 100644 --- a/Client/Rubberduck.UI/Styles/Icons.xaml +++ b/Client/Rubberduck.UI/Styles/Icons.xaml @@ -19,10 +19,15 @@ + + + + + diff --git a/Client/Rubberduck.UI/Styles/Templates.xaml b/Client/Rubberduck.UI/Styles/Templates.xaml index a4e21199..44158f65 100644 --- a/Client/Rubberduck.UI/Styles/Templates.xaml +++ b/Client/Rubberduck.UI/Styles/Templates.xaml @@ -382,6 +382,9 @@ + + + + UriSettingTemplate="{StaticResource UriSettingTemplate}" + DiagnosticSettingTemplate="{StaticResource DiagnosticsSettingTemplate}" /> \ No newline at end of file diff --git a/Rubberduck3.sln b/Rubberduck3.sln index ebc03c3c..5bfe19b5 100644 --- a/Rubberduck3.sln +++ b/Rubberduck3.sln @@ -16,15 +16,11 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Rubberduck.Tests", "Tests\R EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Client", "Client", "{C3F2A120-EFE1-4BF4-A4AE-EAF6882F8521}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Rubberduck.Main", "Client\Rubberduck.Main\Rubberduck.Main.csproj", "{EA66AB03-FEDA-4148-964D-797603F3A6C7}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Rubberduck.VBEditor", "Client\Rubberduck.VBEditor\Rubberduck.VBEditor.csproj", "{030FDE59-C347-4B81-AB80-5B4B80B757A0}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Rubberduck.VBEditor.VBA", "Client\Rubberduck.VBEditor.VBA\Rubberduck.VBEditor.VBA.csproj", "{4CCD023C-A503-4BC7-9E9A-A509B4A16D41}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Rubberduck.Editor", "Client\Rubberduck.Editor\Rubberduck.Editor.csproj", "{0ED24079-1626-472E-95A8-FB5641C60761}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Rubberduck.UI", "Client\Rubberduck.UI\Rubberduck.UI.csproj", "{FC5ECD51-175B-42D6-B46C-130B57AA1EBC}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Rubberduck.Unmanaged", "Client\Rubberduck.Unmanaged\Rubberduck.Unmanaged.csproj", "{815051EA-F30A-49A7-B6D4-9A8CFEE96157}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Rubberduck.Unmanaged", "AddIn\Rubberduck.Unmanaged\Rubberduck.Unmanaged.csproj", "{815051EA-F30A-49A7-B6D4-9A8CFEE96157}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Shared", "Shared", "{7522C02F-05D8-474B-B27D-CA5185FF717E}" EndProject @@ -38,15 +34,19 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Rubberduck.ServerPlatform", EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Rubberduck.LanguageServer", "Server\Rubberduck.LanguageServer\Rubberduck.LanguageServer.csproj", "{F05E5168-3EF4-4D6A-8C68-A6722E013EE4}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Rubberduck.Parsing", "Server\Rubberduck.Parsing\Rubberduck.Parsing.csproj", "{D1972815-52A8-472A-AF10-CDF8FC9AE15E}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Rubberduck.UpdateServer", "Server\Rubberduck.UpdateServer\Rubberduck.UpdateServer.csproj", "{72A8288E-3BFC-412F-8F72-2F169A7CC648}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Rubberduck.TelemetryServer", "Server\Rubberduck.TelemetryServer\Rubberduck.TelemetryServer.csproj", "{3FC3F445-6222-4884-B6D3-E6D8B61F37C6}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "AddIn", "AddIn", "{EA789E19-501A-413E-A17A-2EF481EFB605}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Rubberduck.Editor", "Client\Rubberduck.Editor\Rubberduck.Editor.csproj", "{0ED24079-1626-472E-95A8-FB5641C60761}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Rubberduck.Main", "AddIn\Rubberduck.Main\Rubberduck.Main.csproj", "{EA66AB03-FEDA-4148-964D-797603F3A6C7}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Rubberduck.Parsing", "Server\Rubberduck.Parsing\Rubberduck.Parsing.csproj", "{D1972815-52A8-472A-AF10-CDF8FC9AE15E}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Rubberduck.VBEditor", "AddIn\Rubberduck.VBEditor\Rubberduck.VBEditor.csproj", "{030FDE59-C347-4B81-AB80-5B4B80B757A0}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Rubberduck.VBEditor.VBA", "AddIn\Rubberduck.VBEditor.VBA\Rubberduck.VBEditor.VBA.csproj", "{4CCD023C-A503-4BC7-9E9A-A509B4A16D41}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -64,30 +64,14 @@ Global {561B2738-7BFE-4974-B1CE-E5D910C770B3}.Release|Any CPU.Build.0 = Release|Any CPU {561B2738-7BFE-4974-B1CE-E5D910C770B3}.Release|x64.ActiveCfg = Release|x64 {561B2738-7BFE-4974-B1CE-E5D910C770B3}.Release|x64.Build.0 = Release|x64 - {EA66AB03-FEDA-4148-964D-797603F3A6C7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {EA66AB03-FEDA-4148-964D-797603F3A6C7}.Debug|Any CPU.Build.0 = Debug|Any CPU - {EA66AB03-FEDA-4148-964D-797603F3A6C7}.Debug|x64.ActiveCfg = Debug|x64 - {EA66AB03-FEDA-4148-964D-797603F3A6C7}.Debug|x64.Build.0 = Debug|x64 - {EA66AB03-FEDA-4148-964D-797603F3A6C7}.Release|Any CPU.ActiveCfg = Release|Any CPU - {EA66AB03-FEDA-4148-964D-797603F3A6C7}.Release|Any CPU.Build.0 = Release|Any CPU - {EA66AB03-FEDA-4148-964D-797603F3A6C7}.Release|x64.ActiveCfg = Release|x64 - {EA66AB03-FEDA-4148-964D-797603F3A6C7}.Release|x64.Build.0 = Release|x64 - {030FDE59-C347-4B81-AB80-5B4B80B757A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {030FDE59-C347-4B81-AB80-5B4B80B757A0}.Debug|Any CPU.Build.0 = Debug|Any CPU - {030FDE59-C347-4B81-AB80-5B4B80B757A0}.Debug|x64.ActiveCfg = Debug|x64 - {030FDE59-C347-4B81-AB80-5B4B80B757A0}.Debug|x64.Build.0 = Debug|x64 - {030FDE59-C347-4B81-AB80-5B4B80B757A0}.Release|Any CPU.ActiveCfg = Release|Any CPU - {030FDE59-C347-4B81-AB80-5B4B80B757A0}.Release|Any CPU.Build.0 = Release|Any CPU - {030FDE59-C347-4B81-AB80-5B4B80B757A0}.Release|x64.ActiveCfg = Release|x64 - {030FDE59-C347-4B81-AB80-5B4B80B757A0}.Release|x64.Build.0 = Release|x64 - {4CCD023C-A503-4BC7-9E9A-A509B4A16D41}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4CCD023C-A503-4BC7-9E9A-A509B4A16D41}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4CCD023C-A503-4BC7-9E9A-A509B4A16D41}.Debug|x64.ActiveCfg = Debug|x64 - {4CCD023C-A503-4BC7-9E9A-A509B4A16D41}.Debug|x64.Build.0 = Debug|x64 - {4CCD023C-A503-4BC7-9E9A-A509B4A16D41}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4CCD023C-A503-4BC7-9E9A-A509B4A16D41}.Release|Any CPU.Build.0 = Release|Any CPU - {4CCD023C-A503-4BC7-9E9A-A509B4A16D41}.Release|x64.ActiveCfg = Release|x64 - {4CCD023C-A503-4BC7-9E9A-A509B4A16D41}.Release|x64.Build.0 = Release|x64 + {0ED24079-1626-472E-95A8-FB5641C60761}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0ED24079-1626-472E-95A8-FB5641C60761}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0ED24079-1626-472E-95A8-FB5641C60761}.Debug|x64.ActiveCfg = Debug|Any CPU + {0ED24079-1626-472E-95A8-FB5641C60761}.Debug|x64.Build.0 = Debug|Any CPU + {0ED24079-1626-472E-95A8-FB5641C60761}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0ED24079-1626-472E-95A8-FB5641C60761}.Release|Any CPU.Build.0 = Release|Any CPU + {0ED24079-1626-472E-95A8-FB5641C60761}.Release|x64.ActiveCfg = Release|Any CPU + {0ED24079-1626-472E-95A8-FB5641C60761}.Release|x64.Build.0 = Release|Any CPU {FC5ECD51-175B-42D6-B46C-130B57AA1EBC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {FC5ECD51-175B-42D6-B46C-130B57AA1EBC}.Debug|Any CPU.Build.0 = Debug|Any CPU {FC5ECD51-175B-42D6-B46C-130B57AA1EBC}.Debug|x64.ActiveCfg = Debug|x64 @@ -136,6 +120,14 @@ Global {F05E5168-3EF4-4D6A-8C68-A6722E013EE4}.Release|Any CPU.Build.0 = Release|Any CPU {F05E5168-3EF4-4D6A-8C68-A6722E013EE4}.Release|x64.ActiveCfg = Release|x64 {F05E5168-3EF4-4D6A-8C68-A6722E013EE4}.Release|x64.Build.0 = Release|x64 + {D1972815-52A8-472A-AF10-CDF8FC9AE15E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D1972815-52A8-472A-AF10-CDF8FC9AE15E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D1972815-52A8-472A-AF10-CDF8FC9AE15E}.Debug|x64.ActiveCfg = Debug|Any CPU + {D1972815-52A8-472A-AF10-CDF8FC9AE15E}.Debug|x64.Build.0 = Debug|Any CPU + {D1972815-52A8-472A-AF10-CDF8FC9AE15E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D1972815-52A8-472A-AF10-CDF8FC9AE15E}.Release|Any CPU.Build.0 = Release|Any CPU + {D1972815-52A8-472A-AF10-CDF8FC9AE15E}.Release|x64.ActiveCfg = Release|Any CPU + {D1972815-52A8-472A-AF10-CDF8FC9AE15E}.Release|x64.Build.0 = Release|Any CPU {72A8288E-3BFC-412F-8F72-2F169A7CC648}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {72A8288E-3BFC-412F-8F72-2F169A7CC648}.Debug|Any CPU.Build.0 = Debug|Any CPU {72A8288E-3BFC-412F-8F72-2F169A7CC648}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -152,39 +144,48 @@ Global {3FC3F445-6222-4884-B6D3-E6D8B61F37C6}.Release|Any CPU.Build.0 = Release|Any CPU {3FC3F445-6222-4884-B6D3-E6D8B61F37C6}.Release|x64.ActiveCfg = Release|Any CPU {3FC3F445-6222-4884-B6D3-E6D8B61F37C6}.Release|x64.Build.0 = Release|Any CPU - {0ED24079-1626-472E-95A8-FB5641C60761}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {0ED24079-1626-472E-95A8-FB5641C60761}.Debug|Any CPU.Build.0 = Debug|Any CPU - {0ED24079-1626-472E-95A8-FB5641C60761}.Debug|x64.ActiveCfg = Debug|Any CPU - {0ED24079-1626-472E-95A8-FB5641C60761}.Debug|x64.Build.0 = Debug|Any CPU - {0ED24079-1626-472E-95A8-FB5641C60761}.Release|Any CPU.ActiveCfg = Release|Any CPU - {0ED24079-1626-472E-95A8-FB5641C60761}.Release|Any CPU.Build.0 = Release|Any CPU - {0ED24079-1626-472E-95A8-FB5641C60761}.Release|x64.ActiveCfg = Release|Any CPU - {0ED24079-1626-472E-95A8-FB5641C60761}.Release|x64.Build.0 = Release|Any CPU - {D1972815-52A8-472A-AF10-CDF8FC9AE15E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D1972815-52A8-472A-AF10-CDF8FC9AE15E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D1972815-52A8-472A-AF10-CDF8FC9AE15E}.Debug|x64.ActiveCfg = Debug|Any CPU - {D1972815-52A8-472A-AF10-CDF8FC9AE15E}.Debug|x64.Build.0 = Debug|Any CPU - {D1972815-52A8-472A-AF10-CDF8FC9AE15E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D1972815-52A8-472A-AF10-CDF8FC9AE15E}.Release|Any CPU.Build.0 = Release|Any CPU - {D1972815-52A8-472A-AF10-CDF8FC9AE15E}.Release|x64.ActiveCfg = Release|Any CPU - {D1972815-52A8-472A-AF10-CDF8FC9AE15E}.Release|x64.Build.0 = Release|Any CPU + {EA66AB03-FEDA-4148-964D-797603F3A6C7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EA66AB03-FEDA-4148-964D-797603F3A6C7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EA66AB03-FEDA-4148-964D-797603F3A6C7}.Debug|x64.ActiveCfg = Debug|x64 + {EA66AB03-FEDA-4148-964D-797603F3A6C7}.Debug|x64.Build.0 = Debug|x64 + {EA66AB03-FEDA-4148-964D-797603F3A6C7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EA66AB03-FEDA-4148-964D-797603F3A6C7}.Release|Any CPU.Build.0 = Release|Any CPU + {EA66AB03-FEDA-4148-964D-797603F3A6C7}.Release|x64.ActiveCfg = Release|x64 + {EA66AB03-FEDA-4148-964D-797603F3A6C7}.Release|x64.Build.0 = Release|x64 + {030FDE59-C347-4B81-AB80-5B4B80B757A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {030FDE59-C347-4B81-AB80-5B4B80B757A0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {030FDE59-C347-4B81-AB80-5B4B80B757A0}.Debug|x64.ActiveCfg = Debug|x64 + {030FDE59-C347-4B81-AB80-5B4B80B757A0}.Debug|x64.Build.0 = Debug|x64 + {030FDE59-C347-4B81-AB80-5B4B80B757A0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {030FDE59-C347-4B81-AB80-5B4B80B757A0}.Release|Any CPU.Build.0 = Release|Any CPU + {030FDE59-C347-4B81-AB80-5B4B80B757A0}.Release|x64.ActiveCfg = Release|x64 + {030FDE59-C347-4B81-AB80-5B4B80B757A0}.Release|x64.Build.0 = Release|x64 + {4CCD023C-A503-4BC7-9E9A-A509B4A16D41}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4CCD023C-A503-4BC7-9E9A-A509B4A16D41}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4CCD023C-A503-4BC7-9E9A-A509B4A16D41}.Debug|x64.ActiveCfg = Debug|x64 + {4CCD023C-A503-4BC7-9E9A-A509B4A16D41}.Debug|x64.Build.0 = Debug|x64 + {4CCD023C-A503-4BC7-9E9A-A509B4A16D41}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4CCD023C-A503-4BC7-9E9A-A509B4A16D41}.Release|Any CPU.Build.0 = Release|Any CPU + {4CCD023C-A503-4BC7-9E9A-A509B4A16D41}.Release|x64.ActiveCfg = Release|x64 + {4CCD023C-A503-4BC7-9E9A-A509B4A16D41}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution - {EA66AB03-FEDA-4148-964D-797603F3A6C7} = {EA789E19-501A-413E-A17A-2EF481EFB605} - {030FDE59-C347-4B81-AB80-5B4B80B757A0} = {EA789E19-501A-413E-A17A-2EF481EFB605} - {4CCD023C-A503-4BC7-9E9A-A509B4A16D41} = {EA789E19-501A-413E-A17A-2EF481EFB605} + {0ED24079-1626-472E-95A8-FB5641C60761} = {C3F2A120-EFE1-4BF4-A4AE-EAF6882F8521} {FC5ECD51-175B-42D6-B46C-130B57AA1EBC} = {C3F2A120-EFE1-4BF4-A4AE-EAF6882F8521} + {815051EA-F30A-49A7-B6D4-9A8CFEE96157} = {EA789E19-501A-413E-A17A-2EF481EFB605} {5E2588A5-2EF2-4267-952D-53AEC8F5F173} = {7522C02F-05D8-474B-B27D-CA5185FF717E} {ED65BAAD-743D-4144-AEE2-8D956E6DA599} = {7522C02F-05D8-474B-B27D-CA5185FF717E} {8D218701-AF68-4013-B9C0-108C1D162E11} = {3CD71E77-0A37-4ACB-8651-2F874EA29AE2} {F05E5168-3EF4-4D6A-8C68-A6722E013EE4} = {3CD71E77-0A37-4ACB-8651-2F874EA29AE2} + {D1972815-52A8-472A-AF10-CDF8FC9AE15E} = {3CD71E77-0A37-4ACB-8651-2F874EA29AE2} {72A8288E-3BFC-412F-8F72-2F169A7CC648} = {3CD71E77-0A37-4ACB-8651-2F874EA29AE2} {3FC3F445-6222-4884-B6D3-E6D8B61F37C6} = {3CD71E77-0A37-4ACB-8651-2F874EA29AE2} - {0ED24079-1626-472E-95A8-FB5641C60761} = {C3F2A120-EFE1-4BF4-A4AE-EAF6882F8521} - {D1972815-52A8-472A-AF10-CDF8FC9AE15E} = {3CD71E77-0A37-4ACB-8651-2F874EA29AE2} + {EA66AB03-FEDA-4148-964D-797603F3A6C7} = {EA789E19-501A-413E-A17A-2EF481EFB605} + {030FDE59-C347-4B81-AB80-5B4B80B757A0} = {EA789E19-501A-413E-A17A-2EF481EFB605} + {4CCD023C-A503-4BC7-9E9A-A509B4A16D41} = {EA789E19-501A-413E-A17A-2EF481EFB605} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {17B5E48B-DCFD-45F2-A672-3505C8225149} diff --git a/Server/Rubberduck.CodeAnalysis/Abstract/IInspection.cs b/Server/Rubberduck.CodeAnalysis.Legacy/Abstract/IInspection.cs similarity index 100% rename from Server/Rubberduck.CodeAnalysis/Abstract/IInspection.cs rename to Server/Rubberduck.CodeAnalysis.Legacy/Abstract/IInspection.cs diff --git a/Server/Rubberduck.CodeAnalysis/CodeInspectionSeverity.cs b/Server/Rubberduck.CodeAnalysis.Legacy/CodeInspectionSeverity.cs similarity index 100% rename from Server/Rubberduck.CodeAnalysis/CodeInspectionSeverity.cs rename to Server/Rubberduck.CodeAnalysis.Legacy/CodeInspectionSeverity.cs diff --git a/Server/Rubberduck.CodeAnalysis/CodeInspectionType.cs b/Server/Rubberduck.CodeAnalysis.Legacy/CodeInspectionType.cs similarity index 100% rename from Server/Rubberduck.CodeAnalysis/CodeInspectionType.cs rename to Server/Rubberduck.CodeAnalysis.Legacy/CodeInspectionType.cs diff --git a/Server/Rubberduck.CodeAnalysis/Properties/AssemblyInfo.cs b/Server/Rubberduck.CodeAnalysis.Legacy/Properties/AssemblyInfo.cs similarity index 100% rename from Server/Rubberduck.CodeAnalysis/Properties/AssemblyInfo.cs rename to Server/Rubberduck.CodeAnalysis.Legacy/Properties/AssemblyInfo.cs diff --git a/Server/Rubberduck.CodeAnalysis/Results/InspectionResult.cs b/Server/Rubberduck.CodeAnalysis.Legacy/Results/InspectionResult.cs similarity index 100% rename from Server/Rubberduck.CodeAnalysis/Results/InspectionResult.cs rename to Server/Rubberduck.CodeAnalysis.Legacy/Results/InspectionResult.cs diff --git a/Server/Rubberduck.CodeAnalysis/Results/QualifiedContextInspectionResult.cs b/Server/Rubberduck.CodeAnalysis.Legacy/Results/QualifiedContextInspectionResult.cs similarity index 100% rename from Server/Rubberduck.CodeAnalysis/Results/QualifiedContextInspectionResult.cs rename to Server/Rubberduck.CodeAnalysis.Legacy/Results/QualifiedContextInspectionResult.cs diff --git a/Server/Rubberduck.CodeAnalysis/Rubberduck.CodeAnalysis.csproj b/Server/Rubberduck.CodeAnalysis.Legacy/Rubberduck.CodeAnalysis.csproj similarity index 100% rename from Server/Rubberduck.CodeAnalysis/Rubberduck.CodeAnalysis.csproj rename to Server/Rubberduck.CodeAnalysis.Legacy/Rubberduck.CodeAnalysis.csproj diff --git a/Server/Rubberduck.CodeAnalysis/app.config b/Server/Rubberduck.CodeAnalysis.Legacy/app.config similarity index 100% rename from Server/Rubberduck.CodeAnalysis/app.config rename to Server/Rubberduck.CodeAnalysis.Legacy/app.config diff --git a/Server/Rubberduck.CodeAnalysis/packages.config b/Server/Rubberduck.CodeAnalysis.Legacy/packages.config similarity index 100% rename from Server/Rubberduck.CodeAnalysis/packages.config rename to Server/Rubberduck.CodeAnalysis.Legacy/packages.config diff --git a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/App.config b/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/App.config deleted file mode 100644 index eb7cb752..00000000 --- a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/App.config +++ /dev/null @@ -1,179 +0,0 @@ - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 32 - - - Rubberduck.Server.Database.RPC - - - Rubberduck.Server.Database - - - - \ No newline at end of file diff --git a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Configuration/DatabaseServerCapabilities.cs b/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Configuration/DatabaseServerCapabilities.cs deleted file mode 100644 index a16eb5f4..00000000 --- a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Configuration/DatabaseServerCapabilities.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace Rubberduck.Server.Database.Configuration -{ - public class DatabaseServerCapabilities - { - public static DatabaseServerCapabilities Default { get; } = new DatabaseServerCapabilities - { - /*TODO*/ - }; - - - /*TODO*/ - } -} diff --git a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Configuration/IServiceCollectionExtensions.cs b/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Configuration/IServiceCollectionExtensions.cs deleted file mode 100644 index d1dec64b..00000000 --- a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Configuration/IServiceCollectionExtensions.cs +++ /dev/null @@ -1,61 +0,0 @@ -using Microsoft.Extensions.DependencyInjection; -using OmniSharp.Extensions.JsonRpc; -using Rubberduck.ServerPlatform.Platform.Model.Database; -using Rubberduck.Server.Database.Properties; -using Rubberduck.Server.Database.RPC.Connect; -using Rubberduck.Server.Database.RPC.Disconnect; -using Rubberduck.Server.Database.RPC.Info; -using Rubberduck.Server.Database.RPC.Query; -using Rubberduck.Server.Database.RPC.Save; -using System; -using System.IO; -using System.IO.Pipes; -using System.Threading; -using System.Threading.Tasks; - -namespace Rubberduck.Server.Database.Configuration -{ - internal static class IServiceCollectionExtensions - { - public static IServiceCollection AddRubberduckServerServices(this IServiceCollection services, DatabaseServerCapabilities config, CancellationTokenSource cts) => - services.AddJsonRpcServer(Settings.Default.JsonRpcServerName, ConfigureRPC) - //.AddOtherServicesHere() - ; - - private static void ConfigureRPC(JsonRpcServerOptions rpc) - { - var (input, output) = WithAsyncNamedPipeTransport(Settings.Default.JsonRpcPipeName); - rpc.Concurrency = Settings.Default.MaxConcurrentRequests; - - rpc.WithRequestProcessIdentifier(new ParallelRequestProcessIdentifier()) - .WithMaximumRequestTimeout(TimeSpan.FromSeconds(10)) - - .WithInput(input) - .WithOutput(output) - - .AddHandler() - .AddHandler() - .AddHandler() - - .AddHandler>() - .AddHandler>() - .AddHandler>() - .AddHandler>() - .AddHandler>() - .AddHandler>() - .AddHandler>() - .AddHandler>() - - .AddHandler>() - .AddHandler>() - ; - } - - private static (Stream input, Stream output) WithAsyncNamedPipeTransport(string name) - { - var input = new NamedPipeServerStream(name, PipeDirection.InOut, 1, PipeTransmissionMode.Message, PipeOptions.Asynchronous); - var output = new NamedPipeClientStream(".", name, PipeDirection.InOut, PipeOptions.Asynchronous); - return (input, output); - } - } -} diff --git a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Configuration/StartupOptions.cs b/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Configuration/StartupOptions.cs deleted file mode 100644 index 785a0476..00000000 --- a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Configuration/StartupOptions.cs +++ /dev/null @@ -1,22 +0,0 @@ -using CommandLine; - -namespace Rubberduck.Server.Database.Configuration -{ - /// - /// The server startup options, defined by command-line arguments. - /// - public class StartupOptions - { - /// - /// Whether this server starts with verbose messages enabled. - /// - [Option('v', "verbose", Required = false, HelpText = "Whether this server starts with verbose messages enabled.")] - public bool Verbose { get; set; } - - /// - /// Whether trace output is disabled on this server. - /// - [Option('s', "silent", Required = false, HelpText = "Whether trace output is disabled on this server.")] - public bool Silent { get; set; } - } -} diff --git a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/DatabaseServer.html b/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/DatabaseServer.html deleted file mode 100644 index c6a7e6fc..00000000 --- a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/DatabaseServer.html +++ /dev/null @@ -1,938 +0,0 @@ - - - - - Rubberduck.db Database Schema - - - - -

Rubberduck.db Database Schema

- -
-

- Database Properties -

- - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyValue
DatabaseC:\Users\mathi\source\repos\Rubberduck3\Rubberduck.Data\Rubberduck.db
ServerVersion3.38.5.1
DatabaseSize92 KB
Created12/17/2022 10:56 AM
-
-
-

Table DeclarationAnnotations

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeNULLComment
IdbigintIDENTITY (1,1)
DeclarationIdbigintDeclarations.Id
AnnotationNametext -
AnnotationArgstext -
ContextStartOffsetbigint -
ContextEndOffsetbigint -
IdentifierStartOffsetbigint -
IdentifierEndOffsetbigint -
-
-
-

Table DeclarationAttributes

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeNULLComment
IdbigintIDENTITY (1,1)
DeclarationIdbigintDeclarations.Id
AttributeNametext -
AttributeValuestext -
ContextStartOffsetbigint -
ContextEndOffsetbigint -
IdentifierStartOffsetbigint -
IdentifierEndOffsetbigint -
-
-
-

Table DeclarationInterfaces

- - - - - - - - - - - - - - - - - - - - - - - -
NameTypeNULLComment
DeclarationIdbigintDeclarations.Id
ImplementsDeclarationIdbigintDeclarations.Id
-
-
-

Table Declarations

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeNULLComment
IdbigintIDENTITY (1,1)
DeclarationTypebigint -
IdentifierNametext -
DocStringtext -
IsUserDefinedbigint -
AsTypeNametext -
AsTypeDeclarationIdbigintDeclarations.Id
IsArraybigint -
TypeHinttext -
ParentDeclarationIdbigintDeclarations.Id
ContextStartOffsetbigint -
ContextEndOffsetbigint -
IdentifierStartOffsetbigint -
IdentifierEndOffsetbigint -
-
-
-

Table IdentifierReferenceAnnotations

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeNULLComment
IdbigintIDENTITY (1,1)
IdentifierReferenceIdbigintIdentifierReferences.Id
AnnotationNametext -
AnnotationArgstext -
ContextStartOffsetbigint -
ContextEndOffsetbigint -
IdentifierStartOffsetbigint -
IdentifierEndOffsetbigint -
-
-
-

Table IdentifierReferences

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeNULLComment
IdbigintIDENTITY (1,1)
ReferencedDeclarationIdbigintDeclarations.Id
ParentDeclarationIdbigintDeclarations.Id
QualifyingReferenceIdbigintIdentifierReferences.Id
IsAssignmentTargetbigint -
IsExplicitCallStatementbigint -
IsExplicitLetAssignmentbigint -
IsSetAssignmentbigint -
IsReDimbigint -
IsArrayAccessbigint -
IsProcedureCoercionbigint -
IsIndexedDefaultMemberAccessbigint -
IsNonIndexedDefaultMemberAccessbigint -
IsInnerRecursiveDefaultMemberAccessbigint -
DefaultMemberRecursionDepthbigint -
TypeHinttext -
ContextStartOffsetbigint -
ContextEndOffsetbigint -
IdentifierStartOffsetbigint -
IdentifierEndOffsetbigint -
-
-
-

Table Locals

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeNULLComment
IdbigintIDENTITY (1,1)
DeclarationIdbigintDeclarations.Id
IsAutoAssignedbigint -
DeclaredValuetext -
-
-
-

Table Members

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeNULLComment
IdbigintIDENTITY (1,1)
DeclarationIdbigintDeclarations.Id
ImplementsDeclarationIdbigintDeclarations.Id
Accessibilitybigint -
IsAutoAssignedbigint -
IsWithEventsbigint -
IsDimStmtbigint -
ValueExpressiontext -
-
-
-

Table ModuleInterfaces

- - - - - - - - - - - - - - - - - - - - - - - -
NameTypeNULLComment
ModuleIdbigintModules.Id
ImplementsModuleIdbigintModules.Id
-
-
-

Table Modules

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeNULLComment
IdbigintIDENTITY (1,1)
DeclarationIdbigintDeclarations.Id
Foldertext -
-
-
-

Table Parameters

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeNULLComment
IdbigintIDENTITY (1,1)
DeclarationIdbigintDeclarations.Id
Positionbigint -
IsParamArraybigint -
IsOptionalbigint -
IsByRefbigint -
IsByValbigint -
IsModifierImplicitbigint -
DefaultValuetext -
-
-
-

Table Projects

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeNULLComment
IdbigintIDENTITY (1,1)
DeclarationIdbigintDeclarations.Id
VBProjectIdtext -
Guidtext -
MajorVersionbigint -
MinorVersionbigint -
Pathtext -
-
-
-

Table ProjectSettings

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeNULLComment
IdbigintIDENTITY (1,1)
ProjectIdbigintProjects.Id
DataTypebigint -
Keytext -
Valuetext -
-
- - - \ No newline at end of file diff --git a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Ducky.ico b/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Ducky.ico deleted file mode 100644 index 7f989a7f..00000000 Binary files a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Ducky.ico and /dev/null differ diff --git a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Internal/Abstract/IDbConnectionProvider.cs b/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Internal/Abstract/IDbConnectionProvider.cs deleted file mode 100644 index 60e5ce59..00000000 --- a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Internal/Abstract/IDbConnectionProvider.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System; -using System.Data; - -namespace Rubberduck.Server.Database.Internal.Storage.Abstract -{ - internal interface IDbConnectionProvider : IDisposable - { - IDbConnection GetOrCreateConnection(); - } -} diff --git a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Internal/Abstract/IUnitOfWork.cs b/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Internal/Abstract/IUnitOfWork.cs deleted file mode 100644 index 016c4c4f..00000000 --- a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Internal/Abstract/IUnitOfWork.cs +++ /dev/null @@ -1,18 +0,0 @@ -using Rubberduck.ServerPlatform.Platform.Model; -using Rubberduck.ServerPlatform.Platform.Model.Database; -using System; -using System.Collections.Generic; -using System.Threading.Tasks; - -namespace Rubberduck.Server.Database.Internal.Storage.Abstract -{ - public interface IUnitOfWork : IDisposable - { - Task> QueryAsync(string sql, object parameters); - Task QuerySingleOrDefaultAsync(string sql, object parameters); - - void SaveChanges(); - Repository GetRepository() where TEntity : DbEntity; - IQueryOptions GetView() where TEntity : DbEntity; - } -} diff --git a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Internal/Abstract/IUnitOfWorkFactory.cs b/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Internal/Abstract/IUnitOfWorkFactory.cs deleted file mode 100644 index c1a08fe4..00000000 --- a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Internal/Abstract/IUnitOfWorkFactory.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace Rubberduck.Server.Database.Internal.Storage.Abstract -{ - public interface IUnitOfWorkFactory - { - IUnitOfWork CreateNew(); - } -} diff --git a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Internal/Abstract/Repository.cs b/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Internal/Abstract/Repository.cs deleted file mode 100644 index 3a62d801..00000000 --- a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Internal/Abstract/Repository.cs +++ /dev/null @@ -1,42 +0,0 @@ -using System.Collections.Generic; -using System.Data; -using System.Linq; -using System.Threading.Tasks; -using Dapper; -using Rubberduck.ServerPlatform.Platform.Model.Database; - -namespace Rubberduck.Server.Database.Internal.Storage.Abstract -{ - public abstract class Repository : View - where TEntity : DbEntity - { - protected Repository(IDbConnection connection) - : base(connection) - { - NonIdentityColumns = string.Join(",", ColumnNames.Select(Quoted)); - NonIdentityValues = string.Join(",", ColumnNames.Select(c => $"@{char.ToLowerInvariant(c[0])}{c.Substring(1, c.Length - 1)}")); - NonIdentityAssignments = string.Join(",", ColumnNames.Select(c => $"{Quoted(c)} = @{char.ToLowerInvariant(c[0])}{c.Substring(1, c.Length - 1)}")); - } - - protected string NonIdentityColumns { get; } - protected string NonIdentityValues { get; } - protected string NonIdentityAssignments { get; } - - protected string InsertSql => $"INSERT INTO {Quoted(Source)} ([DateInserted],{NonIdentityColumns}) VALUES (CURRENT_TIMESTAMP,{NonIdentityValues}) RETURNING [Id];"; - protected string UpdateSql => $"UPDATE {Quoted(Source)} SET [DateUpdated]=CURRENT_TIMESTAMP,{NonIdentityAssignments} WHERE [Id]=@id;"; - - public abstract Task SaveAsync(TEntity entity); - - public virtual async Task DeleteAsync(int id) - { - var sql = $"DELETE FROM {Source} WHERE [Id]=@id;"; - await Database.ExecuteAsync(sql, id); - } - - public override async Task GetByIdAsync(int id) - { - var sql = $"SELECT [Id],{NonIdentityColumns} FROM {Quoted(Source)} WHERE [Id]=@id;"; - return await Database.QuerySingleOrDefaultAsync(sql, new { id }); - } - } -} diff --git a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Internal/Abstract/View.cs b/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Internal/Abstract/View.cs deleted file mode 100644 index 9a1ff6b5..00000000 --- a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Internal/Abstract/View.cs +++ /dev/null @@ -1,63 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Data; -using System.Linq; -using System.Threading.Tasks; -using Dapper; -using Rubberduck.ServerPlatform.Platform.Model; -using Rubberduck.ServerPlatform.Platform.Model.Database; - -namespace Rubberduck.Server.Database.Internal.Storage.Abstract -{ - public abstract class View : IQueryOptions - where TEntity : DbEntity - { - protected IDbConnection Database { get; } - - protected View(IDbConnection connection) - { - Database = connection; - - Columns = string.Join(",", ColumnNames.Select(Quoted)); - } - - protected abstract string[] ColumnNames { get; } - protected abstract string Source { get; } - protected string Columns { get; } - - protected static string Quoted(string identifier) - { - var value = identifier ?? throw new ArgumentNullException(nameof(identifier)); - - if (value.Count(c => c == '[') != value.Count(c => c == ']')) - { - throw new FormatException("Opening '[' and closing ']' brackets are not balanced."); - } - - if (value.Length > 2 && value[0] == '[' && value[value.Length - 1] == ']') - { - return value; - } - - return $"[{value}]"; - } - - public virtual async Task GetByIdAsync(int id) - { - var sql = $"SELECT {Columns} FROM {Quoted(Source)} WHERE [Id]=@id;"; - return await Database.QuerySingleOrDefaultAsync(sql, new { id }); - } - - public virtual async Task> GetByIdAsync(params int[] ids) - { - var sql = $"SELECT {Columns} FROM {Quoted(Source)} WHERE [Id] IN ({string.Join(",", ids)});"; - return await Database.QueryAsync(sql); - } - - public virtual async Task> GetByOptionsAsync(TOptions options) where TOptions : IQueryOption - { - var sql = $"SELECT {Columns} FROM {Quoted(Source)} WHERE {options.ToWhereClause()}"; - return await Database.QueryAsync(sql); - } - } -} diff --git a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Internal/Repositories/DeclarationAnnotationRepository.cs b/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Internal/Repositories/DeclarationAnnotationRepository.cs deleted file mode 100644 index 42c2b6e1..00000000 --- a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Internal/Repositories/DeclarationAnnotationRepository.cs +++ /dev/null @@ -1,59 +0,0 @@ -using System.Data; -using System.Threading.Tasks; -using Dapper; -using Rubberduck.ServerPlatform.Platform.Model.Database; -using Rubberduck.Server.Database.Internal.Storage.Abstract; - -namespace Rubberduck.Server.Database.Internal.Storage -{ - internal class DeclarationAnnotationRepository : Repository - { - public DeclarationAnnotationRepository(IDbConnection connection) - : base(connection) { } - - protected override string Source { get; } = "[DeclarationAnnotations]"; - protected override string[] ColumnNames { get; } = new[] - { - "DeclarationId", - "AnnotationName", - "AnnotationArgs", - "ContextStartOffset", - "ContextEndOffset", - "IdentifierStartOffset", - "IdentifierEndOffset", - }; - - public override async Task SaveAsync(DeclarationAnnotation entity) - { - if (entity.Id == default) - { - entity.Id = await Database.ExecuteAsync(InsertSql, - new - { - declarationId = entity.DeclarationId, - annotationName = entity.AnnotationName, - annotationArgs = entity.AnnotationArgs, - contextStartOffset = entity.ContextStartOffset, - contextEndOffset = entity.ContextEndOffset, - identifierStartOffset = entity.IdentifierStartOffset, - identifierEndOffset = entity.IdentifierEndOffset - }); - } - else - { - await Database.ExecuteAsync(UpdateSql, - new - { - declarationId = entity.DeclarationId, - annotationName = entity.AnnotationName, - annotationArgs = entity.AnnotationArgs, - contextStartOffset = entity.ContextStartOffset, - contextEndOffset = entity.ContextEndOffset, - identifierStartOffset = entity.IdentifierStartOffset, - identifierEndOffset = entity.IdentifierEndOffset, - id = entity.Id - }); - } - } - } -} diff --git a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Internal/Repositories/DeclarationAttributeRepository.cs b/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Internal/Repositories/DeclarationAttributeRepository.cs deleted file mode 100644 index 3cb5ebc0..00000000 --- a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Internal/Repositories/DeclarationAttributeRepository.cs +++ /dev/null @@ -1,59 +0,0 @@ -using System.Data; -using System.Threading.Tasks; -using Dapper; -using Rubberduck.ServerPlatform.Platform.Model.Database; -using Rubberduck.Server.Database.Internal.Storage.Abstract; - -namespace Rubberduck.Server.Database.Internal.Storage -{ - internal class DeclarationAttributeRepository : Repository - { - public DeclarationAttributeRepository(IDbConnection connection) - : base(connection) { } - - protected override string Source { get; } = "[DeclarationAttributes]"; - protected override string[] ColumnNames { get; } = new[] - { - "DeclarationId", - "AttributeName", - "AttributeValues", - "ContextStartOffset", - "ContextEndOffset", - "IdentifierStartOffset", - "IdentifierEndOffset", - }; - - public override async Task SaveAsync(DeclarationAttribute entity) - { - if (entity.Id == default) - { - entity.Id = await Database.ExecuteAsync(InsertSql, - new - { - declarationId = entity.DeclarationId, - attributeName = entity.AttributeName, - attributeValues = entity.AttributeValues, - contextStartOffset = entity.ContextStartOffset, - contextEndOffset = entity.ContextEndOffset, - identifierStartOffset = entity.IdentifierStartOffset, - identifierEndOffset = entity.IdentifierEndOffset - }); - } - else - { - await Database.ExecuteAsync(UpdateSql, - new - { - declarationId = entity.DeclarationId, - attributeName = entity.AttributeName, - attributeValues = entity.AttributeValues, - contextStartOffset = entity.ContextStartOffset, - contextEndOffset = entity.ContextEndOffset, - identifierStartOffset = entity.IdentifierStartOffset, - identifierEndOffset = entity.IdentifierEndOffset, - id = entity.Id - }); - } - } - } -} diff --git a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Internal/Repositories/DeclarationRepository.cs b/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Internal/Repositories/DeclarationRepository.cs deleted file mode 100644 index b9e2fece..00000000 --- a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Internal/Repositories/DeclarationRepository.cs +++ /dev/null @@ -1,82 +0,0 @@ -using System.Collections.Generic; -using System.Data; -using System.Threading.Tasks; -using Dapper; -using Rubberduck.ServerPlatform.Platform.Model.Database; -using Rubberduck.Server.Database.Internal.Storage.Abstract; - -namespace Rubberduck.Server.Database.Internal.Storage -{ - internal class DeclarationRepository : Repository - { - public DeclarationRepository(IDbConnection connection) - : base(connection) { } - - protected override string Source { get; } = "[Declarations]"; - protected override string[] ColumnNames { get; } = new[] - { - "DeclarationType", - "IsArray", - "AsTypeName", - "AsTypeDeclarationId", - "TypeHint", - "IdentifierName", - "IsUserDefined", - "ParentDeclarationId", - "DocString", - "ContextStartOffset", - "ContextEndOffset", - "IdentifierStartOffset", - "IdentifierEndOffset", - }; - - public async Task> GetByParentIdAsync(int parentId) - { - var sql = $"SELECT [Id],{NonIdentityColumns} FROM {Source} WHERE [ParentDeclarationId] = @parentId;"; - return await Database.QueryAsync(sql, new { parentId }); - } - - public override async Task SaveAsync(Declaration entity) - { - if (entity.Id != default) - { - entity.Id = await Database.ExecuteAsync(InsertSql, new - { - declarationType = entity.DeclarationType, - isArray = entity.IsArray, - asTypeName = entity.AsTypeName, - asTypeDeclarationId = entity.AsTypeDeclarationId, - typeHint = entity.TypeHint, - identifierName = entity.IdentifierName, - isUserDefined = entity.IsUserDefined, - parentDeclarationId = entity.ParentDeclarationId, - docString = entity.DocString, - contextStartOffset = entity.ContextStartOffset, - contextEndOffset = entity.ContextEndOffset, - identifierStartOffset = entity.IdentifierStartOffset, - identifierEndOffset = entity.IdentifierEndOffset, - }); - } - else - { - await Database.ExecuteAsync(UpdateSql, new - { - declarationType = entity.DeclarationType, - isArray = entity.IsArray, - asTypeName = entity.AsTypeName, - asTypeDeclarationId = entity.AsTypeDeclarationId, - typeHint = entity.TypeHint, - identifierName = entity.IdentifierName, - isUserDefined = entity.IsUserDefined, - parentDeclarationId = entity.ParentDeclarationId, - docString = entity.DocString, - contextStartOffset = entity.ContextStartOffset, - contextEndOffset = entity.ContextEndOffset, - identifierStartOffset = entity.IdentifierStartOffset, - identifierEndOffset = entity.IdentifierEndOffset, - id = entity.Id, - }); - } - } - } -} diff --git a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Internal/Repositories/IdentifierReferenceAnnotationRepository.cs b/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Internal/Repositories/IdentifierReferenceAnnotationRepository.cs deleted file mode 100644 index 65435cfe..00000000 --- a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Internal/Repositories/IdentifierReferenceAnnotationRepository.cs +++ /dev/null @@ -1,60 +0,0 @@ -using System.Data; -using System.Threading.Tasks; -using Dapper; -using Rubberduck.ServerPlatform.Platform.Model.Database; -using Rubberduck.Server.Database.Internal.Storage.Abstract; - -namespace Rubberduck.Server.Database.Internal.Storage -{ - internal class IdentifierReferenceAnnotationRepository : Repository - { - public IdentifierReferenceAnnotationRepository(IDbConnection connection) - : base(connection) { } - - protected override string Source { get; } = "[IdentifierReferenceAnnotations]"; - - protected override string[] ColumnNames { get; } = new[] - { - "IdentifierReferenceId", - "AnnotationName", - "AnnotationArgs", - "ContextStartOffset", - "ContextEndOffset", - "IdentifierStartOffset", - "IdentifierEndOffset", - }; - - public override async Task SaveAsync(IdentifierReferenceAnnotation entity) - { - if (entity.Id == default) - { - entity.Id = await Database.ExecuteAsync(InsertSql, - new - { - identifierReferenceId = entity.IdentifierReferenceId, - annotationName = entity.AnnotationName, - annotationArgs = entity.AnnotationArgs, - contextStartOffset = entity.ContextStartOffset, - contextEndOffset = entity.ContextEndOffset, - identifierStartOffset = entity.IdentifierStartOffset, - identifierEndOffset = entity.IdentifierEndOffset - }); - } - else - { - await Database.ExecuteAsync(UpdateSql, - new - { - identifierReferenceId = entity.IdentifierReferenceId, - annotationName = entity.AnnotationName, - annotationArgs = entity.AnnotationArgs, - contextStartOffset = entity.ContextStartOffset, - contextEndOffset = entity.ContextEndOffset, - identifierStartOffset = entity.IdentifierStartOffset, - identifierEndOffset = entity.IdentifierEndOffset, - id = entity.Id - }); - } - } - } -} diff --git a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Internal/Repositories/IdentifierReferenceRepository.cs b/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Internal/Repositories/IdentifierReferenceRepository.cs deleted file mode 100644 index a434c32e..00000000 --- a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Internal/Repositories/IdentifierReferenceRepository.cs +++ /dev/null @@ -1,101 +0,0 @@ -using System.Collections.Generic; -using System.Data; -using System.Threading.Tasks; -using Dapper; -using Rubberduck.ServerPlatform.Platform.Model.Database; -using Rubberduck.Server.Database.Internal.Storage.Abstract; - -namespace Rubberduck.Server.Database.Internal.Storage -{ - internal class IdentifierReferenceRepository : Repository - { - public IdentifierReferenceRepository(IDbConnection connection) - : base(connection) { } - - protected override string Source { get; } = "[IdentifierReferences]"; - protected override string[] ColumnNames { get; } = new[] - { - "ReferencedDeclarationId", - "ParentDeclarationId", - "QualifyingReferenceId", - "IsAssignmentTarget", - "IsExplicitCallStatement", - "IsExplicitLetAssignment", - "IsSetAssignment", - "IsReDim", - "IsArrayAccess", - "IsProcedureCoercion", - "IsIndexedDefaultMemberAccess", - "IsNonIndexedDefaultMemberAccess", - "IsInnerRecursiveDefaultMemberAccess", - "DefaultMemberRescursionDepth", - "TypeHint", - "ContextStartOffset", - "ContextEndOffset", - "IdentifierStartOffset", - "IdentifierEndOffset", - }; - - public async Task> GetByReferencedDeclarationIdAsync(int id) - { - var sql = $"SELECT [Id],{NonIdentityColumns} FROM {Source} WHERE [ReferencedDeclarationId]=@id;"; - return await Database.QueryAsync(sql, new { id }); - } - - - public override async Task SaveAsync(IdentifierReferenceInfo entity) - { - if (entity.Id == default) - { - entity.Id = await Database.ExecuteAsync(InsertSql, new - { - referencedDeclarationId = entity.ReferenceDeclarationId, - parentDeclarationId = entity.MemberDeclarationId ?? entity.ModuleDeclarationId, - qualifyingReferenceId = entity.QualifyingReferenceId, - isAssignmentTarget = entity.IsAssignmentTarget, - isExplicitCallStatement = entity.IsExplicitCallStatement, - isExplicitLetAssignment = entity.IsExplicitLetAssignment, - isSetAssignment = entity.IsSetAssignment, - isReDim = entity.IsReDim, - isArrayAccess = entity.IsArrayAccess, - isProcedureCoercion = entity.IsProcedureCoercion, - isIndexedDefaultMemberAccess = entity.IsIndexedDefaultMemberAccess, - isNonIndexedDefaultMemberAccess = entity.IsNonIndexedDefaultMemberAccess, - isInnerRecursiveDefaultMemberAccess = entity.IsInnerRecursiveDefaultMemberAccess, - defaultMemberRecursionDepth = entity.DefaultMemberRecursionDepth, - typeHint = entity.TypeHint, - contextStartOffset = entity.ContextStartOffset, - contextEndOffset = entity.ContextEndOffset, - identifierStartOffset = entity.IdentifierStartOffset, - identifierEndOffset = entity.IdentifierEndOffset, - }); - } - else - { - await Database.ExecuteAsync(UpdateSql, new - { - referencedDeclarationId = entity.ReferenceDeclarationId, - parentDeclarationId = entity.MemberDeclarationId ?? entity.ModuleDeclarationId, - qualifyingReferenceId = entity.QualifyingReferenceId, - isAssignmentTarget = entity.IsAssignmentTarget, - isExplicitCallStatement = entity.IsExplicitCallStatement, - isExplicitLetAssignment = entity.IsExplicitLetAssignment, - isSetAssignment = entity.IsSetAssignment, - isReDim = entity.IsReDim, - isArrayAccess = entity.IsArrayAccess, - isProcedureCoercion = entity.IsProcedureCoercion, - isIndexedDefaultMemberAccess = entity.IsIndexedDefaultMemberAccess, - isNonIndexedDefaultMemberAccess = entity.IsNonIndexedDefaultMemberAccess, - isInnerRecursiveDefaultMemberAccess = entity.IsInnerRecursiveDefaultMemberAccess, - defaultMemberRecursionDepth = entity.DefaultMemberRecursionDepth, - typeHint = entity.TypeHint, - contextStartOffset = entity.ContextStartOffset, - contextEndOffset = entity.ContextEndOffset, - identifierStartOffset = entity.IdentifierStartOffset, - identifierEndOffset = entity.IdentifierEndOffset, - id = entity.Id, - }); - } - } - } -} diff --git a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Internal/Repositories/LocalRepository.cs b/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Internal/Repositories/LocalRepository.cs deleted file mode 100644 index ffee8b99..00000000 --- a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Internal/Repositories/LocalRepository.cs +++ /dev/null @@ -1,47 +0,0 @@ -using System.Data; -using System.Threading.Tasks; -using Dapper; -using Rubberduck.ServerPlatform.Platform.Model.Database; -using Rubberduck.Server.Database.Internal.Storage.Abstract; - -namespace Rubberduck.Server.Database.Internal.Storage -{ - internal class LocalRepository : Repository - { - public LocalRepository(IDbConnection connection) - : base(connection) { } - - protected override string Source { get; } = "[Locals]"; - protected override string[] ColumnNames { get; } = new[] - { - "DeclarationId", - "IsAutoAssigned", - "DeclaredValue", - }; - - public override async Task SaveAsync(Local entity) - { - if (entity.Id == default) - { - entity.Id = await Database.ExecuteAsync(InsertSql, - new - { - declarationId = entity.DeclarationId, - isAutoAssigned = entity.IsAutoAssigned, - declaredValue = entity.ValueExpression, - }); - } - else - { - await Database.ExecuteAsync(UpdateSql, - new - { - declarationId = entity.DeclarationId, - isAutoAssigned = entity.IsAutoAssigned, - declaredValue = entity.ValueExpression, - id = entity.Id, - }); - } - } - } -} diff --git a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Internal/Repositories/MemberRepository.cs b/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Internal/Repositories/MemberRepository.cs deleted file mode 100644 index b17a1017..00000000 --- a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Internal/Repositories/MemberRepository.cs +++ /dev/null @@ -1,62 +0,0 @@ -using System.Data; -using System.Threading.Tasks; -using Dapper; -using Rubberduck.ServerPlatform.Platform.Model.Database; -using Rubberduck.Server.Database.Internal.Storage.Abstract; - -namespace Rubberduck.Server.Database.Internal.Storage -{ - internal class MemberRepository : Repository - { - public MemberRepository(IDbConnection connection) - : base(connection) { } - - protected override string Source { get; } = "[Members]"; - protected override string[] ColumnNames { get; } = new[] - { - "DeclarationId", - "ImplementsDeclarationId", - "Accessibility", - "IsAutoAssigned", - "IsWithEvents", - "IsDimStmt", - "ValueExpression", - }; - - public async Task GetByDeclarationIdAsync(int declarationId) - { - return await Database.QuerySingleOrDefaultAsync($"SELECT [Id],{NonIdentityColumns} FROM {Source} WHERE [DeclarationId] = @declarationId;", new { declarationId }); - } - - public override async Task SaveAsync(Member entity) - { - if (entity.Id == default) - { - entity.Id = await Database.ExecuteAsync(InsertSql, new - { - declarationId = entity.DeclarationId, - implementsDeclarationId = entity.ImplementsDeclarationId, - accessibility = entity.Accessibility, - isAutoAssigned = entity.IsAutoAssigned, - isWithEvents = entity.IsWithEvents, - isDimStmt = entity.IsDimStmt, - valueExpression = entity.ValueExpression, - }); - } - else - { - await Database.ExecuteAsync(UpdateSql, new - { - declarationId = entity.DeclarationId, - implementsDeclarationId = entity.ImplementsDeclarationId, - accessibility = entity.Accessibility, - isAutoAssigned = entity.IsAutoAssigned, - isWithEvents = entity.IsWithEvents, - isDimStmt = entity.IsDimStmt, - valueExpression = entity.ValueExpression, - id = entity.Id, - }); - } - } - } -} diff --git a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Internal/Repositories/ModuleRepository.cs b/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Internal/Repositories/ModuleRepository.cs deleted file mode 100644 index 3e670c96..00000000 --- a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Internal/Repositories/ModuleRepository.cs +++ /dev/null @@ -1,62 +0,0 @@ -using System.Data; -using System.Threading.Tasks; -using Dapper; -using Rubberduck.ServerPlatform.Platform.Model.Database; -using Rubberduck.Server.Database.Internal.Storage.Abstract; - -namespace Rubberduck.Server.Database.Internal.Storage -{ - internal class ModuleRepository : Repository - { - public ModuleRepository(IDbConnection connection) - : base(connection) { } - - protected override string Source { get; } = "[Modules]"; - protected override string[] ColumnNames => new[] { "DeclarationId","Folder" }; - - public async Task AddInterface(int moduleId, int implementsModuleId) - { - var sql = "IF NOT EXISTS (SELECT * FROM [ModuleInterfaces] WHERE [ModuleId] = @moduleId AND [ImplementsModuleId] = @implementsModuleId" + - "INSERT INTO [ModuleInterfaces] ([ModuleId],[ImplementsModuleId]) " + - "VALUES (@moduleId, @implementsModuleId);"; - await Database.ExecuteAsync(sql, new - { - moduleId, - implementsModuleId, - }); - } - - public async Task RemoveInterface(int moduleId, int implementsModuleId) - { - var sql = "DELETE FROM [ModuleInterfaces] " + - "WHERE [ModuleId] = @moduleId " + - "AND [ImplementsModuleId] = @implementsModuleId;"; - await Database.ExecuteAsync(sql, new - { - moduleId, - implementsModuleId, - }); - } - - public override async Task SaveAsync(Module entity) - { - if (entity.Id == default) - { - entity.Id = await Database.ExecuteAsync(InsertSql, new - { - declarationId = entity.DeclarationId, - folder = entity.Folder, - }); - } - else - { - await Database.ExecuteAsync(UpdateSql, new - { - declarationId = entity.DeclarationId, - folder = entity.Folder, - id = entity.Id, - }); - } - } - } -} diff --git a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Internal/Repositories/ParameterRepository.cs b/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Internal/Repositories/ParameterRepository.cs deleted file mode 100644 index 9a4c9cb8..00000000 --- a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Internal/Repositories/ParameterRepository.cs +++ /dev/null @@ -1,60 +0,0 @@ -using System.Data; -using System.Threading.Tasks; -using Dapper; -using Rubberduck.ServerPlatform.Platform.Model.Database; -using Rubberduck.Server.Database.Internal.Storage.Abstract; - -namespace Rubberduck.Server.Database.Internal.Storage -{ - internal class ParameterRepository : Repository - { - public ParameterRepository(IDbConnection connection) - : base(connection) { } - - protected override string Source { get; } = "[Parameters]"; - protected override string[] ColumnNames { get; } = new[] - { - "DeclarationId", - "Position", - "IsParamArray", - "IsOptional", - "IsByRef", - "IsByVal", - "IsModifierImplicit", - "DefaultValue", - }; - - public override async Task SaveAsync(Parameter entity) - { - if (entity.Id == default) - { - entity.Id = await Database.ExecuteAsync(InsertSql, new - { - declarationId = entity.DeclarationId, - position = entity.Position, - isParamArray = entity.IsParamArray, - isOptional = entity.IsOptional, - isByRef = entity.IsByRef, - isByVal = entity.IsByVal, - isModifierImplicit = entity.IsModifierImplicit, - defaultValue = entity.DefaultValue, - }); - } - else - { - await Database.ExecuteAsync(UpdateSql, new - { - declarationId = entity.DeclarationId, - position = entity.Position, - isParamArray = entity.IsParamArray, - isOptional = entity.IsOptional, - isByRef = entity.IsByRef, - isByVal = entity.IsByVal, - isModifierImplicit = entity.IsModifierImplicit, - defaultValue = entity.DefaultValue, - id = entity.Id, - }); - } - } - } -} diff --git a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Internal/Repositories/ProjectRepository.cs b/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Internal/Repositories/ProjectRepository.cs deleted file mode 100644 index c11dd9df..00000000 --- a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Internal/Repositories/ProjectRepository.cs +++ /dev/null @@ -1,60 +0,0 @@ -using System.Collections.Generic; -using System.Data; -using System.Threading.Tasks; -using Dapper; -using Rubberduck.ServerPlatform.Platform.Model.Database; -using Rubberduck.Server.Database.Internal.Storage.Abstract; - -namespace Rubberduck.Server.Database.Internal.Storage -{ - internal class ProjectRepository : Repository - { - public ProjectRepository(IDbConnection connection) - : base(connection) { } - - protected override string Source { get; } = "[Projects]"; - protected override string[] ColumnNames { get; } = new[] - { - "DeclarationId", - "VBProjectId", - "Guid", - "MajorVersion", - "MinorVersion", - "Path", - }; - - public override Task> GetByOptionsAsync(TOptions options) - { - throw new System.NotImplementedException(); - } - - public override async Task SaveAsync(Project entity) - { - if (entity.Id == default) - { - entity.Id = await Database.ExecuteAsync(InsertSql, new - { - declarationId = entity.DeclarationId, - vbProjectId = entity.VBProjectId, - guid = entity.Guid, - majorVersion = entity.MajorVersion, - minorVersion = entity.MinorVersion, - path = entity.Path, - }); - } - else - { - await Database.ExecuteAsync(UpdateSql, new - { - declarationId = entity.DeclarationId, - vbProjectId = entity.VBProjectId, - guid = entity.Guid, - majorVersion = entity.MajorVersion, - minorVersion = entity.MinorVersion, - path = entity.Path, - id = entity.Id, - }); - } - } - } -} diff --git a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Internal/SqliteDbConnectionProvider.cs b/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Internal/SqliteDbConnectionProvider.cs deleted file mode 100644 index 0a470f5d..00000000 --- a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Internal/SqliteDbConnectionProvider.cs +++ /dev/null @@ -1,38 +0,0 @@ -using System; -using System.Data; -using Microsoft.Data.Sqlite; -using Rubberduck.Server.Database.Internal.Storage.Abstract; -using Rubberduck.Server.Database.Properties; - -namespace Rubberduck.Server.Database.Internal.Storage -{ - internal class SqliteDbConnectionProvider : IDbConnectionProvider - { - private readonly Lazy _lazyConnection - = new Lazy(() => - { - var connection = new SqliteConnection(Settings.Default.Database); - connection.Open(); - return connection; - }); - - private bool _disposed; - public void Dispose() - { - if (_disposed) return; - - if (_lazyConnection.IsValueCreated) - { - _lazyConnection.Value.Dispose(); - } - - _disposed = true; - } - - public IDbConnection GetOrCreateConnection() - { - if (_disposed) throw new ObjectDisposedException("This provider instance was disposed."); - return _lazyConnection.Value; - } - } -} diff --git a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Internal/UnitOfWork.cs b/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Internal/UnitOfWork.cs deleted file mode 100644 index 716188ee..00000000 --- a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Internal/UnitOfWork.cs +++ /dev/null @@ -1,146 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Data; -using System.Threading.Tasks; -using Dapper; -using Rubberduck.ServerPlatform.Platform.Model; -using Rubberduck.ServerPlatform.Platform.Model.Database; -using Rubberduck.Server.Database.Internal.Storage.Abstract; - -namespace Rubberduck.Server.Database.Internal.Storage -{ - internal class UnitOfWork : IUnitOfWork - { - private readonly IDbConnection _db; - private readonly IDbTransaction _transaction; - private bool _disposed; - private bool _committed; - - public UnitOfWork(IDbConnection connection) - { - _db = connection; - _transaction = _db.BeginTransaction(); - - Declarations = new DeclarationRepository(connection); - Projects = new ProjectRepository(connection); - Modules = new ModuleRepository(connection); - Members = new MemberRepository(connection); - Parameters = new ParameterRepository(connection); - Locals = new LocalRepository(connection); - IdentifierReferences = new IdentifierReferenceRepository(connection); - - ProjectsView = new ProjectsView(connection); - ModulesView = new ModulesView(connection); - MembersView = new MembersView(connection); - ParametersView = new ParametersView(connection); - LocalsView = new LocalsView(connection); - IdentifierReferencesView = new IdentifierReferencesView(connection); - } - - public void SaveChanges() - { - if (_disposed) - { - throw new ObjectDisposedException("This unit of work is already disposed."); - } - - if (_committed) - { - throw new InvalidOperationException("This transaction has already been committed."); - } - - _transaction.Commit(); - _committed = true; - } - - public void Dispose() - { - _transaction.Dispose(); - _disposed = true; - } - - public DeclarationRepository Declarations { get; } - public DeclarationAnnotationRepository DeclarationAnnotations { get; } - public DeclarationAttributeRepository DeclarationAttributes { get; } - public IdentifierReferenceAnnotationRepository IdentifierReferenceAnnotations { get; } - - - public ProjectRepository Projects { get; } - public ModuleRepository Modules { get; } - public MemberRepository Members { get; } - public ParameterRepository Parameters { get; } - public LocalRepository Locals { get; } - public IdentifierReferenceRepository IdentifierReferences { get; } - - public ProjectsView ProjectsView { get; } - public ModulesView ModulesView { get; } - public MembersView MembersView { get; } - public ParametersView ParametersView { get; } - public LocalsView LocalsView { get; } - public IdentifierReferencesView IdentifierReferencesView { get; } - - public async Task> QueryAsync(string sql, object parameters) - { - return await _db.QueryAsync(sql, parameters); - } - - public async Task QuerySingleOrDefaultAsync(string sql, object parameters) - { - return await _db.QuerySingleOrDefaultAsync(sql, parameters); - } - - public Repository GetRepository() where TEntity : DbEntity - { - switch (typeof(TEntity)) - { - case var t when t == typeof(Declaration): - return Declarations as Repository; - - case var t when t == typeof(IdentifierReference): - return IdentifierReferences as Repository; - - case var t when t == typeof(Project): - return Projects as Repository; - - case var t when t == typeof(Module): - return Modules as Repository; - - case var t when t == typeof(Member): - return Members as Repository; - - case var t when t == typeof(Parameter): - return Parameters as Repository; - - case var t when t == typeof(Local): - return Locals as Repository; - - default: - throw new NotSupportedException(); - } - } - - public IQueryOptions GetView() where TEntity : DbEntity - { - switch (typeof(TEntity)) - { - case var t when t == typeof(ProjectInfo): - return ProjectsView as View; - - case var t when t == typeof(ModuleInfo): - return ModulesView as View; - - case var t when t == typeof(MemberInfo): - return MembersView as View; - - case var t when t == typeof(ParameterInfo): - return ParametersView as View; - - case var t when t == typeof(LocalInfo): - return LocalsView as View; - - default: - throw new NotSupportedException(); - } - } - } -} diff --git a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Internal/UnitOfWorkFactory.cs b/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Internal/UnitOfWorkFactory.cs deleted file mode 100644 index 79494263..00000000 --- a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Internal/UnitOfWorkFactory.cs +++ /dev/null @@ -1,16 +0,0 @@ -using Rubberduck.Server.Database.Internal.Storage.Abstract; - -namespace Rubberduck.Server.Database.Internal.Storage -{ - internal class UnitOfWorkFactory : IUnitOfWorkFactory - { - private readonly IDbConnectionProvider _provider; - - public UnitOfWorkFactory(IDbConnectionProvider provider) - { - _provider = provider; - } - - public IUnitOfWork CreateNew() => new UnitOfWork(_provider.GetOrCreateConnection()); - } -} diff --git a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Internal/Views/IdentifierReferencesView.cs b/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Internal/Views/IdentifierReferencesView.cs deleted file mode 100644 index ec4a5cfd..00000000 --- a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Internal/Views/IdentifierReferencesView.cs +++ /dev/null @@ -1,90 +0,0 @@ -using System.Collections.Generic; -using System.Data; -using Dapper; -using System.Threading.Tasks; -using Rubberduck.Server.Database.Internal.Storage.Abstract; -using Rubberduck.ServerPlatform.Platform.Model.Database; - -namespace Rubberduck.Server.Database.Internal.Storage -{ - internal class IdentifierReferencesView : View - { - public IdentifierReferencesView(IDbConnection connection) : base(connection) { } - - protected override string Source { get; } = "[IdentifierReferences_v1]"; - - protected override string[] ColumnNames { get; } = new[] - { - "Id", - "TypeHint", - - "IsAssignmentTarget", - "IsExplicitCallStatement", - "IsExplicitLetAssignment", - "IsSetAssignment", - "IsReDim", - "IsArrayAccess", - "IsProcedureCoercion", - "IsIndexedDefaultMemberAccess", - "IsNonIndexedDefaultMemberAccess", - "IsInnerRecursiveDefaultMemberAccess", - "DefaultMemberRecursionDepth", - - "ReferenceDeclarationId", - "ReferenceDeclarationType", - "ReferenceIdentifierName", - "ReferenceIsUserDefined", - "ReferenceDocString", - - "QualifyingReferenceId", - - "ContextStartOffset", - "ContextEndOffset", - "IdentifierStartOffset", - "IdentifierEndOffset", - - "MemberDeclarationId", - "MemberDeclarationType", - "MemberName", - - "ModuleDeclarationId", - "ModuleDeclarationType", - "ModuleName", - "Folder", - - "ProjectDeclarationId", - "ProjectName", - "VBProjectId", - }; - - public async Task> GetByMemberDeclarationId(int id) - { - var sql = $"SELECT {Columns} FROM {Source} WHERE [MemberDeclarationId] = @id"; - return await Database.QueryAsync(sql, id); - } - - public async Task> GetByModuleDeclarationId(int id) - { - var sql = $"SELECT {Columns} FROM {Source} WHERE [ModuleDeclarationId] = @id"; - return await Database.QueryAsync(sql, id); - } - - public async Task> GetByProjectDeclarationId(int id) - { - var sql = $"SELECT {Columns} FROM {Source} WHERE [ProjectDeclarationId] = @id"; - return await Database.QueryAsync(sql, id); - } - - public async Task> GetByDeclarationId(int id) - { - var sql = $"SELECT {Columns} FROM {Source} WHERE [ReferenceDeclarationId] = @id"; - return await Database.QueryAsync(sql, id); - } - - public async Task> GetByOffset(int moduleDeclarationId, int offset) - { - var sql = $"SELECT {Columns} FROM {Source} WHERE [ModuleDeclarationId] = @moduleDeclarationId AND [ContextStartOffset] <= @offset AND [ContextEndOffset] >= @offset"; - return await Database.QueryAsync(sql, new { moduleDeclarationId, offset }); - } - } -} diff --git a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Internal/Views/LocalsView.cs b/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Internal/Views/LocalsView.cs deleted file mode 100644 index 543e4406..00000000 --- a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Internal/Views/LocalsView.cs +++ /dev/null @@ -1,70 +0,0 @@ -using System.Collections.Generic; -using System.Data; -using Dapper; -using System.Threading.Tasks; -using Rubberduck.Server.Database.Internal.Storage.Abstract; -using Rubberduck.ServerPlatform.Platform.Model.Database; - -namespace Rubberduck.Server.Database.Internal.Storage -{ - internal class LocalsView : View - { - public LocalsView(IDbConnection connection) : base(connection) { } - - protected override string Source { get; } = "[Locals_v1]"; - - protected override string[] ColumnNames { get; } = new[] - { - "Id", - "IsAutoAssigned", - "ValueExpression", - - "DeclarationId", - "DeclarationType", - "IdentifierName", - "DocString", - "IsUserDefined", - "AsTypeName", - "AsTypeDeclarationId", - "IsArray", - "IsImplicit", - "TypeHint", - - "ContextStartOffset", - "ContextEndOffset", - "IdentifierStartOffset", - "IdentifierEndOffset", - - "MemberDeclarationId", - "MemberDeclarationType", - "MemberName", - - "ModuleDeclarationId", - "ModuleDeclarationType", - "ModuleName", - "Folder", - - "ProjectDeclarationId", - "ProjectName", - "VBProjectId", - }; - - public async Task> GetByMemberDeclarationId(int id) - { - var sql = $"SELECT {Columns} FROM {Source} WHERE [MemberDeclarationId] = @id"; - return await Database.QueryAsync(sql, id); - } - - public async Task> GetByModuleDeclarationId(int id) - { - var sql = $"SELECT {Columns} FROM {Source} WHERE [ModuleDeclarationId] = @id"; - return await Database.QueryAsync(sql, id); - } - - public async Task> GetByProjectDeclarationId(int id) - { - var sql = $"SELECT {Columns} FROM {Source} WHERE [ProjectDeclarationId] = @id"; - return await Database.QueryAsync(sql, id); - } - } -} diff --git a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Internal/Views/MembersView.cs b/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Internal/Views/MembersView.cs deleted file mode 100644 index 8f4636f1..00000000 --- a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Internal/Views/MembersView.cs +++ /dev/null @@ -1,60 +0,0 @@ -using System.Collections.Generic; -using System.Data; -using Dapper; -using System.Threading.Tasks; -using Rubberduck.Server.Database.Internal.Storage.Abstract; -using Rubberduck.ServerPlatform.Platform.Model.Database; - -namespace Rubberduck.Server.Database.Internal.Storage -{ - internal class MembersView : View - { - public MembersView(IDbConnection connection) - : base(connection) { } - - protected override string[] ColumnNames { get; } = new[] - { - "Id", - "ImplementsDeclarationId", - "Accessibility", - "IsAutoAssigned", - "IsWithEvents", - "IsDimStmt", - "ValueExpression", - "DeclarationId", - "DeclarationType", - "IdentifierName", - "DocString", - "IsUserDefined", - "AsTypeName", - "AsTypeDeclarationId", - "IsArray", - "TypeHint", - "ContextStartOffset", - "ContextEndOffset", - "IdentifierStartOffset", - "IdentifierEndOffset", - "ModuleDeclarationId", - "ModuleDeclarationType", - "ModuleName", - "Folder", - "ProjectDeclarationId", - "ProjectName", - "VBProjectId", - }; - - protected override string Source { get; } = "[Members_v1]"; - - public async Task> GetByModuleDeclarationId(int id) - { - var sql = $"SELECT {Columns} FROM {Source} WHERE [ModuleDeclarationId] = @id"; - return await Database.QueryAsync(sql, id); - } - - public async Task> GetByProjectDeclarationId(int id) - { - var sql = $"SELECT {Columns} FROM {Source} WHERE [ProjectDeclarationId] = @id"; - return await Database.QueryAsync(sql, id); - } - } -} diff --git a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Internal/Views/ModulesView.cs b/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Internal/Views/ModulesView.cs deleted file mode 100644 index 025a58c4..00000000 --- a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Internal/Views/ModulesView.cs +++ /dev/null @@ -1,42 +0,0 @@ -using System.Collections.Generic; -using System.Data; -using Dapper; -using System.Threading.Tasks; -using Rubberduck.Server.Database.Internal.Storage.Abstract; -using Rubberduck.ServerPlatform.Platform.Model.Database; - -namespace Rubberduck.Server.Database.Internal.Storage -{ - internal class ModulesView : View - { - public ModulesView(IDbConnection connection) - : base(connection) { } - - protected override string[] ColumnNames { get; } = new[] - { - "Id", - "Folder", - "DeclarationId", - "DeclarationType", - "IdentifierName", - "DocString", - "IsUserDefined", - "ProjectDeclarationId", - "ProjectName", - "VBProjectId", - }; - - protected override string Source { get; } = "[Modules_v1]"; - - public override Task> GetByOptionsAsync(TOptions options) - { - throw new System.NotImplementedException(); - } - - public async Task> GetByProjectDeclarationId(int id) - { - var sql = $"SELECT {Columns} FROM {Source} WHERE [ProjectDeclarationId] = @id"; - return await Database.QueryAsync(sql, id); - } - } -} diff --git a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Internal/Views/ParametersView.cs b/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Internal/Views/ParametersView.cs deleted file mode 100644 index 6173f728..00000000 --- a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Internal/Views/ParametersView.cs +++ /dev/null @@ -1,79 +0,0 @@ -using System.Collections.Generic; -using System.Data; -using System.Threading.Tasks; -using Dapper; -using Rubberduck.ServerPlatform.Platform.Model.Database; -using Rubberduck.Server.Database.Internal.Storage.Abstract; - -namespace Rubberduck.Server.Database.Internal.Storage -{ - internal class ParametersView : View - { - public ParametersView(IDbConnection connection) : base(connection) { } - - protected override string Source { get; } = "[Parameters_v1]"; - - protected override string[] ColumnNames { get; } = new[] - { - "Id", - "Position", - "IsParamArray", - "IsOptional", - "IsByRef", - "IsByVal", - "IsModifierImplicit", - "DefaultValue", - - "DeclarationId", - "DeclarationType", - "IdentifierName", - "DocString", - "IsUserDefined", - "AsTypeName", - "AsTypeDeclarationId", - "IsArray", - "TypeHint", - - "ContextStartOffset", - "ContextEndOffset", - "IdentifierStartOffset", - "IdentifierEndOffset", - - "MemberDeclarationId", - "MemberDeclarationType", - "MemberName", - - "ModuleDeclarationId", - "ModuleDeclarationType", - "ModuleName", - "Folder", - - "ProjectDeclarationId", - "ProjectName", - "VBProjectId", - }; - - public async Task> GetByMemberDeclarationIdAsync(int id) - { - var sql = $"SELECT {Columns} FROM {Source} WHERE [MemberDeclarationId] = @id"; - return await Database.QueryAsync(sql, id); - } - - public async Task> GetByModuleDeclarationIdAsync(int id) - { - var sql = $"SELECT {Columns} FROM {Source} WHERE [ModuleDeclarationId] = @id"; - return await Database.QueryAsync(sql, id); - } - - public async Task> GetByProjectDeclarationIdAsync(int id) - { - var sql = $"SELECT {Columns} FROM {Source} WHERE [ProjectDeclarationId] = @id"; - return await Database.QueryAsync(sql, id); - } - - public override Task> GetByOptionsAsync(TOptions options) - { - throw new System.NotImplementedException(); - } - } -} diff --git a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Internal/Views/ProjectsView.cs b/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Internal/Views/ProjectsView.cs deleted file mode 100644 index e7ade4a3..00000000 --- a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Internal/Views/ProjectsView.cs +++ /dev/null @@ -1,36 +0,0 @@ -using Rubberduck.ServerPlatform.Platform.Model.Database; -using Rubberduck.Server.Database.Internal.Storage.Abstract; -using System; -using System.Collections.Generic; -using System.Data; -using System.Threading.Tasks; - -namespace Rubberduck.Server.Database.Internal.Storage -{ - internal class ProjectsView : View - { - public ProjectsView(IDbConnection connection) - : base(connection) { } - - protected override string[] ColumnNames { get; } = new[] - { - "Id", - "VBProjectId", - "Guid", - "MajorVersion", - "MinorVersion", - "Path", - "DeclarationId", - "DeclarationType", - "IdentifierName", - "IsUserDefined", - }; - - protected override string Source { get; } = "[Projects_v1]"; - - public override Task> GetByOptionsAsync(TOptions options) - { - throw new NotImplementedException(); - } - } -} diff --git a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Program.cs b/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Program.cs deleted file mode 100644 index 1e9aa131..00000000 --- a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Program.cs +++ /dev/null @@ -1,141 +0,0 @@ -using CommandLine; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Hosting; -using Rubberduck.Server.Database.Configuration; -using System; -using System.Linq; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Security.AccessControl; -using System.Security.Principal; -using System.Threading; -using System.Threading.Tasks; - -namespace Rubberduck.Server.Database -{ - internal static class Program - { - private static StartupOptions _startupOptions; - private static TimeSpan _exclusiveAccessTimeout = TimeSpan.FromSeconds(5); - - /// - /// The main entry point for the application. - /// - [STAThread] - public static async Task Main(string[] args) - { - var context = SynchronizationContext.Current; - - #region Global Mutex https://stackoverflow.com/a/229567/1188513 - - // get application GUID as defined in AssemblyInfo.cs - var appGuid = ((GuidAttribute)Assembly.GetExecutingAssembly() - .GetCustomAttributes(typeof(GuidAttribute), false) - .GetValue(0)).Value - .ToString(); - - // unique id for global mutex - Global prefix means it is global to the machine - var mutexId = $"Global\\{{{appGuid}}}"; - - // edited by Jeremy Wiebe to add example of setting up security for multi-user usage - // edited by 'Marc' to work also on localized systems (don't use just "Everyone") - var allowEveryoneRule = new MutexAccessRule( - new SecurityIdentifier(WellKnownSidType.WorldSid, null), - MutexRights.FullControl, - AccessControlType.Allow); - var securitySettings = new MutexSecurity(); - securitySettings.AddAccessRule(allowEveryoneRule); - - // edited by MasonGZhwiti to prevent race condition on security settings via VanNguyen - using (var mutex = new Mutex(false, mutexId, out _, securitySettings)) - { - // edited by acidzombie24 - var hasHandle = false; - try - { - try - { - // edited by acidzombie24 - hasHandle = mutex.WaitOne(_exclusiveAccessTimeout.Milliseconds, false); - if (!hasHandle) throw new TimeoutException("Timeout waiting for exclusive access"); - } - catch (AbandonedMutexException) - { - // something went wrong - Thread.CurrentThread.Abort(); - } - - var startupArgs = Parser.Default.ParseArguments(args) - .WithNotParsed(errors => - { - Console.WriteLine("Errors have occurred processing command-line arguments. Server will not be started."); - }) - .WithParsed(options => - { - Console.WriteLine("Command-line arguments successfully parsed. Proceeding with startup..."); - }); - - if (startupArgs.Errors.Any()) - { - throw new ArgumentException("Invalid command-line arguments were supplied."); - } - - Console.WriteLine("Startup checks completed. Starting server application..."); - try - { - _startupOptions = startupArgs.Value; - await StartAsync(); - } - catch (OperationCanceledException) - { - // normal exit - return 0; - } - catch (Exception exception) - { - // any other exception type exits with an error code - await Console.Error.WriteLineAsync(exception.ToString()); - return 1; - } - } - finally - { - // edited by acidzombie24, added if statement - if (hasHandle) - { - // MG: can only do this from the main thread... - if (!Thread.CurrentThread.IsBackground) - { - mutex.ReleaseMutex(); // FIXME does not get called - } - else - { - // mutex gets released on dispose, I guess - } - } - } - - // normal exit // FIXME would be nice to be on the main thread here, but we're not - return 0; - } - #endregion - } - - private static async Task StartAsync() - { - var tokenSource = new CancellationTokenSource(); - - var builder = Host.CreateDefaultBuilder() - .UseConsoleLifetime() - .ConfigureServices(provider => ConfigureServices(provider, tokenSource)); - - await builder.RunConsoleAsync(tokenSource.Token); - } - - private static void ConfigureServices(IServiceCollection services, CancellationTokenSource cts) - { - var config = DatabaseServerCapabilities.Default; - services.AddRubberduckServerServices(config, cts); - } - } -} diff --git a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Properties/AssemblyInfo.cs b/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Properties/AssemblyInfo.cs deleted file mode 100644 index ca8c3fac..00000000 --- a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using Rubberduck.Resources.Registration; -using System.Reflection; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("Rubberduck.Server.Database")] -[assembly: AssemblyDescription("SQLite backend for Rubberduck.Server.LSP")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Rubberduck")] -[assembly: AssemblyProduct("Rubberduck")] -[assembly: AssemblyCopyright("Copyright © Rubberduck Contributors 2014-2023")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid(RubberduckGuid.DataServerGuid)] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Properties/Settings.Designer.cs b/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Properties/Settings.Designer.cs deleted file mode 100644 index 33e615f2..00000000 --- a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Properties/Settings.Designer.cs +++ /dev/null @@ -1,63 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace Rubberduck.Server.Database.Properties { - - - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.4.0.0")] - internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { - - private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); - - public static Settings Default { - get { - return defaultInstance; - } - } - - [global::System.Configuration.ApplicationScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("32")] - public int MaxConcurrentRequests { - get { - return ((int)(this["MaxConcurrentRequests"])); - } - } - - [global::System.Configuration.ApplicationScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("Rubberduck.Server.Database.RPC")] - public string JsonRpcPipeName { - get { - return ((string)(this["JsonRpcPipeName"])); - } - } - - [global::System.Configuration.ApplicationScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.ConnectionString)] - [global::System.Configuration.DefaultSettingValueAttribute("Data Source=RubberduckDatabase.db;")] - public string Database { - get { - return ((string)(this["Database"])); - } - } - - [global::System.Configuration.ApplicationScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("Rubberduck.Server.Database")] - public string JsonRpcServerName { - get { - return ((string)(this["JsonRpcServerName"])); - } - } - } -} diff --git a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Properties/Settings.cs b/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Properties/Settings.cs deleted file mode 100644 index e66857d7..00000000 --- a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Properties/Settings.cs +++ /dev/null @@ -1,28 +0,0 @@ -namespace Rubberduck.Server.Database.Properties { - - - // This class allows you to handle specific events on the settings class: - // The SettingChanging event is raised before a setting's value is changed. - // The PropertyChanged event is raised after a setting's value is changed. - // The SettingsLoaded event is raised after the setting values are loaded. - // The SettingsSaving event is raised before the setting values are saved. - internal sealed partial class Settings { - - public Settings() { - // // To add event handlers for saving and changing settings, uncomment the lines below: - // - // this.SettingChanging += this.SettingChangingEventHandler; - // - // this.SettingsSaving += this.SettingsSavingEventHandler; - // - } - - private void SettingChangingEventHandler(object sender, System.Configuration.SettingChangingEventArgs e) { - // Add code to handle the SettingChangingEvent event here. - } - - private void SettingsSavingEventHandler(object sender, System.ComponentModel.CancelEventArgs e) { - // Add code to handle the SettingsSaving event here. - } - } -} diff --git a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Properties/Settings.settings b/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Properties/Settings.settings deleted file mode 100644 index 1bcae00e..00000000 --- a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Properties/Settings.settings +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - 32 - - - Rubberduck.Server.Database.RPC - - - <?xml version="1.0" encoding="utf-16"?> -<SerializableConnectionString xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <ConnectionString>Data Source=RubberduckDatabase.db;</ConnectionString> -</SerializableConnectionString> - Data Source=RubberduckDatabase.db; - - - Rubberduck.Server.Database - - - \ No newline at end of file diff --git a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/RPC/Connect/ConnectHandler.cs b/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/RPC/Connect/ConnectHandler.cs deleted file mode 100644 index 27a695fe..00000000 --- a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/RPC/Connect/ConnectHandler.cs +++ /dev/null @@ -1,31 +0,0 @@ -using Microsoft.Extensions.Logging; -using Rubberduck.ServerPlatform.Platform; -using Rubberduck.ServerPlatform.Platform.Model; -using Rubberduck.ServerPlatform.Platform.Model.Database.Responses; -using System; -using System.Threading.Tasks; - -namespace Rubberduck.Server.Database.RPC.Connect -{ - internal class ConnectHandler : JsonRpcRequestHandler - { - private readonly ServerState _serverState; - - public ConnectHandler(ILogger logger, ServerState serverState) - : base(logger) - { - _serverState = serverState; - } - - protected override async Task HandleAsync(ConnectRequest request) - { - var client = request.Params.ToObject(); - if (_serverState.Connect(client)) - { - return await Task.FromResult(new SuccessResult()); - } - - throw new ApplicationException("The operation failed."); - } - } -} diff --git a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/RPC/Connect/ConnectRequest.cs b/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/RPC/Connect/ConnectRequest.cs deleted file mode 100644 index b43362d5..00000000 --- a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/RPC/Connect/ConnectRequest.cs +++ /dev/null @@ -1,15 +0,0 @@ -using MediatR; -using Newtonsoft.Json.Linq; -using OmniSharp.Extensions.JsonRpc.Server; -using Rubberduck.ServerPlatform.Platform.Model.Database.Responses; - -namespace Rubberduck.Server.Database.RPC.Connect -{ - public class ConnectRequest : Request, IRequest - { - public ConnectRequest(object id, JToken @params) - : base(id, JsonRpcMethods.Connect, @params) - { - } - } -} diff --git a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/RPC/Disconnect/DisconnectHandler.cs b/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/RPC/Disconnect/DisconnectHandler.cs deleted file mode 100644 index a631550a..00000000 --- a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/RPC/Disconnect/DisconnectHandler.cs +++ /dev/null @@ -1,33 +0,0 @@ -using Microsoft.Extensions.Logging; -using Rubberduck.ServerPlatform.Platform; -using Rubberduck.ServerPlatform.Platform.Model; -using Rubberduck.ServerPlatform.Platform.Model.Database.Responses; -using System; -using System.Threading.Tasks; - -namespace Rubberduck.Server.Database.RPC.Disconnect -{ - internal class DisconnectHandler : JsonRpcRequestHandler - { - private readonly ServerState _serverState; - - public DisconnectHandler(ILogger logger, ServerState serverState) - : base(logger) - { - _serverState = serverState; - } - - protected override async Task HandleAsync(DisconnectRequest request) - { - var client = request.Params.ToObject(); - - if (_serverState.Disconnect(client.Name, out var disconnected)) - { - Logger.LogInformation($"Client {disconnected} has disconnected from this server."); - return await Task.FromResult(new SuccessResult()); - } - - throw new ApplicationException("The operation failed."); - } - } -} diff --git a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/RPC/Disconnect/DisconnectRequest.cs b/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/RPC/Disconnect/DisconnectRequest.cs deleted file mode 100644 index 31b0b98e..00000000 --- a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/RPC/Disconnect/DisconnectRequest.cs +++ /dev/null @@ -1,15 +0,0 @@ -using MediatR; -using Newtonsoft.Json.Linq; -using OmniSharp.Extensions.JsonRpc.Server; -using Rubberduck.ServerPlatform.Platform.Model.Database.Responses; - -namespace Rubberduck.Server.Database.RPC.Disconnect -{ - public class DisconnectRequest : Request, IRequest - { - public DisconnectRequest(object id, JToken @params) - : base(id, JsonRpcMethods.Connect, @params) - { - } - } -} diff --git a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/RPC/Info/InfoHandler.cs b/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/RPC/Info/InfoHandler.cs deleted file mode 100644 index af101429..00000000 --- a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/RPC/Info/InfoHandler.cs +++ /dev/null @@ -1,41 +0,0 @@ -using Microsoft.Extensions.Logging; -using Rubberduck.ServerPlatform.Platform; -using Rubberduck.ServerPlatform.Platform.Model; -using Rubberduck.ServerPlatform.Platform.Model.Database.Responses; -using System.Threading.Tasks; - -namespace Rubberduck.Server.Database.RPC.Info -{ - internal class InfoHandler : JsonRpcRequestHandler - { - private readonly ServerState _serverState; - - public InfoHandler(ILogger logger, ServerState serverState) - : base(logger) - { - _serverState = serverState; - } - - protected override async Task HandleAsync(InfoRequest request) - { - var state = new InfoResult - { - Clients = _serverState.Clients, - GC = _serverState.GC, - IsAlive= _serverState.IsAlive, - MessagesReceived= _serverState.MessagesReceived, - MessagesSent= _serverState.MessagesSent, - Name= _serverState.Name, - PeakWorkingSet= _serverState.PeakWorkingSet, - ProcessId= _serverState.ProcessId, - StartTime= _serverState.StartTime, - Status= _serverState.Status, - Threads= _serverState.Threads, - Version= _serverState.Version, - WorkingSet = _serverState.WorkingSet - }; - - return await Task.FromResult(state); - } - } -} diff --git a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/RPC/Info/InfoRequest.cs b/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/RPC/Info/InfoRequest.cs deleted file mode 100644 index b04fa83c..00000000 --- a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/RPC/Info/InfoRequest.cs +++ /dev/null @@ -1,15 +0,0 @@ -using MediatR; -using Newtonsoft.Json.Linq; -using OmniSharp.Extensions.JsonRpc.Server; -using Rubberduck.ServerPlatform.Platform.Model.Database.Responses; - -namespace Rubberduck.Server.Database.RPC.Info -{ - public class InfoRequest : Request, IRequest - { - public InfoRequest(object id, JToken @params) - : base(id, JsonRpcMethods.Info, @params) - { - } - } -} diff --git a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/RPC/JsonRpcMethods.cs b/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/RPC/JsonRpcMethods.cs deleted file mode 100644 index 80ecf4eb..00000000 --- a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/RPC/JsonRpcMethods.cs +++ /dev/null @@ -1,116 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Rubberduck.Server.Database.RPC -{ - internal static class JsonRpcMethods - { - - #region server - /// - /// Connects a client to the Database server. - /// - public const string Connect = "connect"; - - /// - /// Disconnects a client from the Database server. - /// - public const string Disconnect = "disconnect"; - - /// - /// Gets information about the server. - /// - public const string Info = "info"; - #endregion - - #region writing - /// - /// Saves (insert/update) one or more project declarations to the database. - /// - public const string SaveProject = "save/project"; - - /// - /// Saves (insert/update) one or more project references to the database. - /// - /// - /// Project references refer to another project declaration, which may be another user project, or a referenced type library. - /// - public const string SaveProjectReference = "save/projectReference"; - /// - /// Saves (insert/update) one or more module declarations to the database. - /// - public const string SaveModule = "save/module"; - - /// - /// Saves (insert/update) one or more member declarations to the database. - /// - public const string SaveMember = "save/member"; - - /// - /// Saves (insert/update) one or more parameter declarations to the database. - /// - public const string SaveParameter = "save/parameter"; - - /// - /// Saves (insert/update) one or more local declarations to the database. - /// - public const string SaveLocal = "save/local"; - - /// - /// Saves (insert/update) one or more identifier references to the database. - /// - public const string SaveIdentifierReference = "save/identifierReference"; - #endregion - - #region reading - - /// - /// Sends a plain SQL query to the database, for debugging. - /// - public const string DebugSqlSelect = "query/debug"; - - /// - /// Requests information about a particular project, by project ID. - /// - public const string QueryProjectInfo = "query/projectInfo"; - - /// - /// Requests information about all projects, for further server-side (in-memory) processing. - /// - public const string QueryProjects = "query/projects"; - - /// - /// Requests information about a particular module, by ID. - /// - public const string QueryModuleInfo = "query/moduleInfo"; - - /// - /// Requests information about all modules under a particular project ID, for further server-side (in-memory) processing. - /// - public const string QueryModules = "query/modules"; - - /// - /// Requests information about a particular member, by ID. - /// - public const string QueryMemberInfo = "query/memberInfo"; - - /// - /// Requests information about all members under a particular module ID, for further server-side (in-memory) processing. - /// - public const string QueryMembers = "query/members"; - - /// - /// Requests information about a particular member, by ID. - /// - public const string QueryParameterInfo = "query/parameterInfo"; - - /// - /// Requests information about all parameters under a particular member ID, for further server-side (in-memory) processing. - /// - public const string QueryParameters = "query/parameters"; - #endregion - } -} diff --git a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/RPC/Query.Debug/QueryRequest.cs b/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/RPC/Query.Debug/QueryRequest.cs deleted file mode 100644 index 6b75ec2a..00000000 --- a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/RPC/Query.Debug/QueryRequest.cs +++ /dev/null @@ -1,20 +0,0 @@ -using MediatR; -using Newtonsoft.Json.Linq; -using OmniSharp.Extensions.JsonRpc.Server; -using Rubberduck.ServerPlatform.Platform.Model; -using Rubberduck.ServerPlatform.Platform.Model.Database.Responses; - -namespace Rubberduck.Server.Database.RPC.Query -{ - public abstract class QueryRequest : Request, IRequest> - where TResult : class, new() - where TOption : IQueryOption, new() - { - public QueryRequest(object id, string method, JToken @params) - : base(id, method, @params) - { - } - - public virtual TOption Options { get; set; } - } -} diff --git a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/RPC/Query.Debug/SqlQueryHandler.cs b/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/RPC/Query.Debug/SqlQueryHandler.cs deleted file mode 100644 index 90dfb192..00000000 --- a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/RPC/Query.Debug/SqlQueryHandler.cs +++ /dev/null @@ -1,33 +0,0 @@ -using Microsoft.Extensions.Logging; -using Rubberduck.ServerPlatform.Platform; -using Rubberduck.ServerPlatform.Platform.Model; -using Rubberduck.ServerPlatform.Platform.Model.Database.Responses; -using Rubberduck.Server.Database.Internal.Storage.Abstract; -using System.Threading.Tasks; - -#if DEBUG -namespace Rubberduck.Server.Database.RPC.Query.Debug -{ - public class SqlQueryHandler : JsonRpcRequestHandler, QueryResult> - where TResult : class, new() - { - private readonly IUnitOfWorkFactory _factory; - - public SqlQueryHandler(ILogger logger, IUnitOfWorkFactory factory) - : base(logger) - { - _factory = factory; - } - - protected async override Task> HandleAsync(SqlQueryRequest request) - { - var query = request.Params.ToObject(); - using (var uow = _factory.CreateNew()) - { - var results = await uow.QueryAsync(query.RawSqlSelect, null); - return await Task.FromResult(new QueryResult { Results = results }); - } - } - } -} -#endif \ No newline at end of file diff --git a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/RPC/Query/Abstract/QueryHandler.cs b/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/RPC/Query/Abstract/QueryHandler.cs deleted file mode 100644 index ecd641bf..00000000 --- a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/RPC/Query/Abstract/QueryHandler.cs +++ /dev/null @@ -1,52 +0,0 @@ -using Microsoft.Extensions.Logging; -using Rubberduck.InternalApi.Common; -using Rubberduck.ServerPlatform.Platform; -using Rubberduck.ServerPlatform.Platform.Model; -using Rubberduck.ServerPlatform.Platform.Model.Database.Responses; -using Rubberduck.Server.Database.Internal.Storage.Abstract; -using System; -using System.Threading; -using System.Threading.Tasks; - -namespace Rubberduck.Server.Database.RPC.Query -{ - public abstract class QueryHandler : JsonRpcRequestHandler, QueryResult> - where TResult : class, new() - where TOptions : IQueryOption, new() - { - private readonly IUnitOfWorkFactory _factory; - - protected QueryHandler(ILogger logger, IUnitOfWorkFactory factory) - : base(logger) - { - _factory = factory; - } - - protected override Task> HandleAsync(QueryRequest request) => throw new NotSupportedException(); - - protected abstract Task> HandleAsync(QueryRequest request, IUnitOfWork uow); - - public sealed async override Task> Handle(QueryRequest request, CancellationToken cancellationToken) - { - using (var uow = _factory.CreateNew()) - { - try - { - Logger.LogTrace($"Handling notification: {GetType().Name}"); - QueryResult response = default; - - var handler = Task.Run(async () => response = await HandleAsync(request, uow)); - var elapsed = await TimedAction.RunAsync(handler); - - Logger.LogTrace($"[PERF] {GetType().Name} completed in {elapsed.TotalMilliseconds:N0} ms."); - return response; - } - catch (Exception exception) - { - Logger.LogError(exception, exception.ToString()); - throw; - } - } - } - } -} diff --git a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/RPC/Query/Abstract/SqlQueryRequest.cs b/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/RPC/Query/Abstract/SqlQueryRequest.cs deleted file mode 100644 index 7144a1d9..00000000 --- a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/RPC/Query/Abstract/SqlQueryRequest.cs +++ /dev/null @@ -1,16 +0,0 @@ -using MediatR; -using Newtonsoft.Json.Linq; -using OmniSharp.Extensions.JsonRpc.Server; -using Rubberduck.ServerPlatform.Platform.Model.Database.Responses; - -namespace Rubberduck.Server.Database.RPC.Query -{ - public abstract class SqlQueryRequest : Request, IRequest> - where TResult : class, new() - { - public SqlQueryRequest(object id, string method, JToken @params) - : base(id, method, @params) - { - } - } -} diff --git a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/RPC/Query/Requests/ProjectInfoRequest.cs b/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/RPC/Query/Requests/ProjectInfoRequest.cs deleted file mode 100644 index 1cf4c700..00000000 --- a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/RPC/Query/Requests/ProjectInfoRequest.cs +++ /dev/null @@ -1,13 +0,0 @@ -using Newtonsoft.Json.Linq; -using Rubberduck.ServerPlatform.Platform.Model.Database; - -namespace Rubberduck.Server.Database.RPC.Query -{ - internal class ProjectInfoRequest : QueryRequest - { - public ProjectInfoRequest(object id, JToken @params) - : base(id, JsonRpcMethods.QueryProjectInfo, @params) - { - } - } -} diff --git a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/RPC/Query/Requests/ProjectsRequest.cs b/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/RPC/Query/Requests/ProjectsRequest.cs deleted file mode 100644 index 6c767cf7..00000000 --- a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/RPC/Query/Requests/ProjectsRequest.cs +++ /dev/null @@ -1,13 +0,0 @@ -using Newtonsoft.Json.Linq; -using Rubberduck.ServerPlatform.Platform.Model.Database; - -namespace Rubberduck.Server.Database.RPC.Query -{ - internal class ProjectsRequest : QueryRequest - { - public ProjectsRequest(object id, JToken @params) - : base(id, JsonRpcMethods.QueryProjects, @params) - { - } - } -} diff --git a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/RPC/Query/SelectQueryHandler.cs b/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/RPC/Query/SelectQueryHandler.cs deleted file mode 100644 index ac7e31af..00000000 --- a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/RPC/Query/SelectQueryHandler.cs +++ /dev/null @@ -1,23 +0,0 @@ -using Microsoft.Extensions.Logging; -using Rubberduck.ServerPlatform.Platform.Model; -using Rubberduck.ServerPlatform.Platform.Model.Database.Responses; -using Rubberduck.Server.Database.Internal.Storage.Abstract; -using System.Threading.Tasks; - -namespace Rubberduck.Server.Database.RPC.Query -{ - internal class SelectQueryHandler : QueryHandler - where TResult : class, new() - where TOptions : class, IQueryOption, new() - { - public SelectQueryHandler(ILogger logger, IUnitOfWorkFactory factory) - : base(logger, factory) - { - } - - protected override Task> HandleAsync(QueryRequest request, IUnitOfWork uow) - { - throw new System.NotImplementedException(); - } - } -} diff --git a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/RPC/Save/Abstract/SaveHandler.cs b/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/RPC/Save/Abstract/SaveHandler.cs deleted file mode 100644 index 3fd34cf9..00000000 --- a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/RPC/Save/Abstract/SaveHandler.cs +++ /dev/null @@ -1,35 +0,0 @@ -using Microsoft.Extensions.Logging; -using Rubberduck.ServerPlatform.Platform; -using Rubberduck.ServerPlatform.Platform.Model.Database; -using Rubberduck.ServerPlatform.Platform.Model.Database.Responses; -using Rubberduck.Server.Database.Internal.Storage.Abstract; -using System.Linq; -using System.Threading.Tasks; - -namespace Rubberduck.Server.Database.RPC.Save -{ - public abstract class SaveHandler : JsonRpcRequestHandler, SuccessResult> - where TEntity : DbEntity, new() - { - private readonly IUnitOfWorkFactory _factory; - - protected SaveHandler(ILogger logger, IUnitOfWorkFactory factory) - : base(logger) - { - _factory = factory; - } - - protected async override Task HandleAsync(SaveRequest request) - { - using (var uow = _factory.CreateNew()) - { - var repo = uow.GetRepository(); - var entities = request.Params.ToObject(); - - await Task.WhenAll(entities.Select(repo.SaveAsync)); - } - - return new SuccessResult(); - } - } -} diff --git a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/RPC/Save/Abstract/SaveRequest.cs b/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/RPC/Save/Abstract/SaveRequest.cs deleted file mode 100644 index c5e2e3bc..00000000 --- a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/RPC/Save/Abstract/SaveRequest.cs +++ /dev/null @@ -1,17 +0,0 @@ -using MediatR; -using Newtonsoft.Json.Linq; -using OmniSharp.Extensions.JsonRpc.Server; -using Rubberduck.ServerPlatform.Platform.Model.Database; -using Rubberduck.ServerPlatform.Platform.Model.Database.Responses; - -namespace Rubberduck.Server.Database.RPC.Save -{ - public abstract class SaveRequest : Request, IRequest - where TEntity : DbEntity, new() - { - public SaveRequest(object id, string method, JToken @params) - : base(id, method, @params) - { - } - } -} diff --git a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/RPC/Save/SaveIdentifierReferenceRequest.cs b/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/RPC/Save/SaveIdentifierReferenceRequest.cs deleted file mode 100644 index 5db27193..00000000 --- a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/RPC/Save/SaveIdentifierReferenceRequest.cs +++ /dev/null @@ -1,13 +0,0 @@ -using Newtonsoft.Json.Linq; -using Rubberduck.ServerPlatform.Platform.Model.Database; - -namespace Rubberduck.Server.Database.RPC.Save -{ - public class SaveIdentifierReferenceRequest : SaveRequest - { - public SaveIdentifierReferenceRequest(object id, JToken @params) - : base(id, JsonRpcMethods.SaveIdentifierReference, @params) - { - } - } -} diff --git a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/RPC/Save/SaveLocalRequest.cs b/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/RPC/Save/SaveLocalRequest.cs deleted file mode 100644 index 2dbcdf7e..00000000 --- a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/RPC/Save/SaveLocalRequest.cs +++ /dev/null @@ -1,13 +0,0 @@ -using Newtonsoft.Json.Linq; -using Rubberduck.ServerPlatform.Platform.Model.Database; - -namespace Rubberduck.Server.Database.RPC.Save -{ - public class SaveLocalRequest : SaveRequest - { - public SaveLocalRequest(object id, JToken @params) - : base(id, JsonRpcMethods.SaveLocal, @params) - { - } - } -} diff --git a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/RPC/Save/SaveMemberRequest.cs b/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/RPC/Save/SaveMemberRequest.cs deleted file mode 100644 index 24a9d70d..00000000 --- a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/RPC/Save/SaveMemberRequest.cs +++ /dev/null @@ -1,13 +0,0 @@ -using Newtonsoft.Json.Linq; -using Rubberduck.ServerPlatform.Platform.Model.Database; - -namespace Rubberduck.Server.Database.RPC.Save -{ - public class SaveMemberRequest : SaveRequest - { - public SaveMemberRequest(object id, JToken @params) - : base(id, JsonRpcMethods.SaveMember, @params) - { - } - } -} diff --git a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/RPC/Save/SaveModuleRequest.cs b/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/RPC/Save/SaveModuleRequest.cs deleted file mode 100644 index 40b10af2..00000000 --- a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/RPC/Save/SaveModuleRequest.cs +++ /dev/null @@ -1,13 +0,0 @@ -using Newtonsoft.Json.Linq; -using Rubberduck.ServerPlatform.Platform.Model.Database; - -namespace Rubberduck.Server.Database.RPC.Save -{ - public class SaveModuleRequest : SaveRequest - { - public SaveModuleRequest(object id, JToken @params) - : base(id, JsonRpcMethods.SaveModule, @params) - { - } - } -} diff --git a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/RPC/Save/SaveParameterRequest.cs b/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/RPC/Save/SaveParameterRequest.cs deleted file mode 100644 index 9bb3ab60..00000000 --- a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/RPC/Save/SaveParameterRequest.cs +++ /dev/null @@ -1,13 +0,0 @@ -using Newtonsoft.Json.Linq; -using Rubberduck.ServerPlatform.Platform.Model.Database; - -namespace Rubberduck.Server.Database.RPC.Save -{ - public class SaveParameterRequest : SaveRequest - { - public SaveParameterRequest(object id, JToken @params) - : base(id, JsonRpcMethods.SaveParameter, @params) - { - } - } -} diff --git a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/RPC/Save/SaveProjectRequest.cs b/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/RPC/Save/SaveProjectRequest.cs deleted file mode 100644 index 15920306..00000000 --- a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/RPC/Save/SaveProjectRequest.cs +++ /dev/null @@ -1,13 +0,0 @@ -using Newtonsoft.Json.Linq; -using Rubberduck.ServerPlatform.Platform.Model.Database; - -namespace Rubberduck.Server.Database.RPC.Save -{ - public class SaveProjectRequest : SaveRequest - { - public SaveProjectRequest(object id, JToken @params) - : base(id, JsonRpcMethods.SaveProject, @params) - { - } - } -} diff --git a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Rubberduck.Server.Database.csproj b/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Rubberduck.Server.Database.csproj deleted file mode 100644 index af02f63c..00000000 --- a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/Rubberduck.Server.Database.csproj +++ /dev/null @@ -1,401 +0,0 @@ - - - - - - - Debug - AnyCPU - {87228D3B-2801-4025-AFA2-BB6EE6A7F849} - Exe - Rubberduck.Server.LocalDb - Rubberduck.Server.LocalDb - v4.8 - 512 - true - true - - - - - AnyCPU - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - AnyCPU - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - Ducky.ico - - - - ..\..\..\packages\CommandLineParser.2.9.1\lib\net461\CommandLine.dll - - - ..\..\..\packages\Dapper.2.0.123\lib\net461\Dapper.dll - - - ..\..\..\packages\MediatR.12.0.0\lib\netstandard2.0\MediatR.dll - - - ..\..\..\packages\MediatR.Contracts.2.0.0\lib\netstandard2.0\MediatR.Contracts.dll - - - ..\..\..\packages\MessagePack.Annotations.2.4.59\lib\netstandard2.0\MessagePack.Annotations.dll - - - ..\..\..\packages\Microsoft.Bcl.AsyncInterfaces.7.0.0\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll - - - ..\..\..\packages\Microsoft.Build.Framework.17.1.0\lib\net472\Microsoft.Build.Framework.dll - - - ..\..\..\packages\Microsoft.Data.Sqlite.Core.7.0.3\lib\netstandard2.0\Microsoft.Data.Sqlite.dll - - - ..\..\..\packages\Microsoft.Extensions.Configuration.7.0.0\lib\net462\Microsoft.Extensions.Configuration.dll - - - ..\..\..\packages\Microsoft.Extensions.Configuration.Abstractions.7.0.0\lib\net462\Microsoft.Extensions.Configuration.Abstractions.dll - - - ..\..\..\packages\Microsoft.Extensions.Configuration.Binder.7.0.3\lib\net462\Microsoft.Extensions.Configuration.Binder.dll - - - ..\..\..\packages\Microsoft.Extensions.Configuration.CommandLine.7.0.0\lib\net462\Microsoft.Extensions.Configuration.CommandLine.dll - - - ..\..\..\packages\Microsoft.Extensions.Configuration.EnvironmentVariables.7.0.0\lib\net462\Microsoft.Extensions.Configuration.EnvironmentVariables.dll - - - ..\..\..\packages\Microsoft.Extensions.Configuration.FileExtensions.7.0.0\lib\net462\Microsoft.Extensions.Configuration.FileExtensions.dll - - - ..\..\..\packages\Microsoft.Extensions.Configuration.Json.7.0.0\lib\net462\Microsoft.Extensions.Configuration.Json.dll - - - ..\..\..\packages\Microsoft.Extensions.Configuration.UserSecrets.7.0.0\lib\net462\Microsoft.Extensions.Configuration.UserSecrets.dll - - - ..\..\..\packages\Microsoft.Extensions.DependencyInjection.7.0.0\lib\net462\Microsoft.Extensions.DependencyInjection.dll - - - ..\..\..\packages\Microsoft.Extensions.DependencyInjection.Abstractions.7.0.0\lib\net462\Microsoft.Extensions.DependencyInjection.Abstractions.dll - - - ..\..\..\packages\Microsoft.Extensions.FileProviders.Abstractions.7.0.0\lib\net462\Microsoft.Extensions.FileProviders.Abstractions.dll - - - ..\..\..\packages\Microsoft.Extensions.FileProviders.Physical.7.0.0\lib\net462\Microsoft.Extensions.FileProviders.Physical.dll - - - ..\..\..\packages\Microsoft.Extensions.FileSystemGlobbing.7.0.0\lib\net462\Microsoft.Extensions.FileSystemGlobbing.dll - - - ..\..\..\packages\Microsoft.Extensions.Hosting.7.0.1\lib\net462\Microsoft.Extensions.Hosting.dll - - - ..\..\..\packages\Microsoft.Extensions.Hosting.Abstractions.7.0.0\lib\net462\Microsoft.Extensions.Hosting.Abstractions.dll - - - ..\..\..\packages\Microsoft.Extensions.Logging.7.0.0\lib\net462\Microsoft.Extensions.Logging.dll - - - ..\..\..\packages\Microsoft.Extensions.Logging.Abstractions.7.0.0\lib\net462\Microsoft.Extensions.Logging.Abstractions.dll - - - ..\..\..\packages\Microsoft.Extensions.Logging.Configuration.7.0.0\lib\net462\Microsoft.Extensions.Logging.Configuration.dll - - - ..\..\..\packages\Microsoft.Extensions.Logging.Console.7.0.0\lib\net462\Microsoft.Extensions.Logging.Console.dll - - - ..\..\..\packages\Microsoft.Extensions.Logging.Debug.7.0.0\lib\net462\Microsoft.Extensions.Logging.Debug.dll - - - ..\..\..\packages\Microsoft.Extensions.Logging.EventLog.7.0.0\lib\net462\Microsoft.Extensions.Logging.EventLog.dll - - - ..\..\..\packages\Microsoft.Extensions.Logging.EventSource.7.0.0\lib\net462\Microsoft.Extensions.Logging.EventSource.dll - - - ..\..\..\packages\Microsoft.Extensions.Options.7.0.1\lib\net462\Microsoft.Extensions.Options.dll - - - ..\..\..\packages\Microsoft.Extensions.Options.ConfigurationExtensions.7.0.0\lib\net462\Microsoft.Extensions.Options.ConfigurationExtensions.dll - - - ..\..\..\packages\Microsoft.Extensions.Primitives.7.0.0\lib\net462\Microsoft.Extensions.Primitives.dll - - - ..\..\..\packages\Microsoft.NET.StringTools.17.4.0\lib\net472\Microsoft.NET.StringTools.dll - - - ..\..\..\packages\Microsoft.ServiceHub.Framework.4.1.112\lib\netstandard2.0\Microsoft.ServiceHub.Framework.dll - - - ..\..\..\packages\Microsoft.VisualStudio.RpcContracts.17.4.9\lib\netstandard2.0\Microsoft.VisualStudio.RpcContracts.dll - - - ..\..\..\packages\Microsoft.VisualStudio.Threading.17.5.22\lib\net472\Microsoft.VisualStudio.Threading.dll - - - ..\..\..\packages\Microsoft.VisualStudio.Validation.17.0.65\lib\netstandard2.0\Microsoft.VisualStudio.Validation.dll - - - ..\..\..\packages\Microsoft.Win32.Registry.5.0.0\lib\net461\Microsoft.Win32.Registry.dll - - - ..\..\..\packages\Nerdbank.Streams.2.9.112\lib\netstandard2.0\Nerdbank.Streams.dll - - - - ..\..\..\packages\Newtonsoft.Json.13.0.2\lib\net45\Newtonsoft.Json.dll - - - ..\..\..\packages\NLog.5.1.2\lib\net46\NLog.dll - - - ..\..\..\packages\OmniSharp.Extensions.JsonRpc.0.19.7\lib\netstandard2.0\OmniSharp.Extensions.JsonRpc.dll - - - ..\..\..\packages\OmniSharp.Extensions.JsonRpc.Generators.0.19.7\lib\netstandard2.0\OmniSharp.Extensions.JsonRpc.Generators.dll - - - ..\..\..\packages\OmniSharp.Extensions.LanguageClient.0.19.7\lib\netstandard2.0\OmniSharp.Extensions.LanguageClient.dll - - - ..\..\..\packages\OmniSharp.Extensions.LanguageProtocol.0.19.7\lib\netstandard2.0\OmniSharp.Extensions.LanguageProtocol.dll - - - ..\..\..\packages\OmniSharp.Extensions.LanguageServer.0.19.7\lib\netstandard2.0\OmniSharp.Extensions.LanguageServer.dll - - - ..\..\..\packages\OmniSharp.Extensions.LanguageServer.Shared.0.19.7\lib\netstandard2.0\OmniSharp.Extensions.LanguageServer.Shared.dll - - - ..\..\..\packages\SQLitePCLRaw.bundle_e_sqlite3.2.1.4\lib\net461\SQLitePCLRaw.batteries_v2.dll - - - ..\..\..\packages\SQLitePCLRaw.core.2.1.4\lib\netstandard2.0\SQLitePCLRaw.core.dll - - - ..\..\..\packages\SQLitePCLRaw.provider.dynamic_cdecl.2.1.4\lib\netstandard2.0\SQLitePCLRaw.provider.dynamic_cdecl.dll - - - - ..\..\..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll - - - ..\..\..\packages\System.Collections.Immutable.7.0.0\lib\net462\System.Collections.Immutable.dll - - - - - - - ..\..\..\packages\System.Diagnostics.DiagnosticSource.7.0.1\lib\net462\System.Diagnostics.DiagnosticSource.dll - - - ..\..\..\packages\System.IO.4.3.0\lib\net462\System.IO.dll - True - True - - - - ..\..\..\packages\System.IO.Pipelines.7.0.0\lib\net462\System.IO.Pipelines.dll - - - - ..\..\..\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll - - - - ..\..\..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll - - - ..\..\..\packages\System.Reactive.5.0.0\lib\net472\System.Reactive.dll - - - ..\..\..\packages\System.Runtime.4.3.1\lib\net462\System.Runtime.dll - True - True - - - ..\..\..\packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll - - - ..\..\..\packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll - True - True - - - ..\..\..\packages\System.Security.AccessControl.6.0.0\lib\net461\System.Security.AccessControl.dll - - - ..\..\..\packages\System.Security.Cryptography.Algorithms.4.3.1\lib\net463\System.Security.Cryptography.Algorithms.dll - True - True - - - ..\..\..\packages\System.Security.Cryptography.Encoding.4.3.0\lib\net46\System.Security.Cryptography.Encoding.dll - True - True - - - ..\..\..\packages\System.Security.Cryptography.Primitives.4.3.0\lib\net46\System.Security.Cryptography.Primitives.dll - True - True - - - ..\..\..\packages\System.Security.Principal.Windows.5.0.0\lib\net461\System.Security.Principal.Windows.dll - - - ..\..\..\packages\System.Text.Encodings.Web.7.0.0\lib\net462\System.Text.Encodings.Web.dll - - - ..\..\..\packages\System.Text.Json.7.0.2\lib\net462\System.Text.Json.dll - - - ..\..\..\packages\System.Threading.Channels.7.0.0\lib\net462\System.Threading.Channels.dll - - - ..\..\..\packages\System.Threading.Tasks.Dataflow.7.0.0\lib\net462\System.Threading.Tasks.Dataflow.dll - - - ..\..\..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll - - - - ..\..\..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - True - True - Settings.settings - - - - - - - - - - - - - - - - - - - - - - - - - - - - SettingsSingleFileGenerator - Settings.Designer.cs - - - - - {5E2588A5-2EF2-4267-952D-53AEC8F5F173} - Rubberduck.InternalApi - - - {ED65BAAD-743D-4144-AEE2-8D956E6DA599} - Rubberduck.Resources - - - {8d218701-af68-4013-b9c0-108c1d162e11} - Rubberduck.ServerPlatform - - - - - - - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - \ No newline at end of file diff --git a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/dbgraph.dgml b/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/dbgraph.dgml deleted file mode 100644 index 0219198a..00000000 --- a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/dbgraph.dgml +++ /dev/null @@ -1,279 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/packages.config b/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/packages.config deleted file mode 100644 index 57cee34f..00000000 --- a/Server/Rubberduck.DatabaseServer/Rubberduck.Server.Database/packages.config +++ /dev/null @@ -1,81 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Server/Rubberduck.DatabaseServer/Rubberduck.db b/Server/Rubberduck.DatabaseServer/Rubberduck.db deleted file mode 100644 index cd2596d0..00000000 Binary files a/Server/Rubberduck.DatabaseServer/Rubberduck.db and /dev/null differ diff --git a/Server/Rubberduck.DatabaseServer/Scripts/CreateSchema.sql b/Server/Rubberduck.DatabaseServer/Scripts/CreateSchema.sql deleted file mode 100644 index 6bd8ba1c..00000000 --- a/Server/Rubberduck.DatabaseServer/Scripts/CreateSchema.sql +++ /dev/null @@ -1,601 +0,0 @@ -DROP TABLE IF EXISTS [Declarations]; -GO -CREATE TABLE [Declarations] ( - [Id] INTEGER PRIMARY KEY NOT NULL -, [DeclarationType] INTEGER NOT NULL -, [IdentifierName] TEXT NOT NULL -, [DocString] TEXT NULL -- from @Description annotations; COM docstring when !IsUserDefined -, [IsUserDefined] INTEGER NOT NULL -, [AsTypeName] TEXT NULL -, [AsTypeDeclarationId] INTEGER NULL -, [IsArray] INTEGER NOT NULL -, [TypeHint] TEXT NULL -, [ParentDeclarationId] INTEGER NULL --- lines & offsets NULL for projects, modules, and !IsUserDefined -, [ContextStartOffset] INTEGER NULL -, [ContextEndOffset] INTEGER NULL -, [IdentifierStartOffset] INTEGER NULL -, [IdentifierEndOffset] INTEGER NULL -, CONSTRAINT [FK_Declaration_Parent] FOREIGN KEY ([ParentDeclarationId]) REFERENCES [Declarations] ([Id]) -, CONSTRAINT [FK_Declaration_AsType] FOREIGN KEY ([AsTypeDeclarationId]) REFERENCES [Declarations] ([Id]) -); -GO - -DROP TABLE IF EXISTS [Projects]; -GO -CREATE TABLE [Projects] ( - [Id] INTEGER PRIMARY KEY NOT NULL -, [DeclarationId] INTEGER NOT NULL -, [VBProjectId] TEXT NULL -, [Guid] TEXT NULL -, [MajorVersion] INTEGER NULL -, [MinorVersion] INTEGER NULL -, [Path] TEXT NULL -, CONSTRAINT [FK_Project_Declaration] FOREIGN KEY ([DeclarationId]) REFERENCES [Declarations] ([Id]) ON DELETE CASCADE -); -GO - -DROP TABLE IF EXISTS [Modules]; -GO -CREATE TABLE [Modules] ( - [Id] INTEGER PRIMARY KEY NOT NULL -, [DeclarationId] INTEGER NOT NULL -, [Folder] TEXT NULL -- from @Folder annotations -, CONSTRAINT [FK_Module_Declaration] FOREIGN KEY ([DeclarationId]) REFERENCES [Declarations] ([Id]) ON DELETE CASCADE -); -GO - -DROP TABLE IF EXISTS [DeclarationInterfaces]; -GO -CREATE TABLE [DeclarationInterfaces] ( - [DeclarationId] INTEGER NOT NULL -, [ImplementsDeclarationId] INTEGER NOT NULL -, CONSTRAINT [FK_DeclarationInterface_Declarations] FOREIGN KEY ([DeclarationId]) REFERENCES [Declarations] ([Id]) -, CONSTRAINT [FK_DeclarationInterface_ImplementsDeclaration] FOREIGN KEY ([ImplementsDeclarationId]) REFERENCES [Declarations] ([Id]) -); -GO - -DROP TABLE IF EXISTS [Members]; -GO -CREATE TABLE [Members] ( - [Id] INTEGER PRIMARY KEY NOT NULL -, [DeclarationId] INTEGER NOT NULL -, [ImplementsDeclarationId] INTEGER NULL -, [Accessibility] INTEGER NOT NULL -, [IsAutoAssigned] INTEGER NOT NULL -, [IsWithEvents] INTEGER NOT NULL -, [IsDimStmt] INTEGER NOT NULL -, [ValueExpression] TEXT NULL -, CONSTRAINT [FK_Module_Declaration] FOREIGN KEY ([DeclarationId]) REFERENCES [Declarations] ([Id]) ON DELETE CASCADE -, CONSTRAINT [FK_Member_ImplementsDeclaration] FOREIGN KEY ([ImplementsDeclarationId]) REFERENCES [Declarations] ([Id]) -); -GO - -DROP TABLE IF EXISTS [Parameters]; -GO -CREATE TABLE [Parameters] ( - [Id] INTEGER PRIMARY KEY NOT NULL -, [DeclarationId] INTEGER NOT NULL -, [Position] INTEGER NOT NULL -, [IsParamArray] INTEGER NOT NULL -, [IsOptional] INTEGER NOT NULL -, [IsByRef] INTEGER NOT NULL -, [IsByVal] INTEGER NOT NULL -, [IsModifierImplicit] INTEGER NOT NULL -, [DefaultValue] TEXT NULL -, CONSTRAINT [FK_Parameter_Declaration] FOREIGN KEY ([DeclarationId]) REFERENCES [Declarations] ([Id]) ON DELETE CASCADE -); -GO - -DROP TABLE IF EXISTS [Locals]; -GO -CREATE TABLE [Locals] ( - [Id] INTEGER PRIMARY KEY NOT NULL -, [DeclarationId] INTEGER NOT NULL -, [IsAutoAssigned] INTEGER NOT NULL -, [DeclaredValue] TEXT NULL -, CONSTRAINT [FK_Local_Declaration] FOREIGN KEY ([DeclarationId]) REFERENCES [Declarations] ([Id]) ON DELETE CASCADE -); -GO - -DROP TABLE IF EXISTS [IdentifierReferences]; -GO -CREATE TABLE [IdentifierReferences] ( - [Id] INTEGER PRIMARY KEY NOT NULL -, [ReferencedDeclarationId] INTEGER NOT NULL -, [ParentDeclarationId] INTEGER NOT NULL -, [QualifyingReferenceId] INTEGER NULL -, [IsAssignmentTarget] INTEGER NOT NULL -, [IsExplicitCallStatement] INTEGER NOT NULL -, [IsExplicitLetAssignment] INTEGER NOT NULL -, [IsSetAssignment] INTEGER NOT NULL -, [IsReDim] INTEGER NOT NULL -, [IsArrayAccess] INTEGER NOT NULL -, [IsProcedureCoercion] INTEGER NOT NULL -, [IsIndexedDefaultMemberAccess] INTEGER NOT NULL -, [IsNonIndexedDefaultMemberAccess] INTEGER NOT NULL -, [IsInnerRecursiveDefaultMemberAccess] INTEGER NOT NULL -, [DefaultMemberRecursionDepth] INTEGER NULL -, [TypeHint] TEXT NULL -, [ContextStartOffset] INTEGER NOT NULL -, [ContextEndOffset] INTEGER NOT NULL -, [IdentifierStartOffset] INTEGER NOT NULL -, [IdentifierEndOffset] INTEGER NOT NULL -, CONSTRAINT [FK_IdentifierReference_Qualifier] FOREIGN KEY ([QualifyingReferenceId]) REFERENCES [IdentifierReferences] ([Id]) -, CONSTRAINT [FK_Module_Declarations] FOREIGN KEY ([ReferencedDeclarationId]) REFERENCES [Declarations] ([Id]) -, CONSTRAINT [FK_Module_Parent] FOREIGN KEY ([ParentDeclarationId]) REFERENCES [Declarations] ([Id]) -); -GO - -DROP TABLE IF EXISTS [DeclarationAnnotations]; -GO -CREATE TABLE [DeclarationAnnotations] ( - [Id] INTEGER PRIMARY KEY NOT NULL -, [DeclarationId] INTEGER NOT NULL -, [AnnotationName] TEXT NOT NULL -, [AnnotationArgs] TEXT NULL -, [ContextStartOffset] INTEGER NOT NULL -, [ContextEndOffset] INTEGER NOT NULL -, [IdentifierStartOffset] INTEGER NOT NULL -, [IdentifierEndOffset] INTEGER NOT NULL -, CONSTRAINT [FK_DeclarationAnnotations_Declaration] FOREIGN KEY ([DeclarationId]) REFERENCES [Declarations] ([Id]) -); -GO - -DROP TABLE IF EXISTS [DeclarationAttributes] -GO -CREATE TABLE [DeclarationAttributes] ( - [Id] INTEGER PRIMARY KEY NOT NULL -, [DeclarationId] INTEGER NOT NULL -, [AttributeName] TEXT NOT NULL -, [AttributeValues] TEXT NULL -, [ContextStartOffset] INTEGER NOT NULL -, [ContextEndOffset] INTEGER NOT NULL -, [IdentifierStartOffset] INTEGER NOT NULL -, [IdentifierEndOffset] INTEGER NOT NULL -, CONSTRAINT [FK_DeclarationAttributes_Declaration] FOREIGN KEY ([DeclarationId]) REFERENCES [Declarations] ([Id]) -); -GO - -DROP TABLE IF EXISTS [IdentifierReferenceAnnotations] -GO -CREATE TABLE [IdentifierReferenceAnnotations] ( - [Id] INTEGER PRIMARY KEY NOT NULL -, [IdentifierReferenceId] INTEGER NOT NULL -, [AnnotationName] TEXT NOT NULL -, [AnnotationArgs] TEXT NULL -, [ContextStartOffset] INTEGER NOT NULL -, [ContextEndOffset] INTEGER NOT NULL -, [IdentifierStartOffset] INTEGER NOT NULL -, [IdentifierEndOffset] INTEGER NOT NULL -, CONSTRAINT [FK_IdentifierReferenceAnnotations_IdentifierReference] FOREIGN KEY ([IdentifierReferenceId]) REFERENCES [IdentifierReferences] ([Id]) -); - -DROP TABLE IF EXISTS [ProjectSettings] -GO -CREATE TABLE [ProjectSettings] ( - [Id] INTEGER PRIMARY KEY NOT NULL - ,[ProjectId] INTEGER NOT NULL - ,[DataType] INTEGER NOT NULL - ,[Key] TEXT NOT NULL - ,[Value] TEXT NOT NULL - ,CONSTRAINT [NK_ProjectSettings] UNIQUE ([ProjectId],[Key]) - ,CONSTRAINT [FK_Project_ProjectSettings] FOREIGN KEY ([ProjectId]) REFERENCES [Projects] ([Id]) ON DELETE CASCADE -); -GO - -DROP VIEW IF EXISTS [Projects_v1]; -GO -CREATE VIEW [Projects_v1] -AS - SELECT - [Id] = src.[Id] - ,[VBProjectId] = src.[VBProjectId] - ,[Guid] = src.[Guid] - ,[MajorVersion] = src.[MajorVersion] - ,[MinorVersion] = src.[MinorVersion] - ,[Path] = src.[Path] - - ,[DeclarationId] = src.[DeclarationId] - ,[DeclarationType] = d.[DeclarationType] - ,[IdentifierName] = d.[IdentifierName] - ,[IsUserDefined] = d.[IsUserDefined] - - FROM [Projects] src - INNER JOIN [Declarations] d ON src.[DeclarationId] = d.[Id]; -GO - -DROP VIEW IF EXISTS [Modules_v1]; -GO -CREATE VIEW [Modules_v1] -AS - SELECT - [Id] = src.[Id] - ,[Folder] = src.[Folder] - - ,[DeclarationId] = src.[DeclarationId] - ,[DeclarationType] = d.[DeclarationType] - ,[IdentifierName] = d.[IdentifierName] - ,[DocString] = d.[DocString] - ,[IsUserDefined] = d.[IsUserDefined] - - ,[ProjectDeclarationId] = p.[DeclarationId] - ,[ProjectName] = pd.[IdentifierName] - ,[VBProjectId] = p.[VBProjectId] - - FROM [Modules] src - INNER JOIN [Declarations] d ON d.[Id] = src.[DeclarationId] - INNER JOIN [Projects] p ON p.[DeclarationId] = d.[ParentDeclarationId] - INNER JOIN [Declarations] pd ON pd.[Id] = p.[DeclarationId]; -GO - -DROP VIEW IF EXISTS [Members_v1]; -GO -CREATE VIEW [Members_v1] -AS - SELECT - [Id] = src.[Id] - ,[ImplementsDeclarationId] = src.[ImplementsDeclarationId] - ,[Accessibility] = src.[Accessibility] - ,[IsAutoAssigned] = src.[IsAutoAssigned] - ,[IsWithEvents] = src.[IsWithEvents] - ,[IsDimStmt] = src.[IsDimStmt] - ,[ValueExpression] = src.[ValueExpression] - - ,[DeclarationId] = src.[DeclarationId] - ,[DeclarationType] = d.[DeclarationType] - ,[IdentifierName] = d.[IdentifierName] - ,[DocString] = d.[DocString] - ,[IsUserDefined] = d.[IsUserDefined] - - ,[AsTypeName] = d.[AsTypeName] - ,[AsTypeDeclarationId] = d.[AsTypeDeclarationId] - ,[IsArray] = d.[IsArray] - - ,[TypeHint] = d.[TypeHint] - - ,[ContextStartOffset] = d.[ContextStartOffset] - ,[ContextEndOffset] = d.[ContextEndOffset] - ,[IdentifierStartOffset] = d.[IdentifierStartOffset] - ,[IdentifierEndOffset] = d.[IdentifierEndOffset] - - ,[ModuleDeclarationId] = m.[DeclarationId] - ,[ModuleName] = md.[IdentifierName] - ,[Folder] = m.[Folder] - - ,[ProjectDeclarationId] = p.[DeclarationId] - ,[ProjectName] = pd.[IdentifierName] - ,[VBProjectId] = p.[VBProjectId] - - FROM [Members] src - INNER JOIN [Declarations] d ON d.[Id] = src.[DeclarationId] - INNER JOIN [Modules] m ON m.[DeclarationId] = d.[ParentDeclarationId] - INNER JOIN [Declarations] md ON md.[Id] = m.[DeclarationId] - INNER JOIN [Projects] p ON p.[DeclarationId] = md.[ParentDeclarationId] - INNER JOIN [Declarations] pd ON pd.[Id] = p.[DeclarationId]; -GO - -DROP VIEW IF EXISTS [Parameters_v1]; -GO -CREATE VIEW [Parameters_v1] -AS - SELECT - [Id] = src.[Id] - ,[Position] = src.[Position] - ,[IsParamArray] = src.[IsParamArray] - ,[IsOptional] = src.[IsOptional] - ,[IsByRef] = src.[IsByRef] - ,[IsByVal] = src.[IsByVal] - ,[IsModifierImplicit] = src.[IsModifierImplicit] - ,[DefaultValue] = src.[DefaultValue] - - ,[DeclarationId] = src.[DeclarationId] - ,[DeclarationType] = d.[DeclarationType] - ,[IdentifierName] = d.[IdentifierName] - ,[DocString] = d.[DocString] - ,[IsUserDefined] = d.[IsUserDefined] - - ,[AsTypeName] = d.[AsTypeName] - ,[AsTypeDeclarationId] = d.[AsTypeDeclarationId] - ,[IsArray] = d.[IsArray] - ,[TypeHint] = d.[TypeHint] - - ,[ContextStartOffset] = d.[ContextStartOffset] - ,[ContextEndOffset] = d.[ContextEndOffset] - ,[IdentifierStartOffset] = d.[IdentifierStartOffset] - ,[IdentifierEndOffset] = d.[IdentifierEndOffset] - - ,[MemberDeclarationId] = mb.[DeclarationId] - ,[MemberDeclarationType] = mbd.[DeclarationType] - ,[MemberName] = mbd.[IdentifierName] - - ,[ModuleDeclarationId] = m.[DeclarationId] - ,[ModuleDeclarationType] = md.[DeclarationType] - ,[ModuleName] = md.[IdentifierName] - ,[Folder] = m.[Folder] - - ,[ProjectDeclarationId] = p.[DeclarationId] - ,[ProjectName] = pd.[IdentifierName] - ,[VBProjectId] = p.[VBProjectId] - - FROM [Parameters] src - INNER JOIN [Declarations] d ON d.[Id] = src.[DeclarationId] - INNER JOIN [Members] mb ON mb.[DeclarationId] = d.[ParentDeclarationId] - INNER JOIN [Declarations] mbd ON mbd.[Id] = mb.[DeclarationId] - INNER JOIN [Modules] m ON m.[DeclarationId] = mbd.[ParentDeclarationId] - INNER JOIN [Declarations] md ON md.[Id] = m.[DeclarationId] - INNER JOIN [Projects] p ON p.[DeclarationId] = md.[ParentDeclarationId] - INNER JOIN [Declarations] pd ON pd.[Id] = p.[DeclarationId]; -GO - -DROP VIEW IF EXISTS [Locals_v1]; -GO -CREATE VIEW [Locals_v1] -AS - SELECT - [Id] = src.[Id] - ,[IsAutoAssigned] = src.[IsAutoAssigned] - ,[ValueExpression] = src.[ValueExpression] - - ,[DeclarationId] = src.[DeclarationId] - ,[DeclarationType] = d.[DeclarationType] - ,[IdentifierName] = d.[IdentifierName] - ,[DocString] = d.[DocString] - ,[IsUserDefined] = d.[IsUserDefined] - - ,[AsTypeName] = d.[AsTypeName] - ,[AsTypeDeclarationId] = d.[AsTypeDeclarationId] - ,[IsArray] = d.[IsArray] - ,[TypeHint] = d.[TypeHint] - - ,[ContextStartOffset] = d.[ContextStartOffset] - ,[ContextEndOffset] = d.[ContextEndOffset] - ,[IdentifierStartOffset] = d.[IdentifierStartOffset] - ,[IdentifierEndOffset] = d.[IdentifierEndOffset] - - ,[MemberDeclarationId] = mb.[DeclarationId] - ,[MemberDeclarationType] = mbd.[DeclarationType] - ,[MemberName] = mbd.[IdentifierName] - - ,[ModuleDeclarationId] = m.[DeclarationId] - ,[ModuleDeclarationType] = md.[DeclarationType] - ,[ModuleName] = md.[IdentifierName] - ,[Folder] = m.[Folder] - - ,[ProjectDeclarationId] = p.[DeclarationId] - ,[ProjectName] = pd.[IdentifierName] - ,[VBProjectId] = p.[VBProjectId] - - FROM [Locals] src - INNER JOIN [Declarations] d ON d.[Id] = src.[DeclarationId] - INNER JOIN [Members] mb ON mb.[DeclarationId] = d.[ParentDeclarationId] - INNER JOIN [Declarations] mbd ON mbd.[Id] = mb.[DeclarationId] - INNER JOIN [Modules] m ON m.[DeclarationId] = mbd.[ParentDeclarationId] - INNER JOIN [Declarations] md ON md.[Id] = m.[DeclarationId] - INNER JOIN [Projects] p ON p.[DeclarationId] = md.[ParentDeclarationId] - INNER JOIN [Declarations] pd ON pd.[Id] = p.[DeclarationId]; -GO - -DROP VIEW IF EXISTS [IdentifierReferences_v1]; -GO -CREATE VIEW [IdentifierReferences_v1] -AS - - SELECT - [Id] = src.[Id] - ,[TypeHint] = src.[TypeHint] - - ,[IsAssignmentTarget] = src.[IsAssignmentTarget] - ,[IsExplicitCallStatement] = src.[IsExplicitCallStatement] - ,[IsExplicitLetAssignment] = src.[IsExplicitLetAssignment] - ,[IsSetAssignment] = src.[IsSetAssignment] - ,[IsReDim] = src.[IsReDim] - ,[IsArrayAccess] = src.[IsArrayAccess] - ,[IsProcedureCoercion] = src.[IsProcedureCoercion] - ,[IsIndexedDefaultMemberAccess] = src.[IsIndexedDefaultMemberAccess] - ,[IsNonIndexedDefaultMemberAccess] = src.[IsNonIndexedDefaultMemberAccess] - ,[IsInnerRecursiveDefaultMemberAccess] = src.[IsInnerRecursiveDefaultMemberAccess] - ,[DefaultMemberRecursionDepth] = src.[DefaultMemberRecursionDepth] - - ,[ReferenceDeclarationId] = d.[Id] - ,[ReferenceDeclarationType] = d.[DeclarationType] - ,[ReferenceIdentifierName] = d.[IdentifierName] - ,[ReferenceIsUserDefined] = d.[IsUserDefined] - ,[ReferenceDocString] = d.[DocString] - - ,[QualifyingReferenceId] = src.[QualifyingReferenceId] - - ,[ContextStartOffset] = d.[ContextStartOffset] - ,[ContextEndOffset] = d.[ContextEndOffset] - ,[IdentifierStartOffset] = d.[IdentifierStartOffset] - ,[IdentifierEndOffset] = d.[IdentifierEndOffset] - - ,[MemberDeclarationId] = null - ,[MemberDeclarationType] = null - ,[MemberName] = null - - ,[ModuleDeclarationId] = md.[Id] - ,[ModuleDeclarationType] = md.[DeclarationType] - ,[ModuleName] = md.[IdentifierName] - ,[Folder] = m.[Folder] - - ,[ProjectDeclarationId] = p.[DeclarationId] - ,[ProjectName] = pd.[IdentifierName] - ,[VBProjectId] = p.[VBProjectId] - - FROM [IdentifierReferences] src - INNER JOIN [Declarations] d ON d.[Id] = src.[ReferencedDeclarationId] - INNER JOIN [Modules] m ON m.[DeclarationId] = src.[ParentDeclarationId] --> filters out member parents - INNER JOIN [Declarations] md ON md.[Id] = m.[DeclarationId] - INNER JOIN [Projects] p ON p.[DeclarationId] = md.[ParentDeclarationId] - INNER JOIN [Declarations] pd ON pd.[Id] = p.[DeclarationId] - - UNION ALL - - SELECT - [Id] = src.[Id] - ,[TypeHint] = src.[TypeHint] - - ,[IsAssignmentTarget] = src.[IsAssignmentTarget] - ,[IsExplicitCallStatement] = src.[IsExplicitCallStatement] - ,[IsExplicitLetAssignment] = src.[IsExplicitLetAssignment] - ,[IsSetAssignment] = src.[IsSetAssignment] - ,[IsReDim] = src.[IsReDim] - ,[IsArrayAccess] = src.[IsArrayAccess] - ,[IsProcedureCoercion] = src.[IsProcedureCoercion] - ,[IsIndexedDefaultMemberAccess] = src.[IsIndexedDefaultMemberAccess] - ,[IsNonIndexedDefaultMemberAccess] = src.[IsNonIndexedDefaultMemberAccess] - ,[IsInnerRecursiveDefaultMemberAccess] = src.[IsInnerRecursiveDefaultMemberAccess] - ,[DefaultMemberRecursionDepth] = src.[DefaultMemberRecursionDepth] - - ,[ReferenceDeclarationId] = d.[Id] - ,[ReferenceDeclarationType] = d.[DeclarationType] - ,[ReferenceIdentifierName] = d.[IdentifierName] - ,[ReferenceIsUserDefined] = d.[IsUserDefined] - ,[ReferenceDocString] = d.[DocString] - - ,[QualifyingReferenceId] = src.[QualifyingReferenceId] - - ,[ContextStartOffset] = d.[ContextStartOffset] - ,[ContextEndOffset] = d.[ContextEndOffset] - ,[IdentifierStartOffset] = d.[IdentifierStartOffset] - ,[IdentifierEndOffset] = d.[IdentifierEndOffset] - - ,[MemberDeclarationId] = mbd.[Id] - ,[MemberDeclarationType] = mbd.[DeclarationType] - ,[MemberName] = mbd.[IdentifierName] - - ,[ModuleDeclarationId] = md.[Id] - ,[ModuleDeclarationType] = md.[DeclarationType] - ,[ModuleName] = md.[IdentifierName] - ,[Folder] = m.[Folder] - - ,[ProjectDeclarationId] = p.[DeclarationId] - ,[ProjectName] = pd.[IdentifierName] - ,[VBProjectId] = p.[VBProjectId] - - FROM [IdentifierReferences] src - INNER JOIN [Declarations] d ON src.[ReferencedDeclarationId] = d.[Id] - INNER JOIN [Members] mb ON mb.[DeclarationId] = src.[ParentDeclarationId] --> filters out module parents - INNER JOIN [Declarations] mbd ON mbd.[Id] = mb.[DeclarationId] - INNER JOIN [Modules] m ON m.[DeclarationId] = mbd.[ParentDeclarationId] - INNER JOIN [Declarations] md ON md.[Id] = m.[DeclarationId] - INNER JOIN [Projects] p ON p.[DeclarationId] = md.[ParentDeclarationId] - INNER JOIN [Declarations] pd ON pd.[Id] = p.[DeclarationId]; -GO - -DROP VIEW IF EXISTS [ImplementedInterfaces_v1]; -GO -CREATE VIEW [ImplementedInterfaces_v1] -AS - SELECT - [Id] = src.[Id] - ,[Folder] = src.[Folder] - - ,[DeclarationId] = src.[DeclarationId] - ,[DeclarationType] = d.[DeclarationType] - ,[IdentifierName] = d.[IdentifierName] - ,[IsUserDefined] = d.[IsUserDefined] - ,[DocString] = d.[DocString] - - ,[Annotations] = d.[Annotations] - ,[Attributes] = d.[Attributes] - - ,[ProjectId] = p.[Id] - ,[ProjectDeclarationId] = p.[DeclarationId] - ,[ProjectName] = pd.[IdentifierName] - ,[VBProjectId] = p.[VBProjectId] - - ,[IDeclarationId] = dd.[Id] - ,[IDeclarationType] = dd.[DeclarationType] - ,[IIdentifierName] = dd.[IdentifierName] - ,[IIsUserDefined] = dd.[IsUserDefined] - ,[IDocString] = dd.[DocString] - - ,[IAnnotations] = dd.[Annotations] - ,[IAttributes] = dd.[Attributes] - - ,[IProjectId] = pp.[Id] - ,[IProjectDeclarationId] = pp.[DeclarationId] - ,[IProjectName] = ppd.[IdentifierName] - ,[IVBProjectId] = pp.[VBProjectId] - - FROM [Modules] src - INNER JOIN [Declarations] d ON d.[Id] = src.[DeclarationId] - INNER JOIN [Projects] p ON p.[DeclarationId] = d.[ParentDeclarationId] - INNER JOIN [Declarations] pd ON pd.[Id] = p.[DeclarationId] - INNER JOIN [ModuleInterfaces] mi ON mi.[ModuleId] = src.[Id] - INNER JOIN [Modules] i ON i.[Id] = mi.[ImplementsModuleId] - INNER JOIN [Declarations] dd ON dd.[Id] = i.[DeclarationId] - INNER JOIN [Projects] pp ON pp.[DeclarationId] = dd.[ParentDeclarationId] - INNER JOIN [Declarations] ppd ON ppd.[Id] = pp.[DeclarationId]; -GO - -DROP VIEW IF EXISTS [EventHandlers_v1]; -GO -CREATE VIEW [EventHandlers_v1] -AS - SELECT - [Id] = src.[Id] - ,[ImplementsDeclarationId] = src.[ImplementsDeclarationId] - ,[Accessibility] = src.[Accessibility] - ,[IsAutoAssigned] = src.[IsAutoAssigned] - - ,[DeclarationId] = src.[DeclarationId] - ,[DeclarationType] = d.[DeclarationType] - ,[IdentifierName] = d.[IdentifierName] - ,[IsUserDefined] = d.[IsUserDefined] - - ,[AsTypeName] = d.[AsTypeName] - ,[AsTypeDeclarationId] = d.[AsTypeDeclarationId] - ,[IsArray] = d.[IsArray] - ,[DocString] = d.[DocString] - - ,[Annotations] = d.[Annotations] - ,[Attributes] = d.[Attributes] - - ,[ContextStartOffset] = d.[ContextStartOffset] - ,[ContextEndOffset] = d.[ContextEndOffset] - ,[IdentifierStartOffset] = d.[IdentifierStartOffset] - ,[IdentifierEndOffset] = d.[IdentifierEndOffset] - - ,[ModuleId] = m.[Id] - ,[ModuleDeclarationId] = m.[DeclarationId] - ,[ModuleName] = md.[IdentifierName] - ,[Folder] = m.[Folder] - - ,[ProjectId] = p.[Id] - ,[ProjectDeclarationId] = p.[DeclarationId] - ,[ProjectName] = pd.[IdentifierName] - ,[VBProjectId] = p.[VBProjectId] - - ,[TargetModuleId] = i.[Id] - ,[TargetModuleDeclarationId] = i.[DeclarationId] - ,[TargetFolder] = i.[Folder] - ,[TargetDeclarationId] = src.[ImplementsDeclarationId] - ,[TargetDeclarationType] = dd.[DeclarationType] - ,[TargetIdentifierName] = dd.[IdentifierName] - ,[TargetIsUserDefined] = dd.[IsUserDefined] - ,[TargetDocString] = dd.[DocString] - ,[TargetAnnotations] = dd.[Annotations] - ,[TargetAttributes] = dd.[Attributes] - ,[TargetContextStartOffset] = dd.[ContextStartOffset] - ,[TargetContextEndOffset] = dd.[ContextEndOffset] - ,[TargetHighlightStartOffset] = dd.[IdentifierStartOffset] - ,[TargetHighlightEndOffset] = dd.[IdentifierEndOffset] - ,[TargetProjectId] = pp.[Id] - ,[TargetProjectDeclarationId] = pp.[DeclarationId] - ,[TargetProjectName] = ppd.[IdentifierName] - ,[TargetVBProjectId] = pp.[VBProjectId] - - FROM [Members] src - INNER JOIN [Declarations] d ON d.[Id] = src.[DeclarationId] - INNER JOIN [Modules] m ON m.[DeclarationId] = d.[ParentDeclarationId] - INNER JOIN [Declarations] md ON md.[Id] = m.[DeclarationId] - INNER JOIN [Projects] p ON p.[DeclarationId] = md.[ParentDeclarationId] - INNER JOIN [Declarations] pd ON pd.[Id] = p.[DeclarationId] - INNER JOIN [Modules] i ON i.[DeclarationId] = src.[ImplementsDeclarationId] - INNER JOIN [Declarations] dd ON dd.[Id] = i.[DeclarationId] - INNER JOIN [Projects] pp ON pp.[DeclarationId] = i.[ParentDeclarationId] - INNER JOIN [Declarations] ppd ON ppd.[Id] = pp.[DeclarationId]; -GO \ No newline at end of file diff --git a/Server/Rubberduck.Parsing/Abstract/TokenStreamParserBase.cs b/Server/Rubberduck.Parsing/Abstract/TokenStreamParserBase.cs index fdb90194..6f7a41b0 100644 --- a/Server/Rubberduck.Parsing/Abstract/TokenStreamParserBase.cs +++ b/Server/Rubberduck.Parsing/Abstract/TokenStreamParserBase.cs @@ -54,12 +54,12 @@ public IParseTree Parse(WorkspaceFileUri uri, CommonTokenStream tokenStream, Can _ => throw new ArgumentException($"Value '{parserMode}' is not supported.", nameof(parserMode)), }; - var offendingSymbolErrors = errorListener.SyntaxErrors; + var syntaxErrors = errorListener.SyntaxErrors; + var sllErrors = errorListener.PredictionModeFailures; - var syntaxErrors = offendingSymbolErrors.Except(offendingSymbolErrors.OfType()); - var sllErrors = offendingSymbolErrors.OfType(); - - diagnostics = sllErrors.Select(e => e.ToDiagnostic()).ToArray(); + diagnostics = sllErrors.Select(e => e.ToDiagnostic()) + .Concat(syntaxErrors.Select(e => e.ToDiagnostic())) + .ToArray(); errors = syntaxErrors.ToArray(); return tree; diff --git a/Server/Rubberduck.Parsing/Exceptions/RubberduckParseErrorListener.cs b/Server/Rubberduck.Parsing/Exceptions/RubberduckParseErrorListener.cs index 8ccf822b..41d8ed19 100644 --- a/Server/Rubberduck.Parsing/Exceptions/RubberduckParseErrorListener.cs +++ b/Server/Rubberduck.Parsing/Exceptions/RubberduckParseErrorListener.cs @@ -32,7 +32,8 @@ public RubberduckParseErrorListener(WorkspaceFileUri uri, ISyntaxErrorMessageSer protected WorkspaceFileUri Uri { get; } - public ImmutableArray SyntaxErrors => _errors.Values.ToImmutableArray(); + public ImmutableArray SyntaxErrors => _errors.Values.OfType().ToImmutableArray(); + public ImmutableArray PredictionModeFailures => _errors.Values.Except(_errors.Values.OfType()).ToImmutableArray(); /// /// Errors by token; LL syntax errors overwrite SLL failures. @@ -40,9 +41,9 @@ public RubberduckParseErrorListener(WorkspaceFileUri uri, ISyntaxErrorMessageSer /// /// Key is IToken.TokenIndex from the offendingSymbol. /// - private readonly Dictionary _errors; + private readonly Dictionary _errors; - protected void AddOrReplaceError(IToken offendingSymbol, SyntaxErrorException error) => + protected void AddOrReplaceError(IToken offendingSymbol, PredictionFailException error) => _errors[offendingSymbol.TokenIndex] = error; protected virtual AntlrSyntaxErrorInfo GetErrorInfo(IToken offendingSymbol, int line, int charPositionInLine, string msg, RecognitionException e) => @@ -96,8 +97,8 @@ public override void SyntaxError(IRecognizer recognizer, IToken offendingSymbol, } }; var exception = _mode == PredictionMode.Sll - ? new SllPredictionFailException(Uri, symbol, message, e) - : new SyntaxErrorException(Uri, symbol, message, e); + ? (PredictionFailException)new SllPredictionFailException(Uri, symbol, message, e) + : (PredictionFailException)new SyntaxErrorException(Uri, symbol, message, e); AddOrReplaceError(offendingSymbol, exception); diff --git a/Server/Rubberduck.Parsing/Exceptions/SllPredictionFailException.cs b/Server/Rubberduck.Parsing/Exceptions/SllPredictionFailException.cs index 114ccabd..07af7f47 100644 --- a/Server/Rubberduck.Parsing/Exceptions/SllPredictionFailException.cs +++ b/Server/Rubberduck.Parsing/Exceptions/SllPredictionFailException.cs @@ -1,4 +1,5 @@ -using OmniSharp.Extensions.LanguageServer.Protocol.Models; +using Antlr4.Runtime.Atn; +using OmniSharp.Extensions.LanguageServer.Protocol.Models; using Rubberduck.InternalApi.Extensions; using Rubberduck.InternalApi.Model; using Rubberduck.InternalApi.ServerPlatform.LanguageServer; @@ -8,10 +9,12 @@ namespace Rubberduck.Parsing.Exceptions; /// /// An exception that is thrown when the parser fails in SLL prediction mode, which ultimately gets reported as a diagnostic. /// -public class SllPredictionFailException : SyntaxErrorException +public class SllPredictionFailException : PredictionFailException { public SllPredictionFailException(WorkspaceFileUri uri, SyntaxErrorOffendingSymbol symbol, string message, Exception? inner = null) - : base(uri, symbol, message, inner) { } + : base(uri, nameof(Antlr4.Runtime.Atn.PredictionMode.Sll), symbol, message, inner) + { + } public override Diagnostic ToDiagnostic() => RubberduckDiagnostic.SllFailure(this); } diff --git a/Server/Rubberduck.Parsing/Rubberduck.Parsing.csproj b/Server/Rubberduck.Parsing/Rubberduck.Parsing.csproj index 60b57146..09e81133 100644 --- a/Server/Rubberduck.Parsing/Rubberduck.Parsing.csproj +++ b/Server/Rubberduck.Parsing/Rubberduck.Parsing.csproj @@ -21,8 +21,8 @@ - - + + diff --git a/Shared/Rubberduck.InternalApi/Model/Declarations/Execution/VBRuntimeErrorException.cs b/Shared/Rubberduck.InternalApi/Model/Declarations/Execution/VBRuntimeErrorException.cs index 1f912e19..56680a12 100644 --- a/Shared/Rubberduck.InternalApi/Model/Declarations/Execution/VBRuntimeErrorException.cs +++ b/Shared/Rubberduck.InternalApi/Model/Declarations/Execution/VBRuntimeErrorException.cs @@ -63,7 +63,7 @@ public class VBRuntimeErrorException : ApplicationException, IDiagnosticSource /// /// The Classic-VB runtime error numbers and messages - do not localize. /// - private static readonly Dictionary VBRuntimeErrors = new() + public static readonly Dictionary VBRuntimeErrors = new() { [-1] = "Application-defined or object-defined error", [3] = "Return without GoSub", diff --git a/Shared/Rubberduck.InternalApi/Model/RubberduckDiagnostic.cs b/Shared/Rubberduck.InternalApi/Model/RubberduckDiagnostic.cs index ccbd7d05..92356f12 100644 --- a/Shared/Rubberduck.InternalApi/Model/RubberduckDiagnostic.cs +++ b/Shared/Rubberduck.InternalApi/Model/RubberduckDiagnostic.cs @@ -9,30 +9,72 @@ namespace Rubberduck.InternalApi.Model; public enum RubberduckDiagnosticId { // TODO sort and categorize, then carve in stone. - - PreferConcatOperatorForStringConcatenation = 10, - PreferErrRaiseOverErrorStatement, - - SllFailure = 98, - SyntaxError = 99, - - ImplicitStringCoercion = 101, + /* + * [0]: Tokenization & parsing pass + * [000]: IParseTree traversals + * [0000]: Symbol traversals + * [00000]: Execution pass + */ + + + SyntaxError = 1, + SllFailure = 3, + + ImplicitDeclarationsEnabled = 101, // [RD2:OptionExplicitInspection] + ImplicitNonDefaultArrayBase, // [RD2: OptionBaseInspection] + ImplicitTypeDeclarationsEnabled, // [Type]Def + ImplicitByRefModifier, + ImplicitPublicMember, + ImplicitVariantDeclaration, + ImplicitVariantReturnType, + + ImplicitStringCoercion, ImplicitNumericCoercion, ImplicitLetCoercion, ImplicitDateSerialConversion, ImplicitNarrowingConversion, ImplicitWideningConversion, - UnintendedConstantExpression = 1001, + IntegerDataTypeDeclaration = 201, + ModuleScopeDimDeclaration, + MultilineParameterDeclaration, + MultipleDeclarations, + //NotAllPathsReturnValue, // [RD2:NonReturningFunctionInspection] + MisleadingByRefParameter, // property let/set value parameter is always passed ByVal + + ObsoleteCallingConvention = 301, + ObsoleteCallStatement, + ObsoleteCommentSyntax, + //ObsoleteErrorSyntax, + ObsoleteGlobalModifier, + ObsoleteLetStatement, + ObsoleteTypeHint, + ObsoleteWhileWend, + ObsoleteOnLocalErrorStatement, + + ObsoleteMemberUsage = 401, // members with an @Obsolete annotation + InvalidAnnotation = 404, // @NotAnAnnotationButParsedLikeOne + + ImplementationsShouldBePrivate, + PublicDeclarationInWorksheetModule, // [RD2:PublicEnumerationDeclaredInWorksheetInspection] + + // symbol traversals [0000] + UseMeaningfulIdentifierNames = 1001, + HungarianNotation, + + // execution pass diagnostics [00000] + UnintendedConstantExpression = 11001, SuspiciousValueAssignment, TypeCastConversion, BitwiseOperator, - + PreferConcatOperatorForStringConcatenation, + PreferErrRaiseOverErrorStatement, } public static class RubberduckDiagnosticIdExtensions { public static string Code(this RubberduckDiagnosticId id) => $"RD3{(int)id:00000}"; + public static string Code(this VBCompileErrorId id) => $"VBC{(int)id:00000}"; } public record class RubberduckDiagnostic : Diagnostic @@ -89,7 +131,7 @@ public static Diagnostic BitwiseOperator(Symbol symbol) => public static Diagnostic SllFailure(Symbol symbol) => CreateDiagnostic(symbol, DiagnosticSeverity.Hint, RubberduckDiagnosticId.SllFailure, "SLL parser prediction mode failed here; if possible, rephrasing this instruction could improve parsing performance."); - public static Diagnostic SllFailure(SyntaxErrorException error) => + public static Diagnostic SllFailure(PredictionFailException error) => CreateDiagnostic(error.OffendingSymbol, DiagnosticSeverity.Hint, RubberduckDiagnosticId.SllFailure, "SLL parser prediction mode failed here; if possible, rephrasing this instruction could improve parsing performance."); public static Diagnostic SyntaxError(SyntaxErrorException error) => CreateDiagnostic(error.OffendingSymbol, DiagnosticSeverity.Error, RubberduckDiagnosticId.SyntaxError, error.Message, error.Uri.ToString()); diff --git a/Shared/Rubberduck.InternalApi/Rubberduck.InternalApi.csproj b/Shared/Rubberduck.InternalApi/Rubberduck.InternalApi.csproj index d6da00c3..60619a69 100644 --- a/Shared/Rubberduck.InternalApi/Rubberduck.InternalApi.csproj +++ b/Shared/Rubberduck.InternalApi/Rubberduck.InternalApi.csproj @@ -20,7 +20,7 @@ - + {ed65baad-743d-4144-aee2-8d956e6da599} Rubberduck.Resources diff --git a/Shared/Rubberduck.InternalApi/ServerPlatform/LanguageServer/ConcurrentContentStore.cs b/Shared/Rubberduck.InternalApi/ServerPlatform/LanguageServer/ConcurrentContentStore.cs index 5bd237ac..7b6053da 100644 --- a/Shared/Rubberduck.InternalApi/ServerPlatform/LanguageServer/ConcurrentContentStore.cs +++ b/Shared/Rubberduck.InternalApi/ServerPlatform/LanguageServer/ConcurrentContentStore.cs @@ -70,7 +70,7 @@ public TContent GetDocument(WorkspaceUri documentUri) public bool TryGetDocument(WorkspaceUri documentUri, out TContent? content) { - var uri = new WorkspaceFileUri(documentUri.AbsoluteLocation.AbsolutePath, documentUri.WorkspaceRoot); + var uri = new WorkspaceFileUri(Uri.UnescapeDataString(documentUri.AbsoluteLocation.AbsolutePath), documentUri.WorkspaceRoot); var result = Store.TryGetValue(uri, out content); return result; diff --git a/Shared/Rubberduck.InternalApi/ServerPlatform/LanguageServer/SyntaxErrorException.cs b/Shared/Rubberduck.InternalApi/ServerPlatform/LanguageServer/SyntaxErrorException.cs index 6cc50d8e..777217ee 100644 --- a/Shared/Rubberduck.InternalApi/ServerPlatform/LanguageServer/SyntaxErrorException.cs +++ b/Shared/Rubberduck.InternalApi/ServerPlatform/LanguageServer/SyntaxErrorException.cs @@ -10,21 +10,33 @@ namespace Rubberduck.InternalApi.ServerPlatform.LanguageServer; /// This exception indicates either a bug in the grammar... or non-compilable VBA code. /// [Serializable] -public class SyntaxErrorException : Exception +public class SyntaxErrorException : PredictionFailException { public SyntaxErrorException(WorkspaceFileUri uri, SyntaxErrorOffendingSymbol symbol, string message, Exception? inner = null) + : base(uri, "ll", symbol, message, inner) + { + } + + public override Diagnostic ToDiagnostic() => RubberduckDiagnostic.SyntaxError(this); +} + +[Serializable] +public abstract class PredictionFailException : Exception +{ + protected PredictionFailException(WorkspaceFileUri uri, string mode, SyntaxErrorOffendingSymbol symbol, string message, Exception? inner) : base(message, inner) { Uri = uri; + PredictionMode = mode; OffendingSymbol = symbol; } - public WorkspaceFileUri Uri { get; init; } - public SyntaxErrorOffendingSymbol OffendingSymbol { get; init; } + public string PredictionMode { get; init; } + public WorkspaceFileUri Uri { get; init; } - public virtual Diagnostic ToDiagnostic() => RubberduckDiagnostic.SyntaxError(this); + public virtual Diagnostic ToDiagnostic() => RubberduckDiagnostic.SllFailure(this); - public override string ToString() => + public override string ToString() => $"{base.ToString()}\nUri: {Uri} Token: {OffendingSymbol.Name} at L{OffendingSymbol.Range.Start.Line}C{OffendingSymbol.Range.Start.Character}"; -} +} \ No newline at end of file diff --git a/Shared/Rubberduck.InternalApi/Settings/Model/Editor/Tools/ToolWindowSettings.cs b/Shared/Rubberduck.InternalApi/Settings/Model/Editor/Tools/ToolWindowSettings.cs index a2f0358b..8875d301 100644 --- a/Shared/Rubberduck.InternalApi/Settings/Model/Editor/Tools/ToolWindowSettings.cs +++ b/Shared/Rubberduck.InternalApi/Settings/Model/Editor/Tools/ToolWindowSettings.cs @@ -15,7 +15,10 @@ public record class ToolWindowSettings : TypedSettingGroup new DefaultToolWindowLocationSetting(), }; - public ToolWindowSettings() { } + public ToolWindowSettings() + { + Value = DefaultValue = DefaultSettings; + } public ToolWindowSettings(IDictionary settings) : this() { diff --git a/Shared/Rubberduck.InternalApi/Settings/Model/LanguageClient/DisabledMessageKeysSetting.cs b/Shared/Rubberduck.InternalApi/Settings/Model/LanguageClient/DisabledMessageKeysSetting.cs index 046f80e1..710c919d 100644 --- a/Shared/Rubberduck.InternalApi/Settings/Model/LanguageClient/DisabledMessageKeysSetting.cs +++ b/Shared/Rubberduck.InternalApi/Settings/Model/LanguageClient/DisabledMessageKeysSetting.cs @@ -9,7 +9,7 @@ namespace Rubberduck.InternalApi.Settings.Model.LanguageClient; /// public record class DisabledMessageKeysSetting : TypedRubberduckSetting { - public static string[] DefaultSettingValue { get; } = Array.Empty(); + public static string[] DefaultSettingValue { get; } = []; public static void DisableMessageKey(string key, RubberduckSettingsProvider provider) { diff --git a/Shared/Rubberduck.InternalApi/Settings/Model/LanguageServer/Diagnostics/DiagnosticsSettings.cs b/Shared/Rubberduck.InternalApi/Settings/Model/LanguageServer/Diagnostics/DiagnosticsSettings.cs new file mode 100644 index 00000000..0c1c27eb --- /dev/null +++ b/Shared/Rubberduck.InternalApi/Settings/Model/LanguageServer/Diagnostics/DiagnosticsSettings.cs @@ -0,0 +1,147 @@ +using OmniSharp.Extensions.LanguageServer.Protocol.Models; +using Rubberduck.InternalApi.Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text.Json.Serialization; + +namespace Rubberduck.InternalApi.Settings.Model.LanguageServer.Diagnostics; + +public record class DiagnosticsSettings : EnumSettingGroup +{ + public static DiagnosticSetting[] DefaultSettings => + Enum.GetValues().Except(Overrides.Keys) + .Select(e => new DiagnosticSetting { Key = e.Code(), Value = DiagnosticSetting.Default }) + .Concat(Overrides.Values) + .ToArray(); + + public DiagnosticsSettings() + { + DefaultValue = DefaultSettings; + } + + private static Dictionary Overrides { get; } = new() + { + [RubberduckDiagnosticId.UseMeaningfulIdentifierNames] = UseMeaningfulNamesDiagnosticSettings.Default, + }; + + public static DiagnosticsSettings Default { get; } = new DiagnosticsSettings() { Value = DefaultSettings, DefaultValue = DefaultSettings }; +} + +/// +/// The base class for configuring an individual diagnostic. +/// +public record class DiagnosticSetting : TypedSettingGroup +{ + private static readonly RubberduckSetting[] DefaultSettings = + [ + new DiagnosticSeveritySetting(), + ]; + + public DiagnosticSetting() + { + DefaultValue = DefaultSettings; + Value = DefaultValue; + } + + public DiagnosticSetting(TypedSettingGroup original) : base(original) + { + } + + [JsonIgnore] + public DiagnosticSeverity Severity => GetSetting()?.TypedValue ?? DiagnosticSeveritySetting.DefaultSettingValue; + public static DiagnosticSetting Default { get; } = new DiagnosticSetting() { Value = DefaultSettings, DefaultValue = DefaultSettings }; +} + +public record class DiagnosticSeveritySetting : TypedRubberduckSetting +{ + public static DiagnosticSeverity DefaultSettingValue { get; } = DiagnosticSeverity.Warning; + public DiagnosticSeveritySetting() + { + SettingDataType = SettingDataType.EnumValueSetting; + DefaultValue = DefaultSettingValue; + Value = DefaultValue; + } + + public DiagnosticSeveritySetting(DiagnosticSeverity severity) + { + SettingDataType = SettingDataType.EnumValueSetting; + DefaultValue = DefaultSettingValue; + Value = severity; + } +} + +public record class UseMeaningfulNamesDiagnosticSettings : DiagnosticSetting +{ + private static readonly RubberduckSetting[] DefaultSettings = + [ + new DiagnosticSeveritySetting(), + new IgnoredIdentifiersSetting(), + new MinimumNameLengthSetting(), + new FlagDisemvoweledNamesSetting(), + new FlagNumericSuffixesSetting(), + ]; + + public UseMeaningfulNamesDiagnosticSettings() + { + Key = RubberduckDiagnosticId.UseMeaningfulIdentifierNames.Code(); + Value = DefaultValue = DefaultSettings; + } + + [JsonIgnore] + public string[] IgnoredIdentifierPrefixes => GetSetting()?.TypedValue ?? IgnoredIdentifierPrefixesSetting.DefaultSettingValue; + + public new static UseMeaningfulNamesDiagnosticSettings Default { get; } = new UseMeaningfulNamesDiagnosticSettings() { Value = DefaultSettings, DefaultValue = DefaultSettings }; +} + +public record class IgnoredIdentifierPrefixesSetting : TypedRubberduckSetting +{ + public static string[] DefaultSettingValue { get; } = []; + + public IgnoredIdentifierPrefixesSetting() + { + SettingDataType = SettingDataType.ListSetting; + Value = DefaultValue = DefaultSettingValue; + } +} + +public record class IgnoredIdentifiersSetting : TypedRubberduckSetting +{ + public static string[] DefaultSettingValue { get; } = []; + + public IgnoredIdentifiersSetting() + { + SettingDataType = SettingDataType.ListSetting; + Value = DefaultValue = DefaultSettingValue; + } +} + +public record class MinimumNameLengthSetting : NumericRubberduckSetting +{ + public static double DefaultSettingValue { get; } = 3; + + public MinimumNameLengthSetting() + { + Value = DefaultValue = DefaultSettingValue; + } +} + +public record class FlagDisemvoweledNamesSetting : BooleanRubberduckSetting +{ + public static bool DefaultSettingValue { get; } = true; + + public FlagDisemvoweledNamesSetting() + { + Value = DefaultValue = DefaultSettingValue; + } +} + +public record class FlagNumericSuffixesSetting : BooleanRubberduckSetting +{ + public static bool DefaultSettingValue { get; } = true; + + public FlagNumericSuffixesSetting() + { + Value = DefaultValue = DefaultSettingValue; + } +} \ No newline at end of file diff --git a/Shared/Rubberduck.InternalApi/Settings/Model/LanguageServer/LanguageServerSettings.cs b/Shared/Rubberduck.InternalApi/Settings/Model/LanguageServer/LanguageServerSettings.cs index b7e61a4b..976f3849 100644 --- a/Shared/Rubberduck.InternalApi/Settings/Model/LanguageServer/LanguageServerSettings.cs +++ b/Shared/Rubberduck.InternalApi/Settings/Model/LanguageServer/LanguageServerSettings.cs @@ -1,4 +1,4 @@ -using Rubberduck.InternalApi.Settings; +using Rubberduck.InternalApi.Settings.Model.LanguageServer.Diagnostics; using Rubberduck.InternalApi.Settings.Model.ServerStartup; using System.Text.Json.Serialization; @@ -10,11 +10,11 @@ namespace Rubberduck.InternalApi.Settings.Model.LanguageServer; public record class LanguageServerSettings : TypedSettingGroup, IDefaultSettingsProvider { private static readonly RubberduckSetting[] DefaultSettings = - new RubberduckSetting[] - { - new TraceLevelSetting{ Value = TraceLevelSetting.DefaultSettingValue }, + [ + new TraceLevelSetting { Value = TraceLevelSetting.DefaultSettingValue }, new LanguageServerStartupSettings { Value = LanguageServerStartupSettings.DefaultSettings }, - }; + new DiagnosticsSettings { Value = DiagnosticsSettings.DefaultSettings }, + ]; public LanguageServerSettings() { @@ -25,6 +25,8 @@ public LanguageServerSettings() public MessageTraceLevel TraceLevel => GetSetting()?.TypedValue ?? TraceLevelSetting.DefaultSettingValue; [JsonIgnore] public LanguageServerStartupSettings StartupSettings => GetSetting() ?? LanguageServerStartupSettings.Default; + [JsonIgnore] + public DiagnosticsSettings Diagnostics => GetSetting() ?? DiagnosticsSettings.Default; public static LanguageServerSettings Default { get; } = new() { Value = DefaultSettings, DefaultValue = DefaultSettings }; LanguageServerSettings IDefaultSettingsProvider.Default => Default; diff --git a/Shared/Rubberduck.InternalApi/Settings/Model/RubberduckSetting.cs b/Shared/Rubberduck.InternalApi/Settings/Model/RubberduckSetting.cs index 3b45db95..e6a6c542 100644 --- a/Shared/Rubberduck.InternalApi/Settings/Model/RubberduckSetting.cs +++ b/Shared/Rubberduck.InternalApi/Settings/Model/RubberduckSetting.cs @@ -4,6 +4,7 @@ using Rubberduck.InternalApi.Settings.Model.General; using Rubberduck.InternalApi.Settings.Model.LanguageClient; using Rubberduck.InternalApi.Settings.Model.LanguageServer; +using Rubberduck.InternalApi.Settings.Model.LanguageServer.Diagnostics; using Rubberduck.InternalApi.Settings.Model.Logging; using Rubberduck.InternalApi.Settings.Model.ServerStartup; using Rubberduck.InternalApi.Settings.Model.TelemetryServer; @@ -33,6 +34,15 @@ namespace Rubberduck.InternalApi.Settings.Model; [JsonDerivedType(typeof(RequireAddInHostSetting), nameof(RequireAddInHostSetting))] [JsonDerivedType(typeof(RequireSavedHostSetting), nameof(RequireSavedHostSetting))] +[JsonDerivedType(typeof(DiagnosticsSettings), nameof(DiagnosticsSettings))] // ~ diagnostics +[JsonDerivedType(typeof(DiagnosticSetting), nameof(DiagnosticSetting))] +[JsonDerivedType(typeof(DiagnosticSeveritySetting), nameof(DiagnosticSeveritySetting))] +[JsonDerivedType(typeof(UseMeaningfulNamesDiagnosticSettings), nameof(UseMeaningfulNamesDiagnosticSettings))] +[JsonDerivedType(typeof(IgnoredIdentifierPrefixesSetting), nameof(IgnoredIdentifierPrefixesSetting))] +[JsonDerivedType(typeof(MinimumNameLengthSetting), nameof(MinimumNameLengthSetting))] +[JsonDerivedType(typeof(FlagDisemvoweledNamesSetting), nameof(FlagDisemvoweledNamesSetting))] +[JsonDerivedType(typeof(FlagNumericSuffixesSetting), nameof(FlagNumericSuffixesSetting))] + [JsonDerivedType(typeof(WorkspaceSettings), nameof(WorkspaceSettings))] // ~ workspace settings (language client) [JsonDerivedType(typeof(DefaultWorkspaceRootSetting), nameof(DefaultWorkspaceRootSetting))] [JsonDerivedType(typeof(RequireDefaultWorkspaceRootHostSetting), nameof(RequireDefaultWorkspaceRootHostSetting))] diff --git a/Shared/Rubberduck.InternalApi/Settings/Model/RubberduckSettings.cs b/Shared/Rubberduck.InternalApi/Settings/Model/RubberduckSettings.cs index 0d5f8cae..bc6fd608 100644 --- a/Shared/Rubberduck.InternalApi/Settings/Model/RubberduckSettings.cs +++ b/Shared/Rubberduck.InternalApi/Settings/Model/RubberduckSettings.cs @@ -65,11 +65,21 @@ public IEnumerable Diff(RubberduckSettings other) var addedKeys = comparable.Keys.Except(reference.Keys); var deletedKeys = reference.Keys.Except(comparable.Keys); - var modifiedSettings = reference.Where(kvp => - reference[kvp.Key].SettingDataType != SettingDataType.EnumSettingGroup - && reference[kvp.Key].SettingDataType != SettingDataType.SettingGroup - && reference[kvp.Key].SettingDataType != SettingDataType.ListSetting - && IsModified(reference[kvp.Key], comparable[kvp.Key])); + + var skipdiffcheck = new[] { SettingDataType.EnumSettingGroup, SettingDataType.SettingGroup, SettingDataType.ListSetting }; + + var modifiedSettings = from kvp in reference + let type = reference[kvp.Key].SettingDataType + where !skipdiffcheck.Contains(type) + && comparable.ContainsKey(kvp.Key) + && IsModified(reference[kvp.Key], comparable[kvp.Key]) + select kvp; + + //var modifiedSettings = reference.Where(kvp => comparable.ContainsKey(kvp.Key) + // && reference[kvp.Key].SettingDataType != SettingDataType.EnumSettingGroup + // && reference[kvp.Key].SettingDataType != SettingDataType.SettingGroup + // && reference[kvp.Key].SettingDataType != SettingDataType.ListSetting + // && IsModified(reference[kvp.Key], comparable[kvp.Key])); return addedKeys.Select(e => new RubberduckSettingDiff { ComparableValue = comparable[e] }) .Concat(deletedKeys.Select(e => new RubberduckSettingDiff { ReferenceValue = reference[e] })) diff --git a/Shared/Rubberduck.InternalApi/Settings/Model/SettingDataType.cs b/Shared/Rubberduck.InternalApi/Settings/Model/SettingDataType.cs index 726665a8..001c2ca1 100644 --- a/Shared/Rubberduck.InternalApi/Settings/Model/SettingDataType.cs +++ b/Shared/Rubberduck.InternalApi/Settings/Model/SettingDataType.cs @@ -8,20 +8,6 @@ public enum SettingDataType /// SettingGroup, /// - /// A configuration setting that represents a string value. - /// - /// - /// Templated as a TextBox input field in the settings UI. - /// - TextSetting, - /// - /// A configuration setting that represents a valid URI value. - /// - /// - /// Templated as a PathBox input field in the settings UI. - /// - UriSetting, - /// /// A configuration setting that represents a Boolean value. /// /// @@ -51,6 +37,20 @@ public enum SettingDataType /// TimeSpanSetting, /// + /// A configuration setting that represents a string value. + /// + /// + /// Templated as a TextBox input field in the settings UI. + /// + TextSetting, + /// + /// A configuration setting that represents a valid URI value. + /// + /// + /// Templated as a PathBox input field in the settings UI. + /// + UriSetting, + /// /// A configuration setting that represents a list of (string) values. /// /// diff --git a/Shared/Rubberduck.InternalApi/Settings/Model/TelemetryServer/TelemetryServerSettings.cs b/Shared/Rubberduck.InternalApi/Settings/Model/TelemetryServer/TelemetryServerSettings.cs index 491eef50..46b52e2b 100644 --- a/Shared/Rubberduck.InternalApi/Settings/Model/TelemetryServer/TelemetryServerSettings.cs +++ b/Shared/Rubberduck.InternalApi/Settings/Model/TelemetryServer/TelemetryServerSettings.cs @@ -1,6 +1,5 @@ using Microsoft.Extensions.Logging; using Rubberduck.InternalApi.ServerPlatform.TelemetryServer; -using Rubberduck.InternalApi.Settings; using Rubberduck.InternalApi.Settings.Model.ServerStartup; using System; using System.Linq; @@ -68,7 +67,7 @@ public TelemetryServerSettings() TelemetryServerSettings IDefaultSettingsProvider.Default => Default; } -public abstract record class TelemetrySettingGroup : EnumSettingGroup +public abstract record class TelemetrySettingGroup : EnumSettingGroup where TKey : struct, Enum { public bool IsEnabled(TKey key) => ((TelemetrySetting)GetSetting(key)).TypedValue; @@ -139,4 +138,4 @@ public record class TelemetrySetting : BooleanRubberduckSetting public TelemetrySetting() { } -} +} \ No newline at end of file diff --git a/Shared/Rubberduck.InternalApi/Settings/Model/TypedRubberduckSetting.cs b/Shared/Rubberduck.InternalApi/Settings/Model/TypedRubberduckSetting.cs index 1c29e571..84dd3c5f 100644 --- a/Shared/Rubberduck.InternalApi/Settings/Model/TypedRubberduckSetting.cs +++ b/Shared/Rubberduck.InternalApi/Settings/Model/TypedRubberduckSetting.cs @@ -1,4 +1,5 @@ -using System; +using Rubberduck.InternalApi.Settings.Model.LanguageServer.Diagnostics; +using System; using System.Collections.Generic; using System.Linq; using System.Text.Json; @@ -33,6 +34,10 @@ public override object Value object values = json.EnumerateArray().Select(item => item.Deserialize()).ToArray(); _typedValue = (TValue)values; } + else if (value is DiagnosticSetting diagnosticSetting) + { + _typedValue = (TValue)diagnosticSetting.Value; //(TValue)((IEnumerable)value).ToArray(); + } else { _typedValue = (TValue)value; //(TValue)((IEnumerable)value).ToArray(); diff --git a/Shared/Rubberduck.InternalApi/Settings/Model/TypedSettingGroup.cs b/Shared/Rubberduck.InternalApi/Settings/Model/TypedSettingGroup.cs index 409c85c2..96203d30 100644 --- a/Shared/Rubberduck.InternalApi/Settings/Model/TypedSettingGroup.cs +++ b/Shared/Rubberduck.InternalApi/Settings/Model/TypedSettingGroup.cs @@ -13,7 +13,7 @@ public abstract record class TypedSettingGroup : TypedRubberduckSetting ((RubberduckSetting[])Value).Single(e => e.GetType() == type); - private Dictionary? Values => TypedValue?.ToDictionary(e => e.GetType()); + private Dictionary? Values => TypedValue?.ToDictionary(e => e.Key); protected TypedSettingGroup() { @@ -25,13 +25,13 @@ public TypedSettingGroup WithSetting(RubberduckSetting? setting) ArgumentNullException.ThrowIfNull(setting, nameof(setting)); var values = Values ?? throw new InvalidOperationException(); - values[setting.GetType()] = setting; + values[setting.Key] = setting; return this with { Value = values.Values.ToArray() }; } public TypedSettingGroup WithSetting(TSetting setting) where TSetting : RubberduckSetting { var values = Values ?? throw new InvalidOperationException(); - values[typeof(TSetting)] = setting; + values[setting.Key] = setting; return this with { Value = values.Values.ToArray() }; } @@ -67,16 +67,13 @@ private IEnumerable Flatten(RubberduckSetting setting, st } } -public abstract record class MappedBoolSettingGroup : TypedRubberduckSetting +public abstract record class EnumSettingGroup : TypedSettingGroup + where TEnum : struct, Enum + where TSetting : RubberduckSetting { - protected MappedBoolSettingGroup() + public EnumSettingGroup() { - SettingDataType = SettingDataType.SettingGroup; } -} -public abstract record class EnumSettingGroup : MappedBoolSettingGroup - where TEnum : struct, Enum -{ - public BooleanRubberduckSetting GetSetting(TEnum key) => ((BooleanRubberduckSetting[])Value).Single(e => e.Key == key.ToString()); + public TSetting GetSetting(TEnum key) => ((TSetting[])Value).Single(e => e.Key == key.ToString()); } diff --git a/Shared/Rubberduck.InternalApi/appsettings.json b/Shared/Rubberduck.InternalApi/appsettings.json new file mode 100644 index 00000000..a2dcef86 --- /dev/null +++ b/Shared/Rubberduck.InternalApi/appsettings.json @@ -0,0 +1,783 @@ +{ + "GeneralSettings": { + "Value": [ + { + "LocaleSetting": { + "Value": "En-US" + } + }, + { + "ShowSplashSetting": { + "Value": true + } + }, + { + "DisableInitialLegacyIndenterCheckSetting": { + "Value": false + } + }, + { + "DisabledMessageKeysSetting": { + "Value": [] + } + }, + { + "TemplatesLocationSetting": { + "Value": "%LOCALAPPDATA%\\Rubberduck\\Templates" + } + } + ] + }, + "LoggingSettings": { + "Value": [ + { + "DisableInitialLogLevelResetSetting": { + "Value": false + } + }, + { + "LogLevelSetting": { + "Value": 0 + } + }, + { + "TraceLevelSetting": { + "Value": 4 + } + }, + { + "AggregatePerformanceLogsSetting": { + "Value": true + } + }, + { + "SmallAggregateSamplsSizeSetting": { + "Value": 10 + } + }, + { + "LargeAggregateSampleSizeSetting": { + "Value": 100 + } + }, + { + "MaxAggregateSampleSizeSetting": { + "Value": 1000 + } + }, + { + "LowVolumeEventsPerMinuteSetting": { + "Value": 1 + } + }, + { + "HighVolumeEventsPerMinuteSetting": { + "Value": 6 + } + } + ] + }, + "EditorSettings": { + "Value": [ + { + "ExtendWindowChromeSetting": { + "Value": false + } + }, + { + "ShowWelcomeTabSetting": { + "Value": true + } + }, + { + "IdleTimerDurationSetting": { + "Value": "00:00:00" + } + }, + { + "ToolsSettings": { + "Value": [ + { + "WorkspaceExplorerSettings": { + "Value": [ + { + "ShowTooltabOnStartupSetting": { + "Value": true + } + }, + { + "AutoHideTooltabSetting": { + "Value": false + } + }, + { + "DefaultTooltabLocationSetting": { + "Value": 0 + } + } + ] + }, + "ServerTraceSettings": { + "Value": [ + { + "ShowTooltabOnStartupSetting": { + "Value": false + } + }, + { + "AutoHideTooltabSetting": { + "Value": true + } + }, + { + "DefaultTooltabLocationSetting": { + "Value": 0 + } + }, + { + "MaximumMessagesSetting": { + "Value": 1000 + } + } + ] + } + } + ] + } + }, + { + "CodeFoldingSettings": { + "Value": [ + { + "FoldModuleHeadingSetting": { + "Value": true + }, + "FoldModuleAttributesSetting": { + "Value": true + }, + "FoldModuleDeclarationsSetting": { + "Value": false + }, + "FoldScopesSetting": { + "Value": true + }, + "FoldBlockStatementsSetting": { + "Value": true + }, + "FoldRegionsSetting": { + "Value": true + } + } + ] + } + } + ] + }, + "LanguageClientSettings": { + "Value": [ + { + "RequireAddInHostSetting": { + "Value": false + }, + "RequireSavedHostSetting": { + "Value": true + }, + "ExitNotificationDelaySetting": { + "Value": "00:00:01" + }, + "LanguageClientStartupSettings": { + "Value": [ + { + "ServerExecutablePathSetting": { + "Value": "CONFIGURE ME" + } + }, + { + "ServerTransportTypeSetting": { + "Value": 1 + }, + "ServerPipeNameSetting": { + "Value": "Rubberduck.Editor.Pipe" + }, + "ServerMessageModeSetting": { + "Value": 1 + }, + "TraceLevelSetting": { + "Value": 4 + }, + "ClientHealthCheckIntervalSetting": { + "Value": "00:00:10" + } + } + ] + }, + "WorkspaceSettings": { + "Value": [ + { + "DefaultWorkspaceRootSetting": { + "Value": "%LOCALAPPDATA%\\Rubberduck\\Workspaces" + } + }, + { + "RequireDefaultWorkspaceRootHostSetting": { + "Value": true + } + }, + { + "EnableUncWorkspacesSetting": { + "Value": false + } + }, + { + "EnableFileSystemWatchersSetting": { + "Value": false + } + } + ] + } + } + ] + }, + "LanguageServerSettings": { + "Value": [ + { + "LanguageServerStartupSettings": { + "Value": [ + { + "ServerExecutablePathSetting": { + "Value": "CONFIGURE ME" + } + }, + { + "ServerTransportTypeSetting": { + "Value": 1 + } + }, + { + "ServerPipeNameSetting": { + "Value": "Rubberduck.LanguageServer.Pipe" + } + }, + { + "ServerMessageModeSetting": { + "Value": 1 + } + }, + { + "TraceLevelSetting": { + "Value": 4 + } + }, + { + "ClientHealthCheckIntervalSetting": { + "Value": "00:00:10" + } + } + ] + }, + "DiagnosticsSettings": { + "Value": [ + { + "RD300001": { + "Value": [ + { + "DiagnosticSeveritySetting": { + "Value": 2 + } + } + ] + }, + "RD300003": { + "Value": [ + { + "DiagnosticSeveritySetting": { + "Value": 2 + } + } + ] + }, + "RD300101": { + "Value": [ + { + "DiagnosticSeveritySetting": { + "Value": 2 + } + } + ] + }, + "RD300102": { + "Value": [ + { + "DiagnosticSeveritySetting": { + "Value": 2 + } + } + ] + }, + "RD300103": { + "Value": [ + { + "DiagnosticSeveritySetting": { + "Value": 2 + } + } + ] + }, + "RD300104": { + "Value": [ + { + "DiagnosticSeveritySetting": { + "Value": 2 + } + } + ] + }, + "RD300105": { + "Value": [ + { + "DiagnosticSeveritySetting": { + "Value": 2 + } + } + ] + }, + "RD300106": { + "Value": [ + { + "DiagnosticSeveritySetting": { + "Value": 2 + } + } + ] + }, + "RD300107": { + "Value": [ + { + "DiagnosticSeveritySetting": { + "Value": 2 + } + } + ] + }, + "RD300108": { + "Value": [ + { + "DiagnosticSeveritySetting": { + "Value": 2 + } + } + ] + }, + "RD300109": { + "Value": [ + { + "DiagnosticSeveritySetting": { + "Value": 2 + } + } + ] + }, + "RD300110": { + "Value": [ + { + "DiagnosticSeveritySetting": { + "Value": 2 + } + } + ] + }, + "RD300111": { + "Value": [ + { + "DiagnosticSeveritySetting": { + "Value": 2 + } + } + ] + }, + "RD300112": { + "Value": [ + { + "DiagnosticSeveritySetting": { + "Value": 2 + } + } + ] + }, + "RD300113": { + "Value": [ + { + "DiagnosticSeveritySetting": { + "Value": 2 + } + } + ] + }, + "RD300201": { + "Value": [ + { + "DiagnosticSeveritySetting": { + "Value": 2 + } + } + ] + }, + "RD300202": { + "Value": [ + { + "DiagnosticSeveritySetting": { + "Value": 2 + } + } + ] + }, + "RD300203": { + "Value": [ + { + "DiagnosticSeveritySetting": { + "Value": 2 + } + } + ] + }, + "RD300204": { + "Value": [ + { + "DiagnosticSeveritySetting": { + "Value": 2 + } + } + ] + }, + "RD300205": { + "Value": [ + { + "DiagnosticSeveritySetting": { + "Value": 2 + } + } + ] + }, + "RD300301": { + "Value": [ + { + "DiagnosticSeveritySetting": { + "Value": 2 + } + } + ] + }, + "RD300302": { + "Value": [ + { + "DiagnosticSeveritySetting": { + "Value": 2 + } + } + ] + }, + "RD300303": { + "Value": [ + { + "DiagnosticSeveritySetting": { + "Value": 2 + } + } + ] + }, + "RD300304": { + "Value": [ + { + "DiagnosticSeveritySetting": { + "Value": 2 + } + } + ] + }, + "RD300305": { + "Value": [ + { + "DiagnosticSeveritySetting": { + "Value": 2 + } + } + ] + }, + "RD300306": { + "Value": [ + { + "DiagnosticSeveritySetting": { + "Value": 2 + } + } + ] + }, + "RD300307": { + "Value": [ + { + "DiagnosticSeveritySetting": { + "Value": 2 + } + } + ] + }, + "RD300308": { + "Value": [ + { + "DiagnosticSeveritySetting": { + "Value": 2 + } + } + ] + }, + "RD300401": { + "Value": [ + { + "DiagnosticSeveritySetting": { + "Value": 2 + } + } + ] + }, + "RD300404": { + "Value": [ + { + "DiagnosticSeveritySetting": { + "Value": 2 + } + } + ] + }, + "RD300405": { + "Value": [ + { + "DiagnosticSeveritySetting": { + "Value": 2 + } + } + ] + }, + "RD300406": { + "Value": [ + { + "DiagnosticSeveritySetting": { + "Value": 2 + } + } + ] + }, + "RD301001": { + "Value": [ + { + "DiagnosticSeveritySetting": { + "Value": 2 + }, + "IgnoredIdentifiersSetting": { + "Value": [ "I" ] + }, + "MinimumNameLengthSetting": { + "Value": 3 + }, + "FlagDisemvoweledNamesSetting": { + "Value": true + }, + "FlagNumericSuffixesSetting": { + "Value": true + } + } + ] + }, + "RD301002": { + "Value": [ + { + "DiagnosticSeveritySetting": { + "Value": 2 + } + } + ] + }, + "RD311001": { + "Value": [ + { + "DiagnosticSeveritySetting": { + "Value": 2 + } + } + ] + }, + "RD311002": { + "Value": [ + { + "DiagnosticSeveritySetting": { + "Value": 2 + } + } + ] + }, + "RD311003": { + "Value": [ + { + "DiagnosticSeveritySetting": { + "Value": 2 + } + } + ] + }, + "RD311004": { + "Value": [ + { + "DiagnosticSeveritySetting": { + "Value": 2 + } + } + ] + }, + "RD311005": { + "Value": [ + { + "DiagnosticSeveritySetting": { + "Value": 2 + } + } + ] + }, + "RD311006": { + "Value": [ + { + "DiagnosticSeveritySetting": { + "Value": 2 + } + } + ] + } + } + ] + } + } + ] + }, + "UpdateServerSetings": { + "Value": [ + { + "IsUpdateServerEnabledSetting": { + "Value": true + }, + "IncludePreReleasesSetting": { + "Value": true + }, + "WebApiBaseUrlSetting": { + "Value": "Https://api.rubberduckvba.com/api/v1" + }, + "UpdateServerStartupSettings": { + "Value": [ + { + "ServerExecutablePathSetting": { + "Value": "CONFIGURE ME" + } + }, + { + "ServerTransportTypeSetting": { + "Value": 1 + } + }, + { + "ServerPipeNameSetting": { + "Value": "Rubberduck.UpdateServer.Pipe" + } + }, + { + "ServerMessageModeSetting": { + "Value": 1 + } + }, + { + "TraceLevelSetting": { + "Value": 4 + } + }, + { + "ClientHealthCheckIntervalSetting": { + "Value": "00:00:10" + } + } + ] + } + } + ] + }, + "TelemetryServerSettings": { + "Value": [ + { + "IsTelemetryServerEnabledSetting": { + "Value": false + } + }, + { + "StreamTransmissionSetting": { + "Value": false + } + }, + { + "TelemetryEventQueueSizeSetting": { + "Value": 10000 + } + }, + { + "SendEventTelemetrySetting": { + "Value": false + } + }, + { + "SendExceptionTelemetrySetting": { + "Value": true + } + }, + { + "SendMetricTelemetrySetting": { + "Value": false + } + }, + { + "SendTraceTelemetrySetting": { + "Value": false + } + }, + { + "TelemetryServerStartupSettings": { + "Value": [ + { + "ServerExecutablePathSetting": { + "Value": "CONFIGURE ME" + } + }, + { + "ServerTransportTypeSetting": { + "Value": 1 + } + }, + { + "ServerPipeNameSetting": { + "Value": "Rubberduck.TelemetryServer.Pipe" + } + }, + { + "ServerMessageModeSetting": { + "Value": 1 + } + }, + { + "TraceLevelSetting": { + "Value": 4 + } + }, + { + "ClientHealthCheckIntervalSetting": { + "Value": "00:00:10" + } + } + ] + } + } + ] + } +} \ No newline at end of file diff --git a/Shared/Rubberduck.Resources/v3/SettingsUI.Designer.cs b/Shared/Rubberduck.Resources/v3/SettingsUI.Designer.cs index 0cab71a8..986db0bc 100644 --- a/Shared/Rubberduck.Resources/v3/SettingsUI.Designer.cs +++ b/Shared/Rubberduck.Resources/v3/SettingsUI.Designer.cs @@ -168,6 +168,42 @@ public static string DefaultWorkspaceRootSetting_Title { } } + /// + /// Looks up a localized string similar to The reported severity level of the diagnostic.. + /// + public static string DiagnosticSeveritySetting_Description { + get { + return ResourceManager.GetString("DiagnosticSeveritySetting_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Severity. + /// + public static string DiagnosticSeveritySetting_Title { + get { + return ResourceManager.GetString("DiagnosticSeveritySetting_Title", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Configure whether and how each diagnostic is issued by the language server.. + /// + public static string DiagnosticsSettings_Description { + get { + return ResourceManager.GetString("DiagnosticsSettings_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Diagnostics. + /// + public static string DiagnosticsSettings_Title { + get { + return ResourceManager.GetString("DiagnosticsSettings_Title", resourceCulture); + } + } + /// /// Looks up a localized string similar to Lists all the message keys that were opted to "do not show this message again". Removing items from this list will re-enable the corresponding messages.. /// @@ -456,6 +492,24 @@ public static string ExtendWindowChromeSetting_Title { } } + /// + /// Looks up a localized string similar to Flag disemvoweled identifier names. + /// + public static string FlagDisemvoweledNamesSetting_Title { + get { + return ResourceManager.GetString("FlagDisemvoweledNamesSetting_Title", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Flag numeric suffixes in identifier names. + /// + public static string FlagNumericSuffixesSetting_Title { + get { + return ResourceManager.GetString("FlagNumericSuffixesSetting_Title", resourceCulture); + } + } + /// /// Looks up a localized string similar to Whether folding ranges should be created for block statements, e.g. If...End If, Do...Loop, With...End With, etc.. /// @@ -600,6 +654,15 @@ public static string IdleTimerDurationSetting_Title { } } + /// + /// Looks up a localized string similar to Ignored identifiers. + /// + public static string IgnoredIdentifiersSetting_Title { + get { + return ResourceManager.GetString("IgnoredIdentifiersSetting_Title", resourceCulture); + } + } + /// /// Looks up a localized string similar to If enabled, the update server considers pre-release builds when evaluating if a newer version is available.. /// @@ -816,6 +879,402 @@ public static string MetricTelemetrySettings_Title { } } + /// + /// Looks up a localized string similar to Require minimum length. + /// + public static string MinimumNameLengthSetting_Title { + get { + return ResourceManager.GetString("MinimumNameLengthSetting_Title", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Syntax Error. + /// + public static string RD300001_Title { + get { + return ResourceManager.GetString("RD300001_Title", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to SLL Failure. + /// + public static string RD300003_Title { + get { + return ResourceManager.GetString("RD300003_Title", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 'Option Explicit' is missing. Without 'Option Explicit' specified, declarations in a module are allowed to be implicit, which defers type checks and other validations to run-time.. + /// + public static string RD300101_Description { + get { + return ResourceManager.GetString("RD300101_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Implicit Declarations Enabled. + /// + public static string RD300101_Title { + get { + return ResourceManager.GetString("RD300101_Title", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 'Option Base 1' is specified. Implicitly-sized arrays are normally safely assumed to have a lower bound of 0. This module option makes the lower bound of implicitly-sized arrays start at 1, which can introduce inconsistencies that complicate index handling across arrays.. + /// + public static string RD300102_Description { + get { + return ResourceManager.GetString("RD300102_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Implicit Non Default Array Base. + /// + public static string RD300102_Title { + get { + return ResourceManager.GetString("RD300102_Title", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to '[Type]Def' declarations are assigning a compile-time declared type to implicitly-typed variables, based on the first letter of their identifier name. Implicitly-typed variables are normally safely assumed to be of type 'Variant'.. + /// + public static string RD300103_Description { + get { + return ResourceManager.GetString("RD300103_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Implicit Type Declarations Enabled. + /// + public static string RD300103_Title { + get { + return ResourceManager.GetString("RD300103_Title", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The value parameter of a 'Property Let' or 'Property Set' procedure is always passed by value; even an explicit 'ByRef' modifier is ignored.. + /// + public static string RD300104_Description { + get { + return ResourceManager.GetString("RD300104_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Implicit ByRef Modifier. + /// + public static string RD300104_Title { + get { + return ResourceManager.GetString("RD300104_Title", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Implicit Variant Declaration. + /// + public static string RD300105_Title { + get { + return ResourceManager.GetString("RD300105_Title", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Implicit Return Type. + /// + public static string RD300106_Title { + get { + return ResourceManager.GetString("RD300106_Title", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Implicit String Coercion. + /// + public static string RD300107_Title { + get { + return ResourceManager.GetString("RD300107_Title", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Implicit Numeric Coercion. + /// + public static string RD300108_Title { + get { + return ResourceManager.GetString("RD300108_Title", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Implicit 'Let' Coercion. + /// + public static string RD300109_Title { + get { + return ResourceManager.GetString("RD300109_Title", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Implicit DateSerial Conversion. + /// + public static string RD300110_Title { + get { + return ResourceManager.GetString("RD300110_Title", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Implicit Narrowing Conversion. + /// + public static string RD300111_Title { + get { + return ResourceManager.GetString("RD300111_Title", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Implicit Widening Conversion. + /// + public static string RD300112_Title { + get { + return ResourceManager.GetString("RD300112_Title", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Integer Data Type Declaration. + /// + public static string RD300201_Title { + get { + return ResourceManager.GetString("RD300201_Title", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Module Scoped Dim Declaration. + /// + public static string RD300202_Tilte { + get { + return ResourceManager.GetString("RD300202_Tilte", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Multiple Parameter Declaration. + /// + public static string RD300203_Title { + get { + return ResourceManager.GetString("RD300203_Title", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Multiple Declarations Instruction. + /// + public static string RD300204_Title { + get { + return ResourceManager.GetString("RD300204_Title", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Misleading ByRef Modifier. + /// + public static string RD300205_Title { + get { + return ResourceManager.GetString("RD300205_Title", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Calling convention is not implemented. + /// + public static string RD300301_Title { + get { + return ResourceManager.GetString("RD300301_Title", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Explicit 'Call' statement. + /// + public static string RD300302_Title { + get { + return ResourceManager.GetString("RD300302_Title", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Obsolete 'Rem' comment syntax. + /// + public static string RD300303_Title { + get { + return ResourceManager.GetString("RD300303_Title", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Obsolete 'Global' modifier. + /// + public static string RD300304_Title { + get { + return ResourceManager.GetString("RD300304_Title", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Obsolete explicit 'Let' accessor. + /// + public static string RD300305_Title { + get { + return ResourceManager.GetString("RD300305_Title", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Obsolete type hint. + /// + public static string RD300306_Title { + get { + return ResourceManager.GetString("RD300306_Title", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Obsolete 'While...Wend' loop. + /// + public static string RD300307_Title { + get { + return ResourceManager.GetString("RD300307_Title", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Obsolete 'On Local Error' statement. + /// + public static string RD300308_Title { + get { + return ResourceManager.GetString("RD300308_Title", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to @Obsolete member usage. + /// + public static string RD300401_Title { + get { + return ResourceManager.GetString("RD300401_Title", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid annotation. + /// + public static string RD300404_Title { + get { + return ResourceManager.GetString("RD300404_Title", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Implementation should be 'Private'. + /// + public static string RD300405_Title { + get { + return ResourceManager.GetString("RD300405_Title", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Public declaration in Worksheet module. + /// + public static string RD300406_Title { + get { + return ResourceManager.GetString("RD300406_Title", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Use meaningful names. + /// + public static string RD301001_Title { + get { + return ResourceManager.GetString("RD301001_Title", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Systems Hungarian notation. + /// + public static string RD301002_Title { + get { + return ResourceManager.GetString("RD301002_Title", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unintended constant expression. + /// + public static string RD311001_Title { + get { + return ResourceManager.GetString("RD311001_Title", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Suspicious value assignment. + /// + public static string RD311002_Title { + get { + return ResourceManager.GetString("RD311002_Title", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to TypeCast conversion. + /// + public static string RD311003_Title { + get { + return ResourceManager.GetString("RD311003_Title", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Bitwise operator. + /// + public static string RD311004_Title { + get { + return ResourceManager.GetString("RD311004_Title", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to String concatenation. + /// + public static string RD311005_Title { + get { + return ResourceManager.GetString("RD311005_Title", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Use the 'Err' object to raise errors. + /// + public static string RD311006_Title { + get { + return ResourceManager.GetString("RD311006_Title", resourceCulture); + } + } + /// /// Looks up a localized string similar to If enabled, the Rubberduck Editor cannot be executed standalone, it must be started from within the VBIDE by the Rubberduck add-in.. /// diff --git a/Shared/Rubberduck.Resources/v3/SettingsUI.resx b/Shared/Rubberduck.Resources/v3/SettingsUI.resx index 57dfa155..23908d8f 100644 --- a/Shared/Rubberduck.Resources/v3/SettingsUI.resx +++ b/Shared/Rubberduck.Resources/v3/SettingsUI.resx @@ -153,6 +153,18 @@ Default Workspace Root + + The reported severity level of the diagnostic. + + + Severity + + + Configure whether and how each diagnostic is issued by the language server. + + + Diagnostics + Lists all the message keys that were opted to "do not show this message again". Removing items from this list will re-enable the corresponding messages. @@ -249,6 +261,12 @@ Extend Window Chrome + + Flag disemvoweled identifier names + + + Flag numeric suffixes in identifier names + Whether folding ranges should be created for block statements, e.g. If...End If, Do...Loop, With...End With, etc. @@ -297,6 +315,9 @@ Idle Timer Duration + + Ignored identifiers + If enabled, the update server considers pre-release builds when evaluating if a newer version is available. @@ -369,6 +390,138 @@ Metric Telemetry Settings + + Require minimum length + + + Syntax Error + + + SLL Failure + + + 'Option Explicit' is missing. Without 'Option Explicit' specified, declarations in a module are allowed to be implicit, which defers type checks and other validations to run-time. + + + Implicit Declarations Enabled + + + 'Option Base 1' is specified. Implicitly-sized arrays are normally safely assumed to have a lower bound of 0. This module option makes the lower bound of implicitly-sized arrays start at 1, which can introduce inconsistencies that complicate index handling across arrays. + + + Implicit Non Default Array Base + + + '[Type]Def' declarations are assigning a compile-time declared type to implicitly-typed variables, based on the first letter of their identifier name. Implicitly-typed variables are normally safely assumed to be of type 'Variant'. + + + Implicit Type Declarations Enabled + + + The value parameter of a 'Property Let' or 'Property Set' procedure is always passed by value; even an explicit 'ByRef' modifier is ignored. + + + Implicit ByRef Modifier + + + Implicit Variant Declaration + + + Implicit Return Type + + + Implicit String Coercion + + + Implicit Numeric Coercion + + + Implicit 'Let' Coercion + + + Implicit DateSerial Conversion + + + Implicit Narrowing Conversion + + + Implicit Widening Conversion + + + Integer Data Type Declaration + + + Module Scoped Dim Declaration + + + Multiple Parameter Declaration + + + Multiple Declarations Instruction + + + Misleading ByRef Modifier + + + Calling convention is not implemented + + + Explicit 'Call' statement + + + Obsolete 'Rem' comment syntax + + + Obsolete 'Global' modifier + + + Obsolete explicit 'Let' accessor + + + Obsolete type hint + + + Obsolete 'While...Wend' loop + + + Obsolete 'On Local Error' statement + + + @Obsolete member usage + + + Invalid annotation + + + Implementation should be 'Private' + + + Public declaration in Worksheet module + + + Use meaningful names + + + Systems Hungarian notation + + + Unintended constant expression + + + Suspicious value assignment + + + TypeCast conversion + + + Bitwise operator + + + String concatenation + + + Use the 'Err' object to raise errors + If enabled, the Rubberduck Editor cannot be executed standalone, it must be started from within the VBIDE by the Rubberduck add-in. diff --git a/Shared/Rubberduck.SettingsProvider/README.md b/Shared/Rubberduck.SettingsProvider/README.md deleted file mode 100644 index 9354ff92..00000000 --- a/Shared/Rubberduck.SettingsProvider/README.md +++ /dev/null @@ -1,61 +0,0 @@ -## Rubberduck.SettingsProvider - -### Adding new settings - -Let's keep things organized, but never *ever* be afraid to add new options and configuration settings. - -You'll find settings under `Rubberduck.SettingsProvider.Model` namespaces. - -#### Pick a namespace, add the new file. - -Settings in Rubberduck3 are `record class` types that inherit `TypedRubberduckSetting`, where `TSetting` is a mapped data type: - -- Settings with a `bool` value inherit `BooleanRubberduckSetting` -- Settings with a `double` value inherit `NumericRubberduckSetting` -- Settings with a `string` value inherit `StringRubberduckSetting` -- Settings with a `Uri` value inherit `UriRubberduckSetting` -- Settings with any `enum` value inherit `TypedRubberduckSetting` directly, using the enum type for `TSetting`; `SettingDataType` is set to `EnumValueSetting`. - -New setting groups can be added by inheriting `TypedSettingGroup` (which inherits `TypedRubberduckSetting`, i.e. it's a setting with a value that consists of an array of settings). - -`EnumSettingGroup` is a special type of setting where the value is a `BooleanRubberduckSetting[]`, where each array element is generated and keyed from the `TEnum` enum member names. In order to ensure unique keys, the enum member names are qualified/prefixed with the name of the setting group. See the `TelemetrySettingGroup` implementations for examples. - -##### Naming -- End the name with the word `Setting` -- For _setting groups_, end the name with the word `Settings`. -- The name of a setting is included in the related resource keys. - -### Implementation - -Implementing a setting amounts to specifying a default value and some metadata. - -- Add a `public static TValue DefaultSettingValue { get; } = /* default value here */;` static property -- Add a default (parameterless) constructor and minimally specify `SettingDataType` and `DefaultValue`; if you inherited a typed base class (e.g. `BooleanRubberduckSetting`), the `SettingDataType` is already known. -- Optionally specify `Tags` to alter how/whether the setting gets rendered in the settings UI: - - Use `SettingTags.Hidden` for an automated setting that doesn't need a UI (but still de/serialize to/from .json), e.g. first-startup flags. - - Use `SettingTags.ReadOnlyRecommended` for settings that should probably be left alone, e.g. server executable path startup settings. - -### That's it? - -Almost. There's a `[JsonPolymorphic]` attribute on the base `RubberduckSetting` record class, and then a bunch of `[JsonDerivedType]` attributes with `typeof` and `nameof` arguments. You guessed it. - -And then yeah, once the JSON serialization understands the new setting, that's it indeed - *Rubberduck* understands the new setting now, but it won't be able to tell you until you add the resource keys for the new setting: -- `{Key}.Name` where the value is e.g. the title of the corresponding checkbox in the UI. -- `{Key}.Description` where the value is a short (?) description of the setting that could be used for a tooltip or a description label. - - -### UI? - -Unless you added support for a new data type, you're done - **there is no UI work involved for adding a new setting in Rubberduck 3.x**. -Adding a new setting is only a matter of a few minutes, so go ahead and put that hard-coded default value in a new setting instead of leaving it hard-coded in some service! - -If you *do* need to add support for a new data type, you need a new XAML control template and a little tweak to the template selector. - -The control templates are located under `Rubberduck.UI.Settings.Templates` and while each template is unique, all templates share a number of common traits, like the 1px border with a 4px corner radius that wraps the entire control. - - Background: `{DynamicResource ThemeBackgroundDarkColorBrush}` - - BorderBrush: `{DynamicResource ThemeBackGroundMediumColorBrush}` - -The control itself should have `Background="{DynamicResource ThemeBackgroundColorBrush}"`, and then inside the border is a `DockPanel` with a `FlatToggleButton` docked at the right, a `Label` with `Style="{DynamicResource FormTitleLabelStyle}"` and a `TextBlock` content (for wrapping) with the setting's `Name` (localized string). -Then a `ScrollViewer` also docked at the top, with a ` \ No newline at end of file diff --git a/Shared/Rubberduck.SettingsProvider/SettingsModel.yuml b/Shared/Rubberduck.SettingsProvider/SettingsModel.yuml deleted file mode 100644 index 71f0fbe0..00000000 --- a/Shared/Rubberduck.SettingsProvider/SettingsModel.yuml +++ /dev/null @@ -1,34 +0,0 @@ -[RubberduckSetting]->[TypedRubberduckSetting\] -[TypedRubberduckSetting\]->[NumericRubberduckSetting] -[TypedRubberduckSetting\]->[BooleanRubberduckSetting] -[TypedRubberduckSetting\]->[StringRubberduckSetting] -[TypedRubberduckSetting\]->[UriRubberduckSetting] -[TypedRubberduckSetting\]->[TypedSettingGroup] -[TypedRubberduckSetting\]->[EnumSettingGroup\] -[EnumSettingGroup\]->[TelemetrySettingGroup\] -[TelemetrySettingGroup\]->[TraceTelemetrySettings] -[TelemetrySettingGroup\]->[EventTelemetrySettings] -[TelemetrySettingGroup\]->[ExceptionTelemetrySettings] -[TelemetrySettingGroup\]->[MetricTelemetrySettings] -[TypedSettingGroup]->[RubberduckSettings] -[TypedSettingGroup]->[GeneralSettings] -[TypedSettingGroup]->[EditorSettings] -[TypedSettingGroup]->[ServerStartupSettings] -[TypedSettingGroup]->[LanguageClientSettings] -[TypedSettingGroup]->[LanguageServerSettings] -[TypedSettingGroup]->[TelemetryServerSettings] -[TypedSettingGroup]->[UpdateServerSettings] -[ServerStartupSettings]->[LanguageClientStartupSettings] -[ServerStartupSettings]->[LanguageServerStartupSettings] -[ServerStartupSettings]->[TelemetryServerStartupSettings] -[ServerStartupSettings]->[UpdateServerStartupSettings] -[BooleanRubberduckSetting]->[ShowSplashSetting] -[BooleanRubberduckSetting]->[IncludePreReleasesSetting] -[BooleanRubberduckSetting]->[IsTelemetryEnabledSetting] -[BooleanRubberduckSetting]->[PrettyMuchEverySetting] -[UriRubberduckSetting]->[DefaultWorkspaceRootSetting] -[UriRubberduckSetting]->[ServerExecutablePathSetting] -[UriRubberduckSetting]->[WebApiBaseUrlSetting] -[NumericRubberduckSetting]->[TelemetryEventQueueSizeSetting] -[StringRubberduckSetting]->[LocaleSetting] -[StringRubberduckSetting]->[ServerPipeNameSetting] \ No newline at end of file