Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipse-dev] [ide-dev] Why we dropped Eclipse in favour of IntelliJ | Java Code Geeks

I don't think that's what we're saying. You would need to be smart about
it. But don't offer suggestions that aren't valid. That takes a lot more
work but it is getting to be what users are expecting from their IDEs.

On 2013-09-22 5:48 PM, "Miles Parker" <miles.parker@xxxxxxxxxxx> wrote:

>
>To be fair, you can simply exclude java.awt.* from imports altogether..
>
>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
>> _______________________________________________
>> ide-dev mailing list
>> ide-dev@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/ide-dev
>
>_______________________________________________
>ide-dev mailing list
>ide-dev@xxxxxxxxxxx
>https://dev.eclipse.org/mailman/listinfo/ide-dev



Back to the top