Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • E escet
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Graph
    • Compare
    • Locked Files
  • Issues 93
    • Issues 93
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 3
    • Merge requests 3
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Eclipse ProjectsEclipse Projects
  • Eclipse ESCET (Supervisory Control Engineering Toolkit)
  • escet
  • Issues
  • #347
Closed
Open
Issue created Apr 07, 2022 by Albert Hofkamp@ahofkampDeveloper

Add dark theme support for SeText-based text editors

I was thinking to try modeling NPC behavior in CIF last weekend, and thought the simplest would be to use an escet produkt. So I grabbed a locally build ~/work/escet/dev/git/escet/product/org.eclipse.escet.product/target/products/eclipse-escet-incubation-dev-linux.gtk.x86_64.tar.gz, extracted it, and started eclipse-escet.

After typing a few lines it looks like

Screenshot_from_2022-04-07_15-44-29

The CIF text is quite horrible to read to say the least. Apparently the build picked up my dark theme from the development eclipse (not sure how, as mvn was building the binary from the command-line). I couldn't find a way to fix this from the constructed eclipse program, you can set a theme it was set to "light" so it made less than sense :p

So I was thinking likely the problem originates from our cif/texteditor/CifStyles.java class that defines foreground color but not background color. Hacking a background color into that fixed the text-part, but not the spaces left of the text, between the words, and after the text. The former two were fixable by adding an explicit background to the whitespace rule in cif/texteditor/CifTextEditorScanner.java.

That fixes thus the text and spaces of the line itself, but not at the right towards the right hand side of the editor window, except for the ruler (the "current line" where the cursor is, the white horizontal white band at line 3 in the picture).

I have not been able to find a way to change the background in the styles. The editor seems to only care about handling the stored program text in the editor. I did find AbstractEditor.PREFERENCE_COLOR_BACKGROUND and PREFERENCE_COLOR_BACKGROUND_SYSTEM_DEFAULT, no idea what the difference is between them. What to actually do with this value is not clear, as we don't even have preference settings it seems:

// org.eclipse.escet.setext.texteditorbase.GenericSourceViewerConfiguration
// line 84
    public void setPreferenceStore(IPreferenceStore preferenceStore) {
        Assert.check(fPreferenceStore == null);
        fPreferenceStore = preferenceStore;
    }

Note I have this also in my sub-eclipse, so it's not specific to a product.

Edited Sep 04, 2022 by Dennis Hendriks
Assignee
Assign to
Time tracking

Copyright © Eclipse Foundation, Inc. All Rights Reserved.     Privacy Policy | Terms of Use | Copyright Agent