eclipse-gemoc / eclipse-gemoc/gemoc-studio-modeldebugging

Cannot run model contained in a project with white spaces in the name

Open
#84 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Java
Stars
6
Forks
14
PR merge metrics
No merged PRs in 30d

Description

The sequential java engine crashes when trying to initialize the context if the model to execute is contained in a project with a white space in the name.

Step to reproduce the issue:
* get the K3FSM language in the first language workbench
* in the modeling workbench, get the example model, create a new project with a white space( "test test" for example), copy the model in it, close the origin project, create some Sirius representation, create a launch conf and start the execution

It will fail with an exception similar to:

```
org.eclipse.gemoc.executionframework.engine.commons.EngineContextException: Cannot initialize the execution context, see inner exception.
at org.eclipse.gemoc.executionframework.engine.commons.AbstractModelExecutionContext.(AbstractModelExecutionContext.java:62)
at org.eclipse.gemoc.execution.sequential.javaengine.SequentialModelExecutionContext.(SequentialModelExecutionContext.java:27)
at org.eclipse.gemoc.execution.sequential.javaengine.ui.launcher.Launcher.createExecutionEngine(Launcher.java:38)
at org.eclipse.gemoc.execution.sequential.javaengine.ui.launcher.Launcher.createExecutionEngine(Launcher.java:1)
at org.eclipse.gemoc.executionframework.engine.ui.launcher.AbstractSequentialGemocLauncher.launch(AbstractSequentialGemocLauncher.java:108)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:859)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:717)
at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1039)
at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1256)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:60)
Caused by: org.eclipse.core.internal.resources.ResourceException: Resource '/test%20test' does not exist.
at org.eclipse.core.internal.resources.Resource.checkExists(Resource.java:327)
at org.eclipse.core.internal.resources.Resource.checkAccessible(Resource.java:201)
at org.eclipse.core.internal.resources.Project.checkAccessible(Project.java:142)
at org.eclipse.core.internal.resources.Folder.assertCreateRequirements(Folder.java:33)
at org.eclipse.core.internal.resources.Folder.create(Folder.java:93)
at org.eclipse.core.internal.resources.Folder.create(Folder.java:121)
at org.eclipse.gemoc.executionframework.engine.core.ExecutionWorkspace.createFolder(ExecutionWorkspace.java:84)
at org.eclipse.gemoc.executionframework.engine.core.ExecutionWorkspace.createExecutionFolders(ExecutionWorkspace.java:76)
at org.eclipse.gemoc.executionframework.engine.core.ExecutionWorkspace.createExecutionContext(ExecutionWorkspace.java:72)
at org.eclipse.gemoc.executionframework.engine.core.ExecutionWorkspace.(ExecutionWorkspace.java:37)
at org.eclipse.gemoc.executionframework.engine.commons.AbstractModelExecutionContext.(AbstractModelExecutionContext.java:49)
... 9 more
```

apparently, the URI uses "%20" for white space and this not correctly handled when converting to path

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.