Skip to content
GitLab
Projects Groups Topics 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 revisions
    • Locked files
  • Issues 99
    • Issues 99
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 7
    • Merge requests 7
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
    • Test cases
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Model experiments
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Eclipse ProjectsEclipse Projects
  • Eclipse ESCET (Supervisory Control Engineering Toolkit)
  • escet
  • Issues
  • #567

Unable to run CIF simulation in stand-alone mode using ./bin/cifsim

When running the CIF simulator in stand-alone mode using ./bin/cifsim it crashes showing the following message:

ERROR: Failed to open editor "org.eclipse.escet.cif.simulator.input.InteractiveGuiInputEditor" for file "philosophers1.cif".
CAUSE: (IllegalStateException) Workbench has not been created yet.

Looking into the code, this error is caused by EclipseThemeUtils.isDarkThemeInUse() as it calls PlatformUI.getWorkbench(). Because the workbench is not active in stand-alone mode, this call fails.

Modifying the code to work around this issue revealed a second issue where the application crashes when it calls InstanceScope.INSTANCE.getNode(ThemeEngine.THEME_PLUGIN_ID) in the EclipseThemePreferenceChangeListener class. The InstanceScope.INSTANCE.getNode() functionality requires the workspace location to be specified. Again, when running in stand-alone mode this location is not specified.

Browsing the git history, it seems the introduction of "Dark theme" support broke the escet stand-alone tools ./bin/cifsim and ./bin/cifsynthanalys as it added dependencies to the Eclipse Workbench environment and workspace location which are not present in stand-alone mode.

See #417 More ESCET dark theme support

As suggested in, the canceled, merge request !555 (closed) I propose seperatly resolving the follwoing related issues:

  • (!557 (merged)) Resolve startup error for all eventbased stand-alone application. !555 comment
  • (!558 (merged)) Adding run configuration to run/debug stand-alone CIF simulator from Eclipse.
  • (!561 (merged)) Resolve error running stand-alone applications without a workspace. !555 comment
  • (!561 (merged)) Resolve error checking for Dark mode by stand-alone applications. !555 comment
  • (!559 (merged)) Resolve standalone cifsynthanaly closing immediately. !555 comment
Edited Apr 25, 2023 by Patrick van Berkel
Assignee
Assign to
Time tracking

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