Run Drush commands in Eclipse IDE

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
Chris Charlton's picture

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.

Only local images are allowed.

  1. Click the following menu: Run > External Tools > External Tools Configurations...
  2. Under "Program", click "New Launch Configuration"
  3. Name: Anything
  4. Location: point to the drush software (for example, /home/drupal/drush/drush)
  5. Arguments (Mac): -i /home/drupal/drush/drush/includes -v -r /Users/you/Sites/DEVELOPMENT/DRUPAL/drupal.development cache clear
  6. Click "Apply", then "Run".
  7. 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.

Only local images are allowed.

Only local images are allowed.

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?

R-H's picture

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

rfay's picture
  • In the main tab, set location to the full path of the drush script
  • The working directory should be ${project_loc}
  • arguments = cc all (for current drush, or whatever in your version)
  • On the environment tab set TERM to vt100. That will get rid of the tput error.

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.

bezedhash's picture

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

aWileyMcGee's picture

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!

Mixologic's picture

This is awesome. I now have at least +2 to all my saving throws vs. efficiency!

drush

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week