Eclipse - Universal Preferences Across All Workspaces? - eclipse

I like to use several different workspaces, so as to keep everything organized. However, its annoying to have to copy the .settings folder to all my workspaces just because I added a keyboard shortcut. I'm looking for a way to update the preferences of all my workspaces whenever I change the preferences in one workspace. The settings I care about are keyboard shortcuts, code style, fonts, etc.
I have found this plugin which might be useful, but doesn't seem to be exactly what I'm looking for.
Ideally, I could have my settings saved in the cloud somewhere. On startup, Eclipse will check if workspace settings and the settings in the cloud differ, and if so, import them from the cloud. If I change any settings, then these preferences should be exported to the cloud. This way I also have my preferences on my school's lab machines.
Does anybody know a way to make this work? I'm all ears.
Thanks

Short answer: no. The easiest thing is probably just manually configure your preferences on those two or three PCs where you use Eclipse, and move on.
Longer answer: yes, you can copy (and standardize) Eclipse settings (e.g. for a standard configuration across your development shop). Here's a good article explaining how:
http://www.javalobby.org/java/forums/t18678.html
Finally, there's still no easy way (AFAIK) to safely and reliably UNINSTALL plug-ins as of the latest/greatest version (Indigo, Eclipse 3.7). So if you find yourself experimenting with a lot of plug-ins .. some of which you might ultimately wish to get rid of ... then maybe your best bet is installing Eclipse on a VM (say, VBox or VMWare, running Linux or Windows). Use your VM as a little "sandbox" where you can try stuff out, and easily clone (if you like it) or blow it away (if you don't).
IMHO...

Related

How many projects/folders/files can eclipse (the editor) safely handle?

I am always the first one to jump on any latest Eclipse release thinking that it would solve some of the issue that i have with slowness but i am always disappointed. The DLTK thing that keeps running, memory heap issues, internal error occurred ....
The latest version that I have tried is KEPLER
I know that I can close the projects that i am not using, disable validation, remove projects from the build path, hack into their myriad of codes and change settings but really?
I have to admit my workspace has only 5 projects but more than TWO HUNDRED heavy duty folders. within those folders you have for example, Drupal, Wordpress and so on..
I have used visual studio for years with 5 times as much projects without this kind of slowness but that is besides the point. Let's go back to eclipse.
looking at my settings, some people might say: why don't you create a projects for each of those folders? I tried that but the DLTK indexer keeps on indexing every projects in my workspace unless i close them. WOW!!! Create multiple workspace is out of the questions, if i have to do that i will just ignore Eclipse all together.
My hardware is decent and I have SSD Drive and plenty of RAMs.
What is the largest amount of projects or files can Eclipse safely handle? What about the DLTK what are its limitations?
How large is too large?
What doesn't visual studio seem to suffer from the same slowness? Is the problem java related or with the data structure? Can Eclipse handle that amount of projects?
I know that there are a lot of moving parts and answering these questions is not black and white but why is this thing indexing even the stuffs that i am not using?
I would like to get some opinions on how to use this editor effectively?
While the number of projects/files is not exactly "limited" (beside the resources of the host machine), the number of open editors is.
Eclipse 2019-09 proposes by default 99.
Close editors automatically when reaching 99 open editors
The preference to close editors automatically is now enabled by default.
It will be triggered when you have opened 99 files.
If you continue to open editors, old editors will be closed to protect you from performance problems.
You can modify this setting in the Preferences dialog via the General > Editors > Close editors automatically preference.
IDEs are slow by nature because they do a lot.
I would never use eclipse for webdev stuff like wordpress.
You should be leaving your library files outside of your main project as external folders so that eclipse discounts them. That way you can just have the files you need in your workspace.
Also, try closing the projects you aren't working on by right clicking and choosing "close project"
Personally I use vim and FTP to handle this stuff. Eclipse is nice and integrated but very chunky.

Multiple sub-workspaces in Eclipse

I write code in several languages (Python, C, C++, and Java) using Eclipse. Is it possible to designate a directory on my machine (say /home/workspace/) as the "primary" workspace for any Eclipse session, but then to have subfolders, /home/workspace/python, /home/workspace/java, etc., in which I can create new Eclipse projects.
I don't want to have to navigate menus and select different workspaces for each session of Eclipse that I start up. I would rather just always have permission to manipulate any projects from a variety of folders at any time, but I can't find a clear answer about whether this can be done and how to do it.
As I understand your question; You want to have one workspace, but be able to code in several different languages without switching workspace but at the same time keep the projects separated?
First I would suggest you consider several workspaces, I find it convenient to keep settings and projects in separate workspaces. I rarely have to switch language that often.
But. I think what you want to do is to keep several working sets. You create one java working set, one C++ set and associate your different projects with a working set. Then you can minimize the java working set when you are running C++. For working sets you dont need any subfolders on the harddrive.
You might also want to look into Mylyn. Its a great tool for those who often are switching context. It saves the context (eclipse perspective, open files, etc) as associated with a task.
How about setting Eclipse to prompt for the workspace at launch? It wouldn't allow you to work in two languages at once, but should do the trick otherwise.
An Eclipse workspace can contain projects slated for different languages and those projects can live anywhere on your hard drive. There are at least two ways to do what you want. When creating a new project, uncheck the Use default location checkbox and browse to or specify the folder where you want your project to live. If a project already exists import the project into the workspace using the File->Import menu option and then select Existing Projects into workspace. In the next screen make sure the checkbox for Copy projects into workspace is not selected. This will leave the source files in the original folder.
In the Project explorer view, all the projects are going to look like they live at the root level. However you can group related projects into working sets. Then select just the working set you're interested in and all the others will disappear from view.
A warning is in order if you make use of eclipse variables in external tools (and possibly elsewhere). The syntax you use for paths needs to be adjusted. For example with projects outside the workspace this syntax ${workspace_loc:/MyProject/MyFile.txt} is no longer the same as this syntax ${workspace_loc}/MyProject/MyFile.txt

What's the format of an Eclipse preferences export?

An export of the Eclipse preferences looks a lot like a Properties file. Is this correct?
I'd like to share preferences with my team and for that, I need to filter the data (update/remove local paths, etc). Does anyone know any tools for this?
You might want to have a look at Workspace Mechanic for Eclipse:
The Workspace Mechanic automates maintenance of your Eclipse environment by tweaking preferences, adding extension locations, and so on. You can use it to:
Create a consistent environment among groups as large as the entire company, your local team, or even among your own many workspaces
Save time setting up new workspaces
Create tasks that ensure your favorite new preferences are applied to all your current and future workspaces. (This is one of our favorite features!)
If you have project-specific preferences, they will be stored in the .settings directory of you project.
That means you can add them directly in your VCS and share them through version control.
There is no native tool for filter them, but if you are using a Git repo, you can add filter drivers for making sure you ignore any path-specific changes.
Yes.
Preferences in Eclipse are implemented by org.eclipse.core.internal.preferences.EclipsePreferences. The save(IPath location) method will convert the internal structure to a Properties instance using convertToProperties() and then write the result to disk.

eclipse (eclipse distribution/projects/workspaces) synched over several stations with Dropbox/SVN

I am trying to setup eclipse and the project/workspaces to works smoothly and efficiently over 3 different computers (not in the same LAN).
Right now I have to do this in every computer:
install a plugin
customize eclipse.ini
customize prefs (I'll keep prefs.epf inside \eclipse folder and keep it synched with care)
I would like to avoid it so I won't end up with different versions of plugins etc in different computers. In order to achieve this, I have decided the following:
\eclipse distribution
I intend to put my \eclipse distribution under Dropbox. The reason for that is to use the exact same eclipse install in the 3 computers I use.
Projects
Projects (src and all resources etc) are synched by using SVN/Hg (I keep some projects under one, others in the other). No problem here. But the same project is stored in different drive/path in different computers (C:\projects\projectA and D:\projectA for example).
Workspaces
I use a different workspace for each project (or group of related projects). So I run eclipse with
-data \path-to-.metadata
My question is, where do I put worskpace folders, and do I synch them?? I have two options:
I keep workspaces inside Dropbox, this way they are synched automaticaly. But will it work?? As pointed out previously the same project can be in diff drive/path in two computers. This is the approach taken by this stackoverflow guy, but not sure if he had diff. drives etc.
I keep workspaces outside Dropbox, they are NOT synched. My question here is whether the same \eclipse will open -data \workspaceAInComputerA and then later open -data workspaceAInComputerB having both same names, projects etc but being totally separate workspaces.
It sounds a bit convoluted maybe but I think it's worth setting it right for long term usage. Anyone can recommend a setup??
thanks
ps: I don't want to keep taking a usb with me so don't suggest any 'portable eclipse' thing please!
This guy seems to have put his workspaces in Dropbox and it seems to be working for him. Personally, I'm putting the Entire eclipse directory + some sdk's in dropbox - we'll see how that goes!
UPDATE: This went horribly wrong for me - just going to use svn/git

Painless integration of Eclipse with Vim?

Has anyone managed to get Vim integrated into Eclipse painlessly? I just want to use Vim for the editor while retaining the general Eclipse interface. I have tried using Eclim plugin but the editor seemed to crash more often than work (the site said that the editor replacement functionality is still beta).
On the flip side, is there any IDE which matches Eclipse's functionality—mainly the integration with SVN, ant, etc.—and is also able to use Vim?
I mostly use eclipse for SAS SCL, Java and Javascript programming and find the eclipse editor too "mouse-y".
I'd also like, in a perfect world, to use vimdiff as a diff viewer for SVN (we use TortoiseSVN) while checking for diffs or conflicts during merge etc. I admit I havent spent a lot of time trying to get these things to work. I feel guilty about spending too much time on potential wild-goose-chases while my other team members are working away at their code, perfectly content with all that Eclipse has to offer.
Edit: Just found this while desperately browsing around: Vim plugin. Any experience using this? From the claims on the site, it sounds perfect.
I've been using Vrapper for about 2 months and it works great. It is simple to install, and makes life much easier.
It doesn't integrate Vim with Eclipse, it just emulates Vim's behaviour so you don't need to have Vim installed.
EDIT:
I have been experiencing errors while refactoring methods in Eclipse (only when Vrapper was installed) so I stopped using it.
Now I'm using ViPlugin (very similar to vrapper). It works great (especially since version 2.0) and I recommend it, but it is not free (but cheap and has a trial version)
Edit
As the new post mentioned, if we always use the rename dialog to rename, it can be a work around for Varpper.
Preferences > Java > and uncheck "Rename in editor without dialog"
http://sourceforge.net/apps/trac/vrapper/ticket/96
The consensus seems summarized in that Wanted: VIM in Eclipse article.
No decent Vi plugin exists for eclipse, except viplugin which does not offer macro mechanisms.
Whereas on the NetBeans side... jvi does a killing job ;)
WOW, this is the one!
http://vrapper.sourceforge.net/home/
It just came out a few months ago, and seems much better than the other alternatives...and it is open source.
I use Viable, which is a new plugin for Eclipse providing Vi emulation. It is very similar to vrapper, but it doesn't have the same problem as vrapper with refactoring (as cysiek10 described.)
It's got some pretty cool features which none of the other Vim emulators in Eclipse seem to have (though jvi for NetBeans has a few of these) such as:
Visual block mode
External filters and commands
Command history
Window splits (love having this one!)
It is pay; however, you can try the full version for free just like viPlugin.
I never had much luck with vim integration into any IDE, be it Eclipse, Visual Studio, NetBeans, or sth else. Instead when stuck using an IDE, I just make the IDE launch a custom program: which passes the file onto vim using the client/server feature.
I.e. vim --servername SomeName --remote-{choice of how to open it: splits or tabs} {extra args like filename and +line#}
I just tried Eclim http://eclim.org/ and found it really good. I can still edit inside Vim, and enjoy most of the benefits of the eclipse IDE inside Vim (such as better omni completions).
The best thing about Eclim is we are still using the original Vim, so I can enjoy all the existing benefits (my own functions, macros, etc.) while having the extra convenience provided by an IDE.
http://vimplugin.org, which I found over the weekend was the closest I could come to a nice integration. Unfortunately when I opened more than 2 files in my IDE, it made my entire workstation unresponsive. And I didn't even use the "new process" option for the editor.
So bottom line it does seem that there is no decent integration available yet. Although with some it's close. I'm rooting for vimplugin to stabilize and I'll also some time (when I'm not eating up my employer's time like now) play some more with hte plugin to see if I can make it usable.
I tried Eclim and didn't like it at all. I ended using this plugin called "viPlugin," which actually works well enough to warrant using it every day. Here is the site for viPlugin:
http://www.viplugin.com
The big downside of this plugin is that it's not free. I paid for it, and I think it's worth it.
...is there any IDE which matches Eclipse's functionality -- mainly the integration with SVN, ant, etc. -- and is also able to use Vim?
IntelliJ IDEA has a very good VI plugin, but I didn't like it, although the plugin did it's work.
My problem was I have formed habits to use IDEA and those were harder and my experiment didn't it through. So I uninstall the plugin, and learned idea shortcuts instead.
But, is not free :(
Vrapper does the trick.
After installing Vrapper you need to remove CTRL+W key binding in Eclipse settings. Or else it keeps closing the editor when you actually meant Backspace.
It also comes with "surround" and split window plugins. Be sure to install those.
This is not 100% Vim, though. And nothing is 100% Vim except for Vim (doh!). You will find some commands missing (or you may not, depending on how "vimy" you are). But vrapper has :vim command, which opens up Vim editor with the current file in the buffer and places your cursor in the exact location in the file. This way you can continue editing from where you left off. When you're done in Vim just close the editor, and you return to your eclipse editor.
I hope this was helpful.