Commit Graph

3894 Commits

Author SHA1 Message Date
Anna.Kozlova
589b029a97 java method ref highlighting: don't mirror errors of not applicable methods of return type (IDEA-224306)
GitOrigin-RevId: 40b4293c754640445b9fac741eab24261e8060cc
2019-10-10 10:03:10 +00:00
Anna.Kozlova
87deef960c incompatible types: highlight parent call instead of lambda when the error isn't related to lambda (IDEA-218801)
GitOrigin-RevId: 17a2f1f62f7703930aa25a8cfd6dfd4a918e1fe7
2019-10-10 07:01:11 +00:00
Anna Kozlova
5b3ef443c9 incompatible types tooltips: use short type names at varargs position (IDEA-224305)
GitOrigin-RevId: cd5dc23e741098d6158dc9ebec666a1a600e1700
2019-10-09 19:04:16 +00:00
Anna.Kozlova
8db821428d lvti: special highlight for self referencing variables (IDEA-224449)
assume that null as type of the left side of the assignment is not possible

GitOrigin-RevId: c407cdc11e991c8db24ffd683f3b8ea883d41244
2019-10-09 10:32:32 +00:00
Roman.Ivanov
9b798e3ece SortContentAction: replace with proper annotation member value instead of expression : IDEA-224254
GitOrigin-RevId: 687fc8771babc84d3ebc07ad4fe04c4543fed36e
2019-10-08 10:01:33 +00:00
Bas Leijdekkers
311f965f20 on demand static import -> on-demand static import (IDEA-221475)
GitOrigin-RevId: 3cdbe9a8fbad5b785934f8f6280e4140cb8aa75c
2019-10-03 16:04:14 +00:00
Artemiy Sartakov
37137f76ac AbstractJavaBlock: added formatting for java text blocks (IDEA-216737)
GitOrigin-RevId: 091cd09f3dac6b9d3dc130d5e2e65bee5fd88792
2019-10-03 04:32:43 +00:00
Roman.Ivanov
eac8432bb6 Basic test for method extract: IDEA-CR-53127
GitOrigin-RevId: 3c41530c54d0d26076f65bc38f23993b82e7f56f
2019-10-02 15:08:26 +00:00
Anna Kozlova
bb650d3c68 redundant suppressions on the fly: check alternative ids, old suppress ids (IDEA-223759)
GitOrigin-RevId: 3d1332fd4cdb1bdd39c26de6713cf6f464fc61e3
2019-10-01 10:11:58 +00:00
Artemiy Sartakov
4f473648ee OptionalToIfInspection: tests for parenthesized expression and partial chains (IDEA-CR-52832)
GitOrigin-RevId: cbfa6550167e9dd9e157ab860a6ead486938f2cd
2019-09-25 08:31:20 +00:00
Tagir Valeev
acb3387b1c IDEA-223192 Non-initialized variable error is not displayed in nested switch statement
GitOrigin-RevId: 850afa74fb22dd858bdc8ff7903946678e53d82c
2019-09-24 08:02:50 +00:00
Tagir Valeev
f127b4491c DeleteSideEffectsAwareFix: fix removal of for-update statement
GitOrigin-RevId: 15a64c215cc98f4f94b76edc3486bcf762a8be28
2019-09-24 05:31:27 +00:00
Dmitry Batkovich
ef54a16d1e fix testdata
GitOrigin-RevId: b96781775bd0583ebc134e75214189ec69717a04
2019-09-23 11:02:12 +00:00
Anna Kozlova
1768efa804 incompatible types: highlight only wrong arguments instead of full arg list (IDEA-220107)
GitOrigin-RevId: 38a12e4fa7ea27d156dae1fe6bc7bd6902db6251
2019-09-20 19:31:36 +00:00
Anna Kozlova
fb5f755910 java inference: prevent recursive conflict resolution when it isn't prevented by ResolveCache guard
advanceResolve(incomplete=true) prevents guard to work

GitOrigin-RevId: 437ec02af808a89c8339909411bec6d95ff225dc
2019-09-13 07:12:19 +00:00
Artemiy Sartakov
caac9ef3d8 StringLiteralCopyPasteProcessor: keep indent for multiline paste into text block (IDEA-217406)
GitOrigin-RevId: b1a5d55f8749fea0002723ae2a6b2370fb8ed4ab
2019-09-11 12:11:55 +00:00
Artemiy Sartakov
550b0aeb8b TextBlockMigrationInspection: added inspection that reports cases when string or concatenation can be converted to text block (IDEA-217333)
GitOrigin-RevId: 50750c58f63d1289b236c612ed33e0655b66ef76
2019-09-11 06:02:36 +00:00
Anna Kozlova
d829a7c8f4 java inference: ensure that applicability check is not re-entered
this fixes assertion
	at com.intellij.util.ObjectUtils.assertNotNull(ObjectUtils.java:84)
	at com.intellij.psi.infos.MethodCandidateInfo.inferTypeArguments(MethodCandidateInfo.java:453)
caused by including expression compatibility constraints for expressions inside lambdas for which parameter types are calculated

GitOrigin-RevId: 0588bff4a719fb73ff49a51bc86635e56cd8d146
2019-09-05 19:19:32 +00:00
Anna Kozlova
55426d88a9 java resolve: ensure cached all qualifiers do not lead to cached types based on ThreadLocalTypes values
fixes failed check for different types returned on different threads (see JavaResolveCache#reportUnstableType)

GitOrigin-RevId: a5efd5e5a9657ad55c74e413185959c517e341e8
2019-09-01 17:03:16 +00:00
Bas Leijdekkers
ea73b88a7c psi: don't insert unnecessary parentheses when replacing expression (IDEA-220761)
GitOrigin-RevId: 7fe48d0f72581221a633373933b941c09b2c69ed
2019-08-22 01:50:10 +03:00
Anna Kozlova
1e5631c6ee fixing grammar
IDEA-CR-51559

GitOrigin-RevId: f44d7b539164a8086c022b786c721bf7011608b1
2019-08-22 01:50:10 +03:00
Anna Kozlova
fd969c0595 java resolve: cache resolved qualifiers when global cache is prohibited (IDEA-219505) ^peter
when type inference is called, it's not known if the client calls inference on resolved method or enumerates all possible candidates and thus the results cant be cached; current implementation is pessimistic and prohibit all caching during inference. Thus, for long method call chains which depend on some non-trivial calculations, it may be extremely resource consuming. Let's cache all qualifiers locally: this doesn't prevent recalculation globally but works around performance problems per single call

GitOrigin-RevId: b9b42cbc50918259f5de3a81d5f3a38967c153f1
2019-08-20 10:01:31 +03:00
Yuriy Artamonov
947520872e IDEA-220832 Create File intention: don't suggest generated sources root as possible target
GitOrigin-RevId: 302317ca1cb6bbcb71604d58db3b1d2f7c5480ee
2019-08-19 13:03:31 +03:00
Anna Kozlova
54eb66996d junit: check for junit classes available in scope before proceeding with costly checks (SCL-16058)
GitOrigin-RevId: 34f3dda8a83aada3c78c9888aa995d010af2a62a
2019-08-15 18:04:21 +03:00
Bas Leijdekkers
11be125743 fix text data file name case
GitOrigin-RevId: 547ec42bfbcb039662cdf758ad94f75cc7fd7c2f
2019-08-12 20:04:58 +03:00
Anna Kozlova
c1b79848e1 java: disable heavy weight add type cast for lambda bodies with failed inference on top
for long chained calls with many type errors, DFA checks may be too slow

GitOrigin-RevId: 851604a1252743c92d8c33973845cdda7bbb996a
2019-08-12 19:04:15 +03:00
Bas Leijdekkers
1c31987860 determine content range of text block correctly on pasting in literal (IDEA-CR-50963)
GitOrigin-RevId: aca891bae186771688369389803a7b47da165f91
2019-08-12 16:06:12 +03:00
Artemiy Sartakov
d98814d304 OptionalToIfInspection: added missing imports (IDEA-212269)
GitOrigin-RevId: afbeaa1f10b2266cd1401da83b71cf0bf6862824
2019-08-07 17:02:43 +03:00
Artemiy Sartakov
6f1efb8fc0 OptionalToIfInspection: added inspection to desugar optional chain to sequence of if statements (IDEA-212269)
GitOrigin-RevId: c83b70e05544529b3dfffe24bc87997910edcb56
2019-08-07 17:02:43 +03:00
Tagir Valeev
2572c79c56 CollectMigration.NewListTerminal: support Guava collection constructors (IDEA-219934)
Also remove .distinct() automatically when unnecessary.

GitOrigin-RevId: 504dd9e645f9492a4142c0793c42188912afdde9
2019-08-07 12:04:38 +03:00
Anna Kozlova
8777687e32 java inference: proceed with nested inference for lambda parameter type detection (IDEA-219330)
GitOrigin-RevId: f0a4862b94f9cff4c88b1f56425663bbd8659d7a
2019-08-07 00:03:21 +03:00
Anna Kozlova
774401fb2f extract if: keep necessary parenthesis (IDEA-219639)
GitOrigin-RevId: 9582978807c159f8302a1781a5f3388fb0130ad9
2019-08-06 13:03:24 +03:00
Anna Kozlova
616e3ca030 method references: allow access to protected methods through super (IDEA-217862)
GitOrigin-RevId: f1d86f6127a64146e87998423f3034e38a46409c
2019-08-05 23:03:36 +03:00
Tagir Valeev
ae33c73266 ReturnReplacementContext#extractTail: leave blank line in place (IDEA-219142)
GitOrigin-RevId: 30a93c99fc47f4d277b45cabe9c72b4a41b05846
2019-08-05 00:03:02 +03:00
Bas Leijdekkers
507c853824 text blocks: add text block escaping (only escape """ and \) when pasting (IDEA-217353)
GitOrigin-RevId: 03db759d2b770edc191aa0614251bdbaaa1742ed
2019-08-01 01:02:50 +03:00
Bas Leijdekkers
dca820c744 text blocks: don't escape paste outside content of text block (IDEA-217353)
GitOrigin-RevId: 7ee24196154f11a34b50d2d95c62f374abe13f14
2019-08-01 01:02:50 +03:00
Roman Shevchenko
b15a0fb682 [java] drops raw string literal support
GitOrigin-RevId: 153517ad5e0ac8f8165128ed8797d4157b5512b2
2019-07-31 00:04:46 +03:00
Yuriy Artamonov
95649ee955 IDEA-218163 IDEA-CR-50494 Tests for CreateFilePathFix and CreateDirectoryPathFix in Java plugin
GitOrigin-RevId: 26ab3c8980868b3da0e7c1e6ff2e36c4146b838d
2019-07-29 16:00:42 +03:00
Bas Leijdekkers
d34083c8f4 text blocks: fix broken escape highlighting (IDEA-219098)
GitOrigin-RevId: 299585eb47bbd5f5b14473aadd0290fc64ef0845
2019-07-29 12:20:20 +03:00
Artemiy Sartakov
6f4c0d38cf SortContentAction: append all children between method expression and expression list for method call (IDEA-218735)
GitOrigin-RevId: 0cc643fdbdac51be763d51bf53b28d48f371e460
2019-07-23 17:44:15 +03:00
peter
a04504dddc don't suggest inaccessible qualifiers when chain-completing a java method reference (IDEA-217955)
GitOrigin-RevId: 78fc63c40948e6873279d6fe4c923bf3113a8b2e
2019-07-23 17:44:15 +03:00
Tagir Valeev
30b914be28 IDEA-216810 Unexpected behaviour with "Transform Method to Single Exit Point" / Inline refactoring
GitOrigin-RevId: 31a77ebb86f3da40caeda5e8ca60ccec51ebfb13
2019-07-16 15:01:49 +03:00
Tagir Valeev
50ff44aebd IDEA-218391 Transform to single return: remove excessive braces in if-else chains.
GitOrigin-RevId: b13d36218843ae5ff7fbfbcadc898113ad4c9bc1
2019-07-16 15:01:49 +03:00
Anna Kozlova
67839b3676 java unchecked warning: narrow down highlighting to class/method reference (IDEA-203860)
GitOrigin-RevId: ee686cedeef7aa677445b5054c9e191ce1d15a77
2019-07-15 12:05:58 +03:00
Anna Kozlova
9f6014adfc java error tooltips: highlight type arguments according to TypeConversionUtil#isAssigned (IDEA-94965)
GitOrigin-RevId: db456a719c885e055a5a1bd379a63120aeba1aee
2019-07-15 12:05:58 +03:00
Anna Kozlova
922040b4dd java: remove FQNs from change type fixes (IDEA-145570)
GitOrigin-RevId: d6bca8039c7d47615cb40ed2def7f5572784e99b
2019-07-13 00:03:02 +03:00
Roman.Ivanov
5652d26604 Inlay hints: do not chop list in presence of comments: IDEA-218083
GitOrigin-RevId: e442ad27055bb59888f2173150ac95de75b7f87b
2019-07-12 08:28:33 +03:00
Anna Kozlova
bd882f2a97 java inference: stop walkUp in assignment context inside method call chain (IDEA-217928)
GitOrigin-RevId: 79ac2370cd302d7e38d029e065ff4a28ed8709a4
2019-07-11 23:22:40 +03:00
Max Medvedev
adc488ca04 Revert "IDEA-217722 Encapsulate field: remove obsolete tests"
This reverts commit 8a121a92

GitOrigin-RevId: 79821c52e6fdfd8587fb523f91f393523ddace77
2019-07-11 17:42:27 +03:00
Anna Kozlova
cf944efffb java: adjusted "Cannot resolve method" message (IDEA-206898)
GitOrigin-RevId: 40fc7d00d6bcc4792dc097dde63dd40d08864068
2019-07-10 23:02:59 +03:00