Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

trying eclipse/wsad - I miss IntelliJ

 
paul wheaton
Trailboss
Pie
Posts: 21484
Firefox Browser IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm on a new gig and the company is using websphere. They got in the first copy of WSAD and I'm the lucky guy that gets to learn it.
I have about 45 minutes of experience with it so far and I already miss IntelliJ.
I created an EJB and added a method to the remote interface. When I typed in "throws RemoteException" it underlined it in red. I waited. IJ would pop up a thing telling me "press Alt-Enter to import" . WSAD didn't do that. So I right clicked. After cruising through some menus I selected something about inserting the import. It imported something else. I had to go through that menu three times before it imported the right thing. Then my statement was still red. Apparently, stuff stays red until you save the file. IJ would un-red as soon as all is well.
I had heard WSAD was better than IJ, but now I'm not so sure.
Are there some plug-ins I'm missing?
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24211
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, about that one particular "import" thing; once Eclipse has figured out that you've named an unknown class, it will indeed offer you the chance to auto-import it. It does seem to take a bit longer to figure out that this is appropriate, though. Anyway, as soon as Eclipse figures out what's going on, you can get a menu of intention actions bt clicking on that little red "x in a circle" icon, one of which will be the import you want. There's probably a way to set up a keystroke for this, but I'm no expert.
In Eclipse 3 (which I'm using when I use Eclipse) Alt-Enter pops up the menu, just as in IntelliJ, although as I said, you seem to have to type more in Eclipse before it figures out what's going on.
WSAD is probably better in that there are more plug-ins to do tedious tasks -- deployment, packaging, etc. The one real weakness of IntelliJ is the very poorly-documented plug-in architecture. But as far as editing code -- I really can't see anyone trying both for any period of time and not preferring IntelliJ IDEA.
 
Jeff Langr
author
Ranch Hand
Posts: 799
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ernest Friedman-Hill:
The one real weakness of IntelliJ is the very poorly-documented plug-in architecture. But as far as editing code -- I really can't see anyone trying both for any period of time and not preferring IntelliJ IDEA.

I've used both Eclipse and IDEA extensively. For me it's almost a tossup. The ability to set up perspectives and views in Eclipse is very nice. The refactoring support in IDEA is more extensive. The lint tool in IDEA is nice.
From a feature standpoint, and the general "works the way I expect it to work" standpoint, I agree, IDEA beats out Eclipse, but not by a large margin.
I prefer Eclipse, mostly because it's free (IDEA is now $500 list for a single user. Ouch; it's gone up.). Also, I've had severe problems with IDEA and memory management at two different sites (I think I was on various 3.0 versions up to 3.0.4 in both places), so much that it became unusable in one place.
Given the plugin situation and rapid pace of improvement shown by Eclipse, I think Eclipse has the best future.
-Jeff-
 
Jeff Langr
author
Ranch Hand
Posts: 799
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ernest Friedman-Hill:
you can get a menu of intention actions bt clicking on that little red "x in a circle" icon, one of which will be the import you want. There's probably a way to set up a keystroke for this, but I'm no expert.

That's referred to as the Quick Fix button. The keystroke is Ctrl-1, analogous to Alt-Enter in IDEA (if my memory is correct). It works in a lot of contexts; for example, you can hit Ctrl-1 while on a local variable name and do an inplace rename.
-Jeff-
 
Jeff Langr
author
Ranch Hand
Posts: 799
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A question: when I used WSAD briefly, Eclipse 2.x was available but WSAD was based on Eclipse 1.0 (which was a half-complete IDE at that point). What version of Eclipse is WSAD up to?
-Jeff-
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Paul, with Eclipse and WSAD, ctrl-1 and ctrl-space are your best friends
Place the cursor right after "NotYetImportedClass" and press ctrl-space --> Eclipse will auto-import the class or provide a pop-up list of alternatives if the class name matches multiple classes in the project's classpath.
Ctrl-1 is a more generic, "quick fix" shortcut, which provides a context sensitive pop-up menu for things such as "Create a class", "Create an interface", etc.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34401
346
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you have a lot of things that you want to import at once, you can do ctrl-shift-O. That's the shortcut for "organize imports."
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Jeanne Boyarsky:
If you have a lot of things that you want to import at once, you can do ctrl-shift-O. That's the shortcut for "organize imports."
Thanks, Jeanne. You've fulfilled my day-to-day learning Eclipse shortcuts quota -- I hadn't learnt that one yet
 
Jeff Langr
author
Ranch Hand
Posts: 799
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My favorite, recently-learned Eclipse keystroke is Ctrl-hover+F2. Press the Ctrl key, then hold your mouse over a method call until you get the yellow hover code box. Release the ctrl key, then press F2.
You get a semi-sticky hover box that shows the contents of the target method. It provides scrollbars if needed, can be sized, and supports cut & paste. It disappears when you click outside it.
You get the Javadoc and method signature if you just do a hover+F2.
-Jeff-
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Jeanne Boyarsky:
If you have a lot of things that you want to import at once, you can do ctrl-shift-O. That's the shortcut for "organize imports."

And for a single import of the class under the cursor, use Ctrl-Shift-M. In contrast to Ctrl-Space, the cursor may be anywhere in the name; it will also replace a fully qualified name with an import.
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Lasse Koskela:
Ctrl-1 is a more generic, "quick fix" shortcut, which provides a context sensitive pop-up menu for things such as "Create a class", "Create an interface", etc.

Actually, it's also the shortcut for "quick assist", which will be active when there is no error in the current line. It provides such helpfull things like "assign to new variable", "join declaration and assignment", "remove surrounding if" etc. pp.
 
Jeroen Wenting
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's probably been a while since you last tried another editor Paul, or you'd remember that there's always a learning curve involved
I made the deliberate choice to move to Eclipse and remove JBuilder4 at the same time (wanted better XML etc. features and couldn't afford JBuilder9 at the time).
That way I forced myself to not go back to the well-known JBuilder environment when running into something I didn't yet know how to do in Eclipse, so I had to find out.
And indeed I'm still learning things to this day
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic