Welcome Guest, Not a member yet? Register   Sign In
CI plugin for eclipse
#11

[eluser]Jonathon Hill[/eluser]
@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? Big Grin
#12

[eluser]Stefano G[/eluser]
[quote author="Jonathon Hill" date="1217962993"]
Any tips on Aptana? Big Grin
[/quote]

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! Big Grin).

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.
#13

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

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

Code:
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?
#14

[eluser]Xeoncross[/eluser]
[quote author="gvdvenis" date="1218863568"]
Just to be curious: Why was this approach taken instead of for example this "more common way" of doing things:[/quote]

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.
#15

[eluser]gvdvenis[/eluser]
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)
#16

[eluser]Stefano G[/eluser]
[quote author="gvdvenis" date="1218863568"]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?[/quote]

Correct unfortunately, this doesn't autocomplete and I don't think there would be a way of doing it ... :roll:
#17

[eluser]Xeoncross[/eluser]
[quote author="gvdvenis" date="1218898218"]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? [/quote]

You had the "protected $AlbumModel" in your model - that means You knew BEFORE HAND what model would be loaded. In CI they give us the ability to load ANY MODEL we want and assign it a variable. CI isn't a one-model-only type system.

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

//
//// VS CI way of allowing MANY models
//

class Album extends Controller {
    
    protected $AlbumModel;
    protected $model2;
    protected $model3;
    protected $model4;
    protected $model5;
    //etc...

    function Album()
    {
        
    }
}
#18

[eluser]Unknown[/eluser]
Hello togheter,

iam new in CodeIgniter and really thankfull for your instruction to setup CI with Eclipse (everything worked fine)

But i have a general Quenstion, Stefano G said to move the folder "application" out of "system" and in the same level like system. Does CI work correct if the "application" folder is moved? Is is there no association with the "system" folder? I dont know yet how CI is working togheter and i just want to ask for my comprehension.

Hope you can make light in my head ;-)

pardon for my english

Greets Kim
#19

[eluser]Xeoncross[/eluser]
In your index.php file just change the following line and you can put the application folder anywhere you want!

Code:
$application_folder = "../application";

"../" means up one level so if the system is looking for "application" in "system/../application" then it really is looking in "/application".
#20

[eluser]Artemis Mendrinos[/eluser]
I have tried all the tips from the above posts but still I cannot have the level of code completition that I need.

I have tried the latest version of Eclipse PDT and also NetBeans 6.7.1 and none of them can assist me when I click Ctrl+Space:

$this->loa..

I expected to see a $this->load->

Also when clicking $this->db->...

I expected to see all the possibilities with the db.. for example: $this->db->insert(..




Theme © iAndrew 2016 - Forum software by © MyBB