Commit Graph

16106 Commits

Author SHA1 Message Date
Tagir Valeev
66d9488205 IDEA-229297 Add Java 14 records to "New Java class" view
GitOrigin-RevId: d8ef6eb06b177611917db94a00173698a8ceba23
2019-12-24 09:33:30 +00:00
Roman.Ivanov
7c03812823 AddParameterListFix: do not replace light element, insert after identifier instead
GitOrigin-RevId: c4c5791749a888bc6d7bb0df413066b769feeff7
2019-12-24 08:41:04 +00:00
Roman.Ivanov
2cc8b2c194 suggest AddEmptyRecordHeaderFix in case of no record header
GitOrigin-RevId: ac6a585e1ccdb091a02d49d2f8bf2e55bf2114cb
2019-12-24 08:41:04 +00:00
Tagir Valeev
774de2a61b OptionalIsPresentFix: remove problem type check to avoid DFA in write action
Fixes EA-220101 - F: PsiScopesUtil.setupAndRunProcessor

GitOrigin-RevId: 333593d5db77038a65642f62841f34a7ef40d35d
2019-12-24 08:41:04 +00:00
Tagir Valeev
84c1a10be9 IDEA-229694 Generate constructor for records: suggest generation of compact and canonical constructors
GitOrigin-RevId: 95e23c12711c867a1e1f41d42ee5f3cc87876b3d
2019-12-24 08:41:04 +00:00
Tagir Valeev
39fc484b5d Redundant null-check removed
GitOrigin-RevId: f538403ff225c4237ac5f49d91506108e49f24cd
2019-12-24 08:41:04 +00:00
Tagir Valeev
20630cfd4f IDEA-160797 Support Objects.requireNonNull as field initialization in constructor
GitOrigin-RevId: 738f0e842ded8e9d88ef4432cd6c093173400a89
2019-12-24 08:41:04 +00:00
Alexander Zolotov
89ac6b1727 Do not cache extensions in ConcatenationInjectorManager
GitOrigin-RevId: d78d5db5953936eecc01051f6fc4a8a3d68a05fd
2019-12-23 17:33:43 +00:00
Dmitry Batkovich
a82111b8ee fix compilation 2
GitOrigin-RevId: 07eb1ae4e1d3b046cc64bd75afe322fd6641eaac
2019-12-23 15:07:19 +00:00
Dmitry Batkovich
1c147101e4 allow to load multiple shared indexes
GitOrigin-RevId: 9b108cbe7c616a5f7885fb48f468b574a48626a2
2019-12-23 11:04:38 +00:00
Tagir Valeev
7753ee638a Generate getters without 'get' prefix for record components (IDEA-229300)
GitOrigin-RevId: 8014b1b605f78e5ccf0de97eabf894f5bc5a67c1
2019-12-23 09:33:29 +00:00
Tagir Valeev
13d082389a Suggest "implements" after record header; don't suggest "extends" for records and enums; don't suggest "class" after record header
Part of IDEA-229300

GitOrigin-RevId: 763781d7a37be1d3d5a4e8fd158471820e31372b
2019-12-23 09:33:29 +00:00
Tagir Valeev
fbc82fc76f DfaPsiType removed; TypeConstraint#Exact now serves as DfaPsiType
No factory dependency in TypeConstraint and DfType anymore

GitOrigin-RevId: 2519a6ae131af2f80ef00e867c255bbbf46f477a
2019-12-22 08:42:08 +00:00
Roman Shevchenko
755e8e13d8 [java] making JavaSdkImpl#getToolsPath return correct value (i.e. null) on 9+
GitOrigin-RevId: 5d41b5310bbf396a8f937c75f94cb705b2117403
2019-12-20 19:31:06 +00:00
Roman Shevchenko
7a095b84c3 Cleanup (warnings; minor optimization)
GitOrigin-RevId: 17adfdb304a61f2aca08a906bb3e5775f5156a05
2019-12-20 14:44:33 +00:00
Sergey Ignatov
3b0b8cc7fc more dynamic bundles
GitOrigin-RevId: 25c80a7d911c36dbee7395c1110306dc421ac222
2019-12-18 19:31:34 +00:00
Dmitry Jemerov
645fc377b2 Fix NPE in Java navbar update
GitOrigin-RevId: d39225c6f2604d034bb9769471ea15ed58626d6c
2019-12-18 14:32:21 +00:00
Tagir Valeev
662cb5deae Handle compact constructor in regular class: quick-fix to add () (IDEA-228460)
GitOrigin-RevId: c019e19e8023c0209f6e5ed54f8a486689bb0e0a
2019-12-18 11:37:51 +00:00
Roman.Ivanov
40915b2a6e IDEA-229300: Completion of primitives in record headers
GitOrigin-RevId: 1a0444fb051749998c6376f95375ae005459a0ac
2019-12-18 10:32:28 +00:00
Eugene Petrenko
a85c7e3882 deregister SetupJDKFix.java, we offer new actions for that
GitOrigin-RevId: 852468e60f11734314453c9bec155ac2c35bd144
2019-12-18 10:32:28 +00:00
Eugene Petrenko
c324d2d27f deprecate SdkSetupNotificationProvider, remove SdkSetupNotificationProvider, inline JavaFxProjectSdkSetupValidator
GitOrigin-RevId: 54b8cef494de3cc8537db2ca3add5c93940514d9
2019-12-18 10:32:28 +00:00
Tagir Valeev
028a78cae3 Error highlighting for records: record bodies, record members (8.10.2, 8.10.3) IDEA-228460
Also ChangeModifierIntention: do not suggest to change component accessor access modifier
Also AddExceptionToThrowsFix: do not suggest to add throws to component accessor

GitOrigin-RevId: 6ce3d43f5160c075a2c66ac01af895a1212cc9a3
2019-12-18 06:32:21 +00:00
Peter Gromov
6cc489a8ed java inspections & fixes: get rid of deprecated transaction calls
GitOrigin-RevId: 1b15e43b507de3ce59ca2e25dbbe45d0a5f6d3f3
2019-12-17 21:33:47 +00:00
Bas Leijdekkers
74a44f32bc Bigger activation area when "no highlighting, only fix" (IDEA-229344)
in "Text block can be used" inspection

GitOrigin-RevId: cedb8829c519f404ab9f6c77c2085c810e50948c
2019-12-17 17:13:56 +00:00
Dmitry Jemerov
f782f4f7c8 Option to show members in navbar (for now only for Java)
GitOrigin-RevId: bb60375f651235dc00029b91b7f871a075199ba9
2019-12-17 11:33:23 +00:00
Vladimir Krivosheev
9f07af0dd8 cleanup
GitOrigin-RevId: a246dc2aaa0c8ec1126ca9c8b0d923b85cdce0b3
2019-12-17 08:34:19 +00:00
Tagir Valeev
fb8f978e49 inlineMethodCall: encodeContextInfo for prepared block
Sometimes during the transformations we generate statements/expressions from text, thus context info is not preserved. Luckily it could be encoded after the preparation.
Fixes IDEA-228512 Method inlining may behave incorrectly when return type is ignored

GitOrigin-RevId: 58cc2013cd6286be88e9d85b2b7ec69e08d1815f
2019-12-17 02:13:27 +00:00
Stanislav Utikeev
fd34443bd8 Make PsiEditorUtil.findEditor(PsiElement) static method
GitOrigin-RevId: fe02ca11f5f9b6df71b509f411588fdf4733a38c
2019-12-16 15:36:47 +00:00
Stanislav Utikeev
5ed91a34a9 Replace deprecated PsiUtilBase#findEditor with PsiEditorUtil#findEditorByPsiElement
GitOrigin-RevId: 13c4098b91bde7722c462a21c26b35d9cd4ab7c6
2019-12-16 15:36:47 +00:00
Roman Shevchenko
d7d803d9d4 Cleanup (unreachable code)
GitOrigin-RevId: 0092215a00f3d46ff7791076aec4b4931c3855a4
2019-12-16 15:01:24 +00:00
Tagir Valeev
5b61d8b48c JavaSliceNullnessAnalyzer: delegate to getExpressionNullability.
The following results were changed for testNullness() test:
CON was: UNKNOWN, now NOT_NULL (it's final and assigned to "")
other was: UNKNOWN, now NULLABLE (it's g == "" ? CON : g; and g was checked for null before)
t == null ? "null" : t was: UNKNOWN, now: NOT_NULL

Also checkStructure updated to simplify applying changes to expected structure

GitOrigin-RevId: 4d76f421cbcfd06d7b158a251e38dc110cc03185
2019-12-16 07:32:45 +00:00
Tagir Valeev
5fe8a10ba4 ExtractMethodProcessor: avoid using ValuableDataflowRunner
GitOrigin-RevId: e781630867ce02209b0c447a98ea9dc2868e4b80
2019-12-16 07:32:45 +00:00
Artemiy Sartakov
2036bcb557 TextBlockMigrationInspection: split text block lines by line breaks, exclude blank last line from indent calculation
GitOrigin-RevId: 5e99b3126a5803e5d4a85b8c5d30d5dde79c8e76
2019-12-16 07:11:50 +00:00
Vladimir Krivosheev
a8ef074d02 convert ArtifactManager and CompilerConfiguration to services
GitOrigin-RevId: 355d9d66ae79cc582840bc469b024683d634b037
2019-12-14 07:11:32 +00:00
Roman Shevchenko
fcfe92f31b [java] do not suggest JPMS options in the undocumented format (IDEA-224965)
GitOrigin-RevId: 2ada5760d7e1441294722ce1f36cb980bb06d9dc
2019-12-13 14:32:00 +00:00
Marat Khabibullin
60023baef9 Refactor: reuse PsiImplementationViewSession.getElementAndReference in ShowSiblingsAction
GitOrigin-RevId: 24af3105b2ee041b78ee89d7d819b3f7e4901281
2019-12-11 17:04:21 +00:00
Tagir Valeev
c79e23a713 Dataflow refactoring: DfaFactMap => DfType
GitOrigin-RevId: 3ef9e633dc92929191cc5724109b3575bf6d12a1
2019-12-11 09:07:22 +00:00
Anna Kozlova
abc4a9ae72 no need in overriding getDisplayName for inspections
in production InspectionEP#displayName should be used; highlighting tests just do not use default names

GitOrigin-RevId: f0c172e568219499e7b96982fe352c7d1d3acc69
2019-12-11 08:03:54 +00:00
Roman.Ivanov
e2bb8d31e0 fix instanceof expressions usages not expecting pattern as parent
GitOrigin-RevId: 015e19f2ca9617f54de06a01be3c23f0be3bcb61
2019-12-11 05:14:21 +00:00
Roman Shevchenko
bbb6dd9f83 [platform] unifying com.intellij.openapi.util.Pair extensions in a correct package
GitOrigin-RevId: 02fd5518b928efb106936c88f93ec2348a1ee400
2019-12-10 18:38:18 +00:00
Eugene Petrenko
1a50b375d9 Revert "reverted as causing leaks in tests"
This reverts commit a1ba2888c0253e1795d06b57bda91d1d44113e9f.

GitOrigin-RevId: 150b22361eae5df73fec58eb4ce6a84e96e02b9d
2019-12-10 13:37:07 +00:00
Alexey Kudravtsev
bf8c43a075 reverted as causing leaks in tests
GitOrigin-RevId: a1ba2888c0253e1795d06b57bda91d1d44113e9f
2019-12-10 12:38:34 +00:00
Dmitry Batrak
471bfaa0fd EA-127880 - PIEAE: CompositePsiElement.getContainingFile
GitOrigin-RevId: 4ef7e58976a0a96a8f03897046f431c824998c26
2019-12-10 12:06:30 +00:00
Eugene Petrenko
1a91259be7 jdk-auto - feature toggle
GitOrigin-RevId: 7e1866c7304d79e740373793e3ee230dd9f9e8e2
2019-12-10 11:35:06 +00:00
Eugene Petrenko
0a4380f983 jdk-auto - automatically install missing JDKs
We use the following approach:
- SDK name is a requirement
- we try to match local SDKs to the requirement
- we try to match downloadable JDKs to the requirement
The first successful option is used. None match is also OK.

IDEA-227959

GitOrigin-RevId: 7a6eb1c1328052285b6c08fd8dd180f7476ffb42
2019-12-10 11:35:06 +00:00
Artemiy Sartakov
a824548d9d TextBlockMigrationInspection: fixed indent calculation for concatenations with blank lines
GitOrigin-RevId: ec7b0b827a1d1f6aa95692c80e805429cf73858d
2019-12-10 06:42:18 +00:00
Dmitry Batrak
a59f375017 EA-128855 - assert: InlayModelWindow.logUnsupported
GitOrigin-RevId: c711c30890421bea9997547b1c289a685c2510a7
2019-12-09 17:04:58 +00:00
Eugene Petrenko
b744627310 move JdskDetector to SdkDetector into lang-impl
GitOrigin-RevId: dc45e5e381e19fd7b32f32d3aa55acc84cd7c708
2019-12-09 11:01:54 +00:00
Vladimir Krivosheev
b4425ec731 pass project explicitly and do not rely on ProjectLocator
GitOrigin-RevId: 4e58147dc24b3df92da056a62d8846acc8937481
2019-12-08 18:06:17 +00:00
Vladimir Krivosheev
735c98d153 run dynamically registered dumb-aware post startup activities not in EDT
GitOrigin-RevId: c7e7799da7ee1dce561ba6fe8fb7df71523852de
2019-12-08 18:06:17 +00:00