Part of the EllisLab Network
   
1 of 3
1
CI plugin for eclipse
Posted: 17 January 2008 02:04 AM   [ Ignore ]  
Summer Student
Total Posts:  14
Joined  11-16-2007

Hi,

Is there CI plugin for eclipse?

Profile
 
 
Posted: 17 January 2008 02:19 AM   [ Ignore ]   [ # 1 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  853
Joined  11-23-2003

What would it do that the PHP plugin does not already do?  I suppose it could have snippets or something for the library but the library is already simple enough that if you work in CodeIgniter for long you will memorize almost all of it.

Profile
 
 
Posted: 22 February 2008 09:16 AM   [ Ignore ]   [ # 2 ]  
Summer Student
Total Posts:  3
Joined  11-05-2007

What I miss in PHP plugin when working with CI is autocomplete.
Is there any way to make it autocomplete loaded libraries methods or vars?

Profile
 
 
Posted: 09 March 2008 07:18 AM   [ Ignore ]   [ # 3 ]  
Grad Student
Avatar
Rank
Total Posts:  70
Joined  09-05-2007

Hi FarCoder, I am using Eclipse PDT and I have the code completion using the following workspace setup:

a) when I setup a CI project I put the Application and System folder at the same directory level.

instead of the default

APP_DIR --+-- system ------+--- application
          
!                +--- cache   
          
!                +--- codeigniter
          
!                +--- ...and so on
          
!
          +-- 
user_guide   
          
+-- .htaccess
          
+-- index.php 

I use this structure

APP_DIR --+-- application -+--- config
          
!                +--- controller
          
!                +--- ...and so on
          
!
          +-- 
system ------+--- cache                           
          
!                +--- codeigniter
          
!                +--- ...and so on
          
!
          +-- 
user_guide   
          
+-- .htaccess
          
+-- index.php 

You can read this in the user guide’s setup page smile

b) once in Eclipse I create TWO projects: the first one pointing to the system folder I called it CI_CORE.

The second one is the project of my application and it points to the application folder.

In the PROPERTIES of the second project (application) I add a reference (in the INCLUDE PATH tab) to the first project (CI_CORE).

c) after that I have autocompletion!!! smile

In my workspace I use just one CI_CORE project as a reference and then I can have as many projects (installations) I want pointing to that core project.

Please have a look at the screenshots.

I hope I was clear enough cheers!

Stefano

Image Attachments
include_path.png
Click thumbnail to see full-size image
 Signature 

Visit my CodeIgnited webpage @ http://www.stefanogiordano.it

Profile
 
 
Posted: 09 March 2008 07:19 AM   [ Ignore ]   [ # 4 ]  
Grad Student
Avatar
Rank
Total Posts:  70
Joined  09-05-2007

...second screenshot…

Image Attachments
autocomplete.png
Click thumbnail to see full-size image
 Signature 

Visit my CodeIgnited webpage @ http://www.stefanogiordano.it

Profile
 
 
Posted: 18 July 2008 01:14 PM   [ Ignore ]   [ # 5 ]  
Summer Student
Total Posts:  4
Joined  07-18-2008

I already setup my eclipse for code completion as yours but i cant get code completion.The method seems to be just like how to get code completion on CakePHP.The way I did is I move application folder from system folder as you said to be the same level as system folder.I also setup eclipse 2 php project and link application folder with the system folder.Is there any config needed to be done?

Profile
 
 
Posted: 18 July 2008 01:48 PM   [ Ignore ]   [ # 6 ]  
Grad Student
Avatar
Rank
Total Posts:  70
Joined  10-26-2007

It’s a good solution, but it would be better if we could link it to our application classes, as models for controllers or controllers for views… That would be great…

But a good solution Stefano G.

 Signature 

CodeIgniter Portugal { ci_pt }

http://www.coisasdaweb.pt

Profile
 
 
Posted: 18 July 2008 02:43 PM   [ Ignore ]   [ # 7 ]  
Grad Student
Avatar
Rank
Total Posts:  70
Joined  09-05-2007

@xUmaRix: I am sorry to ask such a silly question but are you using Eclipse PDT? If so and you followed my instructions, then everthing should work! I just reviewed my PDT configuration and the steps I reported in my post are right.

Anyway let me know if I can help smile

cheers!

 Signature 

Visit my CodeIgnited webpage @ http://www.stefanogiordano.it

Profile
 
 
Posted: 19 July 2008 06:22 PM   [ Ignore ]   [ # 8 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  496
Joined  07-16-2008

@Stefano G: Ya, I have the same setup.

I am using Eclipse and as soon as I link to a system file like “system” the PDT “builds” the auto-complete function/class list. Eclipse is just awesome.

 Signature 

My Blog, C2D, PHP Videos, CXTags, Super .htaccess, Extra hooks, and MicroMVC

Profile
 
 
Posted: 28 July 2008 09:24 AM   [ Ignore ]   [ # 9 ]  
Grad Student
Avatar
Rank
Total Posts:  70
Joined  09-05-2007

...just a quick reply to let you know that I am currently trying APTANA STUDIO (the free Eclipse plugin flavour) ...it looks very good and it has a lots of visual improvements (like an html toolbar for formatting the text in bold, italic and so on).

It really worths a try!

Stefano

Image Attachments
aptana.png
Click thumbnail to see full-size image
 Signature 

Visit my CodeIgnited webpage @ http://www.stefanogiordano.it

Profile
 
 
Posted: 05 August 2008 10:03 AM   [ Ignore ]   [ # 10 ]  
Grad Student
Avatar
Rank
Total Posts:  74
Joined  02-26-2008

@Stefano G: Thanks much for the tip!

I also am using Aptana and have found it more stable than Eclipse PDT, however, it has little annoyances like poorer PHP auto-complete (although it does have great html and css auto-complete, whereas PDT is lacking that), code folding doesn’t work as well, and there are probably other things.

Any tips on Aptana? :D

 Signature 

[ Cron bootstrapper ] [ Modularity ] [ Sitemaps ] [ Query Browser ] [ Paging Simplified ] [ jonathonhill.net ]

Profile
 
 
Posted: 05 August 2008 01:44 PM   [ Ignore ]   [ # 11 ]  
Grad Student
Avatar
Rank
Total Posts:  70
Joined  09-05-2007
Jonathon Hill - 05 August 2008 02:03 PM

Any tips on Aptana? :D

well, after a week or so of fiddling around in Aptana I took the decision to disable the PHP feature because, as you correctly reported, the support was way behind PDT!

So I decided to keep the javascript/ajax/css/html capabilities but I stick to PDT for PHP (this could be a nice slogan! :D).

I like the FTP integration as well (even if I found a bug and opened a ticket wink ) but let’s say that Aptana is a nice addiction to PDT.

 Signature 

Visit my CodeIgnited webpage @ http://www.stefanogiordano.it

Profile
 
 
Posted: 15 August 2008 08:12 PM   [ Ignore ]   [ # 12 ]  
Summer Student
Total Posts:  4
Joined  08-04-2008

In my case the code completion mainly works, but i suspect that the lack of useful completion hints is due to the architecture of the loading mechanism CI uses. for example:

class Album extends Controller {
    
function Album()
    
{
        parent
::Controller();
        
$this->load->model('album_model''AlbumModel'TRUE);
        
$this->AlbumModel->GetSomeRecords(); //<- this doesn't autocomplete and AFAIK there is no IDE that handles this situation. 
    

Please correct me if I’m wrong! When using this load mechanism there is no way of getting the code completion to work.

Just to be curious: Why was this approach taken instead of for example this “more common way” of doing things:

class Album extends Controller {
    
    
protected $AlbumModel;

    function 
Album()
    
{
        parent
::Controller();
        
$this->AlbumModel = new model('album_model'TRUE);
        
$this->AlbumModel->GetSomeRecords(); //<- doing things this way will trigger codecompletion...
    

Anyone any ideas/comments?

Profile
 
 
Posted: 15 August 2008 09:18 PM   [ Ignore ]   [ # 13 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  496
Joined  07-16-2008
gvdvenis - 16 August 2008 12:12 AM

Just to be curious: Why was this approach taken instead of for example this “more common way” of doing things:

Well, I am not an expert - but I think it is because the models that are to be loaded can be any type of class, any name, and multiple in nature. The Obejct you had only showed one model and that had a set name.

 Signature 

My Blog, C2D, PHP Videos, CXTags, Super .htaccess, Extra hooks, and MicroMVC

Profile
 
 
Posted: 16 August 2008 05:50 AM   [ Ignore ]   [ # 14 ]  
Summer Student
Total Posts:  4
Joined  08-04-2008

I’m very sorry, but i’m not sure what you mean. Can you please post an example of what you’re trying to say? (I’m not an expert either wink)

Profile
 
 
Posted: 16 August 2008 08:27 AM   [ Ignore ]   [ # 15 ]  
Grad Student
Avatar
Rank
Total Posts:  70
Joined  09-05-2007
gvdvenis - 16 August 2008 12:12 AM

In my case the code completion mainly works, but i suspect that the lack of useful completion hints is due to the architecture of the loading mechanism CI uses. for example:

...

Please correct me if I’m wrong! When using this load mechanism there is no way of getting the code completion to work.

Anyone any ideas/comments?

Correct unfortunately, this doesn’t autocomplete and I don’t think there would be a way of doing it ...  rolleyes

 Signature 

Visit my CodeIgnited webpage @ http://www.stefanogiordano.it

Profile
 
 
   
1 of 3
1