Home » , » install jquery Plugin and php

install jquery Plugin and php

Written By Andara on Saturday, January 14, 2012 | 7:10 AM

Eclipse for PHP with aptana plugin works great for me. I had some trouble getting it to work, so I listed up all the steps to take.

  1. Install Eclipse for PHP: http://www.eclipse.org/downloads/packages/eclipse-php-developers/heliossr1
  2. Install Aptana 2 as Eclipse plugin: You do this by opening eclipse and going to Help -> Install new software and add this link: http://d3lq98emif3szr.cloudfront.net/tools/studio/plugin/install/studio/2.0.5.1278522500/ Then select Aptana Studio, next, next and restart Eclipse.
  3. Install JQuery support: do this by creating a temporary new default web project (File -> New -> Project -> Web (the first one) -> Default Web Project), Choose a name, Click Next, Click Install Javascript Libraries at the bottom of the window, Expand Javascript Libraries, select JQuery Support and click Install. Then Next, next and restart Eclipse
  4. Change the default Javascript editor to Aptana JS Editor: In eclipse, go to windows -> preferences -> general -> editors -> file associations, click *.js in the first list, then click Aptana JS Editor in the second one, and finaly click Default to make this your default Javascript Editor
  5. Enable JQuery in the Aptana JS Editor: In Eclipse, go to windows -> preferences -> aptana -> editors -> javascript -> code assist, check JQuery 1.3, and finally click OK.
Now, all of your js-files (no mather if they are in PHP-project or any other project) will have JQuery auto-complete and documentation popups. If you would like to enable JQuery support for other file types (like *.html, *.tpl,...) do again as described in step 4, but instead of *.js, just select (or add) the desired filetype, and then make Aptana JS Editor the default. The only problem I have found is that, if you enable Aptana JS Editor for *.php, the php-editor doesn't work very good. You can work around this by either putting all your javascript in a JS-file (which is actually good practice), or you can enable the Aptana JS Editor for php everytime you want to edit some inline javascript, and just change it back to the default Javascript editor when you are done.
Share this article :

Post a Comment

 

Copyright © 2011. andara - All Rights Reserved

Proudly powered by Blogger