[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ide-dev] Why we dropped Eclipse in favour of IntelliJ | Java Code Geeks
- From: Robin Stocker <robin@xxxxxxxxx>
- Date: Tue, 24 Sep 2013 22:20:25 +0200 (CEST)
- Delivered-to: firstname.lastname@example.org
- Thread-index: aLflgcF4ofbDfFkFGtNyzy4vfdI56Q==
- Thread-topic: Why we dropped Eclipse in favour of IntelliJ | Java Code Geeks
Miles Parker wrote:
> To be fair, you can simply exclude java.awt.* from imports
Type filters are not a satisfying solution for various reasons:
* The user needs to know about them and where to configure it. You
already lost most of the users with this.
* It doesn't work when your project also needs to use AWT, SWT
(org.eclipse.swt.widgets.List) or other libraries including a List
type - you would still have to manually select the correct one.
* There are more cases than java.awt.List.
Here's the bug report for JDT:
> On 2013-09-22, at 7:36 AM, Robin Stocker <robin@xxxxxxxxx> wrote:
> >> http://www.javacodegeeks.com/2013/09/why-we-dropped-eclipse-in-favour-of-intellij.html
> > The problem with List is still there. Having "Organize Imports" as
> > save action, type the following:
> > List<String> l = new ArrayList<String>();
> > Now save. What happens: ArrayList is automatically imported because
> > there is only one possibility. Good.
> > But List is not. Now invoke quick fix on it. The proposals are:
> > 1. Import 'List' (java.awt)
> > 2. Import 'List' (java.util)
> > Not helpful. Just for fun, select the first entry. The result
> > is an error, because java.awt.List is not generic.
> > Even if it was generic, it would still be an error, because
> > ArrayList is not a subtype of java.awt.List.
> > So the right thing to do in this case would be to just import
> > the only valid possibility, java.util.List.
> > IntelliJ probably gets this right, and I can imagine it being
> > one of the reasons people prefer it.
> > Can we really not do any better?
> > I know about Code Recommenders, but last time I checked, it
> > only reordered JDT's proposals. IMO the proposals leading to
> > errors should not be proposed in the first place so that the
> > extra key presses for invoking quick fix are not necessary.
> > I would be surprised if the above was not already in Bugzilla
> > somewhere, but I couldn't find it right away. I'll report it
> > in case it's really not yet known.
> > Regards,
> > Robin Stocker