Remote search not working in eclipse RSE - eclipse

I'm trying to search for a string in eclipse. I'm currently connected to a remote linux server using RSE. but the search doesn't yield any results. I'm sure that the string is present in some of the files in the directories I'm searching in. I have search in sub-folder options checked.
Any setting I need to change for it search successfully?
Thanks in advance!

Which version of Eclipse are you using and which protocol do you use for your connection (ssh, ftp, or dstore)? In addition, it would be good to know which kind of project you are working on (Java, C/C++, ...). From what you stated in your question, I would guess that your project is not fully indexed yet so that most of the files are not being searched. Try rebuilding your index and see if this helps.

You are best advised to permanently forget about searching in remote repositories using Eclipse RSE. Remote Search requires running a dedicated daemon on the remote server, so unless you own the server and have root access (necessary for launching daemons and opening ports on the firewall), remote searching functionality will be unavailable to you, full stop.
It eludes me why RSE doesn't just use find | grep over SSH. </rant>

Related

JCraft SFTP for eclipse Luna

I've been using for the last 6 years JCraft's SFTP plugin.
It's quite simple to use and the only problem i ever had with it is that it doesn't know how to delete recursivly files and folders (it tries to delete folders before files).
Today i tried to update eclipse to Luna and I can't seem to install this plugin anymore.
I get the following error:
An error occurred while installing the items
session context was:(profile=epp.package.standard, phase=org.eclipse.equinox.internal.p2.engine.phases.Install, operand=null --> [R]com.jcraft.eclipse.team.sftp 0.0.4, action=).
Failed to prepare partial IU: [R]com.jcraft.eclipse.team.sftp 0.0.4.
Any ideas on how to solve this ?
Thanks
From the error message "Failed to prepare partial IU" I found this thread: https://code.google.com/p/veloeclipse/issues/detail?id=47
The suggested workaround is to install the "Eclipse 2.0 Style Plugin Support", which adds support for "running old Eclipse plugins that are not proper OSGi bundles."
You can use Remote System Explorer (RSE) to replace the sftp plugin. It has sftp capabilities (use ssh connection) and allows you to synchronize files between local and server storage
I too struggled to get JCraft installed and then I discovered that Remote System Explorer (RSE) comes already installed in Eclipse Luna in the Java EE version but it may be baked into other versions of Eclipse as well. All I had to do was navigate to Window > Open Perspective > Other... > Remote System Explorer.
Once in the Remote Systems perspective, you will see links to your local files. To create a SSH connection to a remote server (even if it is in the same location as you but requires SSH protocol), just right-click anywhere in that Remote Systems tab and choose New > Connection and then under the General folder, select SSH Only. Fill out the host name or IP address.
If successful, the server will appear as a folder under the Local one. Attempt to navigate below the server's 'SFTP Files' folder and you will be prompted for your user ID and password on that remote server. Say yes to the prompt about trusting the certificate and you are good to go. Your remote files will appear in the file explorer type of GUI in that Remote Systems perspective.
Switch back to your regular local environment in any other perspective in the upper right corner of the Eclipse window just as you normally would.

Eclipse Auto-Upload on Save, Without Aptana

I'm using Eclipse to develop a website, and I don't want to run Apache, PHP, and MySQL on my local computer. I already have a remote Linux server set up to do that. What I want though, is every time I save a file, Eclipse should upload that file to the Linux server. Dreamweaver does an absolutely perfect job at this task, but I prefer many other features in Eclipse.
I am well aware that there are many, many posts on Stack Overflow about this topic. I have reviewed them, but none seem to quite meet my needs. I'll go through all the possibilities I know about, and talk about why they're not quite right:
Aptana - I specifically excluded this in the question's title. Yes, it does what I'm asking for, but if you install it as an Eclipse plugin, it totally takes over your Eclipse. I only want this one feature, not the whole 800-pound gorilla that changes everything.
Remote System Explorer - I want the primary version to be on my hard drive, not the remote server. This is because I want faster file open, and code completion.
GIT or SVN - When I see other people ask this question on Stack Overflow, someone usually answers "use Git or SVN." Well, I'm already using Git. When I want to sync the entire project, and not just iterate on one file, I will do it using Git. But standalone Git is way too slow if all you want to do is see your changes working. I also don't want to see hundreds of meaningless commits. PTP, mentioned below, is a little better and a little faster, but not fast enough.
PTP - This is an Eclipse plugin that not too many people seem to know about. It has the ability to sync a local folder and a remote folder using Git, and it can do it automatically every time you hit save. This is absolutely awesome, but unfortunately a little slow. When I hit save in Dreamweaver, the change is uploaded to the server in less than one second. The PTP Git operation takes 10 seconds on a tiny project, and I bet that wait gets larger with a larger project. I'm a huge believer in super-fast iteration, and all that PTP waiting will really slow me down.
WebDAV and FTP support for Eclipse - It seems like this is no longer actively developed.
FileSync - Pretty neat, but only supports local filesystem folders.
Are there any other options that I've overlooked? Or are my requirements so specific that there's nothing that fits me right. It seems like there would be other people who want exactly the same thing.
This is my suggestion and it is not quick way to do this, but very customizable.
In eclipse you can set external tools.That means, you can set a php/java script file as external program and send some params that eclipse gives you(${resource_loc} ${project_name} ${resource_path}).
So with script file you can login to SSH or FTP or what ever you want and sync your file or project with remote system.
Just in External Tools Configuration window in eclipse you must set Location to /usr/bin/php
and in Arguments, you can set script path with eclipse variables as script args.
At last you should assign some short key to external program IF Possible.
Did you consider set up Samba server on your Linux and work on you local computer but store project in remote directory served by Samba from Linux or use mentioned FileSync to sync local working directory with network directory (which for Windows look like local and thus FileSync should work).
Or Dropbox?
Edited:
You are constrained heavily I see. Maybe you have on remote host rsync? You could write small utility to manage if your local folder changed (for Windows: http://msdn.microsoft.com/en-us/library/windows/desktop/aa365261(v=vs.85).aspx) and then synchronize folders with rsync via ssh (https://www.digitalocean.com/community/articles/how-to-use-rsync-to-sync-local-and-remote-directories-on-a-vps). This would be completely independent from Eclipse.
you can have a try with CodeSync #github (I write it)
or this one
https://github.com/zhwj184/remotedeploy
Now I am in 2021, and most of the above methods cannot work at all.
Finally, I find a small plugin in Eclipse that is very easy to upload the files (may be not auto-load, but is very easy).
Install the "Alibaba Cloud Toolkit" plugin in Eclipse Marketplace;
Using the right-click "deploy" item to deploy the selected files/directory to the remote directory.
There is also a problem. In my eclipse, the inside Terminal is blank (for all terminals including local terminal and SSH terminal), the blank terminal
But the terminal in RSE is ok.
The terminal in RSE
I also tried to uninstall Alibaba Cloud Toolkit, CDT, TM Terminal, etc.
But the inside terminal does not work anymore.
So I use the terminal in RSE now and put its view, as I just want to run my code on the remote server.

Setup eclipse PDT to debug website residing on remote server with Xdebug

I have tried a lot but not been able to understand the steps involved in debugging a PHP website residing on a remote server with eclipse Indigo PDT and Xdebug. Following is my configuration.
Remote:
LAMP, Xdebug(fully setup)
Local:
LAMP, Eclipse PDT with RSE,
My main problem is about the setup that I need to do locally with eclipse to be able to debug the remote website.
Specifically:
Do I need to create a new eclipse project locally? If yes, where should I load the source files from and how? Do I need an exact copy of the source files as on the server?
Do I need to have all the files locally before I can start debugging? I copied only index.php to a local project and started debugging. I received the remote connection when I started debugging the website and could step through index.php, but not after that. If I don't need to have all the source files locally beforehand, how can I set a break point in a file that is reached after 20 function calls?
What other settings need to be setup to link the local and remote projects. Do I need to add a new PHP server? What should be the settings of the debug configuration?
I know about sshfs and tried to set it up using this link:
http://www.docplanet.org/php/how-to-debug-php/
but eclipse took forever to build project files on the server and hung.
I have looked all over. A good link to go with the answers will be appreciated.
Thank you.
I posted the question on eclipse forums too and got an answer:
http://www.eclipse.org/forums/index.php/mv/msg/365474/890896/#msg_890896
So here are the answers:
Yes, you need source files and an eclipse project locally. No debugger delivers source files. I read on SO that for PHP we only need the lines that are being debugged to be same, while for C# the whole project has to be a copy.
Yes, you need the files locally and set your break point in them.
One thing I found is that you don't need to start the debugger like we do with normal projects. Eclipse starts accepting the debugging connection the moment you setup the debugger.
So you just need to open the webpage with debugging enabled and eclipse will catch the connection and let you know.

Eclipse CDT+RSE+PTP: how to set up a synchronized remote project with remote indexing?

This C project I am supposed to work on is taking too long(>5 hours) to do indexing on local, also the building depends on the environment setting on a remote server.
So I am thinking to have the server doing the indexing and at the same time keep a local copy of the project just for the fast editing and browsing. After some search on google, I found that Eclipse PTP5.0 's synchronized remote project is very close to what I want.
But the docs doesn't seem very clear how to set it up. I have tried many times, no success.
I see many places with Remote Tools and RSE as options, which one do I choose? How are they different? Do I have to run rdt-server manually (I don't have the root access on the server)? Is it possible to do this only with ssh without opening another port on the server?
Is there a guide for this kind of setup?
Or, any other ways to achieve this?
Thanks !
EDIT:
on a second thought, synchronise doesn't seem very important to me since PTP is doing it through git anyway. So remote indexing is what I need the most.
Remote Indexing won't speed up indexing. The indexer isn't parallel (yet), so using a larger server won't help.
For help on how to setup a synchronized project see:
http://wiki.eclipse.org/PTP/sync-projects
Feel free to ask questions at ptp-user#eclipse.org.

Creating SVN repository server with XAMPP on windows

For last 3 days I am struggling in setting up my SVN server. I tried several ways and tools but I found always some issue and bug all the files.
I am planning to use the following tools for this project.
For Server and database - XAMPP (Comes with APACHE and MySql)
Version control server - subversion-1.6.16
Version control client - tortoiseSVN
IDE is Eclipse
Following are my queries
1. Is the above combination of tools and softwares is perfect for my project?
2. Is there any open-source software which provides all the above functionalities combined?
3. If anybody of you has already done such kind of project, could you please share with me which are the correct version of softwares I should use to get it worked error free.
If anybody can provide solution for below I can carry on with my current setup also.
My Error Message from server for current configuration : I tried to setup the svn-win32-1.6.16 with my XAMPP installation by copying the two moduels mod_dav_svn.so and mod_authz_svn.so to my apache modules directory and changed the httpd.conf file with Loadmodules of these the so files and set the location also for these. But when i start the server in error logs I get error message like this - "httpd.exe: Syntax error on line 136 of C:/xampp/apache/conf/httpd.conf: Cannot load C:/xampp/apache/modules/mod_dav_svn.so into server: The specified module could not be found."
Following are pre-conditions and configurations prior to this error
Location of SVN - C:/SVN/svn-win32-1.6.16
Location XAMPP - C:/xampp/
Changes in httpd.conf file
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
and for location
# Enter this location in your browser to access the repository
<Location /repos>
DAV svn
SVNPath c:/SVN/svn_repos
</Location>
I have created the repository here - C:/SVN/svn_repos
Is the above combination of tools and softwares is perfect for my
project?
That is impossible to answer, because:
a) we don't know what your project is
b) nothing is perfect
But it is definitely an ok combination of tools. If I were you I would not use XAMPP but Zend Server CE instead! You get a nice web GUI for most php configuration needs.
Is there any open-source software which provides all the above
functionalities combined?
No. These tools are maintained for various target audiences and the combination you're asking for wouldn't make much sense in a bundle.
But of course your IDE (Eclipse in this case) integrates nicely with these tools. 'Integrates' means it plays together, doesn't mean it comes bundled with these things.
If anybody of you has already done
such kind of project, could you please
share with me which are the correct
version of softwares I should use to
get it worked error free.
I used to have such a combination (now I'm on Zend Studio with Zend Server CE) and there is no problem with it. The problem is that you're trying to do something unnecessary and wrong.
If you're using XAMPP, you're on a Windows machine, using .so extensions wouldn't do any good at all, Windows needs .dll extensions.
Why do you want to load such extensions anyways? You don't need those in order to get it all working.
Where are your repositories? Only if you want to host your own repositories do you need to run your own server. If that is the case, look at VisualSVNServer. You just install it, no need for integration with anything.
If your repositories are on a location in the net (more likely) you don't need an SVN server, you just need the client. In that case you're ready to go, no need for php extensions. You can checkout repos, commit, export, branch, tag, etc. From within Eclipse or in your file system with TortoiseSVN.
Try it and get back here, if you still experience problems.