Skip to content

Commit b1f9aa0

Browse files
ATrefzerclaude
andauthored
Restructure internal folders (#68)
* Restructure internal folder layout of CSharpCodeAnalyst project - Rename Areas/ to Features/ and drop the "Area" suffix from subfolders (AdvancedSearchArea → AdvancedSearch, GraphArea → Graph, etc.) - Move scattered root-level feature folders (Ai, Analyzers, Export, Gallery, Help, Import, Project, Refactoring) into Features/ - Consolidate infrastructure into Shared/: - Converters/, Filter/, Wpf/ → Shared/ - Common/ split into Shared/Notifications/ and Shared/Search/ - Common/MessageBus → Shared/Messages/ - Common/Result → Shared/ - root Messages/ merged into Shared/Messages/ - Areas/Shared/ merged into Shared/UI/ - Update .csproj Page Update paths accordingly; remove stale Areas\TableArea\Templates reference Namespaces left unchanged intentionally — to be updated via ReSharper. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Fix namespaces * Move QuickInfo/ContextInfoLine DTOs to Shared/ These types are pure data containers used in a cross-feature message (QuickInfoUpdateRequest). Keeping them in Features/Help caused an illegal Shared → Features dependency. QuickInfoFactory remains in Features/Help as it contains genuine feature logic (MSAGL graph objects → QuickInfo). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Replace MainViewModel cast in CodeExplorerControl with MessageBus CodeExplorerControl (Features/Graph) was casting its DataContext to the concrete MainViewModel to call ClearQuickInfo(), creating an illegal Features → root dependency. - Add ClearQuickInfoRequest message to Shared/Messages/ - CodeExplorerControl.SetViewer now accepts IPublisher and publishes ClearQuickInfoRequest on empty-canvas mouse click - MainViewModel subscribes to ClearQuickInfoRequest in its constructor - Thread the IPublisher through MainWindow.SetViewer and App.xaml.cs Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Break up root Constants.cs to avoid it becoming a dependency hub - Move graph rendering constants to Features/Graph/Constants.cs (internal) - Inline TreeMinWidth* as private constants in MainWindow - Replace x:Static XAML bindings for TreeMinWidth* with literal values - Delete root Constants.cs Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Make TreeMinWidth constants public static on MainWindow XAML and code-behind now reference the same fields via {x:Static}, eliminating the risk of the two values drifting apart. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Cleanup --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 3d5ff34 commit b1f9aa0

File tree

158 files changed

+374
-401
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

158 files changed

+374
-401
lines changed

CSharpCodeAnalyst/App.xaml.cs

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,16 @@
22
using System.Windows;
33
using CodeGraph.Exploration;
44
using CodeParser.Parser;
5-
using CSharpCodeAnalyst.Analyzers;
6-
using CSharpCodeAnalyst.Areas.AdvancedSearchArea;
7-
using CSharpCodeAnalyst.Areas.GraphArea;
8-
using CSharpCodeAnalyst.Areas.InfoArea;
9-
using CSharpCodeAnalyst.Areas.TreeArea;
105
using CSharpCodeAnalyst.CommandLine;
11-
using CSharpCodeAnalyst.Common;
126
using CSharpCodeAnalyst.Configuration;
13-
using CSharpCodeAnalyst.Messages;
14-
using CSharpCodeAnalyst.Refactoring;
7+
using CSharpCodeAnalyst.Features.AdvancedSearch;
8+
using CSharpCodeAnalyst.Features.Analyzers;
9+
using CSharpCodeAnalyst.Features.Graph;
10+
using CSharpCodeAnalyst.Features.Info;
11+
using CSharpCodeAnalyst.Features.Refactoring;
12+
using CSharpCodeAnalyst.Features.Tree;
1513
using CSharpCodeAnalyst.Shared.Messages;
14+
using CSharpCodeAnalyst.Shared.Notifications;
1615
using Microsoft.Extensions.Configuration;
1716

1817
namespace CSharpCodeAnalyst;
@@ -107,7 +106,7 @@ private void StartUi()
107106

108107
var refactoringInteraction = new RefactoringInteraction();
109108
var refactoringService = new RefactoringService(refactoringInteraction, messaging);
110-
mainWindow.SetViewer(explorationGraphViewer);
109+
mainWindow.SetViewer(explorationGraphViewer, messaging);
111110
var viewModel = new MainViewModel(messaging, applicationSettings, userSettings, analyzerManager, refactoringService);
112111
var graphViewModel = new GraphViewModel(explorationGraphViewer, explorer, messaging, applicationSettings, refactoringService);
113112
var treeViewModel = new TreeViewModel(messaging, refactoringService);

CSharpCodeAnalyst/CSharpCodeAnalyst.csproj

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,27 +16,22 @@
1616
</ItemGroup>
1717

1818
<ItemGroup>
19-
<Page Update="Areas\TableArea\Templates\CodeElementLineTemplate.xaml">
19+
<Page Update="Features\Analyzers\ArchitecturalRules\Presentation\RelationshipViewModelTemplate.xaml">
2020
<Generator>MSBuild:Compile</Generator>
2121
<XamlRuntime>Wpf</XamlRuntime>
2222
<SubType>Designer</SubType>
2323
</Page>
24-
<Page Update="Analyzers\ArchitecturalRules\Presentation\RelationshipViewModelTemplate.xaml">
24+
<Page Update="Features\Analyzers\ArchitecturalRules\Presentation\ArchitecturalRulesDialog.xaml">
2525
<Generator>MSBuild:Compile</Generator>
2626
<XamlRuntime>Wpf</XamlRuntime>
2727
<SubType>Designer</SubType>
2828
</Page>
29-
<Page Update="Analyzers\ArchitecturalRules\Presentation\ArchitecturalRulesDialog.xaml">
29+
<Page Update="Features\Analyzers\EventRegistration\Presentation\SourceLocationTemplate.xaml">
3030
<Generator>MSBuild:Compile</Generator>
3131
<XamlRuntime>Wpf</XamlRuntime>
3232
<SubType>Designer</SubType>
3333
</Page>
34-
<Page Update="Analyzers\EventRegistration\Presentation\SourceLocationTemplate.xaml">
35-
<Generator>MSBuild:Compile</Generator>
36-
<XamlRuntime>Wpf</XamlRuntime>
37-
<SubType>Designer</SubType>
38-
</Page>
39-
<Page Update="Areas\Shared\CodeElementLineTemplate.xaml">
34+
<Page Update="Shared\UI\CodeElementLineTemplate.xaml">
4035
<Generator>MSBuild:Compile</Generator>
4136
</Page>
4237
<Page Update="Styles\ImageStyles.xaml">

CSharpCodeAnalyst/CommandLine/ConsoleValidationCommand.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@
33
using System.Text;
44
using CodeParser.Parser;
55
using CodeParser.Parser.Config;
6-
using CSharpCodeAnalyst.Analyzers.ArchitecturalRules;
7-
using CSharpCodeAnalyst.Common;
86
using CSharpCodeAnalyst.Configuration;
7+
using CSharpCodeAnalyst.Features.Analyzers.ArchitecturalRules;
98
using CSharpCodeAnalyst.Resources;
109
using CSharpCodeAnalyst.Shared.Contracts;
10+
using CSharpCodeAnalyst.Shared.Messages;
11+
using CSharpCodeAnalyst.Shared.Notifications;
1112
using Microsoft.Extensions.Configuration;
1213

1314
namespace CSharpCodeAnalyst.CommandLine;

CSharpCodeAnalyst/Constants.cs

Lines changed: 0 additions & 23 deletions
This file was deleted.

CSharpCodeAnalyst/Areas/AdvancedSearchArea/AdvancedSearchControl.xaml renamed to CSharpCodeAnalyst/Features/AdvancedSearch/AdvancedSearchControl.xaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
<UserControl x:Class="CSharpCodeAnalyst.Areas.AdvancedSearchArea.AdvancedSearchControl"
1+
<UserControl x:Class="CSharpCodeAnalyst.Features.AdvancedSearch.AdvancedSearchControl"
22
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
33
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
44
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
55
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
6-
xmlns:local="clr-namespace:CSharpCodeAnalyst.Areas.AdvancedSearchArea"
76
xmlns:resources="clr-namespace:CSharpCodeAnalyst.Resources"
87
xmlns:dd="urn:gong-wpf-dragdrop"
98
mc:Ignorable="d"

CSharpCodeAnalyst/Areas/AdvancedSearchArea/AdvancedSearchControl.xaml.cs renamed to CSharpCodeAnalyst/Features/AdvancedSearch/AdvancedSearchControl.xaml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
using System.Windows.Input;
55
using CSharpCodeAnalyst.Resources;
66

7-
namespace CSharpCodeAnalyst.Areas.AdvancedSearchArea;
7+
namespace CSharpCodeAnalyst.Features.AdvancedSearch;
88

99
public partial class AdvancedSearchControl : UserControl
1010
{

CSharpCodeAnalyst/Areas/AdvancedSearchArea/AdvancedSearchViewModel.cs renamed to CSharpCodeAnalyst/Features/AdvancedSearch/AdvancedSearchViewModel.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
using System.Windows.Input;
55
using System.Windows.Threading;
66
using CodeGraph.Graph;
7-
using CSharpCodeAnalyst.Common;
8-
using CSharpCodeAnalyst.Messages;
9-
using CSharpCodeAnalyst.Refactoring;
10-
using CSharpCodeAnalyst.Wpf;
7+
using CSharpCodeAnalyst.Features.Refactoring;
8+
using CSharpCodeAnalyst.Shared.Messages;
9+
using CSharpCodeAnalyst.Shared.Search;
10+
using CSharpCodeAnalyst.Shared.Wpf;
1111

12-
namespace CSharpCodeAnalyst.Areas.AdvancedSearchArea;
12+
namespace CSharpCodeAnalyst.Features.AdvancedSearch;
1313

1414
public sealed class AdvancedSearchViewModel : INotifyPropertyChanged
1515
{

CSharpCodeAnalyst/Areas/AdvancedSearchArea/SearchItemViewModel.cs renamed to CSharpCodeAnalyst/Features/AdvancedSearch/SearchItemViewModel.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
using System.Diagnostics;
33
using System.Windows.Media.Imaging;
44
using CodeGraph.Graph;
5-
using CSharpCodeAnalyst.Messages;
5+
using CSharpCodeAnalyst.Shared.Messages;
66

7-
namespace CSharpCodeAnalyst.Areas.AdvancedSearchArea;
7+
namespace CSharpCodeAnalyst.Features.AdvancedSearch;
88

99
[DebuggerDisplay("{Type} {Name} - {FullPath}")]
1010
public sealed class SearchItemViewModel : INotifyPropertyChanged

CSharpCodeAnalyst/Ai/AiAdvisorService.cs renamed to CSharpCodeAnalyst/Features/Ai/AiAdvisorService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
using CodeGraph.Export;
33
using CodeGraph.Graph;
44

5-
namespace CSharpCodeAnalyst.Ai;
5+
namespace CSharpCodeAnalyst.Features.Ai;
66

77
/// <summary>
88
/// Orchestrates AI-assisted cycle analysis: builds the prompt, calls the LLM, returns the Markdown response.

CSharpCodeAnalyst/Ai/AiAdvisorWindow.xaml renamed to CSharpCodeAnalyst/Features/Ai/AiAdvisorWindow.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Window x:Class="CSharpCodeAnalyst.Ai.AiAdvisorWindow"
1+
<Window x:Class="CSharpCodeAnalyst.Features.Ai.AiAdvisorWindow"
22
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
33
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
44
xmlns:markdig="clr-namespace:Markdig.Wpf;assembly=Markdig.Wpf"

0 commit comments

Comments
 (0)