AppFog command line tool support for Jetbrains IDEs
If you use AppFog and develop using IntelliJ IDEA, PhpStorm, RubyMine, PyCharm or WebStorm, this command line tool configuration file can make your job a bit easier.
The next version of IntelliJ IDEA (v12) will have integrated support for CloudFoundry and I guess that means AppFog too, however the current version 11 has no such feature. Fortunately all Jetbrains IDEs have support for command line tools, so I don’t have to switch to a terminal or command prompt to run “af” commands - this works out of the box. Since I can’t remember all command line options and their syntax, I made a configuration file to enable auto-complete of “af” commands in the Jetbrains IDE command line. If you want to use this, here’s how to install it:
I assume you already have AppFog’s command line tool installed; if not, follow these simple instructions.
Make sure the “Command Line Tool Support” plugin is enabled in your IDE:
Go to “Command Line Tools Support” in the “Project Settings” area of your IDE settings; click the + icon to add a new framework and choose “Custom Framework” from the dropdown that appears. Enter a name for the framework (e. g. “AppFog”) and af for both of the “Tool path” and “Alias” fields. (If af is not in your path, you could also enter the full path into the “Tool path” field.) Finally, click “OK” in the dialog and “Apply” at the bottom of the Settings dialog:
With the “af” line selected, click the “Edit” icon at the right of the Settings dialog, then close the Settings dialog:
The IDE has opened an editor window with an XML file describing the new “custom framework”. Replace all contents of this file with the following XML, then save and close the file:
Click “Tools” > “Run Command…” to open the command line pane:
Type af and press Space to get a list of AppFog commands. The list narrows down as you continue typing, or you can choose the desired command from the list using the mouse or arrow and Enter keys: