[SOLVED] Find usages with "search for text occurrences" does not find occurrences in comments
已回答
PhpStorm 2018.3.5
Build #PS-183.5912.26, built on March 7, 2019
JRE: 1.8.0_152-release-1343-b28 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0
Example:
Usage search for "MyConstant" would not return the comment position even when executed with the enabled "search for text occurrences" option:
class MyClass {
/**
* @CUSTOM_ANNOTATION: ClassWithConstant::MyConstant
*/
private $property;
}
class ClassWithConstant {
const MyConstant = 1;
}
请先登录再写评论。
Please use @uses ClassWithConstant::MyConstant annotation instead: https://youtrack.jetbrains.com/issue/WI-23177
Thanks, works fine. I have to add @uses as an additional annotation tho, because @CUSTOM_ANNOTATION was just a placeholder for some custom annotations we use for parsing class properties by reflection and therefore can't be removed.
Cool, thanks for letting me know.