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
4 changes: 2 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ source in four target languages. The solution uses:
- **ktsu.Sdk** — custom SDK providing shared build configuration
- **MSTest.Sdk** — test project SDK with Microsoft Testing Platform
- `Coder.Core` cross-targets `net10.0` and `net9.0`; `Coder.Graph` and `Coder.Editor` are `net10.0`
only, because `ktsu.ImGuiNodeEditor` and `ktsu.ImGui.App` are
only, because `ktsu.ImGui.NodeEditor` and `ktsu.ImGui.App` are

### Projects

Expand Down Expand Up @@ -60,7 +60,7 @@ source in four target languages. The solution uses:
- `ktsu.CodeBlocker` — writes generated source, owning indentation and the line terminator
- `ktsu.DeepClone` — cloning support for AST nodes
- `YamlDotNet` — YAML serialization
- `ktsu.ImGuiNodeEditor`, `Hexa.NET.ImGui`, `Hexa.NET.ImNodes` — the node-graph editor
- `ktsu.ImGui.NodeEditor`, `Hexa.NET.ImGui`, `Hexa.NET.ImNodes` — the node-graph editor
- `ktsu.ImGui.App` — the desktop application shell
- `ktsu.UndoRedo.Core` — the graph editor's undo stack
- `ktsu.Essentials` — filesystem and persistence providers the editor reads and writes through
Expand Down
2 changes: 1 addition & 1 deletion Coder.Graph/AstGraph.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace ktsu.Coder.Graph;
using System.Linq;
using System.Numerics;
using ktsu.Coder.Ast;
using ktsu.ImGuiNodeEditor;
using ktsu.ImGui.NodeEditor;

/// <summary>
/// A node-editor view of an AST, and the editing operations that keep the two in step.
Expand Down
2 changes: 1 addition & 1 deletion Coder.Graph/AstGraphEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
using Hexa.NET.ImGui;
using Hexa.NET.ImNodes;
using ktsu.Coder.Ast;
using ktsu.ImGuiNodeEditor;
using ktsu.ImGui.NodeEditor;
using ktsu.UndoRedo;
using ktsu.UndoRedo.Contracts;
using ktsu.UndoRedo.Core.Services;
Expand Down Expand Up @@ -963,7 +963,7 @@
{
// Undone in the order the replacement was made: the original goes back into its place,
// then each child that moved goes back into the slot it came from.
Graph.Replace(replacement, existing);

Check warning on line 966 in Coder.Graph/AstGraphEditor.cs

View workflow job for this annotation

GitHub Actions / Analyze & Release

Parameters to 'Replace' have the same names but not the same order as the method arguments.

Check warning on line 966 in Coder.Graph/AstGraphEditor.cs

View workflow job for this annotation

GitHub Actions / Analyze & Release

Parameters to 'Replace' have the same names but not the same order as the method arguments.

Check warning on line 966 in Coder.Graph/AstGraphEditor.cs

View workflow job for this annotation

GitHub Actions / Analyze & Release

Parameters to 'Replace' have the same names but not the same order as the method arguments.

Check warning on line 966 in Coder.Graph/AstGraphEditor.cs

View workflow job for this annotation

GitHub Actions / Analyze & Release

Parameters to 'Replace' have the same names but not the same order as the method arguments.
Graph.MoveTo(existing, from);
foreach ((AstNode child, AstLocation origin) in moved)
{
Expand Down Expand Up @@ -1225,7 +1225,7 @@

// A category's operator entries are one submenu deep, so eighteen binary operators do not
// bury the four literals.
foreach (string group in AstNodeCatalog.GroupsIn(category))

Check warning on line 1228 in Coder.Graph/AstGraphEditor.cs

View workflow job for this annotation

GitHub Actions / Analyze & Release

Loops should be simplified using the "Where" LINQ method

Check warning on line 1228 in Coder.Graph/AstGraphEditor.cs

View workflow job for this annotation

GitHub Actions / Analyze & Release

Loops should be simplified using the "Where" LINQ method

Check warning on line 1228 in Coder.Graph/AstGraphEditor.cs

View workflow job for this annotation

GitHub Actions / Analyze & Release

Loops should be simplified using the "Where" LINQ method

Check warning on line 1228 in Coder.Graph/AstGraphEditor.cs

View workflow job for this annotation

GitHub Actions / Analyze & Release

Loops should be simplified using the "Where" LINQ method
{
if (ImGui.BeginMenu(group))
{
Expand Down
4 changes: 2 additions & 2 deletions Coder.Graph/Coder.Graph.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
<Sdk Name="ktsu.Sdk" />

<PropertyGroup>
<!-- ktsu.ImGuiNodeEditor ships net10.0 only, so this library cannot cross-target the way
<!-- ktsu.ImGui.NodeEditor ships net10.0 only, so this library cannot cross-target the way
Coder.Core does. Coder.Core stays free of any UI dependency. -->
<TargetFramework>net10.0</TargetFramework>
<TargetFrameworks></TargetFrameworks>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="ktsu.ImGuiNodeEditor" />
<PackageReference Include="ktsu.ImGui.NodeEditor" />
<!-- The physics settings the graph enables are this package's type, named directly rather than
inherited through the node editor. -->
<PackageReference Include="ktsu.ForceDirectedLayout" />
Expand Down
1 change: 1 addition & 0 deletions Coder.Test/Editor/GeneratedCodeHighlightingTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ namespace ktsu.Coder.Test.Editor;
using ktsu.Coder.Ast;
using ktsu.Coder.Languages;
using ktsu.ImGui.SyntaxHighlighting;
using ktsu.SyntaxHighlighting;
using Microsoft.VisualStudio.TestTools.UnitTesting;

/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion Coder.Test/Graph/AstGraphEditorHistoryTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace ktsu.Coder.Test.Graph;
using System.Numerics;
using ktsu.Coder.Ast;
using ktsu.Coder.Graph;
using ktsu.ImGuiNodeEditor;
using ktsu.ImGui.NodeEditor;
using ktsu.UndoRedo;
using Microsoft.VisualStudio.TestTools.UnitTesting;

Expand Down
4 changes: 2 additions & 2 deletions Coder.Test/Graph/AstGraphEditorTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace ktsu.Coder.Test.Graph;
using ktsu.Coder.Graph;
using ktsu.ImGui.App;
using ktsu.ImGui.App.Testing;
using ktsu.ImGuiNodeEditor;
using ktsu.ImGui.NodeEditor;
using Microsoft.VisualStudio.TestTools.UnitTesting;

/// <summary>
Expand Down Expand Up @@ -274,7 +274,7 @@ public void Editor_KeepsTheLayoutInsideTheView()
using ImGuiAppHarness harness = ImGuiAppHarness.Start(ConfigFor(editor), Options);
harness.Step(300);

foreach (ktsu.ImGuiNodeEditor.Node node in editor.Graph.Engine.Nodes)
foreach (ktsu.ImGui.NodeEditor.Node node in editor.Graph.Engine.Nodes)
{
// One assertion per bound rather than a range: it says which edge the node went over.
Assert.IsGreaterThan(-200f, node.Position.X, $"{node.Name} drifted off the left to x {node.Position.X}");
Expand Down
2 changes: 1 addition & 1 deletion Coder.Test/Graph/AstGraphLayoutTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace ktsu.Coder.Test.Graph;
using System.Numerics;
using ktsu.Coder.Ast;
using ktsu.Coder.Graph;
using ktsu.ImGuiNodeEditor;
using ktsu.ImGui.NodeEditor;
using Microsoft.VisualStudio.TestTools.UnitTesting;

/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion Coder.Test/Graph/AstGraphRerootTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace ktsu.Coder.Test.Graph;
using ktsu.Coder.Ast;
using ktsu.Coder.Graph;
using ktsu.Coder.Languages;
using ktsu.ImGuiNodeEditor;
using ktsu.ImGui.NodeEditor;
using Microsoft.VisualStudio.TestTools.UnitTesting;

/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion Coder.Test/Graph/AstGraphTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace ktsu.Coder.Test.Graph;
using System.Numerics;
using ktsu.Coder.Ast;
using ktsu.Coder.Graph;
using ktsu.ImGuiNodeEditor;
using ktsu.ImGui.NodeEditor;
using Microsoft.VisualStudio.TestTools.UnitTesting;

/// <summary>
Expand Down
12 changes: 6 additions & 6 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
<PackageVersion Include="ktsu.Essentials.FileSystemProviders.Native" Version="2.3.2" />
<PackageVersion Include="ktsu.Essentials.PersistenceProviders.ConfigHome" Version="2.3.2" />
<PackageVersion Include="ktsu.Essentials.SerializationProviders.Yaml" Version="2.3.2" />
<PackageVersion Include="ktsu.ImGui.App" Version="3.18.0" />
<PackageVersion Include="ktsu.ImGui.App" Version="3.19.0" />
<PackageVersion Include="ktsu.UndoRedo.Core" Version="1.0.19" />
<PackageVersion Include="ktsu.ImGui.App.Testing" Version="3.18.0" />
<PackageVersion Include="ktsu.ImGui.SyntaxHighlighting" Version="3.18.0" />
<PackageVersion Include="ktsu.ImGui.Widgets" Version="3.18.0" />
<PackageVersion Include="ktsu.ImGui.App.Testing" Version="3.19.0" />
<PackageVersion Include="ktsu.ImGui.SyntaxHighlighting" Version="3.19.0" />
<PackageVersion Include="ktsu.ImGui.Widgets" Version="3.19.0" />
<PackageVersion Include="Silk.NET.Windowing.Common" Version="2.23.0" />
<PackageVersion Include="ktsu.ImGuiNodeEditor" Version="3.18.0" />
<PackageVersion Include="ktsu.ForceDirectedLayout" Version="3.18.0" />
<PackageVersion Include="ktsu.ImGui.NodeEditor" Version="3.19.0" />
<PackageVersion Include="ktsu.ForceDirectedLayout" Version="3.19.0" />
<PackageVersion Include="ktsu.CodeBlocker" Version="2.0.4" />
<PackageVersion Include="ktsu.DeepClone" Version="2.0.2" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="10.0.11" />
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ every target language.
### Visual graph editor

`ktsu.Coder.Graph` renders an AST as an editable node graph, built on
[`ktsu.ImGuiNodeEditor`](https://github.com/ktsu-dev/ImGuiApp) with its force-directed layout.
[`ktsu.ImGui.NodeEditor`](https://github.com/ktsu-dev/ImGuiApp) with its force-directed layout.

```csharp
AstGraphEditor editor = new(functionDeclaration);
Expand Down