Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -887,6 +887,8 @@ private void BuildControl_Loaded(object sender, RoutedEventArgs e)

public string InitialSearchText { get; set; }

public string SearchText => searchLogControl?.SearchText;

public void SelectItem(BaseNode item)
{
var parentChain = item.GetParentChainExcludingThis();
Expand Down
9 changes: 7 additions & 2 deletions src/StructuredLogViewer.Avalonia/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ private void BuildProject(string filePath)
SetContent(parametersScreen);
}

private async void BuildCore(string projectFilePath, string customArguments)
private async void BuildCore(string projectFilePath, string customArguments, string searchText = null)
{
var progress = new BuildProgress() { IsIndeterminate = true };
progress.ProgressText = $"Building {projectFilePath}...";
Expand All @@ -398,6 +398,10 @@ private async void BuildCore(string projectFilePath, string customArguments)
progress.ProgressText = "Analyzing build...";
await QueueAnalyzeBuild(result);
DisplayBuild(result);
if (!string.IsNullOrWhiteSpace(searchText) && CurrentBuildControl != null)
{
CurrentBuildControl.InitialSearchText = searchText;
}
}

private async Task QueueAnalyzeBuild(Build build)
Expand Down Expand Up @@ -466,8 +470,9 @@ private void RebuildProjectOrSolution()
{
if (!string.IsNullOrEmpty(projectFilePath))
{
var searchText = CurrentBuildControl?.SearchText;
var args = SettingsService.GetCustomArguments(projectFilePath);
BuildCore(projectFilePath, args);
BuildCore(projectFilePath, args, searchText);
}
}

Expand Down