NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Code completion when using FTP


Joined: 14 Jun 2009
Posts: 13
Reply with quote
I've noticed that I don't get code completion for class methods/properties unless I have the file open that defines that class.
Sometimes I do have those files open, but other times I don't..

How do I get this to work without having to open the class files?

(I'm used to being able to setup a remote ftp connection, and then just being able to use my classes and getting code completion without having to have the class files open.)
View user's profileFind all posts by FloydianSend private message
Guru master

Joined: 05 Jul 2004
Posts: 659
Location: Belgium
Reply with quote
For code completion you need to define a project. Once you have done that PHPEd will parse all files and you will get code assistance for all files linked to the project.
In the project properties you can add extra directories as well for code insight, in case you are using libraries not part of your project root.
View user's profileFind all posts by BlizzSend private messageVisit poster's website


Joined: 14 Jun 2009
Posts: 13
Reply with quote
Thanks for the reply Blizz.

I have a Remote FTP connection in the Explorer tab, and I have a project setup in the Workspace tab. I'm used to being able to add the Remote FTP connection to the project, which makes it appear as another folder on the project. But I don't see an option for that, and the documentation says something about a network-shared disk (which I don't know anything about, but it sounds like the shiznit) or downloading all of the files and publishing them...

I can definitely see doing the publishing thing if testing was done locally, but (and I'm sure the multi million dollar corporate backed programmers will scold me for this) I'm running a nomadic fly-by-wire remote editing operation where I don't download files except to open them/edit/and then save them to the remove server.

As of now, PHP IDE allows me to do this, but without having the full code completion I'm used to.
View user's profileFind all posts by FloydianSend private message
Guru master

Joined: 05 Jul 2004
Posts: 659
Location: Belgium
Reply with quote
The easiest solution to that, which I've been using for my non-windows servers (because I'm too lazy to set up Samba) is to use WebDrive. That piece of soft can turn any FTP, SFTP, WebDav or Amazon S3 into a local drive. Of course it is an external program so it costs money, but I've been using it since a couple of years and it's very handy.

Dunno why but I'm not really a fan of the local+remote+auto uploading tactic myself, but that would be perfectly possible as well. Apart from having to mirror the entire site on each machine you work from obviously. I like to work from both my laptop and my desktop depending my mood.
View user's profileFind all posts by BlizzSend private messageVisit poster's website


Joined: 14 Jun 2009
Posts: 13
Reply with quote
That's a nice solution Blizz. Thanks for your help Wink
View user's profileFind all posts by FloydianSend private message


Joined: 14 Jun 2009
Posts: 13
Reply with quote
Alrighty, first lemme say thanks again Blizz.

I'm very frustrated with this thing...
It's downloading everything from the site. I've pretty much written off being able to do anything for today

The code completion is becoming so entirely polluted that I'll never be able to find anything!

There's like twenty classes named A, another 13 named B, and it's driving me nuts. Soz, I have no idea what to do here. Everything just worked in the IDE I currently use.

However, they are *not* updating it and with PHP 5.3 out, I'm being forced to give up what *works* for some other IDE (which ever one) will support PHP 5.3

NuSphere is the best by far, but it's driving me insane.
Anyways, sorry for the rant, and I do appreciate the help Blizz. I'm starting to think that 20 years from now I'll still be using PHP 5.2.9 because I won't find an IDE that just works.


Oh and in the file that I have open, the functions won't fold!

I made a screen shot of the non folding functions and the tons of A/B classes (which I have no idea what they are) in the code explorer -> http://i198.photobucket.com/albums/aa42/Steel_Breeze/nu.jpg



--------------------
On the Project Properties dialogue, there's a setting for "Code Insight Includes", and when I add folders to that they won't stick. I.e., after clicking OK, closing the Code Insight Includes dialogue, then clicking OK on the Project Properties dialogue and closing that, when I reopen the project properties, there are no folders listed in the Code Insight Includes.

Furthermore, the manual doesn't have anything about this field. In fact there's a few fields that are not explained in the Project Properties part of the manual.


--------------------
Sorry, here's another thing I've noticed, when typing in $_SERVER['..... there is no code completion for the predefined server variables. (this one is a small deal, but considering that I'm getting tons of code insight into vBulliten (just because the site I'm working on happens to have vBulletin installed, but has nothing to do with the code I'm working on, and HMLT Purifier has all of it's methods and properties tossed in, I'm drowning in the "insight" I don't want, but the insight I do want isn't there)
View user's profileFind all posts by FloydianSend private message
Guru master

Joined: 05 Jul 2004
Posts: 659
Location: Belgium
Reply with quote
Hi,

It's true that starting with PHPEd is like being thrown in the deep end of a pool without any floating apparatus Wink
There are so many options and TBH not all of them are easily understood. I've been working with it for years and still have to refer to the manual for some things. Nevertheless it is (and will probably always be) the best PHP IDE I've worked with on so many levels (even if it can learn a thing or two from Eclipse). That being said, I don't think the support for PHP 5.3 is complete yet. Dmitri told me a short time ago that they are working hard to get it fully supported. Being a developer myself (as in non-web) I understand how much complexity the new functionality of the language (namespaces for one) adds so it's not something you add in a day or 2. So a little more patience, it will arrive, maybe sooner than you think Wink

In regards to your problems with the code completion: First and foremost, there is a difference between the Code Explorer and the Code Navigator: The first shows everything for the entire project (so all classes that have been found), the latter is for the current file only. If that is not a "solution" and there really are duplicates pointing to the same class, there are a number of options:
If you right click in the Code Explorer window you can choose refresh there. This will initiate a re-scan of your project to update the completion-cache. If that doesn't work, the data for completion is stored as a .PPX file next to your project file. So starting with a clean slate is as much work as closing the IDE (or project), deleting the file, and re-opening the project. I hope that helps?
I don't know how namespaces will be handled in the code explorer etc, I assume it will be a new top layer, if not, we might all have to deal with the mess of duplicate classes someday soon Wink

As for code folding: It has to be enabled, is it? It's in the options under Editor > Code folding.

And perhaps a small hint on the side: If you work on large project, you might want to disable "Initially Expanded" option for classes and so on under Code Insight > Code Explorer, that will keep the list a bit shorter. Its unworkable imho with all classes open Smile (I have it disabled for functions, classes, class methods and interfaces)

If there is anything else, let me know.
View user's profileFind all posts by BlizzSend private messageVisit poster's website


Joined: 14 Jun 2009
Posts: 13
Reply with quote
Blizz, if you aren't being paid to help here, perhaps you should be. I decided that I was only going to use PHP IDE today. So I'm sort of officially beginning my evaluation, and I think I've just about made it through the initial shock. I started out programming about two and a half years ago and have used the same IDE for the entire time.

Thanks for the note about PHP 5.3; I'm in no big rush to get 5.3 syntax support. My big concern is "breaking up" with an IDE that won't ever have 5.3 support since it's not being updated (at least not to my satisfaction lol).

And thanks for the clarification on the Explorer/Navigator. That does help me. Here's what is happening, I'm using YUI (Yahoo User Interface) and have multiple cached versions of the scripts that are combined and minified. So the class names are changed to things like A, B, etcetera. So I really need to be able to filter out the cache folder from code insight. (Yeah I do gzip/deflate the combined minified js files, but for browsers that don't accept either, I leave them uncompressed, which is why they are still "parsable" js files).

Code folding has been established on that script I made an image of. I can only theorize that it was not working due to the scan of the FTP file system taking up the programs attention. So I'm good to go on that front.

I'd set up the settings as you said for the Code Explorer. That definitely helps.

Well, I'm still evaluating and checking things out which means that I haven't found a "showstopper" reason to switch back yet. Your help Blizz may yet turn out to have not been in vain Wink


I really do appreciate your time.
View user's profileFind all posts by FloydianSend private message
Guru master

Joined: 05 Jul 2004
Posts: 659
Location: Belgium
Reply with quote
Hehe thanks for the compliments (and no I'm not paid to help out here, nor am I affiliated with NuSphere in any way).

The quickest way to exclude a folder from code insight (that I know of, I haven't really needed that functionality so far) is probably to hide the folder in the project properties. There is a "Hide directories" edit box pretty much at the end (usually contains CSV;.svn), you can just add your folder.

I'm not really a fan of how this is handled, I would prefer the that "Code insight includes" below was just "Code Insight" and give you the option to mark a folder as either include or exclude.
It's not because you don't want code insight for a folder that it should be hidden from the workspace.
But as said, that's the only way I can think of atm. Knowing PHPed there probably is another way (it's always like that Wink).

I'm sharing your opinion on 5.3, but I am doing some experiments with it already so full support would be nice.
NuSphere decided a while ago that they would only start on 5.3 after everything was final, a decision I can understand given the huge changes.
According to Dmitri the current things going on is the PHP5.3 support followed by javascript.
View user's profileFind all posts by BlizzSend private messageVisit poster's website
Code completion when using FTP
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