Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.
Hi all, please see this major site announcement: https://www.boards.ie/discussion/2058427594/boards-ie-2026

Eclipse php framework development question

  • 25-09-2011 02:54PM
    #1
    Registered Users, Registered Users 2 Posts: 19,261 ✭✭✭✭


    Hi all,
    I'll ask my question first and explain the background after:
    Is it possible to get Eclipse to correctly "open declaration" for a framework core class etc. even when the Framework source does not exist within the Eclipse project structure?

    I shall try to explain a bit more...I use the Yii PHP framework to develop apps (mostly just to help me learn as we only use a limited subset of the Yii functionality at work, no AR etc.) and I don't really want (nor see the need) to include a copy of all the framework source code within each small project I create. I have (for example) my Yii framework installed at /home/philip/frameworks/yii/yii-1.8 and in the applications main php.index file this location is included in the call to run the app, which all "works" fine and the framework source code is neatly kept out of the project specific code itself....BUT, when I go to a class declaration that say extends a core class (ie, in the /home/philip/frameworks/yii/yii-1.8 file) and ask Eclipse to open the declaration, it just sits there and does nothing. I can open declarations for any class etc. so long as they are contained within the current project, but not "higher up" than that. Projects would all reside under /home/philip/www/ directory.

    Does anyone know if it's possible to get Eclipse to open files in file viewer like this? Or would I absolutely have to include the framework in the project for dev purposes and then remove it later before deployment?


Comments

  • Registered Users, Registered Users 2 Posts: 3,141 ✭✭✭ocallagh


    I'm guessing it's something to do with include paths which you can set per project. Don't have eclipse on this computer so can't look for where those settings are


  • Registered Users, Registered Users 2 Posts: 19,261 ✭✭✭✭murphaph


    Spot on. Unfortunately there's another problem which I believe is a bug in the Eclipse pdt plugin (some other dude on the Yii forum said he traced it down to that anyway). The bug crops up because the Yii framework includes a minified version with all the most used classes (with no documentaion). Eclipse unfortunately seems to see this minified subset of the framework and not the base classes with docs so you get no tool tips on hover etc. There's a feature to ignore certain folders with the include library but this doesn't work and that is supposedly a bug.

    The only solution to this is to remove the yiilite.php (the minified file) file during development and stick it back in there before deployment (it's purely there for a performance boost).

    Cheers for taking the time to answer :)


  • Registered Users, Registered Users 2 Posts: 319 ✭✭nagilum2


    I've used Eclipse for developing in Java for years and am very used to it. I recently used php for a medium sized project the first time, so naturally I got the eclipse plugin (PDT) and found it horrible.

    After some googling and experimenting, I think that netbeans is probably 100x better than PDT for PHP development, and I used it to complete the project - wouldn't think about going back to PDT. You may want to give it a look.


  • Registered Users, Registered Users 2 Posts: 3,141 ✭✭✭ocallagh


    I've been using Eclipse with PDT for 5 years now and while it was fairly buggy to start the last few releases have been stable. I trialled Zend IDE a few months back and didn't see much difference between the two. I would guess the two (Zend and PDT) are built off the same code base at this stage since they both run on Eclipse now and are built by the same company.

    I do remember having a lot of trouble installing the PHP plugin on top of an existing Eclipse build though.

    If you're going to give it another go I recommend downloading the All In one bundle (Eclipse 3.6+PDT 2.2+other required plugins)


Advertisement
Advertisement