Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

using xtext + melange may raise IllegalArgumentException: Qualified name cannot be empty #125

Closed
dvojtise opened this issue Sep 18, 2018 · 3 comments
Assignees
Labels

Comments

@dvojtise
Copy link
Contributor

dvojtise commented Sep 18, 2018

java.lang.IllegalArgumentException: Qualified name cannot be empty
	at org.eclipse.xtext.naming.IQualifiedNameConverter$DefaultImpl.toQualifiedName(IQualifiedNameConverter.java:59)
	at org.eclipse.xtext.xbase.XbaseQualifiedNameConverter.toQualifiedName(XbaseQualifiedNameConverter.java:36)
	at fr.inria.diverse.melange.utils.MelangeQualifiedNameProvider.getFullyQualifiedName(MelangeQualifiedNameProvider.java:53)
	at fr.inria.diverse.melange.utils.MelangeQualifiedNameProvider.getFullyQualifiedName(MelangeQualifiedNameProvider.java:31)

the test verifies only !== null but does not verifies isEmpty

@dvojtise dvojtise added the bug label Sep 18, 2018
@dvojtise dvojtise self-assigned this Sep 18, 2018
@fcoulon
Copy link
Contributor

fcoulon commented Sep 18, 2018

It can't retrieve the Language's name ?

@dvojtise
Copy link
Contributor Author

dvojtise commented Sep 18, 2018

on my example, the ImportDsl name is not null but is an empty String (so it was crashing here https://github.com/diverse-project/melange/blob/master/plugins/fr.inria.diverse.melange/src/main/java/fr/inria/diverse/melange/utils/MelangeQualifiedNameProvider.xtend#L32 because it was not able to fallback to the alternative way to get the dsl name)
the example is based on xtext first (ie. the ecore is generated from xtext) then use melange to "downcast" and not using sirius.

@fcoulon
Copy link
Contributor

fcoulon commented Sep 18, 2018

Ok thanks for the fix

Just for info, the ImportDsl.name should be set by this preprocessor (this may be a corner case):
https://github.com/diverse-project/melange/blob/master/plugins/fr.inria.diverse.melange/src/main/java/fr/inria/diverse/melange/processors/ImportDslProcessor.xtend#L50

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants