Commit Graph
947 Commits
Author SHA1 Message Date
Bas Leijdekkers 94fdc35577 "push condition inside call" intention replaced with "Conditional can be pushed inside branch" inspection 2017-04-04 22:47:39 +02:00
Anna.Kozlova 51d4e9936a static imports: don't compare with expected type when it depends on unresolved reference (IDEA-163072) 2017-03-31 18:01:29 +02:00
Pavel Dolgov 79bbbbf8ff Java: Quick fix for merging duplicate statements in module-info (IDEA-169211) 2017-03-31 15:59:08 +03:00
Tagir Valeev 478cae19bf IDEA-170032 Replace with foreach is not proposed in alt-enter
Now both options (when unchecked) only disable warning and batch-mode replacement, but the action is still available as an intention.
2017-03-30 13:07:18 +07:00
Tagir Valeev 93e35b7334 ExtractSetFromComparisonChainAction improvements (IDEA-CR-19606)
1. Fixed modifiers for interfaces
2. Replacement wrapped with Collections.unmodifiableSet
3. Supported Java 1.4 and lower
4. Supported Guava ImmutableSet
5. Supported comparisons like s.equals("xyz"), Objects.equals(s, "xyz")
2017-03-27 12:35:02 +07:00
Roman Shevchenko 5e5c14c57e [java] raises language level to Java 9 2017-03-24 18:35:57 +01:00
Tagir Valeev d9702d7d8d ExtractSetFromComparisonChainAction: i18n, java9 test, disable in Java 1.4 or lower (as varargs and generics aren't available there) 2017-03-22 18:30:28 +07:00
Tagir Valeev b0c584a295 IDEA-170033 Support raw-types when converting Iterable.forEach to loop 2017-03-22 16:51:46 +07:00
Tagir Valeev 836c498178 IDEA-168201 Intention to extract a set from "foo".equals(xyz) || "bar".equals(xyz) 2017-03-22 16:35:33 +07:00
Pavel Dolgov 4d60277ee6 Java: Implemented sorting the candidates pop-up and added icons in that pup-up for "MethodHandle/VarHandle type mismatch" (IDEA-167318), refactored upon review feedback (IDEA-CR-19455) 2017-03-21 14:37:01 +03:00
Anna.Kozlova 278d43dc00 enable static import quick fix on "method expected" error (IDEA-169966) 2017-03-21 12:18:45 +01:00
Tagir Valeev f764692965 StreamToLoopInspection refactoring: strings replaced with actual PsiType's (as they are valid now); removed unnecessary code due to all PsiExpressions are also valid 2017-03-21 14:21:29 +07:00
Anna.Kozlova c482c21b29 create from usage: ensure type parameters are extracted from wildcards (IDEA-169857) 2017-03-20 11:45:14 +01:00
Tagir Valeev efdfa0a22c IDEA-169518 Convert "Move assignment to field declaration" to the inspection 2017-03-20 16:26:40 +07:00
Pavel Dolgov d81332e1f8 Java: Improved inspection "MethodHandle/VarHandle type mismatch" - show candidates for replacement of method/constructor in a separate pop-up menu (IDEA-167318) 2017-03-17 15:15:45 +03:00
Tagir Valeev 55466aeef1 IDEA-169678 "Replace Optional.isPresent() condition with functional style expression" breaks code in case of 'Collection' return type 2017-03-16 11:22:15 +07:00
Anna.Kozlova d688a9a7a4 guess expected type like for completion if on the left side of assignment to functional expression which provides in this case no expected type (IDEA-169382) 2017-03-15 20:07:06 +01:00
Anna.Kozlova 1e9f6352f2 make add cast fix available for vararg methods (IDEA-169541) 2017-03-14 14:17:14 +01:00
Pavel Dolgov 30039b5085 Java: Added quick fix tests for "MethodHandle/VarHandle type mismatch" inspection (IDEA-167318) 2017-03-14 13:21:13 +03:00
Tagir Valeev b2cd46bdeb StreamApiUtil: fix addition of map operation when object-object cast is involved 2017-03-14 13:19:47 +07:00
Dmitry Batkovich f4993e6f99 field initialization fix: add body for incomplete constructor 2017-03-13 13:25:41 +03:00
Bas Leijdekkers ca51903f4e make suppress intentions work in module-info.java files 2017-03-12 17:08:13 +01:00
Dmitry Avdeev 65ddb4c454 IDEA-164851 Inspection "redundant default parameter value assignment" does not work on all parame... 2017-03-07 18:14:58 +03:00
Anna.Kozlova 2769981fb1 expand static import for all (IDEA-169239) 2017-03-07 14:57:35 +01:00
Tagir Valeev ed8f4efbef ExtractChainedMapAction: more specific message; Guava FluentIterable support; Collection.forEach test 2017-03-07 13:50:45 +07:00
Tagir Valeev 504a5727d6 ExtractStreamMapAction: made stream-agnostic (with ability to extend to other chaining lambda APIs like Guava, RxJava, etc.); implemented for CompletableFuture; existing lambda is always preserved now. 2017-03-06 15:32:16 +07:00
Tagir Valeev ee38a5cfdd IDEA-168967 Intention to extract local variable created in stream operation lambda to separate stream step. 2017-03-02 16:25:35 +07:00
Tagir Valeev 1db9b2fd3f OptionalAssignedToNullInspection: added assignment test 2017-03-02 09:49:30 +07:00
Tagir Valeev 1b3489639b IDEA-168633 Warn if variable of type java.util.Optional is initialized with null 2017-03-01 16:41:41 +07:00
Tagir Valeev b5e80dfbd8 StreamToLoopInspection: disable elements which type is PsiIntersection type or PsiImmediateClassType which is not resolvable in outer context (fixes EA-97901); better diagnostic for cases like EA-97901 2017-03-01 12:37:17 +07:00
Dmitry Batkovich 8b2f8362e0 fix test data 2017-02-22 22:08:50 +03:00
Alexey Kudravtsev 63c317943d one more test 2017-02-22 16:42:24 +03:00
Denis Fokin b9755cc7d1 Double semicolons cleanup 2017-02-22 12:45:41 +03:00
Tagir Valeev 909f89ab6e StreamApiMigration: disallow reassigning counting loop variable 2017-02-20 13:29:52 +07:00
Tagir Valeev 21b3f46f1a StreamApiMigration: collect(joining()): allow separator addition based on counting loop variable value 2017-02-19 18:37:49 +07:00
Anna.Kozlova 65ca530d2d process enum constant resolve separately (IDEA-162975)
EA-97195 - assert: PsiEnumConstantImpl.resolveMethodGenerics
2017-02-17 19:37:21 +01:00
Anna.Kozlova e794bbcb0f erasure return type when unchecked conversion was required deep inside (IDEA-168316) 2017-02-17 10:57:30 +01:00
Tagir Valeev b8c9f1a1e0 IDEA-168203 Follow-up: do not suggest if initializer may throw checked exception or accesses non-final variable 2017-02-17 12:47:39 +07:00
Tagir Valeev 4230df9ede StreamToLoop: VoidBlockLambdaFunctionHelper: recreate body if invalid (fixes EA-97022 - PIEAE: CompositePsiElement.getContainingFile) 2017-02-17 11:15:58 +07:00
Tagir Valeev 024c0831ac IDEA-168203 StreamApiMigration: accept more standard collection constructors 2017-02-15 11:46:18 +07:00
Tagir Valeev fc3f0bb09d SimplifyStreamApiCallChainsInspection: convert IntStream.range(0, Math.min(limit, arr.length)).map(idx -> arr[idx]) to Arrays.stream(arr).limit(limit) and so on 2017-02-15 11:46:18 +07:00
Tagir Valeev 95ed6b3fd6 StreamApiMigrationInspection: use Stream.of, etc. to iterate explicitly created array 2017-02-14 14:27:23 +07:00
Anna.Kozlova de1520695c static via instance: hide parameters/classes qualified names (IDEA-168084) 2017-02-13 19:30:18 +01:00
Tagir Valeev 05ccacfa5f StreamApiMigration: check for label not pointing to the statement (Fix for EA-96734 - NPE: TerminalBlock.extractOperation) 2017-02-13 16:14:55 +07:00
Dmitry Batkovich aa67d1e6e2 suggest wrap string expression with java.io.File when it's expected IDEA-167566 2017-02-09 12:19:11 +03:00
Anna.Kozlova e1cf56ba6f ensure change variable type to lambda parameter type is not suggested
EA-96540 - IOE: PsiJavaParserFacadeImpl.createTypeElementFromText
2017-02-09 10:14:07 +01:00
Tagir Valeev f396483457 Fixed EA-96417 - IOE: PsiJavaParserFacadeImpl.createExpressionFromText 2017-02-08 18:16:37 +07:00
Anna.Kozlova dbcac2d62f fix modifiers for created inner classes (IDEA-167750) 2017-02-06 19:08:41 +01:00
Anna.Kozlova 6be04d9bf2 create inner: ensure no modifiers inside local/anonymous classes (IDEA-167727) 2017-02-06 19:08:41 +01:00
Tagir Valeev 95baf652ae StreamApiMigration: support joining with prefix and suffix 2017-02-06 14:40:21 +07:00