Commit Graph

45484 Commits

Author SHA1 Message Date
Vyacheslav Gerasimov cec554ead2 182: Remove snappy-in-java from IntellijCoreDependencies 2018-04-18 18:00:05 +03:00
Vyacheslav Gerasimov 2a04d08d3e Build: Use fromEmbeddedComponents helper in :prepare:android-lint 2018-04-18 17:53:32 +03:00
Vyacheslav Gerasimov 3b472f4411 Build: Use lazy from with trailing lambda in fromEmbeddedComponents
configurations shouldn't be resolved at project configuration step
2018-04-18 17:53:32 +03:00
Vyacheslav Gerasimov 49bb722f70 Remove update_dependencies from .idea/ant.xml 2018-04-18 17:53:32 +03:00
Nicolay Mitropolsky 0aa236d1ac 182: KotlinElementActionsFactory.createAddFieldActions no more generates private @JvmField and lateinit @JvmField 2018-04-18 17:41:35 +03:00
Alexander Udalov 789a6f9c63 Add test for deterministic bridge order
The test didn't fail before fixin the issue (in the previous commit),
but may still be useful in the future

 #KT-23707 Fixed
2018-04-18 15:55:33 +02:00
Denis Vnukov e3829a70b0 Stable order of synthesized bridges.
In some cases when several bridge methods are generated, their order
is undetermenistic. For example for class ClassLowerWithContext in the
following example

```
interface IrElement
class IrClassContext

interface IrElementVisitor<out R, in D> {
    fun visitElement(element: IrElement, data: D): R
}

interface IrElementTransformer<in D> : IrElementVisitor<IrElement, D> {
    override fun visitElement(element: IrElement, data: D): IrElement =
            element.also { throw RuntimeException() }
}

abstract class ClassLowerWithContext : IrElementTransformer<IrClassContext?>
```

kotlin compiler synthesizes two additional bridges:

  public IrElement visitElement(IrElement, IrClassContext);
  [bridge] public Object visitElement(IrElement, Object);
  [bridge] public IrElement visitElement(IrElement, Object);

Unfortunately the behavior is not deterministic and not easy to reproduce.
2018-04-18 15:36:33 +02:00
Mikhail Glukhikh 5212b97047 Remove reformatting in intentions isApplicable via createByPattern 2018-04-18 16:15:57 +03:00
Mikhail Glukhikh ef3ba5f0b1 Test local inspections on the fly via highlighting
Fixes problem with INFORMATION highlight type in batch mode (IDEA 181).
It's no more required to report INFORMATIONs in unit tests in batch.
2018-04-18 16:14:43 +03:00
Mikhail Glukhikh b6661710dd Use expression body: reformat 2018-04-18 16:14:08 +03:00
Mikhail Glukhikh 28fe30c70d Use expression body: extend range if default level is INFORMATION
So #KT-23167 Fixed
2018-04-18 16:13:54 +03:00
Nikolay Krasko f62e0dc5f7 Use com.intellij.modules.idea as dependency to forbid install in AS
`com.intellij.modules.idea` was introduced in 182 to distinguish
AS and IDEA installation (IDEA-187502).

Dependency should be removed in CLion and AppCode installation.
2018-04-18 15:49:41 +03:00
Nikolay Krasko 78a5fa766f Remove com.intellij.modules.remoteServers dependency from AS 3.2
Otherwise plugin won't be compatible with AS.
2018-04-18 15:49:40 +03:00
Nikolay Krasko 1ad2ed6761 Add com.intellij.modules.cidr.lang module dependency for CLion and AppCode
Otherwise after removing java dependency it would be possible to
install plugin non only in CLion and AppCode, but also in WebStorm,
PHPStorm, etc.
2018-04-18 15:49:40 +03:00
Nikolay Krasko c4917d6d1c Use only hard dependency to java module and use include for jvm.xml (KT-23638)
Trick with both optional/non-optional dependency doesn't work in IDEA,
as it doesn't do an additional check optional dependency is found.

See com.intellij.ide.plugins.PluginManagerCore#checkDependants(
  IdeaPluginDescriptor, Function<PluginId, IdeaPluginDescriptor>,
  Condition<PluginId>, Set<PluginId>)

 #KT-23638 Fixed
2018-04-18 15:49:40 +03:00
Alexey Sedunov 03cca448d3 Misc: Make test superclass abstract 2018-04-18 14:37:23 +03:00
Nikolay Krasko 349f16aa64 Fix AbstractScratchRunActionTest.kt and remove usages of projectDisposable 2018-04-18 13:59:36 +03:00
Toshiaki Kameyama ff63ba4dc1 Add inspection: redundant internal in local anonymous object / class
So #KT-23617 Fixed
2018-04-18 11:17:52 +03:00
Mikhail Glukhikh 1d3ba5641d "Main should return Unit": report on identifier, delete block body type 2018-04-18 11:16:03 +03:00
Toshiaki Kameyama 1cd438c3f7 Add inspection "main should return Unit" #KT-16085 Fixed 2018-04-18 10:59:23 +03:00
Ilya Gorbunov 8784d89f38 Use kotlin-stdlib-sources.jar in tests
Instead of deprecated kotlin-runtime-sources
2018-04-18 05:22:40 +03:00
Alexey Sedunov 3f147aabb0 Misc: Extract AbstractConfigureKotlinInTempDirTest superclass (181/AS32) 2018-04-17 20:38:00 +03:00
Alexey Sedunov 183559dcfa Misc: Extract AbstractConfigureKotlinInTempDirTest superclass
This avoids duplicating runs of ConfigureKotlinInTempDirTest
2018-04-17 17:46:50 +03:00
Pavel V. Talanov 33a312c26d Do not throw when trying to resolve java outside project model
#KT-23444 Fixed
 #KT-22825 Fixed
2018-04-17 16:19:49 +02:00
Mikhail Zarechenskiy 4af8833f08 Render unwrapped suspend function in backend
Hierarchy of specially wrapped suspend function may have inconsistent
 overridden descriptors: some of them may be wrapped, some unwrapped.
 To mitigate this problem, currently it's proposed to render only
 unwrapped functions, which are always have stable overridden descriptors

 #KT-23809 Fixed
2018-04-17 16:24:13 +03:00
Mikhail Zarechenskiy c216749eb6 [NI] Fix substitutor for anonymous types with captured type parameters 2018-04-17 16:06:55 +03:00
Juan Chen b7fa06cca4 Add "Convert Java to Kotlin" to ProjectViewPopupMenu and
EditorTabPopupMenu.
2018-04-17 15:36:55 +03:00
Alexey Sedunov 01b0518a61 Gradle Support: Declare 'gradleFrameworkSupport' extension point
This fixes exception in the New Project wizard (IDEA 172)

 #KT-23835 Fixed
2018-04-17 13:37:52 +03:00
Dmitry Petrov d3a1d93460 Type translation, initial import 2018-04-17 10:35:52 +03:00
Dmitry Petrov d1fe32a486 IrType: basic interface & implementation 2018-04-17 10:35:52 +03:00
Yan Zhulanow b665a1b2b6 Android Extensions: Create application resource directories if missing (181, as31) 2018-04-16 20:42:58 +03:00
Mikhail Zarechenskiy 3318549622 [NI] Fix smartcasts computation for dot-qualifier expressions 2018-04-16 18:13:12 +03:00
Mikhail Glukhikh 55da251ffc Resolve problem with too long command line path in Gradle Windows 2018-04-16 17:08:27 +03:00
Vyacheslav Gerasimov 8b5faca2d1 Delete obsolete update_dependencies.xml 2018-04-16 16:23:28 +03:00
Alexey Sedunov e58f8763fe Minor: Fix NPE in tests which doesn't use facets 2018-04-16 16:14:01 +03:00
Nikolay Krasko 9bce8759bb Remove accidentally added *.173.as32 files 2018-04-16 15:55:53 +03:00
Nikolay Krasko ecd2db3b48 Remove bunch files that are equal to base files 2018-04-16 15:55:53 +03:00
Vyacheslav Gerasimov b06e644753 as32: Fix tests compilation for AS 3.2 C10 2018-04-16 15:48:12 +03:00
Zalim Bashorov e1ba08e03d [JS IR BE] add new items to whitelist and regenerate tests 2018-04-16 14:34:44 +03:00
Zalim Bashorov ac42a0a23e [JS IR BE] don't materialize Unit for toplevel expressions 2018-04-16 14:34:44 +03:00
Zalim Bashorov 8408bada76 [JS IR BE] basic support for the case when IrBlock is used as expression
In this case compiler generates comma separated expressions.
2018-04-16 14:34:43 +03:00
Zalim Bashorov 77ac0a5d95 [JS IR BE] use most of new intrinsics in IR -> IR 2018-04-16 14:34:43 +03:00
Zalim Bashorov 48219e4a9a [JS IR BE] support new intrinsics in IR -> JS 2018-04-16 14:34:43 +03:00
Zalim Bashorov 76e102a2d2 [JS IR BE] declare more intrinsics
* jsGt
* jsGtEq
* jsLt
* jsLtEq
* jsUnaryPlus
* jsUnaryMinus
* jsPrefixInc
* jsPostfixInc
* jsPrefixDec
* jsPostfixDec
* jsAnd
* jsOr
* jsBitAnd
* jsBitOr
* jsBitXor
* jsBitNot
* jsBitShiftR
* jsBitShiftRU
* jsBitShiftL
* jsInstanceOf
2018-04-16 14:34:42 +03:00
Zalim Bashorov 2ed82f136c [JS IR BE] move intrinsic for Object.create calls to JsIntrinsics 2018-04-16 14:34:42 +03:00
Zalim Bashorov 89aefb2e3f [JS IR BE] add basic support for some binary and equality operations; add some intrinsic infrastructure 2018-04-16 14:34:41 +03:00
Zalim Bashorov 1f7d818307 [JS IR BE] use mapTo instead of map when translate call arguments 2018-04-16 14:34:41 +03:00
Zalim Bashorov 194f5d575a [JS IR BE] use IrMemberAccessExpression.valueArgumentsCount instead of descriptor based IrFunctionSymbol.parameterCount and remove last one 2018-04-16 14:34:40 +03:00
Nikolay Krasko 1fb2b40684 Fix 182 branch after QueryExecutor and subclasses update
Parameter taking Processor<T> were replaced with Processor<? super T>.
https://github.com/JetBrains/intellij-community/commit/aaed1ccb910f6f4a9ea2f96894d99b6e35a59ef9
https://github.com/JetBrains/intellij-community/commit/c6b40a53ee5b2a0807c55adafb59edb453090915

Instead of updating all usages, use ExecutorProcessor to avoid
different source code for different IDEAs.
2018-04-14 15:29:38 +03:00
Vyacheslav Gerasimov 879c7f3837 as32: Revert KotlinCallerChooser to 173 state 2018-04-13 21:33:17 +03:00