Commit Graph

15045 Commits

Author SHA1 Message Date
Alexander Udalov 72dfca1698 Fix "cannot override invisible member" diagnostic message
Fix "cannot has", delete "in class ..." as it's already present in the message
(function ... defined in class ...)
2014-04-17 19:51:32 +04:00
Alexander Udalov 1deb55bfde Add positioning strategy for diagnostics on illegal fake overrides
"funcitonTypes.kt" test data file was changed because now that there is a
positioning strategy, it takes the liberty of filtering out those diagnostics
that were reported on syntactically invalid elements
2014-04-17 19:51:31 +04:00
Alexander Udalov 146498ec32 Sort out renderers for diagnostics
- change NAMED to be Renderer<Named> and render Named's name. It was used in
  multiple places with arbitrary arguments, not only Named: change renderers in
  those places to TO_STRING
- add STRING, which is Renderer<String> and renders string itself. Change all
  places where strings were used with either TO_STRING or NAMED to STRING
- change NOT_AN_ANNOTATION_CLASS diagnostic to be reported on descriptor, not
  any string
- change "unused variable/parameter" diagnostics to be reported on
  VariableDescriptor, not Object
2014-04-17 19:51:31 +04:00
Alexander Udalov 4c973b79ee Get rid of poorly named NotInferredVisibilitySink
Also make TraceBasedErrorReporter invoke OverrideResolver to report "cannot
infer visibility", because there's some additional logic there
2014-04-17 19:51:31 +04:00
Alexander Udalov 5ae339d940 Fix "Cannot infer visibility" for fake overrides
#KT-4785 Fixed
2014-04-17 19:51:31 +04:00
Alexander Udalov 55b28fcd0e Minor, provide a nicer API in OverrideResolver for plugin 2014-04-17 19:51:30 +04:00
Alexander Udalov 34e7584aec Move some utilities from OverridingUtil to OverrideResolver
OverridingUtil will be present at runtime and we should strive to minimize the
size of our runtime classes

Also add a comment to getOverriddenDescriptors()
2014-04-17 19:51:30 +04:00
Alexander Udalov 3dffd428ad Refactor OverrideResolver and OverridingUtil
Fix warnings, simplify code. Untangle a very complex code related to
diagnostics on multiple default values and different names of parameters in
supertypes; fix a bug there, add test
2014-04-17 19:51:30 +04:00
Alexander Udalov adec89f74d Don't print descriptors' toString() in diagnostic messages
Use DescriptorRenderer.TEXT instead, it doesn't print the debug information
2014-04-17 19:51:29 +04:00
Alexander Udalov 5be2a4945b Render FQ name of default package as "root package" in OverloadResolver 2014-04-17 19:51:29 +04:00
Alexander Udalov 4f9f5d231b Fix incorrect diagnostic message for CONFLICTING_OVERLOADS
- the member and the container were mixed up
- don't output "defined in" part of the message, because we tell later where
  it's already defined in
- fix an instability of the diagnostic order in OverloadResolver by using
  LinkedHashSet
2014-04-17 19:51:29 +04:00
Alexey Sedunov 0d90dcf010 Extract Function: Add test data 2014-04-17 19:01:20 +04:00
Alexey Sedunov 4dec0508a6 ExtractionTest: Change test data layout 2014-04-17 19:01:17 +04:00
Alexey Sedunov 24d8557a5a Translate AbstractJetExtractionTest to Kotlin 2014-04-17 19:01:15 +04:00
Alexey Sedunov a951734ec2 Generalize "Introduce variable" test 2014-04-17 19:01:13 +04:00
Alexey Sedunov 074471c0ed Get rid of unnecessary write action 2014-04-17 19:01:11 +04:00
Alexey Sedunov 6006f53e68 Auto-generate test class for "Introduce variable" refactoring 2014-04-17 19:01:09 +04:00
Alexey Sedunov a72d785d62 Use lazy analysis in JetNameValidatorImpl 2014-04-17 19:01:07 +04:00
Alexey Sedunov 1fe6df268a Extract Function: UI and refactoring handler 2014-04-17 19:01:04 +04:00
Alexey Sedunov 424c5f296f Extract Function: Analysis and code generation 2014-04-17 19:01:02 +04:00
Alexey Sedunov cceaa3b66f Fix bug in ShortenReferences visitor (do not skip PSI elements after modication) 2014-04-17 19:01:00 +04:00
Alexey Sedunov 95b4ec2058 Drop ReturnInstruction 2014-04-17 19:00:58 +04:00
Alexey Sedunov 3952a121fb Pseudocode: Track PSI elements which correspond to jump instructions 2014-04-17 19:00:56 +04:00
Alexey Sedunov 103165d674 Move Maybe class and its inheritors to util package 2014-04-17 19:00:54 +04:00
Alexey Sedunov cf55102697 Move "Introduce..." classes to separate package
Rename Jet -> Kotlin
2014-04-17 19:00:52 +04:00
Valentin Kipyatkov f11a05e504 Smart completion: auto popup parameter info for constructor 2014-04-17 14:39:31 +04:00
Valentin Kipyatkov df299655a7 Smart completion: one more working test and one more test to fix later 2014-04-17 14:39:31 +04:00
Valentin Kipyatkov 164fb84cbe Smart completion: ExpectedTypeInfo renamed to ExpectedInfo 2014-04-17 14:39:31 +04:00
Valentin Kipyatkov 9609a9fff1 Smart completion: refactored one big class into a set of smaller ones 2014-04-17 14:39:30 +04:00
Valentin Kipyatkov c53da996c4 Smart completion: refactored static members processing 2014-04-17 14:39:30 +04:00
Valentin Kipyatkov ad791d0480 Smart completion: some code improvements 2014-04-17 14:39:30 +04:00
Valentin Kipyatkov f682dc36e0 Smart completion: lambda items 2014-04-17 14:39:30 +04:00
Valentin Kipyatkov 1ba4c656a5 Smart completion: bugfix - no function reference after dot 2014-04-17 14:39:30 +04:00
Valentin Kipyatkov 5bff98c164 Smart completion: minor code refactoring 2014-04-17 14:39:30 +04:00
Valentin Kipyatkov 73329af7b1 Smart completion: refactored all code into a class to avoid passing the same data into many functions 2014-04-17 14:39:29 +04:00
Valentin Kipyatkov 06b1f1ec2f Smart completion: code improvements and refactorings after code review 2014-04-17 14:39:29 +04:00
Valentin Kipyatkov 6b1ecc3fb0 Smart completion: "::functionName" items when value of function type is expected 2014-04-17 14:39:29 +04:00
Valentin Kipyatkov 7d5b86e000 Smart completion: no duplicates among static members 2014-04-17 14:39:29 +04:00
Valentin Kipyatkov 4b5d175aa7 Smart completion: no more duplicates among type instantiation items 2014-04-17 14:39:29 +04:00
Valentin Kipyatkov 5d8c5cfa31 Smart completion inserts closing parenthesis as well 2014-04-17 14:39:29 +04:00
Valentin Kipyatkov f984dbc5b6 Smart completion to insert comma when in argument list 2014-04-17 14:39:28 +04:00
Zalim Bashorov 7b8f2fe396 Updated to IDEA 135.689 (13.1.2 EAP) 2014-04-17 13:28:03 +04:00
Alexander Udalov 3b7c743acc Minor fix in assert<->if+throw intention description 2014-04-17 03:20:14 +04:00
Zalim Bashorov 23922c1387 Fixed line separators for fix maven build on Windows. 2014-04-16 20:33:42 +04:00
Zalim Bashorov 361c81bbe5 IDEA plugin: fixed using SimplifyNegatedBinaryExpressionIntention and dependent tests.
+ minor reformat.
2014-04-16 18:14:11 +04:00
Tal Man 9cff3ba049 Intention to convert assert to an if with throw 2014-04-15 19:26:39 -04:00
Alexey Sedunov db38f420f3 Move Refactoring: Do not replace references to local declaration with qualified names. Update and fix test data
#KT-4851 Fixed
2014-04-15 16:19:28 +04:00
Svetlana Isakova 58b8eab620 Merge pull request #406 from wutalman/explicit_type_arguments
KT-4583 Intention for removing explicit type arguments at function calls
2014-04-15 12:09:15 +04:00
Andrey Breslav d28ca5bdfa Empty parameter list should go before '->' in a lambda
Example:

  val x = { -> foo() }
2014-04-14 19:15:08 +04:00
Tal Man b9e248b006 Intention for removing explicit type arguments at function calls 2014-04-14 11:14:09 -04:00