Part of the EllisLab Network
   
1 of 3
1
codeignitier and eclipse
Posted: 03 June 2008 01:14 PM   [ Ignore ]  
Grad Student
Rank
Total Posts:  82
Joined  05-31-2008

I search in forum but i did not find any solution. Is it possible to integreted CI in eclipse that eclipse will recognize CI syntax. Example: $this->load->...

 Signature 

http://www.MIMAteam.com

Profile
 
 
Posted: 03 June 2008 01:41 PM   [ Ignore ]   [ # 1 ]  
Summer Student
Total Posts:  6
Joined  06-03-2008

Code Igniter syntax is PHP if I’m not mistaken… (disclaimer I’m new to CI) ... so if you have PDT installed in Eclipse you should be good to go… that’s what I’m doing.

[><]

Profile
 
 
Posted: 03 June 2008 02:04 PM   [ Ignore ]   [ # 2 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  286
Joined  02-13-2008

It’s possible but requires a lot of work to add phpdoc everywhere…

Profile
 
 
Posted: 03 June 2008 02:22 PM   [ Ignore ]   [ # 3 ]  
Summer Student
Total Posts:  6
Joined  06-03-2008

Not sure if I understand exactly what you mean… Probably my own ingorance due to only using PDT up till now ( and that was only for consistancy between my Win and Lin workstations.

Profile
 
 
Posted: 03 June 2008 02:27 PM   [ Ignore ]   [ # 4 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  286
Joined  02-13-2008

I mean special comments like this:

/**
 * @var CI_Controller
 */
 
var $controller 
Profile
 
 
Posted: 03 June 2008 02:37 PM   [ Ignore ]   [ # 5 ]  
Summer Student
Total Posts:  6
Joined  06-03-2008

Is that more difficult in eclipse than other IDE’s?  Is there something that automates this more than eclipse?  I mean more than the auto complete feature of PDT ... I can’t remember if I have a phpdoc plugin installed but it autocompletes my docblocs.

not meaning to argue or anything ... I’m all for simplification you know what I mean!

Profile
 
 
Posted: 03 June 2008 03:10 PM   [ Ignore ]   [ # 6 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  286
Joined  02-13-2008

It’s the same for all IDEs. CI is not fully documented with phpdoc blocks. That’s why we have no full autocomple.

Profile
 
 
Posted: 03 June 2008 03:19 PM   [ Ignore ]   [ # 7 ]  
Summer Student
Total Posts:  6
Joined  06-03-2008

I see… Thanx.  so I’m still keeping with eclipse for now although I’m testing Aptana Studio which is pretty much eclipse geared for Ruby on Rails, PHP, and AJAX with FTP support ... it seems ok but it takes me a lot to change tools… heh I was using Alaire Homesite until 2 years ago.

Peace

Profile
 
 
Posted: 03 June 2008 04:11 PM   [ Ignore ]   [ # 8 ]  
Grad Student
Avatar
Rank
Total Posts:  64
Joined  03-14-2008

I’m using Eclipse + PDT + Aptana and I think I see what you are talking about.

Basically, Eclipse don’t show almost of ressource of a CI file because It’s not a standard PHP5 synthax.

I mean :

$this->load->model('somemodel');
$this->somemodel->somefunction(); 

 

is not standard, CI engine emule the Object Oriented synthax but Eclipse is not able to recognize it.

Eclipse will show you what ressources are available when you typping “$this->” if there is an include, an extend or an implements for exemple.

I guess when CI will be recoded in PHP5, Eclipse will be able to this stuff.

 Signature 

ACICRUD Library - CKEditor Helper
@NukiumSolutions - My Blog (fr / en)

Profile
 
 
Posted: 03 June 2008 08:09 PM   [ Ignore ]   [ # 9 ]  
Grad Student
Rank
Total Posts:  62
Joined  04-22-2007
Kromack - 03 June 2008 08:11 PM

Basically, Eclipse don’t show almost of ressource of a CI file because It’s not a standard PHP5 synthax.

I mean :

$this->load->model('somemodel');
$this->somemodel->somefunction(); 

 

is not standard, CI engine emule the Object Oriented synthax but Eclipse is not able to recognize it.

No, that _is_ standard PHP syntax.  If it wasn’t PHP couldn’t interpret it and we’d get runtime errors.  The real problem is that Eclipse can’t determine the data type of the “load” object and therefore can’t provide autocomplete for it’s functions.  The fix for this is to add phpDoc comments to CI which would indicate data types to Eclipse and other IDE’s.  Eclipse especially, is very smart about using phpDoc comments as hints for autocomplete and the like.

Kromack - 03 June 2008 08:11 PM

I guess when CI will be recoded in PHP5, Eclipse will be able to this stuff.

Recoding CI in PHP5 won’t help if it isn’t documented with phpDoc at the same time.  All we really need to do as a community is provide phpDoc for the CI we have and Eclipse would have better autocomplete for CI.  All it would take is one or two dedicated CI users to write phpDoc for the current CI core and submit a patch.

phpDoc would make the autocomplete in Eclipse work better, but because of the dynamic nature of CI, I doubt we’ll ever see a general purpose IDE with perfect autocomplete support for CI. 

Jim.

PS: Eclipse + PDT + CI user myself.

PPS:  I don’t have time to phpDoc the entirety of the CI core myself, but I’d be willing to make a start, if others were willing to help out.

Profile
 
 
Posted: 04 June 2008 02:55 AM   [ Ignore ]   [ # 10 ]  
Grad Student
Avatar
Rank
Total Posts:  64
Joined  03-14-2008

Ok ! Thank’s for the explanation.

 Signature 

ACICRUD Library - CKEditor Helper
@NukiumSolutions - My Blog (fr / en)

Profile
 
 
Posted: 04 June 2008 05:08 AM   [ Ignore ]   [ # 11 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  286
Joined  02-13-2008

Actually I can document all the source with phpDoc if someone from CI team will bless me and then include this into the official distribution.

Profile
 
 
Posted: 04 June 2008 02:05 PM   [ Ignore ]   [ # 12 ]  
Sr. Research Associate
Avatar
RankRankRankRankRank
Total Posts:  4777
Joined  03-23-2006

We certainly support this if its something that you’d want to do, but the truth is that after some internal discussion, it isn’t something we’ll be supporting at this time.  I really think its cool though that you all offered your own time to move this forward, thanks - its the kind of thing that makes the CI community so great.

 Signature 

DerekAllard.com - CodeIgniter, ExpressionEngine, and the World of Web Design

Profile
MSG
 
 
Posted: 04 June 2008 03:35 PM   [ Ignore ]   [ # 13 ]  
Summer Student
Total Posts:  6
Joined  06-03-2008

as I get more familiar with it I would contribute time as well ... it’d probably help me get up to speed with using the platform come to think about it…

Profile
 
 
Posted: 05 June 2008 12:10 PM   [ Ignore ]   [ # 14 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  286
Joined  02-13-2008

Sad to hear that… what’s the reason not to including docblocks?

Profile
 
 
Posted: 05 June 2008 03:16 PM   [ Ignore ]   [ # 15 ]  
Sr. Research Associate
Avatar
RankRankRankRankRank
Total Posts:  4777
Joined  03-23-2006

If I give reasons then everyone is going to argue them with me… I don’t really want that. wink

The short version is that we feel the additional comments made the code harder to read by a human, and increase the codebase by (6200 variable declarations x 3 lines) over 18,000 additional lines that while useful for some people are not useful for all.

Now please, please, please don’t take this as a condemnation of phpdoc or us not wanting to support it or anything like that.  It is not.  The truth is, its a stylistic preference for right now, and if it changes in the future I hope that you’ll still be around to give us a hand.

 Signature 

DerekAllard.com - CodeIgniter, ExpressionEngine, and the World of Web Design

Profile
MSG
 
 
   
1 of 3
1