Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Advice for setting up Aptana for CodeIgniter?

I've used Aptana for a good number of web projects and like it a lot. I've also used CodeIgniter for a couple projects and liked it, as well. Now I'm hoping to combine the two in a happy marriage of cross-platform productivity. Any advice on setting up Aptana's more useful features? I'm hoping to get any of the following:

  • Code completion
  • Functional built-in previewing
  • Debugging

If completely infeasible, what IDE would you suggest? Generic Aptana PHP setup tips would also be welcome, as they might guide me toward the ideal setup.

like image 735
Mahmoud Hashemi Avatar asked Nov 05 '22 19:11

Mahmoud Hashemi


2 Answers

I would install Aptana as an Eclipse plug-in. Allows you to latter down the road install GWT or Flex with no fuss. Plus, Aptana as a plug-in has worked much better for me. Both in terms of stability and of usability.

I used to have Aptana crash on me every two days and since I'm running Eclipse with Aptana as a plug-in it never again crashed.

Eclipse with Aptana as a plug-in also has some handy features, like spell-checking, that Aptana did not have and has greatly improved my comments. That said, I must agree with you on the great level of detail and attention Aptana team has put in their software.

like image 69
Frankie Avatar answered Nov 11 '22 04:11

Frankie


i have found the solution for this in codeigniter forum.

http://codeigniter.com/forums/viewthread/187641/

I came up with a slightly “safer” solution. rather than modifying the system files, create a folder called “autocomplete” (or whatever name you want)

ie

application
autocomplete
system
user_guide

then create a file (in autocomplete) called controller.php with the code below (class CI_Controller etc) . then copy this file and with the name model.php and change the class in that file to CI_Model. Aptana then uses these to remap it’s autocompletion. Just add any more functions you want autocompletion for for each file. (for instance i added CI_Cart which wasn’t in the original example in that link

(Note currently this only gives autocomplete for Models and Controllers. I guess if you’re extending other Classes and need autocompletion in those you’ll need to make a new file in the autocomplete folder with a list of all the classes that you want that class to see)

class CI_Controller {

/**
  * @var CI_Config
  */
 var $config;
 /**
  * @var CI_DB_active_record
  */
 var $db;
 /**
  * @var CI_Email
  */
 var $email;
 /**
  * @var CI_Form_validation
  */
 var $form_validation;
 /**
  * @var CI_Input
  */
 var $input;
 /**
  * @var CI_Loader
  */
 var $load;
 /**
  * @var CI_Router
  */
 var $router;
 /**
  * @var CI_Session
  */
 var $session;
 /**
  * @var CI_Table
  */
 var $table;
 /**
  * @var CI_Unit_test
  */
 var $unit;
 /**
  * @var CI_URI
  */
 var $uri;
 /**
  * @var CI_Pagination
  */
 var $pagination; 

/**
 * @var CI_Cart
 */
var $cart;

}

?> 
like image 45
R T Avatar answered Nov 11 '22 02:11

R T