How to run a Rust GTK app in IntellIJ IDEA - intellij-idea

I have been using the following GTK Rust template - https://gitlab.gnome.org/World/Rust/gtk-rust-template
Has anyone got any experience running this using IntelliJ IDEA with the Rest plugin? Because of the various .gresource etc. files doing a pure Cargo build is not possible, and instead, it uses Meson to orchestrate the build. Any advice on how to make it work?

Related

Where to find (install) Kotlin cinterop tool on Mac

I would like to try to build Kotlin/Native project with dependencies on some library.
As documentation explains, I need to create def file (which I was already created) and run cinterop tool.
However, I wasn't able to find this tool on my Mac and curious how this could be installed.
Can you please give me some advice?
I strongly advise you to use Gradle + Kotlin MPP plugin. Not only it will provide cinterop support, but it will ease further development, testing, and multiplatform support. It works on any OS, of course.
If you need an example, here is the official one for the cURL library: https://github.com/JetBrains/kotlin-native/blob/master/samples/libcurl/build.gradle.kts. Note the cinterops block under compilations["main"].
The nice thing about Kotlin MPP plugin is that it actually allows you to play with the Kotlin/Native tools directly. It will download the tools specifically for your platform automatically on the first run and place them in ~/.konan directory. So if you really want to use cinterop tool from CLI you'll be able to find it there: ~/.konan/kotlin-native-macos-1.3.61/bin/cinterop. klib and kotlinc are there as well.

How to build jar with javafx in openjdk12

I'm trying to build jar for javafx desktop application. Working in IntelijIdea, jdk 12,using javafx12, link javafx sdk, write VM-options in menu run-edit configuration. In IDE all working correctly, my app launches and works. But when I try to create artifact and then build it to jar all brokes. IDE tell, that fx:deploy isn't there. Then my app don't work even in IDE.
I got stuck here.
Can you, please, help, how to build this javafx to launch it without IDE?
p. s. Know, that in jdk8, where javafx still includes, it's easier, but is it really no other way to create independent from IDE javafx, than using jdk8?
Built GUI with swing, created artifact and then built it to jar.
There wasn't problems.
But I don't want swing...
actual error: "Error. Java FX Packager: Can't build artifact - fx:deploy is not available in this JDK.
Will be really greatfull for tricks or tips with that.

intellij hybris class recompile not working

I installed hybris plugin.
Imported project with it.
Have done ant clean all.
Then, if I try to build->recompile class it's not working. Seems like idea doesn't see classes generated by ant.
If I do build->rebuild project and then build->recompile class it's working fine, but it's not convenient at all. I believe there is fix to this, but I couldn't find it.
This is usual error I've got(packages are different for different cases):
this is essentially the expected behaviour. You can't mix "ant" build
and "native IDEA" build. Those are two separate build systems.
This is an explanation of hybris plugin developer (hybris-integration.atlassian.net/browse/IIPS-120)
And he suggests a solution for that:
before you try to import the project you need to do ant clean all (you will not need to use ant afterwards)
import the project using hybris plugin.
Press Build->Recompile project
Then you can create or modify your test run configuration if needed.
Recompile your classes and so on directly in Idea.
Also, he mentioned deal with JRebel here (hybris-integration.atlassian.net/browse/IIPS-47)
we support both compilation modes. Ant targets and idea internal. They
shouldn't be mixed as idea has it's own compilation model/cache. If
you use idea compilation then you can use JRebel or hotswap.
You cant hotswap classes in hybris without the help of a hotswap agent.There is a tool available in the market called JRebel. It is a good commercial tool if one can afford. However, if you are an open-sourcist, there is a promising alternative to JRebel, which is DCEVM (Dynamic Code Evolution Virtual Machine) along with HotswapAgent.
I don't know if this help,
you can start another cmd console, and run
setantenv and ant build to hotswap class in runtime.

Write an IDE on top of IntelliJ Platform

I want to write a custom IDE on top of IntelliJ Platform. Android Studio is an example. It was built based on IntelliJ Platform and was designed to support Android application development.
There are lots of git GUI out there. However, in Linux, I don't satisfy with any. That is my motivation to write a git IDE for Linux. IntelliJ IDEA already have a very good Git plugin. Using IntelliJ IDEA is a solution. But it is too heavy for opening entire project with different functionalities (Run, Debug, Refactor...) for just Git operations. Therefore, I want to make that plugin a complete IDE for only Git operation.
On IntelliJ Platform forum page, there are tutorials to write plugins. However, it doesn't have the guide for writing a complete IDE.
Are there any tutorials to help me get started?
IntelliJ platform is probably not the best choice for writing a general purpose RCP applications.
https://intellij-support.jetbrains.com/hc/en-us/community/posts/207769065-Developing-a-desktop-Business-Application-using-the-JetBrains-Platform
Git plugin has 65k lines of code, you are talking about gutting ~13M lines IDE (respectively 3M lines of pure Java source code).

Intellij Idea 12 gradle build

I am trying to build a project with gradle from within Intellij Idea 12 (commercial editon) but this keeps failing. I have the gradle plugin enabled and also the gradle gui plugin. The native project gradle import is working. (I'm not using gradle idea btw.)
When using the bash I only run gradle war to build my web application. Now I want to do the same from within Intellij.
The gradle gui plugin seems to be using the wrong JDK (I guess it's the one Idea uses, a 1.6 JDK) and therefor fails to compile because this is a JDK 1.7 project. And it doesn't integrate well into Idea because it seems like an external build process (like triggering external ant tasks).
What I have done so far is to configure my own artifact in a way that is equivalent to the one gradle war would have build. But that means a lot of configuration and simply feels wrong. There should be a better way?
So what do I have to do to make Idea compile a project in a way similar to the command line gradle task?
JetGradle plugin doesn't provide native tasks support at the moment. It's scheduled for v.12.1 - IDEA-95897. Feel free to track the plugin's news and update it manually as soon as corresponding support is provided.