Intellij Idea: Disable kotlin file expansion in project explorer - intellij-idea

How can i disable expanding of kotlin and kotlin script file in intellij idea. its start happening in the version 2018.3 and i cannot find the option to disable it.

In the menu lies in the top-right corner of Project view, untick Show members.

Related

Configuring Intellij to behave as Eclipse

As i recently switched to Intellij from eclipse, i was looking for a way a way i can make Intellij shortcuts to behave same as Eclipse.
I found that there are individual shortcuts available to be edited, But that is too much time taking.
Any help on locating the easy way out?
If you go to File -> Settings -> Keymap you can choose Eclipse from the dropdown list.
More information regarding keyboard shortcut configuration you could find here.
Personally I would advise to learn the default shortcuts from Intellij IDEA.
There is Eclipse predefined keymap in "Keymap" list at Settings | Keymap.
Also check this article: https://www.jetbrains.com/help/idea/eclipse.html

IntelliJ and JavaFX support

I just tried to set up my first IntelliJ Java FX project. I was doing a tutorial where some fxml files are created. A screenshot from a eclipse window is shown:
I tried to do something similiar, but if I go to "new file", I cant even choose a fxml format. Is there no support in IntelliJ for that? I googled around but I couldnt find anything. Always it mentions I should try to enable the JavaFX support for my project, but it is enabled.
Any ideas?
Intellij 13.1, Ultimate Edition
Right Click on the folder you want to create the new file in (e.g. the ch.makery.address.view package), then select from the context menu:
New | File
Type the name of the fxml file you want to create (e.g. RootLayout.fxml).
You now have a blank fxml file which you can hand edit.
Hand editing fxml isn't really advised except for minor tweaks.
So install SceneBuilder and you can edit the new fxml in SceneBuilder by right-clicking on the fxml filename in the Idea project window and choosing "Open in SceneBuilder".
See also, this related question on what constitutes a JavaFX project in Intellij Idea.

Is there a keyboard shortcut in IntelliJ IDEA to synchronize all Gradle projects?

Since I need to refresh Gradle quite often I wish to use a shortcut for this. Under
Settings > Keymaps
I just find the Gradle Tool Windows.
I use IntellJ IDEA 13.1.
There's an action in the IDE to "Refresh all external projects" which should kick off a refresh for the Gradle project.
You can allocate this action with your own keybinding. Open Settings -> Keymap and type "refresh" in the search field. Now you should see some refresh actions and the "ExternalSystem.RefreshAllProjects" as well.
In the keymap setting, there's Sync Project with Gradle Files. Assign your own keymap for it.
Bringing you smoothly programming by directly using the hotkey to sync.

How to import and run existing plugins from intellij community edition repo

I'm trying to import and run the IntelliJ git4idea (Git Integration) plugin in order to play around and contribute some of my own code.
I've pulled the Intellij community edition from the github repo, and imported the git4idea plugin as a project. I'm running the Intellij community edition
My main issue is this:
After importing all the modules, the git4idea module comes up as a general module type, and not a plugin module type.
This means that when trying to create a new run\debug configuration, I get [none] under "Use classpath of module", instead of of the ability to select the git4idea plugin. This obviously results in a "Run configuration error: no plugin module specified for configuration".
So the question is -
How can I change the general type of imported "git4idea" to plugin type?
Or better yet, what are the steps required in order to import and build/debug/run a plugin from the Intellij community edition repo?
I was able to solve this by manually reordering file directories, sorting out dependencies and editing the .iml file. The type of plugin is defined by changing type="JAVA_MODULE" to type="PLUGIN_MODULE".
...
This is the answer given by Dmitry Jemerov on the official Jetbrains plugin development forum:
The easiest answer to this is "don't". The IntelliJ IDEA Community
Edition project is set up to be developed as a whole, and the
dependencies are set up accordingly. If you want to hack on the Git
plugin, you simply run IDEA using the provided run configuration, it
runs with all plugins enabled, and you simply make whatever changes
you need and test them using the main run configuration.
If you really want, you can set up a new plugin module and point it to
the source code of the git4idea plugin inside the IntelliJ IDEA
Community Edition Git checkout. This is not too hard, but it's
something you'll need to do from scratch, and you can't use the
existing .iml file.
I had the same no plugin module specified for configuration issue. To work around it, instead of importing, I created a new plugin project and used the existing code directory.
when you import the intelij plugin projects
You should run the 'runIde' task in gradle.
Step-by-step instruction
Build your IDEA plugin (usually done with gradle build).
Start Intellij IDEA.
If you have any project opened, go to menu "File->Close all projects" to return to Intellij IDEA startup screen.
Install the plugin you've just built: on the left side of the "Welcome to Intellij IDEA" startup screen go to "Plugins", then click "gear" icon on the right side, it's located to the right of "Marketplace" and "Installed". From the pop-up menu select "Install Plugin from Disk...", navigate to plugin file (usually in build folder) and click "Ignore and continue" when you see the warning message saying something about signature.
Restart Intellij IDEA.
Open the folder with your IDEA plugin.
Wait until IDEA imported your Gradle project.
Put breakpoints inside your plugin code so you can debug it.
Go to menu "Run->Edit configurations".
In the "Run/Debug Configurations" window on the left side click "+".
Select "Gradle" from the pop-up menu.
On the right side change "Name" to "gradle-run-ide" (without quotes).
On the right side under "Run", inside "Tasks and arguments" field enter runIde ("i" must be capital, other letters small).
Click "OK" to save changes.
Go to menu "Run->Debug 'gradle-run-ide'".
A new, black-colored IDEA window should appear.
In this black-colored IDEA window do whatever you need to do in order to invoke methods of your plugin. When you invoke them, the first IDEA window should stop you on breakpoints you set previously.
Happy debugging.
After changing type="JAVA_MODULE" to type="PLUGIN_MODULE" in *.iml file I was getting following error -
Error running 'IdeaPlugin': Wrong SDK type for plugin module
To fix this go to -
Module Settings -> Platform settings -> SDKs.
Click on Add new SDK
Select Intellij Platform plugin SDK
For home directory select your Inetllij installation dir
Select JAVA SDK you want to use with it.
Once this is added got to Module Settings again
Module Settings -> Project settings -> project.
In Project SDK change the JAVA sdk to the SDK we just added in the above steps.
Run/Debug you plugin now.

How to assign a keyboard shortcut to a run configuration in IntelliJ?

It seems you can assign a keyboard shortcut to almost everything else, but I can't see an option to do this for run/debug configurations?
The "run configurations" are listed in the drop-down on the IntelliJ toolbar. I'd like to setup a run configuration that can perform two maven tasks sequentially (jetty:stop and then jetty:run if you are interested), and assign a keyboard shortcut to this action.
Any ideas?
Finally! JetBrains has implemented this feature in IntelliJ IDEA v9.
in Idea 8 anyway, you can specify a shortcut to any file menu item- even Maven goals. Try settings- Keymap and look for the Maven goals. You will still probably need two keys. One for each action.