Commit Graph
768 Commits
Author SHA1 Message Date
Anna Kozlova 2c5117ba22 completion: presume fresh variables have always low bounds during completion
IDEA-190041
2018-06-01 11:12:35 +03:00
Anna Kozlova a97212d845 completion: infer ? super for inference variables with lower bounds
IDEA-45672
2018-05-30 16:31:02 +03:00
peter 4023a46c83 IDEA-192209 'final' modifier appeared almost in the end of autocompletion list in case of a beginning line with already defined variable 2018-05-18 09:53:00 +02:00
peter 987368ccfd IDEA-191883 "Tab" completion doesn't work as expected for inner classes 2018-05-16 18:35:13 +02:00
peter 0c70c63d0a IDEA-191500 Inappropriate 'Enum.valueOf()' Smart Type suggestion 2018-05-08 17:52:11 +02:00
peter 0607536f02 make entering class literals in method calls easier during smart completion (IDEA-162394)
sort class literals by class proximity
process closest (imported) inheritors first
2018-05-07 10:19:33 +02:00
peter df915d8685 IDEA-188425 Add getInstance option in completion popup 2018-05-02 11:37:04 +02:00
peter 21d46114ee java completion: prefer similar names with mismatching case (IDEA-188085) 2018-04-30 19:56:55 +02:00
peter d970993b43 java completion: suggest AbstractClass::new[] (IDEA-188431) 2018-04-24 16:56:12 +02:00
Dmitry Jemerov e5ddee0216 API for handling selected completion item actually works; added test
IDEA-CR-31904
2018-04-19 15:18:31 +02:00
peter e45f94c07d java completion: don't deselect TreeMap (IDEA-189544)
it wasn't preselected because there were 8 signatures "to implement",
coming from Map default methods
2018-04-17 18:12:28 +02:00
peter 02b032eca2 IDEA-189603 Multi-parameter completion overwrites code if there is no closing parenthesis 2018-04-11 08:52:22 +02:00
Tagir Valeev 5fe4a9b691 GuessManagerImpl: box values on fast-path; disable DFA on primitive types at all
Fixes IDEA-189340 Does not show Number methods during auto completion
2018-04-05 11:46:42 +07:00
Tagir Valeev f566678742 TypeConstraint#withSupers: fixed SOE on circular hierarchy (IDEA-CR-31134) 2018-04-03 10:02:14 +07:00
Tagir Valeev ea96b276bb TypeConstraint: fix deep hierarchy union (IDEA-CR-31134) 2018-03-30 13:30:43 +07:00
Tagir Valeev c7f7093a96 IDEA-86242 Code completion do not suggest members of known common supertype 2018-03-28 10:33:02 +07:00
Tagir Valeev 43b86a988e CodeEditUtil#removeChildren: fixed nextLeaf determination
Before when removing more than one element, nextLeaf was invalid as well. The invalidation check below did not work as parent might still exist (element might be relinked to dummy file)

Fixes IDEA-187531 "Add on demand static import" with intervening comment and an empty line breaks code
2018-03-03 15:47:21 +07:00
peter feeb53394c java completion: put signature suggestions below all types (IDEA-187504, IDEA-CR-28091) 2018-03-01 17:34:26 +01:00
peter 131f679016 IDEA-186789 Completion in empty java file doesn't suggest access modifiers 2018-02-16 18:18:53 +01:00
peter f8b88fec42 java completion: don't always cast qualifier when return type is narrowed (IDEA-186652, IDEA-186609)
only when that narrowed type is expected
2018-02-14 22:12:48 +01:00
peter 17e8c2a7c0 IDEA-186293 Smart completion fails when invoked in context of call of inaccessible method 2018-02-08 13:08:39 +01:00
peter d8762e94d8 cast qualifier when return type is narrowed (IDEA-185364) 2018-02-05 19:07:26 +01:00
Tagir Valeev 1e0612c56a AssignmentTwicePreciseTypeDfa test fixed (imports restored) 2018-01-30 09:54:02 +07:00
Tagir Valeev d0f2bde3a8 GuessManagerImpl: type inference fixes 2018-01-29 16:40:51 +07:00
Tagir Valeev 97aa63f410 GuessManagerImpl: do not run DFA if all assignments/initializations have the same r-value type
Fixes IDEA-185290 Too long time takes filling of Ctrl+Space list. (fast code insertion)
2018-01-29 16:12:55 +07:00
Tagir Valeev 6cb1553fdf JavaCompletionUtil: do not add an unnecessary cast if hierarchy signature has several levels
Fixes IDEA-185554 Redundant cast on autocompletion
2018-01-26 15:07:46 +07:00
peter 80875741b8 IDEA-174659 Autocomplete generic parameters according to type restriction 2018-01-10 15:11:03 +01:00
peter e230b13716 java completion: improve constructor reference suggestions
show class qualified name (IDEA-182806)
add navigation to the class
as a result, sorting by proximity now works, and so lambdas have to be preferred explicitly
2018-01-10 12:38:47 +01:00
Tagir Valeev af97567674 IDEA-184733 Better array access tracking in DFA 2018-01-10 12:26:47 +07:00
peter 1712207c49 IDEA-126898 Auto-complete for places where exceptions are expected should favor subclasses of Throwable and should also analyze method body for runtime exceptions thrown. 2018-01-09 23:22:33 +01:00
peter d4ab5f0efb java completion: don't delete everything if class name coincides with package (IDEA-180284) 2018-01-08 20:52:44 +01:00
Roman Shevchenko a61c8ba9e8 [java] clear deletion of reference expression qualifiers (IDEA-184557) 2018-01-08 15:58:42 +01:00
peter e1036c438c java completion: use a single way to find previous interesting PSI (IDEA-184555) 2018-01-04 16:14:50 +01:00
peter f79c0a63d2 java completion: don't suggest inacessible method/constructor references (IDEA-182311) 2018-01-03 16:12:19 +01:00
peter 76f23b6a7d IDEA-181269 "void" is not suggested in expressions 2018-01-03 15:56:39 +01:00
peter a753417bb9 IDEA-182794 "class" not suggested inside method 2018-01-03 15:07:35 +01:00
Tagir Valeev 390cec4927 TypeConstraint#union: smarter merge of supertypes
union("is X, Y; not SubX", "is SubX, Y") now produces "is X, Y"; before it was "is Y".
Fixes IDEA-184153 Smart-cast completion fails
2017-12-22 12:42:40 +07:00
peter 5806663661 java completion: put type above signature containing that type (IDEA-181329) 2017-12-21 13:37:01 +01:00
Tagir Valeev 6c4367b679 Revert "JavaCompletionUtil: use findMethodInSuperClassBySignatureInDerived" (e9f00a8) + test
It appears that findMethodInSuperClassBySignatureInDerived does not substitute recursively, at least in some cases.
2017-12-11 11:46:41 +07:00
Tagir Valeev af2f419e5f ExpressionTypeMemoryState:isSuperStateOf to check additional field
Fixes IDEA-183267 Completion based on instanceof is gone
2017-12-06 17:19:53 +07:00
Tagir Valeev f38a359e18 IDEA-182988 Spurious collection cast on completion Set -> HashSet 2017-12-04 11:58:51 +07:00
peter 20cee42f50 migrate NormalCompletionTest to use jdk 9, add test for IDEA-88939 2017-12-02 08:47:00 +01:00
Tagir Valeev 8673ad67aa IDEA-182822 Raw type completion options are suggested when actual expression type is inferred 2017-11-29 17:59:35 +07:00
Tagir Valeev d47671a183 Test for IDEA-181794 Suggest completion items with type casts in stream chains
The functionality was implemented automatically after a combination of earlier commits: 9fedf66f and 80e63e2
2017-11-22 14:33:42 +07:00
peter 724e2c37e5 IDEA-182417 Smart cast completion fails on a specific declarations 2017-11-21 12:18:12 +01:00
Tagir Valeev 9fedf66ff5 GuessManagerImpl: support type constrains from DFA, various improvements
Partially fixes IDEA-181794 Suggest completion items with type casts in stream chains if there exists 'filter(x -> x instanceof Foo)' call
Fixes IDEA-182455 Code completion: resolve actual value type assigned to local variable
2017-11-21 11:00:54 +07:00
Tagir Valeev 0dbef4cc6b GuessManagerImpl: minimal assignment handling 2017-11-20 16:11:26 +07:00
Pavel Dolgov 4dfff46920 Java: Provide completion for nested class names in reflection API (IDEA-181545) 2017-11-09 13:06:59 +03:00
peter fbbb381483 IDEA-181657 Completion items with type casts derived from control flow are not suggested if there are several nested checks from different paths of hierarchy 2017-11-08 10:01:07 +01:00
peter 30867ebca3 java: don't complete non-annotation-methods inside incorrect annotation 2017-11-03 17:28:26 +01:00