Commit Graph

11104 Commits

Author SHA1 Message Date
Yan Zhulanow dbc0099e6e Fix usage printing for compiler plugins 2015-05-08 18:19:25 +03:00
Yan Zhulanow 514bc74e9c Support android.support.v4.Fragment classes 2015-05-08 18:19:22 +03:00
Ilya Gorbunov 02b8394cb2 Change JetCodeFragment.IMPORT_SEPARATOR back to String 2015-05-08 16:48:11 +03:00
Denis Zharkov 93861e16c8 Prohibit non-constant default values for annotation parameter
#KT-7449 Fixed
2015-05-07 22:36:17 +03:00
Denis Zharkov 585a437b2e Parse '@' annotations on enum entries
Just drop truncating builder's creation as we parse only escaped annotations
and will not `eat` entry identifier
2015-05-07 22:36:17 +03:00
Denis Zharkov e59a0dd0c6 Adjust KotlinSuppressIntentionAction to syntax with '@' 2015-05-07 22:36:16 +03:00
Denis Zharkov 849b8acbf8 Replace annotations with brackets in testData
Just in tests that changed after deprecation
2015-05-07 22:36:16 +03:00
Denis Zharkov 5bc7c9600f Deprecate annotations in brackets 2015-05-07 22:36:16 +03:00
Denis Zharkov 1d77f50903 Refine highlighting of '@'
- Do not highlight '@' as separate token.

- Highlight '@' the same way as element where it's located: annotation, label or modifier.

- Extend text range when positioning unresolved reference in annotation with '@'.

Note that currently '@' is collapsed with modifiers tokens
2015-05-07 22:36:16 +03:00
Denis Zharkov b924f35ed3 Resolve annotations on multi-declaration for parameter 2015-05-07 22:36:16 +03:00
Denis Zharkov 3d810ffe61 Parse modifier list of multi-declaration and for parameters 2015-05-07 22:36:16 +03:00
Denis Zharkov e236d04957 Minor, drop unused method createConstructorModifierList 2015-05-07 22:36:16 +03:00
Denis Zharkov 9e23698fe3 Unwrap annotated expression in deparenthesize
It's needed to complete resolved call with annotated function literal
2015-05-07 22:36:15 +03:00
Denis Zharkov 9101505eca Rework deparenthesize-like methods
- Extract private `deparenthesizeOnce` and repeat it until get the same expression

- Drop redundant parameter `deparenthesizeRecursively`

- Drop some usages of `safeDeparenthesize` in `deparenthesize`
  because even if `deparenthesize` returns null (i.e. something was not parsed)
  there is no sense in working with such expressions

Note, that `deparenthesize` now unwraps nested labels' declaration (see changes in testData),
but it seems to be reasonable
2015-05-07 22:36:15 +03:00
Denis Zharkov b72a3de86e Parse annotations on lambda-argument 2015-05-07 22:36:15 +03:00
Denis Zharkov c5af4b42b4 Extract common logic for annotation entries collection
Before this change annotation entries starting with '@' within expressions hadn't been resolved

Note that order of annotation entries in result may change according to order of children in PSI (see changed testData)
2015-05-07 22:36:15 +03:00
Denis Zharkov 7d8351abc6 Implement parsing annotations and modifiers starting with '@' 2015-05-07 22:36:15 +03:00
Denis Zharkov b13e932c3c Parse label reference with spaces before '@'
But still report error
2015-05-07 22:36:15 +03:00
Denis Zharkov 3528762e2d Minor, drop constant parameters and rename method 2015-05-07 22:36:15 +03:00
Denis Zharkov 5ce1fc6fbb Minor, rename AnnotationParsingMode's entries 2015-05-07 22:36:15 +03:00
Natalia Ukhorskaya 9108d87a57 Add warning for division by zero:
#KT-5529 fixed
2015-05-07 15:41:37 +03:00
Natalia Ukhorskaya 16b17b9e94 Minor: rename 2015-05-07 13:23:59 +03:00
Natalia Ukhorskaya 8c99183970 Write local functions to localVariables table 2015-05-07 13:23:03 +03:00
Natalia Ukhorskaya 4848af5ef6 Minor: fix warnings 2015-05-07 13:22:06 +03:00
Nikolay Krasko 2d8dcaddd0 Compile modules with circular dependency as one module 2015-05-06 14:19:20 +03:00
Nikolay Krasko 9d986d077c Move kotlin runtime library to end of classpath and remove duplicates with 'util' package 2015-05-06 14:18:24 +03:00
Michael Bogdanov 49f063522c Inline util functions renaming 2015-05-05 12:47:57 +03:00
Michael Bogdanov e0aa64b8d2 Support functional expression in non-local returns 2015-05-05 12:47:56 +03:00
Valentin Kipyatkov 8d887f8780 In progress: KT-7442 Inspection + intention to replace "if (xxx == null) return ..' with elvis 2015-05-02 14:03:24 +03:00
Valentin Kipyatkov 077307b518 "Move lambda argument into parentheses" intention - slightly wider range 2015-05-02 14:03:22 +03:00
Valentin Kipyatkov 252399b9a9 "Invert if condition" intention - smaller availability range + refactored 2015-05-02 14:03:21 +03:00
Alexey Sedunov d096e74c10 Move: Implement inspection which reports mismatch between package directive and containing directory 2015-05-01 18:58:09 +03:00
Alexey Sedunov 8879166f53 Move: Add intention to change file package without moving it physically 2015-05-01 17:16:57 +03:00
Svetlana Isakova 6ee59a06dd Removed obsolete cache for object literals 2015-04-30 21:24:51 +03:00
Svetlana Isakova 02301a0d70 KT-7597 ErrorType leaked into backend
#KT-7597 Fixed
2015-04-30 21:24:51 +03:00
Mikhail Glukhikh f4dd685bbe Fix for a problem with smart cast impossible in a situation when it's not needed. A test for KT-3572. #KT-3572 Fixed. 2015-04-30 16:48:15 +03:00
Denis Zharkov ca8fb53ccd Fix old labels syntax in testData 2015-04-30 10:22:17 +03:00
Denis Zharkov bcee052302 Revert "Temporary parse label definitions with both syntax versions"
This reverts commit 3e3535f8cf.
2015-04-30 10:16:42 +03:00
Denis Zharkov 02659ca22d Adjust project code to new labels syntax 2015-04-30 10:16:42 +03:00
Dmitry Jemerov 09a7e87102 fix text navigation offset for secondary constructors; add some missing element types to FindUsagesProvider
#KT-7607 Fixed
2015-04-29 18:34:53 +03:00
Dmitry Jemerov cce1be3892 rename JetClass.isTrait() to isInterface(); rename ClassKind.TRAIT to INTERACE 2015-04-29 16:50:19 +02:00
Dmitry Jemerov ee60ce8369 understand "interface" keyword as synonym for "trait" 2015-04-29 16:50:14 +02:00
Dmitry Jemerov 8258d72e23 don't report USELESS_CAST in case of casting to superype using 'as' 2015-04-29 16:33:32 +02:00
Dmitry Jemerov f374eec8f1 deprecating types after colon 2015-04-29 16:33:24 +02:00
Alexander Udalov c860f54461 Rewrite codegen tests which check time in deterministic way
Delete one useless test

 #KT-7621 Fixed
2015-04-29 15:28:10 +03:00
Nikolay Krasko 90cdb19324 Add origin for generated jvm overloads and tweak equals methods to distinguish them
- KT-7586 Strange navigation issue

 #KT-7586 Fixed
2015-04-29 15:20:31 +03:00
Dmitry Jemerov ed83385099 delete function which is now unused 2015-04-29 14:07:06 +02:00
Dmitry Jemerov d00b4ca27a update for modern constructor syntax 2015-04-29 14:07:06 +02:00
Dmitry Jemerov f93eeeb563 fix tests by adding missing 'init' keywords to testdata 2015-04-29 14:07:05 +02:00
Dmitry Jemerov 98b8784ab0 drop deprecated syntax for anonymous initializer blocks 2015-04-29 14:07:04 +02:00