More Intellisense

Coming from a VB background, if I declare a String in the IDE as string (note the lower case s) it automatically changes it to an upper case.
Idea has problems with this sort of thing.
e.g arraylist test=new arraylist(); Idea says Cannot resolve symbol 'integer', 'arraylist' If it can't find an exact matching class, why doesn't it do a case insensitive search after to look for one? On finding one, Idea could then automatically change it to ArrayList test=new ArrayList]]>();
or fix it on Alt-Enter if there is more than one option.

I thought I'd poll other peoples opinions before putting it in the bug tracker..

12 comments
Comment actions Permalink

Idea will correct class name during class name completion (control + alt
+space)

opticyclic wrote:

Coming from a VB background, if I declare a String in the IDE as string (note the lower case s) it automatically changes it to an upper case.
Idea has problems with this sort of thing.
e.g arraylist<integer> test=new arraylist<integer>();
Idea says Cannot resolve symbol 'integer', 'arraylist'

If it can't find an exact matching class, why doesn't it do a case insensitive search after to look for one?
On finding one, Idea could then automatically change it to
ArrayList<Integer> test=new ArrayList<Integer>();
or fix it on Alt-Enter if there is more than one option.

I thought I'd poll other peoples opinions before putting it in the bug tracker..


--
Best regards,
Maxim Mossienko
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0
Comment actions Permalink

Seems you forgot Java is case sensitive but VB is not. You can declare "integer" type if you want so no way it will "convert" automatically. You need to force it to do.

0
Comment actions Permalink

Ctrl-Alt-Space seems to be case sensitive too.
In the case of some fool declaring "integer" type then the popup would give you options.
Just as you get options when it is ambiguous about which class to import

0
Comment actions Permalink

In IDE Settings -> Code Completion, you can change the case sensitivity of completion from "First letter" to "None" and that will probably do what you want.

0
Comment actions Permalink

Excellent.
That should really be the default action.

The time for popup after dot shouldn't be 1000ms by default either.
I thought it was just Java GUIs being slow.
Changing this to a lower number gives the impression that the IDE is faster and more responsive.

0
Comment actions Permalink

Coming from a VB background, you're probably not aware of how experienced Java programmers are aware of case sensitivity and make use of it.

With regards to the time for popup, somebody who knows what they are typing and does not need the popup would be unnecessarily annoyed by it popping up if the default were shorter.

The defaults are fine and you're free to change them to suit yourself.

0
Comment actions Permalink

>>>I thought it was just Java GUIs being slow.

burn the heretic!

>>>arraylist test=new arraylist]]>();

to get this, i'd type:
licompletition<intcompletition> completition = new smart completition

if i need it often, i'd make a live template.
did i mention i don't like to type much?

Message was edited by:
HamsterofDeath

0
Comment actions Permalink

Never type a variable declaration!

new ALcompletion<intcompletion>()Ctrl-Alt-Vvariable name in dialog box, which might magically be what you wantedEnter.

in a perfect world, this would declare a List rather than an ArrayList, but sadly such is not the case.

--Dave Griffith

0
Comment actions Permalink

this does not give the same result as my method: i'd have to choose "list" (in the introduce-dialog) as the type, arraylist would be the default.

0
Comment actions Permalink

Never type a variable declaration!


Agreed.


new ALcompletion<intcompletion>()Ctrl-Alt-V*variable name in
dialog box, which might magically be what you wanted*Enter.


The SmartIntroduce plugin makes Ctrl-Alt-V even better.


in a perfect world, this would declare a List rather than an
ArrayList, but sadly such is not the case.


Usually I hit Ctrl-Shift-T after the "introduce" operation above.
I have Ctrl-Shift-T mapped to the "Change Type" (from the "Type Refactoring"
plugin).

The "Introduce Variable" dialog has a type selection option, however I never
use it.

-tt


0
Comment actions Permalink

But back to the original point, if the IDE can't find a case sensitive match for "string" why doesn't it do a case insensitive search?
It would then match "String" and if it was the only option then it can either auto-change it or perhaps give the option to change it or create a new class.
Doesn't that make sense?

0
Comment actions Permalink

in a perfect world, this would declare a List rather than an ArrayList, but sadly such is not the case.


+1

0

Please sign in to leave a comment.