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
Inconsistent auto completion #50
Comments
The java language server is started in the JVM and not ART. We use a process builder to start the language server process. This does not work so good. I'm planning of using something else for completion, or fall back to using JDK 8's compiler. |
@dhaigit The language server is no longer dependent on the JVM. The java compiler is now included in the IDE and the language server too. I made some improvements in the java completion. Could you please check it? |
Finally you have updated after many days, lol. The new auto completion system seems to work better and more consistently. Still, there is a problem that I can't pinpoint at exactly when or why it happened but I think it did sometimes (not every time) while the IDE was doing a build and I was typing some letters to test out the auto completion. These messages were from the IDE logs screen:
At that moment, auto completion did not show anything while I was typing. (not even when the building process was done) I managed to make it work again by selecting quick run or one of the two assemble options (after waiting for the ongoing one to finish first of course) Also, maybe you could tweak to make completion suggestions appear a little more snappy. Lastly, the Diagnostics view never showed anything. |
I just noticed something while playing around with the auto completion. Open a simple project and make sure auto completion is working, then try this:
You will notice that the big red icon "C" (for class) at the start of the list item jitters (but the rest of the line does not) Auto completion should appear smoother if that is fixed. Maybe we could find some more ways to improve it. I think quick and instant auto completion would make a very positive user experience. |
That is because the height of the icon widget is set dynamically to match the height of the completion item view. See this. But I'll fix it. |
Yes! It appears snappier now without the jittery completion results list. Some more related thoughts: When I open a project, I would like to be able to start typing and see the completion results as soon as possible. Currently, the IDE is always trying to run assembleDebug the moment we open a project, and it usually takes a while (also depends on the size of the project of course) before I could use auto completion. Do we really need to assembleDebug every time we open a project? We do need to quickly analyze the project for possible compile errors so we could fix them, but probably not doing a build yet. So maybe we could shorten the time from opening a project to the time the auto completion starting to work. |
The There is another way of getting the details we need. We could use the Gradle Tooling API. But we'll be able to use it only on the JVM. That's because the tooling API uses class loaders. |
I just noticed the icon "F" still needs to be fixed. |
I didn't get any issues with the 'F' letter in completion window. Any specific way to reprodice it? (Accidentally closed the issue). |
It's "F" for "Field" so any results list with fields in it would do. I think starting with "Me..." has plenty of those.
Any list item that contains a field will jitter. |
Even with the latest build, autocompletion still isn't 100% consistent. It will still sometimes fail with "...already in use" message. Here are my workarounds (that seem to work for me) that I have shared in another post, in order to continue using the IDE when it happens.
I wish we could just open a project and start coding right away with perfect autocompletion, but according to Itsaky, we can't avoid that (long) initial build (that sometimes causes autocompletion failure) for now. |
With more testing, I have found that the jittering is caused not only specifically by having a field but anything that has the added "deprecated since..." info below it. |
Okay. I think that happens because we check the API details in the completion adapter itself ( Computing it in completion provider itself will make the completions a bit slower. |
It flickers because of the switching back and forth between GONE and VISIBLE.
(or maybe API info on the right and kind info on the left) |
The auto completion is kind of iffy. Sometimes it shows sometimes it doesn't. Looking at the ide messages, I see that it isn't always able to process the classpath and ends up just being able to recognize only keywords and local variables.
A lot of the times, it even shows nothing. With each letter we enter, the idelogs view spits out:
The text was updated successfully, but these errors were encountered: