Bug 154446 - SFTP: Ability to work on remote filesystem
SFTP: Ability to work on remote filesystem
Status: NEW
Product: contrib
Classification: Unclassified
Component: RemoteFS
All All
: P3 with 6 votes (vote)
Assigned To: remotefs@contrib
: 157588 158441 (view as bug list)
Depends on:
  Show dependency treegraph
Reported: 2008-12-03 12:59 UTC by michael3
Modified: 2012-02-23 17:11 UTC (History)
5 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description michael3 2008-12-03 12:59:29 UTC

In e.g. Zend Studio it is possible to create a new project with source files from a remote connection like sftp, so you
can really work on the remote server. Would it be possible to add this feature also for the sftp support on netbeans?
That would be really nice!

Comment 1 dancehands 2009-01-30 15:19:47 UTC
I second this request. This is the one and only feature that keeps me from using NetBeans (which I totally love) for all
of my development. I use this feature all of the time in the old Zend Studio IDE (pre-Eclipse version). I'm finding it
really hard to live without this functionality.

Otherwise I must say that I'm absolutely impressed with NetBeans and it's by far my favorite IDE for developing PHP
applications. Way to go!
Comment 2 Tomas Mysik 2009-02-02 10:35:37 UTC
Unfortunately, this would be very hard to implement right now because of these 2 blockers:
- we need to have all the project files locally so we can index them (to provide right and complete data for code 
completion, go to type/symbol actions, find usages etc.) [see issue #131401]
- as far as I know, we don't have any stable (or good enough) remote filesystem we could use (not only) for PHP 
Comment 3 michael3 2009-02-02 12:13:53 UTC
@tmysik: I think it would not be necessary to have the project files and the code index files automatically. You could
do that manually or refresh it only from time to time (This is also the case in the zend IDE)
Comment 4 mcorsi 2009-02-02 12:20:44 UTC
The plugin "Remote File System Kit" comes is a fairly stable remote file system module if this is any help. It 
occassionaly, after long time outs between saves, gets confused as to whether it is working locally or on the remote 
files directly; but other than that, it seems to work fairly well.
Comment 5 Tomas Mysik 2009-02-02 12:21:39 UTC
In such case, some remote FS explorer could solve your problem (if you don't need reliable code completion, find 
usages etc.).
Comment 6 Tomas Mysik 2009-02-12 12:19:44 UTC
*** Issue 158441 has been marked as a duplicate of this issue. ***
Comment 7 Tomas Mysik 2009-02-18 21:13:22 UTC
*** Issue 157588 has been marked as a duplicate of this issue. ***
Comment 8 villalvilla 2009-02-19 06:46:02 UTC
Hi all!
Tomas, thanks a lot for including me on the CC.
I'm introducing myself. I'm the reporter of the ticket 157588. I better know dreamweaver than zend studio, but as you
wrote, the concept in the underground is the same: Map remote filesystem through sftp and don't download anything, just
download the only file you are working on and then upload it to the server when you save it. This differs from the
netbeans concept of downloading ALL the contents on the sftp folder and then doing resyncs of all the uploaded contents.
You talked about two problems:
1. Code completion: why not keeping a code caché on demand? if you open a file for update, then caching all the includes
it does and download specifically that sources to a "program caché". How do you implement this issue on netbeans right
now? when you open a file, do you walk inside all the files and see if there are any includes from another file to the
opened file and then construct the object jerarquy? If it is that way, how do you keep that jerarquy in memory? Or you
simply catch the object jerarquy from the open file to the claimed includes?
2. michael said: "as far as I know, we don't have any stable (or good enough) remote filesystem we could use (not only)
for PHP projects". Why is that? sftp is good enough for this issue! In fact, you implemented that option on netbeans 7,
but you download all the files instead of caching the directory tree. Think about it, if you keep the file cache, when a
change is made, you can re-sync the caché. What dreamweaver does is this: they have a right-click option named
"refresh", and all the folder tree caché is updated! They also keep in the caché the last file modification date,
because if you open a file on the server and change it, and then open it again on dreamweaver, it can say something like
this "oooopppsss! the file has been changed on the remote file system. Do you wonna keep your copy or resync again?". I
think it's easy! Remember, file edition is on demand, so you can update your folder tree caché this way too.

Comment 9 nimmr 2009-05-05 16:44:45 UTC
My problem with netbeans is exactly that it scans files. We have a server with approximately 200 Typo3 sites on it and I
need to be able "mount" the folder which contains them all for easy navigating. A single Typo3 site can easily take 30
seconds to complete, so a scan would be devastating on all 200.

Auto completion is nice, but I could live without it. Typo3 and most of it's extensions are badly commented, so scanning
wouldn't do anything in the first place.

What I really need at a minimum is a way for me to disable autocompletion scanning, and just use the files you have open.
A really neat feature would allow me to select what files that should be scanned, e.g. by right clicking on them to
"mark" them for scanning, so the IDE would remember them the next time for my "project".
Comment 10 Petr Jiricka 2009-05-24 20:54:56 UTC
Would it be sufficient if the scan was run just the first time, and not when you run NetBeans the next time? This way
the first scan can complete in a couple hours, and then the next time it is immediate. On the Update Center for NB 6.7
daily development builds, there is now a module called "Scan on Demand", which disables the scanning in some situations
(meaning the code completion database could become out of date more easily). See also this wiki page:
It would be great if you can try it out and let us know what you think.
Comment 11 nimmr 2009-05-27 18:21:54 UTC
Hi pjiricka.

I just tried your extension, and while its a step in the right direction, it's not quite a solution for us.

I mounted a server via ExpanDrive and made a local PHP project. The root of the drive contains 9 sites which are all
Typo3 sites, with different versions of it. Every site has a symlink to a Typo3 version, and on that server we have 6
versions installed in a typo3_src/ subfolder adjacent to our sites.

Each Typo3 version is about ~500,000 lines of code so that adds up to 3,000,000 lines of PHP code. This code is badly
commented for use in auto completion, i.e the docblocks contain mostly primitive parameter types of string|array|object
etc, and not full class names. I really, really, don't want this code scanned, it's just a waste of time.

Each site has local extensions installed, some are our own extensions, some are just vanilla extensions we don't want in
our global typo3 installations. A typical site few local extensions has ~20,000 lines of code, and a site with alot of
local extensions is about 300,000 lines. In the case of the one with 300k, I'm only interested in auto completion from
my own extensions, which is 20,000 lines, not the ones we slightly altered or just installed a local copy.

On this server we have 9 sites running on 6 typo3 sources with a total of 4,500,000 lines of code, which is pretty bad
for Netbeans to chew on. It gets worse though, since symlinks are transparently resolved by my SSH mount program,
ExpanDrive, it's scanning our typo3 source codes 9 times (27,000,000 lines of 100% wasted time).

Now, these numbers come from our high demand server, which only has 9 sites. Try and run this on our SMB site server,
which has 15 Typo3 installations and 188 sites, and you see where my problem is.

Disabling scanning intirely would help a bit. I have a few code bases which I have single projects for, and in those
projects I absolutely love auto completion, @todo scanning, refactoring, etc, but I can do without them in our other sites.

Your extension would be realistic for us to use, except it needs a complete scan when the project is created.

PS. Netbeans crashed after 1½ hour of scanning. 
Comment 12 ahildoer 2012-02-23 17:11:18 UTC
My issue with symlinks is a bit worse fan files being of the wrong type on my dev server. I have the issue that my symlinks are being deleted completely. I believe this is because my symlinks point to directories outside of the project which exist only on my dev and prod servers. Since the destination of the symlink does not exist on my workstation, Netbeans just deletes the symlink all together, rather than leaving it in place.

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo