Time ago I read some blogs about ftp support for php projects in netbeans. I was thinking... Why ftp only? Where's support for SFTP and other protocols? It should be great to have an abstract API for remote file systems and lot of implementations for other protocols. So I started to look into netbeans sources. I found remotefs project in contrib repository. I was thinking: "it's great to see this. Netbeans for PHP must use this". So I started implementation of SFTP protocol. When I was in half of my work I looked into sources of netbeans php modules.
And what I discover? It uses own implementation of FTP protocol. Hmmm, so what now???
Because my primary targer was php module, I didn't know why should I continue write this plug-in. So I decided to rewrite remotefs API and it's implementation to more abstract level because it looks like it's tightly coupled with FTP protocol implementation.
Now I am releasing first alpha quality release. Maybe this is good starting point for integration of this plug-in into existing netbeans features...
You can download it here.
If you are interested in sources are available via mercurial repository.
PS: These modules uses same namespace (package) as mentioned project remotefs in main/contrib. So don't install this modules when you already have it installed.
Screenshots:
32 comments:
nice. thanks for this!
I saw your post, great.
Only one small but...
Did you know about:
http://commons.apache.org/vfs/
This one supports all kinds of filesystemes and url.
Hello Hilbert,
Thanks for info. I didn't know about commons-vfs. I'll definitely look at it... Anyway netbeans defines own API for abstract file system.
i tried to install THE plugin: i had several errors listed below; I just have a new "netbeans IDE Early access for PHP". Is something missing, or is it cause of my ubuntu 64 bits (8.04)?
Missing required modules for Plugin Remote FTP File System:
Swing Layout Extensions integration [module org.jdesktop.layout/1 > 1.6] Dialogs API [module org.openide.dialogs > 7.8] Explorer & Property Sheet API [module org.openide.explorer > 6.15] File System API [module org.openide.filesystems > 7.12.0.1.1] Module System API [module org.openide.modules > 7.7] Nodes API [module org.openide.nodes > 7.7.0.1] Settings Options API [module org.openide.options > 6.9] Utilities API [module org.openide.util > 7.17.0.1]
Missing required modules for Plugin Remote File System API:
File System API [module org.openide.filesystems > 7.12.0.1.1] Datasystems API [module org.openide.loaders > 7.2] Nodes API [module org.openide.nodes > 7.7.0.1] Utilities API [module org.openide.util > 7.17.0.1]
Missing required modules for Plugin Remote File System UI:
Swing Layout Extensions integration [module org.jdesktop.layout/1 > 1.6] UI Utilities API [module org.openide.awt > 7.3.0.1] Explorer & Property Sheet API [module org.openide.explorer > 6.15] File System API [module org.openide.filesystems > 7.12.0.1.1] Datasystems API [module org.openide.loaders > 7.2] Nodes API [module org.openide.nodes > 7.7.0.1] Utilities API [module org.openide.util > 7.17.0.1] Window System API [module org.openide.windows > 6.24]
Missing required modules for Plugin Remote SFTP File System:
Swing Layout Extensions integration [module org.jdesktop.layout/1 > 1.6] Progress API [module org.netbeans.api.progress/1 > 1.12.0.1] Java Secure Channel integration [module org.netbeans.libs.jsch/1 > 1.7] UI Utilities API [module org.openide.awt > 7.3.0.1] Dialogs API [module org.openide.dialogs > 7.8] File System API [module org.openide.filesystems > 7.12.0.1.1] Datasystems API [module org.openide.loaders > 7.2] Nodes API [module org.openide.nodes > 7.7.0.1] Utilities API [module org.openide.util > 7.17.0.1]
Hello Pascal,
try to download latest development build of Netbeans for php...
I have same problem as pascal under Vista 32 bit :(. I have newest NB for PHP from netbeans.org.
pascal & micz:
I downloaded latest netbeans php from http://bits.netbeans.org/download/trunk/nightly/latest/zip/netbeans-trunk-nightly-200810041417-php.zip
and install latest nbms from http://plugins.netbeans.org/PluginPortal/faces/PluginDetailPage.jsp?pluginid=13195
and it works... try this setup and let me know if you have still this problem...
Hi,
It's very useful this plugin but when I can not pug into Netbeans 6.1 because of missing required modules. I am using Windows XP
Any helps
cau pocuj nejako mi nefunguje ten tvoj plugin...mam Ubuntu 8.04, a skusal som plugin na NetBeansoch v. 6.5 Beta, 6.5M1,IDE Build 200810090201, IDE Build 200810080201. Naistalovat plugin sa mi podarilo len na poslednych 2. A pada mi to uz pri pokuse pripojit sa na FTP....
hlaska je takato:
org.netbeans.modules.remotefs.ftp.client.FTPException: 500 Illegal PORT command.
at org.netbeans.modules.remotefs.ftp.client.FTPClient.processSimpleCommand(FTPClient.java:287)
at org.netbeans.modules.remotefs.ftp.client.FTPClient.processSimpleCommand(FTPClient.java:272)
at org.netbeans.modules.remotefs.ftp.client.FTPClient.openDataActive(FTPClient.java:375)
at org.netbeans.modules.remotefs.ftp.client.FTPClient.openData(FTPClient.java:357)
at org.netbeans.modules.remotefs.ftp.client.FTPClient.list(FTPClient.java:749)
at org.netbeans.modules.remotefs.api.RemoteFile.getChildrenBlock(RemoteFile.java:336)
at org.netbeans.modules.remotefs.api.RemoteFile.getChildren(RemoteFile.java:292)
at org.netbeans.modules.remotefs.api.RemoteFile.getStringChildren(RemoteFile.java:811)
at org.netbeans.modules.remotefs.api.RemoteFileSystem.children(RemoteFileSystem.java:375)
at org.openide.filesystems.DefaultAttributes.children(DefaultAttributes.java:223)
at org.openide.filesystems.AbstractFileObject.list(AbstractFileObject.java:128)
at org.openide.filesystems.AbstractFolder.getNewChildren(AbstractFolder.java:867)
at org.openide.filesystems.AbstractFolder.refreshFolder(AbstractFolder.java:728)
at org.openide.filesystems.AbstractFolder.refresh(AbstractFolder.java:909)
at org.openide.filesystems.AbstractFileObject.refresh(AbstractFileObject.java:812)
at org.openide.filesystems.AbstractFileObject.refresh(AbstractFileObject.java:794)
at org.openide.filesystems.AbstractFolder.refresh(AbstractFolder.java:484)
at org.openide.filesystems.FileObject.refresh(FileObject.java:826)
at org.openide.filesystems.RefreshRequest.doLoop(RefreshRequest.java:163)
at org.openide.filesystems.RefreshRequest.run(RefreshRequest.java:127)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572)
[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997)
Hi !
This kind of idea seems to be in the air ...
Did you know about :
http://www.eclipse.org/dsdp/tm/
Hi there and thanks for the plugin.
However the plugin seems to be broken and unusable.
I am using Ubuntu Hardy 32 bit with Netbeans 6.5 RC1
* When I add a sftp connection, everything seems fine; however when I add a second sftp connection all sorts of problems start occurring.
1. All sftp connections are modified according to the last connection that I modify; I end up with something like
Secure FTP (menu)
sftp://login1@host1 (item)
sftp://login1@host1
sftp://login1@host1
both the connection parameters and the name get duplicated and overwritten no matter what.
2. If I close Netbeans and open it again, and I try a sftp connection, I am prompted again (everytime I close and open NB this happens) with a password prompt box DOES NOT HAVE a text field anymore. It's just the password prompt with OK and Cancel buttons at the bottom.
If I press the OK button at this time (without a text field to type anything into), I get the following error at the NB log:
java.lang.NullPointerException
at org.netbeans.modules.remotefs.sftp.client.SFTPLogInfo.promptPassword(SFTPLogInfo.java:157)
at com.jcraft.jsch.UserAuthPassword.start(UserAuthPassword.java:52)
at com.jcraft.jsch.Session.connect(Session.java:418)
at com.jcraft.jsch.Session.connect(Session.java:149)
at org.netbeans.modules.remotefs.sftp.client.SFTPClient.connect(SFTPClient.java:59)
at org.netbeans.modules.remotefs.api.RemoteFileSystem.setConnected(RemoteFileSystem.java:173)
at org.netbeans.modules.remotefs.api.RemoteFileSystem$1.run(RemoteFileSystem.java:141)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572)
[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997)
Not only that, but I have confirmed that the password has already been saved in the xml file (in ~/.netbeans/6.5rc1/config/RemoteFileSystems/), and I am still prompted for a password with a prompt box in which I cannot type anything into.
3. The ssh key in the "add connection" menu does not work and I am still prompted for a password. The ssh key info is not saved at all in the xml file under ~/.netbeans/6.5rc1/config/RemoteFileSystems/
4. I can change the parameters for each connection directly into the xml files. After closing and opening NB, it seems that the connections are there as I typed into the xml files. However when I try to "Go Online" I am prompted the same empty password prompt in which I cannot anything into.
Please help.
Thanks.
See my previous post.
Another thing that I just noticed is a line in the NB log when I start NB:
WARNING [org.netbeans.core.modules]: the module org.netbeans.modules.remotefs.ftp uses org.openide.options which is deprecated: Use org.openide.util.NbPreferences instead.
That probably has something to do with all the problems but I wouldn't know.
Also, every single time that I close and open NB and I try to "Go Online" in one of the sftp connections, I am prompted first to the accept the RSA key fingerprint, regardless of accepting the key. This happens every single time I reload NB.
I *really* need sftp support on Netbeans, so I decided to try one more time to use your module on one connection and only one connection. I am also using the module right after it is installed and without restarting NB. See my previous posts.
-----
Is there a reason that the sftp module spiders my entire remote directory?
So if I forget to add the path and leave "/" which is the default path, what is this thing gonna do? Spider the entire remote server? And what for?
The remote server is more than 10TB in size!
Dude; spidering = not good.
Besides, my remote working folder is 2GB in size... Why would I want to download the whole thing locally; or even wait for a remote 2GB transfer? Netbeans of course, becomes completely unusable while your app is spidering around.
So even if I only use one connection, and I use your module right after it is installed and without restarting NB, THE WHOLE THING IS USELESS.
Sorry dude, I know that you have good intentions, but that thing of a wanna-be module sucks ass big time.
Hello haxman,
first of all it alpha quality...
second thing, there is no spidering... True is, that this plugin store directory structure in cache, but only visited subtree. And download files only when you click to edit file.
So you have to wait for better release.
Thanks for the reply.
Just a note than in big directory structures NB becomes unusable. By looking at the files that remotefs was caching I noticed that it was transversing through directories.
There may be something I am missing but I do not understand why go through all that trouble. You may want to take a look at a GNU ftp/sftp module/plugin that jEdit has.
One can open any file in any remote location without having to wait for a mammoth of a directory to be cached.
Ideally the whole thing should be as transparent as with working with local files. But that's not saying anything new.
The idea however is that the files are treated remotely and stay remotely.
Whatever needs to be brought in to the users' computer memory space is strictly temporary and disappears once the file is close, no? Just an idea.
Thanks anyways.
hi hexman,
yes maybe you are right. As I mentioned time ago, this plugin is reborn of existing API from netbeans contrib repository which wasn't written by myself. Idea of caching was there before I started to work on it.
Problem is that i haven't lot of free time to fix all problems. I'll try to do something with that...
Maybe you can help... It's open-source... ;)
I wish I could help, but I am more of a PHP programmer than a Java programmer.
I may take a look at the code anyways.
If I come up with anything I'll let you know.
Thanks.
Hello,
I downloaded the NetBeans 6.5 PHP, and installed your plugin without problems.
But when i added a connection to my site, it simply doesn't list the files or directories, even i updating, reloading, it doesn't works...
can u help me?
I installed this plugin a couple of weeks ago, and have enjoyed it very much until a couple of days ago, when it suddenly started acting weird.
I could copy an create new files, and it all seemed fine in NetBeans, but the change wasn't actually performed. Also if I created new files remotely, I couldn't get it to find the new files.
I deleted the ftp-connection, to start from a fresh, but now I'm not able to get a connection again.
It's a pity, because it really worked ok. :-/
FTP connection dialogue should have an option to choose the port!
hi hexman
i am a newbie in netbeans, so i have a very dumb trouble
i cant install this plugin((
i choose "Tools -> Plugins -> Downloaded -> Add Plugins" and try to choose the downloaded plugin (1224086181936_remotefs-0.1.2.zip), but it's said that the plugin must be with *.nbm extension((
What i do wrong?(
Just unpack zip file and install all nbsmfiles from plugin view
Is this project actively mantained?
amazing stuff thanx :)
rH3uYcBX
Doesn't work on Win7 / netbeans for php.
olalonde, I run windows 7 pro, and have netbeans php running (with the remote filesystem plugin), so I don`t know whats the problem your running into.
Isn`t there an option to stop file caching ?
Super-Duper site! I am loving it!! Will come back again - taking you feeds also, Thanks.
rH3uYcBX
An error:
http://statistics.netbeans.org/analytics/exception.do?id=400511
In NetBenas6.9/WinXP i tried to add an SFTP connection, but exception occured:
java.lang.IllegalArgumentException: Called DataObject.find on null
at org.openide.loaders.DataObject.find(DataObject.java:495)
at org.openide.loaders.DataFolder.findFolder(DataFolder.java:553)
at org.netbeans.modules.remotefs.api.config.ConnectionPersistenceManager.create(ConnectionPersistenceManager.java:183)
at org.netbeans.modules.remotefs.api.LogInfoList.add(LogInfoList.java:90)
at org.netbeans.modules.remotefs.sftp.ui.NewSFTPSiteWizardAction.performAction(NewSFTPSiteWizardAction.java:54)
at org.netbeans.modules.remotefs.sftp.SFTPFileSystemInfo.createConnection(SFTPFileSystemInfo.java:46)
at org.netbeans.modules.remotefs.ui.nodes.RemoteFSNode$AddSiteAction.actionPerformed(RemoteFSNode.java:114)
...
Can you help?
Thx
I'm with Vista 64x netbens 6.9 and i have same error as Martin
I got this error, when connecting remote file : any one clarify my doubt..
java.lang.IllegalArgumentException: Called DataObject.find on null
at org.openide.loaders.DataObject.find(DataObject.java:495)
at org.openide.loaders.DataFolder.findFolder(DataFolder.java:540)
at org.netbeans.modules.remotefs.api.config.ConnectionPersistenceManager.create(ConnectionPersistenceManager.java:183)
at org.netbeans.modules.remotefs.api.LogInfoList.add(LogInfoList.java:90)
at org.netbeans.modules.remotefs.ftp.ui.NewFTPSiteWizardAction.performAction(NewFTPSiteWizardAction.java:70)
at org.netbeans.modules.remotefs.ftp.FTPFileSystemInfo.createConnection(FTPFileSystemInfo.java:54)
at org.netbeans.modules.remotefs.ui.nodes.RemoteFSNode$AddSiteAction.actionPerformed(RemoteFSNode.java:114)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.AbstractButton.doClick(AbstractButton.java:357)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1225)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1266)
Hi,
i install plugin in netbeans 8 and it works fine. I would like to see hidden files on the remote server in ftp area. Please can you tell me if it is possible?
Best regards
Post a Comment