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
Backport/semantic highlighting on classfiles #522
Backport/semantic highlighting on classfiles #522
Conversation
Created a `ScalaCompilationUnitEditor` that contains the logic common to both the `ScalaSourceFileEditor` and the `ScalaClassFileEditor`. In particular, the logic needed to install/dispose semantic highlighting is encapsulated in `ScalaCompilationUnitEditor`. It is worth pointing out that the initialization of the Semantic Highlighting engine is different for the two editors. On the one hand, on an editable scala source, semantic highlighting is triggered by the reconciler. On the other hand, for a classfile source attachement, no reconciler is needed (because the source file can't be edited), hence semantic highlighting needs to be forced at initialization. This is why in `ScalaCompilationUnitEditor` we have the following two additional abstract methods * `forceSemanticHighlightingOnInstallment` * `createSemantichHighlighter` This commit comes with no tests because it is not possible to avoid the loading of UI classes. Fix #1000939 (cherry picked from commit cb87dc5) Conflicts: org.scala-ide.sdt.core/src/scala/tools/eclipse/ScalaClassFileEditor.scala org.scala-ide.sdt.core/src/scala/tools/eclipse/ScalaSourceFileEditor.scala org.scala-ide.sdt.core/src/scala/tools/eclipse/semantichighlighting/ui/TextPresentationEditorHighlighter.scala org.scala-ide.sdt.core/src/scala/tools/eclipse/semicolon/ShowInferredSemicolonsAction.scala
I've monkey tested this and it seemed to work fine. |
Test FAILed. |
failure is expected... |
Test FAILed. |
Maybe we want to push this on 3.0.x-juno first, so that validation works ? |
@huitseeker I can open a mirror PR for this on juno. |
Compiled and smoked tested this PR locally. |
…classfiles Backport/semantic highlighting on classfiles
No description provided.