eclipse-gemoc / eclipse-gemoc/gemoc-studio-execution-ale

NPE in launcher wizard if the ale key points to the wrong ale file

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

Description

if the dsl file points to a non existing ale file
then in the launch configuration, trying to browse for the main method raises a NullPointerException

```
java.lang.NullPointerException
at org.eclipse.emf.ecoretools.ale.ide.WorkbenchDsl.pluginToFile(WorkbenchDsl.java:96)
at org.eclipse.emf.ecoretools.ale.ide.WorkbenchDsl.convertToFile(WorkbenchDsl.java:66)
at org.eclipse.emf.ecoretools.ale.ide.WorkbenchDsl.lambda$0(WorkbenchDsl.java:50)
at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382)
at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:580)
at org.eclipse.emf.ecoretools.ale.ide.WorkbenchDsl.resolveUris(WorkbenchDsl.java:50)
at org.eclipse.emf.ecoretools.ale.ide.WorkbenchDsl.(WorkbenchDsl.java:33)
at org.eclipse.gemoc.ale.interpreted.engine.Helper.gemocDslToAleDsl(Helper.java:24)
at org.eclipse.gemoc.ale.interpreted.engine.ui.SelectMainMethodDialog.update(SelectMainMethodDialog.java:48)
at org.eclipse.gemoc.ale.interpreted.engine.ui.SelectMainMethodDialog.(SelectMainMethodDialog.java:34)
at org.eclipse.gemoc.ale.interpreted.engine.ui.launcher.tabs.LaunchConfigurationMainTab$8.widgetSelected(LaunchConfigurationMainTab.java:346)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:249)

```

Instead, it should raise a proper error message in the eclipse log

Steps to reproduce: get the official example, change the dsl file and introduce a typo in the path for the ale file. in the modeling workbench create a new launch configuration and try to browse the main method for the language

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.