Welcome Guest, Not a member yet? Register   Sign In
codeignitier and eclipse
#1

[eluser]Mitja B.[/eluser]
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->...
#2

[eluser]Xkribble[/eluser]
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.

[><]
#3

[eluser]Sam Dark[/eluser]
It's possible but requires a lot of work to add phpdoc everywhere…
#4

[eluser]Xkribble[/eluser]
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.
#5

[eluser]Sam Dark[/eluser]
I mean special comments like this:

Code:
/**
* @var CI_Controller
*/
var $controller
#6

[eluser]Xkribble[/eluser]
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!
#7

[eluser]Sam Dark[/eluser]
It's the same for all IDEs. CI is not fully documented with phpdoc blocks. That's why we have no full autocomple.
#8

[eluser]Xkribble[/eluser]
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
#9

[eluser]Kromack[/eluser]
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 :

Code:
$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.
#10

[eluser]Jim OHalloran[/eluser]
[quote author="Kromack" date="1212541879"]Basically, Eclipse don't show almost of ressource of a CI file because It's not a standard PHP5 synthax.

I mean :

Code:
$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.[/quote]

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.

[quote author="Kromack" date="1212541879"]I guess when CI will be recoded in PHP5, Eclipse will be able to this stuff.[/quote]

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.




Theme © iAndrew 2016 - Forum software by © MyBB