eirikb
02/26/2021, 9:59 PMJFrame
when code is reloaded. Note: My frame is for testing, it will only show one single component. In other words; any hack can be used, e.g., continuously monitoring classloader or something. I tried creating a thread and checking on hashCode
of my class, but it doesn't seem to change.rocketraman
03/10/2021, 5:36 PMtim
03/11/2021, 9:16 AMbjonnh
03/12/2021, 6:47 PMefemoney
03/14/2021, 2:19 PMChristian Dräger
03/15/2021, 3:07 PM@Language
annotation intellij is able to syntax hightlight / autocomplete strings of some languages.
For instance one could do something like
@Language("HTML")
val someHtmlString = "<html><head><title>hello<!title><!head><!html>"
and would get autocompletion and syntaxhighlighting which is a really nice feature in my opinion
Currently i am wondering if i could make a “feature” for a method i have written to evaluate Javascript code via graalvm.
for better understanding i have a lambda function like this:
fun evalJs(source: () -> String): Value = JavascriptEngine.context.eval("js", source())
that could than be used like:
data class MyExampleService(
val name: String
) {
fun toGreeting(name: String) = copy(name = "Hi $name!")
}
@Test
internal fun `can mutate kotlin data class in JS and do further operations on the object`() {
val result = with(member(MyExampleService(""))) {
evalJs {
"""
const converted = $this.toGreeting('Christian');
converted.getName().toUpperCase() // call data class getter 'getName' and use JS 'toUpperCase' function
"""
}.asString()
}
expectThat(result).isEqualTo("HI CHRISTIAN!")
}
since i pass a string that represents javascript code to my evalJs
i think it would be great if it could have the syntax highlighting as well.
what i have tried naively was just adding the @Language
annotation to my evalJs
parameter like so:
fun evalJs(@Language("JS") source: () -> String): Value = JavascriptEngine.context.eval("js", source())
since this solution was not working i changed my parameter from beeing a function to a string which did the trick successfully (means whenever i pass a string parameter to the evalJs
function it will be treated like JS by intellij)
fun evalJs(@Language("JS") source: String): Value = JavascriptEngine.context.eval("js", source)
now i am wondering if this is somehow possible in the lambda version of evalJs
?Marc Knaup
03/16/2021, 3:55 PMDownload kotlin-stdlib-common-1.4.30-270.pom...EDIT: oh
Could not find org.jetbrains.kotlinkotlin stdlib common1.4.30-270.
Required by:
project :core-admin > io.ktorktor client core1.5.1
project :core-admin > io.ktorktor client core1.5.1 > io.ktorktor http1.5.1
project :core-admin > io.ktorktor client core1.5.1 > io.ktorktor http cio1.5.1
project :core-admin > io.ktorktor client core1.5.1 > io.ktorktor http1.5.1 > io.ktorktor utils1.5.1
project :core-admin > io.ktorktor client core1.5.1 > io.ktorktor http1.5.1 > io.ktorktor utils1.5.1 > io.ktorktor io1.5.1My Gradle sync is completely broken by now 😞 Edit: Mystery solved: https://youtrack.jetbrains.com/issue/KTOR-2055 (it’s actually not Ktor’s fault)
v79
03/21/2021, 10:03 AMClaude Brisson
03/22/2021, 10:42 AMivanmorgillo
03/31/2021, 1:31 PMvineethraj49
04/01/2021, 9:55 PMbod
04/03/2021, 7:01 PMbod
04/03/2021, 7:02 PMbod
04/03/2021, 7:02 PMbod
04/03/2021, 7:07 PMdodalovic
04/09/2021, 7:49 AMRob Elliot
04/14/2021, 9:05 AMkotlinx.coroutines
like kotlinx.coroutines.delay
. Reimporting the gradle project didn’t help, and the gradle project window showed the project as having org.jetbrains.kotlinxkotlinx coroutines core1.4.3 & org.jetbrains.kotlinxkotlinx coroutines core jvm1.4.3 on the classpath - still got the dreaded red font.
Feels like IntelliJ’s quality control has really gone backwards in the last year or two.napperley
04/21/2021, 1:59 AMnapperley
04/21/2021, 2:03 AMRob Elliot
04/28/2021, 2:26 PMKarlo Lozovina
04/29/2021, 9:20 AMwhen
matches on it? could structural search be used to accomplish this?Filipe Duarte
05/01/2021, 2:34 PMFilipe Duarte
05/01/2021, 2:34 PMDenis Sazonov
05/04/2021, 7:55 AMnapperley
05/05/2021, 3:54 AMchristophsturm
05/05/2021, 11:06 AMCyril Find
05/06/2021, 1:25 PMUnable to determine application id: com.android.tools.idea.run.ApkProvisionException: Error loading build artifacts from: path/to/my/project/app/build/outputs/apk/debug/output-metadata.json
and it does not install and launch the appLastExceed
05/11/2021, 8:42 AMSudhir Singh Khanger
05/20/2021, 4:09 AM