Re: Oracle buys Sun, owns Java
On Tue, 21 Apr 2009, Arved Sandstrom wrote:
Don't ask me why, but this thread got me to thinking, what would I do if
Eclipse/NetBeans/IDEA disappeared overnight? In other words, how would I
regain some of the advantages those IDEs give me?
1) search for a string in all files of a given type - "find" with "grep
-n" gives me exactly the information I need, faster than in the IDE,
easier to specify exactly what files I need to search, and in a better
output format for my purposes;
As well as a file search like this, Eclipse has a 'java seach' which lets
you do things like specifically search for declarations, or for
invocations, or whatever. That's very hard to do with things like grep.
That said, i don't use it much - the file search is generally enough.
2) The ever popular Cmd-Shift-r (I guess Ctrl-Shift-r on Windows) for
"Open Resource" - since I'd no longer have the IDE anyway, all I'd
really want to retain is a similar capability to quickly locate possible
files by a prefix..."find" would do the trick with no real time wasted;
Control-shift-T does something similar for types instead of resources. It
differs from control-shift-R in that it searches inside JARs and so on as
well as your files. If you have a decompiler installed, this is
particularly useful.
4) version control operations - I already don't do any Subversion
operations through Eclipse;
Eclipse has a decent diff viewer - do sub-IDE editors have those?
6) producing a call hierarchy for a method - "find" with "grep -n", or
in some cases some other options, and judicious choice of grep pattern,
is also superfast at telling you what you need to know;
No, it is an order of magnitude slower and more awkward than doing it in
Eclipse.
Eclipse does type hierarchies similarly to call hierarchies too.
7) renaming a method - quick shell "for" loop with sed editing in place.
Dangerous you say? No more dangerous than a carelessly crafted rename in
Eclipse.
Absolute poppycock. If you tell Eclipse to rename a method, it does it,
fixes all the overrides and call sites, and simply doesn't get it wrong.
Also:
- A pretty good debugger, integrated with the editor
- Autocompletion
- Automated refactorings, although 'extract method' and 'rename' are the
only ones i use frequently
- The ability to hit F4 (or whatever - i can't actually remember, it's all
in my fingers!) when the cursor is on a method, variable or type jump to
its definition
- Automatic fixes, like 'implement all missing methods', 'add cast',
'define method', 'create field', etc
I'm sure I can think of more. Point of the exercise being, if Eclipse
3.4 or NetBeans 6.5 (which are the versions I use at present)
disappeared tomorrow, I would not be inconvenienced. I don't mean not
_seriously_ inconvenienced, I mean at all.
All you've proven is that you don't use the too properly.
tom
--
unconstrained by any considerations of humanity or decency