Comments (1)
The issue is that com.github.fantom.codeowners.search.CodeownersSearchScopeDescriptor#getScope
is called from com.intellij.structuralsearch.plugin.ui.ScopePanel#SCOPE_FILTER
, to filter out some scopes. It doesn't affect Class Hierarchy
scope the same way it affects mine, because this scope is filtered out by name:
private static final Condition<ScopeDescriptor> SCOPE_FILTER =
(ScopeDescriptor descriptor) -> IdeBundle.message("scope.class.hierarchy").equals(descriptor.getDisplayName()) ||
!(descriptor.getScope() instanceof ModuleWithDependenciesScope); // don't show module scope
It is not triggered when using "Find in Files" because it uses a different flow, where similar filter doesn't invoke getScope
:
// com.intellij.find.impl.FindPopupScopeUIImpl#initComponents
myScopeCombo.init(myProject, true, true, selection, new Condition<>() {
//final String projectFilesScopeName = PsiBundle.message("psi.search.scope.project");
final String moduleFilesScopeName;
{
String moduleScopeName = IndexingBundle.message("search.scope.module", "");
final int ind = moduleScopeName.indexOf(' ');
moduleFilesScopeName = moduleScopeName.substring(0, ind + 1);
}
@Override
public boolean value(ScopeDescriptor descriptor) {
final String display = descriptor.getDisplayName();
return /*!projectFilesScopeName.equals(display) &&*/ !display.startsWith(moduleFilesScopeName);
}
});
As we can see, ModuleWithDependenciesScope
is filtered out using just name, without scope instantiation.
There are other extension points other than com.intellij.scopeDescriptorProvider
to implement scopes: com.intellij.searchScopesProvider
and com.intellij.customScopesProvider
, but neither of them is designed for scopes, that require showing custom UI to define the scope, and the only builtin scope with such UI is carefully handled in the code (hardcoded)
from intellij-codeowners.
Related Issues (20)
- Git commit check to verify that all files are in CODEOWNERS
- Trailing spaces break CODEOWNERS file parsing HOT 1
- Show ownership changes in changed files
- Resilient parsing
- NullPointerException at CodeownersChangesGroupingPolicy.getParentNodeFor HOT 1
- Infinite Indexing Loop in Intellij 2023.3 HOT 5
- Long codowners list in a grouping tree is rendered with glitches HOT 1
- Duplicates in file trees, grouped by codeowner
- AssertionError when closing a project
- Exception when renaming java package directory
- Show ownership change in Pull Request view file tree
- `NullPointerException: getParent(...) must not be null` HOT 1
- Exception when opening "Search structurally" in a freshly opened project
- Empty groups when grouping by CODEOWNERS and java module in PR tree
- Please add support for 2024.1 HOT 1
- com.intellij.openapi.progress.CeProcessCanceledException: com.intellij.openapi.progress.IndicatorCancellationException
- Double asterisk in the ownership rule doesn't accept zero nesting
- Feature request: Allow to configure path to CODEOWNERS file
- Incorrect reference to the CODEOWNERS location for unset rule
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from intellij-codeowners.