Save Actions plug-in for JetBrains PhpStorm - intellij-idea

There is a plug-in called "Save Actions" available for IntelliJ IDEA. Now I want to know if there is a plugin with the same functionality for PhpStorm? I want to add the this, final and PHPDoc declarations at the save Action.

There is an open request to make Save Actions plug-in available for all IntelliJ platform based IDEs.
Developer has shared an experimental version that should work with PhpStorm:
save-actions.zip
You can install it manually from zip.

Related

Can I use the Telosys wizard without installing Eclipse?

I am trying to learn telosys. The eclipse demo seems great.
However, I tried to install the plugin for VSCode, and it did not add any option/menu item anywhere in the VSCode editor.
The eclipse demo shows a great wizard based interface. Is there any way to get that interface without having to install eclipse.
Also, in case it is not possible, which package of eclipse do I need to install to optimally use telosys? I wanted to try out the python & angular bundles of telosys.
Yes indeed, the Telosys VS Code plugin provides only syntax coloration for Telosys files edition (".entity" files for example). Thus there's no particular changes in the VSCode menu.
VSCode is just one code editor (among others) that you can use with Telosys-CLI. The editors extensions are just provided to be more confortable when you're editing Telosys files. All the code generation is supposed to be launch from the command line in Telosys-CLI.
If you want a fully integrated tool, Eclipse + Telosys plugin is the best solution. Telosys Eclipse plugin is installable with all Eclipse versions, so you can choose one of these Eclipse packages :
https://www.eclipse.org/downloads/packages/
for example "Eclipse IDE for Java Developers" and use "Eclipse Marketplace" to install :
Telosys plugin
https://marketplace.eclipse.org/content/telosys-code-generator-java-javascript-python-nodejs-php-c-javaee-spring-jax-rs-vuejs
Python plugin
https://marketplace.eclipse.org/content/pydev-python-ide-eclipse

Eclipse Editor monitor file changes from out of Eclipse

I am developing a Plugin for eclipse, and notice that when user changes file from out of IDE, e.g., do a git pull using shell, my editor does not pick up the change. I try to use IResourceChangeListener but realize it only monitors changes happening in the workspace.
I have seen eclipse TextEditor can monitor external file change, but failed to find how it implements this from code. My editor is not a text editor so I cannot extend from TextEditor to get this for free.
Can anyone give me a hint how to properly implement this feature for eclipse? Thanks!
According to Eclipse FAQ you need to monitor non Eclipse file changes in separate thread.
Fortunately Java have file change notification API which can be used to implement this.

JetBrains: How to disable "These files do not belong to the project" dialog completely?

I want to use JetBrains IntelliJ IDEA for editing files that are external to my project. How do I permanently disable this Non-Project Files Access dialog? Is there a relevant registry setting?
There's a plugin for doing this, I also like the fact you can use Intellij as an editor with that plugin.
Non Project Files Unlocker. I'm using it with Intellij 15 and it's working fine.
But your version looks like older, I don't think, they they have some configuration for that. There's a feature request for this at https://youtrack.jetbrains.com/issue/IDEA-125379

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.