Making Eclipse for PHP Useful

Out of the box, Eclipse for PHP is lack­ing a few vital features.

Prob­lem: How do I run SQL queries in Eclipse?

Solu­tion: The SQL Explorer plugin.

To install:

  • Go to Help->Install New Soft­ware.
  • Add a new site called SQL Explorer with the URL http://eclipsesql.sourceforge.net/
  • Select SQL Explorer.
  • Keep­ing click­ing Next/Finish until the plu­gin is installed.

Prob­lem: Okay, I can run some queries now, but not against Microsoft SQL Server!

Solu­tion: Use the jTDS JDBC dri­ver. (Note: In my expe­ri­ence, this dri­ver is much faster and more reli­able than the dri­ver you can get from Microsoft.)

To use:

  • Down­load the lat­est driver
  • Unzip the down­load and put the jtds-1.2.5.jar file some­where safe.
  • In Eclipse, go to Window->Preferences.
  • In the Pref­er­ences win­dow, go to SQL Explorer->JDBC Dri­vers. Select Microsoft MSSQL Server JDBC Dri­ver.
  • Go to the Extra Class Path tab. Click Add JARs and select the jtds-1.2.5.jar you down­loaded earlier.
  • Click List Dri­vers and ensure that net.sourceforge.jtds.jdbc.Driver is in the Dri­ver Class Name box.
  • Your exam­ple URL should look like jdbc:jtds:sqlserver://<server_name>:<1433>

Prob­lem: What about edit­ing files on a remote server? The built in Remote Sys­tem Explorer doesn’t seem to work…

Solu­tion: Use CDT and Tar­get Man­age­ment (this includes a work­ing ver­sion of Remote Sys­tem Explorer).

To install CDT:

  • Go to Help->Install New Soft­ware.
  • Add a new site called CDT with the URL http://download.eclipse.org/tools/cdt/releases/galileo
  • Select Eclipse C/C++ Devel­op­ment Tools.
  • Keep­ing click­ing Next/Finish until the plu­gin is installed.

To install Tar­get Man­age­ment (requires CDT):

  • Go to Help->Install New Soft­ware.
  • Add a new site called Tar­get Man­age­ment with the URL http://download.eclipse.org/dsdp/tm/updates/3.1/
  • Select TM and RSE 3.1.1.
  • Keep­ing click­ing Next/Finish until the plu­gin is installed.

To con­nect to a Linux box over SSH:

  • Open the Remote Sys­tem Explorer perspective.
  • Cre­ate a new con­nec­tion, and select SSH Only as the sys­tem type.
  • Fol­low the wizard.
This entry was posted in Web Dev. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>