Doesn't work on Linux
On Windows and Mac, I can press Ctrl-space and get the popup box. On Ubuntu, it doesn't do anything.
I'm using Linux and is working (I use GNOME)
I found a problem that eg when you have a window "Always on Top"
I'm using it inside a JInternalFrame if that makes a difference.
I am also using it on linux (KDE/Ubuntu) and it works with the only glitch (related to RoundrobinAutoCompleter), that when using it fo rthe second time the popup window does not get updated with the current active completer (so it stillshows the old one previousely active while it has already selected the correct entry)
Unfortunately I have no access to a Ubuntu box, so pull requests are welcome!
@bobbylight You can run Ubuntu easily from a USB stick or virtual machine.
@bobbylight I analyzed in more detail and found that it also FAILS on Windows. The workaround (due to too high encapsulation policy AKA privte members and fields EVERYWHERE ;) that got it working on BOTH platforms is:
rrac = new RoundRobinAutoCompletion(p) {
@Override
protected int refreshPopupWindow() {
// Do this once to make sure the popupwindow is instantiated
int res = super.refreshPopupWindow();
resetProvider();
CompletionProvider c0 = getCompletionProvider();
do {
advanceProvider();
if (getCompletionProvider() == c0) {
if (getCompletionProvider().getCompletions(getTextComponent()).size() == 0) {
hidePopupWindow();
return -1;
} else {
break;
}
}
} while (getCompletionProvider().getCompletions(getTextComponent()).size() == 0);
res = super.refreshPopupWindow();
return res;
}
};
in other words your code is missing to analyze which auto completion provider to use as the one to display the possible solutions IF the window is already open. You assume that its always the current one that i fine, steps to reproduce:
Create RRAC with at least TWO Completion Providers, populate one with AA* completions, second one with BB*** Then enter first AA, chose any completion by pressing return NOW enter BB and trigger auto completion and you will only see AA proposals... At least on my Editor ;)
RoundRobinAutoCompletion was actually contributed by someone else, and I don't use it. If you want this fixed quicker, pull requests are welcome!