[ANN] CodeCompletionLive version 0.1

Glad to announce a new plugin.
Here is a problem it tries to solve
http://www.intellij.net/forums/message.jspa?messageID=5180035#5180035 .
But solves in a bit different way then I suggested in that message.

First it checks if there are Smart suggestions (ctrl-shift-space) if
none available, it checks Basic Code Completions (ctrl-space) if still
no luck (for example for new classes which are not imported) it shows
Class Name completion (ctrl-shift-space).

By default that action is binded to ctrl-shift-alt-u so you may try how
well it works right away. But I would suggest to bind it to ctrl-space.

-Sergiy

10 comments
Comment actions Permalink

Sergiy Dubovik napisa?(a):

Glad to announce a new plugin.
Here is a problem it tries to solve
http://www.intellij.net/forums/message.jspa?messageID=5180035#5180035 .
But solves in a bit different way then I suggested in that message.

First it checks if there are Smart suggestions (ctrl-shift-space) if
none available, it checks Basic Code Completions (ctrl-space) if still
no luck (for example for new classes which are not imported) it shows
Class Name completion (ctrl-shift-space).

By default that action is binded to ctrl-shift-alt-u so you may try how
well it works right away. But I would suggest to bind it to ctrl-space.

-Sergiy


Sergiy,

That's really great. I waited for this functionality since years.
I will give it a try.

Michal.

0
Comment actions Permalink

Sergiy Dubovik napisa?(a):

Glad to announce a new plugin.
Here is a problem it tries to solve
http://www.intellij.net/forums/message.jspa?messageID=5180035#5180035 .
But solves in a bit different way then I suggested in that message.

First it checks if there are Smart suggestions (ctrl-shift-space) if
none available, it checks Basic Code Completions (ctrl-space) if still
no luck (for example for new classes which are not imported) it shows
Class Name completion (ctrl-shift-space).

By default that action is binded to ctrl-shift-alt-u so you may try how
well it works right away. But I would suggest to bind it to ctrl-space.

-Sergiy

I've installed it and tried to use it on Idea 6161 on Mac OS X. I got:

Bad version number in .class file
com.intellij.diagnostic.PluginException: Bad version number in .class file
at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.a(ActionManagerImpl.java:265)
at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.a(ActionManagerImpl.java:286)
at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.getAction(ActionManagerImpl.java:282)
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.a(IdeKeyEventDispatcher.java:99)
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.b(IdeKeyEventDispatcher.java:59)
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.dispatchKeyEvent(IdeKeyEventDispatcher.java:35)
at com.intellij.ide.IdeEventQueue.a(IdeEventQueue.java:83)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:0)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:176)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Caused by: java.lang.UnsupportedClassVersionError: Bad version number in .class file
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.lang.ClassLoader.defineClass(ClassLoader.java:465)
at com.intellij.util.lang.UrlClassLoader._defineClass(UrlClassLoader.java:72)
at com.intellij.util.lang.UrlClassLoader.defineClass(UrlClassLoader.java:68)
at com.intellij.util.lang.UrlClassLoader.findClass(UrlClassLoader.java:49)
at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:53)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:242)
at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.a(ActionManagerImpl.java:293)
... 12 more

Did you compile the plugin using Java 6 or what?

Michal.

0
Comment actions Permalink

Yes, 1.6. Forgot about this. Damn. Will fix it tomorrow. Thanks!

0
Comment actions Permalink

Eclipse now has another interesting variant. Pressing Ctrl+Space multiple
times switches between the suggestion groups.

Tom

0
Comment actions Permalink

I recompiled the plugin please try again.
-sergiy

0
Comment actions Permalink

Yes I know, but it will be quite hard to do in IDEA. Anyway will see if
I can add Live Templates action in a chain.
-sergiy

Tom wrote:

Eclipse now has another interesting variant. Pressing Ctrl+Space
multiple times switches between the suggestion groups.

Tom

0
Comment actions Permalink

Sergiy Dubovik napisa?(a):

I recompiled the plugin please try again.
-sergiy


It works now like a charm.
I would propose that you assign to the autocomplete action Alt-Space as the default shortcut.
It's not taken, and it's pretty obvious to press.

Michal.

0
Comment actions Permalink

Great!
Unfortunately I can't use Alt-Space, because Alt on Windows it makes
menu active.
-sergiy

Michal Szklanowski wrote:

Sergiy Dubovik napisa?(a):

>> I recompiled the plugin please try again.
>> -sergiy


It works now like a charm.
I would propose that you assign to the autocomplete action Alt-Space as
the default shortcut.
It's not taken, and it's pretty obvious to press.

Michal.

0
Comment actions Permalink

i found a bug:
in every not-the-editor-textarea (like evaluate expression), CodeCompletitionLive (CCL) does not work.

i also managed to "defeat" the plugin:
int x = getObject().getAnInt(); won't work if there is an int directly available. i have no chance to get an autocompleted getObject with CCL.

and i even got a suggestion:
don't show just one completion list, show all of them in separate undecorated windows accessible by hotkeys (1,2,3,4 or traversable by tab, for example), preselecting the same entry/windows as it is now. configurable (order, maximum number of completition lists, etc) of course.

0
Comment actions Permalink

I don't use debugger and didn't see that thing. Thanks.

Yes, indeed, it has limitations. I used to think it will work in 100%
cases, but it doesn't. It doesn't work when you have for example Handler
class imported but you need a constant from HandlerConstants class. You
have to press ctrl-shift-space. Your case is far more serious, because
ctrl-shift-space won't help, it requires ctrl-space shortcut. Will see
if I can fix somehow.

I wish I have access to IDEA completions, but I don't. I can get raw
data from Smart and Basic code completion (pretty dirty hack) but if I
show them my self they don't work when IDEA adds letters besides
completion, for example in "new Listener(){}" case. JetBrainers are not
participating in this discussion, so I guess they don't want to open
that API.

-s

HamsterofDeath wrote:

i found a bug:
in every not-the-editor-textarea (like evaluate expression), CodeCompletitionLive (CCL) does not work.

i also managed to "defeat" the plugin:
int x = getObject().getAnInt(); won't work if there is an int directly available. i have no chance to get an autocompleted getObject with CCL.

and i even got a suggestion:
don't show just one completion list, show all of them in separate undecorated windows accessible by hotkeys (1,2,3,4 or traversable by tab, for example), preselecting the same entry/windows as it is now. configurable (order, maximum number of completition lists, etc) of course.

0

Please sign in to leave a comment.