NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Ability to add "virtual folders" to a project


Joined: 05 Mar 2007
Posts: 1
Reply with quote
Let's say you have 10 projects with different root-folders, and they're all using the same CMS you're working on as well (or Smarty, or MyActiveRecord, or any package of classes for that matter)
Wouldn't it be great to be able to link to the folder the CMS is located in, and have it appear as a normal folder in your project tree, so your project files can use
Code:
include('myCMS/functions.frontend.php');

even if there is no 'myCMS' folder in its root?
and the debugger and code-hinter and code-browser would act like it's there.
synchronizing with FTP would simply put that 'virtual' folder up on the server just like any other folder from the project.

This is the only feature that's stopping me from getting this IDE over another one.
but over-all, PhpED works much smoother...

any possible implementation in view?
pretty please?
View user's profileFind all posts by nemoDreamerSend private message
Guru master

Joined: 05 Jul 2004
Posts: 659
Location: Belgium
Reply with quote
Why don't you use a define?

Code:
define ( 'myCMS', '/var/www/projects/mycms' );
include ( myCMS . '/functions.frontend.php' );


I have code in place that sets my defines and configs depending on whether the files are hosted on my testserver (windows) or my actual production server (FreeBSD). I just use the $_SERVER [ 'HTTP_HOST' ] for that. As soon as a project is final I remove that code and only leave the production stuff in there.

Things like what you ask are extremely hard to implement. The way you like it to work is not necessarily what the rest of the phped community thinks. So what is heaven for you might be hell for another person. I personally would shiver when using an editor or whatever that modifies my sourcefiles or decides where to put data.

The example you give (PHPEdit) only has the ability to make "shortcuts" in the projects. I'm pretty sure you will not be able to include the code in your project by just specifying the project-shortcut-name, since that would require a modified version of PHP as well (one that knows how to work with those things). Same would go for the nusphere debugger. It's just a layer on top of PHP and it sees things as PHP does. If PHP doesn't understand, neither will the debugger.

I must say that I do like the shortcuts idea, but I already solved that by making a project for each of my "libraries" and just including it in the workspace. Regarding code-insight: it's peanuts to add "code insight includes" in your project properties. After you do that the code hinting will also work for the included things.
View user's profileFind all posts by BlizzSend private messageVisit poster's website
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
I agree with Blizz,
these "virtual directories" aren't usefull for real live. If you have no myCMS directory but use it, how will your live apache+php server serve this? or you're developing scripts only for learning php? Definitely, myCMS should be somewhere. If you put it into php.ini (include_path), you may still do the same in the PhpED IDE too. To get those files found and used you'll need mapping and "code insight includes" updated appropriately.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Ability to add "virtual folders" to a project
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic