dubreuia / intellij-plugin-save-actions

Supports configurable, Eclipse like, save actions, including "organize imports", "reformat code" and "rearrange code".
MIT License
529 stars 102 forks source link

Add support to all intellij products #18

Closed jclx closed 4 years ago

jclx commented 9 years ago

If you add

com.intellij.modules.lang

to the plugin.xml it will on all intellij products like webstorm.

Great plugin btw.

dubreuia commented 9 years ago

Thanks, I'll add that, but I'll need to test it in all intellij products.

dubreuia commented 8 years ago

From twitter: "Hi there, I just installed Save Actions on phpstorm 9.0.2 but cannot find the settings as described in the documentation."

dubreuia commented 8 years ago

Lots of demand for this:

XXChester commented 8 years ago

Guess the php webstorm support never made it in? Was really excited when I found this plugin and it installed fine, just cannot find the settings anywhere.

dubreuia commented 8 years ago

Hey @XXChester I'm working on bringing the plugin to all products right now, PhpStorm will soon be supported. I closed specific issues because they are duplicate with this one (I'll release it for all products at the same time).

XXChester commented 8 years ago

👍 Awesome. I thought it was abandoned date, glad to hear it is not.

sgeier commented 8 years ago

Glad to hear you are working on making it work on a variety of platforms. Is it possible to release a port as soon as its finished instead of waiting for release until all other platforms are done? This would help so much. I personally feel that my quality of codes degrades without SaveActions. I really want this on Android Studio.

dubreuia commented 8 years ago

Is Android Studio a JetBrains product? I'm testing for:

dubreuia commented 8 years ago

The branch all-products works, I just haven't properly tested it yet

sgeier commented 8 years ago

Dubreuia, Android Studio is based on Intellij IDEA. So practically the IDEA extension/plugins should work but it doesn't - in fact, and this is where the troubles com in, it cant even be downloaded as a plugin from the Plugin repository browser inside Android Studio. Its just not listed. I just verified this. Appears in Idea (version 15) but doesnt in Android Studio (lastest) 2.1.1. As its entirely based on Idea I would assume its not too much effort to enable it for Android Studio. Anyway I keep waiting :) Keep up the good work!

krasa commented 8 years ago

You need to put <depends>com.intellij.modules.platform</depends> into plugin.xml . edit: nevermind, you already did in that branch :)

dubreuia commented 8 years ago

@krasa Thanks already done! The problem is that I have Java specific elements, so I need to split the plugin in two parts so it doesn't crash on startup with PyCharm, etc.

@sgeier OK it is not a JetBrains product but it should work too, note to self : https://developer.android.com/studio/index.html

I should release the all-product version this weekend if all goes well

rmgrimm commented 8 years ago

@dubreuia Any update on the release of the all-product branch? We'd like to start using it across the dev team here as soon as it's ready

I'm happy to support in any testing as well, let me know. 👍

dubreuia commented 8 years ago

Actually it's already ready, but I don't have time to test it so I didn't release it. I'll send you the jar so you can test if you want.

dubreuia commented 8 years ago

save-actions.zip

Unzip, inside you have a .jar that you can import by hand in Intellij (Settings > Plugins > Import from jar). It is version 0.12-RC, it is based on 0.10 (not the latest available, you have probably on 0.11 right now).

Tuupertunut commented 8 years ago

@dubreuia I can confirm that zipped version works on WebStorm 2016.2.3.

manojvignesh commented 7 years ago

The zip file works fine in WebStorm 2016.2.4. Thanks for this awesome plugin.

dubreuia commented 7 years ago

Thanks for your feedback, I'll make that available on the Jetbrains plugin repository.

thiagotalma commented 7 years ago

Ok with PHPStorm!

F21 commented 7 years ago

Doesn't work with Gogland 1.0 EAP (163.10615.6) for golang using 0.12. Would be awesome if it could be supported 😄

spencero91 commented 7 years ago

Any way we could get this added to the Jetbrains' plugin repository for PhpStorm?

dubreuia commented 7 years ago

Hey @spencero91, try the save-actions zip I uploaded in this issue, you can import it directly in PhpStorm.

I don't want to upload it to the plugin repository just now, I haven't tested it in all products, and I don't have time to correct all the issues that are opened only for intellij...

The code is on branch master-all-product.

Keep me posted if that works for you

dubreuia commented 7 years ago

Check #69 for licences to test in all products

bentemple commented 7 years ago

For AS 2.3 I was able to download the latest version from https://plugins.jetbrains.com/plugin/7642-save-actions and then just install from within android studio:

Android Studio (Menu) -> Preferences -> Plugins -> Install plugin from disk...

Works just fine for me. The settings for it can be found under Other Settings

dubreuia commented 7 years ago

Yeah it works as-is for Android Studio because it is a Java IDE. The other products will need the zip that is packaged in this issue.

matthewadams commented 7 years ago

Just tested in WebStorm 2017.1. Appears to work. Suggestions:

Great plugin, especially for large teams! 👍

dubreuia commented 7 years ago

Hey @matthewadams thanks for the testing and the tweet I appreciate it.

Include an option to reformat when the editor autosaves. The behavior I'm currently seeing is that reformatting is only taking place if I hit Ctrl-S/Cmd-S.

Actually, that should work. The autosave in Intellij is somewhat finicky, the easiest way to force it is by losing focus. Try (1) change a formatting or add unused import (2) click on another non-intellij window. It should reformat. That's the whole point of the plugin: not to think about it.

Place language-specific configuration options in language-specific sections. For example, "Organize Imports", "Rearrange fields ..." and "Compile File" only make sense for compiled languages (Java, TypeScript, etc), but they don't make any sense for JavaScript files.

There is already a classification, the version you are using doesn't have the Java quick fixes. The one I left are, for me, available for all languages. It is based on the langage-based processors in the Intellij platform.

It is also very hard to classify language like this, for instance vanilla ES6 have imports but not the previous versions...

matthewadams commented 7 years ago

Yes, it worked when WebStorm lost focus. Maybe you should open an issue with JetBrains to get more consistent notification of autosave so that the behavior is consistent, but that's up to you. Is there a more standard place from which to download the plugin than this issue now that it's been confirmed to work on other JetBrains products? Thanks again!

afwlehmann commented 7 years ago

Any chance getting a recent version of the plugin with the patch? I'm looking for support in pycharm and CLion. Sorry if I've overlooked something, but IMO the link provided above refers to a patched v11 of the plugin.

dubreuia commented 7 years ago

Hey @afwlehmann I'll try to repackage it with a recent version of the plugin. Honestly, not much changed for non-Java languages in recent versions.

I won't release it on the official plugin repository, I don't have time to maintain the plugin for Intellij IDEA, if I support all product I'll have thousand of new users I don't have time to support

afwlehmann commented 7 years ago

@dubreuia Thanks a lot!

dubreuia commented 7 years ago

@afwlehmann I repackaged the plugin for all products on version 0.17. This time I merged the code to master, but didn't activate the plugin for all product (the line is commented in the plugin.xml file). It is not in the plugin repository yet but I might add it soon.

I tested in PyCharm and it seems to work. Keep me posted if it works for you.

save-actions_0.17.jar.zip

edit: you need to unzip the jar, then import in pycharm or other

dubreuia commented 7 years ago

Currently tested:

afwlehmann commented 7 years ago

@dubreuia That's very much appreciated! I'll give it a try as soon as possible and let you know. Thanks :)

afwlehmann commented 7 years ago

Works like a charm, thank you very much for your time and effort! (Tested on PyCharm / Linux, I'll give it another try on CLion in a couple of days)

dubreuia commented 7 years ago

Thanks @afwlehmann I'll slowly add supported products then. I'll add PyCharm for now

celogeek commented 7 years ago

I can confirm it work as expected on the latest PyCharm on MacOS

dubreuia commented 7 years ago

New version 0.18 should work in PyCharm and PhpStorm

dubreuia commented 7 years ago
dubreuia commented 7 years ago

Version 0.21 (https://github.com/dubreuia/intellij-plugin-save-actions/releases/tag/v0.21) adds official support to AndroidStudio. I'd like to do WebStorm after


If you are using that plugin, could you rate it on https://plugins.jetbrains.com/plugin/7642-save-actions

markiewb commented 7 years ago

@dubreuia: 0.21 works in

WebStorm 2017.2.3 Build #WS-172.3968.27, built on August 29, 2017 JRE: 1.8.0_152-release-915-b11 x86_64 JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o Mac OS X 10.12.6

Except #110

dubreuia commented 7 years ago

OK I'll correct #110 and add support for WebStorm when I have time

studgeek commented 7 years ago

Is there a hurdle to just adding CLion also?

dubreuia commented 7 years ago

Hey @studgeek I've given up on testing the plugin on all Jetbrain's products, I let users do that and report it here.

You can install the plugin in CLion by downloading the latest version from https://github.com/dubreuia/intellij-plugin-save-actions/releases and then doing "File > Settings > Plugins > Install plugin from disk" and choosing the jar you downloaded.

dubreuia commented 7 years ago

Added WebStorm in https://github.com/dubreuia/intellij-plugin-save-actions/releases/tag/v0.23

d4rky-pl commented 6 years ago

Just tested and it seems to work fine in RubyMine :) (too bad it's not the plugin I was looking for 😂)

dubreuia commented 6 years ago

Hey @d4rky-pl, thank you for telling us! I hope you'll find what you are looking for :)

I'll add RubyMine support when I release next version

dubreuia commented 6 years ago

Added RubyMine in https://github.com/dubreuia/intellij-plugin-save-actions/releases/tag/v0.25

dubreuia commented 6 years ago

It seems it works in CLion too (https://twitter.com/LlewellynFalco/status/957228926719463424). I'm adding support in next version https://github.com/dubreuia/intellij-plugin-save-actions/releases/tag/v0.26

pablogarciamiranda commented 6 years ago

It's not working for me on WebStorm 2017.2.5