Skip to content

Commit

Permalink
fix: Indexers touching extension points
Browse files Browse the repository at this point in the history
  • Loading branch information
Oliver Nybroe committed May 31, 2023
1 parent 1ead810 commit dddf687
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
### Added
- Added pest file creation support

### Fixed
- Remove test sources filter lookup, as it breaks others plugins

## 1.9.3 - 2023-05-31

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

pluginGroup = com.pestphp
pluginName = PEST PHP
pluginVersion = 1.10.0-EAP.1
pluginVersion = 1.10.0

# See https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
# for insight into build numbers and IntelliJ Platform versions.
Expand Down
10 changes: 1 addition & 9 deletions src/main/kotlin/com/pestphp/pest/PhpTestFolderInputFilter.kt
Original file line number Diff line number Diff line change
@@ -1,19 +1,11 @@
package com.pestphp.pest

import com.intellij.openapi.project.ProjectManager
import com.intellij.openapi.roots.TestSourcesFilter
import com.intellij.openapi.vfs.VirtualFile
import com.intellij.util.indexing.DefaultFileTypeSpecificInputFilter
import com.jetbrains.php.lang.PhpFileType

open class PhpTestFolderInputFilter : DefaultFileTypeSpecificInputFilter(PhpFileType.INSTANCE) {
override fun acceptInput(file: VirtualFile): Boolean {
if (file.path.contains(""".*?test.*?/.*\..*""".toRegex())) {
return true
}

return ProjectManager.getInstance().openProjects.any {
TestSourcesFilter.isTestSources(file, it)
}
return file.path.contains(""".*?test.*?/.*\..*""".toRegex());
}
}

0 comments on commit dddf687

Please sign in to comment.