Every once in a while, I’ll post up some new headaches, awesome-ness, or just differences that have come up for me using Java(1.4.2)/Eclipse (3.1.2) and C#(1.0)/Visual Studio 2003. Here are some to start:
-Eclipse’s refactoring and perspectives are really helping me fly through the code and find what I need to find.
-Visual Studio 2003’s (VS2003) CTRL+Tab is much easier than Eclipse’s CTRL+F6 to move around open files.
-Eclipse’s support for JUnit testing, CTRL+X or CTRL+D, then T.
-VS2003’s support: a separate application, blech.
Parenthesis and curly braces:
-Eclipse auto closes it for you, VS doesn’t.
-VS2003 auto indents after you close it, Eclipse doesn’t.
Text navigation; CTRL (+ C) left and right
-Eclipse selects by word-“humps” i.e. thisClass has 2 humps, oneTwoThree has 3, etc.
-VS selects by word alone.
Verbatim string literals:
-They are a billion times prettier regular string literals. C# has them, Java doesn’t.
CSharpSqlStatement = @“SELECT *
FROM table1 t1
WHERE t1.column1 = ‘seacrhText’
ORDER BY t1.column1″;
javaSqlStatement = “SELECT * “
+ ” FROM table1 t1 “
+ ” WHERE t1.column1 = ‘seacrhText’ “
+ ” ORDER BY t1.column1″;
Try copy and pasting a statement from the SQL editor over to your code, then formatting it so Java can understand it. With C#, Copy and Paste inside parenthesis and let it know its a string literal with a ‘@‘.