Find Files Owned by Owner Goal Implement a new CodeOwls feature called "Find Files Owned…
- User
Find Files Owned by Owner
Goal
Implement a new CodeOwls feature called "Find Files Owned by Owner".
The feature should allow users to select or right-click an owner inside a CODEOWNERS file and find all project files for which that owner is effectively responsible.
Example:
/src/** @developers /src/backend/** @backend-team /src/backend/payment/** @payment-teamWhen the user invokes the action on:
@backend-teamCodeOwls should show files for which
@backend-teamis part of the effective ownership, for example:src/backend/UserService.java src/backend/UserController.java src/backend/order/OrderService.javabut NOT:
src/backend/payment/PaymentService.javabecause the later
/src/backend/payment/** @payment-teamrule overrides the broader backend rule.The important distinction is:
Do not simply find rules containing the owner. Find files for which the selected owner is actually an effective CODEOWNERS owner.
Entry Point
Add a context action for valid owner tokens inside a CODEOWNERS file.
Preferred menu:
Right click @backend-team CodeOwls ├── Find Files Owned by @backend-team ├── Refactor Owner... └── ...Alternatively, integrate it into an existing CodeOwls owner context menu if one already exists.
The action should also be available through Find Action / Search Everywhere where appropriate.
If it integrates cleanly with the existing PSI implementation, investigate whether JetBrains' standard:
Alt+F7 / Find Usagescan invoke this functionality when the caret is on an owner.
However, this integration is optional.
The dedicated context-menu action is the primary requirement.
Supported Owner Types
The action should work for all owner types currently supported by CodeOwls, including where applicable:
@username @group/team email@example.com @@developer @@maintainer @@ownerDo not create a separate owner parser.
Reuse the existing CODEOWNERS PSI/token/model infrastructure.
The action must only be enabled when the selected element actually represents an owner.
- Assistant
I’ll trace the existing ownership, owner-token actions, file enumeration, and native results UI before making a focused implementation.
- Assistant
The worktree already contains broad unrelated modifications, so I’ll limit edits to new feature files and narrowly integrate with the current versions of shared files.
- Assistant
The shared resolver already implements last-match-wins and inherited owners; the missing pieces are exposing its governing CODEOWNERS context, reusable scoped file enumeration, and a cancellable native results presentation.
- Assistant
I’m implementing the search as a cancellable background read task, filtering exact owner tokens against
CodeownersService.resolveOwnership, then publishing navigableUsageentries in JetBrains’ Usage View. - Assistant
Compilation is blocked only by the shell’s Java 11 default; I’ll use the project’s downloaded IntelliJ JBR and continue with targeted compile/test validation.
- Assistant
The core feature and coverage are in place; I’m now validating API compatibility and the effective-ownership cases before running the requested full build.
- Assistant
The resolver tests pass; the failures isolate to
ProjectFileIndex.iterateContentUnderDirectoryreturning no fixture files. I’ll switch the search to the plugin’s existing repository walker—the same source used by matched-file navigation and inlay counts—while retaining background cancellation. - Assistant
Targeted tests, the full build, and plugin verification now pass. I’m doing a final diff/API review to ensure only the intended feature surfaces changed.
- Assistant
Implemented “Find Files Owned by Owner.”
- Context action supports user, team, email, GitLab role, and section owners.
- Uses centralized
CodeownersService.resolveOwnership()for last-match-wins, multiple owners, inheritance, overrides, and unsaved edits. - Reuses the existing repository walker from
CodeownersMatchCounter. - Runs cancellably in the background and displays navigable native Usage View results with totals.
- Added 20 tests covering ownership, overrides, sections, scope, negation, token identity, and modifications.
- Added 7 files; updated the resolver, owner-action targeting, file enumeration, and
plugin.xml. - Alt+F7 integration was deferred because CODEOWNERS intentionally has no semantic owner PSI elements.
Validation: targeted tests,
./gradlew build, and./gradlew verifyPluginpass. Plugin verification reports only four pre-existing deprecated API usages. - User
Acceptance Criteria
The feature is complete when:
- I can right-click a valid owner in CODEOWNERS.
- The menu contains Find Files Owned by
<owner>. - The action works for all currently supported owner types.
- The result contains files for which the selected owner is effectively responsible.
- Overridden rules do not produce false-positive files.
- GitLab section-inherited owners are handled correctly.
- Multiple owners per rule are handled correctly.
- Results are displayed using an appropriate native JetBrains UI.
- Files can be opened directly from the results.
- The total number of owned files is visible.
- Large searches do not block the EDT.
- The search uses the same ownership semantics as Explain Ownership and the status bar.
- Changes made through Refactor Owner or Add CODEOWNERS Entry are reflected correctly.
- Existing CodeOwls functionality remains unchanged.
- Automated tests cover effective ownership, overrides, sections, and edge cases.
- User
Implementation Process
Before writing code:
- Inspect the existing owner PSI/model.
- Inspect the existing ownership resolver.
- Inspect Explain Ownership.
- Inspect the status bar ownership lookup.
- Inspect matched-file gutter navigation.
- Inspect file-count inlay hints.
- Inspect GitLab section inheritance.
- Inspect project/repository file enumeration.
- Inspect existing context-menu action registration.
- Check whether the project already uses JetBrains Usage View / Find Usages APIs.
Then briefly determine which existing components can be reused.
Implement the feature using those components.
Avoid:
- duplicate glob matching
- duplicate ownership resolution
- plain-text owner matching
- synchronous repository scanning on the EDT
- unrelated architectural refactoring
- User
Tests
Add automated tests covering at least:
- owner with one effectively owned file
- owner with multiple files
- owner with no files
- broader rule overridden by later specific rule
- completely shadowed owner rule
- multiple owners on one rule
- similar owner names such as
@aliceand@alice-team - email owner
- GitLab role owner if supported
- GitLab section default owner
- GitLab inherited owner
- explicit rule owner overriding section owner
- multiple GitLab sections
- owner appearing in several different rules
- files outside the relevant project scope are ignored
- exact-file rules
- wildcard rules
- directory rules
- GitLab negation patterns if supported
- ownership changes are reflected after document modification
Also verify that existing ownership-resolution, matching, and GitLab-section tests continue to pass.
- User
Interaction With Add CODEOWNERS Entry
Given:
/src/** @backend-teamand the user adds:
/src/payment/PaymentService.java @payment-teamusing Add CODEOWNERS Entry, then:
Find Files Owned by @backend-teammust no longer include
PaymentService.java.And:
Find Files Owned by @payment-teammust include it.
Again, this should happen naturally through the shared ownership resolver.
- User
Interaction With Refactor Owner
After:
@backend-teamis refactored to:
@platform-teamusing the existing Refactor Owner feature, the search should immediately reflect the updated CODEOWNERS state.
No stale ownership data should remain.
Reuse existing cache invalidation mechanisms.
- User
Interaction With Explain Ownership
The search results should be consistent with Explain Ownership.
For every file returned by:
Find Files Owned by @backend-teamrunning:
Explain Ownershipon that file must show
@backend-teamas one of its effective owners.This is an important consistency requirement.
- User
Shared Ownership Resolver
While implementing this feature, inspect whether ownership calculation is currently duplicated between features.
Ideally:
Status Bar │ Explain Ownership │ Find Files Owned By │ Add CODEOWNERS Entry validation │ ▼ OwnershipResolver │ ▼ EffectiveOwnershipDo not perform a large unrelated refactoring, but extract common logic if necessary to guarantee that all features agree about effective ownership.
- User
Suggested Architecture
Inspect the existing project architecture first.
A possible design could be:
FindFilesOwnedByOwnerAction ↓ selected Owner PSI ↓ OwnershipSearchService ↓ project files ↓ OwnershipResolver ↓ EffectiveOwnership ↓ Usage ViewFor example:
class OwnershipSearchService { List<VirtualFile> findFilesOwnedBy( Project project, CodeOwnersOwner owner ); }For performance/cancellation, however, a callback, processor, sequence, or JetBrains query abstraction may be more appropriate than returning a complete
List.Follow existing project conventions.
- User
Owner Identity
Owner comparison should use the same semantics as the rest of CodeOwls.
For example:
@alicemust not accidentally match:
@alice-team @alice2Similarly:
alice@example.commust be treated as a complete owner token.
If CodeOwls already has an owner model/value object, use it instead of comparing arbitrary substrings.
- User
Possible Optimization
A naive implementation could be:
for every project file: ownership = resolveOwnership(file) if ownership.contains(selectedOwner): add resultThis is acceptable as a first implementation if:
- it runs in the background
- existing caching is reused
- performance is reasonable
However, inspect whether existing CodeOwls indexes/caches can reduce the amount of work.
For example, it may be possible to first determine which rules could produce the selected owner and then evaluate their matched files.
Be careful:
Filtering only rules containing the owner is NOT sufficient because GitLab section inheritance may provide owners implicitly.
Correctness is more important than premature optimization.
- User
Reuse Existing Matching Infrastructure
Before implementing anything new, inspect the existing implementation of:
Matched-file navigation
CodeOwls already supports:
A gutter icon on wildcard/directory rules lists the project files matched by that rule.
This likely contains useful infrastructure for:
- enumerating project files
- matching CODEOWNERS patterns
- opening/navigating to VirtualFiles
Reuse or extract shared functionality where appropriate.
File-count inlay hints
CodeOwls already displays:
the number of files each glob rule matches
Inspect this implementation as well.
Do not introduce another repository scanning implementation if this functionality already exists.
- User
Performance
Repositories may contain tens or hundreds of thousands of files.
The implementation must therefore avoid expensive work on the EDT.
Do NOT:
iterate all project files ↓ resolve every rule ↓ block the UIon the Event Dispatch Thread.
Use appropriate JetBrains background-task APIs.
Show progress where appropriate.
The search should be cancellable for large repositories if JetBrains infrastructure supports it.
Conceptually:
User invokes action ↓ Background Task ↓ Enumerate relevant project files ↓ Resolve effective ownership ↓ Filter by selected owner ↓ Display results on UI threadFollow existing CodeOwls threading conventions.
- User
Empty Result
If the owner currently owns no files, show a clear result:
No files are effectively owned by @backend-team.This can happen even when the owner occurs inside CODEOWNERS.
For example:
/src/** @backend-team /src/** @platform-teamIf the second rule completely overrides the first,
@backend-teammay appear in CODEOWNERS but effectively own no files.This distinction is intentional and important.
- User
Optional Grouping
If supported naturally by the JetBrains result component, allow results to be grouped by directory.
Example:
@backend-team — 183 files src/backend/ UserService.java UserController.java src/api/ UserApi.java AdminApi.java src/database/ UserRepository.javaDo not build custom grouping infrastructure if JetBrains already provides it.
- User
Result Information
Each result should at minimum contain:
file pathIf reasonably easy with the existing architecture, also expose:
effective CODEOWNERS rule sectionFor example:
src/backend/UserService.java /src/backend/** @backend-teamDo not overload the initial implementation with unnecessary information.
The primary purpose is navigating to effectively owned files.
- User
Results UI
Prefer a native JetBrains result UI.
Ideally use the same infrastructure as:
- Find Usages
- Usage View
- Search Results
Conceptual result:
Files owned by @backend-team src/backend ├── UserController.java ├── UserService.java ├── OrderService.java └── repository └── UserRepository.java 4 filesThe user should be able to:
- see all matching files
- see the total number of files
- double-click a result to open the file
- use normal JetBrains result navigation
Prefer JetBrains-native search/usage infrastructure over implementing a custom popup with a large file list.
If Usage View is unsuitable for this use case, use an equivalent native JetBrains component.
- User
Search Scope
Search within the project/repository associated with the current CODEOWNERS file.
Do not accidentally search:
- IDE configuration files outside the repository
- external libraries
- SDK files
- build caches
- unrelated content roots
Reuse the same project-file enumeration or scope logic already used by CodeOwls' existing:
- matched-file navigation
- file-count inlay hints
- ownership suggestions
- CODEOWNERS matching
If CodeOwls already has a service for determining project files relevant to CODEOWNERS, use it.
- User
Explicit Owner Overrides
Given:
[Backend] @backend-team /src/backend/** /src/backend/payment/** @payment-teamfiles matched by:
/src/backend/**should appear for
@backend-team.Files whose effective rule is:
/src/backend/payment/** @payment-teamshould not appear for
@backend-teamif explicit rule owners override the section default according to the existing CodeOwls/GitLab semantics.Reuse the existing GitLab section resolution logic.
- User
GitLab Sections
CodeOwls already supports GitLab CODEOWNERS sections.
The feature must respect their semantics.
Example:
[Backend] @backend-team /src/backend/** /src/api/**If these rules inherit
@backend-team, searching for:@backend-teammust include files matched by those rules.
The owner does not have to be explicitly present on every rule.
- User
Multiple Owners
A rule can contain multiple owners:
/src/backend/** @backend-team @alice backend@example.comAll three owners effectively own matching files.
Searching for any of:
@backend-team @alice backend@example.comshould return those files.
Do not treat the first owner as special.
- User
Effective Ownership
This is the most important requirement.
Given:
/src/** @developers /src/backend/** @backend-team /src/backend/payment/** @payment-teamthe file:
src/backend/UserService.javais effectively owned by:
@backend-teamwhile:
src/backend/payment/PaymentService.javais effectively owned by:
@payment-teamSearching for files owned by
@backend-teammust therefore NOT includePaymentService.java.Reuse the exact same ownership resolution logic currently used by:
- Explain Ownership
- the status bar widget
- existing CODEOWNERS matching
- GitLab section inheritance
There must not be a separate implementation of CODEOWNERS precedence for this feature.
Ideally there should be one central API conceptually similar to:
EffectiveOwnership resolveOwnership(VirtualFile file)which can be reused by all features.
- User
Supported Owner Types
The action should work for all owner types currently supported by CodeOwls, including where applicable:
@username @group/team email@example.com @@developer @@maintainer @@ownerDo not create a separate owner parser.
Reuse the existing CODEOWNERS PSI/token/model infrastructure.
The action must only be enabled when the selected element actually represents an owner.
Do not enable it for:
- patterns
- comments
- section names
- approval counts
- whitespace
- arbitrary text
- User
Entry Point
Add a context action for valid owner tokens inside a CODEOWNERS file.
Preferred menu:
Right click @backend-team CodeOwls ├── Find Files Owned by @backend-team ├── Refactor Owner... └── ...Alternatively, integrate it into an existing CodeOwls owner context menu if one already exists.
The action should also be available through Find Action / Search Everywhere where appropriate.
If it integrates cleanly with the existing PSI implementation, investigate whether JetBrains' standard:
Alt+F7 / Find Usagescan invoke this functionality when the caret is on an owner.
However, this integration is optional.
The dedicated context-menu action is the primary requirement.
- User
Find Files Owned by Owner
Goal
Implement a new CodeOwls feature called "Find Files Owned by Owner".
The feature should allow users to select or right-click an owner inside a CODEOWNERS file and find all project files for which that owner is effectively responsible.
Example:
/src/** @developers /src/backend/** @backend-team /src/backend/payment/** @payment-teamWhen the user invokes the action on:
@backend-teamCodeOwls should show files for which
@backend-teamis part of the effective ownership, for example:src/backend/UserService.java src/backend/UserController.java src/backend/order/OrderService.javabut NOT:
src/backend/payment/PaymentService.javabecause the later
/src/backend/payment/** @payment-teamrule overrides the broader backend rule.The important distinction is:
Do not simply find rules containing the owner. Find files for which the selected owner is actually an effective CODEOWNERS owner.
- User
Acceptance Criteria
The feature is complete when:
- I can right-click a valid owner in CODEOWNERS.
- The menu contains Find Files Owned by
<owner>. - The action works for all currently supported owner types.
- The result contains files for which the selected owner is effectively responsible.
- Overridden rules do not produce false-positive files.
- GitLab section-inherited owners are handled correctly.
- Multiple owners per rule are handled correctly.
- Results are displayed using an appropriate native JetBrains UI.
- Files can be opened directly from the results.
- The total number of owned files is visible.
- Large searches do not block the EDT.
- The search uses the same ownership semantics as Explain Ownership and the status bar.
- Changes made through Refactor Owner or Add CODEOWNERS Entry are reflected correctly.
- Existing CodeOwls functionality remains unchanged.
- Automated tests cover effective ownership, overrides, sections, and edge cases.
- User
Implementation Process
Before writing code:
- Inspect the existing owner PSI/model.
- Inspect the existing ownership resolver.
- Inspect Explain Ownership.
- Inspect the status bar ownership lookup.
- Inspect matched-file gutter navigation.
- Inspect file-count inlay hints.
- Inspect GitLab section inheritance.
- Inspect project/repository file enumeration.
- Inspect existing context-menu action registration.
- Check whether the project already uses JetBrains Usage View / Find Usages APIs.
Then briefly determine which existing components can be reused.
Implement the feature using those components.
Avoid:
- duplicate glob matching
- duplicate ownership resolution
- plain-text owner matching
- synchronous repository scanning on the EDT
- unrelated architectural refactoring
- User
Tests
Add automated tests covering at least:
- owner with one effectively owned file
- owner with multiple files
- owner with no files
- broader rule overridden by later specific rule
- completely shadowed owner rule
- multiple owners on one rule
- similar owner names such as
@aliceand@alice-team - email owner
- GitLab role owner if supported
- GitLab section default owner
- GitLab inherited owner
- explicit rule owner overriding section owner
- multiple GitLab sections
- owner appearing in several different rules
- files outside the relevant project scope are ignored
- exact-file rules
- wildcard rules
- directory rules
- GitLab negation patterns if supported
- ownership changes are reflected after document modification
Also verify that existing ownership-resolution, matching, and GitLab-section tests continue to pass.
- User
Interaction With Add CODEOWNERS Entry
Given:
/src/** @backend-teamand the user adds:
/src/payment/PaymentService.java @payment-teamusing Add CODEOWNERS Entry, then:
Find Files Owned by @backend-teammust no longer include
PaymentService.java.And:
Find Files Owned by @payment-teammust include it.
Again, this should happen naturally through the shared ownership resolver.
- User
Interaction With Refactor Owner
After:
@backend-teamis refactored to:
@platform-teamusing the existing Refactor Owner feature, the search should immediately reflect the updated CODEOWNERS state.
No stale ownership data should remain.
Reuse existing cache invalidation mechanisms.
- User
Interaction With Explain Ownership
The search results should be consistent with Explain Ownership.
For every file returned by:
Find Files Owned by @backend-teamrunning:
Explain Ownershipon that file must show
@backend-teamas one of its effective owners.This is an important consistency requirement.
- User
Shared Ownership Resolver
While implementing this feature, inspect whether ownership calculation is currently duplicated between features.
Ideally:
Status Bar │ Explain Ownership │ Find Files Owned By │ Add CODEOWNERS Entry validation │ ▼ OwnershipResolver │ ▼ EffectiveOwnershipDo not perform a large unrelated refactoring, but extract common logic if necessary to guarantee that all features agree about effective ownership.
- User
Suggested Architecture
Inspect the existing project architecture first.
A possible design could be:
FindFilesOwnedByOwnerAction ↓ selected Owner PSI ↓ OwnershipSearchService ↓ project files ↓ OwnershipResolver ↓ EffectiveOwnership ↓ Usage ViewFor example:
class OwnershipSearchService { List<VirtualFile> findFilesOwnedBy( Project project, CodeOwnersOwner owner ); }For performance/cancellation, however, a callback, processor, sequence, or JetBrains query abstraction may be more appropriate than returning a complete
List.Follow existing project conventions.
- User
Owner Identity
Owner comparison should use the same semantics as the rest of CodeOwls.
For example:
@alicemust not accidentally match:
@alice-team @alice2Similarly:
alice@example.commust be treated as a complete owner token.
If CodeOwls already has an owner model/value object, use it instead of comparing arbitrary substrings.
- User
Possible Optimization
A naive implementation could be:
for every project file: ownership = resolveOwnership(file) if ownership.contains(selectedOwner): add resultThis is acceptable as a first implementation if:
- it runs in the background
- existing caching is reused
- performance is reasonable
However, inspect whether existing CodeOwls indexes/caches can reduce the amount of work.
For example, it may be possible to first determine which rules could produce the selected owner and then evaluate their matched files.
Be careful:
Filtering only rules containing the owner is NOT sufficient because GitLab section inheritance may provide owners implicitly.
Correctness is more important than premature optimization.
- User
Reuse Existing Matching Infrastructure
Before implementing anything new, inspect the existing implementation of:
Matched-file navigation
CodeOwls already supports:
A gutter icon on wildcard/directory rules lists the project files matched by that rule.
This likely contains useful infrastructure for:
- enumerating project files
- matching CODEOWNERS patterns
- opening/navigating to VirtualFiles
Reuse or extract shared functionality where appropriate.
File-count inlay hints
CodeOwls already displays:
the number of files each glob rule matches
Inspect this implementation as well.
Do not introduce another repository scanning implementation if this functionality already exists.
- User
Performance
Repositories may contain tens or hundreds of thousands of files.
The implementation must therefore avoid expensive work on the EDT.
Do NOT:
iterate all project files ↓ resolve every rule ↓ block the UIon the Event Dispatch Thread.
Use appropriate JetBrains background-task APIs.
Show progress where appropriate.
The search should be cancellable for large repositories if JetBrains infrastructure supports it.
Conceptually:
User invokes action ↓ Background Task ↓ Enumerate relevant project files ↓ Resolve effective ownership ↓ Filter by selected owner ↓ Display results on UI threadFollow existing CodeOwls threading conventions.
- User
Empty Result
If the owner currently owns no files, show a clear result:
No files are effectively owned by @backend-team.This can happen even when the owner occurs inside CODEOWNERS.
For example:
/src/** @backend-team /src/** @platform-teamIf the second rule completely overrides the first,
@backend-teammay appear in CODEOWNERS but effectively own no files.This distinction is intentional and important.
- User
Optional Grouping
If supported naturally by the JetBrains result component, allow results to be grouped by directory.
Example:
@backend-team — 183 files src/backend/ UserService.java UserController.java src/api/ UserApi.java AdminApi.java src/database/ UserRepository.javaDo not build custom grouping infrastructure if JetBrains already provides it.
- User
Result Information
Each result should at minimum contain:
file pathIf reasonably easy with the existing architecture, also expose:
effective CODEOWNERS rule sectionFor example:
src/backend/UserService.java /src/backend/** @backend-teamDo not overload the initial implementation with unnecessary information.
The primary purpose is navigating to effectively owned files.
- User
Results UI
Prefer a native JetBrains result UI.
Ideally use the same infrastructure as:
- Find Usages
- Usage View
- Search Results
Conceptual result:
Files owned by @backend-team src/backend ├── UserController.java ├── UserService.java ├── OrderService.java └── repository └── UserRepository.java 4 filesThe user should be able to:
- see all matching files
- see the total number of files
- double-click a result to open the file
- use normal JetBrains result navigation
Prefer JetBrains-native search/usage infrastructure over implementing a custom popup with a large file list.
If Usage View is unsuitable for this use case, use an equivalent native JetBrains component.
- User
Search Scope
Search within the project/repository associated with the current CODEOWNERS file.
Do not accidentally search:
- IDE configuration files outside the repository
- external libraries
- SDK files
- build caches
- unrelated content roots
Reuse the same project-file enumeration or scope logic already used by CodeOwls' existing:
- matched-file navigation
- file-count inlay hints
- ownership suggestions
- CODEOWNERS matching
If CodeOwls already has a service for determining project files relevant to CODEOWNERS, use it.
- User
Explicit Owner Overrides
Given:
[Backend] @backend-team /src/backend/** /src/backend/payment/** @payment-teamfiles matched by:
/src/backend/**should appear for
@backend-team.Files whose effective rule is:
/src/backend/payment/** @payment-teamshould not appear for
@backend-teamif explicit rule owners override the section default according to the existing CodeOwls/GitLab semantics.Reuse the existing GitLab section resolution logic.
- User
GitLab Sections
CodeOwls already supports GitLab CODEOWNERS sections.
The feature must respect their semantics.
Example:
[Backend] @backend-team /src/backend/** /src/api/**If these rules inherit
@backend-team, searching for:@backend-teammust include files matched by those rules.
The owner does not have to be explicitly present on every rule.
- User
Multiple Owners
A rule can contain multiple owners:
/src/backend/** @backend-team @alice backend@example.comAll three owners effectively own matching files.
Searching for any of:
@backend-team @alice backend@example.comshould return those files.
Do not treat the first owner as special.
- User
Effective Ownership
This is the most important requirement.
Given:
/src/** @developers /src/backend/** @backend-team /src/backend/payment/** @payment-teamthe file:
src/backend/UserService.javais effectively owned by:
@backend-teamwhile:
src/backend/payment/PaymentService.javais effectively owned by:
@payment-teamSearching for files owned by
@backend-teammust therefore NOT includePaymentService.java.Reuse the exact same ownership resolution logic currently used by:
- Explain Ownership
- the status bar widget
- existing CODEOWNERS matching
- GitLab section inheritance
There must not be a separate implementation of CODEOWNERS precedence for this feature.
Ideally there should be one central API conceptually similar to:
EffectiveOwnership resolveOwnership(VirtualFile file)which can be reused by all features.
- User
Supported Owner Types
The action should work for all owner types currently supported by CodeOwls, including where applicable:
@username @group/team email@example.com @@developer @@maintainer @@ownerDo not create a separate owner parser.
Reuse the existing CODEOWNERS PSI/token/model infrastructure.
The action must only be enabled when the selected element actually represents an owner.
Do not enable it for:
- patterns
- comments
- section names
- approval counts
- whitespace
- arbitrary text
- User
Entry Point
Add a context action for valid owner tokens inside a CODEOWNERS file.
Preferred menu:
Right click @backend-team CodeOwls ├── Find Files Owned by @backend-team ├── Refactor Owner... └── ...Alternatively, integrate it into an existing CodeOwls owner context menu if one already exists.
The action should also be available through Find Action / Search Everywhere where appropriate.
If it integrates cleanly with the existing PSI implementation, investigate whether JetBrains' standard:
Alt+F7 / Find Usagescan invoke this functionality when the caret is on an owner.
However, this integration is optional.
The dedicated context-menu action is the primary requirement.
- User
Update the plugin.xml with all the missing features
- Assistant
I’ll compare the plugin description and registrations against the implemented feature packages, then update only the missing
plugin.xmlentries. - Assistant
Updated
plugin.xmlto document the missing features:- Explain Ownership
- Add CODEOWNERS Entry
- Owner Refactoring, including
Shift+F6
No validation needed for this description-only change.
- User
Update the plugin.xml with all the missing features