Commit Graph

38963 Commits

Author SHA1 Message Date
Sergey Igushkin 8e65b5f2c8 Gradle plugins migration to Gradle build
* Add gradle-tools subproject
* Add Gradle buildscripts to the related projects
* Remove the projects from the libraries pom.xml
* Move AndroidGradleWrapper.groovy to separate source root
* Changed artifact dependencies to project dependencies where needed
* Extract common configuration into commonConfiguration.gradle
* (convert functions to closures to be able to call them)
* Refactor DSL usage
* Replace `project.properties` with `findProperty`
* Unify Gradle wrapper between `libraries` and `gradle-tools`
(as a temporary solution, just made the wrapper files the same)
2017-05-10 20:03:26 +03:00
Anton Bannykh 503891846f Updated some tests to expect the new '-Xfoo=bar' advanced options syntax 2017-05-10 19:32:52 +03:00
Mikhail Glukhikh f0543439f4 Use InfixCallToOrdinaryIntention directly for INFIX_MODIFIER_REQUIRED
So #KT-10211 Fixed
2017-05-10 17:43:46 +03:00
Mikhail Glukhikh 967c01f0ba Override 'equals' in SelfTargetingIntention
This prevents suggestion of duplicating intentions
2017-05-10 17:43:45 +03:00
Kirill Rakhman a8b2d3b4e8 Add inspection to detect copy() calls in a data class without named arguments
So #KT-17660 Fixed
2017-05-10 17:43:44 +03:00
Alexey Andreev 2c10f253c5 Fix node.js tests on Windows agents in Teamcity 2017-05-10 16:46:49 +03:00
Dmitry Neverov 3002639fd7 Take control flow into account for checking fall-through switch branches
#KT-16133 Fixed
2017-05-10 15:57:21 +03:00
Dmitry Neverov 31478f8efa Detect escaped backslashes
#KT-15761 Fixed
2017-05-10 15:51:18 +03:00
Dmitry Jemerov 9c4f897d31 Index properties defined in primary constructor
#KT-15029 Fixed
2017-05-10 14:27:28 +02:00
Dmitry Jemerov ec53a6dbe7 Return non-default lexer state for unmatched backtick
When a document is changed, the editor highlighter restarts the lexer
at the last point where it was in the default state. Previously, if
a matching backtick was deleted and then reinserted, the lexer was
resumed just before the reinsertion point, and as the result the two
backticks were parsed not as two delimiters of a single token but as
two BAD_CHARACTER tokens. With this change, all tokens after the
unmatched backtick will be in a non-default state, so the lexer will
restart at the first backtick and will correctly see the two backticks
as a single token.

 #KT-9091 Fixed
2017-05-10 14:27:27 +02:00
Dmitry Jemerov 66877c138d Correctly handle editor selection in "Show expression type"
To avoid showing a large list, the previous logic returned only the
element directly at caret and other elements with the same start
offset. When selection is present, the platform logic looks only at
elements which have a larger range than the selection, so our elements
could be completely filtered out. Now we look at the selection
ourselves and adjust the returned elements accordingly.

 #KT-16423 Fixed
2017-05-10 14:27:26 +02:00
Dmitry Jemerov c3c0bcb1be Better caret position for new Kotlin file/class
#KT-15255 Fixed
2017-05-10 14:27:26 +02:00
Dmitry Jemerov d1893cfa5f Don't highlight entire complex callee expression as call
If an expression returns something that has invoke() defined on it,
this entire expression can act as a callee. If we highlight it, this
will suppress more useful highlighting such as string literals.

 #KT-16159 Fixed
2017-05-10 14:27:25 +02:00
Dmitry Jemerov 5d9307024a Hide Kotlin live template macros from non-Kotlin contexts
#KT-16635 Fixed
2017-05-10 14:27:24 +02:00
Dmitry Jemerov c778e0454d Show line markers for suspending iteration
#KT-16803 Fixed
2017-05-10 14:27:23 +02:00
Dmitry Jemerov baa43a2a55 Show line markers for sealed classes
#KT-16755 Fixed
2017-05-10 14:27:22 +02:00
Dmitry Jemerov f64aaed205 Allow updating of fold region for imports when it's collapsed
#KT-12856 Fixed
2017-05-10 14:26:15 +02:00
Dmitry Jemerov 66ce2a6998 Render anonymous objects in Show Expression Type
#KT-17304 Fixed
2017-05-10 14:25:03 +02:00
Dmitry Jemerov 06a1d362d1 Pass Editor to StructureViewModel (required for autoscroll from source)
#KT-17439 Fixed
2017-05-10 14:25:02 +02:00
Dmitry Jemerov b33c544fdf Enable rainbow highlighting for destructuring declaration entries
#KT-17652 Fixed
2017-05-10 14:25:02 +02:00
Mikhail Glukhikh 382bf9a500 ConvertReferenceToLambda status refactoring
Intention is not registered now; inspection is enabled by default now,
 but has highlight level of "No highlighting"
2017-05-10 14:56:38 +03:00
Mikhail Glukhikh 759e6643c6 ConvertLambdaToReference refactoring
Intention is not registered now; inspection is enabled by default now,
 but has highlight level of "No highlighting"
Inspection does not depend on text length now

So #KT-14335 Fixed
2017-05-10 14:56:37 +03:00
Mikhail Glukhikh 1d722e01f0 Get rid of local version of RemoveModifierFix 2017-05-10 14:56:36 +03:00
Mikhail Glukhikh 02345670b2 Get rid of local version of AddModifierFix 2017-05-10 14:56:35 +03:00
Mikhail Glukhikh bb76783654 Minor (import removed) 2017-05-10 14:56:33 +03:00
Alexey Sedunov f70bac019a Change Signature: Fix TypeInfo comparison
#KT-13437 Fixed
2017-05-10 14:49:53 +03:00
Alexey Sedunov 8bbf8e185a Move: Filter out usages with visibility error before refactoring
If declaration is already invisible before move,
no visibility conflict should be reported

 #KT-17571 Fixed
2017-05-10 14:49:52 +03:00
Alexey Sedunov 0a5f9d8181 Move: Specify conflict containing declaration more precisely
Also do not render class fqname for member declarations

 #KT-17547 Fixed
2017-05-10 14:49:51 +03:00
Mikhail Zarechenskiy fba52359ac Add tests for obsolete issues
#KT-13112 Obsolete
 #KT-14249 Obsolete
2017-05-10 13:52:26 +03:00
Mikhail Zarechenskiy 38eff6966d Lazy resolve: fix scope for primary constructor parameters
For classes on top level scope was getting for file, which may introduce resolution problems with generics

 #KT-8829 Fixed
2017-05-10 13:52:21 +03:00
Kirill Rakhman dbcf796e90 Add Smart Enter processor for object expessions (#1079)
Fixes #KT-17807
2017-05-10 11:49:08 +03:00
Dmitry Jemerov 4b811a3639 Fix tests 2017-05-09 11:50:31 +02:00
nd e20e097a63 Stricter type checks in 'convert to range' intention (#1073)
#KT-17079 #KT-17762 Fixed
2017-05-09 10:31:32 +03:00
Nadia Humbert-Labeaumaz e76f1acc0b Remove "Move to class body" intention for annotation parameters (#1076)
#KT-17708 Fixed
2017-05-09 10:27:37 +03:00
Dmitry Jemerov 80e17cbe9c Don't crash on non-jar files added to classpath
#KT-17698 Fixed
2017-05-09 09:18:07 +02:00
Yuli Fiterman 4393e2d518 KT-7848 -- unmerged changes (#1075)
* KT-7848 Initial implementation of literal copy/paste processor for Kotlin

* KT-7848: Tests

* KT-7848: fix issues caught in unit tests with recognizing invalid template entries

* KT-7848: check for KtFile

* KT-7848:  fix capitalization for test data file names

* KT-7848:  Initial changes according as per review

* KT-7848:  TemplateTokenSequence tests

* KT-7848:  fix off by one error caught in test

* KT-7848:  Reformat with keep empty lines in code -> 0
2017-05-08 18:50:41 +03:00
Yuli Fiterman 99b1bb98dc KT-7848: Literal copy/paste processor for Kotlin (#1074)
* KT-7848 Initial implementation of literal copy/paste processor for Kotlin

* KT-7847: Tests

* KT-7847: fix issues caught in unit tests with recognizing invalid template entries

* KT-7847: check for KtFile

* KT-7847:  fix capitalization for test data file names

* KT-7847:  Initial changes according as per review
2017-05-08 17:18:28 +03:00
Kirill Rakhman 8e00af5642 Add intention to convert top level val with object expression to object declaration (#974)
* Add intention to convert top level val with object expression to object
Fixes #KT-14137

* fix intention description
2017-05-08 16:35:03 +03:00
nd 93b5eec71e Convert to secondary constructor is not applicable to data classes (#1071)
#KT-15942 Fixed
2017-05-08 16:24:37 +03:00
nd c9f475b402 Detect redundant semicolon before empty import list (#1072)
#KT-16577 Fixed
2017-05-08 16:14:22 +03:00
xiexed b8942c5f04 Readme for ultimate project (#1070) 2017-05-08 15:55:30 +03:00
Ilya Chernikov 71a04f8cfc Fix script-related tests that aren't ready for roots changed optimizations
(cherry picked from commit ab52c55)
2017-05-08 00:20:37 +02:00
Ilya Chernikov ca331d2f55 Optimize scripting-related cache creation and update
reduce number of cases when changes are reported from script dependencies
  provider, that causing rootsChanged event, in particular empty dependencies
  are filtered out now

Should reduce IDEA startup delays.
2017-05-07 17:32:48 +02:00
Ilya Chernikov 07ad9aa08d Add logging with time measurement to script dependencies caching and caches updating 2017-05-07 17:32:47 +02:00
Ilya Chernikov 3f9aec31bd Optimize scripting-related files monitoring
filter vfs changes events to take only non-infrastructure files from actual
project
also drop unnecessary readAction during internal caches update

Should reduce IDEA startup delays.
2017-05-07 17:32:46 +02:00
Dmitry Jemerov 8337cd455f Fix reporting exception problems on Kotlin UAST fields (KT-17714) 2017-05-06 08:18:08 +02:00
shiraji 56d712a02a Introduce quick-fix adding label to 'return' in closures #KT-16851 Fixed 2017-05-05 23:27:10 +03:00
Ilya Gorbunov 2f7ab1c0c1 Inline some properties from kotlinManifest.properties that were used only once 2017-05-05 21:56:56 +03:00
Ilya Gorbunov 96c36fb317 Remove manifest.impl.value.kotlin.version and other unused properties from kotlinManifest.properties 2017-05-05 21:56:56 +03:00
Ilya Gorbunov 720e6ecdb6 kotlin.language.version property no longer used in maven build 2017-05-05 21:56:56 +03:00