diff --git a/Source/Lib/Luthetus.Ide.ClassLib/CommandLine/DotNetCliFacts.cs b/Source/Lib/Luthetus.Ide.ClassLib/CommandLine/DotNetCliFacts.cs index b1cfe0366..0e86be333 100644 --- a/Source/Lib/Luthetus.Ide.ClassLib/CommandLine/DotNetCliFacts.cs +++ b/Source/Lib/Luthetus.Ide.ClassLib/CommandLine/DotNetCliFacts.cs @@ -14,7 +14,7 @@ public static FormattedCommand FormatStartProjectWithoutDebugging( IAbsoluteFilePath projectAbsoluteFilePath) { return FormatStartProjectWithoutDebugging( - projectAbsoluteFilePath.GetAbsoluteFilePathString()); + projectAbsoluteFilePath.FormattedInput); } public static FormattedCommand FormatStartProjectWithoutDebugging( diff --git a/Source/Lib/Luthetus.Ide.ClassLib/FileTemplates/FileTemplateFacts.cs b/Source/Lib/Luthetus.Ide.ClassLib/FileTemplates/FileTemplateFacts.cs index 13b60e78e..1b1e41bd7 100644 --- a/Source/Lib/Luthetus.Ide.ClassLib/FileTemplates/FileTemplateFacts.cs +++ b/Source/Lib/Luthetus.Ide.ClassLib/FileTemplates/FileTemplateFacts.cs @@ -77,7 +77,7 @@ string GetContent(string fileNameNoExtension, string namespaceString) var emptyFileAbsoluteFilePathString = fileTemplateParameter .ParentDirectory.AbsoluteFilePath - .GetAbsoluteFilePathString() + + .FormattedInput + fileTemplateParameter.Filename; // Create AbsoluteFilePath as to leverage it for @@ -93,7 +93,7 @@ string GetContent(string fileNameNoExtension, string namespaceString) var templatedFileFileAbsoluteFilePathString = fileTemplateParameter .ParentDirectory.AbsoluteFilePath - .GetAbsoluteFilePathString() + + .FormattedInput + emptyFileAbsoluteFilePath.FileNameNoExtension + '.' + ExtensionNoPeriodFacts.C_SHARP_CLASS; @@ -145,7 +145,7 @@ string GetContent(string fileNameNoExtension) var emptyFileAbsoluteFilePathString = fileTemplateParameter .ParentDirectory.AbsoluteFilePath - .GetAbsoluteFilePathString() + + .FormattedInput + fileTemplateParameter.Filename; // Create AbsoluteFilePath as to leverage it for @@ -160,7 +160,7 @@ string GetContent(string fileNameNoExtension) var templatedFileFileAbsoluteFilePathString = fileTemplateParameter .ParentDirectory.AbsoluteFilePath - .GetAbsoluteFilePathString() + + .FormattedInput + emptyFileAbsoluteFilePath.FileNameNoExtension + '.' + ExtensionNoPeriodFacts.RAZOR_MARKUP; @@ -225,7 +225,7 @@ string GetContent(string fileNameNoExtension, string namespaceString) var emptyFileAbsoluteFilePathString = fileTemplateParameter .ParentDirectory.AbsoluteFilePath - .GetAbsoluteFilePathString() + + .FormattedInput + fileTemplateParameter.Filename; // Create AbsoluteFilePath as to leverage it for @@ -241,7 +241,7 @@ string GetContent(string fileNameNoExtension, string namespaceString) var templatedFileFileAbsoluteFilePathString = fileTemplateParameter .ParentDirectory.AbsoluteFilePath - .GetAbsoluteFilePathString() + + .FormattedInput + emptyFileAbsoluteFilePath.FileNameNoExtension; if (templatedFileFileAbsoluteFilePathString.EndsWith( diff --git a/Source/Lib/Luthetus.Ide.ClassLib/Menu/MenuOptionsFactory.cs b/Source/Lib/Luthetus.Ide.ClassLib/Menu/MenuOptionsFactory.cs index d7392052e..288d27a58 100644 --- a/Source/Lib/Luthetus.Ide.ClassLib/Menu/MenuOptionsFactory.cs +++ b/Source/Lib/Luthetus.Ide.ClassLib/Menu/MenuOptionsFactory.cs @@ -368,7 +368,7 @@ private void PerformNewFileAction( if (exactMatchFileTemplate is null) { var emptyFileAbsoluteFilePathString = - namespacePath.AbsoluteFilePath.GetAbsoluteFilePathString() + fileName; + namespacePath.AbsoluteFilePath.FormattedInput + fileName; var emptyFileAbsoluteFilePath = new AbsoluteFilePath( emptyFileAbsoluteFilePathString, @@ -376,7 +376,7 @@ private void PerformNewFileAction( _environmentProvider); await _fileSystemProvider.File.WriteAllTextAsync( - emptyFileAbsoluteFilePath.GetAbsoluteFilePathString(), + emptyFileAbsoluteFilePath.FormattedInput, string.Empty, CancellationToken.None); } @@ -395,7 +395,7 @@ await _fileSystemProvider.File.WriteAllTextAsync( _environmentProvider)); await _fileSystemProvider.File.WriteAllTextAsync( - templateResult.FileNamespacePath.AbsoluteFilePath.GetAbsoluteFilePathString(), + templateResult.FileNamespacePath.AbsoluteFilePath.FormattedInput, templateResult.Contents, CancellationToken.None); } @@ -418,7 +418,7 @@ private void PerformNewDirectoryAction( IAbsoluteFilePath parentDirectory, Func onAfterCompletion) { - var directoryAbsoluteFilePathString = parentDirectory.GetAbsoluteFilePathString() + directoryName; + var directoryAbsoluteFilePathString = parentDirectory.FormattedInput + directoryName; var directoryAbsoluteFilePath = new AbsoluteFilePath( directoryAbsoluteFilePathString, @@ -429,7 +429,7 @@ private void PerformNewDirectoryAction( async cancellationToken => { await _fileSystemProvider.Directory.CreateDirectoryAsync( - directoryAbsoluteFilePath.GetAbsoluteFilePathString(), + directoryAbsoluteFilePath.FormattedInput, CancellationToken.None); await onAfterCompletion.Invoke(); @@ -454,14 +454,14 @@ private void PerformDeleteFileAction( if (absoluteFilePath.IsDirectory) { await _fileSystemProvider.Directory.DeleteAsync( - absoluteFilePath.GetAbsoluteFilePathString(), + absoluteFilePath.FormattedInput, true, CancellationToken.None); } else { await _fileSystemProvider.File.DeleteAsync( - absoluteFilePath.GetAbsoluteFilePathString()); + absoluteFilePath.FormattedInput); } await onAfterCompletion.Invoke(); @@ -488,7 +488,7 @@ await _clipboardService ClipboardFacts.FormatPhrase( ClipboardFacts.CopyCommand, ClipboardFacts.AbsoluteFilePathDataType, - absoluteFilePath.GetAbsoluteFilePathString())); + absoluteFilePath.FormattedInput)); await onAfterCompletion.Invoke(); }, @@ -514,7 +514,7 @@ await _clipboardService ClipboardFacts.FormatPhrase( ClipboardFacts.CutCommand, ClipboardFacts.AbsoluteFilePathDataType, - absoluteFilePath.GetAbsoluteFilePathString())); + absoluteFilePath.FormattedInput)); await onAfterCompletion.Invoke(); }, @@ -571,21 +571,21 @@ private void PerformPasteFileAction( if (clipboardAbsoluteFilePath.IsDirectory) { var clipboardDirectoryInfo = new DirectoryInfo( - clipboardAbsoluteFilePath.GetAbsoluteFilePathString()); + clipboardAbsoluteFilePath.FormattedInput); var receivingDirectoryInfo = new DirectoryInfo( - receivingDirectory.GetAbsoluteFilePathString()); + receivingDirectory.FormattedInput); CopyFilesRecursively(clipboardDirectoryInfo, receivingDirectoryInfo); } else { var destinationAbsoluteFilePathString = - receivingDirectory.GetAbsoluteFilePathString() + + receivingDirectory.FormattedInput + clipboardAbsoluteFilePath.FilenameWithExtension; var sourceAbsoluteFilePathString = clipboardAbsoluteFilePath - .GetAbsoluteFilePathString(); + .FormattedInput; await _fileSystemProvider.File.CopyAsync( sourceAbsoluteFilePathString, @@ -652,11 +652,11 @@ await _fileSystemProvider.File.CopyAsync( sourceAbsoluteFilePath = temporaryRenameResult; } - var sourceAbsoluteFilePathString = sourceAbsoluteFilePath.GetAbsoluteFilePathString(); + var sourceAbsoluteFilePathString = sourceAbsoluteFilePath.FormattedInput; var parentOfSource = sourceAbsoluteFilePath.AncestorDirectories.Last(); - var destinationAbsoluteFilePathString = parentOfSource.GetAbsoluteFilePathString() + nextName; + var destinationAbsoluteFilePathString = parentOfSource.FormattedInput + nextName; try { @@ -714,13 +714,13 @@ private void PerformRemoveCSharpProjectReferenceFromSolutionAction( var removeCSharpProjectReferenceFromSolutionFormattedCommand = DotNetCliFacts.FormatRemoveCSharpProjectReferenceFromSolutionAction( - treeViewSolution.Item.NamespacePath.AbsoluteFilePath.GetAbsoluteFilePathString(), - projectNode.Item.AbsoluteFilePath.GetAbsoluteFilePathString()); + treeViewSolution.Item.NamespacePath.AbsoluteFilePath.FormattedInput, + projectNode.Item.AbsoluteFilePath.FormattedInput); var removeCSharpProjectReferenceFromSolutionCommand = new TerminalCommand( TerminalCommandKey.NewTerminalCommandKey(), removeCSharpProjectReferenceFromSolutionFormattedCommand, - workingDirectory.GetAbsoluteFilePathString(), + workingDirectory.FormattedInput, CancellationToken.None, async () => await onAfterCompletion.Invoke()); @@ -754,8 +754,8 @@ public void PerformAddProjectToProjectReferenceAction( return; var formattedCommand = DotNetCliFacts.FormatAddProjectToProjectReference( - projectReceivingReference.Item.AbsoluteFilePath.GetAbsoluteFilePathString(), - referencedProject.GetAbsoluteFilePathString()); + projectReceivingReference.Item.AbsoluteFilePath.FormattedInput, + referencedProject.FormattedInput); var addProjectToProjectReferenceTerminalCommand = new TerminalCommand( TerminalCommandKey.NewTerminalCommandKey(), @@ -825,8 +825,8 @@ public void PerformRemoveProjectToProjectReferenceAction( async cancellationToken => { var formattedCommand = DotNetCliFacts.FormatRemoveProjectToProjectReference( - treeViewCSharpProjectToProjectReference.Item.ModifyProjectNamespacePath.AbsoluteFilePath.GetAbsoluteFilePathString(), - treeViewCSharpProjectToProjectReference.Item.ReferenceProjectAbsoluteFilePath.GetAbsoluteFilePathString()); + treeViewCSharpProjectToProjectReference.Item.ModifyProjectNamespacePath.AbsoluteFilePath.FormattedInput, + treeViewCSharpProjectToProjectReference.Item.ReferenceProjectAbsoluteFilePath.FormattedInput); var removeProjectToProjectReferenceTerminalCommand = new TerminalCommand( TerminalCommandKey.NewTerminalCommandKey(), @@ -879,8 +879,8 @@ public void PerformMoveProjectToSolutionFolderAction( cancellationToken => { var formattedCommand = DotNetCliFacts.FormatMoveProjectToSolutionFolder( - treeViewSolution.Item.NamespacePath.AbsoluteFilePath.GetAbsoluteFilePathString(), - treeViewProjectToMove.Item.AbsoluteFilePath.GetAbsoluteFilePathString(), + treeViewSolution.Item.NamespacePath.AbsoluteFilePath.FormattedInput, + treeViewProjectToMove.Item.AbsoluteFilePath.FormattedInput, solutionFolderPath); var moveProjectToSolutionFolderTerminalCommand = new TerminalCommand( @@ -940,7 +940,7 @@ public void PerformRemoveNuGetPackageReferenceFromProjectAction( async cancellationToken => { var formattedCommand = DotNetCliFacts.FormatRemoveNugetPackageReferenceFromProject( - modifyProjectNamespacePath.AbsoluteFilePath.GetAbsoluteFilePathString(), + modifyProjectNamespacePath.AbsoluteFilePath.FormattedInput, treeViewCSharpProjectNugetPackageReference.Item.LightWeightNugetPackageRecord.Id); var removeNugetPackageReferenceFromProjectTerminalCommand = new TerminalCommand( diff --git a/Source/Lib/Luthetus.Ide.ClassLib/Store/CounterCase/CounterState.cs b/Source/Lib/Luthetus.Ide.ClassLib/Store/CounterCase/CounterState.cs deleted file mode 100644 index ddebcda16..000000000 --- a/Source/Lib/Luthetus.Ide.ClassLib/Store/CounterCase/CounterState.cs +++ /dev/null @@ -1,12 +0,0 @@ -using Fluxor; - -namespace Luthetus.Ide.ClassLib.Store.CounterCase; - -[FeatureState] -public record CounterState(int Count) -{ - public CounterState() : this(0) - { - - } -} \ No newline at end of file diff --git a/Source/Lib/Luthetus.Ide.ClassLib/Store/CounterCase/CounterStateReducer.cs b/Source/Lib/Luthetus.Ide.ClassLib/Store/CounterCase/CounterStateReducer.cs deleted file mode 100644 index 4c6517f20..000000000 --- a/Source/Lib/Luthetus.Ide.ClassLib/Store/CounterCase/CounterStateReducer.cs +++ /dev/null @@ -1,15 +0,0 @@ -using Fluxor; - -namespace Luthetus.Ide.ClassLib.Store.CounterCase; - -public class CounterStateReducer -{ - [ReducerMethod(typeof(IncrementCounterStateAction))] - public static CounterState ReduceIncrementCounterStateAction(CounterState previousCounterState) - { - return previousCounterState with - { - Count = previousCounterState.Count + 1 - }; - } -} \ No newline at end of file diff --git a/Source/Lib/Luthetus.Ide.ClassLib/Store/CounterCase/IncrementCounterStateAction.cs b/Source/Lib/Luthetus.Ide.ClassLib/Store/CounterCase/IncrementCounterStateAction.cs deleted file mode 100644 index 39c8ca041..000000000 --- a/Source/Lib/Luthetus.Ide.ClassLib/Store/CounterCase/IncrementCounterStateAction.cs +++ /dev/null @@ -1,3 +0,0 @@ -namespace Luthetus.Ide.ClassLib.Store.CounterCase; - -public record IncrementCounterStateAction(); \ No newline at end of file diff --git a/Source/Lib/Luthetus.Ide.ClassLib/Store/DotNetSolutionCase/DotNetSolutionState.Effector.cs b/Source/Lib/Luthetus.Ide.ClassLib/Store/DotNetSolutionCase/DotNetSolutionState.Effector.cs index c92adc4e1..c5d7cb3d7 100644 --- a/Source/Lib/Luthetus.Ide.ClassLib/Store/DotNetSolutionCase/DotNetSolutionState.Effector.cs +++ b/Source/Lib/Luthetus.Ide.ClassLib/Store/DotNetSolutionCase/DotNetSolutionState.Effector.cs @@ -48,7 +48,7 @@ public async Task HandleSetDotNetSolutionAction( SetDotNetSolutionAction setDotNetSolutionAction, IDispatcher dispatcher) { - var dotNetSolutionAbsoluteFilePathString = setDotNetSolutionAction.SolutionAbsoluteFilePath.GetAbsoluteFilePathString(); + var dotNetSolutionAbsoluteFilePathString = setDotNetSolutionAction.SolutionAbsoluteFilePath.FormattedInput; var content = await _fileSystemProvider.File.ReadAllTextAsync( dotNetSolutionAbsoluteFilePathString, diff --git a/Source/Lib/Luthetus.Ide.ClassLib/Store/EditorCase/EditorState.Effector.cs b/Source/Lib/Luthetus.Ide.ClassLib/Store/EditorCase/EditorState.Effector.cs index 38188e368..20dfd1bc1 100644 --- a/Source/Lib/Luthetus.Ide.ClassLib/Store/EditorCase/EditorState.Effector.cs +++ b/Source/Lib/Luthetus.Ide.ClassLib/Store/EditorCase/EditorState.Effector.cs @@ -124,7 +124,7 @@ public async Task HandleOpenInEditorAction( _textEditorService.Group.Register(editorTextEditorGroupKey); - var inputFileAbsoluteFilePathString = openInEditorAction.AbsoluteFilePath.GetAbsoluteFilePathString(); + var inputFileAbsoluteFilePathString = openInEditorAction.AbsoluteFilePath.FormattedInput; var textEditorModel = await GetOrCreateTextEditorModelAsync( openInEditorAction.AbsoluteFilePath, diff --git a/Source/Lib/Luthetus.Ide.ClassLib/Store/FileSystemCase/FileSystemState.Effector.cs b/Source/Lib/Luthetus.Ide.ClassLib/Store/FileSystemCase/FileSystemState.Effector.cs index e45b47c51..93abae799 100644 --- a/Source/Lib/Luthetus.Ide.ClassLib/Store/FileSystemCase/FileSystemState.Effector.cs +++ b/Source/Lib/Luthetus.Ide.ClassLib/Store/FileSystemCase/FileSystemState.Effector.cs @@ -47,7 +47,7 @@ public Task HandleSaveFileAction( if (saveFileAction.CancellationToken.IsCancellationRequested) return; - var absoluteFilePathString = saveFileAction.AbsoluteFilePath.GetAbsoluteFilePathString(); + var absoluteFilePathString = saveFileAction.AbsoluteFilePath.FormattedInput; string notificationMessage; diff --git a/Source/Lib/Luthetus.Ide.ClassLib/Store/GitCase/GitState.Effector.cs b/Source/Lib/Luthetus.Ide.ClassLib/Store/GitCase/GitState.Effector.cs index 374383373..c691eba24 100644 --- a/Source/Lib/Luthetus.Ide.ClassLib/Store/GitCase/GitState.Effector.cs +++ b/Source/Lib/Luthetus.Ide.ClassLib/Store/GitCase/GitState.Effector.cs @@ -90,7 +90,7 @@ public async Task HandleRefreshGitAction( })); if (gitState.GitFolderAbsoluteFilePath is null || - !await _fileSystemProvider.Directory.ExistsAsync(gitState.GitFolderAbsoluteFilePath.GetAbsoluteFilePathString()) || + !await _fileSystemProvider.Directory.ExistsAsync(gitState.GitFolderAbsoluteFilePath.FormattedInput) || gitState.GitFolderAbsoluteFilePath.ParentDirectory is null) { return; @@ -109,7 +109,7 @@ public async Task HandleRefreshGitAction( var gitStatusCommand = new TerminalCommand( GitFacts.GitStatusTerminalCommandKey, formattedCommand, - gitState.GitFolderAbsoluteFilePath.ParentDirectory.GetAbsoluteFilePathString(), + gitState.GitFolderAbsoluteFilePath.ParentDirectory.FormattedInput, CancellationToken.None, async () => { @@ -221,7 +221,7 @@ public async Task HandleGitInitAction( var gitInitCommand = new TerminalCommand( GitFacts.GitInitTerminalCommandKey, formattedCommand, - gitState.MostRecentTryFindGitFolderInDirectoryAction.DirectoryAbsoluteFilePath.GetAbsoluteFilePathString(), + gitState.MostRecentTryFindGitFolderInDirectoryAction.DirectoryAbsoluteFilePath.FormattedInput, CancellationToken.None, () => { @@ -291,7 +291,7 @@ public async Task ReduceTryFindGitFolderInDirectoryAction( var directoryAbsoluteFilePathString = tryFindGitFolderInDirectoryAction.DirectoryAbsoluteFilePath - .GetAbsoluteFilePathString(); + .FormattedInput; var childDirectoryAbsoluteFilePathStrings = await _fileSystemProvider.Directory .GetDirectoriesAsync( @@ -452,7 +452,7 @@ private async Task GetGitOutputSectionAsync( .Select(x => { var absoluteFilePathString = - gitState.GitFolderAbsoluteFilePath.ParentDirectory.GetAbsoluteFilePathString() + + gitState.GitFolderAbsoluteFilePath.ParentDirectory.FormattedInput + x.relativePath; var isDirectory = x.relativePath.EndsWith(_environmentProvider.DirectorySeparatorChar) || diff --git a/Source/Lib/Luthetus.Ide.ClassLib/TreeViewImplementations/Helper/TreeViewHelper.CSharpProject.cs b/Source/Lib/Luthetus.Ide.ClassLib/TreeViewImplementations/Helper/TreeViewHelper.CSharpProject.cs index 1d5e68646..9636869bd 100644 --- a/Source/Lib/Luthetus.Ide.ClassLib/TreeViewImplementations/Helper/TreeViewHelper.CSharpProject.cs +++ b/Source/Lib/Luthetus.Ide.ClassLib/TreeViewImplementations/Helper/TreeViewHelper.CSharpProject.cs @@ -16,8 +16,7 @@ public static async Task> CSharpProjectLoadChildrenAsync( cSharpProjectTreeView.Item.AbsoluteFilePath.AncestorDirectories .Last(); - var parentAbsoluteFilePathString = parentDirectoryOfCSharpProject - .GetAbsoluteFilePathString(); + var parentAbsoluteFilePathString = parentDirectoryOfCSharpProject.FormattedInput; var hiddenFiles = HiddenFileFacts .GetHiddenFilesByContainerFileExtension(ExtensionNoPeriodFacts.C_SHARP_PROJECT); diff --git a/Source/Lib/Luthetus.Ide.ClassLib/TreeViewImplementations/Helper/TreeViewHelper.Directory.cs b/Source/Lib/Luthetus.Ide.ClassLib/TreeViewImplementations/Helper/TreeViewHelper.Directory.cs index 607e0b45f..acf7ca971 100644 --- a/Source/Lib/Luthetus.Ide.ClassLib/TreeViewImplementations/Helper/TreeViewHelper.Directory.cs +++ b/Source/Lib/Luthetus.Ide.ClassLib/TreeViewImplementations/Helper/TreeViewHelper.Directory.cs @@ -10,7 +10,7 @@ public static async Task> DirectoryLoadChildrenAsync( this TreeViewNamespacePath directoryTreeView) { var directoryAbsoluteFilePathString = directoryTreeView.Item.AbsoluteFilePath - .GetAbsoluteFilePathString(); + .FormattedInput; var childDirectoryTreeViewModels = (await directoryTreeView.FileSystemProvider @@ -95,7 +95,7 @@ public static async Task> LoadChildrenForDirectoryAsync( TreeViewAbsoluteFilePath directoryTreeView) { var directoryAbsoluteFilePathString = directoryTreeView.Item - .GetAbsoluteFilePathString(); + .FormattedInput; var childDirectoryTreeViewModels = (await directoryTreeView.FileSystemProvider diff --git a/Source/Lib/Luthetus.Ide.ClassLib/TreeViewImplementations/Helper/TreeViewHelper.RazorMarkup.cs b/Source/Lib/Luthetus.Ide.ClassLib/TreeViewImplementations/Helper/TreeViewHelper.RazorMarkup.cs index ecdc9158c..18382e046 100644 --- a/Source/Lib/Luthetus.Ide.ClassLib/TreeViewImplementations/Helper/TreeViewHelper.RazorMarkup.cs +++ b/Source/Lib/Luthetus.Ide.ClassLib/TreeViewImplementations/Helper/TreeViewHelper.RazorMarkup.cs @@ -18,8 +18,7 @@ public static async Task> RazorMarkupLoadChildrenAsync( razorMarkupTreeView.Item.AbsoluteFilePath.AncestorDirectories .Last(); - var parentAbsoluteFilePathString = parentDirectoryOfRazorMarkup - .GetAbsoluteFilePathString(); + var parentAbsoluteFilePathString = parentDirectoryOfRazorMarkup.FormattedInput; var childFileTreeViewModels = (await razorMarkupTreeView.FileSystemProvider diff --git a/Source/Lib/Luthetus.Ide.ClassLib/TreeViewImplementations/TreeViewAbsoluteFilePath.cs b/Source/Lib/Luthetus.Ide.ClassLib/TreeViewImplementations/TreeViewAbsoluteFilePath.cs index 116a653bd..7213d14a8 100644 --- a/Source/Lib/Luthetus.Ide.ClassLib/TreeViewImplementations/TreeViewAbsoluteFilePath.cs +++ b/Source/Lib/Luthetus.Ide.ClassLib/TreeViewImplementations/TreeViewAbsoluteFilePath.cs @@ -36,20 +36,17 @@ public TreeViewAbsoluteFilePath( public override bool Equals(object? obj) { - if (obj is null || - obj is not TreeViewNamespacePath treeViewSolutionExplorer) - { + if (obj is not TreeViewNamespacePath treeViewSolutionExplorer) return false; - } return treeViewSolutionExplorer.Item.AbsoluteFilePath - .GetAbsoluteFilePathString() == - Item.GetAbsoluteFilePathString(); + .FormattedInput == + Item.FormattedInput; } public override int GetHashCode() { - return Item.GetAbsoluteFilePathString().GetHashCode(); + return Item.FormattedInput.GetHashCode(); } public override TreeViewRenderer GetTreeViewRenderer() diff --git a/Source/Lib/Luthetus.Ide.ClassLib/TreeViewImplementations/TreeViewCSharpProjectDependencies.cs b/Source/Lib/Luthetus.Ide.ClassLib/TreeViewImplementations/TreeViewCSharpProjectDependencies.cs index 3868e5db9..f468fb7f7 100644 --- a/Source/Lib/Luthetus.Ide.ClassLib/TreeViewImplementations/TreeViewCSharpProjectDependencies.cs +++ b/Source/Lib/Luthetus.Ide.ClassLib/TreeViewImplementations/TreeViewCSharpProjectDependencies.cs @@ -30,11 +30,8 @@ public TreeViewCSharpProjectDependencies( public override bool Equals(object? obj) { - if (obj is null || - obj is not TreeViewCSharpProjectDependencies otherTreeView) - { + if (obj is not TreeViewCSharpProjectDependencies otherTreeView) return false; - } return otherTreeView.GetHashCode() == GetHashCode(); } @@ -42,7 +39,7 @@ public override bool Equals(object? obj) public override int GetHashCode() { return Item.CSharpProjectNamespacePath.AbsoluteFilePath - .GetAbsoluteFilePathString() + .FormattedInput .GetHashCode(); } diff --git a/Source/Lib/Luthetus.Ide.ClassLib/TreeViewImplementations/TreeViewCSharpProjectNugetPackageReference.cs b/Source/Lib/Luthetus.Ide.ClassLib/TreeViewImplementations/TreeViewCSharpProjectNugetPackageReference.cs index 6262ba40c..49c21d8a0 100644 --- a/Source/Lib/Luthetus.Ide.ClassLib/TreeViewImplementations/TreeViewCSharpProjectNugetPackageReference.cs +++ b/Source/Lib/Luthetus.Ide.ClassLib/TreeViewImplementations/TreeViewCSharpProjectNugetPackageReference.cs @@ -31,11 +31,8 @@ public TreeViewCSharpProjectNugetPackageReference( public override bool Equals(object? obj) { - if (obj is null || - obj is not TreeViewCSharpProjectNugetPackageReference otherTreeView) - { + if (obj is not TreeViewCSharpProjectNugetPackageReference otherTreeView) return false; - } return otherTreeView.GetHashCode() == GetHashCode(); } diff --git a/Source/Lib/Luthetus.Ide.ClassLib/TreeViewImplementations/TreeViewCSharpProjectNugetPackageReferences.cs b/Source/Lib/Luthetus.Ide.ClassLib/TreeViewImplementations/TreeViewCSharpProjectNugetPackageReferences.cs index 590d06a7e..d18a26348 100644 --- a/Source/Lib/Luthetus.Ide.ClassLib/TreeViewImplementations/TreeViewCSharpProjectNugetPackageReferences.cs +++ b/Source/Lib/Luthetus.Ide.ClassLib/TreeViewImplementations/TreeViewCSharpProjectNugetPackageReferences.cs @@ -32,11 +32,8 @@ public TreeViewCSharpProjectNugetPackageReferences( public override bool Equals(object? obj) { - if (obj is null || - obj is not TreeViewCSharpProjectNugetPackageReferences otherTreeView) - { + if (obj is not TreeViewCSharpProjectNugetPackageReferences otherTreeView) return false; - } return otherTreeView.GetHashCode() == GetHashCode(); } @@ -44,7 +41,7 @@ public override bool Equals(object? obj) public override int GetHashCode() { return Item.CSharpProjectNamespacePath.AbsoluteFilePath - .GetAbsoluteFilePathString() + .FormattedInput .GetHashCode(); } @@ -58,10 +55,10 @@ public override TreeViewRenderer GetTreeViewRenderer() public override async Task LoadChildrenAsync() { var content = await FileSystemProvider.File.ReadAllTextAsync( - Item.CSharpProjectNamespacePath.AbsoluteFilePath.GetAbsoluteFilePathString()); + Item.CSharpProjectNamespacePath.AbsoluteFilePath.FormattedInput); var htmlSyntaxUnit = HtmlSyntaxTree.ParseText( - new(Item.CSharpProjectNamespacePath.AbsoluteFilePath.GetAbsoluteFilePathString()), + new(Item.CSharpProjectNamespacePath.AbsoluteFilePath.FormattedInput), content); var syntaxNodeRoot = htmlSyntaxUnit.RootTagSyntax; @@ -106,7 +103,7 @@ public override async Task LoadChildrenAsync() } var cSharpProjectAbsoluteFilePathString = Item.CSharpProjectNamespacePath.AbsoluteFilePath - .GetAbsoluteFilePathString(); + .FormattedInput; var newChildren = lightWeightNugetPackageRecords .Select(npr => (TreeViewNoType)new TreeViewCSharpProjectNugetPackageReference( diff --git a/Source/Lib/Luthetus.Ide.ClassLib/TreeViewImplementations/TreeViewCSharpProjectToProjectReference.cs b/Source/Lib/Luthetus.Ide.ClassLib/TreeViewImplementations/TreeViewCSharpProjectToProjectReference.cs index 3cc18f684..f0d981404 100644 --- a/Source/Lib/Luthetus.Ide.ClassLib/TreeViewImplementations/TreeViewCSharpProjectToProjectReference.cs +++ b/Source/Lib/Luthetus.Ide.ClassLib/TreeViewImplementations/TreeViewCSharpProjectToProjectReference.cs @@ -31,11 +31,8 @@ public TreeViewCSharpProjectToProjectReference( public override bool Equals(object? obj) { - if (obj is null || - obj is not TreeViewCSharpProjectToProjectReference otherTreeView) - { + if (obj is not TreeViewCSharpProjectToProjectReference otherTreeView) return false; - } return otherTreeView.GetHashCode() == GetHashCode(); } @@ -43,10 +40,10 @@ public override bool Equals(object? obj) public override int GetHashCode() { var modifyProjectAbsoluteFilePathString = Item.ModifyProjectNamespacePath.AbsoluteFilePath - .GetAbsoluteFilePathString(); + .FormattedInput; var referenceProjectAbsoluteFilePathString = Item.ReferenceProjectAbsoluteFilePath - .GetAbsoluteFilePathString(); + .FormattedInput; var uniqueAbsoluteFilePathString = modifyProjectAbsoluteFilePathString + referenceProjectAbsoluteFilePathString; diff --git a/Source/Lib/Luthetus.Ide.ClassLib/TreeViewImplementations/TreeViewCSharpProjectToProjectReferences.cs b/Source/Lib/Luthetus.Ide.ClassLib/TreeViewImplementations/TreeViewCSharpProjectToProjectReferences.cs index cd3828209..8d8571303 100644 --- a/Source/Lib/Luthetus.Ide.ClassLib/TreeViewImplementations/TreeViewCSharpProjectToProjectReferences.cs +++ b/Source/Lib/Luthetus.Ide.ClassLib/TreeViewImplementations/TreeViewCSharpProjectToProjectReferences.cs @@ -32,11 +32,8 @@ public TreeViewCSharpProjectToProjectReferences( public override bool Equals(object? obj) { - if (obj is null || - obj is not TreeViewCSharpProjectToProjectReferences otherTreeView) - { + if (obj is not TreeViewCSharpProjectToProjectReferences otherTreeView) return false; - } return otherTreeView.GetHashCode() == GetHashCode(); } @@ -44,7 +41,7 @@ public override bool Equals(object? obj) public override int GetHashCode() { return Item.CSharpProjectNamespacePath.AbsoluteFilePath - .GetAbsoluteFilePathString() + .FormattedInput .GetHashCode(); } @@ -58,10 +55,10 @@ public override TreeViewRenderer GetTreeViewRenderer() public override async Task LoadChildrenAsync() { var content = await FileSystemProvider.File.ReadAllTextAsync( - Item.CSharpProjectNamespacePath.AbsoluteFilePath.GetAbsoluteFilePathString()); + Item.CSharpProjectNamespacePath.AbsoluteFilePath.FormattedInput); var htmlSyntaxUnit = HtmlSyntaxTree.ParseText( - new(Item.CSharpProjectNamespacePath.AbsoluteFilePath.GetAbsoluteFilePathString()), + new(Item.CSharpProjectNamespacePath.AbsoluteFilePath.FormattedInput), content); var syntaxNodeRoot = htmlSyntaxUnit.RootTagSyntax; diff --git a/Source/Lib/Luthetus.Ide.ClassLib/TreeViewImplementations/TreeViewGitFile.cs b/Source/Lib/Luthetus.Ide.ClassLib/TreeViewImplementations/TreeViewGitFile.cs index 5e72ee0a7..7c9f12cff 100644 --- a/Source/Lib/Luthetus.Ide.ClassLib/TreeViewImplementations/TreeViewGitFile.cs +++ b/Source/Lib/Luthetus.Ide.ClassLib/TreeViewImplementations/TreeViewGitFile.cs @@ -24,19 +24,16 @@ public TreeViewGitFile( public override bool Equals(object? obj) { - if (obj is null || - obj is not TreeViewGitFile treeViewGitFile) - { + if (obj is not TreeViewGitFile treeViewGitFile) return false; - } - return treeViewGitFile.Item.AbsoluteFilePath.GetAbsoluteFilePathString() == - Item.AbsoluteFilePath.GetAbsoluteFilePathString(); + return treeViewGitFile.Item.AbsoluteFilePath.FormattedInput == + Item.AbsoluteFilePath.FormattedInput; } public override int GetHashCode() { - return Item.AbsoluteFilePath.GetAbsoluteFilePathString().GetHashCode(); + return Item.AbsoluteFilePath.FormattedInput.GetHashCode(); } public override TreeViewRenderer GetTreeViewRenderer() diff --git a/Source/Lib/Luthetus.Ide.ClassLib/TreeViewImplementations/TreeViewNamespacePath.cs b/Source/Lib/Luthetus.Ide.ClassLib/TreeViewImplementations/TreeViewNamespacePath.cs index 045c5a079..9cb97062b 100644 --- a/Source/Lib/Luthetus.Ide.ClassLib/TreeViewImplementations/TreeViewNamespacePath.cs +++ b/Source/Lib/Luthetus.Ide.ClassLib/TreeViewImplementations/TreeViewNamespacePath.cs @@ -38,19 +38,16 @@ public TreeViewNamespacePath( public override bool Equals(object? obj) { - if (obj is null || - obj is not TreeViewNamespacePath treeViewSolutionExplorer) - { + if (obj is not TreeViewNamespacePath treeViewSolutionExplorer) return false; - } - return treeViewSolutionExplorer.Item.AbsoluteFilePath.GetAbsoluteFilePathString() == - Item.AbsoluteFilePath.GetAbsoluteFilePathString(); + return treeViewSolutionExplorer.Item.AbsoluteFilePath.FormattedInput == + Item.AbsoluteFilePath.FormattedInput; } public override int GetHashCode() { - return Item.AbsoluteFilePath.GetAbsoluteFilePathString().GetHashCode(); + return Item.AbsoluteFilePath.FormattedInput.GetHashCode(); } public override TreeViewRenderer GetTreeViewRenderer() diff --git a/Source/Lib/Luthetus.Ide.ClassLib/TreeViewImplementations/TreeViewSolution.cs b/Source/Lib/Luthetus.Ide.ClassLib/TreeViewImplementations/TreeViewSolution.cs index 23eacb4b2..e18773d08 100644 --- a/Source/Lib/Luthetus.Ide.ClassLib/TreeViewImplementations/TreeViewSolution.cs +++ b/Source/Lib/Luthetus.Ide.ClassLib/TreeViewImplementations/TreeViewSolution.cs @@ -37,20 +37,17 @@ public TreeViewSolution( public override bool Equals(object? obj) { - if (obj is null || - obj is not TreeViewSolution treeViewSolution) - { + if (obj is not TreeViewSolution treeViewSolution) return false; - } - return treeViewSolution.Item.NamespacePath.AbsoluteFilePath.GetAbsoluteFilePathString() == - Item.NamespacePath.AbsoluteFilePath.GetAbsoluteFilePathString(); + return treeViewSolution.Item.NamespacePath.AbsoluteFilePath.FormattedInput == + Item.NamespacePath.AbsoluteFilePath.FormattedInput; } public override int GetHashCode() { return Item.NamespacePath.AbsoluteFilePath - .GetAbsoluteFilePathString() + .FormattedInput .GetHashCode(); } diff --git a/Source/Lib/Luthetus.Ide.ClassLib/TreeViewImplementations/TreeViewSolutionFolder.cs b/Source/Lib/Luthetus.Ide.ClassLib/TreeViewImplementations/TreeViewSolutionFolder.cs index caf558816..377a592e9 100644 --- a/Source/Lib/Luthetus.Ide.ClassLib/TreeViewImplementations/TreeViewSolutionFolder.cs +++ b/Source/Lib/Luthetus.Ide.ClassLib/TreeViewImplementations/TreeViewSolutionFolder.cs @@ -38,20 +38,17 @@ public TreeViewSolutionFolder( public override bool Equals(object? obj) { - if (obj is null || - obj is not TreeViewSolutionFolder treeViewSolutionFolder) - { + if (obj is not TreeViewSolutionFolder treeViewSolutionFolder) return false; - } - return treeViewSolutionFolder.Item.AbsoluteFilePath.GetAbsoluteFilePathString() == - Item.AbsoluteFilePath.GetAbsoluteFilePathString(); + return treeViewSolutionFolder.Item.AbsoluteFilePath.FormattedInput == + Item.AbsoluteFilePath.FormattedInput; } public override int GetHashCode() { return Item.AbsoluteFilePath - .GetAbsoluteFilePathString() + .FormattedInput .GetHashCode(); } diff --git a/Source/Lib/Luthetus.Ide.ClassLib/WebsiteProjectTemplates/WebsiteProjectTemplateRegistry.cs b/Source/Lib/Luthetus.Ide.ClassLib/WebsiteProjectTemplates/WebsiteProjectTemplateRegistry.cs index 17e6a03d7..7acd2fe73 100644 --- a/Source/Lib/Luthetus.Ide.ClassLib/WebsiteProjectTemplates/WebsiteProjectTemplateRegistry.cs +++ b/Source/Lib/Luthetus.Ide.ClassLib/WebsiteProjectTemplates/WebsiteProjectTemplateRegistry.cs @@ -103,7 +103,7 @@ private static async Task HandleBlazorWasmEmptyProjectTemplateAsync( if (parentDirectoryOfProject is null) throw new NotImplementedException(); - var parentDirectoryOfProjectAbsoluteFilePathString = parentDirectoryOfProject.GetAbsoluteFilePathString(); + var parentDirectoryOfProjectAbsoluteFilePathString = parentDirectoryOfProject.FormattedInput; // AppCss { @@ -201,7 +201,7 @@ private static async Task HandleBlazorServerSideEmptyProjectTemplateAsync( if (parentDirectoryOfProject is null) throw new NotImplementedException(); - var parentDirectoryOfProjectAbsoluteFilePathString = parentDirectoryOfProject.GetAbsoluteFilePathString(); + var parentDirectoryOfProjectAbsoluteFilePathString = parentDirectoryOfProject.FormattedInput; // AppRazor { @@ -332,7 +332,7 @@ private static async Task HandleClassLibProjectTemplateAsync( if (parentDirectoryOfProject is null) throw new NotImplementedException(); - var parentDirectoryOfProjectAbsoluteFilePathString = parentDirectoryOfProject.GetAbsoluteFilePathString(); + var parentDirectoryOfProjectAbsoluteFilePathString = parentDirectoryOfProject.FormattedInput; // Class1Cs { @@ -364,7 +364,7 @@ private static async Task HandleRazorLibProjectTemplateAsync( if (parentDirectoryOfProject is null) throw new NotImplementedException(); - var parentDirectoryOfProjectAbsoluteFilePathString = parentDirectoryOfProject.GetAbsoluteFilePathString(); + var parentDirectoryOfProjectAbsoluteFilePathString = parentDirectoryOfProject.FormattedInput; // Component1Razor { @@ -440,7 +440,7 @@ private static async Task HandleConsoleAppProjectTemplateAsync( if (parentDirectoryOfProject is null) throw new NotImplementedException(); - var parentDirectoryOfProjectAbsoluteFilePathString = parentDirectoryOfProject.GetAbsoluteFilePathString(); + var parentDirectoryOfProjectAbsoluteFilePathString = parentDirectoryOfProject.FormattedInput; // ProgramCs { @@ -472,7 +472,7 @@ private static async Task HandleXUnitProjectTemplateAsync( if (parentDirectoryOfProject is null) throw new NotImplementedException(); - var parentDirectoryOfProjectAbsoluteFilePathString = parentDirectoryOfProject.GetAbsoluteFilePathString(); + var parentDirectoryOfProjectAbsoluteFilePathString = parentDirectoryOfProject.FormattedInput; // Csproj { diff --git a/Source/Lib/Luthetus.Ide.RazorLib/Account/LoginFormDisplay.razor b/Source/Lib/Luthetus.Ide.RazorLib/Account/LoginFormDisplay.razor deleted file mode 100644 index 7385d69bc..000000000 --- a/Source/Lib/Luthetus.Ide.RazorLib/Account/LoginFormDisplay.razor +++ /dev/null @@ -1,61 +0,0 @@ -@using Luthetus.Common.RazorLib.Store.AccountCase -
- -
- -
- Container Name: @AccountState.DEFAULT_CONTAINER_NAME -
-
- -
- -
- - - -
- - -
- -
- -
- - - -
- - -
-
\ No newline at end of file diff --git a/Source/Lib/Luthetus.Ide.RazorLib/Account/LoginFormDisplay.razor.cs b/Source/Lib/Luthetus.Ide.RazorLib/Account/LoginFormDisplay.razor.cs deleted file mode 100644 index 0c0d852ce..000000000 --- a/Source/Lib/Luthetus.Ide.RazorLib/Account/LoginFormDisplay.razor.cs +++ /dev/null @@ -1,86 +0,0 @@ -using Fluxor; -using Luthetus.Common.RazorLib.Keyboard; -using Luthetus.Common.RazorLib.Menu; -using Luthetus.Common.RazorLib.Store.AccountCase; -using Microsoft.AspNetCore.Components; -using Microsoft.AspNetCore.Components.Web; - -namespace Luthetus.Ide.RazorLib.Account; - -public partial class LoginFormDisplay : ComponentBase -{ - [Inject] - private IState AccountStateWrap { get; set; } = null!; - [Inject] - private IDispatcher Dispatcher { get; set; } = null!; - - [CascadingParameter] - public MenuOptionWidgetParameters? MenuOptionWidgetParameters { get; set; } - - private ElementReference? _containerInputElementReference; - - private string GroupKey - { - get => AccountStateWrap.Value.GroupName; - set - { - Dispatcher.Dispatch(new AccountState.AccountStateWithAction( - inAccountState => inAccountState with - { - GroupName = value - })); - } - } - - private string Alias - { - get => AccountStateWrap.Value.Alias; - set - { - Dispatcher.Dispatch(new AccountState.AccountStateWithAction( - inAccountState => inAccountState with - { - Alias = value - })); - } - } - - protected override async Task OnAfterRenderAsync(bool firstRender) - { - if (firstRender) - { - if (MenuOptionWidgetParameters is not null && - _containerInputElementReference is not null) - { - try - { - await _containerInputElementReference.Value.FocusAsync(); - } - catch (Exception) - { - // 2023-04-18: The app has had a bug where it "freezes" and must be restarted. - // This bug is seemingly happening randomly. I have a suspicion - // that there are race-condition exceptions occurring with "FocusAsync" - // on an ElementReference. - } - } - } - - await base.OnAfterRenderAsync(firstRender); - } - - private async Task HandleOnKeyDown(KeyboardEventArgs keyboardEventArgs) - { - if (MenuOptionWidgetParameters is not null) - { - if (keyboardEventArgs.Key == KeyboardKeyFacts.MetaKeys.ESCAPE) - { - await MenuOptionWidgetParameters.HideWidgetAsync.Invoke(); - } - else if (keyboardEventArgs.Code == KeyboardKeyFacts.WhitespaceCodes.ENTER_CODE) - { - await MenuOptionWidgetParameters.CompleteWidgetAsync.Invoke(() => { }); - } - } - } -} \ No newline at end of file diff --git a/Source/Lib/Luthetus.Ide.RazorLib/CSharpProjectForm/CSharpProjectFormDisplay.razor.cs b/Source/Lib/Luthetus.Ide.RazorLib/CSharpProjectForm/CSharpProjectFormDisplay.razor.cs index 7a8dfd740..6a6538f72 100644 --- a/Source/Lib/Luthetus.Ide.RazorLib/CSharpProjectForm/CSharpProjectFormDisplay.razor.cs +++ b/Source/Lib/Luthetus.Ide.RazorLib/CSharpProjectForm/CSharpProjectFormDisplay.razor.cs @@ -87,7 +87,7 @@ public partial class CSharpProjectFormDisplay : FluxorComponent private FormattedCommand FormattedAddExistingProjectToSolutionCommand => DotNetCliFacts .FormatAddExistingProjectToSolution( - SolutionNamespacePath?.AbsoluteFilePath.GetAbsoluteFilePathString() + SolutionNamespacePath?.AbsoluteFilePath.FormattedInput ?? string.Empty, $"{_cSharpProjectNameValue}/{_cSharpProjectNameValue}.csproj"); @@ -118,7 +118,7 @@ private void RequestInputFileForParentDirectory(string message) if (afp is null) return; - _parentDirectoryNameValue = afp.GetAbsoluteFilePathString(); + _parentDirectoryNameValue = afp.FormattedInput; await InvokeAsync(StateHasChanged); }, @@ -161,7 +161,7 @@ private async Task FormatDotNetNewListAsync() var newCSharpProjectCommand = new TerminalCommand( _loadProjectTemplatesTerminalCommandKey, formattedCommand, - EnvironmentProvider.HomeDirectoryAbsoluteFilePath.GetAbsoluteFilePathString(), + EnvironmentProvider.HomeDirectoryAbsoluteFilePath.FormattedInput, _newCSharpProjectCancellationTokenSource.Token, async () => { @@ -203,7 +203,7 @@ private async Task FormatDotnetNewListDeprecatedAsync() var newCSharpProjectCommand = new TerminalCommand( _loadProjectTemplatesTerminalCommandKey, formattedCommand, - EnvironmentProvider.HomeDirectoryAbsoluteFilePath.GetAbsoluteFilePathString(), + EnvironmentProvider.HomeDirectoryAbsoluteFilePath.FormattedInput, _newCSharpProjectCancellationTokenSource.Token, async () => { @@ -524,7 +524,7 @@ private async Task HackForWebsite_AddExistingProjectToSolutionAsync( string cSharpProjectAbsoluteFilePathString) { var dotNetSolutionAbsoluteFilePathString = SolutionNamespacePath!.AbsoluteFilePath - .GetAbsoluteFilePathString(); + .FormattedInput; var content = await FileSystemProvider.File.ReadAllTextAsync( dotNetSolutionAbsoluteFilePathString, @@ -564,11 +564,11 @@ private async Task HackForWebsite_AddExistingProjectToSolutionAsync( EnvironmentProvider); await FileSystemProvider.File.WriteAllTextAsync( - SolutionNamespacePath.AbsoluteFilePath.GetAbsoluteFilePathString(), + SolutionNamespacePath.AbsoluteFilePath.FormattedInput, content); var solutionTextEditorModel = TextEditorService.Model.FindOrDefaultByResourceUri( - new ResourceUri(SolutionNamespacePath.AbsoluteFilePath.GetAbsoluteFilePathString())); + new ResourceUri(SolutionNamespacePath.AbsoluteFilePath.FormattedInput)); if (solutionTextEditorModel is not null) { diff --git a/Source/Lib/Luthetus.Ide.RazorLib/CSharpProjectForm/RemoveCSharpProjectFromSolutionDisplay.razor b/Source/Lib/Luthetus.Ide.RazorLib/CSharpProjectForm/RemoveCSharpProjectFromSolutionDisplay.razor index f56741ef2..c1ef4ce25 100644 --- a/Source/Lib/Luthetus.Ide.RazorLib/CSharpProjectForm/RemoveCSharpProjectFromSolutionDisplay.razor +++ b/Source/Lib/Luthetus.Ide.RazorLib/CSharpProjectForm/RemoveCSharpProjectFromSolutionDisplay.razor @@ -7,7 +7,7 @@
- + @AbsoluteFilePath.FilenameWithExtension
diff --git a/Source/Lib/Luthetus.Ide.RazorLib/CSharpProjectForm/RemoveCSharpProjectFromSolutionDisplay.razor.cs b/Source/Lib/Luthetus.Ide.RazorLib/CSharpProjectForm/RemoveCSharpProjectFromSolutionDisplay.razor.cs index 8a9095773..e672bb538 100644 --- a/Source/Lib/Luthetus.Ide.RazorLib/CSharpProjectForm/RemoveCSharpProjectFromSolutionDisplay.razor.cs +++ b/Source/Lib/Luthetus.Ide.RazorLib/CSharpProjectForm/RemoveCSharpProjectFromSolutionDisplay.razor.cs @@ -26,8 +26,8 @@ public partial class RemoveCSharpProjectFromSolutionDisplay protected override Task OnParametersSetAsync() { if (_previousAbsoluteFilePath is null || - _previousAbsoluteFilePath.GetAbsoluteFilePathString() != - AbsoluteFilePath.GetAbsoluteFilePathString()) + _previousAbsoluteFilePath.FormattedInput != + AbsoluteFilePath.FormattedInput) { _previousAbsoluteFilePath = AbsoluteFilePath; } diff --git a/Source/Lib/Luthetus.Ide.RazorLib/CompilerServiceCase/CompilerServiceResourceDisplay.razor b/Source/Lib/Luthetus.Ide.RazorLib/CompilerServiceCase/CompilerServiceResourceDisplay.razor index 85d941b92..81c80788e 100644 --- a/Source/Lib/Luthetus.Ide.RazorLib/CompilerServiceCase/CompilerServiceResourceDisplay.razor +++ b/Source/Lib/Luthetus.Ide.RazorLib/CompilerServiceCase/CompilerServiceResourceDisplay.razor @@ -148,7 +148,7 @@ both circles a bit instead of ending at their edges. var cSharpProjectResource = CSharpProjectCompilerService.CompilerServiceResources .SingleOrDefault(csr => - csr.ResourceUri.Value == dotNetProject.AbsoluteFilePath.GetAbsoluteFilePathString()); + csr.ResourceUri.Value == dotNetProject.AbsoluteFilePath.FormattedInput); if (cSharpProjectResource is not null) { diff --git a/Source/Lib/Luthetus.Ide.RazorLib/CounterCase/CounterDisplay.razor b/Source/Lib/Luthetus.Ide.RazorLib/CounterCase/CounterDisplay.razor deleted file mode 100644 index a05c16626..000000000 --- a/Source/Lib/Luthetus.Ide.RazorLib/CounterCase/CounterDisplay.razor +++ /dev/null @@ -1,6 +0,0 @@ -@inherits Fluxor.Blazor.Web.Components.FluxorComponent - - - @CounterStateWrap.Value.Count - diff --git a/Source/Lib/Luthetus.Ide.RazorLib/CounterCase/CounterDisplay.razor.cs b/Source/Lib/Luthetus.Ide.RazorLib/CounterCase/CounterDisplay.razor.cs deleted file mode 100644 index 83a4cd5bf..000000000 --- a/Source/Lib/Luthetus.Ide.RazorLib/CounterCase/CounterDisplay.razor.cs +++ /dev/null @@ -1,19 +0,0 @@ -using Fluxor; -using Fluxor.Blazor.Web.Components; -using Luthetus.Ide.ClassLib.Store.CounterCase; -using Microsoft.AspNetCore.Components; - -namespace Luthetus.Ide.RazorLib.CounterCase; - -public partial class CounterDisplay : FluxorComponent -{ - [Inject] - private IState CounterStateWrap { get; set; } = null!; - [Inject] - private IDispatcher Dispatcher { get; set; } = null!; - - private void DispatchIncrementCounterStateAction() - { - Dispatcher.Dispatch(new IncrementCounterStateAction()); - } -} \ No newline at end of file diff --git a/Source/Lib/Luthetus.Ide.RazorLib/DotNetSolutionForm/DotNetSolutionFormDisplay.razor.cs b/Source/Lib/Luthetus.Ide.RazorLib/DotNetSolutionForm/DotNetSolutionFormDisplay.razor.cs index 0e92cad33..945a37426 100644 --- a/Source/Lib/Luthetus.Ide.RazorLib/DotNetSolutionForm/DotNetSolutionFormDisplay.razor.cs +++ b/Source/Lib/Luthetus.Ide.RazorLib/DotNetSolutionForm/DotNetSolutionFormDisplay.razor.cs @@ -64,7 +64,7 @@ private void RequestInputFileForParentDirectory() if (afp is null) return; - _parentDirectoryName = afp.GetAbsoluteFilePathString(); + _parentDirectoryName = afp.FormattedInput; await InvokeAsync(StateHasChanged); }, @@ -119,7 +119,7 @@ await HackForWebsite_StartNewDotNetSolutionCommandOnClick( EnvironmentProvider); var solutionAbsoluteFilePathString = - parentDirectoryAbsoluteFilePath.GetAbsoluteFilePathString() + + parentDirectoryAbsoluteFilePath.FormattedInput + localSolutionName + EnvironmentProvider.DirectorySeparatorChar + localSolutionName + diff --git a/Source/Lib/Luthetus.Ide.RazorLib/File/DeleteFileFormDisplay.razor b/Source/Lib/Luthetus.Ide.RazorLib/File/DeleteFileFormDisplay.razor index 4e5989c8d..79c172215 100644 --- a/Source/Lib/Luthetus.Ide.RazorLib/File/DeleteFileFormDisplay.razor +++ b/Source/Lib/Luthetus.Ide.RazorLib/File/DeleteFileFormDisplay.razor @@ -14,7 +14,7 @@ :   - + @AbsoluteFilePath.FilenameWithExtension diff --git a/Source/Lib/Luthetus.Ide.RazorLib/File/DeleteFileFormDisplay.razor.cs b/Source/Lib/Luthetus.Ide.RazorLib/File/DeleteFileFormDisplay.razor.cs index a315c7501..8cb5abf9f 100644 --- a/Source/Lib/Luthetus.Ide.RazorLib/File/DeleteFileFormDisplay.razor.cs +++ b/Source/Lib/Luthetus.Ide.RazorLib/File/DeleteFileFormDisplay.razor.cs @@ -32,8 +32,8 @@ public partial class DeleteFileFormDisplay protected override async Task OnParametersSetAsync() { if (_previousAbsoluteFilePath is null || - _previousAbsoluteFilePath.GetAbsoluteFilePathString() != - AbsoluteFilePath.GetAbsoluteFilePathString()) + _previousAbsoluteFilePath.FormattedInput != + AbsoluteFilePath.FormattedInput) { _countOfImmediateChildren = null; @@ -43,7 +43,7 @@ protected override async Task OnParametersSetAsync() { _countOfImmediateChildren = (await FileSystemProvider.Directory .EnumerateFileSystemEntriesAsync( - AbsoluteFilePath.GetAbsoluteFilePathString())) + AbsoluteFilePath.FormattedInput)) .Count(); } } diff --git a/Source/Lib/Luthetus.Ide.RazorLib/File/FileFormDisplay.razor.cs b/Source/Lib/Luthetus.Ide.RazorLib/File/FileFormDisplay.razor.cs index e337ef1dc..d10ca0a79 100644 --- a/Source/Lib/Luthetus.Ide.RazorLib/File/FileFormDisplay.razor.cs +++ b/Source/Lib/Luthetus.Ide.RazorLib/File/FileFormDisplay.razor.cs @@ -37,8 +37,7 @@ public partial class FileFormDisplay protected override Task OnParametersSetAsync() { - if (_previousFileNameParameter is null || - _previousFileNameParameter != FileName) + if (_previousFileNameParameter is null || _previousFileNameParameter != FileName) { _previousFileNameParameter = FileName; _fileName = FileName; diff --git a/Source/Lib/Luthetus.Ide.RazorLib/FolderExplorer/Classes/FolderExplorerTreeViewKeyboardEventHandler.cs b/Source/Lib/Luthetus.Ide.RazorLib/FolderExplorer/Classes/FolderExplorerTreeViewKeyboardEventHandler.cs index 0c75e884d..8ec518d20 100644 --- a/Source/Lib/Luthetus.Ide.RazorLib/FolderExplorer/Classes/FolderExplorerTreeViewKeyboardEventHandler.cs +++ b/Source/Lib/Luthetus.Ide.RazorLib/FolderExplorer/Classes/FolderExplorerTreeViewKeyboardEventHandler.cs @@ -10,7 +10,6 @@ using Luthetus.Common.RazorLib.TreeView.Commands; using Luthetus.Common.RazorLib.TreeView.Events; using Luthetus.Common.RazorLib.TreeView.TreeViewClasses; -using Luthetus.Ide.ClassLib.ComponentRenderers; using Luthetus.Ide.ClassLib.Menu; using Luthetus.Ide.ClassLib.Store.EditorCase; using Luthetus.Ide.ClassLib.Store.FolderExplorerCase; @@ -22,118 +21,87 @@ namespace Luthetus.Ide.RazorLib.FolderExplorer.Classes; public class FolderExplorerTreeViewKeyboardEventHandler : TreeViewKeyboardEventHandler { private readonly IMenuOptionsFactory _menuOptionsFactory; - private readonly ILuthetusIdeComponentRenderers _luthetusIdeComponentRenderers; private readonly ILuthetusCommonComponentRenderers _luthetusCommonComponentRenderers; private readonly IDispatcher _dispatcher; private readonly ITreeViewService _treeViewService; public FolderExplorerTreeViewKeyboardEventHandler( IMenuOptionsFactory menuOptionsFactory, - ILuthetusIdeComponentRenderers luthetusIdeComponentRenderers, ILuthetusCommonComponentRenderers luthetusCommonComponentRenderers, IDispatcher dispatcher, ITreeViewService treeViewService) : base(treeViewService) { _menuOptionsFactory = menuOptionsFactory; - _luthetusIdeComponentRenderers = luthetusIdeComponentRenderers; _luthetusCommonComponentRenderers = luthetusCommonComponentRenderers; _dispatcher = dispatcher; _treeViewService = treeViewService; } - public override async Task OnKeyDownAsync( - ITreeViewCommandParameter treeViewCommandParameter) + public override void OnKeyDown(ITreeViewCommandParameter treeViewCommandParameter) { if (treeViewCommandParameter.KeyboardEventArgs is null) - return false; + return; - _ = await base.OnKeyDownAsync(treeViewCommandParameter); + base.OnKeyDown(treeViewCommandParameter); switch (treeViewCommandParameter.KeyboardEventArgs.Code) { case KeyboardKeyFacts.WhitespaceCodes.ENTER_CODE: - await InvokeOpenInEditorAsync( - treeViewCommandParameter, - true); - return true; + InvokeOpenInEditor(treeViewCommandParameter, true); + return; case KeyboardKeyFacts.WhitespaceCodes.SPACE_CODE: - await InvokeOpenInEditorAsync( - treeViewCommandParameter, - false); - return true; + InvokeOpenInEditor(treeViewCommandParameter, false); + return; } if (treeViewCommandParameter.KeyboardEventArgs.CtrlKey) - { - var wasMappedToAnAction = await CtrlModifiedKeymapAsync(treeViewCommandParameter); - - if (wasMappedToAnAction) - return wasMappedToAnAction; - } - - if (treeViewCommandParameter.KeyboardEventArgs.AltKey) - { - var wasMappedToAnAction = await AltModifiedKeymapAsync(treeViewCommandParameter); - - if (wasMappedToAnAction) - return wasMappedToAnAction; - } - - return false; + CtrlModifiedKeymap(treeViewCommandParameter); + else if (treeViewCommandParameter.KeyboardEventArgs.AltKey) + AltModifiedKeymap(treeViewCommandParameter); } - private async Task CtrlModifiedKeymapAsync( - ITreeViewCommandParameter treeViewCommandParameter) + private void CtrlModifiedKeymap(ITreeViewCommandParameter treeViewCommandParameter) { if (treeViewCommandParameter.KeyboardEventArgs is null) - return false; + return; if (treeViewCommandParameter.KeyboardEventArgs.AltKey) { - var wasMappedToAnAction = await CtrlAltModifiedKeymapAsync(treeViewCommandParameter); - - if (wasMappedToAnAction) - return wasMappedToAnAction; + CtrlAltModifiedKeymap(treeViewCommandParameter); } - - switch (treeViewCommandParameter.KeyboardEventArgs.Key) + else { - case "c": - await InvokeCopyFileAsync(treeViewCommandParameter); - return true; - case "x": - await InvokeCutFile(treeViewCommandParameter); - return true; - case "v": - await InvokePasteClipboard(treeViewCommandParameter); - return true; + switch (treeViewCommandParameter.KeyboardEventArgs.Key) + { + case "c": + CopyFile(treeViewCommandParameter); + return; + case "x": + CutFile(treeViewCommandParameter); + return; + case "v": + PasteClipboard(treeViewCommandParameter); + return; + } } - - return false; } /// - /// Do not go from to - /// - ///

- /// Code in this method should only be here if it - /// does not include a Ctrl key being pressed. - ///

- /// As otherwise, we'd have to permute over - /// all the possible keyboard modifier - /// keys and have a method for each permutation. + /// Do not go from to + ///

+ /// Code in this method should only be here if it does not include a Ctrl key being pressed. + ///

+ /// As otherwise, we'd have to permute over all the possible keyboard modifier keys and have a method for each permutation. ///
- private Task AltModifiedKeymapAsync( - ITreeViewCommandParameter treeViewCommandParameter) + private void AltModifiedKeymap(ITreeViewCommandParameter treeViewCommandParameter) { - return Task.FromResult(false); + return; } - private Task CtrlAltModifiedKeymapAsync( - ITreeViewCommandParameter treeViewCommandParameter) + private void CtrlAltModifiedKeymap(ITreeViewCommandParameter treeViewCommandParameter) { - return Task.FromResult(false); + return; } private Task NotifyCopyCompleted(IAbsoluteFilePath absoluteFilePath) @@ -192,34 +160,26 @@ private Task NotifyCutCompleted( return Task.CompletedTask; } - private Task InvokeCopyFileAsync(ITreeViewCommandParameter treeViewCommandParameter) + private void CopyFile(ITreeViewCommandParameter treeViewCommandParameter) { var activeNode = treeViewCommandParameter.TreeViewState.ActiveNode; - if (activeNode is null || - activeNode is not TreeViewAbsoluteFilePath treeViewAbsoluteFilePathPath) - { - return Task.CompletedTask; - } + if (activeNode is not TreeViewAbsoluteFilePath treeViewAbsoluteFilePathPath) + return; var copyFileMenuOption = _menuOptionsFactory.CopyFile( treeViewAbsoluteFilePathPath.Item, () => NotifyCopyCompleted(treeViewAbsoluteFilePathPath.Item)); copyFileMenuOption.OnClick?.Invoke(); - - return Task.CompletedTask; } - private Task InvokePasteClipboard(ITreeViewCommandParameter treeViewCommandParameter) + private Task PasteClipboard(ITreeViewCommandParameter treeViewCommandParameter) { var activeNode = treeViewCommandParameter.TreeViewState.ActiveNode; - if (activeNode is null || - activeNode is not TreeViewAbsoluteFilePath treeViewAbsoluteFilePathPath) - { + if (activeNode is not TreeViewAbsoluteFilePath treeViewAbsoluteFilePathPath) return Task.CompletedTask; - } MenuOptionRecord pasteMenuOptionRecord; @@ -249,9 +209,7 @@ private Task InvokePasteClipboard(ITreeViewCommandParameter treeViewCommandParam parentDirectory, async () => { - var localParentOfCutFile = - SolutionExplorerContextMenu.ParentOfCutFile; - + var localParentOfCutFile = SolutionExplorerContextMenu.ParentOfCutFile; SolutionExplorerContextMenu.ParentOfCutFile = null; if (localParentOfCutFile is not null) @@ -265,15 +223,12 @@ private Task InvokePasteClipboard(ITreeViewCommandParameter treeViewCommandParam return Task.CompletedTask; } - private Task InvokeCutFile(ITreeViewCommandParameter treeViewCommandParameter) + private void CutFile(ITreeViewCommandParameter treeViewCommandParameter) { var activeNode = treeViewCommandParameter.TreeViewState.ActiveNode; - if (activeNode is null || - activeNode is not TreeViewAbsoluteFilePath treeViewAbsoluteFilePathPath) - { - return Task.CompletedTask; - } + if (activeNode is not TreeViewAbsoluteFilePath treeViewAbsoluteFilePathPath) + return; var parent = treeViewAbsoluteFilePathPath.Parent as TreeViewAbsoluteFilePath; @@ -284,30 +239,25 @@ private Task InvokeCutFile(ITreeViewCommandParameter treeViewCommandParameter) parent)); cutFileOptionRecord.OnClick?.Invoke(); - return Task.CompletedTask; } - private Task InvokeOpenInEditorAsync( + private void InvokeOpenInEditor( ITreeViewCommandParameter treeViewCommandParameter, bool shouldSetFocusToEditor) { var activeNode = treeViewCommandParameter.TreeViewState.ActiveNode; - if (activeNode is null || - activeNode is not TreeViewAbsoluteFilePath treeViewAbsoluteFilePathPath) - { - return Task.CompletedTask; - } + if (activeNode is not TreeViewAbsoluteFilePath treeViewAbsoluteFilePathPath) + return; _dispatcher.Dispatch(new EditorState.OpenInEditorAction( treeViewAbsoluteFilePathPath.Item, shouldSetFocusToEditor)); - return Task.CompletedTask; + return; } - private async Task ReloadTreeViewModel( - TreeViewNoType? treeViewModel) + private async Task ReloadTreeViewModel(TreeViewNoType? treeViewModel) { if (treeViewModel is null) return; diff --git a/Source/Lib/Luthetus.Ide.RazorLib/FolderExplorer/Classes/FolderExplorerTreeViewMouseEventHandler.cs b/Source/Lib/Luthetus.Ide.RazorLib/FolderExplorer/Classes/FolderExplorerTreeViewMouseEventHandler.cs index edc268926..ae24e60c5 100644 --- a/Source/Lib/Luthetus.Ide.RazorLib/FolderExplorer/Classes/FolderExplorerTreeViewMouseEventHandler.cs +++ b/Source/Lib/Luthetus.Ide.RazorLib/FolderExplorer/Classes/FolderExplorerTreeViewMouseEventHandler.cs @@ -19,21 +19,15 @@ public FolderExplorerTreeViewMouseEventHandler( _dispatcher = dispatcher; } - public override Task OnDoubleClickAsync( - ITreeViewCommandParameter treeViewCommandParameter) + public override void OnDoubleClick(ITreeViewCommandParameter treeViewCommandParameter) { - _ = base.OnDoubleClickAsync(treeViewCommandParameter); + base.OnDoubleClick(treeViewCommandParameter); - if (treeViewCommandParameter.TargetNode - is not TreeViewAbsoluteFilePath treeViewAbsoluteFilePath) - { - return Task.FromResult(false); - } + if (treeViewCommandParameter.TargetNode is not TreeViewAbsoluteFilePath treeViewAbsoluteFilePath) + return; _dispatcher.Dispatch(new EditorState.OpenInEditorAction( treeViewAbsoluteFilePath.Item, true)); - - return Task.FromResult(true); } } \ No newline at end of file diff --git a/Source/Lib/Luthetus.Ide.RazorLib/FolderExplorer/FolderExplorerDisplay.razor.cs b/Source/Lib/Luthetus.Ide.RazorLib/FolderExplorer/FolderExplorerDisplay.razor.cs index 2df641b0d..c29f6e8ca 100644 --- a/Source/Lib/Luthetus.Ide.RazorLib/FolderExplorer/FolderExplorerDisplay.razor.cs +++ b/Source/Lib/Luthetus.Ide.RazorLib/FolderExplorer/FolderExplorerDisplay.razor.cs @@ -49,7 +49,6 @@ protected override void OnInitialized() _folderExplorerTreeViewKeyboardEventHandler = new FolderExplorerTreeViewKeyboardEventHandler( MenuOptionsFactory, - LuthetusIdeComponentRenderers, LuthetusCommonComponentRenderers, Dispatcher, TreeViewService); diff --git a/Source/Lib/Luthetus.Ide.RazorLib/InputFile/Classes/InputFileTreeViewKeyboardEventHandler.cs b/Source/Lib/Luthetus.Ide.RazorLib/InputFile/Classes/InputFileTreeViewKeyboardEventHandler.cs index 11a2fe412..4ec75a137 100644 --- a/Source/Lib/Luthetus.Ide.RazorLib/InputFile/Classes/InputFileTreeViewKeyboardEventHandler.cs +++ b/Source/Lib/Luthetus.Ide.RazorLib/InputFile/Classes/InputFileTreeViewKeyboardEventHandler.cs @@ -52,34 +52,33 @@ public InputFileTreeViewKeyboardEventHandler( _commonBackgroundTaskQueue = commonBackgroundTaskQueue; } - public override async Task OnKeyDownAsync( - ITreeViewCommandParameter treeViewCommandParameter) + public override void OnKeyDown(ITreeViewCommandParameter treeViewCommandParameter) { + base.OnKeyDown(treeViewCommandParameter); + if (treeViewCommandParameter.KeyboardEventArgs is null) - return false; + return; switch (treeViewCommandParameter.KeyboardEventArgs.Code) { case KeyboardKeyFacts.WhitespaceCodes.ENTER_CODE: - await SetInputFileContentTreeViewRootAsync(treeViewCommandParameter); - return true; + SetInputFileContentTreeViewRoot(treeViewCommandParameter); + return; case KeyboardKeyFacts.WhitespaceCodes.SPACE_CODE: - await SetSelectedTreeViewModelAsync(treeViewCommandParameter); - return true; + SetSelectedTreeViewModel(treeViewCommandParameter); + return; } switch (treeViewCommandParameter.KeyboardEventArgs.Key) { - // Tried to have { "Ctrl" + "f" } => MoveFocusToSearchBar - // however, the webview was ending up taking over + // Tried to have { "Ctrl" + "f" } => MoveFocusToSearchBar however, the webview was ending up taking over // and displaying its search bar with focus being set to it. // - // Doing preventDefault just for this one case would be a can of - // worms as JSInterop is needed, as well a custom Blazor event. + // Doing preventDefault just for this one case would be a can of worms as JSInterop is needed, as well a custom Blazor event. case "/": case "?": - await MoveFocusToSearchBarAsync(treeViewCommandParameter); - return true; + MoveFocusToSearchBar(treeViewCommandParameter); + return; // TODO: Add move to next match and move to previous match // // case "*": @@ -92,72 +91,58 @@ public override async Task OnKeyDownAsync( if (treeViewCommandParameter.KeyboardEventArgs.AltKey) { - var wasMappedToAnAction = await AltModifiedKeymapAsync(treeViewCommandParameter); - - if (wasMappedToAnAction) - return wasMappedToAnAction; + AltModifiedKeymap(treeViewCommandParameter); + return; } - - return await base.OnKeyDownAsync(treeViewCommandParameter); } - private async Task AltModifiedKeymapAsync( - ITreeViewCommandParameter treeViewCommandParameter) + private void AltModifiedKeymap(ITreeViewCommandParameter treeViewCommandParameter) { if (treeViewCommandParameter.KeyboardEventArgs is null) - return false; + return; switch (treeViewCommandParameter.KeyboardEventArgs.Key) { case KeyboardKeyFacts.MovementKeys.ARROW_LEFT: - await HandleBackButtonOnClickAsync(treeViewCommandParameter); + HandleBackButtonOnClick(treeViewCommandParameter); break; case KeyboardKeyFacts.MovementKeys.ARROW_UP: - await HandleUpwardButtonOnClick(treeViewCommandParameter); + HandleUpwardButtonOnClick(treeViewCommandParameter); break; case KeyboardKeyFacts.MovementKeys.ARROW_RIGHT: - await HandleForwardButtonOnClick(treeViewCommandParameter); + HandleForwardButtonOnClick(treeViewCommandParameter); break; case "r": - await HandleRefreshButtonOnClick(treeViewCommandParameter); + HandleRefreshButtonOnClick(treeViewCommandParameter); break; } - - return false; } - private async Task SetInputFileContentTreeViewRootAsync( - ITreeViewCommandParameter treeViewCommandParameter) + private void SetInputFileContentTreeViewRoot(ITreeViewCommandParameter treeViewCommandParameter) { var activeNode = treeViewCommandParameter.TreeViewState.ActiveNode; - var treeViewAbsoluteFilePath = activeNode as TreeViewAbsoluteFilePath; - - if (treeViewAbsoluteFilePath is null) + if (activeNode is not TreeViewAbsoluteFilePath treeViewAbsoluteFilePath) return; - await _setInputFileContentTreeViewRootFunc.Invoke( - treeViewAbsoluteFilePath.Item); + _setInputFileContentTreeViewRootFunc.Invoke(treeViewAbsoluteFilePath.Item); } - private async Task HandleBackButtonOnClickAsync( - ITreeViewCommandParameter treeViewCommandParameter) + private void HandleBackButtonOnClick(ITreeViewCommandParameter treeViewCommandParameter) { _dispatcher.Dispatch(new InputFileState.MoveBackwardsInHistoryAction()); - await ChangeContentRootToOpenedTreeView(_inputFileStateWrap.Value); + ChangeContentRootToOpenedTreeView(_inputFileStateWrap.Value); } - private async Task HandleForwardButtonOnClick( - ITreeViewCommandParameter treeViewCommandParameter) + private void HandleForwardButtonOnClick(ITreeViewCommandParameter treeViewCommandParameter) { _dispatcher.Dispatch(new InputFileState.MoveForwardsInHistoryAction()); - await ChangeContentRootToOpenedTreeView(_inputFileStateWrap.Value); + ChangeContentRootToOpenedTreeView(_inputFileStateWrap.Value); } - private async Task HandleUpwardButtonOnClick( - ITreeViewCommandParameter treeViewCommandParameter) + private void HandleUpwardButtonOnClick(ITreeViewCommandParameter treeViewCommandParameter) { _dispatcher.Dispatch(new InputFileState.OpenParentDirectoryAction( _luthetusIdeComponentRenderers, @@ -166,36 +151,33 @@ private async Task HandleUpwardButtonOnClick( _environmentProvider, _commonBackgroundTaskQueue)); - await ChangeContentRootToOpenedTreeView(_inputFileStateWrap.Value); + ChangeContentRootToOpenedTreeView(_inputFileStateWrap.Value); } - private async Task HandleRefreshButtonOnClick( - ITreeViewCommandParameter treeViewCommandParameter) + private void HandleRefreshButtonOnClick(ITreeViewCommandParameter treeViewCommandParameter) { _dispatcher.Dispatch(new InputFileState.RefreshCurrentSelectionAction( _commonBackgroundTaskQueue)); - await ChangeContentRootToOpenedTreeView(_inputFileStateWrap.Value); + ChangeContentRootToOpenedTreeView(_inputFileStateWrap.Value); } - private async Task ChangeContentRootToOpenedTreeView( - InputFileState inputFileState) + private void ChangeContentRootToOpenedTreeView(InputFileState inputFileState) { var openedTreeView = inputFileState.GetOpenedTreeView(); if (openedTreeView.Item is not null) - await _setInputFileContentTreeViewRootFunc.Invoke(openedTreeView.Item); + _setInputFileContentTreeViewRootFunc.Invoke(openedTreeView.Item); } - private Task SetSelectedTreeViewModelAsync( - ITreeViewCommandParameter treeViewCommandParameter) + private void SetSelectedTreeViewModel(ITreeViewCommandParameter treeViewCommandParameter) { var activeNode = treeViewCommandParameter.TreeViewState.ActiveNode; var treeViewAbsoluteFilePath = activeNode as TreeViewAbsoluteFilePath; if (treeViewAbsoluteFilePath is null) - return Task.CompletedTask; + return; var setSelectedTreeViewModelAction = new InputFileState.SetSelectedTreeViewModelAction( @@ -203,12 +185,11 @@ private Task SetSelectedTreeViewModelAsync( _dispatcher.Dispatch(setSelectedTreeViewModelAction); - return Task.CompletedTask; + return; } - private async Task MoveFocusToSearchBarAsync( - ITreeViewCommandParameter treeViewCommandParameter) + private void MoveFocusToSearchBar(ITreeViewCommandParameter treeViewCommandParameter) { - await _focusSearchInputElementFunc.Invoke(); + Task.Run(async () => await _focusSearchInputElementFunc.Invoke()); } } \ No newline at end of file diff --git a/Source/Lib/Luthetus.Ide.RazorLib/InputFile/Classes/InputFileTreeViewMouseEventHandler.cs b/Source/Lib/Luthetus.Ide.RazorLib/InputFile/Classes/InputFileTreeViewMouseEventHandler.cs index cae3b3050..d8ac2f615 100644 --- a/Source/Lib/Luthetus.Ide.RazorLib/InputFile/Classes/InputFileTreeViewMouseEventHandler.cs +++ b/Source/Lib/Luthetus.Ide.RazorLib/InputFile/Classes/InputFileTreeViewMouseEventHandler.cs @@ -23,39 +23,26 @@ public InputFileTreeViewMouseEventHandler( _setInputFileContentTreeViewRootFunc = setInputFileContentTreeViewRootFunc; } - public override Task OnClickAsync( - ITreeViewCommandParameter treeViewCommandParameter) + public override void OnClick(ITreeViewCommandParameter treeViewCommandParameter) { - _ = base.OnClickAsync(treeViewCommandParameter); + base.OnClick(treeViewCommandParameter); - if (treeViewCommandParameter.TargetNode - is not TreeViewAbsoluteFilePath treeViewAbsoluteFilePath) - { - return Task.FromResult(false); - } + if (treeViewCommandParameter.TargetNode is not TreeViewAbsoluteFilePath treeViewAbsoluteFilePath) + return; - var setSelectedTreeViewModelAction = - new InputFileState.SetSelectedTreeViewModelAction( - treeViewAbsoluteFilePath); + var setSelectedTreeViewModelAction = new InputFileState.SetSelectedTreeViewModelAction( + treeViewAbsoluteFilePath); _dispatcher.Dispatch(setSelectedTreeViewModelAction); - - return Task.FromResult(true); } - public override async Task OnDoubleClickAsync( - ITreeViewCommandParameter treeViewCommandParameter) + public override void OnDoubleClick(ITreeViewCommandParameter treeViewCommandParameter) { - _ = base.OnDoubleClickAsync(treeViewCommandParameter); - - if (treeViewCommandParameter.TargetNode - is not TreeViewAbsoluteFilePath treeViewAbsoluteFilePath) - { - return false; - } + base.OnDoubleClick(treeViewCommandParameter); - await _setInputFileContentTreeViewRootFunc.Invoke(treeViewAbsoluteFilePath.Item); + if (treeViewCommandParameter.TargetNode is not TreeViewAbsoluteFilePath treeViewAbsoluteFilePath) + return; - return true; + _setInputFileContentTreeViewRootFunc.Invoke(treeViewAbsoluteFilePath.Item); } } \ No newline at end of file diff --git a/Source/Lib/Luthetus.Ide.RazorLib/InputFile/InternalComponents/InputFileBottomControls.razor.cs b/Source/Lib/Luthetus.Ide.RazorLib/InputFile/InternalComponents/InputFileBottomControls.razor.cs index aeab8372f..624eb95a4 100644 --- a/Source/Lib/Luthetus.Ide.RazorLib/InputFile/InternalComponents/InputFileBottomControls.razor.cs +++ b/Source/Lib/Luthetus.Ide.RazorLib/InputFile/InternalComponents/InputFileBottomControls.razor.cs @@ -39,7 +39,7 @@ private string GetSelectedTreeViewModelAbsoluteFilePathString(InputFileState inp if (selectedAbsoluteFilePath is null) return "Selection is null"; - return selectedAbsoluteFilePath.GetAbsoluteFilePathString(); + return selectedAbsoluteFilePath.FormattedInput; } private async Task FireOnAfterSubmit() diff --git a/Source/Lib/Luthetus.Ide.RazorLib/InputFile/InternalComponents/InputFileTopNavBar.razor b/Source/Lib/Luthetus.Ide.RazorLib/InputFile/InternalComponents/InputFileTopNavBar.razor index 2ffbf329d..46460e113 100644 --- a/Source/Lib/Luthetus.Ide.RazorLib/InputFile/InternalComponents/InputFileTopNavBar.razor +++ b/Source/Lib/Luthetus.Ide.RazorLib/InputFile/InternalComponents/InputFileTopNavBar.razor @@ -34,7 +34,7 @@ { if (_showInputTextEditForAddress) { - } diff --git a/Source/Lib/Luthetus.Ide.RazorLib/NuGet/NuGetPackageManager.razor.cs b/Source/Lib/Luthetus.Ide.RazorLib/NuGet/NuGetPackageManager.razor.cs index cc2bf2239..1813b0353 100644 --- a/Source/Lib/Luthetus.Ide.RazorLib/NuGet/NuGetPackageManager.razor.cs +++ b/Source/Lib/Luthetus.Ide.RazorLib/NuGet/NuGetPackageManager.razor.cs @@ -45,11 +45,8 @@ private void SelectedProjectToModifyChanged( ChangeEventArgs changeEventArgs, DotNetSolutionState dotNetSolutionState) { - if (changeEventArgs.Value is null || - dotNetSolutionState.DotNetSolution is null) - { + if (changeEventArgs.Value is null || dotNetSolutionState.DotNetSolution is null) return; - } var projectIdGuid = Guid.Parse((string)changeEventArgs.Value); @@ -82,7 +79,9 @@ private bool ValidateSolutionContainsSelectedProject( { if (dotNetSolutionState.DotNetSolution is null || nuGetPackageManagerState.SelectedProjectToModify is null) + { return false; + } return dotNetSolutionState.DotNetSolution.DotNetProjects .Any(x => diff --git a/Source/Lib/Luthetus.Ide.RazorLib/NuGet/NugetPackageDisplay.razor.cs b/Source/Lib/Luthetus.Ide.RazorLib/NuGet/NugetPackageDisplay.razor.cs index 075368001..13e07c358 100644 --- a/Source/Lib/Luthetus.Ide.RazorLib/NuGet/NugetPackageDisplay.razor.cs +++ b/Source/Lib/Luthetus.Ide.RazorLib/NuGet/NugetPackageDisplay.razor.cs @@ -39,8 +39,7 @@ public partial class NugetPackageDisplay : FluxorComponent protected override void OnParametersSet() { - if (_previousNugetPackageId is null || - _previousNugetPackageId != NugetPackageRecord.Id) + if (_previousNugetPackageId is null || _previousNugetPackageId != NugetPackageRecord.Id) { _previousNugetPackageId = NugetPackageRecord.Id; @@ -50,8 +49,7 @@ protected override void OnParametersSet() _nugetPackageVersionString = _nugetPackageVersionsOrdered .FirstOrDefault()? - .Version - ?? string.Empty; + .Version ?? string.Empty; } base.OnParametersSet(); @@ -69,7 +67,9 @@ private bool ValidateSolutionContainsSelectedProject() if (dotNetSolutionState.DotNetSolution is null || nuGetPackageManagerState.SelectedProjectToModify is null) + { return false; + } return dotNetSolutionState.DotNetSolution.DotNetProjects .Any(x => @@ -94,14 +94,14 @@ private async Task AddNugetPackageReferenceOnClick() return; var formattedCommand = DotNetCliFacts.FormatAddNugetPackageReferenceToProject( - targetProject.AbsoluteFilePath.GetAbsoluteFilePathString(), + targetProject.AbsoluteFilePath.FormattedInput, targetNugetPackage.Id, targetNugetVersion); var addNugetPackageReferenceCommand = new TerminalCommand( AddNugetPackageTerminalCommandKey, formattedCommand, - parentDirectory.GetAbsoluteFilePathString(), + parentDirectory.FormattedInput, CancellationToken.None, () => { if (LuthetusCommonComponentRenderers.InformativeNotificationRendererType is not null) diff --git a/Source/Lib/Luthetus.Ide.RazorLib/ServiceCollectionExtensions.cs b/Source/Lib/Luthetus.Ide.RazorLib/ServiceCollectionExtensions.cs index 0dccd3495..b1fa09df7 100644 --- a/Source/Lib/Luthetus.Ide.RazorLib/ServiceCollectionExtensions.cs +++ b/Source/Lib/Luthetus.Ide.RazorLib/ServiceCollectionExtensions.cs @@ -9,13 +9,11 @@ using Microsoft.Extensions.DependencyInjection; using Luthetus.TextEditor.RazorLib.HostedServiceCase.CompilerServiceCase; using Luthetus.TextEditor.RazorLib; -using Luthetus.Common.RazorLib.Store.AccountCase; -using Fluxor; using Luthetus.Ide.ClassLib.ComponentRenderers; using Luthetus.Ide.ClassLib; using Luthetus.Common.RazorLib.FileSystem.Interfaces; using Luthetus.Common.RazorLib.FileSystem.Classes.Local; -using Luthetus.Common.RazorLib.FileSystem.Classes.Website; +using Luthetus.Common.RazorLib.FileSystem.Classes.InMemoryFileSystem; namespace Luthetus.Ide.RazorLib; @@ -45,20 +43,14 @@ public static IServiceCollection AddLuthetusIdeRazorLibServices( if (isNativeApplication) { environmentProviderFactory = _ => new LocalEnvironmentProvider(); - fileSystemProviderFactory = _ => new LocalFileSystemProvider(); } else { - environmentProviderFactory = serviceProvider => - new WebsiteEnvironmentProvider( - serviceProvider.GetRequiredService>()); + environmentProviderFactory = _ => new InMemoryEnvironmentProvider(); - fileSystemProviderFactory = serviceProvider => - new WebsiteFileSystemProvider( - serviceProvider.GetRequiredService(), - serviceProvider.GetRequiredService>(), - serviceProvider.GetRequiredService()); + fileSystemProviderFactory = serviceProvider => new InMemoryFileSystemProvider( + serviceProvider.GetRequiredService()); } services diff --git a/Source/Lib/Luthetus.Ide.RazorLib/SolutionExplorer/SolutionExplorerContextMenu.razor.cs b/Source/Lib/Luthetus.Ide.RazorLib/SolutionExplorer/SolutionExplorerContextMenu.razor.cs index caa1c0881..4b2b4a438 100644 --- a/Source/Lib/Luthetus.Ide.RazorLib/SolutionExplorer/SolutionExplorerContextMenu.razor.cs +++ b/Source/Lib/Luthetus.Ide.RazorLib/SolutionExplorer/SolutionExplorerContextMenu.razor.cs @@ -96,12 +96,8 @@ private MenuRecord GetMenuRecord( if (treeViewSolution.Item.NamespacePath.AbsoluteFilePath.ExtensionNoPeriod == ExtensionNoPeriodFacts.DOT_NET_SOLUTION) { - if (treeViewSolution.Parent is null || - treeViewSolution.Parent is TreeViewAdhoc) - { - menuRecords.AddRange( - GetDotNetSolutionMenuOptions(treeViewSolution)); - } + if (treeViewSolution.Parent is null || treeViewSolution.Parent is TreeViewAdhoc) + menuRecords.AddRange(GetDotNetSolutionMenuOptions(treeViewSolution)); } } else if (treeViewModel is TreeViewCSharpProjectToProjectReference treeViewCSharpProjectToProjectReference) @@ -382,8 +378,8 @@ private void AddExistingProjectToSolution( var localFormattedAddExistingProjectToSolutionCommand = DotNetCliFacts .FormatAddExistingProjectToSolution( - solutionNamespacePath.AbsoluteFilePath.GetAbsoluteFilePathString(), - afp.GetAbsoluteFilePathString()); + solutionNamespacePath.AbsoluteFilePath.FormattedInput, + afp.FormattedInput); var addExistingProjectToSolutionTerminalCommand = new TerminalCommand( TerminalCommandKey.NewTerminalCommandKey(), diff --git a/Source/Lib/Luthetus.Ide.RazorLib/SolutionExplorer/SolutionExplorerTreeViewKeymap.cs b/Source/Lib/Luthetus.Ide.RazorLib/SolutionExplorer/SolutionExplorerTreeViewKeymap.cs index e1392c2c9..0b811f8fe 100644 --- a/Source/Lib/Luthetus.Ide.RazorLib/SolutionExplorer/SolutionExplorerTreeViewKeymap.cs +++ b/Source/Lib/Luthetus.Ide.RazorLib/SolutionExplorer/SolutionExplorerTreeViewKeymap.cs @@ -38,94 +38,68 @@ public SolutionExplorerTreeViewKeymap( _treeViewService = treeViewService; } - public override async Task OnKeyDownAsync( - ITreeViewCommandParameter treeViewCommandParameter) + public override void OnKeyDown(ITreeViewCommandParameter treeViewCommandParameter) { if (treeViewCommandParameter.KeyboardEventArgs is null) - return false; + return; - _ = await base.OnKeyDownAsync(treeViewCommandParameter); + base.OnKeyDown(treeViewCommandParameter); switch (treeViewCommandParameter.KeyboardEventArgs.Code) { case KeyboardKeyFacts.WhitespaceCodes.ENTER_CODE: - await InvokeOpenInEditorAsync(treeViewCommandParameter, true); - return true; + InvokeOpenInEditor(treeViewCommandParameter, true); + return; case KeyboardKeyFacts.WhitespaceCodes.SPACE_CODE: - await InvokeOpenInEditorAsync(treeViewCommandParameter, false); - return true; + InvokeOpenInEditor(treeViewCommandParameter, false); + return; } if (treeViewCommandParameter.KeyboardEventArgs.CtrlKey) { - var wasMappedToAnAction = await CtrlModifiedKeymapAsync(treeViewCommandParameter); - - if (wasMappedToAnAction) - return wasMappedToAnAction; + CtrlModifiedKeymap(treeViewCommandParameter); + return; } - - if (treeViewCommandParameter.KeyboardEventArgs.AltKey) + else if (treeViewCommandParameter.KeyboardEventArgs.AltKey) { - var wasMappedToAnAction = await AltModifiedKeymapAsync(treeViewCommandParameter); - - if (wasMappedToAnAction) - return wasMappedToAnAction; + AltModifiedKeymap(treeViewCommandParameter); + return; } - - return false; } - private async Task CtrlModifiedKeymapAsync( - ITreeViewCommandParameter treeViewCommandParameter) + private void CtrlModifiedKeymap(ITreeViewCommandParameter treeViewCommandParameter) { if (treeViewCommandParameter.KeyboardEventArgs is null) - return false; + return; if (treeViewCommandParameter.KeyboardEventArgs.AltKey) { - var wasMappedToAnAction = await CtrlAltModifiedKeymapAsync(treeViewCommandParameter); - - if (wasMappedToAnAction) - return wasMappedToAnAction; + CtrlAltModifiedKeymap(treeViewCommandParameter); + return; } switch (treeViewCommandParameter.KeyboardEventArgs.Key) { case "c": - await InvokeCopyFileAsync(treeViewCommandParameter); - return true; + InvokeCopyFile(treeViewCommandParameter); + return; case "x": - await InvokeCutFile(treeViewCommandParameter); - return true; + InvokeCutFile(treeViewCommandParameter); + return; case "v": - await InvokePasteClipboard(treeViewCommandParameter); - return true; + InvokePasteClipboard(treeViewCommandParameter); + return; } - - return false; } - /// - /// Do not go from to - /// - ///

- /// Code in this method should only be here if it - /// does not include a Ctrl key being pressed. - ///

- /// As otherwise, we'd have to permute over - /// all the possible keyboard modifier - /// keys and have a method for each permutation. - ///
- private Task AltModifiedKeymapAsync( - ITreeViewCommandParameter treeViewCommandParameter) + private void AltModifiedKeymap(ITreeViewCommandParameter treeViewCommandParameter) { - return Task.FromResult(false); + return; } - private Task CtrlAltModifiedKeymapAsync( - ITreeViewCommandParameter treeViewCommandParameter) + private void CtrlAltModifiedKeymap(ITreeViewCommandParameter treeViewCommandParameter) { - return Task.FromResult(false); + return; } private Task NotifyCopyCompleted(NamespacePath namespacePath) @@ -184,34 +158,26 @@ private Task NotifyCutCompleted( return Task.CompletedTask; } - private Task InvokeCopyFileAsync(ITreeViewCommandParameter treeViewCommandParameter) + private void InvokeCopyFile(ITreeViewCommandParameter treeViewCommandParameter) { var activeNode = treeViewCommandParameter.TreeViewState.ActiveNode; - if (activeNode is null || - activeNode is not TreeViewNamespacePath treeViewNamespacePath) - { - return Task.CompletedTask; - } + if (activeNode is not TreeViewNamespacePath treeViewNamespacePath) + return; var copyFileMenuOption = _menuOptionsFactory.CopyFile( treeViewNamespacePath.Item.AbsoluteFilePath, () => NotifyCopyCompleted(treeViewNamespacePath.Item)); copyFileMenuOption.OnClick?.Invoke(); - - return Task.CompletedTask; } - private Task InvokePasteClipboard(ITreeViewCommandParameter treeViewCommandParameter) + private void InvokePasteClipboard(ITreeViewCommandParameter treeViewCommandParameter) { var activeNode = treeViewCommandParameter.TreeViewState.ActiveNode; - if (activeNode is null || - activeNode is not TreeViewNamespacePath treeViewNamespacePath) - { - return Task.CompletedTask; - } + if (activeNode is not TreeViewNamespacePath treeViewNamespacePath) + return; MenuOptionRecord pasteMenuOptionRecord; @@ -254,19 +220,14 @@ private Task InvokePasteClipboard(ITreeViewCommandParameter treeViewCommandParam } pasteMenuOptionRecord.OnClick?.Invoke(); - return Task.CompletedTask; } - private Task InvokeCutFile(ITreeViewCommandParameter treeViewCommandParameter) + private void InvokeCutFile(ITreeViewCommandParameter treeViewCommandParameter) { var activeNode = treeViewCommandParameter.TreeViewState.ActiveNode; - if (activeNode is null || - activeNode is not TreeViewNamespacePath treeViewNamespacePath || - treeViewNamespacePath.Item is null) - { - return Task.CompletedTask; - } + if (activeNode is not TreeViewNamespacePath treeViewNamespacePath) + return; var parent = treeViewNamespacePath.Parent as TreeViewNamespacePath; @@ -277,27 +238,22 @@ activeNode is not TreeViewNamespacePath treeViewNamespacePath || parent)); cutFileOptionRecord.OnClick?.Invoke(); - return Task.CompletedTask; } - private Task InvokeOpenInEditorAsync( + private void InvokeOpenInEditor( ITreeViewCommandParameter treeViewCommandParameter, bool shouldSetFocusToEditor) { var activeNode = treeViewCommandParameter.TreeViewState.ActiveNode; - if (activeNode is null || - activeNode is not TreeViewNamespacePath treeViewNamespacePath || - treeViewNamespacePath.Item is null) - { - return Task.CompletedTask; - } + if (activeNode is not TreeViewNamespacePath treeViewNamespacePath) + return; _dispatcher.Dispatch(new EditorState.OpenInEditorAction( treeViewNamespacePath.Item.AbsoluteFilePath, shouldSetFocusToEditor)); - return Task.CompletedTask; + return; } private async Task ReloadTreeViewModel( diff --git a/Source/Lib/Luthetus.Ide.RazorLib/SolutionExplorer/SolutionExplorerTreeViewMouseEventHandler.cs b/Source/Lib/Luthetus.Ide.RazorLib/SolutionExplorer/SolutionExplorerTreeViewMouseEventHandler.cs index a82d95637..d3e4677fb 100644 --- a/Source/Lib/Luthetus.Ide.RazorLib/SolutionExplorer/SolutionExplorerTreeViewMouseEventHandler.cs +++ b/Source/Lib/Luthetus.Ide.RazorLib/SolutionExplorer/SolutionExplorerTreeViewMouseEventHandler.cs @@ -19,24 +19,15 @@ public SolutionExplorerTreeViewMouseEventHandler( _dispatcher = dispatcher; } - public override Task OnDoubleClickAsync( - ITreeViewCommandParameter treeViewCommandParameter) + public override void OnDoubleClick(ITreeViewCommandParameter treeViewCommandParameter) { - _ = base.OnDoubleClickAsync(treeViewCommandParameter); + base.OnDoubleClick(treeViewCommandParameter); - if (treeViewCommandParameter.TargetNode - is not TreeViewNamespacePath treeViewNamespacePath) - { - return Task.FromResult(false); - } - - if (treeViewNamespacePath.Item is null) - return Task.FromResult(false); + if (treeViewCommandParameter.TargetNode is not TreeViewNamespacePath treeViewNamespacePath) + return; _dispatcher.Dispatch(new EditorState.OpenInEditorAction( treeViewNamespacePath.Item.AbsoluteFilePath, true)); - - return Task.FromResult(true); } } \ No newline at end of file diff --git a/Source/Lib/Luthetus.Ide.RazorLib/StartupControls/StartupControlsDisplay.razor.cs b/Source/Lib/Luthetus.Ide.RazorLib/StartupControls/StartupControlsDisplay.razor.cs index 73ca50270..6c50f5992 100644 --- a/Source/Lib/Luthetus.Ide.RazorLib/StartupControls/StartupControlsDisplay.razor.cs +++ b/Source/Lib/Luthetus.Ide.RazorLib/StartupControls/StartupControlsDisplay.razor.cs @@ -26,7 +26,7 @@ private async Task StartProgramWithoutDebuggingOnClick() if (programExecutionState.StartupProjectAbsoluteFilePath is null) return; - var parentDirectoryAbsoluteFilePathString = programExecutionState.StartupProjectAbsoluteFilePath.ParentDirectory?.GetAbsoluteFilePathString(); + var parentDirectoryAbsoluteFilePathString = programExecutionState.StartupProjectAbsoluteFilePath.ParentDirectory?.FormattedInput; if (parentDirectoryAbsoluteFilePathString is null) return; diff --git a/Source/Lib/Luthetus.Ide.RazorLib/TreeViewImplementations/TreeViewGitFileDisplay.razor b/Source/Lib/Luthetus.Ide.RazorLib/TreeViewImplementations/TreeViewGitFileDisplay.razor index 76fa9d8bc..7dec17f76 100644 --- a/Source/Lib/Luthetus.Ide.RazorLib/TreeViewImplementations/TreeViewGitFileDisplay.razor +++ b/Source/Lib/Luthetus.Ide.RazorLib/TreeViewImplementations/TreeViewGitFileDisplay.razor @@ -14,8 +14,7 @@ @{ var gitState = GitStateWrap.Value; - string shortenedParentDirectoryFilePathString = gitFile.AbsoluteFilePath - .GetAbsoluteFilePathString(); + string shortenedParentDirectoryFilePathString = gitFile.AbsoluteFilePath.FormattedInput; if (gitFile.AbsoluteFilePath.ParentDirectory is not null && gitState.GitFolderAbsoluteFilePath?.ParentDirectory is not null)