Extension for fascilitating StaticSharp-based web sites development.
The extesnsion is accessible via dedicated view contaier in activity bar (left side bar, below Explorer, Search etc.).
Currently the extension uses ProjectMap.json file generated by Roslyn source generator installed with StaticSharp.ProjectMapSg nuget
Features:
Create new StaticSharp project
When no folder is open or opened folder is empty, press "Create new project", set up new project params as requested, after project is created restore nuget packages (dotnet restore).
The feature uses StaticSharp.Templates nuget package for project templating. If package is missing it will be installed
View project map
When StaticSharp project is open three views are available: Routes, Pages and Resources. Page is highlighted with read if it has errors, currently if its C# definition does not match file location and name. Route is highlighted with read if it is inconsistent, currently if any of its pages has errors. Resources are displayed only for consistent routes.
Routes manipulations
Add child route - add route with a suingle default page
Add page - add a page, select language out of set up languages
Rename - correct route rename (rename folders, files, classes and namespaces).
Works correct for pages with one corrent namespace and one correct class per file, also correctly named and placed. Otherwise - no changes
Drag and drop - route place in hierarchy can be edited with dragging route to a new parent route
Same as rename do changes for fully correct pages only
Pages manipulation
Add page - same as via Routes view
Delete page
Fix page definition - if page file name/path does not match page C# definition, attempt to rename class and namespace to make them match
Rename class, rename file-scoped namespace, rename page-containing namespace definition in page is the only class, move page class to a correct namespace otherwise
Fix page definition - if page file name/path does not match page C# definition, move and rename page file to make them match