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
Scala Hover API and fixes #816
Conversation
230e6cb
to
7d3977e
Compare
I fixed the two issues noted by @skyluc |
The deadlock is broken by a timeout after 10 seconds, but the problem remains, and is especially annoying when waiting for a quick fix.
7d3977e
to
af01023
Compare
Test PASSed. See Console Output in the link below for an update site containing this PR binary artefacts. Refer to this link for build results: https://jenkins.scala-ide.org:8496/jenkins/job/ghprb-scala-ide-validator/1183/ |
LGTM, except for the problem in the play template editor, where the hover sometime displays the information from the wrong offset, when a file is dirty. Not a blocker for me. |
htmlContents(header, comment) | ||
}.getOption() | ||
val htmlOutput = rawOutput map {(comm) => createHtmlOutput {(sb) => sb append comm }} | ||
val javaElement = getJavaElement(sym, javaProject) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Making the getJavaElement
call faster is indeed the whole reason this was taking a javaProject
as an argument, and it's true this call is unneeded for Scala code (we could pass null
there in fact). But I'm wary about the effect removing this line for hovers on java term Haven't managed to break anything so far, though.
Works fine on Java elements (!). LGTM |
Test PASSed. See Console Output in the link below for an update site containing this PR binary artefacts. Refer to this link for build results: https://jenkins.scala-ide.org:8496/jenkins/job/ghprb-scala-ide-validator/1191/ |
Ok, I'll merge this, trigger a nightly and wait for plugins to build |
I get some It seems easier to reproduce in the Play Template editor, but I got it also in the Scala Editor. I'm using
|
I've seen this as well... I think it's the hover computer that interrupts the thread if the user starts typing or moves the cursor. I could add another try-catch in ScalaHover. Edit: I don't think this is new to this PR, but annoying nonetheless |
It was there before the PR : long requests on inherited, or far-away (for some sense) scaladoc get regularily interrupted. |
Based on #812.