Commit Graph

212 Commits

Author SHA1 Message Date
Roman Shevchenko
fdf6239bfc Cleanup (formatting) 2018-11-08 17:12:29 +01:00
Roman Shevchenko
5d10b37246 [java] enhanced 'switch' statements: basic highlighting (IDEA-196643) 2018-11-02 18:22:34 +01:00
Roman Shevchenko
95b4898527 Cleanup (formatting) 2018-11-02 18:09:05 +01:00
Pavel Dolgov
e6e432446a Java: Highlight unreachable assignment of array element (IDEA-199556) 2018-10-26 13:11:13 +03:00
Anna Kozlova
107a789bea highlighting: mark default annotation value used for implicit calls (IDEA-71133) 2018-06-21 13:50:19 +03:00
Tagir Valeev
62792959f0 More tests for this handling in javac 2018-06-08 13:27:58 +07:00
Tagir Valeev
51af524343 LocalsOrMyInstanceFieldsControlFlowPolicy: allow parentheses
See also IDEA-156926, JDK-8156180
2018-06-07 17:55:13 +07:00
Tagir Valeev
d90e0b79e5 LocalsOrMyInstanceFieldsControlFlowPolicy#isLocalOrMyInstanceReference extracted
Fixes parentheses handling like (this).x. Review ID: IDEA-CR-33345
2018-06-07 16:11:00 +07:00
Tagir Valeev
698afa3b24 LocalsOrMyInstanceFieldsControlFlowPolicy: disallow qualified this
According to JLS Chapter 16 qualified "this" is not considered as reference to field in definite assignment analysis
Fixes IDEA-193386 Good code is red: Variable may not have been initialized
2018-06-07 11:28:07 +07:00
Roman Shevchenko
57fb172991 Cleanup (warnings; formatting) 2018-05-18 16:36:00 +03:00
Tagir Valeev
0418d57ade Error is reported when qualified this is used to initialize a final variable
Fixes IDEA-191686 Bad code is green (cannot assign a value to final variable)
2018-05-10 13:03:40 +07:00
Anna.Kozlova
51a2d549b2 highlight only method name on unhandled exception (IDEA-190912) 2018-04-25 21:11:38 +02:00
Tagir Valeev
f48446e00b ControlFlowAnalyzer: do not exclude polyadic operands after always true/false operand
Fixes IDEA-190766 Final field reassignment problems in always true/always false polyadic chains
Review ID: IDEA-CR-29499
2018-04-23 17:54:41 +07:00
Anna.Kozlova
157a19c220 new expression: keep calm with invalid code (IDEA-189834) 2018-04-13 16:30:47 +02:00
Roman Shevchenko
b6e21af7ac [java] raw string literals: language level check (IDEA-189075) 2018-04-12 17:26:34 +02:00
Anna Kozlova
bea45461b0 provide special colors for statically imported members (IDEA-98499) 2018-03-07 08:02:41 +01:00
Tagir Valeev
f5975ad8a2 Variable finality highlighting fixes
Unreachable branches are analyzed for twice assignment, but constants are evaluated.
Fixes IDEA-186321 Bad code green: non-iterating for-loop update
Fixes IDEA-186304 good code red: field might not have been initialized in unreachable branch
Fixes (mostly) IDEA-186305 good code red: variable might already have been assigned to
2018-02-17 12:35:03 +07:00
Tagir Valeev
63231c630d IDEA-186381 bad code green: variable might already have been assigned
Fixed parentheses handling on the left-side of assignment and in unary operations
Fixed error message priority
2018-02-09 12:45:18 +07:00
Tagir Valeev
c8f3d1e20c ControlFlowUtil#isVariableAssignedInLoop: evaluate constant conditions
Fixes IDEA-186306 good code red: variable might be assigned in loop
2018-02-08 13:29:49 +07:00
Tagir Valeev
bf640e78a9 ControlFlowAnalyzer: fix control flow for assert (IDEA-186305) 2018-02-08 11:57:02 +07:00
Alexey Kudravtsev
e07afa8f5c Date/Time in javadocs considered useless for readability 2017-12-06 15:11:04 +03:00
Roman Shevchenko
b3b6ff5ac9 [tests] moves move default package tests in a dedicated class 2017-11-08 08:49:52 +01:00
Roman Shevchenko
24ae1022e4 [java] highlights default package references in module-info.java files (IDEA-181405) 2017-11-02 11:39:42 +01:00
Anna.Kozlova
c415cde83e definitely initialized should check order (IDEA-181149)
missed for field initialization; similar to class initializers
2017-10-25 19:50:25 +02:00
Anna Kozlova
5fa4775cf1 unresolved qualifiers in ref expressions chain (follow IDEA-CR-24382) 2017-09-11 13:35:36 +03:00
Anna Kozlova
90924b2043 align message according to javac (IDEA-178211) 2017-08-30 19:53:27 +03:00
Dmitry Batkovich
52cf50c461 redundant throws inspection:
1. global and local inspections are merged to one
2. local inspection reports "non-final" methods (if cheap enough) IDEA-177230
2017-08-09 12:14:26 +03:00
Roman Shevchenko
b56c377f05 [tests] updates test data; formatting 2017-07-11 09:59:18 +02:00
Anna Kozlova
4b3e51a69d testdata changes 2017-06-13 20:27:12 +03:00
Pavel Dolgov
16b1765f7f Java: Better handling of unreachable code (IDEA-172642) 2017-05-23 12:28:44 +03:00
Pavel Dolgov
c7d8ad3401 Java: Don't reuse cached ControlFlow when the context is not equivalent (IDEA-168768) 2017-05-15 12:34:52 +03:00
Alexey Kudravtsev
920d5b4fba removed default file header, because it adds no information but subtracts attention and space 2017-05-11 13:39:07 +03:00
Anna.Kozlova
2464532a56 fix testdata due to changes in defaults 2017-03-15 16:18:57 +01:00
Roman Shevchenko
74daf8d522 [java] improves "unsupported language level" message (IDEA-168859) 2017-03-06 11:27:27 +01:00
Anna.Kozlova
5328c5fa2c final field initialization: don't treat anonymous args as inner classes (IDEA-168651) 2017-03-06 10:28:45 +01:00
Anna.Kozlova
968d14a5db Revert testdata changes: Proper focus requests through the IDE focus subsystem. Part II. 2017-02-21 21:25:26 +01:00
Denis Fokin
556290b406 Proper focus requests through the IDE focus subsystem. Part II. 2017-02-21 21:06:22 +03:00
Roman Shevchenko
66728e4f71 [java] invalid "for" statements highlighting (IDEA-167353) 2017-02-06 19:02:05 +01:00
Anna.Kozlova
7356d1d8c3 used variable before static initializer (IDEA-166270) 2017-01-09 18:15:16 +01:00
Anna.Kozlova
08163051f3 show class/package conflict only if corresponding subdirectory contains classes so there could be usages with ambiguous imports 2016-12-15 14:48:27 +01:00
Anna.Kozlova
5732b8fb81 ensure static fields/static initializers are evaluated before instance fields (IDEA-165084) 2016-12-07 11:18:47 +01:00
Pavel Dolgov
2f5e954770 Java: Fixed false positive "unreachable statement" in the control flow analysis (IDEA-164442) 2016-11-30 13:04:34 +03:00
Vladimir Krivosheev
db8926c1b9 fix test data — remove inherit-compiler-output="false" 2016-11-04 16:32:30 +01:00
Roman Shevchenko
ba9de6eb7f Cleanup (warnings; formatting) 2016-09-16 10:39:39 +03:00
Alexey Kudravtsev
8b2f420ab3 IDEA-151933 Optimize Imports can produce ambiguous code 2016-09-07 14:12:33 +03:00
Alexey Kudravtsev
11a4ede7a5 highlight names: do not highlight in huge chunks because there maybe whitespaces or comments between tokens; instead, highlight identifiers only 2016-08-23 14:54:58 +03:00
Alexey Kudravtsev
5fa79bc4e1 test 2016-08-23 14:49:38 +03:00
Anna Kozlova
6fdc29ee24 highlight comments inside qualified names (IDEA-154450) 2016-08-15 20:17:11 +03:00
Anna Kozlova
8a0c63df61 names highlighting: don't highlight typed reference as class name (IDEA-65270) 2016-08-15 20:17:11 +03:00
Pavel Dolgov
d92688892f Java control flow: Fixed false positive for definite assignment in finally block - more lightweight implementation (IDEA-64488) 2016-08-03 12:47:42 +03:00