I am new to Netbeans. Is it possible to work directly on the server files through sftp to avoid downloading/uploading each time. Will the intelisense work the same ?
If it is possible I can't find how to do that or what plug-in i need to use. And if it 开发者_JAVA技巧isn't what other free php IDE offers this option ?
So.
With Netbeans
To work directly through ftp/sftp on Netbeans 6.8
- Open a new project and select "Php application from remote server"
- It stills need a local storage for the files so that you can work on them so you need to specify a project name and it's local folder
- Next step is the remote configuration: Click on the "Manage" button to add a new connection by giving it a name and selecting sftp or ftp. Then enter the connection configuration with the initial directory
- Back on the remote configuration screen the upload directory must be the same as the "initial directory"
- On the next screen you can retrieve all the project's sources
Once done each time you will save a file it will be automatically uploaded to the server. If not go in the project properties and check "Upload Files" is on "OnSave" mode in the "Run configuration" section.
PS: I had problems with a "The authenticity of ... can't be established. RSA fingerkey is..." warning that kept appearing each time I saved. If so just create an empty and writable known_host file and point to it in the "Known host files" property of your remote connection, then restart Netbeans (seen on netbeans forum)
Edit: At this stage the behaviour still isn't quite what I am expecting since when you open a file netbeans will open the local copy and overwrite the remote copy when you save.
Edit2: Apparently you can not open the file directly from the server in Netbeans. You'll have to download the file before modifying it.
General solution
One workaround is to use an utility that will map the remote storage as a local drive. I know Fuse does it for Mac & Linux. I haven't found one for Windows yet.
Looks like NetBeans added it a few minor versions ago: http://blogs.oracle.com/netbeansphp/entry/sftp_support_added.
Just confirmed that this support is in the 6.8 version I have running.
The intelisense will work the same as long as you have all of the completable objects within your project scope, it won't pull libraries still on the server. Download a local copy of any 3rd party libraries your project may need and add them to your project's include path to get full code completion.
精彩评论