Commit Graph

21112 Commits

Author SHA1 Message Date
Dmitry Gridin dffb44c11c Create actual/expect quick fix should render super type correctly 2019-08-27 17:22:15 +07:00
Dmitry Gridin a21375508d ExpectActualUtils: drop missedDeclarations parameter from generateClassOrObject function 2019-08-27 17:22:14 +07:00
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
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
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
Igor Yakovlev a9bc3c19d6 Fix invalid generated Move tests 2019-08-22 17:53:28 +03:00
Dmitriy Novozhilov e6bf3b3263 [FIR] Render nullability in type renderer, not in fir renderer 2019-08-22 10:55:07 +03:00
Sergey Igushkin 50e758cbb7 Remove the @Inclubating annotation from UnstableApiUsage inspection
Also remove `@Suppress("UnstableApiUsage)"` where it was relevant
2019-08-21 19:42:34 +03:00
Vladimir Dolzhenko 6969717201 Fix performanceTests compilation errors 2019-08-21 10:17:24 +02:00
Burak Eregar d1cbee44f1 Move refactoring: suggest file name starting with an uppercase letter
Fixed #KT-30342
2019-08-21 00:58:59 +03:00
Vladimir Dolzhenko 3d3e86b5fa Added gradle.kts and annotator gradle.kts autocompletion performance benchmark 2019-08-20 15:25:50 +02:00
Dmitry Gridin 23e79bb32b ScriptDefinitionsManager: safeGetDefinitions shouldn't catch ControlFlowException
#EA-210332 Fixed
2019-08-20 17:08:47 +07:00
Dmitry Gridin ef4bac1b46 REPL: fix IllegalArgumentException
Reproduce: select `Pause Output`
#EA-209571 Fixed
#EA-210364 Fixed
#KT-33329 Fixed
2019-08-20 17:08:47 +07:00
Dmitry Gridin f81fb40164 HistoryUpdater: cleanup code 2019-08-20 17:08:47 +07:00
Dmitry Gridin df438377e8 ReplOutputProcessor: cleanup code 2019-08-20 17:08:47 +07:00
Dmitry Gridin ab4001a698 KotlinCopyPasteReferenceProcessor: fix KNPE
#EA-210304 Fixed
2019-08-20 17:08:47 +07:00
Dmitry Gridin 693f42f33e KotlinCopyPasteReferenceProcessor: cleanup code 2019-08-20 17:08:47 +07:00
Dmitry Gridin bd5476082b extractionModel: cleanup code 2019-08-20 17:08:47 +07:00
Dmitry Gridin fcff9a43b4 extractionModel: fix NPE
#EA-210243 Fixed
2019-08-20 17:08:46 +07:00
Dmitry Gridin f87e86d4b3 CallableBuilder: fix exception
#EA-134361 Fixed
2019-08-20 17:08:46 +07:00
Dmitry Gridin 76b97c3847 CallableBuilder: cleanup code 2019-08-20 17:08:46 +07:00
Dmitry Gridin 2b90735990 generateUtil: fix PIEAE
#EA-209598 Fixed
#EA-142347 Fixed
2019-08-20 17:08:41 +07:00
Dmitry Gridin b570f99aae generateUtil: cleanup code 2019-08-20 17:04:00 +07:00
Dmitry Gridin cf3b92d80e CreateTypeParameterFromUsageFix: fix KNPE for type alias
#KT-33302 Fixed
#EA-120181 Fixed
2019-08-20 17:04:00 +07:00
Dmitry Gridin 932765744a CreateTypeParameterFromUsageFix: cleanup code 2019-08-20 17:03:59 +07:00
Ilya Kirillov 24adc09e2d J2K: Change old/new J2K switch checkbox text from "Use New J2K" to "Use New Java to Kotlin Converter"
Relates to #KT-33371
2019-08-20 11:13:13 +03:00
Vladimir Dolzhenko dd0e296af1 Use KotlinExceptionWithAttachments for ToFromOriginalFileMapper and MainFunctionDetector 2019-08-19 17:55:49 +02:00
Igor Yakovlev 9c861a111f Fix move refactoring conflict window output
1) Refactoring
2) #KT-32496 Fixed
2019-08-19 13:28:23 +03:00
Igor Yakovlev ae3f36ebde Change ExtractDeclarationFromCurrentFileIntention applicability range
Fixed #KT-33362
2019-08-19 13:28:23 +03:00