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
17 changes: 8 additions & 9 deletions CSharpCodeAnalyst/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,16 @@
using System.Windows;
using CodeGraph.Exploration;
using CodeParser.Parser;
using CSharpCodeAnalyst.Analyzers;
using CSharpCodeAnalyst.Areas.AdvancedSearchArea;
using CSharpCodeAnalyst.Areas.GraphArea;
using CSharpCodeAnalyst.Areas.InfoArea;
using CSharpCodeAnalyst.Areas.TreeArea;
using CSharpCodeAnalyst.CommandLine;
using CSharpCodeAnalyst.Common;
using CSharpCodeAnalyst.Configuration;
using CSharpCodeAnalyst.Messages;
using CSharpCodeAnalyst.Refactoring;
using CSharpCodeAnalyst.Features.AdvancedSearch;
using CSharpCodeAnalyst.Features.Analyzers;
using CSharpCodeAnalyst.Features.Graph;
using CSharpCodeAnalyst.Features.Info;
using CSharpCodeAnalyst.Features.Refactoring;
using CSharpCodeAnalyst.Features.Tree;
using CSharpCodeAnalyst.Shared.Messages;
using CSharpCodeAnalyst.Shared.Notifications;
using Microsoft.Extensions.Configuration;

namespace CSharpCodeAnalyst;
Expand Down Expand Up @@ -107,7 +106,7 @@ private void StartUi()

var refactoringInteraction = new RefactoringInteraction();
var refactoringService = new RefactoringService(refactoringInteraction, messaging);
mainWindow.SetViewer(explorationGraphViewer);
mainWindow.SetViewer(explorationGraphViewer, messaging);
var viewModel = new MainViewModel(messaging, applicationSettings, userSettings, analyzerManager, refactoringService);
var graphViewModel = new GraphViewModel(explorationGraphViewer, explorer, messaging, applicationSettings, refactoringService);
var treeViewModel = new TreeViewModel(messaging, refactoringService);
Expand Down
13 changes: 4 additions & 9 deletions CSharpCodeAnalyst/CSharpCodeAnalyst.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,22 @@
</ItemGroup>

<ItemGroup>
<Page Update="Areas\TableArea\Templates\CodeElementLineTemplate.xaml">
<Page Update="Features\Analyzers\ArchitecturalRules\Presentation\RelationshipViewModelTemplate.xaml">
<Generator>MSBuild:Compile</Generator>
<XamlRuntime>Wpf</XamlRuntime>
<SubType>Designer</SubType>
</Page>
<Page Update="Analyzers\ArchitecturalRules\Presentation\RelationshipViewModelTemplate.xaml">
<Page Update="Features\Analyzers\ArchitecturalRules\Presentation\ArchitecturalRulesDialog.xaml">
<Generator>MSBuild:Compile</Generator>
<XamlRuntime>Wpf</XamlRuntime>
<SubType>Designer</SubType>
</Page>
<Page Update="Analyzers\ArchitecturalRules\Presentation\ArchitecturalRulesDialog.xaml">
<Page Update="Features\Analyzers\EventRegistration\Presentation\SourceLocationTemplate.xaml">
<Generator>MSBuild:Compile</Generator>
<XamlRuntime>Wpf</XamlRuntime>
<SubType>Designer</SubType>
</Page>
<Page Update="Analyzers\EventRegistration\Presentation\SourceLocationTemplate.xaml">
<Generator>MSBuild:Compile</Generator>
<XamlRuntime>Wpf</XamlRuntime>
<SubType>Designer</SubType>
</Page>
<Page Update="Areas\Shared\CodeElementLineTemplate.xaml">
<Page Update="Shared\UI\CodeElementLineTemplate.xaml">
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Update="Styles\ImageStyles.xaml">
Expand Down
5 changes: 3 additions & 2 deletions CSharpCodeAnalyst/CommandLine/ConsoleValidationCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
using System.Text;
using CodeParser.Parser;
using CodeParser.Parser.Config;
using CSharpCodeAnalyst.Analyzers.ArchitecturalRules;
using CSharpCodeAnalyst.Common;
using CSharpCodeAnalyst.Configuration;
using CSharpCodeAnalyst.Features.Analyzers.ArchitecturalRules;
using CSharpCodeAnalyst.Resources;
using CSharpCodeAnalyst.Shared.Contracts;
using CSharpCodeAnalyst.Shared.Messages;
using CSharpCodeAnalyst.Shared.Notifications;
using Microsoft.Extensions.Configuration;

namespace CSharpCodeAnalyst.CommandLine;
Expand Down
23 changes: 0 additions & 23 deletions CSharpCodeAnalyst/Constants.cs

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
<UserControl x:Class="CSharpCodeAnalyst.Areas.AdvancedSearchArea.AdvancedSearchControl"
<UserControl x:Class="CSharpCodeAnalyst.Features.AdvancedSearch.AdvancedSearchControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:CSharpCodeAnalyst.Areas.AdvancedSearchArea"
xmlns:resources="clr-namespace:CSharpCodeAnalyst.Resources"
xmlns:dd="urn:gong-wpf-dragdrop"
mc:Ignorable="d"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using System.Windows.Input;
using CSharpCodeAnalyst.Resources;

namespace CSharpCodeAnalyst.Areas.AdvancedSearchArea;
namespace CSharpCodeAnalyst.Features.AdvancedSearch;

public partial class AdvancedSearchControl : UserControl
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
using System.Windows.Input;
using System.Windows.Threading;
using CodeGraph.Graph;
using CSharpCodeAnalyst.Common;
using CSharpCodeAnalyst.Messages;
using CSharpCodeAnalyst.Refactoring;
using CSharpCodeAnalyst.Wpf;
using CSharpCodeAnalyst.Features.Refactoring;
using CSharpCodeAnalyst.Shared.Messages;
using CSharpCodeAnalyst.Shared.Search;
using CSharpCodeAnalyst.Shared.Wpf;

namespace CSharpCodeAnalyst.Areas.AdvancedSearchArea;
namespace CSharpCodeAnalyst.Features.AdvancedSearch;

public sealed class AdvancedSearchViewModel : INotifyPropertyChanged
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
using System.Diagnostics;
using System.Windows.Media.Imaging;
using CodeGraph.Graph;
using CSharpCodeAnalyst.Messages;
using CSharpCodeAnalyst.Shared.Messages;

namespace CSharpCodeAnalyst.Areas.AdvancedSearchArea;
namespace CSharpCodeAnalyst.Features.AdvancedSearch;

[DebuggerDisplay("{Type} {Name} - {FullPath}")]
public sealed class SearchItemViewModel : INotifyPropertyChanged
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using CodeGraph.Export;
using CodeGraph.Graph;

namespace CSharpCodeAnalyst.Ai;
namespace CSharpCodeAnalyst.Features.Ai;

/// <summary>
/// Orchestrates AI-assisted cycle analysis: builds the prompt, calls the LLM, returns the Markdown response.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Window x:Class="CSharpCodeAnalyst.Ai.AiAdvisorWindow"
<Window x:Class="CSharpCodeAnalyst.Features.Ai.AiAdvisorWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:markdig="clr-namespace:Markdig.Wpf;assembly=Markdig.Wpf"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
using System.IO;
using System.Windows;
using System.Windows.Input;
using CSharpCodeAnalyst.Resources;
using Microsoft.Win32;

namespace CSharpCodeAnalyst.Ai;
namespace CSharpCodeAnalyst.Features.Ai;

public partial class AiAdvisorWindow
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using System.Text.Json;
using System.Text.Json.Nodes;

namespace CSharpCodeAnalyst.Ai;
namespace CSharpCodeAnalyst.Features.Ai;

/// <summary>
/// Sends a single user prompt to an LLM endpoint and returns the response text.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
namespace CSharpCodeAnalyst.Ai;
namespace CSharpCodeAnalyst.Features.Ai;

public class AiClientException(string message) : Exception(message);
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using CSharpCodeAnalyst.Analyzers.EventRegistration;
using CSharpCodeAnalyst.Common;
using CSharpCodeAnalyst.Features.Analyzers.EventRegistration;
using CSharpCodeAnalyst.Shared.Contracts;
using CSharpCodeAnalyst.Shared.Notifications;

namespace CSharpCodeAnalyst.Analyzers;
namespace CSharpCodeAnalyst.Features.Analyzers;

internal class AnalyzerManager : IAnalyzerManager
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
using System.IO;
using System.Text.Json;
using System.Windows;
using CSharpCodeAnalyst.Analyzers.ArchitecturalRules.Presentation;
using CSharpCodeAnalyst.Analyzers.ArchitecturalRules.Rules;
using CSharpCodeAnalyst.Common;
using CSharpCodeAnalyst.Features.Analyzers.ArchitecturalRules.Presentation;
using CSharpCodeAnalyst.Features.Analyzers.ArchitecturalRules.Rules;
using CSharpCodeAnalyst.Shared.Contracts;
using CSharpCodeAnalyst.Shared.Messages;
using CSharpCodeAnalyst.Shared.Notifications;

namespace CSharpCodeAnalyst.Analyzers.ArchitecturalRules;
namespace CSharpCodeAnalyst.Features.Analyzers.ArchitecturalRules;

public class Analyzer : IAnalyzer
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using CodeGraph.Graph;

namespace CSharpCodeAnalyst.Analyzers.ArchitecturalRules;
namespace CSharpCodeAnalyst.Features.Analyzers.ArchitecturalRules;

public static class PatternMatcher
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace CSharpCodeAnalyst.Analyzers.ArchitecturalRules;
namespace CSharpCodeAnalyst.Features.Analyzers.ArchitecturalRules;

public class PersistenceData
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Window x:Class="CSharpCodeAnalyst.Analyzers.ArchitecturalRules.Presentation.ArchitecturalRulesDialog"
<Window x:Class="CSharpCodeAnalyst.Features.Analyzers.ArchitecturalRules.Presentation.ArchitecturalRulesDialog"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using System.Windows;
using Microsoft.Win32;

namespace CSharpCodeAnalyst.Analyzers.ArchitecturalRules.Presentation;
namespace CSharpCodeAnalyst.Features.Analyzers.ArchitecturalRules.Presentation;

public partial class ArchitecturalRulesDialog : INotifyPropertyChanged
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using CodeGraph.Graph;

namespace CSharpCodeAnalyst.Analyzers.ArchitecturalRules.Presentation;
namespace CSharpCodeAnalyst.Features.Analyzers.ArchitecturalRules.Presentation;

/// <summary>
/// A line in the detail view. Note a view model is created for each source location in a relationship.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:presentation="clr-namespace:CSharpCodeAnalyst.Analyzers.ArchitecturalRules.Presentation"
xmlns:presentation="clr-namespace:CSharpCodeAnalyst.Features.Analyzers.ArchitecturalRules.Presentation"
mc:Ignorable="d">
<ItemsControl
d:DataContext="{d:DesignInstance presentation:RuleViolationViewModel }"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
using System.Windows;
using System.Windows.Input;
using System.Windows.Media;
using CSharpCodeAnalyst.Analyzers.ArchitecturalRules.Rules;
using CSharpCodeAnalyst.Features.Analyzers.ArchitecturalRules.Rules;
using CSharpCodeAnalyst.Resources;
using CSharpCodeAnalyst.Shared.DynamicDataGrid.Contracts.TabularData;
using CSharpCodeAnalyst.Shared.Services;
using CSharpCodeAnalyst.Wpf;
using CSharpCodeAnalyst.Shared.Wpf;

namespace CSharpCodeAnalyst.Analyzers.ArchitecturalRules.Presentation;
namespace CSharpCodeAnalyst.Features.Analyzers.ArchitecturalRules.Presentation;

public class RuleViolationViewModel : TableRow
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Windows;
using CSharpCodeAnalyst.Shared.DynamicDataGrid.Contracts.TabularData;

namespace CSharpCodeAnalyst.Analyzers.ArchitecturalRules.Presentation;
namespace CSharpCodeAnalyst.Features.Analyzers.ArchitecturalRules.Presentation;

public class RuleViolationsViewModel : Table
{
Expand Down Expand Up @@ -60,7 +60,7 @@ public override ObservableCollection<TableRow> GetData()
public override DataTemplate? GetRowDetailsTemplate()
{
var uri = new Uri(
"/CSharpCodeAnalyst;component/Analyzers/ArchitecturalRules/Presentation/RelationshipViewModelTemplate.xaml",
"/CSharpCodeAnalyst;component/Features/Analyzers/ArchitecturalRules/Presentation/RelationshipViewModelTemplate.xaml",
UriKind.Relative);
return (DataTemplate)Application.LoadComponent(uri);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using System.Text.RegularExpressions;
using CSharpCodeAnalyst.Analyzers.ArchitecturalRules.Rules;
using CSharpCodeAnalyst.Features.Analyzers.ArchitecturalRules.Rules;
using CSharpCodeAnalyst.Resources;

namespace CSharpCodeAnalyst.Analyzers.ArchitecturalRules;
namespace CSharpCodeAnalyst.Features.Analyzers.ArchitecturalRules;

public static class RuleParser
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using CodeGraph.Graph;

namespace CSharpCodeAnalyst.Analyzers.ArchitecturalRules.Rules;
namespace CSharpCodeAnalyst.Features.Analyzers.ArchitecturalRules.Rules;

/// <summary>
/// Denies dependencies from source to target patterns
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using CodeGraph.Graph;

namespace CSharpCodeAnalyst.Analyzers.ArchitecturalRules.Rules;
namespace CSharpCodeAnalyst.Features.Analyzers.ArchitecturalRules.Rules;

/// <summary>
/// Isolates source pattern from any external dependencies
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using CodeGraph.Graph;

namespace CSharpCodeAnalyst.Analyzers.ArchitecturalRules.Rules;
namespace CSharpCodeAnalyst.Features.Analyzers.ArchitecturalRules.Rules;

/// <summary>
/// Restricts source to only depend on target patterns (all others are denied)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using CodeGraph.Graph;

namespace CSharpCodeAnalyst.Analyzers.ArchitecturalRules.Rules;
namespace CSharpCodeAnalyst.Features.Analyzers.ArchitecturalRules.Rules;

/// <summary>
/// Groups multiple RESTRICT rules with the same source pattern
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using CodeGraph.Graph;

namespace CSharpCodeAnalyst.Analyzers.ArchitecturalRules.Rules;
namespace CSharpCodeAnalyst.Features.Analyzers.ArchitecturalRules.Rules;

public abstract class RuleBase
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using CodeGraph.Graph;
using CSharpCodeAnalyst.Analyzers.ArchitecturalRules.Rules;
using CSharpCodeAnalyst.Features.Analyzers.ArchitecturalRules.Rules;

namespace CSharpCodeAnalyst.Analyzers.ArchitecturalRules;
namespace CSharpCodeAnalyst.Features.Analyzers.ArchitecturalRules;

public class Violation
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Text;

namespace CSharpCodeAnalyst.Analyzers.ArchitecturalRules;
namespace CSharpCodeAnalyst.Features.Analyzers.ArchitecturalRules;

public static class ViolationsFormatter
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
using CodeGraph.Graph;
using CSharpCodeAnalyst.Analyzers.EventRegistration.Presentation;
using CSharpCodeAnalyst.Features.Analyzers.EventRegistration.Presentation;
using CSharpCodeAnalyst.Resources;
using CSharpCodeAnalyst.Shared.Contracts;
using CSharpCodeAnalyst.Shared.Messages;
using CSharpCodeAnalyst.Shared.UI;

namespace CSharpCodeAnalyst.Analyzers.EventRegistration;
namespace CSharpCodeAnalyst.Features.Analyzers.EventRegistration;

/// <summary>
/// Finds imbalances between event registrations and un-registrations.
Expand Down
Loading