Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
ba006d4
Refactor release notes generation to PowerShell
Chizaruu Oct 18, 2025
8118ec8
Update branch filter in release workflow
Chizaruu Oct 18, 2025
0b9d58a
Refactor release notes generation in workflow
Chizaruu Oct 18, 2025
c5ac83d
Update branch filter in release workflow
Chizaruu Oct 18, 2025
f624712
Remove testing branch trigger from release workflow
Chizaruu Oct 18, 2025
94354e3
Fix release workflow string handling and formatting
Chizaruu Oct 18, 2025
3b3e7f3
Improve commit fetching and display in release workflow
Chizaruu Oct 18, 2025
1569d65
Merge pull request #5 from Chizaruu/fix-author-naming-testing
Chizaruu Oct 18, 2025
6711ab4
Add options system and operator overload support
Chizaruu Oct 18, 2025
2e5a230
Merge pull request #6 from Chizaruu/v1.1
Chizaruu Oct 18, 2025
50d3150
fix: resolve AddUsingDirective redundancy and update documentation
Chizaruu Oct 18, 2025
4ff2fab
fix: resolve using directive issues in interface generation
Chizaruu Oct 18, 2025
33c6d4a
Merge pull request #7 from Chizaruu/patch/v1.1-review-fixes
Chizaruu Oct 18, 2025
20fafa3
Automate version bump and improve release notes
Chizaruu Oct 18, 2025
b4513a0
Add 'more-automation' branch to release workflow
Chizaruu Oct 18, 2025
6a51c77
Revert "Add 'more-automation' branch to release workflow"
Chizaruu Oct 18, 2025
89a1523
Merge pull request #8 from Chizaruu/patch/more-automation
Chizaruu Oct 18, 2025
82db83d
chore: bump version to 1.1.3.00 [skip ci]
github-actions[bot] Oct 18, 2025
5a0cfad
Improve fallback logic for release tag selection
Chizaruu Oct 18, 2025
2198dd4
Remove testing prerelease logic from release workflow
Chizaruu Oct 18, 2025
248ccd6
chore: bump version to 1.1.4.00 [skip ci]
github-actions[bot] Oct 18, 2025
b12fec2
Improve version bump logic in release workflow
Chizaruu Oct 18, 2025
3f8737f
Merge branch 'dev' of https://github.com/Chizaruu/InterfaceExtractor …
Chizaruu Oct 18, 2025
8cad736
chore: bump version to 1.1.4.01 [skip ci]
github-actions[bot] Oct 18, 2025
71983cf
Run release steps only for conventional commits
Chizaruu Oct 18, 2025
96d8a02
Simplify version bump logic in release workflow
Chizaruu Oct 18, 2025
949636c
Support dev to main promotion in release workflow
Chizaruu Oct 18, 2025
46ce93b
Run .NET setup steps only for conventional commits
Chizaruu Oct 18, 2025
cc2d9b3
feat: add preview dialog, partial class support, records, and impleme…
Chizaruu Oct 18, 2025
6629606
chore: bump version to 1.2.0.0 [skip ci]
github-actions[bot] Oct 18, 2025
ba3faf2
Merge branch 'main' into dev
Chizaruu Oct 18, 2025
ca7d15a
Improve commit enrichment in release workflow
Chizaruu Oct 18, 2025
aee7c87
Merge branch 'dev' of https://github.com/Chizaruu/InterfaceExtractor …
Chizaruu Oct 18, 2025
e68b3af
test: workflow commit fix
Chizaruu Oct 18, 2025
3afe4ff
chore: bump version to 1.2.1.0 [skip ci]
github-actions[bot] Oct 18, 2025
396db55
Update InterfaceExtractor.Extension/Services/InterfaceExtractorServic…
Chizaruu Oct 18, 2025
3d1f8f0
Update InterfaceExtractor.Extension/UI/OverwriteDialog.xaml
Chizaruu Oct 18, 2025
3c212e8
Update .github/workflows/release.yml
Chizaruu Oct 18, 2025
0d0df9b
Update README.md
Chizaruu Oct 18, 2025
84810f4
Update README.md
Chizaruu Oct 18, 2025
4436088
Add job and step timeouts to GitHub Actions workflow
Chizaruu Oct 18, 2025
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: 4 additions & 0 deletions .github/workflows/pr-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ concurrency:
jobs:
test:
runs-on: windows-latest
timeout-minutes: 30 # Job-level timeout

steps:
- name: Checkout code
Expand Down Expand Up @@ -84,6 +85,7 @@ jobs:
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action/windows@v2
if: always()
timeout-minutes: 5 # Step-level timeout
with:
files: |
TestResults/**/*.trx
Expand Down Expand Up @@ -141,6 +143,7 @@ jobs:

code-quality:
runs-on: windows-latest
timeout-minutes: 20 # Job-level timeout

steps:
- name: Checkout code
Expand Down Expand Up @@ -181,6 +184,7 @@ jobs:
runs-on: ubuntu-latest
needs: [test, code-quality]
if: always()
timeout-minutes: 5 # Job-level timeout

steps:
- name: Check Test Status
Expand Down
392 changes: 262 additions & 130 deletions .github/workflows/release.yml

Large diffs are not rendered by default.

148 changes: 148 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
# Changelog

All notable changes to the Interface Extractor extension will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.2.0] - 2025-10-18

### Added

- **Interface Preview Dialog**: New preview window showing the complete generated interface before saving to disk
- View the full interface code with syntax highlighting
- See the exact file path where the interface will be saved
- Option to save or cancel the operation
- Can be disabled in options (Tools → Options → Interface Extractor → Behavior → Show Preview Before Saving)

- **Multi-file Partial Class Support**: Automatically analyzes all partial class files across the project
- Scans project directory for other partial class definitions
- Combines members from all partial files into a single interface
- Avoids duplicate member signatures
- Controlled by option: "Analyze Partial Classes" (enabled by default)
- Logs which partial files were discovered and analyzed

- **Record Type Support**: Extract interfaces from C# record types
- Works with both `record` and `record class` declarations
- Properly handles record properties and methods
- Auto-detects record types and includes them in analysis
- Updates records to implement interfaces (respects Auto Update Class option)
- Converts `init` accessors to `get` in interfaces (since `init` is not valid in interface declarations)

- **Internal Member Support**: Optionally include internal members in interface extraction
- New option: "Include Internal Members" (disabled by default)
- Includes both explicitly internal and implicitly internal (no accessor) members
- Works for methods, properties, events, and indexers
- Useful for internal-facing interfaces

- **Implementation Stub Generation**: Automatically create skeleton implementation classes
- New option: "Generate Implementation Stubs" (disabled by default)
- Generates class with NotImplementedException for methods
- Auto-implements properties with { get; set; }
- Configurable suffix for stub class names (default: "Implementation")
- Stubs placed in same Interfaces folder as the interface
- Preserves XML documentation from interface

### Changed

- Enhanced logging output with version number and detailed operation tracking
- Improved type declaration handling to support both classes and records uniformly
- Service method `AnalyzeClassesAsync` now accepts optional `projectDirectory` parameter for partial class scanning
- Better accessibility detection with `IsAccessible()` helper method
- Command execution now passes project directory to service for enhanced analysis

### Fixed

- Better handling of implicit internal accessibility for type declarations
- Improved project item addition for generated stub files
- More robust error handling during partial file analysis

### Technical Details

- Added `PreviewDialog.xaml` and `PreviewDialog.xaml.cs` for interface preview UI
- Added `IsPartial` and `IsRecord` properties to `ExtractedClassInfo`
- New `GenerateImplementationStub` method in `InterfaceExtractorService`
- New `AnalyzePartialClassFiles` private method for multi-file scanning
- Enhanced `ExtractPublicMembers` to handle both classes and records via `TypeDeclarationSyntax`
- Options model extended with 5 new settings

## [1.1.0] - 2025-10-18

### Added

- Comprehensive options page accessible through Tools → Options → Interface Extractor → General
- Support for operator overloads (optional, disabled by default)
- Custom file header templates with `{FileName}`, `{Date}`, `{Time}` placeholders
- Member sorting options (sort alphabetically by type and name)
- Member grouping options (group by Properties, Methods, Events, etc.)
- Configurable member separator lines (0-3 blank lines between members)
- "Add Using Directive" option for interface namespace imports
- "Warn If No 'I' Prefix" option for interface naming validation
- Automatic class update option (add interface to class declaration)

### Changed

- Moved configuration from hardcoded constants to user-editable options
- Improved namespace handling to avoid self-referencing using statements
- Enhanced interface generation with optional sorting and grouping
- Better documentation preservation for all member types

### Technical Details

- Added `OptionsPage.cs` with `GeneralOptionsPage` and `ExtractorOptions` classes
- Added `OptionsProvider` static class for options access throughout the extension
- Enhanced `InterfaceExtractorService` constructor to accept options
- Modified `GenerateInterface` to use template options
- Added support for `OperatorDeclarationSyntax` and `ConversionOperatorDeclarationSyntax`

## [1.0.0] - 2025-10-18

### Added

- Initial release of Interface Extractor extension
- Right-click context menu integration in Solution Explorer for .cs files
- Interactive member selection dialog with checkboxes
- Automatic interface name suggestion with 'I' prefix
- Support for extracting:
- Public methods (including generic methods with constraints)
- Public properties (with correct { get; set; } detection)
- Public events
- Public indexers
- XML documentation comment preservation
- Generic method constraint handling
- Automatic interface file creation in "Interfaces" subfolder
- Automatic namespace suffix (.Interfaces)
- File overwrite protection with Yes/No/Yes to All/No to All options
- Optional automatic class update to implement generated interface
- Detailed logging to Visual Studio Output Window
- Batch processing support for multiple files

### Technical Details

- Built on Visual Studio SDK 17.14
- Uses Microsoft.CodeAnalysis.CSharp (Roslyn) for syntax analysis
- Targets .NET Framework 4.8
- WPF-based user interface dialogs
- VSIX package format for distribution

### Known Limitations

- Only processes public, non-static members
- Does not analyze nested classes
- Partial classes: only processes current file
- Operator overloads not included by default

---

## Version Number Scheme

Interface Extractor follows [Semantic Versioning](https://semver.org/):

- **MAJOR** version for incompatible API changes
- **MINOR** version for new functionality in a backward compatible manner
- **PATCH** version for backward compatible bug fixes

Example: Version 1.2.0
- **1** = Major version (initial release)
- **2** = Minor version (new features: preview, partial classes, records, stubs, internal)
- **0** = Patch version (no patches yet for this minor version)
Loading