Java developer's blog

Menu

Eclipse vs. Visual Studio

Introduction

While this topic seems to be oranges to apples comparison from the first glance, if you try to think about this, you’ll notice that this comparison is not so stupid as it seems from the beginning. Both Eclipse and Visual Studio are large, mature IDEs, both support many languages, both have very active community, both are mostly oriented towards devlopment for one of the two largest development platforms in the world: Java and .NET respectively. This last item brings another similarity: Java and .NET are very similar platforms by themselves by loads of factors, Java and C# are very similar languages that borrowed features from each other during all their history. So to some extent it is actually possible to compare Eclipse and Visual Studio, if they are used for very similar purposes.

For me as Java developer it was always tempting to draw back the curtains and look to the other world to see, what people do there, compared to what is done in my world. From time to time, while reading the Web, I notice some articles and forum topics that try to compare Eclipse and Visual Studio. What bugs me the most is that it is always taken for granted that Visual Studio is hands down full-blown IDE with thousands of features included out of the box, while Eclipse is poor man’s experience that has not so much included, but sometimes you can even find some plugins and have functionality similar to Visual Studio. One day I decided to make a comparison of the features of both IDEs. Because I know Eclipse quite good, but have no experience with Visual Studio, I’ve taken all the information from the public docs. For Eclipse I was using http://help.eclipse.org and for Visual Studio I’ve taken everything from MSDN. The comparison appeared quite lengthy. At the end I collected some other users’ experience with the two IDEs. If anything is incorrect in this article, I’m open to hear and correct all the mistakes. So let’s go.

Import order list
New…
New Static…
Edit…
Remove
Up
Down
Import…
Export…
Number of imports needed for .*
Number of static imports needed for .*
Do not create imports for types starting with a lower case letter

Content Assist / Code Completion

Show completion list after a character is typed
Place keywords in completion lists
Place code snippets in completion lists
Committed by typing the following characters
Committed by pressing the space bar
Add new line on enter at end of fully typed word
Pre-selects most recently used member

Quick Fix

Add missing package declaration or correct package declaration
Move compilation unit to package that corresponds to the package declaration
Remove unused, unresolvable or non-visible import
Invoke ‘Organize imports’ on problems in imports
Create new class, interface, enum, annotation or type variable for references to types that can not be resolved
Change visibility for types that are accessed but not visible
Rename to a similar type for references to types that can not be resolved
Add import statement for types that can not be resolved but exist in the project
Add explicit import statement for ambiguous type references (two import-on-demands for the same type)
If the type name is not matching with the compilation unit name either rename the type or rename the compilation unit
Remove unused private types
Add missing type annotation attributes
Create new constructor for references to constructors that can not be resolved (this, super or new class creation)
Reorder, add or remove arguments for constructor references that mismatch parameters
Change method with constructor name to constructor (remove return type)
Change visibility for constructors that are accessed but not visible
Remove unused private constructor
Create constructor when super call of the implicit default constructor is undefined, not visible or throws an exception
If type contains unimplemented methods, change type modifier to ‘abstract’ or add the method to implement
Create new method for references to methods that can not be resolved
Rename to a similar method for references to methods that can not be resolved
Reorder or remove arguments for method references that mismatch parameters
Correct access (visibility, static) of referenced methods
Remove unused private methods
Correct return type for methods that have a missing return type or where the return type does not match the return statement
Add return statement if missing
For non-abstract methods with no body change to ‘abstract’ or add body
For an abstract method in a non-abstract type remove abstract modifier of the method or make type abstract
For an abstract/native method with body remove the abstract or native modifier or remove body
Change method access to ‘static’ if method is invoked inside a constructor invocation (super, this)
Change method access to default access to avoid emulated method access
Add ‘synchronized’ modifier
Override hashCode()
Open the ‘Generate hashCode() and equals()’ wizard
Correct access (visibility, static) of referenced fields
Create new fields, parameters, local variables or constants for references to variables that can not be resolved
Rename to a variable with similar name for references that can not be resolved
Remove unused private fields
Correct non-static access of static fields
Add ‘final’ modifier to local variables accessed in outer types
Change field access to default access to avoid emulated method access
Change local variable type to fix a type mismatch
Initialize a variable that has not been initialized
Create getter and setters for invisible or unused fields
Remove unneeded catch block
Remove unneeded exceptions from a multi-catch clause (1.7 or higher)
Handle uncaught exception by surrounding with try/catch or adding catch block to a surrounding try block
Handle uncaught exceptions by surrounding with try/multi-catch or adding exceptions to existing catch clause (1.7 or higher)
Handle uncaught exception by adding a throw declaration to the parent method or by generalize an existing throw declaration
Add a missing JAR or library for an unresolvable type
Open the build path dialog for access restriction problems or missing binary classes.
Change project compliance and JRE to 1.5
Change workspace compliance and JRE to 1.5
Add cast or change cast to fix type mismatches
Let a type implement an interface to fix type mismatches
Add type arguments to raw references
Complete switch statements over enums
Remove dead code
Insert ‘//$FALL-THROUGH$’
Insert null check
For non-NLS strings open the NLS wizard or mark as non-NLS
Add missing @Override, @Deprecated annotations
Add missing Javadoc comments
Add missing Javadoc tags
Suppress a warning using @SuppressWarnings
Throw the allocated object
Return the allocated object
Add @SafeVarargs annotation for heap pollution warnings (1.7 or higher)
Remove invalid @SafeVarargs annotations (1.7 or higher)
Remove redundant type arguments (1.7 or higher)
Add inferred type arguments (1.5 and 1.6)

What Other People Say

Quick Fix – Assign to local variable. Write the RHS of an assignment statement, then Ctrl+1 to have the IDE suggest/insert a LHS.

Curly brace auto-completion. When I type the opening brace and hit enter, automatically indent one tab and add a close brace on the following line.

Ctrl-Click for type definition hyperlinking. Basically, a mouse gesture for Visual Studio’s Go To Definition F12. I’ve been told there is an extension for this??

Ctrl-Click for externalized strings (resources in .NET?). In Eclipse, when I Ctrl-Click on an externalized message referenced as a static String, I can jump to the properties file directly.

“Flexible” Go To Definition. In Eclipse, if I write some code that calls a method, and I don’t have the particular overload parameters sequenced correctly, I can still (typically) jump to the definition of one of the overloads. Since they’re typically clustered together in the target type, this is a poor man’s way of getting around reading the Javadoc.

(Speaking of Javadoc), Hover over a method to see its NDoc documentation. Reading the commented XML syntax on a method doesn’t do it for me.

Link With Editor / Show In. When I’m jumping around using Go To Definition, I quickly lose track of where (in the resource tree) a particular class is. In Eclipse, I can toggle and untoggle Link With Editor to highlight the resource in Package Explorer. How do I select the current editor’s file in Solution Explorer?

Synchronize View. This one is a HUGE hole. How the hell do you .NET people sync your code in a sane way??

Multi-Page Editors. I’ll qualify this one a bit by saying that I’ve seen the implementation details of multi-page editors in Eclipse, and there are some definite issues. But the functionality is critical when you have an XML document which also has a graphical editor. (Entity Framework conceptual models, I’m lookin’ at you.) Gimme a synchronized two-tab editor so I don’t have to keep doing Open With, closing the other editor (can’t have both open at the same time, another FAIL), etc.

Outline View in the XML editor. ‘Nuff said.

Collapse All / Expand All. Solution Explorer needs these badly.

File -> Restart. After I install a Visual Studio Extension, I need to restart. Please make this one click, thanks.

Workspaces. I really don’t know how to explain this one. You can see one of my complaints (relating to Team Explorer) in this post. Another example is that of “recent solutions”. Please just keep my last solution open? What am I missing here? I need to have separate “threads” of work that are preserved somehow, so I can easily switch between conceptual projects in my daily work.

With Quick Access you can navigate to almost any part of the IDE using the keyboard. Yes, that can be done in Visual Studio also but you need to learn the shortcut to each view: Ctrl+Alt+J to go to the Object Browser; Ctrl+Alt+L for Solution Explorer, etc; or use generic window switching shortcuts (like Ctrl+F6 to go to next window one by one).

In Eclipse, you only need one shortcut: Ctrl+3 to open the Quick Access tool.

The Quick Access tool hat allows you to just start typing the name of any command, view, perspective, menu even source files! and it will auto-complete and suggest alternatives.

Quick Access:

Will remember abbreviations and your most frequent accessed items and progressively adapt to the way you use it.
Will also allow you type PascalCase abbreviations: You want to go to the Data Source Explorer view? type DSE and it will show up as the first option.
It will also show the keyboard shortcut for each item as a learning aid.

2) Missing from VS:

Ctrl+click on a method name to go its definition;
Auto brace complete (for C#) – but, to be honest, sometimes is annoying;

3) Notice how Visual Studio remembers the layout of the IDE (open windows, positions, etc) that you used the last time the debugger was running? And how it switches between that and the “non debugging” IDE layout automatically.

Eclipse does the same with Perspectives. Only that you can fully customize them not only for debugging and not debugging, but you can create several layout with different IDE configurations and switch between them with a simple click.

Want to go to the debugging layout while not debugging?. Just click the on the Debugging Perspective toolbar button.

Want to invent a new layout with no editors and only the Package Explorer and the Javadoc view are visible? Move your windows as you want and save it as a new perspective.

It is a great way of switching your IDE appropriately when your mind is also switching from one kind of task to another.

4) I assume you refer to the out-of-the-box Eclipse vs. out-of-the-box VS (otherwise, there are always plugins that add extra features).

Missing from VS:

Ctrl+click on a method name to go its definition;
Auto brace complete (for C#) – but, to be honest, sometimes is annoying

Conclusion

From what I’ve found so far, there is no feeling that Eclipse lacks any features compared to VS. Furthermore, seems that Visual Studio sucks at every single point of comparison. Visual Studio looks like a dumb text editor compared to Eclipse. So called “Intellisense” that is supposed to be the most intelligent code completion utility, in reality is just a children’s toy compared to what Eclipse has built in. If after that you still think that Visual Studio is superior in terms of features… Well… Maybe I missed anything. Just tell me I was wrong.

Now the question is: how in the hell is it possible that one of the largest corporations in the world with so much money cannot even come close to free open source product that is developed by community? Does it mean Microsoft just CAN’T do more? Even if it had unlimited money and resources? Does it mean that Microsoft just doesn’t care, if the cashflow goes on anyway?

17 thoughts on “Eclipse vs. Visual Studio”

Totally on my mind too. I code in Eclipse CDT at work and I started doing a toy project at home in Visual Studio 2013. Man, they just don’t compare. Eclipse is MUCH better from a code-writing perspective. The only area were Visual Studio wins IMHO is debugging. At least on Linux, the Eclipse C++ debugger is a joke compared to Visual Studio.

@Trevor Thanks for you comment on CDT. I don’t have much experience with CDT, I was just comparing from Java point of view: VS/C# and Eclipse/Java. Good to know that even C++ has much better support in Eclipse. Some time ago I was writing a small project with CDT and it was very limited compared to JDT. Seems that situation has changed for better since that time.

@Fede Good luck with debugging, refactoring, code completion, history, code hierarchies, etc, etc, etc of C# code in Notepad ;)
If C# is so great language for you that you don’t need an IDE, then why do you even need a computer? Write you programs on a paper!

My point is that I prefer MS to be working on improving C# and .Net and leave the IDE as it is. I don’t care about the IDE as long as I can produce HIGH QUALITY code and solutions because the Framework and Language enable me to.

@Fede There is soooo much else in Eclipse except “making convoluted hacks in order to do anything”, you can’t even imagine. 95% of what is written in this article is applicable to both languages. So please leave your comments about C# vs. Java aside. This is IDE comparison, and VS is not even comparable to Eclipse. You cannot code in VS as you can code in Eclipse. Period.

Seriously? There are so many errors in this comparison its pathetic. Learn VS Before you comment on it. Almost Everything you mention can be done in VS so this only proves you dont know how to use it. As I said pathetic.

Strange that official documentation does not mention all these things, isn’t it? Remember that I did not use my Eclipse knowledge, I just used the documentation. Furthermore, I’ve double-checked all the missing features on Stackoverflow and other open discussions. I even posted some workarounds for missing features. I posted many opinions of other people, who had experience with both IDEs. Your argument that “this sucks” is not relevant. Go prove I was wrong, only then I’ll believe.

What about VS 2013? I think it added features out of the box that were missing, and also that there are some impressive features it has and Eclipse does not.

For example:
– Can you examine return value in debugger?
– Can you peek definition?
– Does Eclipse saves your settings in the cloud?
– Do you have intellitrace equivalent in Eclipse? Can you debug an (equivalent of) intellitrace trace on another machine, like you can in VS?
– Can you debug using code maps?
– Can you auto-generate sequence diagrams?

I didn’t use Eclipse lately, but I remember it being very slow. VS 2013 on the other hand, is blazingly fast.

I haven’t seen 2013 version, maybe I will have a look later. As for Eclipse being slow, there are currently 2 platforms v3 and v4. I use the last version from v3 platform – 3.8. It is as fast as I can only imagine. Small tasks like code completion, running something, opening a class and so on take from 0.1 to 1-2 seconds (this is just my feeling) more complex tasks like large refactorings can take maybe 3-5 seconds. The key thing is that you can control how much memory Eclipse is allowed to take in eclipse.ini. For large projects I use 1 GB and it is always more than enough.

Regarding the features you mention:

I’m not aware, how this can be done in Eclipse. That is a real benefit, I agree.

What is peek definition?

Easily. Just point Eclipse to save its settings in your Dropbox folder. But why do you want to save them in the cloud, if you have version control systems? :)

What is intellitrace?

What is code maps?

Yes, with a plugin. And class diagrams too. They will even update automatically on the fly. See http://www.objectaid.com

First to thank you for taking the time to do such an in depth comparison.
I wanted just to let you know from my experience as C# Programmer that there’s a key combination to reformat the code without having to select all the code before:

If you look at Visual Studio features you have to clearly state which programming language you use. There are huge differences in IDE features between C# and Visual Basic. Microsoft followed two different strategies:

The C# team focused on a new, clean language with modern features and a rather simplistic IDE targeting the academic developer, who is pleased with syntactic sugar.

The Visual Basic team focused on productivity of the development process targeting the workers among the programmers, who want to receive as much support by the IDE as possible to quickly get their work done.

Therefore the C# IDE hase usually been lagging two versions behind the VB IDE, while VB language features lagged behind C#.

Interesting article – Think there’s plenty of people out there who appreciate the type of comparison.

Thought I’d pitch in as I use both Java and .NET for different clients: I often use both Eclipse and VS (although rarely at the same organisation!). Thought I’d could give a more balanced perspective. You’re a Java & Eclipse person – there’s nothing wrong with that; many commenters appear to be VS & .NET-ers though and I think there’s more caustic discussion there.

It’s great to have a side-by-side comparison but there’s a lot of the functionality and features from Visual Studio in addition to your lists. There’s a number of features from, say Ultimate edition that perhaps not everyone gets to play with! In particular intellitrace and the performance tools from the analysis side, and the architectural tools integration on the design side.

Don’t get me wrong – VS doesn’t match up to Archimate in my opinion but its tools integrate well. CodeLens is another good example but there’s quite a few more.

There are a number Eclipse plugins that do some of these things but not all (which is probably why Ultimate costs > 12k GBP for a single seat license)…but then Java works a little differently, and the platforms it generally runs on are very different!

After running Eclipse on a pretty fast machine on Kali and VS on W8.1 Enterprise I don’t see much difference in IDE performance for massive multi-project applications either. I have noticed performance differences in the root frameworks though.

I’ve always thought that developers shouldn’t really have a preference between either framework but I would say there there’s a clear difference in the level of productivity however that’s kind of irrelevant…I would never consider using Eclipse for .NET/Mono and I haven’t seen anything for Java on the Visual Studio side – lets try and forget all about J++ and J# as soon as we all can :)

For me, Java & Eclipse are extremely useful for specific scenarios and I don’t think its fair to discount it as other commenters have, yet you’ve severely underestimated the capability of the other IDE (even for VS 2012).

* Install like 40 programs, which the only one I need for my career is ASP.NET.
* Uninstall is a pain in the ass, removing each one (like 40 times clicking).
* the jsp, servlets, jsp is easier to me, than aspx write some shit then page load then I don’t know is confusing as hell learning that shit.
* If I write 50 lines of code in JAVA web application, multiple per 10 and you have the C# code. Plus all the confusion mentioned before .

I hope when I will graduate and begin to work in a company, to never see .NET in my life.
PD: even the teacher from JAVA explains well step by step Netbeans, but the other teacher…..next.