Skip to content

Commit

Permalink
Merge pull request #47 from Luthetus/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
Luthetus authored Aug 31, 2023
2 parents 15afd87 + a32edea commit 76c81c2
Show file tree
Hide file tree
Showing 51 changed files with 269 additions and 660 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public static FormattedCommand FormatStartProjectWithoutDebugging(
IAbsoluteFilePath projectAbsoluteFilePath)
{
return FormatStartProjectWithoutDebugging(
projectAbsoluteFilePath.GetAbsoluteFilePathString());
projectAbsoluteFilePath.FormattedInput);
}

public static FormattedCommand FormatStartProjectWithoutDebugging(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -93,7 +93,7 @@ string GetContent(string fileNameNoExtension, string namespaceString)

var templatedFileFileAbsoluteFilePathString = fileTemplateParameter
.ParentDirectory.AbsoluteFilePath
.GetAbsoluteFilePathString() +
.FormattedInput +
emptyFileAbsoluteFilePath.FileNameNoExtension +
'.' +
ExtensionNoPeriodFacts.C_SHARP_CLASS;
Expand Down Expand Up @@ -145,7 +145,7 @@ string GetContent(string fileNameNoExtension)

var emptyFileAbsoluteFilePathString = fileTemplateParameter
.ParentDirectory.AbsoluteFilePath
.GetAbsoluteFilePathString() +
.FormattedInput +
fileTemplateParameter.Filename;

// Create AbsoluteFilePath as to leverage it for
Expand All @@ -160,7 +160,7 @@ string GetContent(string fileNameNoExtension)

var templatedFileFileAbsoluteFilePathString = fileTemplateParameter
.ParentDirectory.AbsoluteFilePath
.GetAbsoluteFilePathString() +
.FormattedInput +
emptyFileAbsoluteFilePath.FileNameNoExtension +
'.' +
ExtensionNoPeriodFacts.RAZOR_MARKUP;
Expand Down Expand Up @@ -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
Expand All @@ -241,7 +241,7 @@ string GetContent(string fileNameNoExtension, string namespaceString)

var templatedFileFileAbsoluteFilePathString = fileTemplateParameter
.ParentDirectory.AbsoluteFilePath
.GetAbsoluteFilePathString() +
.FormattedInput +
emptyFileAbsoluteFilePath.FileNameNoExtension;

if (templatedFileFileAbsoluteFilePathString.EndsWith(
Expand Down
50 changes: 25 additions & 25 deletions Source/Lib/Luthetus.Ide.ClassLib/Menu/MenuOptionsFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -368,15 +368,15 @@ private void PerformNewFileAction(
if (exactMatchFileTemplate is null)
{
var emptyFileAbsoluteFilePathString =
namespacePath.AbsoluteFilePath.GetAbsoluteFilePathString() + fileName;
namespacePath.AbsoluteFilePath.FormattedInput + fileName;

var emptyFileAbsoluteFilePath = new AbsoluteFilePath(
emptyFileAbsoluteFilePathString,
false,
_environmentProvider);

await _fileSystemProvider.File.WriteAllTextAsync(
emptyFileAbsoluteFilePath.GetAbsoluteFilePathString(),
emptyFileAbsoluteFilePath.FormattedInput,
string.Empty,
CancellationToken.None);
}
Expand All @@ -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);
}
Expand All @@ -418,7 +418,7 @@ private void PerformNewDirectoryAction(
IAbsoluteFilePath parentDirectory,
Func<Task> onAfterCompletion)
{
var directoryAbsoluteFilePathString = parentDirectory.GetAbsoluteFilePathString() + directoryName;
var directoryAbsoluteFilePathString = parentDirectory.FormattedInput + directoryName;

var directoryAbsoluteFilePath = new AbsoluteFilePath(
directoryAbsoluteFilePathString,
Expand All @@ -429,7 +429,7 @@ private void PerformNewDirectoryAction(
async cancellationToken =>
{
await _fileSystemProvider.Directory.CreateDirectoryAsync(
directoryAbsoluteFilePath.GetAbsoluteFilePathString(),
directoryAbsoluteFilePath.FormattedInput,
CancellationToken.None);

await onAfterCompletion.Invoke();
Expand All @@ -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();
Expand All @@ -488,7 +488,7 @@ await _clipboardService
ClipboardFacts.FormatPhrase(
ClipboardFacts.CopyCommand,
ClipboardFacts.AbsoluteFilePathDataType,
absoluteFilePath.GetAbsoluteFilePathString()));
absoluteFilePath.FormattedInput));

await onAfterCompletion.Invoke();
},
Expand All @@ -514,7 +514,7 @@ await _clipboardService
ClipboardFacts.FormatPhrase(
ClipboardFacts.CutCommand,
ClipboardFacts.AbsoluteFilePathDataType,
absoluteFilePath.GetAbsoluteFilePathString()));
absoluteFilePath.FormattedInput));

await onAfterCompletion.Invoke();
},
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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
{
Expand Down Expand Up @@ -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());

Expand Down Expand Up @@ -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(),
Expand Down Expand Up @@ -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(),
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand Down
12 changes: 0 additions & 12 deletions Source/Lib/Luthetus.Ide.ClassLib/Store/CounterCase/CounterState.cs

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public Task HandleSaveFileAction(
if (saveFileAction.CancellationToken.IsCancellationRequested)
return;

var absoluteFilePathString = saveFileAction.AbsoluteFilePath.GetAbsoluteFilePathString();
var absoluteFilePathString = saveFileAction.AbsoluteFilePath.FormattedInput;

string notificationMessage;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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 () =>
{
Expand Down Expand Up @@ -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,
() =>
{
Expand Down Expand Up @@ -291,7 +291,7 @@ public async Task ReduceTryFindGitFolderInDirectoryAction(

var directoryAbsoluteFilePathString =
tryFindGitFolderInDirectoryAction.DirectoryAbsoluteFilePath
.GetAbsoluteFilePathString();
.FormattedInput;

var childDirectoryAbsoluteFilePathStrings = await _fileSystemProvider.Directory
.GetDirectoriesAsync(
Expand Down Expand Up @@ -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) ||
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ public static async Task<List<TreeViewNoType>> CSharpProjectLoadChildrenAsync(
cSharpProjectTreeView.Item.AbsoluteFilePath.AncestorDirectories
.Last();

var parentAbsoluteFilePathString = parentDirectoryOfCSharpProject
.GetAbsoluteFilePathString();
var parentAbsoluteFilePathString = parentDirectoryOfCSharpProject.FormattedInput;

var hiddenFiles = HiddenFileFacts
.GetHiddenFilesByContainerFileExtension(ExtensionNoPeriodFacts.C_SHARP_PROJECT);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public static async Task<List<TreeViewNoType>> DirectoryLoadChildrenAsync(
this TreeViewNamespacePath directoryTreeView)
{
var directoryAbsoluteFilePathString = directoryTreeView.Item.AbsoluteFilePath
.GetAbsoluteFilePathString();
.FormattedInput;

var childDirectoryTreeViewModels =
(await directoryTreeView.FileSystemProvider
Expand Down Expand Up @@ -95,7 +95,7 @@ public static async Task<List<TreeViewNoType>> LoadChildrenForDirectoryAsync(
TreeViewAbsoluteFilePath directoryTreeView)
{
var directoryAbsoluteFilePathString = directoryTreeView.Item
.GetAbsoluteFilePathString();
.FormattedInput;

var childDirectoryTreeViewModels =
(await directoryTreeView.FileSystemProvider
Expand Down
Loading

0 comments on commit 76c81c2

Please sign in to comment.