Commit Graph
4195 Commits
Author SHA1 Message Date
Anna.Kozlova 14cb19fa39 overload resolution: accept unqualified calls of static interface methods (IDEA-180236) 2017-10-09 15:00:48 +02:00
Tagir Valeev 08cea712a2 MoveFieldAssignmentToInitializerInspection: allow unknown methods
As this is intention-like part of inspection (no warning), we can allow it even if we are not sure that semantics will be preserved. See comments in IDEA-177602
2017-10-09 16:38:56 +07:00
Tagir Valeev 319d4c205a ChangeToAppendUtil: do not add useless .append("")
Partially fixes IDEA-180178 String concatenation as argument to 'StringBuilder.append()' call should be smarter
2017-10-09 12:12:34 +07:00
Tagir Valeev cdd80f8de4 UnrollLoopAction: support counting loop; limit max iterations to unroll 2017-10-09 11:24:05 +07:00
Tagir Valeev 9a91789f27 MethodReturnTypeFix: do not suggest when type refers to type parameter not available at method declaration 2017-10-09 09:27:16 +07:00
Tagir Valeev 504300662d IDEA-179382 intention to change return type works when assigning but not when passing a return value as an argument to some different method 2017-10-06 17:46:20 +07:00
Roman Shevchenko 96373cd2c9 [java] supports @uses, @provides and @hidden tags in Javadoc inspection 2017-10-05 21:25:08 +02:00
Roman Shevchenko a714a3703c [tests] merges Javadoc inspection tests; drops duplicates 2017-10-05 13:36:32 +02:00
peter 969a93d5a8 IDEA-179864 Autocomplete does not handle generics when method has parameters 2017-10-04 16:12:59 +02:00
Roman Shevchenko 5c5c3ce691 [java] class-like annotation wrapping in modules 2017-10-02 20:19:01 +02:00
Roman Shevchenko d8b2de2b28 [java] fixes formatting around soft keywords 2017-10-02 17:56:32 +02:00
Roman 19551bd6af ComparatorCombinatorsInspection: support chain comparisons, provide fix 2017-10-02 18:43:25 +07:00
Anna.Kozlova d13ad07be9 LVTI: don't report resource list as multiple var declaration (IDEA-CR-24864) 2017-10-02 11:52:51 +02:00
Anna.Kozlova aa8576f3ce LVTI: shrink the highlighting range
move functional expression errors to var declaration
2017-10-02 11:52:51 +02:00
Anna.Kozlova 9728678ff4 method references: don't swallow errors during method ref inference (IDEA-179706) 2017-09-29 14:31:21 +02:00
Tagir Valeev e7d2193a56 InvertIfConditionAction: preserve comments after last statement
Fixes IDEA-153371 invert 'if' condition deletes comment lines
2017-09-29 15:20:51 +07:00
Tagir Valeev 389e6a828d ConstantExpressionVisitor: for class access expression return the operand type
Before for String.class the "Class<String> type was returned (instead of simply "String" type). This was usually fine, but for int.class and Integer.class the same "Class<Integer>" type was returned, despite the constants are different.
2017-09-28 13:15:14 +07:00
Roman 545ae69261 StreamApiMigrationInspection: improve stream source recognition 2017-09-27 12:28:23 +07:00
Tagir Valeev 1779a8a871 FuseStreamOperationsInspection: fixes according to review IDEA-CR-24873
1. Code sample in description
2. Supported toCollection with parameterized method-reference
2017-09-27 10:50:03 +07:00
Roman c20bbf70d2 Simplify Stream API call chain inspection improvements: IDEA-179118 2017-09-27 09:43:29 +07:00
Anna Kozlova 0ca243309f LVTI: var -> explicit type (IDEA-179177) 2017-09-26 16:13:12 +02:00
Anna.Kozlova 643e046c85 EA-107704 - assert: InferenceSession.<init> 2017-09-26 14:33:30 +02:00
Tagir Valeev 4e24c72077 IDEA-179557 Merge nested if's removes comment 2017-09-26 16:58:46 +07:00
Tagir Valeev 2a29c82c70 FuseStreamOperationsInspection
Fixes IDEA-179303 Suggest replacing Collectors.toList()/toSet() + collection constructor with Collectors.toCollection
2017-09-26 11:01:37 +07:00
Tagir Valeev b2df7a760a IDEA-179490 "Can be replaced with single expression in functional style" in Java fails when field name matches class name 2017-09-26 09:44:21 +07:00
Tagir Valeev fa6bbd0b5d CollectMigration: prepare to IncorporateStreamOperationsInspection; fix NewListTerminal to support collections only 2017-09-26 09:29:37 +07:00
Dmitry Batkovich 87e841ef88 relevant method chain completion: chains ended with casts are valid too 2017-09-25 17:35:44 +03:00
Anna Kozlova 776b8f9474 LVTI: explicit variable type is redundant (IDEA-179177) 2017-09-25 15:05:22 +02:00
Dmitry Batkovich 07a4324053 Merge branch 'db/method-chains-with-casts'
# Conflicts:
#	java/compiler/impl/src/com/intellij/compiler/chainsSearch/context/ChainCompletionContext.java
2017-09-25 12:40:26 +03:00
Dmitry Batkovich eb9fd79648 add tests for completion with casts 2017-09-25 12:32:08 +03:00
Tagir Valeev 29e2383afd IDEA-179370 "Constant conditions and exceptions" quickfix "Replace with 'x != null ?:'" does nothing 2017-09-22 16:20:55 +07:00
Tagir Valeev cade4517aa IDEA-168343 Suggest to change called method return type when used in return statement 2017-09-22 14:15:40 +07:00
Anna Kozlova e22a89050d LVTI: un-capture wildcards for variable declarations 2017-09-19 20:13:16 +03:00
Anna Kozlova e38b24c694 LVTI: ensure standalone context for vars 2017-09-19 20:13:15 +03:00
Tagir Valeev dede7b30f7 IDEA-113585 Cast to Type quick fix creates code that doesn't help 2017-09-19 16:10:34 +07:00
Anna Kozlova 2f165da164 LVTI: accept explicit array types, javadoc (follow IDEA-CR-24690) 2017-09-19 09:28:42 +03:00
Tagir Valeev 36999ebfc4 IDEA-179128 Quick-fix for "'if' statement has empty body" 2017-09-19 13:04:21 +07:00
peter d8a63070d0 don't preselect better-matching deprecated classes (IDEA-124382) 2017-09-18 18:44:39 +02:00
Anna Kozlova 29bc5a12c0 LVTI: warnings for var as class name (IDEA-178868) 2017-09-18 19:05:20 +03:00
Anna Kozlova 2180c05b71 initial highlighting for LVTI (IDEA-178868) 2017-09-18 17:04:30 +03:00
Tagir Valeev d7f09f6cdd StreamToLoop: support array slice (Arrays.stream(arr, from, to)) 2017-09-18 17:30:53 +07:00
Tagir Valeev 7345e8b0ef UnrollLoopAction: fixes according to review IDEA-CR-24513
1. Check that loop parameter is not written
2. Support List.of, Collections.singleton, Collections.singletonList
3. Support if w/o braces
4. Support break not in last position
2017-09-18 16:37:40 +07:00
Tagir Valeev 717076ee3c SimplifyForEachContext#from: fix nullability problem
EA-107550 - NPE: SimplifyForEachInspection.extractLambdaFromForEach
2017-09-18 15:21:32 +07:00
peter bbc6baa91e IDEA-178535 Duplicate class suggestions in cast 2017-09-16 19:11:43 +02:00
peter 84f49683cb IDEA-178377 No "final" completion suggestion in catch declaration 2017-09-16 19:11:43 +02:00
peter dd920e884e completion: place functional expressions after variables of expected type (IDEA-174428, IDEA-178600) 2017-09-15 22:04:11 +02:00
peter 8561e8cb19 IDEA-178933 Complete current statement for if statement without opening bracket 2017-09-15 22:04:10 +02:00
peter e5bde2ff34 IDEA-173927 Support keywords autocompletion when keyboard layout is incorrect 2017-09-15 22:04:10 +02:00
Dmitry Batkovich 5116aad4cc use Optional.of() instead ofNullable() in "opt" postfix template when expression is not null 2017-09-15 15:55:54 +03:00
Dmitry Batkovich bd2c0418e8 stream postfix template shouldn't be available for primitive arrays except long[], double[], int[] 2017-09-15 15:29:00 +03:00