In an eclipse based IDE, how do you access remote files through two ssh connections? - eclipse

I'm working remotely and I need to access files on a server that's only accessible through ssh from another machine.
For example if my files are on server2, I need to ssh me#server1 then once I'm on that machine, ssh me#server2
Is there a way to set up remote systems in eclipse (I'm using Zend Studio) to get access to my files?
Thanks.

The short answer is No, however you you do have some options...
Eclipse is only aware of files in an Eclipse workspace (with some exceptions), thus you need to make your files available to your Eclipse instance. To do so, you could download the remote files and make them available locally or make te files accessible via a network share.
All in all, you need to make those files available on a file system visible to the local Eclipse instance. Once that is done, you can add/import the file into your Eclipse workspace.

Related

VSCode Extension transfer files to remote target

I'm writing a VSCode extension and need to copy some files to a remote machine (this is not a remote development scenario, but rather I've cross compiled and need to copy binaries and supporting files to the device).
My initial plan was to use SSH and SCP the files to the remote target. However, I see that the VSCode FS API allows working with local and remote filesystems. Is this possible and how would I use this API to copy the files I need?

Local History directory?

VSCode just introduced a new local history feature built into the application. However I cannot find where the older version of files I worked on are stored on my computer when local history is turned on.
Does anyone know where the local history of older file versions are stored on Windows and Linux computers?
From https://github.com/microsoft/vscode/issues/26339#issuecomment-1070884696
That depends on how VSCode is run:
local desktop client with local workspace: local file system
local desktop client with remote file system backed workspace: remote file system
web client with remote file system backed workspace: remote file system
web client with non-file-system-backed workspace (e.g. vscode.dev): IndexedDB in the browser
When stored in the file system, there is a folder called History in
the folder User that is stored at the user-data-dir, which depends
on the OS you are on. That is the same location where e.g. also
backups go or UI state.
Following those directions, on Windows 11 local file system I found it at
C:\Users\Mark\AppData\Roaming\Code\User\History
for Stable and
C:\Users\Mark\AppData\Roaming\Code - Insiders\User\History
for Insiders.
I can't answer it for Linux. But see https://stackoverflow.com/a/70453798/836330 for more on user-data-dir and Linux. It says it is in ~/.config/Code on Linux but I can't personally verify that.
Linux
/home/USER/.config/VSCodium/User/History/
Windows
C:\Users\USER\AppData\Roaming\VSCodium\User\History
I am using VSCodium, so I imagine you will replace VSCodium with Visual Studio Code in the path.

Download a list of VSCode extensions, for use on an offline system

I have a machine without internet access on which I'd like to install a list of VSCode extensions.
Is there an automated way of downloading the extensions while online, so I can copy the files to the offline machine and install them there? Ideally I'd like to be able to re-run the process to download updates.
I'm aware it's possible to manually download each extension, but given the number of extensions and their frequency of updates, I'd ideally like a repeatable process.
Would something like running a script in Portable Mode help?
Thanks!
If you can have vscode installed in the machine which has internet access you can use it to download the extensions and copy it to the other machine.
Let's say machine A has internet connection and machine B has no internet access.
Download the portable version of vscode i.e. .zip version from https://code.visualstudio.com/Download
After unzipping the VS Code download in machine A, create a data folder within VS Code's folder.
The data folder can be moved to other VS Code installations.
Copy the complete vscode directory to the machine B from machine A, this way you will have a portable version of vscode there.
Now whenever you need to update the extensions in the machine B, you can update the extension in machine A and copy the data folder or more precisely copy the extensions folder in the machine B.
FYR. I just copied entensions from below folder to the private network machine and they worked:
C:\Users\{xxx}\.vscode\extensions

Run Eclipse EPIC Perl Plugin on Remote Project/Files

I recently started a new job, where all development is done on a remote dev server. I really like Eclipse as a centralized development environment for all the different stuff I'm working on, and am not a particularly big fan of emacs or vi. I'll use emacs if I have to change something quickly, but after really trying to like it for normal development, I'm really starting to miss Eclipse.
That said, is there any way I can use Eclipse with EPIC for Perl development on a remote server? I can live without debugging functionality, but proper syntax highlighting, and the ability to create projects would be really, really nice. So far, I've tried using a remote browser plugin for Eclipse to peruse the remote dev server and open stuff into Eclipse that way, but it is far from ideal. Anyone have any better ideas?
Answering my own question (which no one seems to have looked at or care about, but what the hell-- maybe someone will have the same issue):
Grab Remote Systems Explorer from here.
Setup RSE to ssh into your remote server.
Create a new empty EPIC project (or using whatever plugin/ language you want).
Right click the project, select "New Folder," then
Advanced >> Link to alternate location (Linked Folder)
Switch file system to RSE, then just browse to some folder on your remote system you'd like to become a project, and add it.
That's it, you're done. Now when you open your project in Eclipse, you'll see that folder with all the code you wanted, and you can use it just like you would locally.
The main problem I'm seeing with this right now is that currently I can't get it to do any error checking, which is too bad. I'll work on finding a work around for that and update here if I do.
If you're on linux, you can also mount the remote drive/folder with sshfs and use the same "linked folder technique". I do this all the time for Java EE development. sshfs is also very reliable, unlike Windows network shares mounted on linux with Samba-Client. (Sometimes the Windows sharing service gets confused. And needs to be restarted on the remote server. I use a powershell one liner for this "restart-service -name 'sharing service' " or something likeĀ“that.)

Netbeans: Remote project w/source files over SSH?

Is it possible to set up a remote NetBeans C++ project where the source files are only accessible via SSH?
My project needs to build on a Linux box, but I'd like to develop it on a Windows machine.
Checking out the code via SVN to my Windows machine is not an option since there are a few files that differ only by case, and NTFS is not case sensitive (unfortunately, I can not change them).
I'm well aware that Windows can be kind-of forced be case-aware and the ideal solution is to just re-name those file to something sane.
However, I'm just trying to solve this using NetBeans. Since it's a remote project anyway, why bother to keep any files locally.
Thanks
Currently, no. In general programming files with different cases of the same name is a bad practice.
You can enable case sensitivity in Windows - you may need to have a Professional version or better.
For Windows XP: http://support.microsoft.com/kb/817921
For Windows 7: http://technet.microsoft.com/en-us/library/cc732389.aspx
See also: Windows Services for Unix
Another solution would be to setup VNC/RDP on the remote Unix system. The overall solution should be to conform to a better file naming convention:
Programmer 1: "Hey man, take a look at noCamelCase.cs - I just rewrote it."
Programmer 2: "Um, nocamelcase.cs is blank."
There are two ways of doing remote builds with Netbeans. The first, the project is stored locally. You just create a regular project and on the 2nd page of the wizard you specify the network directory with the source and the remote build host. I've used this for Solaris client to Linux server, but not from Windows as we don't have the mounts exported by SMB. This uses ssh and some shared lib interposers to get the build info.
The second way is to create a remote project. In this case the project is created on the remote host and date is copied on demand to the client. I've only doe a few tests with this as I preferred the first method as it had much better latency.
Lastly, you could either use vnc or install X on your windows machine and do everything on the Linux machine.