Commit Graph

235 Commits

Author SHA1 Message Date
Mikhail Glukhikh e37bfa13e3 Related to KT-20713: add test for find usages in script 2017-10-10 22:48:42 +03:00
Mikhail Glukhikh dd1ac5bb6b Add a set of tests for internal callables find usages
Related to KT-19811
2017-09-12 16:51:02 +03:00
Alexey Sedunov 994b6d687c Find Usages: Use MethodReferencesSearch to find constructor usages 2017-07-04 19:37:55 +03:00
Nikolay Krasko 44d3b8fb1a Ignore sub-queries for other operators with the same receiver (KT-18566)
ExpressionsOfTypeProcessor searches for all occurence of expression
with given type. It start from usages of the class, searches for sub-classes,
declarations that return those classes, usages of these declarations,
and so on.

During this search, find usages for all operators that return the
subject type is executed as sub-queries. Full search for such queries
can't give addition types. And it also shouldn't give additional scopes
for search, because same scopes should be located by operands. In other
words, if sub-query can spot the scope of usage starting from the same
type, the original query should also process same scope.

 #KT-18566 Fixed
2017-06-20 16:53:05 +03:00
Nikolay Krasko 60c8d5dcc0 Fix search usages for invoke() with vararg parameter (KT-18479)
#KT-18479 Fixed
2017-06-15 14:00:42 +03:00
Nikolay Krasko 018d4653e8 Fix search usages for invoke() extension operator (KT-18269)
#KT-18269 Fixed
2017-06-15 14:00:41 +03:00
Nikolay Krasko 0cd3e4f3a4 Minor: JetFile -> KtFile 2017-05-18 20:00:17 +03:00
Nikolay Krasko c0b545085a Search statics java declarations through star imports 2017-05-03 18:03:39 +03:00
Nikolay Krasko 2d51d72708 Use classes to increase search pattern for static declarations
Static common names like 'INSTANCE', 'create' can give many irrelevant
references in the project.

#KT-17000 Fixed
#KT-14974 Fixed
2017-05-03 18:03:39 +03:00
Nikolay Krasko 7ee58be515 Don't fall back to full search because of reference in fqname 2017-05-03 18:03:39 +03:00
Nikolay Krasko 111f0b1e66 Avoid full references search for languages without PsiClass (KT-14974)
Make smart type search work for Groovy.

 #KT-14974 Fixed
2017-04-21 15:12:07 +03:00
Nikolay Krasko 102310e3c2 Skip references for invoke when number of arguments in psi is wrong 2017-04-21 15:08:52 +03:00
Nikolay Krasko d3ff8c12a4 Use dialog wrapper for controlling behaviour from tests
Known issue: can't use same approach for modifying Java dialogs
behaviour
2017-04-21 15:08:40 +03:00
Nikolay Krasko eb941c75f9 Minor: check that invoke() usages search doesn't find overrides 2017-04-18 15:25:08 +03:00
Nikolay Krasko d0a26cf052 Log shifting to plain text search for tests 2017-04-18 15:25:08 +03:00
Nikolay Krasko 6e3016284a Test find usages behaviour when failing to text search on Groovy files
Set test directory to directory with test files (not relative to
findUsages folder). This way test will be configured as if all testdata
is under source root (previously it was copied into package under path
with findUsages) and resolvers will see classes under root package.

 #KT-14974 In Progress
2017-04-18 15:25:08 +03:00
Nikolay Krasko e1de0b9cd8 Fix bad language check in find usages that caused falling to text search 2017-04-18 15:25:08 +03:00
Dmitry Jemerov f255f2a1e0 Optimize isReferenceTo() when searching for PsiMethod usages
Avoid resolving references when we know from context that a reference
at given location can't resolve to a PsiMethod.
2017-03-30 15:33:11 +02:00
Alexey Sedunov eb9c775476 Navigation: Support NEW_AS_CONSTRUCTOR flag for constructor calls
#KT-15398 Fixed
 #KT-15536 Fixed
2017-03-19 17:20:24 +03:00
Alexey Sedunov 5e8cd654ec Find Usages: Fix processing of label references in 'return' expressions
#KT-7516 Fixed
2017-03-19 17:20:17 +03:00
Alexey Sedunov 59fe7444d1 Rename/Find Usages: Disable text occurrence search for KtParameter 2017-02-02 19:09:20 +03:00
Dmitry Jemerov 9594147c55 Find Usages checks that the signature of the method a property usage resolves to matches the signature of the method being searched
#KT-15291 Fixed
2017-02-02 12:44:54 +01:00
Dmitry Petrov e2b6d2d849 Drop 'propertyDelegated' convention (without additional deprecation ceremony). 2016-12-12 23:13:58 +03:00
Valentin Kipyatkov 29fe63d5a9 More correct code - ensure that equals works correctly! 2016-10-13 15:56:18 +03:00
Alexey Sedunov fe711da594 Rename: Rename do-while loop variables in the loop condition
#KT-14157 Fixed
2016-10-07 20:20:33 +03:00
Dmitry Jemerov 642027d790 fix find usages test 2016-10-04 22:20:54 +02:00
Valentin Kipyatkov af0b027952 All operator usages are searched with new searcher 2016-10-04 19:34:58 +03:00
Valentin Kipyatkov ba76e4d24d Quick search of getValue/setValue operator usages 2016-10-04 19:34:57 +03:00
Valentin Kipyatkov 75a6b0ca5a Quick search of iterator operator usages 2016-10-04 19:34:57 +03:00
Valentin Kipyatkov f2e5662154 Quick search of compareTo operator usages 2016-10-04 19:34:57 +03:00
Valentin Kipyatkov ee64a1a2b7 Quick search of equals operator usages 2016-10-04 19:34:57 +03:00
Alexey Sedunov 698660b9c6 Find Usages: Add special type for usages inside of type aliases
#KT-13955 Fixed
2016-09-27 13:27:54 +03:00
Alexey Sedunov 6e8bcb987a Minor: Add tests for KT-13759 2016-09-20 20:35:52 +03:00
Valentin Kipyatkov 8d16af41a9 Fixed test data 2016-09-07 19:04:48 +03:00
Valentin Kipyatkov 6d028fbcce Supported object value access expressions 2016-09-07 19:04:48 +03:00
Valentin Kipyatkov 82089da0cf Better test 2016-09-07 19:04:47 +03:00
Valentin Kipyatkov 5b638f51b0 Down-shift to plain search if reference in unknown language encountered 2016-09-07 19:04:46 +03:00
Valentin Kipyatkov a6a7075568 Fixed the case of public from private class inheritance in Java 2016-09-07 19:04:46 +03:00
Valentin Kipyatkov 904017eaff Covered case when variable of our type is multi-declaration entry 2016-09-07 19:04:46 +03:00
Valentin Kipyatkov d7a94ac470 Fixed find usages for Java's invoke() 2016-09-07 19:04:44 +03:00
Valentin Kipyatkov 478556890a KT-13605 Find Usages fails to find usages of component function defined in Java
#KT-13605 Fixed
2016-09-07 19:04:44 +03:00
Valentin Kipyatkov 0158ff46f3 Fixed operator references search for functions declared in Java 2016-09-07 19:04:43 +03:00
Valentin Kipyatkov f6fbd0b623 Fast search of contains operator 2016-09-07 19:04:43 +03:00
Valentin Kipyatkov 5ce780cafc Optimization 2016-09-07 19:04:43 +03:00
Valentin Kipyatkov 0f32574be0 Fast get/set operators search 2016-09-07 19:04:42 +03:00
Valentin Kipyatkov eeea85c86a Fast search of assignment operations 2016-09-07 19:04:42 +03:00
Valentin Kipyatkov cdf328475e Fast unary operators search 2016-09-07 19:04:42 +03:00
Valentin Kipyatkov 322df5b348 More correct operator treatment 2016-09-07 19:04:42 +03:00
Valentin Kipyatkov 43f8fbea2b More information in log 2016-09-07 19:04:41 +03:00
Valentin Kipyatkov e1c1c5fb59 Minor change in log 2016-09-07 19:04:41 +03:00