Skip to content

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

@dvojtise

Description

@dvojtise

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.<init>(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.<init>(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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions