How I can use the JavaFX framework? - intellij-idea

firstly, I want let you know how useful this community is for me, I was stuck on an error
`Error: JavaFX runtime components are missing, and are required to run this application`
and thanks to this answer I actually solved: link
However I've a couple of questions. I noticed that IntelliJ doesn't change the configurations (Like set the VM option and pick the right library for the javaFX project), so each time I've to create a new JavaFX11 or 12 project I've to being throw all the manually settings again.
There's a way for set a "default behaviour" for the IDE ? It's really cumbersome.
The second question is, how I can use all the beautiful framework that the developer community offer for JavaFX? I've seen on openjFX a couple of interesting framework like TilesFX or CalendarFX but there's no information on how implement them on my IDE neither on GitHub nor here.
I have seen that most of them uses Gradle files, but honestly I don't have the faintest idea of what this kind of file does and how implement it on IntelliJ. Thank's to everybody.

Run the project with a more recent JDK like JDK11, for example.
If it does'nt work, you probably forgot to change the JDK of your builder in IntelliJ!
Open the settings and follow the path as bellow:
FOR MAVEN
FOR GRADLE

Related

Getting set up with intelliJ IDEA

Really basic question here but this has always stopped me from using any JetBrains product, but here I am trying once again. I also have the same issues with CLion but that will be for another time and hopefully I can figure it out based on some feedback from this post.
I need to set up my environment in IntelliJ. Nothing special. No build tools. Currently I just run my school projects using
javac Main.java
java Main
This has gotten me so far but I really want to use IntelliJ tools to their full capacity.
I want to be able to set break points and step in and out of my code in their debugger and all the other nice tools that come with running my code through IntelliJ
Every get started tutorial that I have watched on YouTube or from JetBrains themselves already has a basic build configuration set up to run your basic "Hello World" application and that is what I think I need. Just compile my java files into classes and run/debug them.
This is what the run configuration icon in the IDE should look like
And this is what mine currently looks like
I have set many different JDKs to go along with my projects but none of them seem to get the tools I need set up in the IDE. I have even let IntelliJ download one for me and set it up itself to see if maybe I downloaded and installed it wrong and IntelliJ maybe wasn't recognizing it.
This picture below is showing the project structure for an application that I let IntelliJ download a JDK for and set it up itself
So if someone could help me that would be fantastic. Links to videos, blogs are welcome even though I know that isn't the convention on this forum but I think that would be sufficient for my situation. Thanks in advance!
---Update---
I have found that if I create a project in IntelliJ that I get all the default configurations that I need. The problem is when I need to get a project from VCS that I am not getting any of the configurations that I need to run/debug my program in IntelliJ.
The easiest solution here would be to click the green play button next to your main method, on the left where line numbers are displayed.
Intellij will configure a default java run configuration for you. It will be displayed in the menu for later use, like in the screenshot you posted, after your first run.
You can also create one using the to menu: Run > Edit run configuration to add some more options like arguments, environment variables (that only apply for the run config), etc.
A good starting point would be the Intellij help page on that topic. This help pages are always a good start and you find comprehensible instructions there on every topic.
Another good resource is the Intellij by JetBrains YouTube channel. This video about debugging shows both ways I described above. They have lots of quick tutorials about lot of features, like code generation or build tools. Check out the channel's playlists for specific topics.
Update
The problem with the already created project is that the default/ folder is not marked as source folder. You can do that by File > 'Project Structure...' and set the default/ folder as Sources:
The cause for intellij not recognizing this is because you didn't use a folder structure like the one of maven.
For source code:
src/main/java
src/main/resources
and for tests:
src/test/java
src/test/resources
If you set it up that way IntelliJ everything works as expected. I created a pull request to your repo. If you check out the branch, IntelliJ will setup everything correctly automatically.

How to autocomplete/import Flutter classes in IntelliJ?

In IntelliJ, I have to manually import Flutter packages at the top of the file in order for auto-complete to work elsewhere in the file.
I was rather hoping I could start typing something (in a method) and IntelliJ would search my pubspec.yaml and locally within my project and suggest classes I might want. If I selected something that wasn't already imported, it should import it for me.
This basic functionality is available in many other languages and IDEs, so I'm wondering if I've got something misconfigured. I'm using IntelliJ 2018.2 with the latest Flutter and Dart plugins installed.
This is a known issue.
For performance reasons the DartAnalyzer was built to only load libraries that were imported anywhere in the projects code already.
The overall performance of DartAnalyzer was improved a lot since then and it would now allow to provide better suggestions, but it seems there weren't enough resources available yet to get it implemented.
Upvote and follow https://github.com/dart-lang/sdk/issues/25820

intellij unresolved symbol for go lang project

I am using go sdk 1.2.1 linux/386 in intellij 14.0.3. However, when I open a golang project many function and variable are unresolved. I do not what is wrong with intellij. Anything that I can do to make the unresolved symbol solved. I have met the problems before. but I do not know to to solve it. Anyone have met the same problem before? Please help.
Thanks.
As I have no information about which plugin version you are using I'm going to assume that you have 0.9.15.3 release.
The fastest way to fix it would be to use one of the early releases for 1.0.0, available here: github releases page for go plugin for intellij idea
The plugin is currently under a major refactoring and we've started releasing preview builds for it. While the alpha name might be scary, I'm using it daily at work and it's very stable but not everything is up on par with the quality we want it to have.
If you have any further questions, either ask here or browse in the issue tracker
Also, there's a small community on Gitter and you may get answers from there as well.

New Elixir project in Intellij

I've recently started using Elixir and I'd like to keep my code files in quite decent order. So I installed Elixir plugin for Intellij: https://github.com/KronicDeth/intellij-elixir, but stuck with trying to start an Elixir project. Could you give me some tips how to make new Elixir project?
I'm the maintainer of intellij-elixir. Please file support question as Issues on github: https://github.com/KronicDeth/intellij-elixir/issues. In fact, someone already asked a similar question (https://github.com/KronicDeth/intellij-elixir/issues/77). In summary, right now you can't create "Elixir Project". There isn't yet an "Elixir Project" feature/action although you're welcome to open an issue to make that a feature request. (It's nice if you open it instead of me opening it for you as you'll be subscribed to updates then.) With the feature set as is, you can create any type of project you like because all that matters is that the file extension is .ex for the Syntax Highlighting, Grammar parsing, Inspections and Quick Fixes to work. I just create the default Java project when testing intellij-elixir in Intellij or an empty directory or project layout created by mix new in Rubymine. Since two people at least have brought this up I'll add something to README after I'm finished with https://github.com/KronicDeth/intellij-elixir/issues/59.

Eclipse 3.7 RCP Application with multiple plugins

What is the right way to make an RCP application that is “ready for plugins”? I have struggled to do this basic concept and am trying to accomplish this in Eclipse 3.7 (latest 3.x version).
Step 1
I would like to explore this by using 3 eclipse plugin projects:
• HelloWorldRCP
• HelloWorldPluginA
• HelloWorldPluginB
Would it make sense to make HelloWorldRCP with all the common things such as a menu-bar with an Edit menu including cut, copy and paste menu items? The HelloWorldPluginA could add an additional menu-item called “Alpha” and HelloWorldPluginB could add yet another menu-item called “Beta”? However, the cut, copy and paste functionality could still work within Plugin A and B?
Step 2
Next, how do I deploy this as a “product”? I have made a new product configuration and defined the dependencies from the default runtime configuration that was made. I do notice that there are a lot of dependency jars that are included, but I don’t think I use them. For example, I don’t use data-binding to my knowledge, but it keeps coming up as a required dependency.
I go to Export | Eclipse Product and an executable environment is created in my desired folder. However, when I copy this to another machine it seems to keep referencing the original machines Java installation location. How does one get around this?
I have tried to bundle a jre with the Product Export but nothing is created. I have also just tried copying my jre6 as a jre folder. This does seem to work.
Next problem here is the 32/64 bit Java execution environments. What is advised here? I have been aiming to build on 32 bit only and then hopefully that will run on 32 or 64bit platforms. Is this correct?
Step 3
I need to web-start this now. The old way of initiating an Eclipse 3.5 application, using a startup.jar has changed. I now use the equinox launcher and reference it in the jnlp instead of the startup.jar. However, I keep getting an exception which seems related to the 32/64 bit equinox win32_64 jar. I notice that the export writes a folder and not a jar. I read somewhere that this is a “clever trick” to allow compatibility for both 32 and 64bit runtime environments.
The problem here is that I need a jar and not a folder so that I can sign the jars required and deploy accordingly.
Does anyone have a Java Web-start example for and Eclipse 3.7 RCP application? Or any advice?
You are going to need a lot of time to learn everything you've asked about here.
Here is one of the best places to start... http://www.vogella.com/eclipse.html
That site covers a lot of basics. But you need a little more than basics.
The best example of a working RCP product with some of the features you require can be found at ... http://max-server.myftp.org/trac/mp3m
This guy (Kai) makes all of the source code available via SVN, and he has some very advanced stuff going on in his application. He also has a good blog with some advanced RCP tips and tricks. http://www.toedter.com/blog/
Another thing you'll want to investigate is Tycho. I realize that you didn't mention anything about building your application, but I've found that using Tycho for building has made my most recent foray into Eclipse RCP 100 times better than the other times I've done RCP work. So, my advice, get to know Tycho. http://wiki.eclipse.org/Tycho/Reference_Card
The learning curve of Eclipse RCP is somewhat steep, but I think it's worth the effort.
Good Luck!