Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't work on Linux #16

Open
skylarmt opened this issue Feb 26, 2015 · 7 comments
Open

Doesn't work on Linux #16

skylarmt opened this issue Feb 26, 2015 · 7 comments
Labels

Comments

@skylarmt
Copy link

On Windows and Mac, I can press Ctrl-space and get the popup box. On Ubuntu, it doesn't do anything.

@ricardojlrufino
Copy link

I'm using Linux and is working (I use GNOME)

I found a problem that eg when you have a window "Always on Top"

@skylarmt
Copy link
Author

I'm using it inside a JInternalFrame if that makes a difference.

@eitzenbe
Copy link

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)

@bobbylight
Copy link
Owner

Unfortunately I have no access to a Ubuntu box, so pull requests are welcome!

@skylarmt
Copy link
Author

@bobbylight You can run Ubuntu easily from a USB stick or virtual machine.

@eitzenbe
Copy link

eitzenbe commented Nov 1, 2016

@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 ;)

@bobbylight bobbylight added the bug label Nov 2, 2016
@bobbylight
Copy link
Owner

RoundRobinAutoCompletion was actually contributed by someone else, and I don't use it. If you want this fixed quicker, pull requests are welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants