Welcome Guest, Not a member yet? Register   Sign In
Aptana 3 and CodeIgniter 2 code completion
#6

[eluser]jmp909[/eluser]
[quote author="jesusOmar" date="1304110364"]I found is a bit different that with eclipse, I manage to get it working based on the instructions I found @ http://r15ch13.de/2011/03/autocomplete-i...igniter-2/
[/quote]

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
Code:
application
autocomplete
system
user_guide

then create a file called in autocomplete/ called controller.php with the code below (class CI_Controller etc) . then copy this file and call it 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 you still have to follow the rest of the instructions in that link jesusOmar mentions above, but my way it means you only need to maintain your autocomplete folder without worrying about overwriting autocompletion in your system files. And anytime a new Class is added to the system core you should be able to add it to your autocomplete files

(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)

Code:
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;
    
}

?>


Messages In This Thread
Aptana 3 and CodeIgniter 2 code completion - by El Forum - 04-28-2011, 10:20 AM
Aptana 3 and CodeIgniter 2 code completion - by El Forum - 04-29-2011, 09:52 AM
Aptana 3 and CodeIgniter 2 code completion - by El Forum - 05-02-2011, 10:57 AM
Aptana 3 and CodeIgniter 2 code completion - by El Forum - 05-02-2011, 02:02 PM
Aptana 3 and CodeIgniter 2 code completion - by El Forum - 06-02-2011, 06:45 AM
Aptana 3 and CodeIgniter 2 code completion - by El Forum - 07-20-2011, 05:57 PM
Aptana 3 and CodeIgniter 2 code completion - by El Forum - 07-20-2011, 06:35 PM
Aptana 3 and CodeIgniter 2 code completion - by El Forum - 01-20-2012, 03:59 AM
Aptana 3 and CodeIgniter 2 code completion - by El Forum - 03-14-2012, 03:58 AM
Aptana 3 and CodeIgniter 2 code completion - by El Forum - 03-14-2012, 07:06 AM
Aptana 3 and CodeIgniter 2 code completion - by El Forum - 03-14-2012, 10:10 AM
Aptana 3 and CodeIgniter 2 code completion - by El Forum - 03-14-2012, 10:47 AM
Aptana 3 and CodeIgniter 2 code completion - by El Forum - 03-14-2012, 10:57 AM
Aptana 3 and CodeIgniter 2 code completion - by El Forum - 03-14-2012, 12:02 PM
Aptana 3 and CodeIgniter 2 code completion - by El Forum - 03-15-2012, 11:04 AM
Aptana 3 and CodeIgniter 2 code completion - by El Forum - 08-28-2014, 11:44 PM



Theme © iAndrew 2016 - Forum software by © MyBB