This action doing further steps in infinite loop (breaks after user request):
1) Generate random move refactoring model
2) Run this model (if it is correct)
3) Recompile the project
4) If compilation was not succeeded write model parameters into output file
5) Delete all new files and directories and make "git reset"
The main purpose of this commit - to make this refactoring logic can be covered as much as possible.
To make this possible we should to extract all possible UI code from business logic (and vice versa).
Additional fixes was applied during refactoring process.
There is come major steps made in this commit:
1) Extract business logic to separate models
2) Fixes of business models logic
3) Add "Delete empty source file" checkbox instead of modal message box
4) Improve error messaging in move refactoring dialogs
5) Inject interface into move handler that makes UI dialogs could be overrided
6) Inject flag into move handler that makes UI conflicts dialog could be overrided
They are currently marked as defined even when they get a
default implementation. That makes it hard to figure out
if the accessor should be removed when introducing a backing
field in the JVM_IR backend.
This fixes slice rewrite stacktraces from RecordNamesForKotlinTypeMapper
which are printed out when running some JVM IR tests (even though
they're ignored), e.g. localClassSimpleName.kt
Instead of calling enormously complicated
KotlinTypeMapper.mapToCallableMethod, where most of special cases are
handled in the IR backend via lowerings.
AsmUtil.genToString requires an instance of KotlinTypeMapper and calls
KotlinTypeMapper.mapToCallableMethod inside, which (in subsequent
commits) we're getting rid of in the IR backend
Any access to a function from a multi-file part needs to be replaced
with the access to the corresponding public method (if it exists) from
the facade class. Note that this has no immediate effect because we use
KotlinTypeMapper for mapping calls, and it understands that a call to a
function from the part must actually be generated into a call to the
function from the facade in the bytecode. This commit merely changes the
IR to better reflect what's generated in the final bytecode, and to be
able to use simplified IR-based method signature mapping instead of the
legacy KotlinTypeMapper in the future.