Commit Graph

786 Commits

Author SHA1 Message Date
peter 7f957f2064 java completion: prefer 'return' if what comes after it can be parsed as a single expr statement (IDEA-195934) 2018-11-13 19:37:32 +01:00
peter aaae6f8efb don't consider generic methods getters for smart completion sorting (IDEA-200682) 2018-11-13 19:37:31 +01:00
peter 3c99a1b1e9 IDEA-200139 Smart completion for super constructor call suggests base field 2018-10-11 09:12:18 +02:00
peter 03fd1b00f5 disable completion after enum constant (IDEA-199935) 2018-10-05 18:22:23 +02:00
peter f0ca8898ab IDEA-199491 PsiInvalidElementAccessException on completion 2018-09-26 13:25:41 +02:00
peter fba349c8a1 IDEA-198968 Idea smart completion suggests non-accessible constructor 2018-09-17 17:57:56 +02:00
peter 9317647cba use plain matching for completing duplicate string literals
otherwise we get a freeze in very long literals (IDEA-198887)
2018-09-14 12:07:49 +02:00
peter 7d5673a443 java completion: don't overwrite whole anonymous class
search for reference at `BaseClassRe|f`, not `BaseClassRef() { ... }.call()`
2018-08-01 16:05:08 -07:00
peter 1891247f9a IDEA-195936 "true"/"false" keywords should have priority in completion for boolean parameters inside "if" condition 2018-07-30 06:38:53 -07:00
Dmitry Jemerov 8d906207d4 Allow passing additional prefix to CompletionServiceImpl.handleCompletionItemSelected() 2018-07-02 19:19:56 +02:00
peter d98f2c7409 java completion: suggest only denotable method return types (IDEA-194462) 2018-07-02 17:09:29 +02:00
peter 8d183dee3a don't complete Arrays.asList when Set is expected (IDEA-194812) 2018-07-02 17:09:29 +02:00
peter 340e3aab58 disprefer unlikely interfaces in basic completion after new (IDEA-193609)
just like in smart one
2018-07-02 14:39:31 +02:00
Tagir Valeev d6225c87b7 TypeConstraint#union: fixed possible inconvertibility with inconsistent hierarchy
Fixes EA-123372 - NPE: AbstractStreamEx.lambda$foldLeft$
2018-06-26 15:38:48 +07:00
peter cb981a0ef5 java completion: suggest Objects::nonNull where applicable (IDEA-192789) 2018-06-04 18:18:35 +02:00
peter 1da11d0a35 java completion: enable package suggestions inside type arguments (IDEA-193049) 2018-06-04 15:45:38 +02:00
Anna Kozlova 84976a2511 change test data 2018-06-04 12:36:29 +03:00
peter b2d683fcd4 IDEA-192382 Override unused imports when adding class with same name 2018-06-01 13:57:35 +02:00
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