Posted by Chris Charlton on January 3, 2010 at 9:14am
Eclipse has a built-in feature that can save and run Drush commands for projects easily. It's just like running the shell command. The feature in Eclipse is known as the "External Tools" feature.
- Click the following menu: Run > External Tools > External Tools Configurations...
- Under "Program", click "New Launch Configuration"
- Name: Anything
- Location: point to the drush software (for example, /home/drupal/drush/drush)
- Arguments (Mac):
-i /home/drupal/drush/drush/includes -v -r /Users/you/Sites/DEVELOPMENT/DRUPAL/drupal.development cache clear
- Click "Apply", then "Run".
- Repeat the command by clicking the "External Tools" icon (pictured below). I setup a favorite for clearing a site cache, and getting status of a site.
For those comfortable with Eclipse, use variables like ${Drush} to keep a centralized token of where your Drush is stored so you don't need to type the full URL in each command. I also do this for my Sites folder, but didn't show that in the example.
Drupal plug-in for Eclipse IDE
For those into Eclipse and Drupal, I have an Eclipse plug-in for Drupal that is open for early public trial.
Comments
Arguments?
Can you provide a little help please getting my argument straight. Not exactly sure what is suppose to go here.
My Location and Working Directory are set at:
Location
/Volumes/ec2_9/var/www/pressflow/sites/all/modules/drush/drush
Working Directory
/Volumes/ec2_9/var/www/pressflow/sites/all/modules/drush
Much appreciated
A little simpler
cc all
(for current drush, or whatever in your version)Note that you have to click on your project in the navigator window before running this or it doesn't know what ${project_loc} is.
remark: an other way to do run drush command in eclipse
if you're not embarrassed to type shell commands (and as drush provides simple shortcuts) it is possible to use an eclipse plugin that provides an interface to run these commands. I use Wicked Sell (http://www.wickedshell.net/updatesite).
you can install it as any eclipse plugin, it works well.
In the 'Shell' view simply run the commands you want :
drush dl module1 module2 ..
drush en module1 ..
drush cc
..and so on
thank you for this great plugin, which also opens the door to many things..
Wicked Shell is awesome
Per your suggestion, I just downloaded it and am using it today.
Thank you.
Kyle
Kyle Schweighauser, Director of Information Technology
Extanto,LLC. | 349 North Polk Street | Eugene , OR 97402
Office 541.515.6232
http://www.extanto.com/
Yes!
This is awesome. I now have at least +2 to all my saving throws vs. efficiency!