Commit Graph

4204 Commits

Author SHA1 Message Date
Roman Shevchenko
cfb283ebd9 Cleanup (rearranging conditions for readability)
GitOrigin-RevId: 060602129057458c4171b89dd53db32f6e7e70ac
2020-01-29 20:31:57 +00:00
Nikita Eshkeev
707933fffd Constructor references with type parameters are not recognized as PsiMethodReferenceExpression
StatementParser used to ignore type parameters to constructor references
and it prevents the tokens of such statements from being grouped under
the PsiMethodReferenceExpression node in the PSI tree.

Since constructor references can have type parameters one might look
like a variable declaration. The parser didn't take this fact into
account and fails due to "::" after closing ">" of type arguments.

This patch adds a new check in StatementParser#parseStatement after
the attempt of parsing of a declaration statement fails to see if the
type declaration follows by "::" which is a marker that the examined
line might be a constructor reference.

Signed-off-by: Nikita Eshkeev <neshkeev@yandex.ru>

GitOrigin-RevId: 968f4884c45c922ce2fd6a8e3614cca01423d5b3
2020-01-29 19:34:36 +00:00
Dmitry Jemerov
1bd0ed0834 Dynamic queryExecutor EPs
GitOrigin-RevId: bde157c3f47d2084b11bd1178d62d8b9595f6a13
2020-01-29 19:34:36 +00:00
Anna.Kozlova
3451ac64f7 restore renaming of javadoc refs (IDEA-227582)
GitOrigin-RevId: 5a712a94f8d68c3249a530794852cc63f9a57496
2020-01-28 07:42:19 +00:00
Artemiy Sartakov
a8e1ee46c9 JavaHighlightingLexer: support two new escape sequences in string literals (IDEA-231527)
GitOrigin-RevId: ca884a706c6ae4056c6534c9d5e84aeb8bef5b71
2020-01-28 05:42:24 +00:00
Tagir Valeev
186596b687 IDEA-231427 Extract method produces incompilable code when extracting expression that produces a pattern variable
GitOrigin-RevId: 3fbd29e6543e21af934c4de8899bd6ed5bda6965
2020-01-27 06:33:15 +00:00
Tagir Valeev
f22fa4063b ControlFlowAnalyzer: cosmetic change
GitOrigin-RevId: 5b434279775baef28d8f408cd009bb70f51155c2
2020-01-27 06:33:15 +00:00
Tagir Valeev
26221c0641 IDEA-231237 Loop-to-stream conversion produces incorrect code if pattern variable is introduced
Also: pattern variable can be deleted via simple .delete()

GitOrigin-RevId: d3523f64d86de28d90b82d7bd98c1fd70567652d
2020-01-26 10:14:30 +00:00
Tagir Valeev
e542a2bf2f IDEA-231426 Inline pattern variable
GitOrigin-RevId: 8376adc5271b22d46cb50125b2d5243ab9e1a28e
2020-01-26 07:39:16 +00:00
Peter Gromov
d63c6a3bb8 fix syntheticEnumMethod.equals(null)
GitOrigin-RevId: 2d152a5d099fef7fe449ce29564c6adc0b296032
2020-01-24 20:36:29 +00:00
Tagir Valeev
e43800cb62 IDEA-230729 Good code red: Illegal generic type for instanceof
GitOrigin-RevId: 03fa8e1c2e663e50bd0968423fe07a9a7e05a0d1
2020-01-24 08:03:38 +00:00
Tagir Valeev
74aec9510c IDEA-231242 "Split filter chain" produces incompilable code when pattern variable is introduced
GitOrigin-RevId: e0fdf12f0c9bf9ce7986d76c2262328864f2af9c
2020-01-23 11:08:32 +00:00
Tagir Valeev
99e82547b1 IDEA-229896 Unused variables: adapt for pattern variables
GitOrigin-RevId: 78dfe45581f1ed84050635410f834f3195dabfe1
2020-01-23 05:01:48 +00:00
Anna Kozlova
bab23d2494 restore ContainerProvider.EP in java core environment to make following addExtension valid
GitOrigin-RevId: a79283a1ddddec6769d6099666bdffd24e00a582
2020-01-22 20:44:44 +00:00
Peter Gromov
75dce5e822 don't generate synthetic value* methods for cls anonymous enums
GitOrigin-RevId: ecac99579cb1fa4bfd1e9620c7b0866b2a220703
2020-01-22 19:02:10 +00:00
Peter Gromov
c4591288e9 remove unnecessary condition (IDEA-CR-57569 java: complete Object methods when superclass is unresolved)
GitOrigin-RevId: baccdecd51de038a94c41c4b6379afe0177bba6f
2020-01-22 12:34:07 +00:00
Tagir Valeev
681a58ab7b IDEA-230701 IDEA doesn't resolve pattern variable defined in labeled scope
GitOrigin-RevId: afd36dfb5a20200bcab13a0efdc8ddf4884d959e
2020-01-22 10:38:13 +00:00
Roman.Ivanov
cb17b00769 RecordAugmentProvider: minor, typo
GitOrigin-RevId: d1a4559e5227d00ab649154441eebdf2f96266bb
2020-01-22 09:07:29 +00:00
Roman.Ivanov
4ca2f3f1e4 RecordAugmentProvider: do not try to create record accessors if component's type text is "record" : EA-220606
GitOrigin-RevId: fda9e80ca8a752a3f84fa82bfcc98d9381c4bab0
2020-01-22 08:33:52 +00:00
Anna Kozlova
0efb0e0ec5 mark testFramework as unloadable
GitOrigin-RevId: 0f86d5f73fb66d8d8ad101f64b8257f0ff1f35c4
2020-01-21 19:47:45 +00:00
Vladimir Krivosheev
ba98224912 remove author (only some, where it is ok)
GitOrigin-RevId: 7dbab7524fe4efc5d17a04b95dee88b6f80fbe8d
2020-01-21 17:36:52 +00:00
Peter Gromov
801824e931 java: process on-demand static imports without calculating super substitutors (IDEA-228814)
GitOrigin-RevId: bde409b2068991b8e1fc8f7f5c999af76390db84
2020-01-21 16:06:19 +00:00
Peter Gromov
17ec7d383b equals/hashCode for java synthetic Enum methods that doesn't resolve anything
not only is it faster, but also otherwise IdempotenceChecker could resolve parameter types and thus go into infinite recursion when there's `import static ClassInCurrentFile.*`

GitOrigin-RevId: a0c4f503fc562719f0b1b9d4cef531ccf0045503
2020-01-21 16:06:19 +00:00
Peter Gromov
5f050f4232 java: complete Object methods when superclass is unresolved
because they're resolved, and such situation can happen during refactoring when working completion would be nice to have

GitOrigin-RevId: 2116771c804561643105580992183b8add83003a
2020-01-21 15:37:39 +00:00
Peter Gromov
6d71b92a62 make synthetic enum valueOf/values methods part of PsiClass#getMethods
because all other synthetic methods from records and plugins are also there
inspired by IDEA-CR-57031

GitOrigin-RevId: 9a8b345adaded83fe13980a28db5d9f9acc7450d
2020-01-21 06:38:24 +00:00
Tagir Valeev
10a753d85c LightParameterListBuilder: typo fixed
GitOrigin-RevId: e75179ed86928f8e5b35059d2bd93795edc72421
2020-01-20 07:41:05 +00:00
Tor Norbye
017704c1f2 NPE (IDEA-230923)
GitOrigin-RevId: d29a9a7867436579f998ab015c67653ed6c927a0
2020-01-17 22:42:17 +00:00
Tagir Valeev
010323473b JavaTypeRenameValidator
GitOrigin-RevId: 6b0a7491ab7caa81c4a5064cbccd363b47cd5f35
2020-01-17 11:12:57 +00:00
Tagir Valeev
34243206dc Report new restricted identifiers: 'yield' and 'record'.
Fixes IDEA-230808 Disallow usage of 'record' as type name
Fixes IDEA-226604 Disallow using the 'yield' as the class name since Java 14

GitOrigin-RevId: a97753893fd8d0dac98a1a76f499b8c9474c3a7f
2020-01-17 11:12:57 +00:00
Tagir Valeev
679098e3e1 IDEA-230560 IAE when apply quick-fix which makes record constructor public
GitOrigin-RevId: 501a9c5bd2fb5737f6c8997c11927467eff43eda
2020-01-17 06:42:32 +00:00
Tagir Valeev
a7e892e866 Exclude annotations from Java inference
GitOrigin-RevId: d3f8fc57ede5fd9579d3e15d0f43e717c438df29
2020-01-16 08:11:51 +00:00
Dmitro Batko
341b7b68be do not read content if composite class file builder is enabled and configuration is not changed
GitOrigin-RevId: 8c3e48c6fc1285d5affc5d074afd6210ae969068
2020-01-16 08:11:51 +00:00
Peter Gromov
6bbd84e9cb java: consider deepest qualifier for auto-import on completion (IDEA-230624)
GitOrigin-RevId: 8cb006428a6f92a929b6d916fbea26a95d293a0e
2020-01-16 08:11:51 +00:00
Tagir Valeev
22a4c90043 JavaSharedImplUtil#applyAnnotations: delegate to proper annotation provider for array types
GitOrigin-RevId: f697adebb28910de3bc7ce8e2e9daf9552915f86
2020-01-16 08:11:51 +00:00
Alexey Kudravtsev
0ac6e724c9 refine Processor type in method signatures in platform
GitOrigin-RevId: 7e66fa0f044e1f31a67cb2ab7ff3665a234efb79
2020-01-16 08:11:51 +00:00
Tagir Valeev
78a91459c4 Array annotations changed to type-use style (not compilable now)
GitOrigin-RevId: 68aa4ba200618083684599228e13dfdba35967a4
2020-01-16 08:11:51 +00:00
Tagir Valeev
7b91cc9300 Ignore annotations from expression constraints.
We don't account them correctly anyway: if two constraints produce the same type with different annotations the second one will be completely ignored. And it's completely unclear how to combine them properly. This depends on annotation semantics.

GitOrigin-RevId: 5d9c9818254e1fc991f144f136c292833753442b
2020-01-14 09:08:13 +00:00
Alexey Kudravtsev
c742284422 cleanup: avoid raw Class
GitOrigin-RevId: 37de478d00950d06863f935d7b0a43bdefbcbc29
2020-01-13 15:43:25 +00:00
sergey.vasiliev
45fdfe6f3c IDEA-208732 PsiInvalidElementAccessException on psi type parameter rename
GitOrigin-RevId: eea88f27c0083f801a6a8a1f7f4aef30aa82fcb1
2020-01-10 16:03:19 +00:00
Anna Kozlova
04a9d681c9 external annotations: support annotations on package (IDEA-230307)
GitOrigin-RevId: 3500b5e9b6534232da84c473906b95b7a4f82878
2020-01-09 16:10:01 +00:00
Tagir Valeev
10b86fbc30 IDEA-230315 Control flow for record compact constructor should take into account implicit assignments
GitOrigin-RevId: 31f268e2ffdb4a2d4d42288e5075e1eb52f4c137
2020-01-09 11:32:03 +00:00
Tagir Valeev
41aed1b9f0 PsiPatternVariable as PsiParameter
GitOrigin-RevId: 342b383b1769a15b288b0515bb892c43d796dbe1
2020-01-09 08:35:04 +00:00
Tagir Valeev
c6057afa02 JavaPsiRecordUtil#getComponentForField (IDEA-CR-56873)
GitOrigin-RevId: 21e4134777640a5cfc807009f833f4eb36d6bd7c
2020-01-09 07:05:05 +00:00
Anna.Kozlova
cc322f6a19 methodCall#getType optimisation: do not check applicability for non generic methods iff return type can't be erased
e.g. return type is primitive or doesn't have type arguments. Applicability check may be not cheap and type for the non-generic method call may be calculated e.g. during overload resolution where all caching is prohibited

GitOrigin-RevId: 1f34b840558e94c8ece821f7fdf61b9ccbda606d
2020-01-08 08:01:20 +00:00
Sergey Ignatov
4591f890b2 unify bundle names: rename java error bundle
GitOrigin-RevId: 4da165583299a5a856b369700dc6ee3c21df4d3a
2020-01-06 21:06:33 +00:00
Dmitry Jemerov
3bc0d542cc Allow load/unload for <referenceProviderType>
GitOrigin-RevId: eead38b75e16dc40c67cdf1ddc34625ce4a583e0
2020-01-03 23:34:16 +00:00
aleksandr.izmaylov
76ed4a9b85 uast: generate and analysis extension points are dynamic
GitOrigin-RevId: 26b86cc8188eb22f573b4c9c521ce0d3577bb2eb
2019-12-31 09:14:19 +00:00
Peter Gromov
4753992ebc Revert: java: process on-demand static imports without calculating super substitutors (IDEA-CR-57031)
because it breaks static importing of synthetic enum methods

GitOrigin-RevId: 6d62b4a22d39342d8c25a776973d23a15fbeb2c4
2019-12-30 13:34:33 +00:00
Peter Gromov
7fe869a860 java: process on-demand static imports without calculating super substitutors (part of IDEA-228814)
GitOrigin-RevId: 8815ab881f217a4e913016a6419646e8e20a5fb8
2019-12-28 21:05:33 +00:00
Tagir Valeev
43e64e1c56 Patterns resolve: stop at switch label; filter by name before doing control flow analysis when possible (IDEA-229846)
Review ID: IDEA-CR-56992

GitOrigin-RevId: 4264da45582f5d38e3b5630184d8ab762f30575b
2019-12-28 12:05:19 +00:00