views:

27

answers:

1

I'm working on a joomla project and for debugging/type hinting/auto-complete have my whole joomla install as a project. Is there a way I can hide the folders I don't need in file or project view?

Ideally I would have a project that scans all of the folders but simply displays this:

  • administrator
    • components
      • com_myproject
        • (display all files under this)
  • components
    • com_myproject
      • (display all files under this)
A: 

No, you cannot do it with NetBeans like this.

However, you can do it little differently... this is going to be component development. Basically for every custom component you will need to have a separate project.

Create project with folder structure like Joomla

|
|-administrator
  |-componnets
    |-my_component
|
|-componnets
  |-my_component 

After this step, right click the project and go into properties. In the properties go to PHP Include Path, map path to Joomla directory, this is what is going to give you autocomplete feature for Joomla code.

Also, to improve auto-complete for Joomla, go to Tools->Properteis->Editor->Code Copletion
Select PHP from language drop down. Check Also Non-Static methods after ::, this will give your auto-complete for methods like JFactory::getDBO(), etc...

Obviously it makes it hard to test right now, because component is not inside of Joomla... and copying it manually makes it a hassle. Go to project properties (right click project->properties) and enabled "copy files from Sources Folder to another location" and math the path. NetBeans will no allow you to setup copy into existing directory, workaround is simple.

  1. Setup copy support into temp direcotry /tmp
  2. In NetBeans windows, go to Files of your component project
  3. Expand the nbproject node
  4. Open project.properties
  5. Manually modify the copy path

If you want something more advanced and runt test's, you can use Ant and create build.xml files. Read more about it on Sun's blog about NetBeans PHP and Ant.

Alex