|
|
@@ -1,8 +1,10 @@
|
|
|
using Microsoft.VisualStudio.Shell;
|
|
|
+using Microsoft.Win32;
|
|
|
using System;
|
|
|
using System.Collections.Generic;
|
|
|
using System.Collections.ObjectModel;
|
|
|
using System.ComponentModel;
|
|
|
+using System.IO;
|
|
|
using System.Linq;
|
|
|
using System.Runtime.CompilerServices;
|
|
|
using System.Threading.Tasks;
|
|
|
@@ -20,6 +22,7 @@ namespace Quadarax.Application.Tools.Vsix.FilteredSolutionsExtension
|
|
|
private string _filterPattern = "";
|
|
|
private bool _updatingSelection = false;
|
|
|
private DispatcherTimer _filterTimer;
|
|
|
+ private string _lastSaveAsPath = "";
|
|
|
|
|
|
public string FilteredSolutionPath { get; private set; }
|
|
|
public ObservableCollection<ProjectTreeItem> Projects { get; set; }
|
|
|
@@ -63,6 +66,10 @@ namespace Quadarax.Application.Tools.Vsix.FilteredSolutionsExtension
|
|
|
System.Windows.Application.Current.Dispatcher.Invoke(() =>
|
|
|
{
|
|
|
Projects.Clear();
|
|
|
+
|
|
|
+ // First pass: create all project tree items
|
|
|
+ var projectTreeItems = new Dictionary<string, ProjectTreeItem>();
|
|
|
+
|
|
|
foreach (var projectNode in _allProjectNodes)
|
|
|
{
|
|
|
var projectInfo = new ProjectInfo
|
|
|
@@ -73,12 +80,42 @@ namespace Quadarax.Application.Tools.Vsix.FilteredSolutionsExtension
|
|
|
TypeGuid = projectNode.TypeGuid
|
|
|
};
|
|
|
|
|
|
- var treeItem = new ProjectTreeItem(projectInfo);
|
|
|
- // Store reference to original ProjectNode for dependency tracking
|
|
|
- treeItem.Tag = projectNode;
|
|
|
+ var treeItem = new ProjectTreeItem(projectInfo)
|
|
|
+ {
|
|
|
+ Tag = projectNode,
|
|
|
+ IsSelectable = true
|
|
|
+ };
|
|
|
+
|
|
|
+ projectTreeItems[projectNode.ProjectGuid] = treeItem;
|
|
|
Projects.Add(treeItem);
|
|
|
}
|
|
|
|
|
|
+ // Second pass: build dependency trees
|
|
|
+ int totalDependencies = 0;
|
|
|
+ foreach (var projectNode in _allProjectNodes)
|
|
|
+ {
|
|
|
+ if (projectTreeItems.TryGetValue(projectNode.ProjectGuid, out var treeItem))
|
|
|
+ {
|
|
|
+ BuildDependencyTree(treeItem, projectNode);
|
|
|
+ totalDependencies += treeItem.Children.Count;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ ErrorHandler.LogInfo($"Total dependencies added to tree: {totalDependencies}");
|
|
|
+
|
|
|
+ // Add a test child to first project if no dependencies exist (for debugging)
|
|
|
+ if (totalDependencies == 0 && Projects.Count > 0)
|
|
|
+ {
|
|
|
+ var testChild = new ProjectTreeItem(new ProjectInfo { Name = "Test Dependency Project" })
|
|
|
+ {
|
|
|
+ IsDependency = true,
|
|
|
+ IsSelectable = false
|
|
|
+ };
|
|
|
+ Projects[0].Children.Add(testChild);
|
|
|
+ Projects[0].DependencyCountText = "(references 1 test project)";
|
|
|
+ ErrorHandler.LogInfo("Added test dependency for debugging");
|
|
|
+ }
|
|
|
+
|
|
|
ProjectCountTextBlock.Text = $"{Projects.Count} projects found";
|
|
|
UpdateSelectionCount();
|
|
|
|
|
|
@@ -89,7 +126,7 @@ namespace Quadarax.Application.Tools.Vsix.FilteredSolutionsExtension
|
|
|
// Set the ItemsSource for the TreeView
|
|
|
ProjectTreeView.ItemsSource = Projects;
|
|
|
|
|
|
- ErrorHandler.LogInfo($"Loaded {Projects.Count} projects in filter dialog");
|
|
|
+ ErrorHandler.LogInfo($"Loaded {Projects.Count} projects in filter dialog with dependency trees");
|
|
|
});
|
|
|
}
|
|
|
catch (Exception ex)
|
|
|
@@ -99,6 +136,54 @@ namespace Quadarax.Application.Tools.Vsix.FilteredSolutionsExtension
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ private void BuildDependencyTree(ProjectTreeItem parentItem, ProjectNode projectNode)
|
|
|
+ {
|
|
|
+ // Clear existing children first
|
|
|
+ parentItem.Children.Clear();
|
|
|
+
|
|
|
+ ErrorHandler.LogInfo($"Building dependency tree for {projectNode.Name} with {projectNode.Dependencies.Count} dependencies");
|
|
|
+
|
|
|
+ // Add dependency children (projects that this project depends on)
|
|
|
+ foreach (var dependency in projectNode.Dependencies)
|
|
|
+ {
|
|
|
+ var depInfo = new ProjectInfo
|
|
|
+ {
|
|
|
+ Name = dependency.Name,
|
|
|
+ FullPath = dependency.Path,
|
|
|
+ ProjectGuid = dependency.ProjectGuid,
|
|
|
+ TypeGuid = dependency.TypeGuid
|
|
|
+ };
|
|
|
+
|
|
|
+ var depItem = new ProjectTreeItem(depInfo)
|
|
|
+ {
|
|
|
+ Tag = dependency,
|
|
|
+ IsSelectable = false, // Dependencies are not selectable in tree
|
|
|
+ IsDependency = true,
|
|
|
+ IsChecked = false // Dependencies don't have checkboxes
|
|
|
+ };
|
|
|
+
|
|
|
+ parentItem.Children.Add(depItem);
|
|
|
+ ErrorHandler.LogInfo($" Added dependency: {dependency.Name}");
|
|
|
+ }
|
|
|
+
|
|
|
+ // Force property change notification after adding children
|
|
|
+ parentItem.OnPropertyChanged(nameof(parentItem.HasDependencies));
|
|
|
+
|
|
|
+ // Verify HasDependencies is working
|
|
|
+ ErrorHandler.LogInfo($"Project {projectNode.Name}: HasDependencies = {parentItem.HasDependencies}, Children.Count = {parentItem.Children.Count}");
|
|
|
+
|
|
|
+ // Update dependency count text for parent - only show if has dependencies
|
|
|
+ if (projectNode.Dependencies.Count > 0)
|
|
|
+ {
|
|
|
+ parentItem.DependencyCountText = ""; // Remove count from main display
|
|
|
+ ErrorHandler.LogInfo($"Project {projectNode.Name} has {projectNode.Dependencies.Count} dependencies");
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ parentItem.DependencyCountText = "";
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
private void SelectAllButton_Click(object sender, RoutedEventArgs e)
|
|
|
{
|
|
|
_updatingSelection = true;
|
|
|
@@ -106,7 +191,8 @@ namespace Quadarax.Application.Tools.Vsix.FilteredSolutionsExtension
|
|
|
{
|
|
|
foreach (var project in Projects)
|
|
|
{
|
|
|
- project.IsChecked = true;
|
|
|
+ if (project.IsSelectable)
|
|
|
+ project.IsChecked = true;
|
|
|
}
|
|
|
UpdateSelectionCount();
|
|
|
}
|
|
|
@@ -123,7 +209,8 @@ namespace Quadarax.Application.Tools.Vsix.FilteredSolutionsExtension
|
|
|
{
|
|
|
foreach (var project in Projects)
|
|
|
{
|
|
|
- project.IsChecked = false;
|
|
|
+ if (project.IsSelectable)
|
|
|
+ project.IsChecked = false;
|
|
|
}
|
|
|
UpdateSelectionCount();
|
|
|
}
|
|
|
@@ -144,7 +231,8 @@ namespace Quadarax.Application.Tools.Vsix.FilteredSolutionsExtension
|
|
|
{
|
|
|
foreach (var project in Projects)
|
|
|
{
|
|
|
- if (project.DisplayName.IndexOf("Test", StringComparison.OrdinalIgnoreCase) >= 0)
|
|
|
+ if (project.IsSelectable &&
|
|
|
+ project.DisplayName.IndexOf("Test", StringComparison.OrdinalIgnoreCase) >= 0)
|
|
|
{
|
|
|
project.IsChecked = true;
|
|
|
// Auto-select dependencies for test projects
|
|
|
@@ -162,9 +250,75 @@ namespace Quadarax.Application.Tools.Vsix.FilteredSolutionsExtension
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- private void FilterButton_Click(object sender, RoutedEventArgs e)
|
|
|
+ private void ExpandAllButton_Click(object sender, RoutedEventArgs e)
|
|
|
{
|
|
|
- ApplyFilter();
|
|
|
+ SetAllTreeViewItemsExpanded(true);
|
|
|
+ StatusTextBlock.Text = "All project trees expanded";
|
|
|
+ }
|
|
|
+
|
|
|
+ private void CollapseAllButton_Click(object sender, RoutedEventArgs e)
|
|
|
+ {
|
|
|
+ SetAllTreeViewItemsExpanded(false);
|
|
|
+ StatusTextBlock.Text = "All project trees collapsed";
|
|
|
+ }
|
|
|
+
|
|
|
+ private void SetAllTreeViewItemsExpanded(bool isExpanded)
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ // First approach: try to access containers directly
|
|
|
+ foreach (var item in Projects)
|
|
|
+ {
|
|
|
+ var container = ProjectTreeView.ItemContainerGenerator.ContainerFromItem(item) as TreeViewItem;
|
|
|
+ if (container != null)
|
|
|
+ {
|
|
|
+ SetTreeViewItemExpanded(container, isExpanded);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // Second approach: force container generation for any that weren't generated yet
|
|
|
+ ProjectTreeView.UpdateLayout();
|
|
|
+
|
|
|
+ // Try again for any containers that weren't available the first time
|
|
|
+ foreach (var item in Projects)
|
|
|
+ {
|
|
|
+ var container = ProjectTreeView.ItemContainerGenerator.ContainerFromItem(item) as TreeViewItem;
|
|
|
+ if (container != null)
|
|
|
+ {
|
|
|
+ container.IsExpanded = isExpanded;
|
|
|
+ // Also ensure child containers are handled
|
|
|
+ for (int i = 0; i < container.Items.Count; i++)
|
|
|
+ {
|
|
|
+ var childContainer = container.ItemContainerGenerator.ContainerFromIndex(i) as TreeViewItem;
|
|
|
+ if (childContainer != null)
|
|
|
+ {
|
|
|
+ childContainer.IsExpanded = isExpanded;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ catch (Exception ex)
|
|
|
+ {
|
|
|
+ ErrorHandler.LogError($"Error {(isExpanded ? "expanding" : "collapsing")} tree items", ex);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ private void SetTreeViewItemExpanded(TreeViewItem item, bool isExpanded)
|
|
|
+ {
|
|
|
+ if (item == null) return;
|
|
|
+
|
|
|
+ item.IsExpanded = isExpanded;
|
|
|
+
|
|
|
+ // Recursively expand/collapse child items
|
|
|
+ for (int i = 0; i < item.Items.Count; i++)
|
|
|
+ {
|
|
|
+ var childContainer = item.ItemContainerGenerator.ContainerFromIndex(i) as TreeViewItem;
|
|
|
+ if (childContainer != null)
|
|
|
+ {
|
|
|
+ SetTreeViewItemExpanded(childContainer, isExpanded);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
private void ClearFilterButton_Click(object sender, RoutedEventArgs e)
|
|
|
@@ -176,7 +330,7 @@ namespace Quadarax.Application.Tools.Vsix.FilteredSolutionsExtension
|
|
|
|
|
|
private void FilterTextBox_TextChanged(object sender, TextChangedEventArgs e)
|
|
|
{
|
|
|
- // Debounce the filter to avoid too many updates
|
|
|
+ // Auto-filter while typing with debounce
|
|
|
_filterTimer?.Stop();
|
|
|
_filterTimer = new DispatcherTimer { Interval = TimeSpan.FromMilliseconds(300) };
|
|
|
_filterTimer.Tick += (s, args) =>
|
|
|
@@ -191,41 +345,41 @@ namespace Quadarax.Application.Tools.Vsix.FilteredSolutionsExtension
|
|
|
{
|
|
|
var pattern = FilterTextBox.Text?.Trim() ?? "";
|
|
|
|
|
|
- if (string.IsNullOrWhiteSpace(pattern))
|
|
|
+ foreach (var project in Projects)
|
|
|
{
|
|
|
- // Show all projects
|
|
|
- foreach (var project in Projects)
|
|
|
- {
|
|
|
- var container = ProjectTreeView.ItemContainerGenerator.ContainerFromItem(project) as FrameworkElement;
|
|
|
- if (container != null)
|
|
|
- {
|
|
|
- container.Visibility = Visibility.Visible;
|
|
|
- }
|
|
|
- }
|
|
|
- return;
|
|
|
+ ApplyFilterToItem(project, pattern);
|
|
|
}
|
|
|
+ }
|
|
|
|
|
|
- try
|
|
|
+ private bool ApplyFilterToItem(ProjectTreeItem item, string pattern)
|
|
|
+ {
|
|
|
+ bool isVisible = true;
|
|
|
+
|
|
|
+ if (!string.IsNullOrWhiteSpace(pattern))
|
|
|
{
|
|
|
- var wildcardPattern = pattern.Replace("*", ".*");
|
|
|
- var regex = new System.Text.RegularExpressions.Regex(wildcardPattern,
|
|
|
- System.Text.RegularExpressions.RegexOptions.IgnoreCase);
|
|
|
+ try
|
|
|
+ {
|
|
|
+ var wildcardPattern = pattern.Replace("*", ".*");
|
|
|
+ var regex = new System.Text.RegularExpressions.Regex(wildcardPattern,
|
|
|
+ System.Text.RegularExpressions.RegexOptions.IgnoreCase);
|
|
|
|
|
|
- foreach (var project in Projects)
|
|
|
+ // For main projects, check if name matches
|
|
|
+ // For dependencies, always show if parent is visible
|
|
|
+ isVisible = item.IsDependency || regex.IsMatch(item.ProjectInfo.Name);
|
|
|
+ }
|
|
|
+ catch (Exception ex)
|
|
|
{
|
|
|
- var isMatch = regex.IsMatch(project.ProjectInfo.Name);
|
|
|
- var container = ProjectTreeView.ItemContainerGenerator.ContainerFromItem(project) as FrameworkElement;
|
|
|
- if (container != null)
|
|
|
- {
|
|
|
- container.Visibility = isMatch ? Visibility.Visible : Visibility.Collapsed;
|
|
|
- }
|
|
|
+ ErrorHandler.LogError("Error applying filter pattern", ex);
|
|
|
+ StatusTextBlock.Text = "Invalid filter pattern";
|
|
|
+ isVisible = true; // Show all on error
|
|
|
}
|
|
|
}
|
|
|
- catch (Exception ex)
|
|
|
- {
|
|
|
- ErrorHandler.LogError("Error applying filter pattern", ex);
|
|
|
- StatusTextBlock.Text = "Invalid filter pattern";
|
|
|
- }
|
|
|
+
|
|
|
+ // For TreeView with hierarchical data, we need to use a different approach
|
|
|
+ // The filtering will be handled by the TreeView's visibility binding
|
|
|
+ item.IsVisible = isVisible;
|
|
|
+
|
|
|
+ return isVisible;
|
|
|
}
|
|
|
|
|
|
private void ProjectTreeItem_Checked(object sender, RoutedEventArgs e)
|
|
|
@@ -234,7 +388,7 @@ namespace Quadarax.Application.Tools.Vsix.FilteredSolutionsExtension
|
|
|
|
|
|
var checkBox = sender as CheckBox;
|
|
|
var treeItem = checkBox?.DataContext as ProjectTreeItem;
|
|
|
- if (treeItem?.Tag is ProjectNode projectNode)
|
|
|
+ if (treeItem?.Tag is ProjectNode projectNode && treeItem.IsSelectable)
|
|
|
{
|
|
|
_updatingSelection = true;
|
|
|
try
|
|
|
@@ -256,7 +410,7 @@ namespace Quadarax.Application.Tools.Vsix.FilteredSolutionsExtension
|
|
|
|
|
|
var checkBox = sender as CheckBox;
|
|
|
var treeItem = checkBox?.DataContext as ProjectTreeItem;
|
|
|
- if (treeItem?.Tag is ProjectNode projectNode)
|
|
|
+ if (treeItem?.Tag is ProjectNode projectNode && treeItem.IsSelectable)
|
|
|
{
|
|
|
_updatingSelection = true;
|
|
|
try
|
|
|
@@ -278,7 +432,7 @@ namespace Quadarax.Application.Tools.Vsix.FilteredSolutionsExtension
|
|
|
var treeItem = Projects.FirstOrDefault(p =>
|
|
|
string.Equals(((ProjectNode)p.Tag)?.ProjectGuid, projectNode.ProjectGuid, StringComparison.OrdinalIgnoreCase));
|
|
|
|
|
|
- if (treeItem != null && treeItem.IsChecked != isChecked)
|
|
|
+ if (treeItem != null && treeItem.IsChecked != isChecked && treeItem.IsSelectable)
|
|
|
{
|
|
|
treeItem.IsChecked = isChecked;
|
|
|
}
|
|
|
@@ -298,7 +452,7 @@ namespace Quadarax.Application.Tools.Vsix.FilteredSolutionsExtension
|
|
|
var treeItem = Projects.FirstOrDefault(p =>
|
|
|
string.Equals(((ProjectNode)p.Tag)?.ProjectGuid, dependent.ProjectGuid, StringComparison.OrdinalIgnoreCase));
|
|
|
|
|
|
- if (treeItem != null && treeItem.IsChecked)
|
|
|
+ if (treeItem != null && treeItem.IsChecked && treeItem.IsSelectable)
|
|
|
{
|
|
|
treeItem.IsChecked = false;
|
|
|
DeselectDependents(dependent);
|
|
|
@@ -308,18 +462,99 @@ namespace Quadarax.Application.Tools.Vsix.FilteredSolutionsExtension
|
|
|
|
|
|
private void UpdateSelectionCount()
|
|
|
{
|
|
|
- var selectedCount = Projects.Count(p => p.IsChecked);
|
|
|
+ var selectedCount = Projects.Count(p => p.IsSelectable && p.IsChecked);
|
|
|
SelectionCountTextBlock.Text = $"{selectedCount} of {Projects.Count} projects selected";
|
|
|
|
|
|
- // Enable/disable OK button based on selection
|
|
|
+ // Enable/disable buttons based on selection
|
|
|
OkButton.IsEnabled = selectedCount > 0;
|
|
|
+ SaveAsButton.IsEnabled = selectedCount > 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ private async void SaveAsButton_Click(object sender, RoutedEventArgs e)
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ var selectedTreeItems = Projects.Where(p => p.IsSelectable && p.IsChecked).ToList();
|
|
|
+ if (!selectedTreeItems.Any())
|
|
|
+ {
|
|
|
+ ErrorHandler.ShowUserInfo("Warning", "Please select at least one project.");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ // Show save dialog
|
|
|
+ var saveDialog = new SaveFileDialog
|
|
|
+ {
|
|
|
+ Title = "Save Filtered Solution As",
|
|
|
+ Filter = "Solution files (*.sln)|*.sln|All files (*.*)|*.*",
|
|
|
+ DefaultExt = ".sln",
|
|
|
+ FileName = $"{_solutionInfo.Name}_filtered.sln",
|
|
|
+ InitialDirectory = string.IsNullOrEmpty(_lastSaveAsPath) ?
|
|
|
+ Path.GetDirectoryName(_solutionInfo.FullPath) :
|
|
|
+ Path.GetDirectoryName(_lastSaveAsPath)
|
|
|
+ };
|
|
|
+
|
|
|
+ if (saveDialog.ShowDialog() == true)
|
|
|
+ {
|
|
|
+ _lastSaveAsPath = saveDialog.FileName;
|
|
|
+
|
|
|
+ StatusTextBlock.Text = "Creating filtered solution...";
|
|
|
+ SaveAsButton.IsEnabled = false;
|
|
|
+ OkButton.IsEnabled = false;
|
|
|
+ CancelButton.IsEnabled = false;
|
|
|
+
|
|
|
+ // Get corresponding ProjectNodes
|
|
|
+ var selectedProjectNodes = selectedTreeItems
|
|
|
+ .Select(ti => ti.Tag as ProjectNode)
|
|
|
+ .Where(pn => pn != null)
|
|
|
+ .ToList();
|
|
|
+
|
|
|
+ ErrorHandler.LogInfo($"User saving {selectedProjectNodes.Count} projects to custom location");
|
|
|
+
|
|
|
+ // The parser already includes dependencies
|
|
|
+ var projectsWithDependencies = _solutionParser.GetProjectsWithDependencies(selectedProjectNodes);
|
|
|
+
|
|
|
+ // Create filtered solution with path remapping
|
|
|
+ FilteredSolutionPath = await _solutionParser.CreateFilteredSolutionWithRemappingAsync(
|
|
|
+ _solutionInfo.FullPath, projectsWithDependencies, saveDialog.FileName);
|
|
|
+
|
|
|
+ StatusTextBlock.Text = "Filtered solution saved successfully";
|
|
|
+
|
|
|
+ // Ask if user wants to open the saved solution
|
|
|
+ var result = MessageBox.Show(
|
|
|
+ $"Filtered solution saved to:\n{saveDialog.FileName}\n\nWould you like to open it now?",
|
|
|
+ "Solution Saved",
|
|
|
+ MessageBoxButton.YesNo,
|
|
|
+ MessageBoxImage.Question);
|
|
|
+
|
|
|
+ if (result == MessageBoxResult.Yes)
|
|
|
+ {
|
|
|
+ DialogResult = true;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ // Reset buttons for continued use
|
|
|
+ SaveAsButton.IsEnabled = true;
|
|
|
+ OkButton.IsEnabled = true;
|
|
|
+ CancelButton.IsEnabled = true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ catch (Exception ex)
|
|
|
+ {
|
|
|
+ await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync();
|
|
|
+ ErrorHandler.ShowUserError("Error", "Error saving filtered solution", ex);
|
|
|
+ StatusTextBlock.Text = "Error saving filtered solution";
|
|
|
+ SaveAsButton.IsEnabled = true;
|
|
|
+ OkButton.IsEnabled = true;
|
|
|
+ CancelButton.IsEnabled = true;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
private async void OkButton_Click(object sender, RoutedEventArgs e)
|
|
|
{
|
|
|
try
|
|
|
{
|
|
|
- var selectedTreeItems = Projects.Where(p => p.IsChecked).ToList();
|
|
|
+ var selectedTreeItems = Projects.Where(p => p.IsSelectable && p.IsChecked).ToList();
|
|
|
if (!selectedTreeItems.Any())
|
|
|
{
|
|
|
ErrorHandler.ShowUserInfo("Warning", "Please select at least one project.");
|
|
|
@@ -328,6 +563,7 @@ namespace Quadarax.Application.Tools.Vsix.FilteredSolutionsExtension
|
|
|
|
|
|
StatusTextBlock.Text = "Creating filtered solution...";
|
|
|
OkButton.IsEnabled = false;
|
|
|
+ SaveAsButton.IsEnabled = false;
|
|
|
CancelButton.IsEnabled = false;
|
|
|
|
|
|
// Get corresponding ProjectNodes
|
|
|
@@ -338,10 +574,10 @@ namespace Quadarax.Application.Tools.Vsix.FilteredSolutionsExtension
|
|
|
|
|
|
ErrorHandler.LogInfo($"User selected {selectedProjectNodes.Count} projects for filtering");
|
|
|
|
|
|
- // The parser already includes dependencies, but double-check
|
|
|
+ // The parser already includes dependencies
|
|
|
var projectsWithDependencies = _solutionParser.GetProjectsWithDependencies(selectedProjectNodes);
|
|
|
|
|
|
- // Create filtered solution
|
|
|
+ // Create filtered solution in temp directory with path remapping
|
|
|
FilteredSolutionPath = await _solutionParser.CreateFilteredSolutionAsync(
|
|
|
_solutionInfo.FullPath, projectsWithDependencies);
|
|
|
|
|
|
@@ -354,6 +590,7 @@ namespace Quadarax.Application.Tools.Vsix.FilteredSolutionsExtension
|
|
|
ErrorHandler.ShowUserError("Error", "Error creating filtered solution", ex);
|
|
|
StatusTextBlock.Text = "Error creating filtered solution";
|
|
|
OkButton.IsEnabled = true;
|
|
|
+ SaveAsButton.IsEnabled = true;
|
|
|
CancelButton.IsEnabled = true;
|
|
|
}
|
|
|
}
|