File tree Expand file tree Collapse file tree 4 files changed +6
-6
lines changed
src/main/kotlin/org/domaframework/doma/intellij Expand file tree Collapse file tree 4 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ class PsiParentClass(
4949
5050 fun searchField (fieldName : String ): List <PsiField >? =
5151 fields?.filter { f ->
52- f.name.contains (fieldName) &&
52+ f.name.startsWith (fieldName) &&
5353 PropertyModifyUtil .filterPrivateField(f, type)
5454 }
5555
@@ -80,7 +80,7 @@ class PsiParentClass(
8080 fields
8181 ?.filter { f ->
8282 f.hasModifierProperty(PsiModifier .STATIC ) &&
83- f.name.contains (fieldName) &&
83+ f.name.startsWith (fieldName) &&
8484 PropertyModifyUtil .filterPrivateField(f, type)
8585 }
8686
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ class PercentDirectiveHandler(
4848 " for" ,
4949 " !" ,
5050 ).filter {
51- it.contains (bind)
51+ it.startsWith (bind)
5252 }.map {
5353 LookupElementBuilder
5454 .create(it)
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ val PsiClass.psiClassType: PsiClassType
2929fun PsiClass.searchStaticField (searchName : String ): Array <PsiField > =
3030 this .allFields
3131 .filter {
32- it.name.contains (searchName) &&
32+ it.name.startsWith (searchName) &&
3333 it.hasModifierProperty(PsiModifier .STATIC ) &&
3434 PropertyModifyUtil .filterPrivateField(it, this .psiClassType)
3535 }.toTypedArray()
@@ -44,7 +44,7 @@ fun PsiClass.findStaticField(searchName: String): PsiField? =
4444fun PsiClass.searchStaticMethod (searchName : String ): Array <PsiMethod > =
4545 this .allMethods
4646 .filter {
47- it.name.contains (searchName) &&
47+ it.name.startsWith (searchName) &&
4848 it.hasModifierProperty(PsiModifier .STATIC ) &&
4949 it.hasModifierProperty(PsiModifier .PUBLIC )
5050 }.toTypedArray()
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ fun PsiMethod.findParameter(searchName: String): PsiParameter? = this.methodPara
2424val PsiMethod .methodParameters: List <PsiParameter >
2525 get() = this .parameterList.parameters.toList()
2626
27- fun PsiMethod.searchParameter (searchName : String ): List <PsiParameter > = this .methodParameters.filter { it.name.contains (searchName) }
27+ fun PsiMethod.searchParameter (searchName : String ): List <PsiParameter > = this .methodParameters.filter { it.name.startsWith (searchName) }
2828
2929@OptIn(ExperimentalStdlibApi ::class )
3030fun PsiMethod.getDomaAnnotationType (): DomaAnnotationType {
You can’t perform that action at this time.
0 commit comments