Add kotlinx.coroutines to IDEA dependencies
Add some cool coroutine-based stuff Like CoroutineDispatcher for EDT
This commit is contained in:
Generated
+1
@@ -103,6 +103,7 @@
|
|||||||
<element id="module-output" name="kotlin-gradle-tooling" />
|
<element id="module-output" name="kotlin-gradle-tooling" />
|
||||||
</element>
|
</element>
|
||||||
<element id="library" level="project" name="uast-java" />
|
<element id="library" level="project" name="uast-java" />
|
||||||
|
<element id="library" level="project" name="kotlinx-coroutines-core" />
|
||||||
</element>
|
</element>
|
||||||
<element id="directory" name="kotlinc">
|
<element id="directory" name="kotlinc">
|
||||||
<element id="dir-copy" path="$PROJECT_DIR$/dist/kotlinc" />
|
<element id="dir-copy" path="$PROJECT_DIR$/dist/kotlinc" />
|
||||||
|
|||||||
+11
@@ -0,0 +1,11 @@
|
|||||||
|
<component name="libraryTable">
|
||||||
|
<library name="kotlinx-coroutines-core">
|
||||||
|
<CLASSES>
|
||||||
|
<root url="jar://$PROJECT_DIR$/dependencies/kotlinx-coroutines-core.jar!/" />
|
||||||
|
</CLASSES>
|
||||||
|
<JAVADOC />
|
||||||
|
<SOURCES>
|
||||||
|
<root url="jar://$PROJECT_DIR$/dependencies/kotlinx-coroutines-core-sources.jar!/" />
|
||||||
|
</SOURCES>
|
||||||
|
</library>
|
||||||
|
</component>
|
||||||
@@ -16,5 +16,6 @@
|
|||||||
<orderEntry type="module" module-name="util" />
|
<orderEntry type="module" module-name="util" />
|
||||||
<orderEntry type="module" module-name="j2k" />
|
<orderEntry type="module" module-name="j2k" />
|
||||||
<orderEntry type="library" scope="PROVIDED" name="gradle-and-groovy-plugin" level="project" />
|
<orderEntry type="library" scope="PROVIDED" name="gradle-and-groovy-plugin" level="project" />
|
||||||
|
<orderEntry type="library" exported="" name="kotlinx-coroutines-core" level="project" />
|
||||||
</component>
|
</component>
|
||||||
</module>
|
</module>
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2010-2017 JetBrains s.r.o.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package org.jetbrains.kotlin.idea.core.util
|
||||||
|
|
||||||
|
import com.intellij.openapi.application.ApplicationManager
|
||||||
|
import kotlinx.coroutines.experimental.CoroutineDispatcher
|
||||||
|
import kotlin.coroutines.experimental.CoroutineContext
|
||||||
|
|
||||||
|
|
||||||
|
public object EDT : CoroutineDispatcher() {
|
||||||
|
override fun isDispatchNeeded(context: CoroutineContext): Boolean {
|
||||||
|
return !ApplicationManager.getApplication().isDispatchThread
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun dispatch(context: CoroutineContext, block: Runnable) {
|
||||||
|
ApplicationManager.getApplication().invokeLater(block)
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -63,5 +63,6 @@
|
|||||||
<orderEntry type="module" module-name="descriptors" />
|
<orderEntry type="module" module-name="descriptors" />
|
||||||
<orderEntry type="module" module-name="kotlin-gradle-tooling" />
|
<orderEntry type="module" module-name="kotlin-gradle-tooling" />
|
||||||
<orderEntry type="module" module-name="build-common" />
|
<orderEntry type="module" module-name="build-common" />
|
||||||
|
<orderEntry type="library" name="kotlinx-coroutines-core" level="project" />
|
||||||
</component>
|
</component>
|
||||||
</module>
|
</module>
|
||||||
@@ -33,6 +33,8 @@
|
|||||||
|
|
||||||
<property name="uast.version" value="1.0.12"/>
|
<property name="uast.version" value="1.0.12"/>
|
||||||
|
|
||||||
|
<property name="kotlinx.coroutines.version" value="0.14.1"/>
|
||||||
|
|
||||||
<property name="generators" value="${basedir}/generators"/>
|
<property name="generators" value="${basedir}/generators"/>
|
||||||
|
|
||||||
<property name="idea.dir" value="ideaSDK"/>
|
<property name="idea.dir" value="ideaSDK"/>
|
||||||
@@ -240,6 +242,11 @@
|
|||||||
<get-maven-library prefix="org/jetbrains/uast" lib="uast-java" version="${uast.version}" target.jar.name.base="uast-java" server="${uast.server}"/>
|
<get-maven-library prefix="org/jetbrains/uast" lib="uast-java" version="${uast.version}" target.jar.name.base="uast-java" server="${uast.server}"/>
|
||||||
<get-maven-library prefix="org/jetbrains/uast" lib="uast-tests" version="${uast.version}" target.jar.name.base="uast-tests" server="${uast.server}"/>
|
<get-maven-library prefix="org/jetbrains/uast" lib="uast-tests" version="${uast.version}" target.jar.name.base="uast-tests" server="${uast.server}"/>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- kotlinx.coroutines -->
|
||||||
|
<get-maven-library prefix="org/jetbrains/kotlinx" lib="kotlinx-coroutines-core" version="${kotlinx.coroutines.version}"
|
||||||
|
target.jar.name.base="kotlinx-coroutines-core" server="http://dl.bintray.com/kotlin/kotlinx/"/>
|
||||||
|
|
||||||
<!-- Closure Compiler -->
|
<!-- Closure Compiler -->
|
||||||
<!-- A download url taken from http://code.google.com/p/closure-compiler/wiki/BinaryDownloads -->
|
<!-- A download url taken from http://code.google.com/p/closure-compiler/wiki/BinaryDownloads -->
|
||||||
<get src="http://dl.google.com/closure-compiler/compiler-20160315.zip"
|
<get src="http://dl.google.com/closure-compiler/compiler-20160315.zip"
|
||||||
|
|||||||
Reference in New Issue
Block a user