Toshiaki Kameyama
c72622c6d7
KT-32551 New J2K: Non-canonical modifiers order inspection is not applied during convertion of inner super class ( #2806 )
...
New J2K: add SortModifiers inspection to post-processing
#KT-32551 Fixed
2019-11-27 16:08:54 +03:00
Mikhail Zarechenskiy
e0fb586aaf
[NI] Don't loose diagnostic after type variable fixation
...
#KT-24488 Fixed
2019-10-31 11:32:02 +03:00
Ilya Kirillov
1ec620b753
New J2K: fix SOE in inference processing for star-projection as type argument
...
#KT-33942 fixed
#KT-33941 fixed
2019-10-12 15:28:03 +03:00
Ilya Kirillov
b350515237
New J2K: make post-processing aware of other files which are being converted
...
Before post-processing was able to handle only one converting file at once
So, some conversions (like (field, getter, setter) to Kotlin property)
was not able to work when converting class hierarchy was split into
multiple files.
Also, inferring nullability for a set of files was broken
#KT-19569 fixed
#KT-34266 fixed
#KT-32518 fixed
2019-10-12 12:50:34 +03:00
Ilya Kirillov
f951ed9dba
New J2K: introduce external code processing for new J2K
...
It will update usages from files not in conversion scope to a valid ones:
1. When converting (field, getter, setter) triple from Java to a Kotlin property,
it will:
1. Update every usage of getter/setter in Java/Kotlin code to a usage of actual property
2. If property is used in Java directly then will add @JvmField to it
2. When converting static method or static field without getter and setter, which has Java usages then add @JvmStatic to it
#KT-34164 fixed
2019-10-12 12:50:33 +03:00
Ilya Kirillov
7535c2f249
New J2K: fix expose internal/private type errors
2019-10-12 12:50:33 +03:00
Ilya Kirillov
f77825b85a
New J2K: remove RedundantCompanionReferenceInspectionBasedProcessing as it already applied on shortening references
2019-09-29 11:39:39 +03:00
Ilya Kirillov
aaf05d5eb2
New J2K: reduce count of post-processing groups
2019-09-29 11:39:38 +03:00
Ilya Kirillov
043a669812
New J2K: do not print qualified names if corresponding qualifier can unambiguously resolved
...
This speeds up shortening qualified references phase
2019-09-29 11:39:37 +03:00
Ilya Kirillov
678cc35008
New J2K: reuse already calculated type arguments in inference post-processing
2019-09-29 11:39:36 +03:00
Ilya Kirillov
37ee81dfa1
New J2K: use Java classes for instance checking instead of Kotlin ones
2019-09-29 11:39:35 +03:00
Ilya Kirillov
392a75e6b8
New J2K: use KotlinExceptionWithAttachments to report tree building errors
...
Also, try not to throw exceptions when possible
2019-09-29 11:39:34 +03:00
Ilya Kirillov
4e27d2e658
New J2K: do not use global write action for some post-processings which may use resolving while applying
...
Also, modify that post-processings & inspections to explicitly use write action
when modifying PSI elements
#KT-33875 fixed
2019-09-24 17:21:49 +03:00
Ilya Kirillov
74ba5b210a
New J2K: do not analyze code for post-processings in edt thread
2019-09-24 17:21:48 +03:00
Ilya Kirillov
e6f2e0041c
New J2K: get rid of generalInspectionPostProcessing
2019-09-24 17:21:47 +03:00
Ilya Kirillov
3724e2bb02
New J2K: convert all custom post-processing to applicability based ones
2019-09-24 17:21:46 +03:00
Ilya Kirillov
8dce22c335
New J2K: use proper resolution facade when getting class reference in inference post-processing
2019-09-17 11:56:07 +03:00
Ilya Kirillov
5d6cf34045
New J2K: consider that type argument may be null in inference post-processing
2019-09-17 11:56:06 +03:00
Ilya Kirillov
5d99419e9c
New J2K: check call name before resolving in post-processing
2019-09-10 14:09:29 +03:00
Ilya Kirillov
f61bb5aa39
New J2K: implement mutability inference in post-processing
...
#KT-24293 fixed
#KT-19603 fixed
2019-09-10 14:09:26 +03:00
Ilya Kirillov
c28515be59
New J2K: use nullable type for unknown for public declarations & prepare for mutability inference
...
#KT-32518 fixed
2019-09-10 14:09:25 +03:00
Ilya Kirillov
78b0d5750b
New J2K: consider literal expressions in data class conversion & fix names conflict
...
#KT-32253 fixed
2019-08-29 11:31:55 +03:00
Ilya Kirillov
405a3beeab
New J2K: move helper functions to corresponding files & use better names for tree nodes files
2019-08-29 11:31:54 +03:00
Ilya Kirillov
64ecbd1418
New J2K: use internal getStrictParentOfType instead of custom one
2019-08-29 11:31:54 +03:00
Ilya Kirillov
982e7fdd86
New J2K: do not shorten class references for some Java primitive class wrappers classes
...
It may cause unresolved call errors
#KT-33500 fixed
2019-08-29 11:31:53 +03:00
Ilya Kirillov
09ab98a4f8
New J2K: Don't fail on captured types & don't use functional interface with captured types
...
Note: we have to print captured types for lambda parameters.
It is needed for nullability inference as it requires explicit types specification to work.
Later in post-processing we remove explicit type specifications for lambda parameters which have captured types
#KT-33186 fixed
2019-08-09 16:31:58 +03:00
Toshiaki Kameyama
154cf46f7c
New J2K: add ReplaceGuardClause inspection to post-processing
...
#KT-22412 Fixed
2019-08-09 00:43:28 +03:00
Toshiaki Kameyama
f5c0a30c51
Add intention to replace "Map.getOrDefault"
...
#KT-21503 Fixed
2019-08-07 17:38:15 +03:00
Ilya Kirillov
2bd5a1f196
New J2K: separate nullability inference from common one & nullability bug fixes
...
It will be needed for structure mutability inference
#KT-21467 fixed
#KT-32609 fixed
#KT-32572 fixed
#KT-24677 fixed
2019-07-25 14:34:35 +03:00
Ilya Kirillov
c865d74965
New J2K: remove unused dependencies from nj2k modules
2019-07-25 14:34:34 +03:00
Ilya Kirillov
9d6338afb2
New J2K: do not fail conversion if some of post-processings throws exception
2019-07-10 13:16:53 +03:00
Ilya Kirillov
a9865e5d7b
New J2K: check for element validity before applying fix in diagnostic-based post processings
2019-07-10 13:16:53 +03:00
Ilya Kirillov
934425e86a
New J2K: rearrange and optimize some post-processings
2019-07-10 13:16:52 +03:00
Ilya Kirillov
370f113b78
New J2K: run add/remove modifiers post-processings only single time && do not call resolve in them for some corner cases
2019-07-10 13:16:52 +03:00
Ilya Kirillov
3e04bfb156
New J2K: do not print modifiers which are going to be removed in postprocessing
2019-07-10 13:16:52 +03:00
Ilya Kirillov
dc469cbdbf
New J2K: remove incorrect modifiers in post processing
2019-06-26 18:36:05 +03:00
Ilya Kirillov
3beef2b22e
New J2K: do not apply diagnostic based inspections if target element is not in the converting range
2019-06-26 18:36:05 +03:00
Ilya Kirillov
1b681a7dd6
New J2K: correctly handle empty range marker in post processings
2019-06-26 18:36:05 +03:00
Nikolay Krasko
beb1bc09d4
Update to 192.5118.30
2019-06-25 11:48:59 +03:00
Ilya Kirillov
2dd604cd70
New J2K, minor: remove unused declarations, fix typos
2019-06-11 18:16:06 +03:00
Ilya Kirillov
b80f2c78a0
New J2K, minor: reformat code, optimize imports
2019-06-11 18:16:06 +03:00
Ilya Kirillov
59f66d5882
New J2K: split diagnostic based processing from inspection ones
...
Analysing file file with diagnostics on each step of post-processings is rather expensive operation so the inspection-like post-processings which don't require diagnostic information was separated from ones that need it
Related to #KT-31848
2019-06-11 18:16:06 +03:00
Ilya Kirillov
184825d59d
New J2K: remove open modifier for top level functions on post-processing
...
#KT-31678 fixed
2019-06-11 10:35:32 +03:00
Ilya Kirillov
8375a12733
New J2K: properly remove redundant modifiers in post-processing as #KT-30804 is fixed
2019-06-11 10:35:31 +03:00
Ilya Kirillov
0fc0f99acb
New J2K: do not commit document after each inspection in post-processing
...
Related to #KT-31848
2019-06-11 10:35:29 +03:00
Ilya Kirillov
110611d690
New J2K: group post-processings to named groups
2019-06-11 10:35:29 +03:00
Ilya Kirillov
417717914d
New J2K: use IDEA indexes for resolving
...
Related to #KT-31848
2019-06-11 10:35:28 +03:00
Ilya Kirillov
5f8b5efd66
New J2K: do not find import usages in AST building phase
...
It is a rather heavy operation and it increases conversion time
Related to #KT-31848
2019-06-11 10:34:34 +03:00
Dmitry Gridin
4f8c0653c5
Change API in AbstractApplicabilityBasedInspection
...
Replace all inspectionTarget with inspectionHighlightRangeInElement & change type of element in applyTo from PsiElement to TElement
2019-06-07 12:23:54 +07:00
Dmitry Gridin
f2accb7b9e
Convert IfThenToElvisIntention to inspection & decrease severity to INFO
...
#KT-16067 Fixed
2019-06-07 12:23:54 +07:00