Commit Graph

57054 Commits

Author SHA1 Message Date
Toshiaki Kameyama a3c3ab08fd Override/Implement members: place members in the same order as super class members 2019-08-26 13:18:31 +07:00
Roman Golyshev a38651c1ec KT-32366: Add missing 182 bunch file for the foldingTestUtils.kt 2019-08-23 22:59:45 +03:00
Igor Yakovlev 5a511dd635 Refactor and fix of the run/apply/let/also intention converter
1) Optimize and refactored code
2) Added support for correct renaming of target identifier to this/it
3) Added support of cases with difficult application targets (like: var x = 1 + 2)
4) Show error hint when refactoring failed for some reason
5) Improved intention applicability checking to eliminate false-positive cases
6) Fixed EA-209577
2019-08-23 19:37:00 +03:00
Ilmir Usmanov ef5fcb4e9e Fix test data 2019-08-23 19:09:28 +03:00
Roman Golyshev 37e3c41b57 KT-32366: Add sync scroll for source and preview editor
- ^KT-32366 Fixed
2019-08-23 18:22:27 +03:00
Roman Golyshev e488e920d8 KT-32366: Add tests for right preview window
- also, fix missing test generation in `GenerateTests` bunch files (which was introduced in e54b43ba)
2019-08-23 18:22:26 +03:00
Roman Golyshev bddf87337c KT-32366: Add printing scratch output to preview window
- printing is done with `PreviewEditorScratchOutputHandler`
- `KtsScratchFileEditorWithPreview` redirects output depending on the layout selection
2019-08-23 18:22:26 +03:00
Roman Golyshev e321ee1396 KT-32366: Inject toolWindowHandler from InlayScratchOutputHandler
- `toolWindowHandler` would be shared between different scratch editors, so we need `ScratchToolWindowHandlerKeeper` to provide proper mechanism for its acquiring and releasing
- fix problem when scratch output panel is never released after first scratch opening by properly unregistering `toolWindow` with `ToolWindowManager`
2019-08-23 18:22:26 +03:00
Roman Golyshev d0cd4967a7 KT-32366: Extract text styling variables to outputStylingUtils 2019-08-23 18:22:25 +03:00
Roman Golyshev 358ec2b8bd KT-32366: Refactor tests to allow testing of preview window
- add directive `PREVIEW_ENABLED` into scratch file settings
2019-08-23 18:22:25 +03:00
Roman Golyshev dd1ace37d2 KT-32366: Add TextEditorWithPreview.setLayout method
- it is done to be able to trace when layout is changed
- all actions use this method too
2019-08-23 18:22:24 +03:00
Roman Golyshev 1d6de45db6 KT-32366: Use TextEditorWithPreview as editor for scratch files
- get rid of `ScratchFileHook` completely
- use `KtsScratchFileEditorProvider` to encapsulate details about scratch file presentation
- remove obsolete functions from `scratchUtils`
2019-08-23 18:22:24 +03:00
Roman Golyshev 37c6102a03 KT-32366: Change base of AbstractScratchLineMarkersTest
- with `FileEditorManagerTestCase` it is possible to work with actual TextEditors instead of wrappers during tests, so it will be possible to use `TextEditorWithPreview` via `TextEditorProvider` service
2019-08-23 18:22:24 +03:00
Roman Golyshev 1177566386 KT-32366: Get rid of ScratchTopPanel in tests
- make `ScratchFile.file` public
- remove obsolete functions from `ScratchTopPanel` and `scratchUtils`
2019-08-23 18:22:24 +03:00
Roman Golyshev 962260941b KT-32366: Add TextEditorWithPreview class from the platform
- this class was updated recently (here: https://github.com/JetBrains/intellij-community/pull/1167) to allow its customization; however, those changes from platform are not available for kotlin plugin yet
2019-08-23 18:22:23 +03:00
Roman Golyshev 54dde777ac KT-32366: Get replace editor with virtual file in ScratchFile
- remove `getOutputHandler` method from `KtScratchFileLanguageProvider`
- now `InlayScratchOutputHandler` is a class, it has reference to the target editor and is (temporarily) attached to the editor
2019-08-23 18:22:23 +03:00
Roman Golyshev 1fc88fc47f KT-32366: Refactor ScratchPanelListener to ScratchFileListener
- it is done to move logical dependency from the UI element (`ScratchTopPanel`) to the model element (`ScratchFile`)
2019-08-23 18:22:23 +03:00
Roman Golyshev ea3d070c98 KT-32366: Refactor ScratchFileHook to make ScratchFile creation clear
- basically just move functions from `ScratchTopPanel` to `ScratchFileHook`
2019-08-23 18:22:22 +03:00
Roman Golyshev 70e6f738eb KT-32366: Refactor scratchUtils to use mostly ScratchFile
- it is done to remove dependency from the UI component `ScratchTopPanel`
- occasional use of `ScratchTopPanel` is still left (for tests mostly)
2019-08-23 18:22:22 +03:00
Roman Golyshev 6c35c40bb9 KT-32366: Refactor ScratchTopPanel to actions instead of custom UI
- migrate module to the `ScratchPanel` class because it is information that matters to him most of all
- move logic for showing\hiding checkboxes to the related actions
2019-08-23 18:22:22 +03:00
Mikhail Glukhikh 23f662cfe2 FIR: optimize creation of scope by implicit receiver 2019-08-23 17:15:09 +03:00
Mikhail Glukhikh 9c3821ddba FIR: add comments & tests for tower resolver, block some receiver pairs 2019-08-23 17:15:09 +03:00
Mikhail Glukhikh c9a600c5ce FIR: handle imported members from objects more correctly 2019-08-23 17:15:08 +03:00
Mikhail Glukhikh a4d89b9829 FIR: handle situations with multiple implicit receivers 2019-08-23 17:15:08 +03:00
Mikhail Glukhikh 5d6a526eec FIR: more accurate handling of dispatch receiver values
This commit fixes resolve priorities (see changed test data),
e.g. top-levels now have less priority than implicit receiver members
2019-08-23 17:15:08 +03:00
Nikolay Igotti fcb0b1b5eb Add new native targets. (#2538) 2019-08-23 16:11:40 +03:00
Toshiaki Kameyama 64d4cca589 Redundant override: do not report when class has derived property
#KT-32479 Fixed
2019-08-23 14:57:20 +07:00
Toshiaki Kameyama 729ed1a44e Pull Members Up: fix invalid code format on function with comment and another indent
#KT-32426 Fixed
2019-08-23 14:25:49 +07:00
Toshiaki Kameyama 7c2f6ecba7 Redundant curly braces in string template: remove braces for 'this'
#KT-32972 Fixed
2019-08-23 14:19:41 +07:00
Dereck Bridie 8f2a73b734 KT-28471: "Add initializer" quickfix initializes non-null variable with null 2019-08-23 14:15:08 +07:00
Toshiaki Kameyama c0f896c96a flatMap call could be simplified to flatten(): Fix false positive with Array
#KT-33204 Fixed
2019-08-23 14:12:17 +07:00
Ilya Gorbunov 7ff01b02a9 Make ExperimentalTime annotation documented 2019-08-22 21:29:18 +03:00
Ilya Gorbunov 2c79b1f89e Minor: fix incorrect reference in kdoc 2019-08-22 21:29:18 +03:00
Vyacheslav Gerasimov daa0d58f4d Build: Update list of proxied repositories 2019-08-22 20:39:28 +03:00
Vyacheslav Gerasimov 1cdc68901a Build: Use kotlinx-metadata-jvm from jcenter instead of bintray 2019-08-22 20:39:28 +03:00
Vyacheslav Gerasimov 96c9efeabb Build: Fix findNonCachedRepositories test
Previously incorrectly scanned buildscript block of script
2019-08-22 20:39:28 +03:00
Vyacheslav Gerasimov 669b6d164c Build: Use cache redirector for buildscript block of :kotlin-reflect 2019-08-22 20:39:28 +03:00
Alexander Udalov d59f2bcc80 Fix KotlinReflectionInternalError on invoking callBy with defaults in supertypes
There are two parts in this change:

1) Previously, we looked up $default methods with the incorrect
   signature in supertypes. For example in defaultInSuperClass.kt, we'd
   try to find a method foo$default with the signature `(B, String,
   String, int, Object)` in the class A. Now we're modifying the array
   of parameter types on each step if we're looking for a static
   $default method, by assigning its first element to be the containing
   class. This fixes cases when defaults come from a superclass.
2) For interfaces, $default methods are actually located in the
   corresponding DefaultImpls class. Now we look up that class and
   search for the $default method there. Note that this is needed
   because of KT-33430. This fixes cases when defaults come from a
   superinterface.

 #KT-13936 Fixed
2019-08-22 18:04:00 +02:00
Alexander Udalov cb2e68fece JVM IR: skip temporary variables in InventNamesForLocalClasses 2019-08-22 18:04:00 +02:00
Alexander Udalov 312205f376 Prohibit synchronized methods on interface members
#KT-9310 Fixed
2019-08-22 18:04:00 +02:00
Alexander Udalov 815ff3c860 JVM IR: don't generate ACC_FINAL on DefaultImpls methods
To replicate behavior of old backend
2019-08-22 18:04:00 +02:00
Mikhail Glukhikh 6f785ec881 FIR2IR: fix library annotation call generation 2019-08-22 18:55:10 +03:00
Mikhail Glukhikh 27ccff12c1 FIR: add resolve for delegated super-type
This commit fixes FIR modularized resolve test on whole Kotlin project
(without it we had empty super-type set with delegated super-types)
2019-08-22 18:53:15 +03:00
Igor Yakovlev a9bc3c19d6 Fix invalid generated Move tests 2019-08-22 17:53:28 +03:00
Ilmir Usmanov f9506db20a Ignore sources which are not LOADs in refinedIntTypeAnalysis
#KT-33414 Fixed
2019-08-22 16:08:08 +03:00
Dmitriy Novozhilov 4697822b5a [FIR] Fix setting return type for when and try with non applicable candidates 2019-08-22 16:02:56 +03:00
Svyatoslav Kuzmich 6e6ffa12a6 [WASM] Initial infrastructure
- New module ":compiler:backend.wasm"
    - Initial compiler infra (driver, phaser, context)
    - Subset of Wasm AST
    - Skeleton of IR -> Wasm AST
    - Wasm AST -> WAT transformer

- Testing infra

- SpiderMonkey jsshell tool
2019-08-22 15:59:54 +03:00
Svyatoslav Kuzmich 812083ee05 [WASM] Initial runtime library
Add directory libraries/stdlib/wasm as a placeholder for WASM runtime library
Copy built-ins from core/builtins
Add ExcludeFromCodegen annotation for internal needs
2019-08-22 15:59:49 +03:00
Svyatoslav Kuzmich 1891fa1bf1 [JS IR BE] Commonize JS lowerings 2019-08-22 15:59:41 +03:00
Ivan Gavrilovic 7bc739359b Use JDK_8 when stopping Gradle daemons with version below 5.0
Gradle started supporting running on JDK11 only with Gradle 5.0.
This commit sets JAVA_HOME to JDK8 whenever stopping daemon with
version below 5.0
2019-08-22 15:47:45 +03:00