Commit Graph

120 Commits

Author SHA1 Message Date
Svyatoslav Scherbina 46caf27e70 Add "Remove annotation" quickfix for @Throws override mismatch 2020-06-05 19:07:56 +03:00
Svyatoslav Scherbina 6461c1b4f1 Add "Remove annotation" quickfix for empty @Throws 2020-06-05 19:07:54 +03:00
Svyatoslav Scherbina b7a08494ae Add quickfix for adding CancellableException to @Throws suspend fun 2020-06-05 19:07:52 +03:00
Dmitry Gridin 499a02ebe3 AddThrowsAnnotationIntention: improve for mpp
#KT-38391 Fixed
2020-05-20 02:19:10 +00:00
Dmitry Gridin 50506658c0 fix some tests for as36 2020-05-08 19:13:28 +07:00
Dmitry Gridin 11a3482970 tests: apply official code style
#KT-38632 Fixed
2020-05-07 12:36:44 +00:00
Roman Golyshev 1dded486f1 i18n: fix bundle messages/testData messages where necessary 2020-03-16 18:40:47 +07:00
Dmitry Gridin 6c439ae85a Create TrailingCommaIntention
#KT-34744
2020-02-04 21:34:53 +07:00
Dmitry Gridin b40a888f1d Formatter: fix line break between declarations with annotations
#KT-35093 Fixed
#KT-35106 Fixed
2019-11-26 19:40:51 +07:00
Dmitry Gridin bfd539d5d1 Formatter: fix line break between declarations with comment
#KT-12490 Fixed
#KT-35088 Fixed
2019-11-26 19:40:51 +07:00
Toshiaki Kameyama 4d9b19da82 Remove comments from function/property implementation template
#KT-18539 Fixed
2019-11-13 08:37:25 +09:00
Dmitry Gridin 17429d333e Create expect/actual should move cursor to target declaration
#KT-34411 Fixed
2019-10-31 19:24:36 +07:00
Dmitry Gridin 9c61f42121 ChangeVisibilityModifierIntention: should affect all actual/expect declarations
#KT-29737 Fixed
2019-10-29 17:26:34 +07:00
Dmitry Gridin a24e229d7a CreateExpectedFix: should generate expect declaration in selected module
#KT-33933 Fixed
2019-10-14 14:42:29 +07:00
Dmitry Gridin eaa07dac17 CreateExpect: shouldn't generate expect declaration from actual function with private, lateinit or const
#KT-33930 Fixed
2019-10-03 16:00:07 +07:00
Dmitry Gridin 9da6dcf840 DescriptorRenderer: shouldn't render private modifier by default
#KT-31587 Fixed
2019-10-03 16:00:06 +07:00
Dmitry Gridin 847295bf1c CreateExpect: shouldn't generate expect declaration from actual function with default implementation from interface
#KT-32737 Fixed
2019-10-03 16:00:06 +07:00
Dmitry Gridin 57d25fc5f5 Create actual: add type accessibility checker
#KT-28740 Fixed
2019-09-26 20:21:54 +07:00
Dmitry Gridin fcaa897b9f Tests: extract addMissingActualMembers from multiModuleQuickFix/other 2019-09-26 20:21:54 +07:00
Dmitry Gridin a552f06526 Create expect/actual: improve error hint message
#KT-33754 Fixed
2019-09-26 20:21:54 +07:00
Dmitry Gridin e3ce799993 Refactoring: change signature should affected expect/actual
#KT-33972 Fixed
2019-09-23 23:01:47 +07:00
Dmitry Gridin 650a6e5cc4 MakeOverriddenMemberOpenFix: should update actual members
#KT-32586 Fixed
2019-09-06 15:25:01 +07:00
Dmitry Gridin ea02d0c632 ExpectActualUtils: repairSuperTypeList should consider type parameters 2019-08-27 17:26:11 +07:00
Dmitry Gridin 56a7445660 CreateExpect: should prefer type aliases
#KT-32571 Fixed
2019-08-27 17:26:10 +07:00
Dmitry Gridin 5928a36fa2 CreateExpect: should save receiver annotations
#KT-32694 Fixed
2019-08-27 17:26:09 +07:00
Dmitry Gridin 1c98cb763e addRemoveModifier: shouldn't add extra new line
#KT-26635 Fixed
2019-08-27 17:26:09 +07:00
Dmitry Gridin 73ae993d81 TypeAccessibilityChecker: add more tests 2019-08-27 17:26:09 +07:00
Dmitry Gridin 3617f3d247 TypeAccessibilityChecker: fix callable with upper bound 2019-08-27 17:26:08 +07:00
Dmitry Gridin 18f0bbe8f1 QuickFixMultiModule: change tests structure 2019-08-27 17:26:08 +07:00
Dmitry Gridin bddf768d59 CreateExpect: fix case with parameters in constructor without var/val 2019-08-27 17:26:07 +07:00
Dmitry Gridin dffb44c11c Create actual/expect quick fix should render super type correctly 2019-08-27 17:22:15 +07:00
Dmitry Gridin 3ea195e1a2 DescriptorRenderedImpl: fix order of val & vararg modifier for actual class
#KT-31921 Fixed
2019-08-01 16:08:45 +03:00
Dmitry Gridin 4e2989e884 CreateExpectActualFix: fix package for files with root package from non-root directory
#KT-28746 Fixed
2019-07-23 16:24:43 +03:00
Dmitry Gridin c76ca988eb KotlinCreateTestIntention: disallow intention for expect classes
#KT-26242 Fixed
2019-07-23 16:24:16 +03:00
Mikhail Glukhikh 5f896936ae Fix broken test (related to "Convert to lazy property") 2019-06-17 11:06:38 +03:00
Dmitry Savvinov cac326bf4a [Expect/Actual] Adjust old testdata after changes in expect/actual
matching

This commit makes several changes in testdata:

- compiler multiplatform tests now contain newly introduced diagnostics
about AMBIGIOUTS_ACTUALS
- MultiModuleHighlighitng tests now contain proper reports about
ACTUAL_MISSING:
  - ACTUAL_MISSING should be indeed reported in them, because those
  tests don't contain dependsOn edges, only usual intermodule
  dependencies
  - This error wasn't reported here because expect/actual diagnostics in
  common module used to be reported by PlatformExpectedAnnotator, which
  had a bit flawed logic for deremining common-modules: it checked for
  presence of implementing modules. In those tests, common module has no
  implementing modules, so Annotator was returning silently
  Note that such configurations (common module without implementing
  modules) are almost impossible in real-life projects
  - After removal of PlatformExpectedAnnotator, we use
  ExpectedActualDeclarationChecker in common modules, which launches all
  checks properly
- some QuickFixMultuModuleTests now contain proper reports about
ACTUAL_MISSING. This change is also connected with
PlatformExpectedAnnotator, but now for different reason:
  - QuickFixMultiModuleTest used to check for errors in file by running
  'analyzeWithAllCompilerChecks' and inspecting returned BindingTrace.
  For common modules, there were no diagnostics about expect/actuals in
  that trace, because there were no ExpectedActualDeclarationChecker
  (and PlatformExpectedAnnotator was reporting diagnostics in ad hoc
  trace).
  - Again, now we inject EADC in common modules properly, so we see
  those errors in trace and report them in test
2019-06-10 13:34:27 +03:00
Dmitry Savvinov de2944ff43 [Misc] Fix errors checking in QuickFixMultiModuleTest
This test was checking errors *before* applying action, rather than
*after*, like all other QuickFix-tests do. This commit moves
errors-check after performing quick-fix action, and changes testdata:

- for most tests errors are simply gone (as quickfix usually fixes that
error)
- also, for implementMembersInActualClassNoExpectMember we add
'DISABLE-ERROR', similarly to
implementMembersInImplClassNonImplInheritor. This is needed because
'Implement Members'-fix created 'TODO'-calls, which are not resolved in
those tests due to the lack of stdlib. Previously, there were no errors
in this test exactly because file was checked *before* applying quickfix
(i.e. when there were no 'TODO()' in file)
2019-06-10 13:34:27 +03:00
Dmitry Gridin afa9a80b3a Fix multi module tests for AddOperatorModifierInspection 2019-06-06 12:09:28 +07:00
Dmitry Gridin 605ee041a9 Remove CreateTypeAliasFromUsageFix
Relates to #KT-31519
2019-05-31 18:00:56 +07:00
Dmitry Gridin f2bd58c030 Expand "Create expected..." also to a members if an expect class doesn't exist
#KT-31272 Fixed
2019-05-24 15:55:01 +07:00
Dmitry Gridin 47e3a26749 Fix "Create expect function" for primary constructor
#KT-31518 Fixed
2019-05-24 15:55:01 +07:00
Dmitry Gridin b575ed390a Add a dialog to select members for export in expect class
#KT-31476 Fixed
#KT-31446 Fixed
#KT-31033 Fixed
2019-05-24 15:55:01 +07:00
Dmitry Gridin 98a4c4588e Don't suggest might be const on actual member declaration
#KT-27822 Fixed
2019-05-24 15:55:00 +07:00
Dmitry Gridin 3ca1c7b55d "Convert property to function" intention should warn about the property overloads at child class constructor
#KT-29764 Fixed
2019-04-02 22:53:56 +07:00
Dmitry Gridin dce2139eb0 Fix KNPE from "Create" quick fix
#KT-27289 Fixed
2019-03-04 13:01:18 +03:00
Mikhail Glukhikh ca3d758fba Create expect/actual class: fix inline class generation
#KT-28744 Fixed
#KT-28745 Fixed
2018-12-19 19:55:56 +03:00
Mikhail Glukhikh 8fb213021c Create expect: remove false positive in inaccessible type detector 2018-11-28 12:36:29 +03:00
Mikhail Glukhikh d3fada89b7 Generate enum entries in create actual / expected fixes as all other
This makes code a bit cleaner
2018-11-28 12:00:54 +03:00
Mikhail Glukhikh 2af9efa4a0 Fix failing test (related to KT-28381, KT-28382 commits) 2018-11-23 15:43:39 +03:00
Mikhail Glukhikh 1585461a68 Fix create expected for classes with anonymous initializers 2018-11-21 15:13:02 +03:00