This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Scenario: - Launch NetBeans - Add some Unix remote host: --- Push Tools|Options main menu item --- Click on C/C++ icon --- Select "Build Tools" tab --- Press Edit button --- Press Add button in Build Hosts Manager window --- Specify host name and press Next --- Specify login and press Next --- Type password and press OK --- Press Finish --- Press OK in Build Hosts Manager window --- Press OK in Options window - Call context menu on toolbar, add Remote toolbar - Push "Create Remote C/C++ Project" button on toolbar - Create "C/C++ Application" project - Create 2 files (file1.c and file2.c) - Call context menu on "file1" editor's node - Select Diff To... ==> I can't select remote file in "Diff file1 To..." wizard
Created attachment 143405 [details] the fix might be as simple as attached one; however I think it's rather a prototype; the correct one should be done via more common SPI than just Diff SPI
The drawback of the fix attached (https://netbeans.org/bugzilla/attachment.cgi?id=143405&action=diff) is that it is diff-specific. There are other cases where it should be possible to create a file chooser that allows to choose a file on the file system node belongs to. So I think FileChooserBuilder should use an SPI that allows to replace it with FileSystem/FileObject based chooser. Such a FileObject based chooser is already implemented in dlight.remote module, and it works pretty well. I'm eager to participate.
one question: how does it work in Favorites and with File -> Open File... ? If you choose Add to Favorites from the popup in the Fav window, are you able to select any remote file there? And in Open File are you able to open any remote file? In other words, is there any file chooser window where it works?
(In reply to Ondrej Vrabec from comment #3) > one question: how does it work in Favorites and with File -> Open File... ? It does not work: you can add/open only local file via "File->Open File" or "Add to Favorites" > In other words, is there any file chooser window where it works? Sure it is, you can see it via two ways: 1) enable "Remote" toolbar and set up a host, then use "Open Remove File" or "Open Remote Project" buttons on this toolbar. 2) select "Services" pane, choose "C/C++ Build Hosts", add host there (or select a previously added one), choose "Add to Favorites"
(In reply to Vladimir Kvashin from comment #4) It isn't easy to create a suitable api/spi for the cases I described since there is no "base" file object there - I mean the object that implicitely determines, which file system / file chooser to use. So notion of host appears, which is too specific for C/C++ (and probably some other, like php, but not platform itself). With "Diff to" situation is easier from api/spi perspective: file object that is used to implicitely determine, which file chooser to use, already exists, so we can create api/spi without adding ne dependencies.
> Select Diff To... As a workaround, it's possible to select the two files in e.g. Favorites view, right-click and select Tools -> Diff. > the fix might be as simple as attached one; however I think it's rather a > prototype; the correct one should be done via more common SPI than just > Diff SPI. I'm afraid that the fix will not work correctly. The custom file chooser will return a java.io.File that doesn't exists on the local file system, so we'll not be probably able to get corresponding FileObject for it anyway (FileUtil.toFileObject will return null). > So I think FileChooserBuilder should use an SPI that allows to replace it with > FileSystem/FileObject based chooser. I think we should move this discussion to bug 207496.