Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatic plugin installation for IntelliJ #453

Closed
hohwille opened this issue Aug 27, 2020 · 5 comments · Fixed by #600
Closed

Automatic plugin installation for IntelliJ #453

hohwille opened this issue Aug 27, 2020 · 5 comments · Fixed by #600
Labels
enhancement New feature or request intellij IntelliJ IDE from Jet-Brains plugins related to plugins (for Eclipse, Intellij, VSCode, etc.)

Comments

@hohwille
Copy link
Member

As a devonfw-ide user, I want to use IntelliJ with some mandatory plugins automatically so that all developers in my team can make use of the features from that mandatory plugins to do their job.

@hohwille hohwille added enhancement New feature or request intellij IntelliJ IDE from Jet-Brains plugins related to plugins (for Eclipse, Intellij, VSCode, etc.) labels Aug 27, 2020
@hohwille
Copy link
Member Author

@tobka777
Copy link
Member

tobka777 commented Jul 7, 2021

To install a plugin for IntelliJ follow these steps:

  • Search for a plugin https://plugins.jetbrains.com/
  • Download Plugin (i.e. Scala https://plugins.jetbrains.com/plugin/1347-scala/versions)
    We can download via wget from a specific link (https://plugins.jetbrains.com/files/1347/125751/scala-intellij-bin-2021.2.11.zip) or get always the newest version by pluginid from this API (https://plugins.jetbrains.com/api/plugins/1347/updates - pluginid: 1347; 'https://plugins.jetbrains.com/files/' + json[0].file)
  • If is a zip file, unzip it. If it is a jar file, just copy in plugin directory
  • Plugin directory: (IdeaIC2020.2 - IntelliJ Version)
    Windows: C:\Users\<user>\AppData\Roaming\JetBrains\IdeaIC2020.2\plugins
    Linux: ~/.local/share/JetBrains/IdeaIC2020.2
    Mac: ~/Library/Application Support/JetBrains/IdeaIC2020.2/plugins
  • restart IntelliJ
    You simply need to place the plug-in into the config/plugins directory (See Directories used by the IDE to store settings, caches, plugins and logs for information on the location of this directory). If the plug-in is just a jar file, place in the directory directly. It is a zip file, unzip it into the directory. Then restart IDEA.

I tested this with Intellij IDEA 2020.2 with the scala plugin, and it's works.
Note: The compatibility of the plugins with the Intellij version must be taken into account. Note also that Community and Ultimate versions are different. The compatibility can also via API in json[0].compatibleVersions.

https://intellij-support.jetbrains.com/hc/en-us/community/posts/206178329-How-to-install-idea-plugins-from-the-command-line-
Download the newest version of plugin: https://stackoverflow.com/a/55243388
Directory: https://intellij-support.jetbrains.com/hc/en-us/articles/206544519

@hohwille
Copy link
Member Author

@tobka777 thanks for your analysis and feedback. 👍
Excellent so it is all doable and we can automate it.

Can we somehow reconfigure the plugins directory? It seems that IntelliJ by default uses some location in the users home directory that would be the same for all installations of devonfw-ide and IntelliJ within. However, a general concept in devonfw-ide is that we follow a sandbox principle whereever possible. For Eclipse and VSCode we have an isolated plugins/extension folder for each instance of devonfw-ide. For VSCode we simply enforce this by providing the folder-path as parameter on program start. I would assume we could do the same also for IntelliJ but have no clue currently about the commandline options of IntelliJ.

So similar to Eclipse Update-Site we would need the URL of the Plugin or the Plugin-ID as "configuration input".
Then we could do the same as we did for Eclipse and VS Code:

@tobka777
Copy link
Member

We can do it with setting up the config path in the idea.properties ([DEVON_IDE_HOME]/software/intellij/IntelliJ.app/Contents/bin/idea.properties):
idea.config.path=[DEVON_IDE_HOME]/software/intellij/config
This directory includes all configuration also a folder plugins which contains the plugins.
If we won't only to exclude the plugin directory we can set idea.plugins.path.
I tested it with a plugin.

I also found out that there is already a configuration ([DEVON_IDE_HOME]/settings/intellij/workspace/update/idea.properties) idea.plugins.path=${DEVON_IDE_HOME}/conf/.idea/plugins. But can it be that nothing is done with it at all, because this configuration is missing in read config ([DEVON_IDE_HOME]/software/intellij/IntelliJ.app/Contents/bin/idea.properties).

Source: https://intellij-support.jetbrains.com/hc/en-us/articles/207240985-Changing-IDE-default-directories-used-for-config-plugins-and-caches-storage

tobka777 added a commit to tobka777/ide that referenced this issue Sep 8, 2021
tobka777 added a commit to tobka777/ide that referenced this issue Sep 8, 2021
tobka777 added a commit to tobka777/ide that referenced this issue Sep 8, 2021
@hohwille hohwille added this to the release:2021.08.001 milestone Sep 13, 2021
tobka777 added a commit to tobka777/ide that referenced this issue Sep 16, 2021
tobka777 added a commit to tobka777/ide that referenced this issue Sep 16, 2021
tobka777 added a commit to tobka777/ide that referenced this issue Sep 16, 2021
hohwille pushed a commit that referenced this issue Sep 21, 2021
hohwille pushed a commit to devonfw/ide-settings that referenced this issue Sep 24, 2021
@hohwille hohwille changed the title Consider plugin installation for IntelliJ Automatic plugin installation for IntelliJ Dec 10, 2021
@paulwwisl
Copy link

Install plugin from command line
https://www.jetbrains.com/help/idea/managing-plugins.html#install_plugin_cmd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request intellij IntelliJ IDE from Jet-Brains plugins related to plugins (for Eclipse, Intellij, VSCode, etc.)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants