Web and application development


For an extremely long time I had stuck to the idea of only having one return statement in a method/function. I've s… twitter.com/i/web/status/1…

Follow me
15thMarch 2010

Netbeans & remote files

Posted at 9:19pm by Jason in Web development

Tags: , , , ,

Just come across a scenario in Netbeans that can be a bit annoying.  Editing remote files.  In short, it isn’t possible without downloading the whole site.

99% of the time I work on a local copy of a site. When I get to a certain point I’ll commit the changes to the associated SVN repository. When the changes are ready, I will create a tag from trunk or whatever branch I’m working on and then deploy that tag to the live site or preview site. I hasten to add I never work directly on a live site unless I’m working with unversioned resources.

There are occasions, however, when you just need to edit a remote file directly. In Eclipse I use the Remote Systems Explorer plugin, part of the Target Management project.  With RSE, there is the option to create a remote project or to access a remote server directly.  When editing, a file is downloaded (using the protocol of your choice assuming the server supports it), and when the file has been saved it is uploaded again.

In Netbeans, it starts to look promising. There is a feature to edit remote sites and options for when edited changes are uploaded to the remote site. This can be:

  • Manual
  • When the project is “run”
  • On save

The above options are set when you create a new remote project. After choosing the server connection options, or defining a new set, the project is created and Netbeans then sets about downloading the whole site. This is similar to a remote project in Eclipse, but when you want to just access one file, downloading the whole site especially quite a large site, is just a bit much.  Ok, I could fire up Filezilla and download the file to, say, my desktop then just edit it and upload the result. Just seems a bit of an unnecessary time consumer.

I’ve had a poke around the Netbeans site for plugins, and also the forums. Seems like I’m not the only one who likes this type of feature.  Eclipse wins here and in fact Eclipse was fired up for this specific task.

Also got to say that Eclipse isn’t perfect here.  Accessing files in this fashion means that a lot of PHP-centric functionality supplied by PDT is not available – code completion, help access etc., but better than having to use multiple programs to achieve this task.

To have PDT functionality when working with remote files, you do have to set up a project specifying the remote server as the location – here Eclipse will also download all files – although you do have some control and the whole site doesn’t have to be retrieved (e.g focus on a specific directory). I can live with that.


  1. good job

    Comment by tadd — June 4, 2010 @ 1:34 pm

  2. thanks

    Comment by Alieisa — June 14, 2010 @ 2:33 pm

  3. Excellent, a really useful post, thanks.

    Comment by Simon — October 26, 2010 @ 10:33 am

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.