Anna Kozlova
346117a1a4
[java highlighting] cleanup localization
...
GitOrigin-RevId: d4965e8f099f8070449a66a507f868f73b5af0a9
2021-06-30 14:01:21 +00:00
Anna Kozlova
4b7f896333
[java highlighting] skip anonymous class context for its expression list (IDEA-272378)
...
GitOrigin-RevId: 5d8e034a4c550aed057ad860bdbaf1645118e5b3
2021-06-30 14:01:18 +00:00
Roman Shevchenko
95a0f1443a
[java] more diagnostic for Java modules in vacuum (EA-320433)
...
GitOrigin-RevId: cebf7f48b5cadecaf84adf9977c60c2e03719655
2021-06-29 11:39:40 +00:00
Ilyas Selimov
a508d00a25
IDEA-270438 - fixed totality for arrays
...
GitOrigin-RevId: 991b05698d1fe95155986e6669e60d46c713b588
2021-06-28 12:14:26 +00:00
Ilyas Selimov
85ec7337d1
IDEA-270438 - fixed assignability in switch, added check for selector types
...
GitOrigin-RevId: 810891b03c0f6274ddc60225ec9e6079405e639c
2021-06-28 12:14:22 +00:00
Ilyas Selimov
7fa76d8c9c
IDEA-270438 - fixed completeness and tests
...
GitOrigin-RevId: 6e920fc66d916e9bf9f7795eaf426c7ec3532b4d
2021-06-27 13:59:32 +00:00
Ilyas Selimov
5ad49432ce
IDEA-270438 - removed duplicates, refactoring, misc fixes
...
GitOrigin-RevId: 0e6b3bf43f3caa3245c03db339700971534616b2
2021-06-27 13:46:02 +00:00
Anna Kozlova
2ed985df02
CCE
...
GitOrigin-RevId: a880d91eba6a0bb8f7e6ddcdfd452dfa0256689a
2021-06-24 19:04:35 +00:00
Anna Kozlova
7ca154d44b
EA-290594 (plugin) - CCE: RefactoringChangeUtil.getTypeByExpression
...
GitOrigin-RevId: 35f9b45fd23720d9387794faf253960ffa42a8ca
2021-06-24 16:55:56 +00:00
Roman Shevchenko
afc915c383
Cleanup (typos; formatting)
...
GitOrigin-RevId: 83452f6abf7d6f4ffb1359352067446717b76e39
2021-06-24 14:01:17 +00:00
Ilyas Selimov
4ef6b0a83d
IDEA-270438 - initial completeness for enums
...
GitOrigin-RevId: 0dc7e2291065f7048317ed827ad47b287fef6568
2021-06-23 18:00:53 +00:00
Ilyas Selimov
6ac057e620
IDEA-270438 - initial highlighting for switch patterns
...
Includes dominance, fall-through rules, completeness doesn't work, new quick fixes doesn't exist
GitOrigin-RevId: dcdd00ee8204fac5d9d172f5e71281887645cccd
2021-06-23 10:21:25 +00:00
Roman Ivanov
895ba21929
[java] better parser recovery when param list ends with ;
...
IDEA-270332
GitOrigin-RevId: ffbb52c67373a7af7c63bdca568d0c2a5b5286f6
2021-06-23 09:20:30 +00:00
Nikita Eshkeev
0e5e22a101
[java][resolve] IDEA-271676 Pattern matching for switch: fix resolve
...
Fix the resolution algorithm for both switch statements and switch expressions. The main obstacle is that the handler of a case expression is a child node of the labeled case rule and the handler of a case statement is the right sibling of the labeled case rule.
The fact that a case handler is the right sibling of a labeled case rule in switch statements complicates the resolving, because the scope of a pattern variable is bound only to the immediate case handler and cannot be accessible from different case handler, which might be invoked when there is no `break` statements between case rules. In order to restrict the scope of a pattern variable in a switch statement the following check is added: check if the analyzed PsiSwitchLabeledStatement is not followed by any other case rules and if so try to resolve an element using its pattern variables.
The scope of pattern variables for PsiSwitchLabeledRuleStatements is restricted only to their case handlers, so the resolve works there only if the lastParent is not null, which, according to the contract, contains the case's handler.
Signed-off-by: Nikita Eshkeev <nikita.eshkeev@jetbrains.com >
GitOrigin-RevId: 084b8b679b4070a67a996c3b50992622025d96ee
2021-06-23 00:33:25 +00:00
Nikita Eshkeev
07527dcb8f
[java][resolve] IDEA-271676 Pattern matching for switch: fix resolve
...
Clean up the code
GitOrigin-RevId: d44cb088a62590aa96452488eec86a261fd3bd94
2021-06-19 21:54:54 +00:00
Nikita Eshkeev
e0970fca77
[java][resolve] IDEA-271676 Pattern matching for switch: fix resolve
...
Fix the resolve algorithm according to [JEP 406](https://openjdk.java.net/jeps/406 ). It includes:
- The correct resolution of variables in pattern matching guards in both if and switch
- Restricting the maximal scope of resolving by the PsiSwitchLabeledRuleStatement
- Various tests for resolving variable in pattern matching for switch
Signed-off-by: Nikita Eshkeev <nikita.eshkeev@jetbrains.com >
GitOrigin-RevId: 1efb10f50a458a382a71ffeaef5a0f540b4a8893
2021-06-19 21:31:03 +00:00
Roman Ivanov
ec1e06c7f2
[java] LightExpressionList: add comment about compatibility
...
GitOrigin-RevId: 380fab4cb53ce7f2ced3743e71cde5e56504f7e7
2021-06-18 16:15:46 +00:00
Nikita Eshkeev
aff8571fd9
[vcs][properties] IDEA-270602 Optimize precommit code analysis for property files
...
Enable the check if properties are used in a project only for changed or added properties by default
Signed-off-by: Nikita Eshkeev <nikita.eshkeev@jetbrains.com >
GitOrigin-RevId: 6d336d0bb803543c3627c23923605d0d6827dc86
2021-06-17 22:59:22 +00:00
Roman Ivanov
3904bfee9e
[java] make type element and pattern in PsiTypeTestPattern nullable
...
to ensure that parser will have enough space for development
GitOrigin-RevId: f7831a41332dc9c2b8619f6a30c98366faaf30e9
2021-06-14 17:31:49 +00:00
Roman Ivanov
d2b1cdd3b5
[java] bump stub version, changed case label list structure
...
GitOrigin-RevId: 6aeeeabf991d8533fd7a836d2bf00cd66ad5132d
2021-06-11 17:51:39 +00:00
Roman Ivanov
6371cde54c
[java] fix usages after changing PSI structure
...
earlier we had PsiExpressionList, now it is PsiCaseLabelElementList
GitOrigin-RevId: 14b06afe93d631d12048539704cd6e71efc5d4ef
2021-06-11 17:35:47 +00:00
Roman Ivanov
e60c890f45
[java] PsiDefaultElement ->PsiDefaultCaseLabelElement
...
GitOrigin-RevId: 1ec42a39b2271a829d9dff6891a39f26e12aa4b7
2021-06-11 17:35:39 +00:00
Roman Ivanov
9c1c871b42
[java] return light expression list for compatibility in PsiSwitchLabelStatement
...
GitOrigin-RevId: be6ec0ee5748fa877060f0c861e7e5031899cab1
2021-06-11 17:35:34 +00:00
Roman Ivanov
e4a5926871
[java] consistently parse switch label element list, not expression list
...
GitOrigin-RevId: 5c6468b3a47724b267abe782a74265833ac0bd19
2021-06-11 17:35:30 +00:00
Anna Kozlova
2593f96146
[code cleanup] remove redundant final modifiers for methods in final classes
...
GitOrigin-RevId: dc7f18dafcc1b970b1ed4fc7316839ea983f68d7
2021-06-11 07:48:56 +00:00
Tagir Valeev
83c3415a0c
Reduce unnecessary fully-qualified names usage
...
GitOrigin-RevId: 2a31cdd2dcfb7218c1d32c34e24edecd178ff976
2021-06-10 07:12:15 +00:00
Anna Kozlova
1babdadeda
language level 17 (IDEA-271016)
...
GitOrigin-RevId: e2e25300af432efa580e4f082492f522f2d23b8e
2021-06-08 16:52:50 +00:00
Roman Ivanov
0ff1449da5
Java: bump stub version (support patterns)
...
GitOrigin-RevId: 607e0971fd72589ba17fccdb33542b5a365d237c
2021-06-07 22:03:19 +00:00
Roman Ivanov
b0c06fb103
java PSI: remove pattern variable according to new structure of PSI
...
GitOrigin-RevId: 7f23daf721c067d3ccd6c8aeb3036b299c54cc82
2021-06-07 22:03:17 +00:00
Roman Ivanov
31362f1667
java PSI: remove null element (redundant)
...
GitOrigin-RevId: 42aaae27cc487dbcb0aa8424be0b617a3f6448b4
2021-06-07 22:03:16 +00:00
Roman Ivanov
1ef7d7e9cb
java PSI: make getPatternVariable NotNull
...
reason: now PsiTypeTestPattern is not returned for simple instanceof
GitOrigin-RevId: d7874d96f8f01489034884238ea908b0059e2c3a
2021-06-07 22:03:13 +00:00
Roman Ivanov
47c93f2b2d
java parser: simplify, remove never executed code
...
GitOrigin-RevId: 4e5db72fe966d4116fce49d856c1b0e8bf6c10ae
2021-06-07 22:03:12 +00:00
Roman Ivanov
f69f404dfa
java PSI: rename null and default case label elements
...
GitOrigin-RevId: 17eb082cacbbb713bd31c83e356c2e9b3f80bfdd
2021-06-07 22:03:09 +00:00
Roman Ivanov
821794348f
Java parser: remove different parsing basing on language level
...
GitOrigin-RevId: e4e2d5251c298587d3cba36d9dd1fefea2bbb20b
2021-06-07 22:03:07 +00:00
Roman Ivanov
8bf09153a8
Java PSI: add contracts and fix typo
...
GitOrigin-RevId: 13589b6e1746eda2ca07491af5a70554dc8f1498
2021-06-07 22:03:04 +00:00
Roman Ivanov
feb02ace97
Java: implement PSI for pattern matching in switch : IDEA-270060
...
GitOrigin-RevId: cd993242d0d5a02fc024be55512da84dd353a0cd
2021-06-07 22:03:03 +00:00
Roman Ivanov
b0769e53fa
Java: implement parser for pattern matching in switch : IDEA-270060
...
GitOrigin-RevId: 586fe6199e79db35098202959c3aeaab2c0ada1f
2021-06-07 22:03:01 +00:00
Roman Ivanov
c67d7fae83
JavaParser: drop outdated code
...
GitOrigin-RevId: 1d01428deb2525a7eb78bb38e6b5d45d752e5b76
2021-06-07 22:03:00 +00:00
Rustam Vishnyakov
d14f0b85f6
Remove usages of deprecated code style API methods and classes
...
GitOrigin-RevId: 55d90f8ecbf6edd5d6db8517271a0626ecd96ff5
2021-06-05 11:41:03 +00:00
Anna Kozlova
0419624332
[java] add javadoc: treat multiple declaration fields similar to everything else (IDEA-270193)
...
GitOrigin-RevId: 730f8ee85a808be2803c59bd5f8593f9a499703a
2021-06-02 11:19:29 +00:00
Roman Shevchenko
b83882c467
[java] PsiJavaModule without a virtual file diagnostics (EA-267003)
...
GitOrigin-RevId: b9017374ada2a54728db8244589716ceb40c2560
2021-05-28 20:15:40 +00:00
Tagir Valeev
a3e35cab9a
Fix condition covered by further condition
...
GitOrigin-RevId: b41fb4d322aa837a3fa326fda7d6e7a362c14a65
2021-05-26 09:46:59 +00:00
Anna Kozlova
358f9086ce
java inference: allow unresolved type parameters during potential compatibility check (IDEA-268866)
...
GitOrigin-RevId: f38e13385d534b025f8072e29a3558b0f2ecf4e7
2021-05-24 17:22:45 +00:00
Alexey Kudravtsev
100a7fd754
fix compilation
...
GitOrigin-RevId: 7d9311c21c4325f85e25de41257b7db2cbb96795
2021-05-20 16:30:59 +00:00
Nikolay Chashnikov
79b9f3001f
[java] API cleanup: remove deprecated API which is scheduled for removal in 2021.2 (IDEA-262168)
...
GitOrigin-RevId: 49db9ec64c151223861ce5c23350fec7397a9496
2021-05-18 05:12:21 +00:00
Tagir Valeev
d3f08b31a5
Avoid obsolete collection usages, other warnings fixed
...
GitOrigin-RevId: baf88aad7e001b940a13f619d1f96dac7d7af145
2021-05-13 11:16:59 +00:00
Alexey Kudravtsev
c0f5607283
rename skipXXX to showXXX for consistency with other parameter names in DebugUtil
...
GitOrigin-RevId: 83990991cd17c661bf6ea85b54125c09741d90ec
2021-05-11 12:52:02 +00:00
Anna Kozlova
c725ece8e6
shebang: fix autocompletion (IDEA-265135)
...
don't scheduler reparse for non-physical files without origin file. Such files are created by postfix completion but then `writeAction()` inside `invokeLater()` would cancel each attempt to show autocompletion popup. At the same time caching here is not required, cause the origin file will be provided right after return from `createFileFromText()``
GitOrigin-RevId: fed9b10e3c5e49bb39881435e90cea9376e6ecab
2021-05-11 09:29:10 +00:00
Daniil Ovchinnikov
ac46d47455
PsiElement: return Collection from #getOwnDeclarations and #getOwnReferences
...
GitOrigin-RevId: ef5eac8d2bbbd51e22ce8f1081122463d52db820
2021-05-10 17:28:07 +00:00
Tagir Valeev
adb626cdc5
[java] PsiGraphInferenceHelper#getSubstitutionForTypeParameter: fast-check for assignability
...
GitOrigin-RevId: fd3b71f2459ec7ae5f037c9800bc76547963fb71
2021-05-07 09:46:32 +00:00