How to have Eclipse intellisense autocomplete member names? - java

When I type in a method name partially, Eclipse intellisense shows me the list of suggestions, but how do I select one of them using only the keyboard?
I tried pressing the Tab key, the Enter key and the Space bar, but all to no avail. It appears that the only way I can get to select one of the names from the list of suggestions is to use the mouse. This is very irritating.
Is there a keyboard short-cut to selecting a name from the intellisense suggestions?

Type in some part of the expression, use the arrow keys to navigate through the suggestions offered by intellisense. And then hit the Enter key to select the chosen expression, dismiss the pop-ups and have the selected expression appear in the editor in place of your partially typed expression.
Do not hit the tab key before making a selection as that moves focus away from the suggestions window.

Related

Unexpected Intellij Auto Complete Results

Hey there basically I'm seeing unexpected auto completion by intellij. I have tried multiple way to get it to work the way I expected it to and can't.
https://www.webmshare.com/play/yAPxo
The first line is what happens when you press tab to auto complete something and the following is when you click it in the menu.
I was wondering if it is possible to change the behavior so when I press it TAB it follows the behavior of the second line.
Thanks.
I came from work, I am glad it worked for you, so I wanted to add it as an answer.
Enter is the key for what you click in the menu to autoComplete. Tab replaces the remaining part, whereas enter just adds the completion into where the caret is. You should be able to change keys for those actions. To change those keys:
Open preferences in Intellij and go to Keymap
Change Choose Lookup Item with whichever key you want to use (it is tab key in your case I presume)

IntelliJ autocompletion replacing the subsequent word

I've been using IntelliJ for a while now, but there's always been something that bothers me. Its to do with the autocomplete feature. This gif should be enough to illustrate.
In essence, when typing a word next to another one (that is with no space in between) regardless of the two words or the context, be it keywords or variables, the autocomplete will replace the next word by the one you complete with. I/m surprised that IntelliJ doesn't have a setting for that (at least not that I'm aware of) considering Eclipse does...
Thanks in advance!
This behavior depends on the key that you use to select the item from the completion list. If you press Enter, the selected item is inserted in the code before the following identifier. If you press Tab, the selected item replaces the identifier following the cursor.
If you prefer, you can change the behavior by reassigning keyboard shortcuts for "Choose Lookup Item" and "Choose Lookup Item Replace" under Settings | Keymap.

JCheckBoxes inside JComboBox

I have added checkboxes inside combo box in Java. But when I open drop down menu and check one check box, the drop down menu closes. So to select each check box I have to open it every time.
Is there any way so that I can keep the drop down list opened till the time I dont click outside so that I can select any number of check boxes at one time only.
Please help!!
I have added checkboxes inside combo box in Java. But when I open drop
down menu and check one check box, the drop down menu closes. So to
select each check box I have to open it every time. Is there any way
so that I can keep the drop down list opened till the time I dont
click outside so that I can select any number of check boxes at one
time only.
no there isn't, this is default property of (BasicXxx)Popup implemented in Swing API, workaround for series of Bugs in Java1.4_xxx
no_way, only by using dirty hacks, usage of can be Java Version sensitive, or required left mouse button as accelerator
don't do that, another way (and proper of possible ways) is usage of JWindow/undecorated JDialog but required to override ESC Key and Focus lost in Windows three (as you can see in good Java JCalandars/JDatePickers),
I recommend that you to use the Japura API to deal with this, check this link:
http://www.japura.org/checkcombobox
Best Regards :)

AutoCompleteDecorate implemented on JComboBox

For those who are familiar with SwingX's AutoCompleteDecorator, I have a question regarding handling of JComboBox's Popup Visibility. I used AutoCompleteDecorate.decorate(JComboBox combobox) in my current project which I already mentioned in my previous posts, the problem I encountered is when ever the user type a keyword that doesn't match any of the combobox items, the popup remains visible. For the convenience of the users, I would like to hide combobox's popup if the keyword typed doesn't match any of combobox items.
If you want the autocompletion feature, but you don't want to have a popup in the way (especially, as you mention, when entered text doesn't match any item) you might like to try the opensource JIDE Common Layer. It has a very useful (I use it a lot myself) autocompletion feature that you can apply to JComboBoxes, JTextFields, etc..
You can see a Java Web Start overview of the components by clicking on the "RUN IT" link on the above page, or by clicking here. Navigate to
Demos->AutoCompletion Demo->AutoCompletion combo box and text field->AutoCompletion JTextField with a hidden data
to try it out. You can also see the source code by clicking on Browse Source Code.
You can enable/disable a strict flag in order to prevent/allow user to enter text not matched with items.
However, as far as I have tested, JIDE's combo boxes with autocompletion also have the "issue" that keep their popup open even if no match is found, but what I'm suggesting here is to try an autocompleting textfield which has no popup at all (they autocomplete in place, highlighting the part of the matched text that you didn't manually type-in).

Dialog name for the Ctrl-f6 in eclipse

What is the name of this dialog? I cannot use plugin spy as this dialog does not stay open very long. This is the dialog to switch editor.
Ctrl+F6 — Switch between last used files.
It shows you the list of last used files. If you hold Ctrl and press F6 more than once - you will iterate on this list.
Firstly, the word 'dialog' might be misleading. This 'popup list' interface doesn't have window decorations, so it's hard to say whether it's a dialog, frame or something else. This might mean you're looking in the wrong places.
FYI, Switch Editor (CTRL+F6), Switch View (CTRL+F7) and Switch Perspective (CTRL+F8) all use the same type of popup so finding one of their class names should help you find what you're looking for.
This SWT spy might help you find the component. To get around the issue with it not being open long, press and release the SHIFT key while the list is open, and it will now stay open if you release all the keys, and will only close if you click away or use ESC/ENTER.

Categories

Resources