No semantic highlight on jar's attached sources
Also Implicit highlighting doesn't work, but we have a different ticket to track progress on that: https://scala-ide-portfolio.assembla.com/spaces/scala-ide/tickets/1001872#/associations/ticket:
I think it shouldn't be hard to achieve, but some refactoring is needed.
In scala-ide:cb87dc5a10c09c6093565a21da3d72f1171bf229 Semantic Highlighting now works on classfile source attachments
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
In scala-ide:8247c6465e87e85b89b6fbcd568d8215b97972fd Semantic Highlighting now works on classfile source attachments
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 cb87dc5a10c09c6093565a21da3d72f1171bf229)
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