Editor-side abstract ArchTool class for the architecture tools. It declares an abstract Shell property and implements GetSubtools to fetch subtools from ArchShelves for the tool's Shell and raise them with this tool as context.
using Editor;
namespace Sunless.Architecture;
public abstract partial class ArchTool
{
// The column this tool stands. Two tools may not share one, or each would raise the other's subtools.
public abstract string Shell { get; }
// Asked per activation and never held, for the reason ArchDrawers is not held: hotload carries statics over, so
// a remembered shelf raises subtools out of an assembly that has already been replaced.
public override IEnumerable<EditorTool> GetSubtools()
{
return ArchShelves.On( Shell ).Select( entry => entry.Raise( this ) );
}
}