How lukamicoder/astyle-extension works
Project type and purpose
• This is a Visual Studio (and Atmel Studio/AVR Studio) extension written in C# that integrates the Artistic Style (AStyle) code-formatting engine.
• Its purpose is to provide menu commands, settings pages, and automatic formatting on save for C/C++ and C# documents inside the IDE.
File structure
• Top-level:
• .gitignore, README.md
• astyle-extension/astyle-extension2017.sln – the Visual Studio solution file
• Under astyle-extension/AStyleExtension:
• Source code files (.cs, .Designer.cs, .resx) implementing the extension logic, UI dialogs, and options pages
• DocumentEventListener.cs – hooks into document events (format-on-save, on-command)
• AStyleInterface.cs – C# wrapper around the native AStyle DLL
• AStyleSettings.cs and related forms – store and display formatting options
• VSCT and manifest files (AStyleExtension.vsct, source.extension.vsixmanifest) – define commands and package metadata
• AsyncPackageRegistrationAttribute.cs, ProvideAutoLoadAttribute.cs, Guids.cs, PkgCmdID.cs – boilerplate for registering the VS Package
• Properties and Resources – assembly info, license text, localized strings
• packages.config – NuGet package references (if any)
• app.config – configuration for the extension (e.g., binding redirects)
README for additional insights
• Confirms supported IDE versions and the underlying AStyle engine version.
Details
• Responsibility as a separate component.
• Both user-initiated formatting and automatic format-on-save.