Nikita Eshkeev and intellij-monorepo-bot
85c3473223
[codeInsight] IDEA-238740 Support the jdk.internal.PreviewFeature annotation
...
This patch adds check for of PreviewFeature for anonymous classes.
Signed-off-by: Nikita Eshkeev <nikita.eshkeev@jetbrains.com >
GitOrigin-RevId: db5fe980e3f83e0df05bd21ab063d2a2c2862d6b
2020-06-22 22:00:03 +03:00
Tagir Valeev and intellij-monorepo-bot
e027f98d6a
Disable field assignments in record compact constructors
...
Last piece of IDEA-239088
GitOrigin-RevId: 23c467c6c525d7908922bc2ebd8928205368dff7
2020-06-22 13:26:17 +03:00
Anna Kozlova and intellij-monorepo-bot
6472c347db
java: highlight enum constant name if empty arguments are not applicable to the constructor (IDEA-243927)
...
GitOrigin-RevId: 495516860c1d26dc090aa2f2ca4f8c2397fcb177
2020-06-22 12:35:57 +03:00
Peter Gromov and intellij-monorepo-bot
1182518e6b
JavaFunctionalExpressionIndex: don't throw on invalid code with lambdas outside members
...
GitOrigin-RevId: b2fac86f104ebf9d7a79dfc8136a69e7343adbb4
2020-06-19 19:49:34 +03:00
Nikita Eshkeev and intellij-monorepo-bot
5e222f56a9
[codeInsight] IDEA-238740 Support the jdk.internal.PreviewFeature annotation
...
This patch fixes the problems according to the code review, it includes:
- inlining the trivial wrapper methods checkConstructorPreviewFeature, checkMethodCallPreviewFeatureAnnotation, checkTypePreviewFeatureAnnotation
- applying ObjectUtils#tryCast in HighlightUtil#checkPackagePreviewFeatureAnnotation
- simplifying HighlightVisitorImpl#visitImportStaticStatement by calling directly HighlightUtil#checkPreviewFeatureElement
- generalizing HighlightVisitorImpl#visitReferenceExpression's check if the element is annotated with PreviewFeature
Signed-off-by: Nikita Eshkeev <nikita.eshkeev@jetbrains.com >
GitOrigin-RevId: 954ad1bbb26352d7d98581b3ad95a360569b0636
2020-06-19 14:20:28 +03:00
Tagir Valeev and intellij-monorepo-bot
547ebddae3
Record constructors access level for Java 15 (IDEA-239088)
...
GitOrigin-RevId: b8adab8548bcea21d2053606e058495e888199b7
2020-06-19 14:11:10 +03:00
Tagir Valeev and intellij-monorepo-bot
93dafadf4a
Update Override annotation support for Java 15 records (part of IDEA-239088)
...
GitOrigin-RevId: 16744c263f812eeaf19151fb2f46d95d0f994838
2020-06-19 09:43:18 +03:00
Nikita Eshkeev and intellij-monorepo-bot
ef90c9f857
[codeInsight] IDEA-238740 Support the jdk.internal.PreviewFeature annotation
...
This patch fixes the problems according to the code review, it includes:
- moving extractHighlightingFeature to HighlightingFeature and renaming it to fromPreviewFeatureAnnotation
- assuring the PreviewFeature annotation name by calling PsiAnnotation#hasQualifiedName instead of comparing the name by equals
- moving JDK_INTERNAL_PREVIEW_FEATURE to HighlightingFeature
- extracting repeating part of checking the language level to HighlightUtil#checkPreviewFeatureElement
- adding a new case "SEALED_CLASSES" to HighlightFeature#fromPreviewAnnotationName
In addition to that there is also more robust solution to detect invalid contexts in references and static imports. The test data updated accordingly.
Signed-off-by: Nikita Eshkeev <nikita.eshkeev@jetbrains.com >
GitOrigin-RevId: 999d43ec5d9315d0881d08ce9341433707de96a0
2020-06-18 23:18:40 +03:00
Nikita Eshkeev and intellij-monorepo-bot
6cdf8f6eef
[codeInsight] IDEA-238740 Support the jdk.internal.PreviewFeature annotation
...
This patch adds support of the jdk.internal.PreviewFeature annotation
Signed-off-by: Nikita Eshkeev <nikita.eshkeev@jetbrains.com >
GitOrigin-RevId: b2f56d62c3b12475690f667628811e5345b1d1cf
2020-06-18 01:19:37 +03:00
Peter Gromov and intellij-monorepo-bot
112cdd0579
java completion: prefer method reference suggestions with exactly matching return type (IDEA-210581)
...
GitOrigin-RevId: 5522e5c103b72ea9d1a7c9ae860e504b6515b1da
2020-06-17 20:39:35 +03:00
Peter Gromov and intellij-monorepo-bot
1ab76a3b95
Skip some invalid/meaningless .stream().* completion suggestions (IDEA-243790)
...
GitOrigin-RevId: e02ac9f63fd6384ffe3f27f5c4825ddc3a5af58e
2020-06-17 19:18:12 +03:00
Peter Gromov and intellij-monorepo-bot
b9525d143e
java completion: sort/filter suggestions after :: by their matching to the expected type (IDEA-166673)
...
GitOrigin-RevId: adaefc912e115826280976b23adee38483ca1f71
2020-06-17 17:01:52 +03:00
Tagir Valeev and intellij-monorepo-bot
91092e2ef7
MoveIntoIfBranchesAction: disable if if branch cannot complete normally
...
GitOrigin-RevId: 07c9d5a46c0ded0d1de27c0a0c4b372061b84917
2020-06-17 09:24:13 +03:00
Tagir Valeev and intellij-monorepo-bot
615388d9cb
ReuseVariableDeclarationFix: support array initializers
...
GitOrigin-RevId: 2b384594722e9e8b92792336b9e39a1479e5e8d4
2020-06-17 08:15:25 +03:00
Tagir Valeev and intellij-monorepo-bot
52cd7af434
CollapseIntoLoopAction: handle comments; handle case if x-th iteration equals to the first one
...
GitOrigin-RevId: 104dc5f3fec65604aef4288e24df1113227f8ac2
2020-06-17 07:41:40 +03:00
Tagir Valeev and intellij-monorepo-bot
f988f89bbd
Avoid suggesting counting loop if loop variable must be effectively final
...
GitOrigin-RevId: eb15165f5034fa75de9c9af97fb2707a233e9fe5
2020-06-17 07:41:39 +03:00
Tagir Valeev and intellij-monorepo-bot
868aa78cf3
CollapseIntoLoopAction: avoid counting loop for two iterations when step is not +1/-1
...
GitOrigin-RevId: d8aef85c6d2620a9dd7e9216932388672a049979
2020-06-17 07:41:38 +03:00
Tagir Valeev and intellij-monorepo-bot
7470db33d8
CollapseIntoLoopAction: use tracking equivalence checker
...
GitOrigin-RevId: e8194d0ed5c4603eacbb0d904232f79f6373e56a
2020-06-17 06:31:00 +03:00
Tagir Valeev and intellij-monorepo-bot
0322598dbc
CollapseIntoLoopAction: disable when expression refers to written variable
...
Also, EquivalenceChecker.getComplexElementDecision fixed
GitOrigin-RevId: 6848a57ddc1cf4992030fff614c246a6316f4807
2020-06-17 06:30:58 +03:00
Tagir Valeev and intellij-monorepo-bot
51cd561f79
CollapseIntoLoopAction: disable when expression is written
...
GitOrigin-RevId: aa405149d65d0e669bc18f87359f486981c1c899
2020-06-17 06:30:57 +03:00
Anna Kozlova and intellij-monorepo-bot
f1d7de98ed
java sealed types: permits list highlighting (IDEA-243471)
...
GitOrigin-RevId: ca4b23403d6926d1c093eb0e2774020a98d83773
2020-06-16 17:13:12 +03:00
Anna Kozlova and intellij-monorepo-bot
38766600e6
java sealed types: forbid creation of classes with names sealed/permits (IDEA-243472)
...
GitOrigin-RevId: 91ee5792232111671edbc376fb2b6ffeff2e9a50
2020-06-16 17:13:09 +03:00
Anna Kozlova and intellij-monorepo-bot
7d2384271f
java sealed types: check sealed class inheritors (IDEA-243536)
...
GitOrigin-RevId: 0390d8db04b10b8d5c1206987877d6356a93d535
2020-06-16 17:13:07 +03:00
Tagir Valeev and intellij-monorepo-bot
2072855222
IDEA-243546 Allow local interfaces and enums on language level 15-preview (part of JEP 384)
...
Also: fix non-static access checks for local interfaces/enums/records (JEP 384)
Also: i18n of error messages
GitOrigin-RevId: 40448f089229d77e32eb200b4011e1aea09391b0
2020-06-16 09:43:13 +03:00
Anna Kozlova and intellij-monorepo-bot
1b944210ef
java sealed types: ensure sealed class inheritors are sealed/non-sealed/final (IDEA-243536)
...
GitOrigin-RevId: 768635cd8a1b237893429ac1882296de8477536d
2020-06-16 00:04:16 +03:00
Anna Kozlova and intellij-monorepo-bot
7c64f7f035
java sealed types: forbid non-sealed classes without sealed supers (IDEA-243536)
...
GitOrigin-RevId: ce7b48fc5df80edf0a4efc987a23850aff993f6c
2020-06-16 00:04:15 +03:00
Anna Kozlova and intellij-monorepo-bot
2dcab690d5
java sealed types: functional interface can't be sealed (IDEA-243536)
...
GitOrigin-RevId: 7660808963e79d51b8d1507927d1095d119bcdb5
2020-06-16 00:04:15 +03:00
Tagir Valeev and intellij-monorepo-bot
8a7d1000b1
MoveIntoIfBranchesAction: conflict detection improved
...
GitOrigin-RevId: bf8c3d050e5cfa51e71d6e34921ab2c2036b8e5e
2020-06-15 10:59:08 +03:00
Anna Kozlova and intellij-monorepo-bot
9dd5c364a6
java sealed types: increase language level (IDEA-243474)
...
ensure records can be used with java 15 as well
GitOrigin-RevId: 5716dddb35ad9b2349e6558460897d650740fe1c
2020-06-14 22:02:45 +03:00
Anna Kozlova and intellij-monorepo-bot
6a1257e1a2
sealed types: highlighting basics (IJP-571)
...
GitOrigin-RevId: 362c7ea743e31eb2d27b73552534f2627991b602
2020-06-12 22:41:15 +03:00
Tagir Valeev and intellij-monorepo-bot
30b4657109
CollapseIntoLoopAction: support no-selection mode; disable if code can break the outer loop
...
GitOrigin-RevId: 87c99d17438c8db668e936f379f2edabde692c80
2020-06-11 10:01:42 +03:00
Tagir Valeev and intellij-monorepo-bot
ba72470db2
Suggest j and k for int type
...
GitOrigin-RevId: 964e58ddcbf7920d18274be6e05df40088f9ed32
2020-06-11 10:01:40 +03:00
Tagir Valeev and intellij-monorepo-bot
03db4748c0
IDEA-243025 Action to collapse several statements into a loop
...
GitOrigin-RevId: 5064b5ac2c2ec4390d9d082b7fded96e0c731732
2020-06-10 09:38:24 +03:00
Anna Kozlova and intellij-monorepo-bot
bb49afba0d
java: keep text blocks escapes as separate feature
...
GitOrigin-RevId: 086115a4a13b983c6a9f116253634fd15dab612e
2020-06-10 09:07:15 +03:00
Tagir Valeev and intellij-monorepo-bot
4440291577
IDEA-243021 Intention action to duplicate statement(s) into both 'if' branches
...
GitOrigin-RevId: dd97488c1ffef6880136db2b04052a36287653a6
2020-06-10 07:37:20 +03:00
Tagir Valeev and intellij-monorepo-bot
298c5663d5
IDEA-243020 Unroll loop: support enum.values()
...
GitOrigin-RevId: cd921c0446083fc0f81fdab57fd3b14b3d60f12b
2020-06-10 06:48:29 +03:00
Tagir Valeev and intellij-monorepo-bot
c180e2cec5
IDEA-243019 Unroll loop: get loop size from dataflow
...
GitOrigin-RevId: 0ba4a16c098414fcb539502446b6cd138922f398
2020-06-10 06:27:06 +03:00
Anna Kozlova and intellij-monorepo-bot
60f4542cda
language level 15, remove 13 preview
...
GitOrigin-RevId: 5e0277b784e6dfa59ad4eca16688bc3a40c04d60
2020-06-09 20:53:00 +03:00
Tagir Valeev and intellij-monorepo-bot
b0929155eb
IDEA-216467 "Lambda can be replaced with method reference" does not detect all cases with varargs
...
GitOrigin-RevId: 232800df8754a17bc8358640b675bc5a8903dfce
2020-06-09 12:46:23 +03:00
Nikita Eshkeev and intellij-monorepo-bot
d7ceab7d2d
[analysis] IDEA-241656 Provide a fix for "static member qualifying type may not be annotated"
...
This patch fixes notes from the code review, it includes:
1. moving MoveAnnotationOnStaticMemberQualifyingTypeFix to top level
2. reusing MoveAnnotationOnStaticMemberQualifyingTypeFix#getFamilyName in MoveAnnotationOnStaticMemberQualifyingTypeFix#getName
3. using PsiTreeUtil#findSiblingBackwards to find the rightmost dot token instead of custom code
4. removing redundant test data
Signed-off-by: Nikita Eshkeev <nikita.eshkeev@jetbrains.com >
GitOrigin-RevId: a539ed96c3883947b621525fc4bd017eefd7b458
2020-06-08 15:31:57 +03:00
Anna Kozlova and intellij-monorepo-bot
70232ecaa1
redundant type arguments: recapture captured wildcards for original elements (IDEA-242856)
...
GitOrigin-RevId: 6f2da6bbdbc50708571177d6ff5f279a4fee8eb1
2020-06-08 13:45:45 +03:00
Anna Kozlova and intellij-monorepo-bot
3a27230112
java: redundant explicit types: do not check parent call when expected type is known (IDEA-242819)
...
GitOrigin-RevId: c1df310c5834f632a02c09adf5126c7c75a3de81
2020-06-08 13:45:42 +03:00
Nikita Eshkeev and intellij-monorepo-bot
397638666d
[analysis] IDEA-241656 Provide a fix for "static member qualifying type may not be annotated"
...
This patch adds a quickfix for errors of the "static member qualifying type may not be annotated" type
Signed-off-by: Nikita Eshkeev <nikita.eshkeev@jetbrains.com >
GitOrigin-RevId: 9046c0c45d6a9d04058aae458f04b3f9fc0a5ad1
2020-06-08 09:05:53 +00:00
Peter Gromov and intellij-monorepo-bot
847bb51000
IDEA-188654 Stream API methods autocomplete
...
GitOrigin-RevId: c4e2caba222324726aad91148ab37c0acf4fd86a
2020-06-08 08:20:56 +00:00
Anna Kozlova and intellij-monorepo-bot
dadcc9adde
java: redundant type arguments: check that parent call substitutor remains the same (IDEA-241259)
...
GitOrigin-RevId: 8e0e8d23e2868a47a857fb84bfb3a43fc34263f6
2020-06-05 10:12:42 +03:00
Peter Gromov and intellij-monorepo-bot
29ef77afd0
IDEA-242422 ArrayIndexOutOfBoundsException in FunExprOccurrence
...
GitOrigin-RevId: d0b1b4e881c919d9e855f897452c371dd12f2a59
2020-06-03 15:56:48 +03:00
Nikita Eshkeev and intellij-monorepo-bot
6565d1d76e
[analysis] IDEA-240049 Don't report "foreach not applicable" if type being iterated is unresolved
...
This patch adds the support of intersection types as requested per the
code review
Signed-off-by: Nikita Eshkeev <nikita.eshkeev@jetbrains.com >
GitOrigin-RevId: eb4f8e42599d402d030b604548d6fd221d9a0448
2020-06-03 13:26:45 +03:00
Tagir Valeev and intellij-monorepo-bot
69a085809a
Fix end-of-line comment handling
...
GitOrigin-RevId: f982435cd3a1659b0a1be1970cd5807419f16ccd
2020-06-03 09:09:48 +03:00
Nikita Eshkeev and intellij-monorepo-bot
c732f70d00
[analysis] IDEA-240049 Don't report "foreach not applicable" if type being iterated is unresolved
...
This patch removes from being reported for-each iterated value the types
of which haven't been resolved it. It aims to reduce the number of
reported errors when a user copy-pastes a chunk of code from StackOverflow
or other sources.
Signed-off-by: Nikita Eshkeev <nikita.eshkeev@jetbrains.com >
GitOrigin-RevId: c2e5b9f29ee532212f2f6638d4bf08bb827a9002
2020-06-01 10:25:26 +03:00
Ilyas Selimov and intellij-monorepo-bot
5fbb440207
IDEA-228553 - fix a positive test on Paths.get
...
GitOrigin-RevId: 261c5649b2890b4a690a5ac916bc02c555af551e
2020-05-29 16:26:25 +03:00