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

Backport/semantic highlighting on classfiles #522

Conversation

dotta
Copy link
Member

@dotta dotta commented Sep 3, 2013

No description provided.

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
@dotta
Copy link
Member Author

dotta commented Sep 3, 2013

I've monkey tested this and it seemed to work fine.

@ghprb-bot
Copy link

Test FAILed.
Refer to this link for build results: https://jenkins.scala-ide.org:8496/jenkins/job/ghprb-scala-ide-validator/175/

@dotta
Copy link
Member Author

dotta commented Sep 3, 2013

failure is expected...

@dotta dotta closed this Sep 3, 2013
@dotta dotta reopened this Sep 3, 2013
@ghprb-bot
Copy link

Test FAILed.
Refer to this link for build results: https://jenkins.scala-ide.org:8496/jenkins/job/ghprb-scala-ide-validator/180/

@huitseeker
Copy link
Member

Maybe we want to push this on 3.0.x-juno first, so that validation works ?

@dotta
Copy link
Member Author

dotta commented Sep 3, 2013

@huitseeker I can open a mirror PR for this on juno.

@dotta
Copy link
Member Author

dotta commented Sep 3, 2013

@huitseeker #526

@skyluc
Copy link
Member

skyluc commented Sep 3, 2013

Compiled and smoked tested this PR locally.
LGTM

dotta added a commit that referenced this pull request Sep 3, 2013
…classfiles

Backport/semantic highlighting on classfiles
@dotta dotta merged commit d179d37 into scala-ide:release/scala-ide-3.0.x Sep 3, 2013
@dotta dotta deleted the backport/semantic-highlighting-on-classfiles branch September 3, 2013 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants